@cyberskill/shared 1.46.0 → 1.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -18
- package/dist/_tsup-dts-rollup.d.cts +413 -31
- package/dist/_tsup-dts-rollup.d.ts +413 -31
- package/dist/cli.cjs +2136 -1
- package/dist/cli.d.cts +2 -1
- package/dist/cli.d.ts +2 -1
- package/dist/cli.js +2056 -1
- package/dist/configs/commitlint/base.cjs +64 -1
- package/dist/configs/commitlint/base.js +7 -1
- package/dist/configs/eslint/base.cjs +121 -1
- package/dist/configs/eslint/base.js +52 -1
- package/dist/configs/eslint/nestjs.cjs +155 -1
- package/dist/configs/eslint/nestjs.js +85 -1
- package/dist/configs/eslint/nextjs.cjs +155 -1
- package/dist/configs/eslint/nextjs.js +85 -1
- package/dist/configs/eslint/nodejs.cjs +156 -1
- package/dist/configs/eslint/nodejs.js +86 -1
- package/dist/configs/eslint/vite-react.cjs +159 -1
- package/dist/configs/eslint/vite-react.js +89 -1
- package/dist/configs/graphql/graphql-codegen.cjs +125 -1
- package/dist/configs/graphql/graphql-codegen.js +64 -1
- package/dist/configs/graphql/index.cjs +126 -1
- package/dist/configs/graphql/index.js +64 -1
- package/dist/configs/i18n/react/i18next.cjs +80 -1
- package/dist/configs/i18n/react/i18next.js +7 -1
- package/dist/configs/i18n/react/index.cjs +81 -1
- package/dist/configs/i18n/react/index.js +7 -1
- package/dist/configs/index.cjs +232 -1
- package/dist/configs/index.js +166 -1
- package/dist/configs/lint-staged/base.cjs +64 -1
- package/dist/configs/lint-staged/base.js +7 -1
- package/dist/configs/vitest/react/e2e.cjs +128 -1
- package/dist/configs/vitest/react/e2e.js +59 -1
- package/dist/configs/vitest/react/unit.cjs +305 -1
- package/dist/configs/vitest/react/unit.js +228 -1
- package/dist/configs/vitest/react/unit.setup.cjs +60 -1
- package/dist/configs/vitest/react/unit.setup.js +8 -1
- package/dist/constants/index.cjs +678 -1
- package/dist/constants/index.d.cts +31 -1
- package/dist/constants/index.d.ts +31 -1
- package/dist/constants/index.js +469 -1
- package/dist/constants/path.cjs +423 -1
- package/dist/constants/path.d.cts +31 -1
- package/dist/constants/path.d.ts +31 -1
- package/dist/constants/path.js +218 -1
- package/dist/constants/response-status.cjs +313 -1
- package/dist/constants/response-status.js +252 -1
- package/dist/index.cjs +4546 -1
- package/dist/index.d.cts +51 -6
- package/dist/index.d.ts +51 -6
- package/dist/index.js +4133 -1
- package/dist/nodejs/index.cjs +2138 -1
- package/dist/nodejs/index.js +2054 -1
- package/dist/nodejs/mongo.cjs +2137 -1
- package/dist/nodejs/mongo.js +2054 -1
- package/dist/react/apollo-client.cjs +177 -1
- package/dist/react/apollo-client.js +116 -1
- package/dist/react/index.cjs +990 -1
- package/dist/react/index.js +876 -1
- package/dist/react/loading.cjs +301 -1
- package/dist/react/loading.js +216 -1
- package/dist/react/next-intl.cjs +744 -1
- package/dist/react/next-intl.js +655 -1
- package/dist/react/storage.cjs +631 -1
- package/dist/react/storage.js +558 -1
- package/dist/typescript/api-response.cjs +48 -1
- package/dist/typescript/apollo.cjs +48 -1
- package/dist/typescript/command.cjs +68 -1
- package/dist/typescript/command.d.cts +4 -0
- package/dist/typescript/command.d.ts +4 -0
- package/dist/typescript/command.js +7 -1
- package/dist/typescript/config.cjs +48 -1
- package/dist/typescript/fs.cjs +48 -0
- package/dist/typescript/fs.d.cts +1 -0
- package/dist/typescript/fs.d.ts +1 -0
- package/dist/typescript/fs.js +0 -0
- package/dist/typescript/graphql-codegen.cjs +48 -1
- package/dist/typescript/index.cjs +175 -1
- package/dist/typescript/index.d.cts +5 -0
- package/dist/typescript/index.d.ts +5 -0
- package/dist/typescript/index.js +151 -1
- package/dist/typescript/loading.cjs +48 -1
- package/dist/typescript/log.cjs +48 -1
- package/dist/typescript/mongo.cjs +164 -1
- package/dist/typescript/mongo.js +145 -1
- package/dist/typescript/next-intl.cjs +48 -1
- package/dist/typescript/react.cjs +48 -1
- package/dist/typescript/serializer.cjs +48 -1
- package/dist/typescript/string.cjs +48 -1
- package/dist/utils/command.cjs +1387 -1
- package/dist/utils/command.d.cts +2 -0
- package/dist/utils/command.d.ts +2 -0
- package/dist/utils/command.js +1287 -1
- package/dist/utils/common.cjs +300 -1
- package/dist/utils/common.js +219 -1
- package/dist/utils/config.cjs +146 -1
- package/dist/utils/config.js +89 -1
- package/dist/utils/fs.cjs +118 -1
- package/dist/utils/fs.d.cts +4 -1
- package/dist/utils/fs.d.ts +4 -1
- package/dist/utils/fs.js +37 -1
- package/dist/utils/index-nodejs.cjs +1738 -1
- package/dist/utils/index-nodejs.d.cts +15 -5
- package/dist/utils/index-nodejs.d.ts +15 -5
- package/dist/utils/index-nodejs.js +1571 -1
- package/dist/utils/index.cjs +727 -1
- package/dist/utils/index.js +625 -1
- package/dist/utils/log.cjs +330 -1
- package/dist/utils/log.js +269 -1
- package/dist/utils/package.cjs +941 -0
- package/dist/utils/package.d.cts +3 -0
- package/dist/utils/package.d.ts +3 -0
- package/dist/utils/package.js +857 -0
- package/dist/utils/path.cjs +291 -0
- package/dist/utils/path.d.cts +6 -0
- package/dist/utils/path.d.ts +6 -0
- package/dist/utils/path.js +191 -0
- package/dist/utils/serializer.cjs +91 -1
- package/dist/utils/serializer.js +30 -1
- package/dist/utils/storage-client.cjs +349 -1
- package/dist/utils/storage-client.js +276 -1
- package/dist/utils/storage-server.cjs +636 -1
- package/dist/utils/storage-server.d.cts +1 -1
- package/dist/utils/storage-server.d.ts +1 -1
- package/dist/utils/storage-server.js +550 -1
- package/dist/utils/string.cjs +152 -1
- package/dist/utils/string.js +75 -1
- package/dist/utils/validate.cjs +90 -1
- package/dist/utils/validate.js +33 -1
- package/package.json +19 -16
- package/dist/utils/npm-package.cjs +0 -1
- package/dist/utils/npm-package.d.cts +0 -4
- package/dist/utils/npm-package.d.ts +0 -4
- package/dist/utils/npm-package.js +0 -1
package/dist/typescript/index.js
CHANGED
|
@@ -1 +1,151 @@
|
|
|
1
|
-
function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(t){if(Array.isArray(t))return e(t)}function n(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function o(e){var t,r;function n(e,n){return new Promise(function(u,i){var s={key:e,arg:n,resolve:u,reject:i,next:null};if(r){r=r.next=s}else{t=r=s;o(e,n)}})}function o(t,r){try{var n=e[t](r);var i=n.value;var s=i instanceof l;Promise.resolve(s?i.wrapped:i).then(function(e){if(s){o("next",e);return}u(n.done?"return":"normal",e)},function(e){o("throw",e)})}catch(e){u("throw",e)}}function u(e,n){switch(e){case"return":t.resolve({value:n,done:true});break;case"throw":t.reject(n);break;default:t.resolve({value:n,done:false});break}t=t.next;if(t){o(t.key,t.arg)}else{r=null}}this._invoke=n;if(typeof e.return!=="function"){this.return=undefined}}if(typeof Symbol==="function"&&Symbol.asyncIterator){o.prototype[Symbol.asyncIterator]=function(){return this}}o.prototype.next=function(e){return this._invoke("next",e)};o.prototype.throw=function(e){return this._invoke("throw",e)};o.prototype.return=function(e){return this._invoke("return",e)};function u(e){var t,r,n,o=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);o--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new i(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function i(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return i=function(e){this.s=e,this.n=e.next},i.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new i(e)}function s(e,t,r,n,o,u,i){try{var s=e[u](i);var a=s.value}catch(e){r(e);return}if(s.done){t(a)}else{Promise.resolve(a).then(n,o)}}function a(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var u=e.apply(t,r);function i(e){s(u,n,o,i,a,"next",e)}function a(e){s(u,n,o,i,a,"throw",e)}i(undefined)})}}function c(e){return new l(e)}function l(e){this.wrapped=e}function d(e,t,r){t=g(t);return k(e,G()?Reflect.construct(t,r||[],g(e).constructor):t.apply(e,r))}function f(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}function h(e,t,r){if(G()){h=Reflect.construct}else{h=function e(e,t,r){var n=[null];n.push.apply(n,t);var o=Function.bind.apply(e,n);var u=new o;if(r)I(u,r.prototype);return u}}return h.apply(null,arguments)}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(e,n.key,n)}}function p(e,t,r){if(t)v(e.prototype,t);if(r)v(e,r);return e}function m(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}function E(){E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r){if(Object.prototype.hasOwnProperty.call(r,n)){e[n]=r[n]}}}return e};return E.apply(this,arguments)}function y(e,t,r){if(typeof Reflect!=="undefined"&&Reflect.get){y=Reflect.get}else{y=function e(e,t,r){var n=P(e,t);if(!n)return;var o=Object.getOwnPropertyDescriptor(n,t);if(o.get){return o.get.call(r||e)}return o.value}}return y(e,t,r||e)}function g(e){g=Object.setPrototypeOf?Object.getPrototypeOf:function e(e){return e.__proto__||Object.getPrototypeOf(e)};return g(e)}function A(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function")}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:true,configurable:true}});if(t)I(e,t)}function C(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function S(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function b(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function O(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var o=true;var u=false;var i,s;try{for(r=r.call(e);!(o=(i=r.next()).done);o=true){n.push(i.value);if(t&&n.length===t)break}}catch(e){u=true;s=e}finally{try{if(!o&&r["return"]!=null)r["return"]()}finally{if(u)throw s}}return n}function w(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function D(e){if(e===null||e===void 0)throw new TypeError("Cannot destructure "+e);return e}function B(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};var n=Object.keys(r);if(typeof Object.getOwnPropertySymbols==="function"){n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))}n.forEach(function(t){m(e,t,r[t])})}return e}function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);if(t){n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}r.push.apply(r,n)}return r}function F(e,t){t=t!=null?t:{};if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(t))}else{T(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function M(e,t){if(e==null)return{};var r=R(e,t);var n,o;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(o=0;o<u.length;o++){n=u[o];if(t.indexOf(n)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,n))continue;r[n]=e[n]}}return r}function R(e,t){if(e==null)return{};var r={};var n=Object.keys(e);var o,u;for(u=0;u<n.length;u++){o=n[u];if(t.indexOf(o)>=0)continue;r[o]=e[o]}return r}function k(e,t){if(t&&(j(t)==="object"||typeof t==="function")){return t}return n(e)}function I(e,t){I=Object.setPrototypeOf||function e(e,t){e.__proto__=t;return e};return I(e,t)}function N(e,r){return t(e)||O(e,r)||z(e,r)||w()}function P(e,t){while(!Object.prototype.hasOwnProperty.call(e,t)){e=g(e);if(e===null)break}return e}function x(e,t){if(!t){t=e.slice(0)}return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function L(e){return t(e)||b(e)||z(e)||w()}function U(e){return r(e)||b(e)||z(e)||_()}function j(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function z(t,r){if(!t)return;if(typeof t==="string")return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor)n=t.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}function W(e){return function(){return new o(e.apply(this,arguments))}}function V(e){var t=typeof Map==="function"?new Map:undefined;V=function e(e){if(e===null||!S(e))return e;if(typeof e!=="function"){throw new TypeError("Super expression must either be null or a function")}if(typeof t!=="undefined"){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return h(e,arguments,g(this).constructor)}r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:false,writable:true,configurable:true}});return I(r,e)};return V(e)}function G(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(G=function(){return!!e})()}function H(e,t){var r,n,o,u,i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]};return u={next:s(0),"throw":s(1),"return":s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(e){return function(t){return a([e,t])}}function a(u){if(r)throw new TypeError("Generator is already executing.");while(i)try{if(r=1,n&&(o=u[0]&2?n["return"]:u[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;if(n=0,o)u=[u[0]&2,o.value];switch(u[0]){case 0:case 1:o=u;break;case 4:i.label++;return{value:u[1],done:false};case 5:i.label++;n=u[1];u=[0];continue;case 7:u=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){i=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(u[0]===6&&i.label<o[1]){i.label=o[1];o=u;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(u);break}if(o[2])i.ops.pop();i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e];n=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}}function q(){var e=x(["\b","\b"],["\\b","\\b"]);q=function t(){return e};return e}var K=Object.create;var Y=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames;var X=Object.getPrototypeOf,Q=Object.prototype.hasOwnProperty;var Z=function(e){return(typeof require==="undefined"?"undefined":j(require))<"u"?require:(typeof Proxy==="undefined"?"undefined":j(Proxy))<"u"?new Proxy(e,{get:function(e,t){return((typeof require==="undefined"?"undefined":j(require))<"u"?require:e)[t]}}):e}(function(e){if((typeof require==="undefined"?"undefined":j(require))<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var ee=function(e,t){return function(){return e&&(t=e(e=0)),t}};var et=function(e,t){return function(){return t||e((t={exports:{}}).exports,t),t.exports}},er=function(e,t){for(var r in t)Y(e,r,{get:t[r],enumerable:!0})},en=function(e,t,r,n){var o=true,u=false,i=undefined;if(t&&(typeof t==="undefined"?"undefined":j(t))=="object"||typeof t=="function")try{var s=function(){var o=c.value;!Q.call(e,o)&&o!==r&&Y(e,o,{get:function(){return t[o]},enumerable:!(n=$(t,o))||n.enumerable})};for(var a=J(t)[Symbol.iterator](),c;!(o=(c=a.next()).done);o=true)s()}catch(e){u=true;i=e}finally{try{if(!o&&a.return!=null){a.return()}}finally{if(u){throw i}}}return e};var eo=function(e,t,r){return r=e!=null?K(X(e)):{},en(t||!e||!e.__esModule?Y(r,"default",{value:e,enumerable:!0}):r,e)},eu=function(e){return en(Y({},"__esModule",{value:!0}),e)};var ei=ee(function(){"use strict"});var es=et(function(e){"use strict";var t=function e(e){return eD(e)==="Uint8Array"};var r=function e(e){return(typeof e==="undefined"?"undefined":j(e))=="object"&&e!=null&&Symbol.toStringTag in e&&(e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer")};var o=function e(e){return C(e,RegExp)||Object.prototype.toString.call(e)==="[object RegExp]"};var u=function e(e){return(typeof e==="undefined"?"undefined":j(e))=="object"&&e!=null&&Symbol.toStringTag in e&&e[Symbol.toStringTag]==="Map"};var i=function e(e){return C(e,Date)||Object.prototype.toString.call(e)==="[object Date]"};var s=function e(e,t){return JSON.stringify(e,function(e,t){return(typeof t==="undefined"?"undefined":j(t))=="bigint"?{$numberLong:"".concat(t)}:u(t)?Object.fromEntries(t):t})};var a=function e(e){if(e!=null&&(typeof e==="undefined"?"undefined":j(e))=="object"&&"stylize"in e&&typeof e.stylize=="function")return e.stylize};var c=function e(e,t,r,n){if(n){te!==null&&te!==void 0?te:te=new TextDecoder("utf8",{fatal:!0});try{return te.decode(e.subarray(t,r))}catch(e){throw new e9("Invalid UTF-8 string in BSON document",{cause:e})}}return tt!==null&&tt!==void 0?tt:tt=new TextDecoder("utf8",{fatal:!1}),tt.decode(e.subarray(t,r))};var l=function e(e,t,r){var n;if(e.length===0)return"";var o=r-t;if(o===0)return"";if(o>20)return null;if(o===1&&e[t]<128)return String.fromCharCode(e[t]);if(o===2&&e[t]<128&&e[t+1]<128)return String.fromCharCode(e[t])+String.fromCharCode(e[t+1]);if(o===3&&e[t]<128&&e[t+1]<128&&e[t+2]<128)return String.fromCharCode(e[t])+String.fromCharCode(e[t+1])+String.fromCharCode(e[t+2]);var u=[];for(var i=t;i<r;i++){var s=e[i];if(s>127)return null;u.push(s)}return(n=String).fromCharCode.apply(n,U(u))};var h=function e(e,t,r){if(t.length===0)return 0;if(t.length>25||e.length-r<t.length)return null;for(var n=0,o=r;n<t.length;n++,o++){var u=t.charCodeAt(n);if(u>127)return null;e[o]=u}return t.length};var v=function e(e){return tn.fromNumberArray(Array.from({length:e},function(){return Math.floor(Math.random()*256)}))};var m=function e(){var e=globalThis.navigator;return(typeof e==="undefined"?"undefined":j(e))=="object"&&e.product==="ReactNative"};var E=function e(e){if(e<0)throw new RangeError("The argument 'byteLength' is invalid. Received ".concat(e));return ti.fromNumberArray(Array.from({length:e},function(){return Math.floor(Math.random()*256)}))};var y=function e(e){if(e.sub_type!==tv.SUBTYPE_VECTOR)return;var t=e.position,r=e.buffer[0],n=e.buffer[1];if((r===tv.VECTOR_TYPE.Float32||r===tv.VECTOR_TYPE.Int8)&&n!==0)throw new e9("Invalid Vector: padding must be zero for int8 and float32 vectors");if(r===tv.VECTOR_TYPE.PackedBit&&n!==0&&t===2)throw new e9("Invalid Vector: padding must be zero for packed bit vectors that are empty");if(r===tv.VECTOR_TYPE.PackedBit&&n>7)throw new e9("Invalid Vector: padding must be a value between 0 and 7. found: ".concat(n))};var g=function e(e){return e!=null&&(typeof e==="undefined"?"undefined":j(e))=="object"&&"$id"in e&&e.$id!=null&&"$ref"in e&&typeof e.$ref=="string"&&(!("$db"in e)||"$db"in e&&typeof e.$db=="string")};var S=function e(e){if(e==="")return e;var t=0,r=e[t]==="-",n=e[t]==="+";(n||r)&&(t+=1);var o=!1;for(;t<e.length&&e[t]==="0";++t)o=!0;return o?"".concat(r?"-":"").concat(e.length===t?"0":e.slice(t)):n?e.slice(1):e};var b=function e(e,t){t=t!==null&&t!==void 0?t:10;var r="0123456789abcdefghijklmnopqrstuvwxyz".slice(0,t);return new RegExp("[^-+".concat(r,"]"),"i").test(e)?!1:e};var O=function e(e){return!isNaN(parseInt(e,10))};var w=function e(e){var t=tM.fromNumber(1e9),r=tM.fromNumber(0);if(!e.parts[0]&&!e.parts[1]&&!e.parts[2]&&!e.parts[3])return{quotient:e,rem:r};for(var n=0;n<=3;n++)r=r.shiftLeft(32),r=r.add(new tM(e.parts[n],0)),e.parts[n]=r.div(t).low,r=r.modulo(t);return{quotient:e,rem:r}};var _=function e(e,t){if(!e&&!t)return{high:tM.fromNumber(0),low:tM.fromNumber(0)};var r=e.shiftRightUnsigned(32),n=new tM(e.getLowBits(),0),o=t.shiftRightUnsigned(32),u=new tM(t.getLowBits(),0),i=r.multiply(o),s=r.multiply(u),a=n.multiply(o),c=n.multiply(u);return i=i.add(s.shiftRightUnsigned(32)),s=new tM(s.getLowBits(),0).add(a).add(c.shiftRightUnsigned(32)),i=i.add(s.shiftRightUnsigned(32)),c=s.shiftLeft(32).add(new tM(c.getLowBits(),0)),{high:i,low:c}};var D=function e(e,t){var r=e.high>>>0,n=t.high>>>0;if(r<n)return!0;if(r===n){var o=e.low>>>0,u=t.low>>>0;if(o<u)return!0}return!1};var T=function e(e,t){throw new e9('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))};var M=function e(e,t,r){var n=5;if(Array.isArray(e))for(var o=0;o<e.length;o++)n+=R(o.toString(),e[o],t,!0,r);else{typeof(e===null||e===void 0?void 0:e.toBSON)=="function"&&(e=e.toBSON());var u=true,i=false,s=undefined;try{for(var a=Object.keys(e)[Symbol.iterator](),c;!(u=(c=a.next()).done);u=true){var l=c.value;n+=R(l,e[l],t,!1,r)}}catch(e){i=true;s=e}finally{try{if(!u&&a.return!=null){a.return()}}finally{if(i){throw s}}}}return n};var R=function e(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;switch(typeof(t===null||t===void 0?void 0:t.toBSON)=="function"&&(t=t.toBSON()),typeof t==="undefined"?"undefined":j(t)){case"string":return 1+ta.utf8ByteLength(e)+1+4+ta.utf8ByteLength(t)+1;case"number":return Math.floor(t)===t&&t>=eN&&t<=eI&&t>=eM&&t<=eF?(e!=null?ta.utf8ByteLength(e)+1:0)+5:(e!=null?ta.utf8ByteLength(e)+1:0)+9;case"undefined":return u||!s?(e!=null?ta.utf8ByteLength(e)+1:0)+1:0;case"boolean":return(e!=null?ta.utf8ByteLength(e)+1:0)+2;case"object":if(t!=null&&typeof t._bsontype=="string"&&t[eT]!==eB)throw new e7;if(t==null||t._bsontype==="MinKey"||t._bsontype==="MaxKey")return(e!=null?ta.utf8ByteLength(e)+1:0)+1;if(t._bsontype==="ObjectId")return(e!=null?ta.utf8ByteLength(e)+1:0)+13;if(C(t,Date)||i(t))return(e!=null?ta.utf8ByteLength(e)+1:0)+9;if(ArrayBuffer.isView(t)||C(t,ArrayBuffer)||r(t))return(e!=null?ta.utf8ByteLength(e)+1:0)+6+t.byteLength;if(t._bsontype==="Long"||t._bsontype==="Double"||t._bsontype==="Timestamp")return(e!=null?ta.utf8ByteLength(e)+1:0)+9;if(t._bsontype==="Decimal128")return(e!=null?ta.utf8ByteLength(e)+1:0)+17;if(t._bsontype==="Code")return t.scope!=null&&Object.keys(t.scope).length>0?(e!=null?ta.utf8ByteLength(e)+1:0)+1+4+4+ta.utf8ByteLength(t.code.toString())+1+M(t.scope,n,s):(e!=null?ta.utf8ByteLength(e)+1:0)+1+4+ta.utf8ByteLength(t.code.toString())+1;if(t._bsontype==="Binary"){var a=t;return a.sub_type===tv.SUBTYPE_BYTE_ARRAY?(e!=null?ta.utf8ByteLength(e)+1:0)+(a.position+1+4+1+4):(e!=null?ta.utf8ByteLength(e)+1:0)+(a.position+1+4+1)}else{if(t._bsontype==="Symbol")return(e!=null?ta.utf8ByteLength(e)+1:0)+ta.utf8ByteLength(t.value)+4+1+1;if(t._bsontype==="DBRef"){var c=Object.assign({$ref:t.collection,$id:t.oid},t.fields);return t.db!=null&&(c.$db=t.db),(e!=null?ta.utf8ByteLength(e)+1:0)+1+M(c,n,s)}else return C(t,RegExp)||o(t)?(e!=null?ta.utf8ByteLength(e)+1:0)+1+ta.utf8ByteLength(t.source)+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1:t._bsontype==="BSONRegExp"?(e!=null?ta.utf8ByteLength(e)+1:0)+1+ta.utf8ByteLength(t.pattern)+1+ta.utf8ByteLength(t.options)+1:(e!=null?ta.utf8ByteLength(e)+1:0)+M(t,n,s)+1}case"function":return n?(e!=null?ta.utf8ByteLength(e)+1:0)+1+4+ta.utf8ByteLength(t.toString())+1:0;case"bigint":return(e!=null?ta.utf8ByteLength(e)+1:0)+9;case"symbol":return 0;default:throw new e9("Unrecognized JS type: ".concat(typeof t==="undefined"?"undefined":j(t)))}};var k=function e(e){return e.split("").sort().join("")};var I=function e(e,t,r){t=t!==null&&t!==void 0?t:{};var n=t&&t.index?t.index:0,o=th.getInt32LE(e,n);if(o<5)throw new e9("bson size must be >= 5, is ".concat(o));if(t.allowObjectSmallerThanBufferSize&&e.length<o)throw new e9("buffer length ".concat(e.length," must be >= bson size ").concat(o));if(!t.allowObjectSmallerThanBufferSize&&e.length!==o)throw new e9("buffer length ".concat(e.length," must === bson size ").concat(o));if(o+n>e.byteLength)throw new e9("(bson size ".concat(o," + options.index ").concat(n," must be <= buffer length ").concat(e.byteLength,")"));if(e[n+o-1]!==0)throw new e9("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");return t8(e,n,t,r)};var P=function e(e,t,r,n){e[n++]=ex;var o=ta.encodeUTF8Into(e,t,n);n=n+o+1,e[n-1]=0;var u=ta.encodeUTF8Into(e,r,n+4);return th.setInt32LE(e,n,u+1),n=n+4+u,e[n++]=0,n};var x=function e(e,t,r,n){var o=!Object.is(r,-0)&&Number.isSafeInteger(r)&&r<=eF&&r>=eM?eX:eP;e[n++]=o;var u=ta.encodeUTF8Into(e,t,n);return n=n+u,e[n++]=0,o===eX?n+=th.setInt32LE(e,n,r):n+=th.setFloat64LE(e,n,r),n};var L=function e(e,t,r,n){e[n++]=eZ;var o=ta.encodeUTF8Into(e,t,n);return n+=o,e[n++]=0,n+=th.setBigInt64LE(e,n,r),n};var z=function e(e,t,r,n){e[n++]=eH;var o=ta.encodeUTF8Into(e,t,n);return n=n+o,e[n++]=0,n};var W=function e(e,t,r,n){e[n++]=eV;var o=ta.encodeUTF8Into(e,t,n);return n=n+o,e[n++]=0,e[n++]=r?1:0,n};var G=function e(e,t,r,n){e[n++]=eG;var o=ta.encodeUTF8Into(e,t,n);n=n+o,e[n++]=0;var u=tM.fromNumber(r.getTime()),i=u.getLowBits(),s=u.getHighBits();return n+=th.setInt32LE(e,n,i),n+=th.setInt32LE(e,n,s),n};var H=function e(e,t,r,n){e[n++]=eq;var o=ta.encodeUTF8Into(e,t,n);if(n=n+o,e[n++]=0,r.source&&r.source.match(t5)!=null)throw new e9("value "+r.source+" must not contain null bytes");return n=n+ta.encodeUTF8Into(e,r.source,n),e[n++]=0,r.ignoreCase&&(e[n++]=105),r.global&&(e[n++]=115),r.multiline&&(e[n++]=109),e[n++]=0,n};var q=function e(e,t,r,n){e[n++]=eq;var o=ta.encodeUTF8Into(e,t,n);if(n=n+o,e[n++]=0,r.pattern.match(t5)!=null)throw new e9("pattern "+r.pattern+" must not contain null bytes");n=n+ta.encodeUTF8Into(e,r.pattern,n),e[n++]=0;var u=r.options.split("").sort().join("");return n=n+ta.encodeUTF8Into(e,u,n),e[n++]=0,n};var K=function e(e,t,r,n){r===null?e[n++]=eH:r._bsontype==="MinKey"?e[n++]=e0:e[n++]=e2;var o=ta.encodeUTF8Into(e,t,n);return n=n+o,e[n++]=0,n};var Y=function e(e,t,r,n){e[n++]=eW;var o=ta.encodeUTF8Into(e,t,n);return n=n+o,e[n++]=0,n+=r.serializeInto(e,n),n};var $=function e(e,t,r,n){e[n++]=ej;var o=ta.encodeUTF8Into(e,t,n);n=n+o,e[n++]=0;var u=r.length;if(n+=th.setInt32LE(e,n,u),e[n++]=e3,u<=16)for(var i=0;i<u;i++)e[n+i]=r[i];else e.set(r,n);return n=n+u,n};var J=function e(e,t,r,n,o,u,i,s,a){if(a.has(r))throw new e9("Cannot convert circular structure to BSON");a.add(r),e[n++]=Array.isArray(r)?eU:eL;var c=ta.encodeUTF8Into(e,t,n);n=n+c,e[n++]=0;var l=ea(e,r,o,n,u+1,i,s,a);return a.delete(r),l};var X=function e(e,t,r,n){e[n++]=e1;var o=ta.encodeUTF8Into(e,t,n);n=n+o,e[n++]=0;for(var u=0;u<16;u++)e[n+u]=r.bytes[u];return n+16};var Q=function e(e,t,r,n){e[n++]=r._bsontype==="Long"?eZ:eQ;var o=ta.encodeUTF8Into(e,t,n);n=n+o,e[n++]=0;var u=r.getLowBits(),i=r.getHighBits();return n+=th.setInt32LE(e,n,u),n+=th.setInt32LE(e,n,i),n};var ee=function e(e,t,r,n){r=r.valueOf(),e[n++]=eX;var o=ta.encodeUTF8Into(e,t,n);return n=n+o,e[n++]=0,n+=th.setInt32LE(e,n,r),n};var et=function e(e,t,r,n){e[n++]=eP;var o=ta.encodeUTF8Into(e,t,n);return n=n+o,e[n++]=0,n+=th.setFloat64LE(e,n,r.value),n};var er=function e(e,t,r,n){e[n++]=eY;var o=ta.encodeUTF8Into(e,t,n);n=n+o,e[n++]=0;var u=r.toString(),i=ta.encodeUTF8Into(e,u,n+4)+1;return th.setInt32LE(e,n,i),n=n+4+i-1,e[n++]=0,n};var en=function e(e,t,r,n){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:!1,s=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!0,a=arguments.length>8?arguments[8]:void 0;if(r.scope&&j(r.scope)=="object"){e[n++]=eJ;var c=ta.encodeUTF8Into(e,t,n);n=n+c,e[n++]=0;var l=n,d=r.code;n=n+4;var f=ta.encodeUTF8Into(e,d,n+4)+1;th.setInt32LE(e,n,f),e[n+4+f-1]=0,n=n+f+4;var h=ea(e,r.scope,o,n,u+1,i,s,a);n=h-1;var v=h-l;l+=th.setInt32LE(e,l,v),e[n++]=0}else{e[n++]=eY;var p=ta.encodeUTF8Into(e,t,n);n=n+p,e[n++]=0;var m=r.code.toString(),E=ta.encodeUTF8Into(e,m,n+4)+1;th.setInt32LE(e,n,E),n=n+4+E-1,e[n++]=0}return n};var eo=function e(e,t,r,n){e[n++]=ej;var o=ta.encodeUTF8Into(e,t,n);n=n+o,e[n++]=0;var u=r.buffer,i=r.position;if(r.sub_type===tv.SUBTYPE_BYTE_ARRAY&&(i=i+4),n+=th.setInt32LE(e,n,i),e[n++]=r.sub_type,r.sub_type===tv.SUBTYPE_BYTE_ARRAY&&(i=i-4,n+=th.setInt32LE(e,n,i)),r.sub_type===tv.SUBTYPE_VECTOR&&y(r),i<=16)for(var s=0;s<i;s++)e[n+s]=u[s];else e.set(u,n);return n=n+r.position,n};var eu=function e(e,t,r,n){e[n++]=e$;var o=ta.encodeUTF8Into(e,t,n);n=n+o,e[n++]=0;var u=ta.encodeUTF8Into(e,r.value,n+4)+1;return th.setInt32LE(e,n,u),n=n+4+u-1,e[n++]=0,n};var es=function e(e,t,r,n,o,u,i){e[n++]=eL;var s=ta.encodeUTF8Into(e,t,n);n=n+s,e[n++]=0;var a=n,c={$ref:r.collection||r.namespace,$id:r.oid};r.db!=null&&(c.$db=r.db),c=Object.assign(c,r.fields);var l=ea(e,c,!1,n,o+1,u,!0,i),d=l-a;return a+=th.setInt32LE(e,n,d),l};var ea=function e(e,n,s,a,c,l,d,f){if(f==null){if(n==null)return e[0]=5,e[1]=0,e[2]=0,e[3]=0,e[4]=0,5;if(Array.isArray(n))throw new e9("serialize does not support an array as the root input");if((typeof n==="undefined"?"undefined":j(n))!="object")throw new e9("serialize does not support non-object as the root input");if("_bsontype"in n&&typeof n._bsontype=="string")throw new e9("BSON types cannot be serialized as a document");if(i(n)||o(n)||t(n)||r(n))throw new e9("date, regexp, typedarray, and arraybuffer cannot be BSON documents");f=new Set}f.add(n);var h=a+4;if(Array.isArray(n))for(var v=0;v<n.length;v++){var p="".concat(v),m=n[v];typeof(m===null||m===void 0?void 0:m.toBSON)=="function"&&(m=m.toBSON());var E=typeof m==="undefined"?"undefined":j(m);if(m===void 0)h=z(e,p,m,h);else if(m===null)h=z(e,p,m,h);else if(E==="string")h=P(e,p,m,h);else if(E==="number")h=x(e,p,m,h);else if(E==="bigint")h=L(e,p,m,h);else if(E==="boolean")h=W(e,p,m,h);else if(E==="object"&&m._bsontype==null)C(m,Date)||i(m)?h=G(e,p,m,h):C(m,Uint8Array)||t(m)?h=$(e,p,m,h):C(m,RegExp)||o(m)?h=H(e,p,m,h):h=J(e,p,m,h,s,c,l,d,f);else if(E==="object"){if(m[eT]!==eB)throw new e7;if(m._bsontype==="ObjectId")h=Y(e,p,m,h);else if(m._bsontype==="Decimal128")h=X(e,p,m,h);else if(m._bsontype==="Long"||m._bsontype==="Timestamp")h=Q(e,p,m,h);else if(m._bsontype==="Double")h=et(e,p,m,h);else if(m._bsontype==="Code")h=en(e,p,m,h,s,c,l,d,f);else if(m._bsontype==="Binary")h=eo(e,p,m,h);else if(m._bsontype==="BSONSymbol")h=eu(e,p,m,h);else if(m._bsontype==="DBRef")h=es(e,p,m,h,c,l,f);else if(m._bsontype==="BSONRegExp")h=q(e,p,m,h);else if(m._bsontype==="Int32")h=ee(e,p,m,h);else if(m._bsontype==="MinKey"||m._bsontype==="MaxKey")h=K(e,p,m,h);else if(j(m._bsontype)<"u")throw new e9("Unrecognized or invalid _bsontype: ".concat(String(m._bsontype)))}else E==="function"&&l&&(h=er(e,p,m,h))}else if(C(n,Map)||u(n)){var y=n.entries(),g=!1;for(;!g;){var A=y.next();if(g=!!A.done,g)continue;var S=A.value?A.value[0]:void 0,b=A.value?A.value[1]:void 0;typeof(b===null||b===void 0?void 0:b.toBSON)=="function"&&(b=b.toBSON());var O=typeof b==="undefined"?"undefined":j(b);if(typeof S=="string"&&!re.has(S)){if(S.match(t5)!=null)throw new e9("key "+S+" must not contain null bytes");if(s){if(S[0]==="$")throw new e9("key "+S+" must not start with '$'");if(S.includes("."))throw new e9("key "+S+" must not contain '.'")}}if(b===void 0)d===!1&&(h=z(e,S,b,h));else if(b===null)h=z(e,S,b,h);else if(O==="string")h=P(e,S,b,h);else if(O==="number")h=x(e,S,b,h);else if(O==="bigint")h=L(e,S,b,h);else if(O==="boolean")h=W(e,S,b,h);else if(O==="object"&&b._bsontype==null)C(b,Date)||i(b)?h=G(e,S,b,h):C(b,Uint8Array)||t(b)?h=$(e,S,b,h):C(b,RegExp)||o(b)?h=H(e,S,b,h):h=J(e,S,b,h,s,c,l,d,f);else if(O==="object"){if(b[eT]!==eB)throw new e7;if(b._bsontype==="ObjectId")h=Y(e,S,b,h);else if(b._bsontype==="Decimal128")h=X(e,S,b,h);else if(b._bsontype==="Long"||b._bsontype==="Timestamp")h=Q(e,S,b,h);else if(b._bsontype==="Double")h=et(e,S,b,h);else if(b._bsontype==="Code")h=en(e,S,b,h,s,c,l,d,f);else if(b._bsontype==="Binary")h=eo(e,S,b,h);else if(b._bsontype==="BSONSymbol")h=eu(e,S,b,h);else if(b._bsontype==="DBRef")h=es(e,S,b,h,c,l,f);else if(b._bsontype==="BSONRegExp")h=q(e,S,b,h);else if(b._bsontype==="Int32")h=ee(e,S,b,h);else if(b._bsontype==="MinKey"||b._bsontype==="MaxKey")h=K(e,S,b,h);else if(j(b._bsontype)<"u")throw new e9("Unrecognized or invalid _bsontype: ".concat(String(b._bsontype)))}else O==="function"&&l&&(h=er(e,S,b,h))}}else{if(typeof(n===null||n===void 0?void 0:n.toBSON)=="function"&&(n=n.toBSON(),n!=null&&(typeof n==="undefined"?"undefined":j(n))!="object"))throw new e9("toBSON function did not return an object");var w=true,_=false,D=undefined;try{for(var B=Object.keys(n)[Symbol.iterator](),T;!(w=(T=B.next()).done);w=true){var F=T.value;var M=n[F];typeof(M===null||M===void 0?void 0:M.toBSON)=="function"&&(M=M.toBSON());var R=typeof M==="undefined"?"undefined":j(M);if(typeof F=="string"&&!re.has(F)){if(F.match(t5)!=null)throw new e9("key "+F+" must not contain null bytes");if(s){if(F[0]==="$")throw new e9("key "+F+" must not start with '$'");if(F.includes("."))throw new e9("key "+F+" must not contain '.'")}}if(M===void 0)d===!1&&(h=z(e,F,M,h));else if(M===null)h=z(e,F,M,h);else if(R==="string")h=P(e,F,M,h);else if(R==="number")h=x(e,F,M,h);else if(R==="bigint")h=L(e,F,M,h);else if(R==="boolean")h=W(e,F,M,h);else if(R==="object"&&M._bsontype==null)C(M,Date)||i(M)?h=G(e,F,M,h):C(M,Uint8Array)||t(M)?h=$(e,F,M,h):C(M,RegExp)||o(M)?h=H(e,F,M,h):h=J(e,F,M,h,s,c,l,d,f);else if(R==="object"){if(M[eT]!==eB)throw new e7;if(M._bsontype==="ObjectId")h=Y(e,F,M,h);else if(M._bsontype==="Decimal128")h=X(e,F,M,h);else if(M._bsontype==="Long"||M._bsontype==="Timestamp")h=Q(e,F,M,h);else if(M._bsontype==="Double")h=et(e,F,M,h);else if(M._bsontype==="Code")h=en(e,F,M,h,s,c,l,d,f);else if(M._bsontype==="Binary")h=eo(e,F,M,h);else if(M._bsontype==="BSONSymbol")h=eu(e,F,M,h);else if(M._bsontype==="DBRef")h=es(e,F,M,h,c,l,f);else if(M._bsontype==="BSONRegExp")h=q(e,F,M,h);else if(M._bsontype==="Int32")h=ee(e,F,M,h);else if(M._bsontype==="MinKey"||M._bsontype==="MaxKey")h=K(e,F,M,h);else if(j(M._bsontype)<"u")throw new e9("Unrecognized or invalid _bsontype: ".concat(String(M._bsontype)))}else R==="function"&&l&&(h=er(e,F,M,h))}}catch(e){_=true;D=e}finally{try{if(!w&&B.return!=null){B.return()}}finally{if(_){throw D}}}}f.delete(n),e[h++]=0;var k=h-a;return a+=th.setInt32LE(e,a,k),h};var ec=function e(e){return e!=null&&(typeof e==="undefined"?"undefined":j(e))=="object"&&"_bsontype"in e&&typeof e._bsontype=="string"};var el=function e(e,t){return e.map(function(e,r){t.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return rn(e,t)}finally{t.seenObjects.pop()}})};var ed=function e(e){var t=e.toISOString();return e.getUTCMilliseconds()!==0?t:t.slice(0,-5)+"Z"};var ef=function e(e,t){if(e==null||(typeof e==="undefined"?"undefined":j(e))!="object")throw new e9("not an object instance");var r=e._bsontype;if((typeof r==="undefined"?"undefined":j(r))>"u"){var n={};var o=true,u=false,i=undefined;try{for(var s=Object.keys(e)[Symbol.iterator](),a;!(o=(a=s.next()).done);o=true){var c=a.value;t.seenObjects.push({propertyName:c,obj:null});try{var l=rn(e[c],t);c==="__proto__"?Object.defineProperty(n,c,{value:l,writable:!0,enumerable:!0,configurable:!0}):n[c]=l}finally{t.seenObjects.pop()}}}catch(e){u=true;i=e}finally{try{if(!o&&s.return!=null){s.return()}}finally{if(u){throw i}}}return n}else{if(e!=null&&(typeof e==="undefined"?"undefined":j(e))=="object"&&typeof e._bsontype=="string"&&e[eT]!==eB)throw new e7;if(ec(e)){var d=e;if(typeof d.toExtendedJSON!="function"){var f=ro[e._bsontype];if(!f)throw new e9("Unrecognized or invalid _bsontype: "+e._bsontype);d=f(d)}return r==="Code"&&d.scope?d=new tg(d.code,rn(d.scope,t)):r==="DBRef"&&d.oid&&(d=new tA(rn(d.collection,t),rn(d.oid,t),rn(d.db,t),rn(d.fields,t))),d.toExtendedJSON(t)}else throw new e9("_bsontype must be a string, but was: "+(typeof r==="undefined"?"undefined":j(r)))}};var eh=function e(e,t){var r,n,o;var u={useBigInt64:(r=t===null||t===void 0?void 0:t.useBigInt64)!==null&&r!==void 0?r:!1,relaxed:(n=t===null||t===void 0?void 0:t.relaxed)!==null&&n!==void 0?n:!0,legacy:(o=t===null||t===void 0?void 0:t.legacy)!==null&&o!==void 0?o:!1};return JSON.parse(e,function(e,t){if(e.indexOf("\0")!==-1)throw new e9("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(e)));return rr(t,u)})};var ev=function e(e,t,r,n){r!=null&&(typeof r==="undefined"?"undefined":j(r))=="object"&&(n=r,r=0),t!=null&&(typeof t==="undefined"?"undefined":j(t))=="object"&&!Array.isArray(t)&&(n=t,t=void 0,r=0);var o=Object.assign({relaxed:!0,legacy:!1},n,{seenObjects:[{propertyName:"(root)",obj:null}]}),u=rn(e,o);return JSON.stringify(u,t,r)};var ep=function e(e,t){return t=t||{},JSON.parse(ev(e,t))};var em=function e(e,t){return t=t||{},eh(JSON.stringify(e),t)};var eE=function e(e,t){try{return th.getNonnegativeInt32LE(e,t)}catch(e){throw new e5("BSON size cannot be negative",t,{cause:e})}};var ey=function e(e,t){var r=t;for(;e[r]!==0;r++);if(r===e.length-1)throw new e5("Null terminator not found",t);return r};var eg=function e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(t!==null&&t!==void 0?t:t=0,e.length<5)throw new e5("Input must be at least 5 bytes, got ".concat(e.length," bytes"),t);var r=eE(e,t);if(r>e.length-t)throw new e5("Parsed documentSize (".concat(r," bytes) does not match input length (").concat(e.length," bytes)"),t);if(e[t+r-1]!==0)throw new e5("BSON documents must end in 0x00",t+r);var n=[],o=t+4;for(;o<=r+t;){var u=e[o];if(o+=1,u===0){if(o-t!==r)throw new e5("Invalid 0x00 type byte",o);break}var i=o,s=ey(e,o)-i;o+=s+1;var a=void 0;if(u===1||u===18||u===9||u===17)a=8;else if(u===16)a=4;else if(u===7)a=12;else if(u===19)a=16;else if(u===8)a=1;else if(u===10||u===6||u===127||u===255)a=0;else if(u===11)a=ey(e,ey(e,o)+1)+1-o;else if(u===3||u===4||u===15)a=eE(e,o);else if(u===2||u===5||u===12||u===13||u===14)a=eE(e,o)+4,u===5&&(a+=1),u===12&&(a+=12);else throw new e5("Invalid 0x".concat(u.toString(16).padStart(2,"0")," type byte"),o);if(a>r)throw new e5("value reports length larger than document",o);n.push([u,i,s,o,a]),o+=a}return n};var eA=function e(e){ra.length<e&&(ra=ta.allocate(e))};var eC=function e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var r=typeof t.checkKeys=="boolean"?t.checkKeys:!1,n=typeof t.serializeFunctions=="boolean"?t.serializeFunctions:!1,o=typeof t.ignoreUndefined=="boolean"?t.ignoreUndefined:!0,u=typeof t.minInternalBufferSize=="number"?t.minInternalBufferSize:rs;ra.length<u&&(ra=ta.allocate(u));var i=ea(ra,e,r,0,0,n,o,null),s=ta.allocateUnsafe(i);return s.set(ra.subarray(0,i),0),s};var eS=function e(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n=typeof r.checkKeys=="boolean"?r.checkKeys:!1,o=typeof r.serializeFunctions=="boolean"?r.serializeFunctions:!1,u=typeof r.ignoreUndefined=="boolean"?r.ignoreUndefined:!0,i=typeof r.index=="number"?r.index:0,s=ea(ra,e,n,0,0,o,u,null);return t.set(ra.subarray(0,s),i),i+s-1};var eb=function e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return I(ta.toLocalBufferType(e),t)};var eO=function e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};t=t||{};var r=typeof t.serializeFunctions=="boolean"?t.serializeFunctions:!1,n=typeof t.ignoreUndefined=="boolean"?t.ignoreUndefined:!0;return M(e,r,n)};var ew=function e(e,t,r,n,o,u){var i=Object.assign({allowObjectSmallerThanBufferSize:!0,index:0},u),s=ta.toLocalBufferType(e),a=t;for(var c=0;c<r;c++){var l=th.getInt32LE(s,a);i.index=a,n[o+c]=I(s,i),a=a+l}return a};var e_;ei();var eD=function(){var e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype),Symbol.toStringTag).get;return function(t){return e.call(t)}}();var eB=6,eT=Symbol.for("@@mdb.bson.version"),eF=0x7fffffff,eM=-0x80000000,eR=Math.pow(2,63)-1,ek=-Math.pow(2,63),eI=Math.pow(2,53),eN=-Math.pow(2,53),eP=1,ex=2,eL=3,eU=4,ej=5,ez=6,eW=7,eV=8,eG=9,eH=10,eq=11,eK=12,eY=13,e$=14,eJ=15,eX=16,eQ=17,eZ=18,e1=19,e0=255,e2=127,e3=0,e6=4,e4=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}),e9=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);return d(this,t,[e,r])}p(t,[{key:"bsonError",get:function e(){return!0}},{key:"name",get:function e(){return"BSONError"}}],[{key:"isBSONError",value:function e(e){return e!=null&&(typeof e==="undefined"?"undefined":j(e))=="object"&&"bsonError"in e&&e.bsonError===!0&&"name"in e&&"message"in e&&"stack"in e}}]);return t}(V(Error)),e7=/*#__PURE__*/function(e){A(t,e);function t(){f(this,t);return d(this,t,["Unsupported BSON version, bson types must be from bson ".concat(eB,".x.x")])}p(t,[{key:"name",get:function e(){return"BSONVersionError"}}]);return t}(e9),e8=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);return d(this,t,[e])}p(t,[{key:"name",get:function e(){return"BSONRuntimeError"}}]);return t}(e9),e5=/*#__PURE__*/function(e){A(t,e);function t(e,r,n){f(this,t);var o;o=d(this,t,["".concat(e,". offset: ").concat(r),n]),o.offset=r;return o}p(t,[{key:"name",get:function e(){return"BSONOffsetError"}}]);return t}(e9),te,tt;var tr=function(){try{return Z("crypto").randomBytes}catch(e){return v}}(),tn={toLocalBufferType:function e(e){if(Buffer.isBuffer(e))return e;if(ArrayBuffer.isView(e))return Buffer.from(e.buffer,e.byteOffset,e.byteLength);var t;var r=(t=e===null||e===void 0?void 0:e[Symbol.toStringTag])!==null&&t!==void 0?t:Object.prototype.toString.call(e);if(r==="ArrayBuffer"||r==="SharedArrayBuffer"||r==="[object ArrayBuffer]"||r==="[object SharedArrayBuffer]")return Buffer.from(e);throw new e9("Cannot create Buffer from the passed potentialBuffer.")},allocate:function e(e){return Buffer.alloc(e)},allocateUnsafe:function e(e){return Buffer.allocUnsafe(e)},equals:function e(e,t){return tn.toLocalBufferType(e).equals(t)},fromNumberArray:function e(e){return Buffer.from(e)},fromBase64:function e(e){return Buffer.from(e,"base64")},toBase64:function e(e){return tn.toLocalBufferType(e).toString("base64")},fromISO88591:function e(e){return Buffer.from(e,"binary")},toISO88591:function e(e){return tn.toLocalBufferType(e).toString("binary")},fromHex:function e(e){return Buffer.from(e,"hex")},toHex:function e(e){return tn.toLocalBufferType(e).toString("hex")},toUTF8:function e(e,t,r,n){var o=r-t<=20?l(e,t,r):null;if(o!=null)return o;var u=tn.toLocalBufferType(e).toString("utf8",t,r);if(n){for(var i=0;i<u.length;i++)if(u.charCodeAt(i)===65533){c(e,t,r,!0);break}}return u},utf8ByteLength:function e(e){return Buffer.byteLength(e,"utf8")},encodeUTF8Into:function e(e,t,r){var n=h(e,t,r);return n!==null&&n!==void 0?n:tn.toLocalBufferType(e).write(t,r,void 0,"utf8")},randomBytes:tr,swap32:function e(e){return tn.toLocalBufferType(e).swap32()}};var to=function(){var e=globalThis.crypto;if(e!=null&&typeof e.getRandomValues=="function")return function(t){return e.getRandomValues(ti.allocate(t))};if(m()){var t;var r=globalThis.console;r===null||r===void 0?void 0:(t=r.warn)===null||t===void 0?void 0:t.call(r,"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.")}return E}(),tu=/(\d|[a-f])/i,ti={toLocalBufferType:function e(e){var t;var r=(t=e===null||e===void 0?void 0:e[Symbol.toStringTag])!==null&&t!==void 0?t:Object.prototype.toString.call(e);if(r==="Uint8Array")return e;if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength));if(r==="ArrayBuffer"||r==="SharedArrayBuffer"||r==="[object ArrayBuffer]"||r==="[object SharedArrayBuffer]")return new Uint8Array(e);throw new e9("Cannot make a Uint8Array from passed potentialBuffer.")},allocate:function e(e){if(typeof e!="number")throw new TypeError('The "size" argument must be of type number. Received '.concat(String(e)));return new Uint8Array(e)},allocateUnsafe:function e(e){return ti.allocate(e)},equals:function e(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0},fromNumberArray:function e(e){return Uint8Array.from(e)},fromBase64:function e(e){return Uint8Array.from(atob(e),function(e){return e.charCodeAt(0)})},toBase64:function e(e){return btoa(ti.toISO88591(e))},fromISO88591:function e(e){return Uint8Array.from(e,function(e){return e.charCodeAt(0)&255})},toISO88591:function e(e){return Array.from(Uint16Array.from(e),function(e){return String.fromCharCode(e)}).join("")},fromHex:function e(e){var t=e.length%2===0?e:e.slice(0,e.length-1),r=[];for(var n=0;n<t.length;n+=2){var o=t[n],u=t[n+1];if(!tu.test(o)||!tu.test(u))break;var i=Number.parseInt("".concat(o).concat(u),16);r.push(i)}return Uint8Array.from(r)},toHex:function e(e){return Array.from(e,function(e){return e.toString(16).padStart(2,"0")}).join("")},toUTF8:function e(e,t,r,n){var o=r-t<=20?l(e,t,r):null;return o!==null&&o!==void 0?o:c(e,t,r,n)},utf8ByteLength:function e(e){return new TextEncoder().encode(e).byteLength},encodeUTF8Into:function e(e,t,r){var n=new TextEncoder().encode(t);return e.set(n,r),n.byteLength},randomBytes:to,swap32:function e(e){if(e.length%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e.length;t+=4){var r=e[t],n=e[t+1],o=e[t+2],u=e[t+3];e[t]=u,e[t+1]=o,e[t+2]=n,e[t+3]=r}return e}},ts=typeof Buffer=="function"&&((e_=Buffer.prototype)===null||e_===void 0?void 0:e_._isBuffer)!==!0,ta=ts?tn:ti,tc=/*#__PURE__*/function(){function e(){f(this,e)}p(e,[{key:eT,get:function e(){return eB}},{key:Symbol.for("nodejs.util.inspect.custom"),value:function e(e,t,r){return this.inspect(e,t,r)}}]);return e}(),tl=new Float64Array(1),td=new Uint8Array(tl.buffer,0,8);tl[0]=-1;var tf=td[7]===0,th={isBigEndian:tf,getNonnegativeInt32LE:function e(e,t){if(e[t+3]>127)throw new RangeError("Size cannot be negative at offset: ".concat(t));return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24},getInt32LE:function e(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24},getUint32LE:function e(e,t){return e[t]+e[t+1]*256+e[t+2]*65536+e[t+3]*0x1000000},getUint32BE:function e(e,t){return e[t+3]+e[t+2]*256+e[t+1]*65536+e[t]*0x1000000},getBigInt64LE:function e(e,t){var r=BigInt(e[t+4]+e[t+5]*256+e[t+6]*65536+(e[t+7]<<24)),n=BigInt(e[t]+e[t+1]*256+e[t+2]*65536+e[t+3]*0x1000000);return(r<<BigInt(32))+n},getFloat64LE:tf?function(e,t){return td[7]=e[t],td[6]=e[t+1],td[5]=e[t+2],td[4]=e[t+3],td[3]=e[t+4],td[2]=e[t+5],td[1]=e[t+6],td[0]=e[t+7],tl[0]}:function(e,t){return td[0]=e[t],td[1]=e[t+1],td[2]=e[t+2],td[3]=e[t+3],td[4]=e[t+4],td[5]=e[t+5],td[6]=e[t+6],td[7]=e[t+7],tl[0]},setInt32BE:function e(e,t,r){return e[t+3]=r,r>>>=8,e[t+2]=r,r>>>=8,e[t+1]=r,r>>>=8,e[t]=r,4},setInt32LE:function e(e,t,r){return e[t]=r,r>>>=8,e[t+1]=r,r>>>=8,e[t+2]=r,r>>>=8,e[t+3]=r,4},setBigInt64LE:function e(e,t,r){var n=BigInt(0xffffffff),o=Number(r&n);e[t]=o,o>>=8,e[t+1]=o,o>>=8,e[t+2]=o,o>>=8,e[t+3]=o;var u=Number(r>>BigInt(32)&n);return e[t+4]=u,u>>=8,e[t+5]=u,u>>=8,e[t+6]=u,u>>=8,e[t+7]=u,8},setFloat64LE:tf?function(e,t,r){return tl[0]=r,e[t]=td[7],e[t+1]=td[6],e[t+2]=td[5],e[t+3]=td[4],e[t+4]=td[3],e[t+5]=td[2],e[t+6]=td[1],e[t+7]=td[0],8}:function(e,t,r){return tl[0]=r,e[t]=td[0],e[t+1]=td[1],e[t+2]=td[2],e[t+3]=td[3],e[t+4]=td[4],e[t+5]=td[5],e[t+6]=td[6],e[t+7]=td[7],8}},tv=/*#__PURE__*/function(e){A(t,e);function t(e,n){f(this,t);var o;if(o=d(this,t),e!=null&&typeof e=="string"&&!ArrayBuffer.isView(e)&&!r(e)&&!Array.isArray(e))throw new e9("Binary can only be constructed from Uint8Array or number[]");o.sub_type=n!==null&&n!==void 0?n:t.BSON_BINARY_SUBTYPE_DEFAULT,e==null?(o.buffer=ta.allocate(t.BUFFER_SIZE),o.position=0):(o.buffer=Array.isArray(e)?ta.fromNumberArray(e):ta.toLocalBufferType(e),o.position=o.buffer.byteLength);return o}p(t,[{key:"_bsontype",get:function e(){return"Binary"}},{key:"put",value:function e(e){if(typeof e=="string"&&e.length!==1)throw new e9("only accepts single character String");if(typeof e!="number"&&e.length!==1)throw new e9("only accepts single character Uint8Array or Array");var r;if(typeof e=="string"?r=e.charCodeAt(0):typeof e=="number"?r=e:r=e[0],r<0||r>255)throw new e9("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.byteLength>this.position)this.buffer[this.position++]=r;else{var n=ta.allocate(t.BUFFER_SIZE+this.buffer.length);n.set(this.buffer,0),this.buffer=n,this.buffer[this.position++]=r}}},{key:"write",value:function e(e,t){if(t=typeof t=="number"?t:this.position,this.buffer.byteLength<t+e.length){var r=ta.allocate(this.buffer.byteLength+e.length);r.set(this.buffer,0),this.buffer=r}if(ArrayBuffer.isView(e))this.buffer.set(ta.toLocalBufferType(e),t),this.position=t+e.byteLength>this.position?t+e.length:this.position;else if(typeof e=="string")throw new e9("input cannot be string")}},{key:"read",value:function e(e,t){t=t&&t>0?t:this.position;var r=e+t;return this.buffer.subarray(e,r>this.position?this.position:r)}},{key:"value",value:function e(){return this.buffer.length===this.position?this.buffer:this.buffer.subarray(0,this.position)}},{key:"length",value:function e(){return this.position}},{key:"toJSON",value:function e(){return ta.toBase64(this.buffer.subarray(0,this.position))}},{key:"toString",value:function e(e){return e==="hex"?ta.toHex(this.buffer.subarray(0,this.position)):e==="base64"?ta.toBase64(this.buffer.subarray(0,this.position)):e==="utf8"||e==="utf-8"?ta.toUTF8(this.buffer,0,this.position,!1):ta.toUTF8(this.buffer,0,this.position,!1)}},{key:"toExtendedJSON",value:function e(e){e=e||{},this.sub_type===t.SUBTYPE_VECTOR&&y(this);var r=ta.toBase64(this.buffer),n=Number(this.sub_type).toString(16);return e.legacy?{$binary:r,$type:n.length===1?"0"+n:n}:{$binary:{base64:r,subType:n.length===1?"0"+n:n}}}},{key:"toUUID",value:function e(){if(this.sub_type===t.SUBTYPE_UUID)return new ty(this.buffer.subarray(0,this.position));throw new e9('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(t.SUBTYPE_UUID,'" is currently supported.'))}},{key:"inspect",value:function e(e,t,r){r!==null&&r!==void 0?r:r=s;var n=ta.toBase64(this.buffer.subarray(0,this.position)),o=r(n,t),u=r(this.sub_type,t);return"Binary.createFromBase64(".concat(o,", ").concat(u,")")}},{key:"toInt8Array",value:function e(){if(this.sub_type!==t.SUBTYPE_VECTOR)throw new e9("Binary sub_type is not Vector");if(this.buffer[0]!==t.VECTOR_TYPE.Int8)throw new e9("Binary datatype field is not Int8");return new Int8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position))}},{key:"toFloat32Array",value:function e(){if(this.sub_type!==t.SUBTYPE_VECTOR)throw new e9("Binary sub_type is not Vector");if(this.buffer[0]!==t.VECTOR_TYPE.Float32)throw new e9("Binary datatype field is not Float32");var e=new Uint8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position));return th.isBigEndian&&ta.swap32(e),new Float32Array(e.buffer)}},{key:"toPackedBits",value:function e(){if(this.sub_type!==t.SUBTYPE_VECTOR)throw new e9("Binary sub_type is not Vector");if(this.buffer[0]!==t.VECTOR_TYPE.PackedBit)throw new e9("Binary datatype field is not packed bit");return new Uint8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position))}},{key:"toBits",value:function e(){if(this.sub_type!==t.SUBTYPE_VECTOR)throw new e9("Binary sub_type is not Vector");if(this.buffer[0]!==t.VECTOR_TYPE.PackedBit)throw new e9("Binary datatype field is not packed bit");var e=(this.length()-2)*8-this.buffer[1],r=new Int8Array(e);for(var n=0;n<r.length;n++){var o=n/8|0,u=this.buffer[o+2],i=7-n%8,s=u>>i&1;r[n]=s}return r}}],[{key:"createFromHexString",value:function e(e,r){return new t(ta.fromHex(e),r)}},{key:"createFromBase64",value:function e(e,r){return new t(ta.fromBase64(e),r)}},{key:"fromExtendedJSON",value:function e(e,r){r=r||{};var n,o;if("$binary"in e?r.legacy&&typeof e.$binary=="string"&&"$type"in e?(o=e.$type?parseInt(e.$type,16):0,n=ta.fromBase64(e.$binary)):typeof e.$binary!="string"&&(o=e.$binary.subType?parseInt(e.$binary.subType,16):0,n=ta.fromBase64(e.$binary.base64)):"$uuid"in e&&(o=4,n=ty.bytesFromString(e.$uuid)),!n)throw new e9("Unexpected Binary Extended JSON format ".concat(JSON.stringify(e)));return o===e6?new ty(n):new t(n,o)}},{key:"fromInt8Array",value:function e(e){var r=ta.allocate(e.byteLength+2);r[0]=t.VECTOR_TYPE.Int8,r[1]=0;var n=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);return r.set(n,2),new this(r,this.SUBTYPE_VECTOR)}},{key:"fromFloat32Array",value:function e(e){var r=ta.allocate(e.byteLength+2);r[0]=t.VECTOR_TYPE.Float32,r[1]=0;var n=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);return r.set(n,2),th.isBigEndian&&ta.swap32(new Uint8Array(r.buffer,2)),new this(r,this.SUBTYPE_VECTOR)}},{key:"fromPackedBits",value:function e(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;var n=ta.allocate(e.byteLength+2);return n[0]=t.VECTOR_TYPE.PackedBit,n[1]=r,n.set(e,2),new this(n,this.SUBTYPE_VECTOR)}},{key:"fromBits",value:function e(e){var r=e.length+7>>>3,n=new Uint8Array(r+2);n[0]=t.VECTOR_TYPE.PackedBit;var o=e.length%8;n[1]=o===0?0:8-o;for(var u=0;u<e.length;u++){var i=u>>>3,s=e[u];if(s!==0&&s!==1)throw new e9("Invalid bit value at ".concat(u,": must be 0 or 1, found ").concat(e[u]));if(s===0)continue;var a=7-u%8;n[i+2]|=s<<a}return new this(n,t.SUBTYPE_VECTOR)}}]);return t}(tc);tv.BSON_BINARY_SUBTYPE_DEFAULT=0;tv.BUFFER_SIZE=256;tv.SUBTYPE_DEFAULT=0;tv.SUBTYPE_FUNCTION=1;tv.SUBTYPE_BYTE_ARRAY=2;tv.SUBTYPE_UUID_OLD=3;tv.SUBTYPE_UUID=4;tv.SUBTYPE_MD5=5;tv.SUBTYPE_ENCRYPTED=6;tv.SUBTYPE_COLUMN=7;tv.SUBTYPE_SENSITIVE=8;tv.SUBTYPE_VECTOR=9;tv.SUBTYPE_USER_DEFINED=128;tv.VECTOR_TYPE=Object.freeze({Int8:3,Float32:39,PackedBit:16});var tp=16,tm=/^[0-9A-F]{32}$/i,tE=/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,ty=/*#__PURE__*/function(e){A(r,e);function r(e){f(this,r);var t;if(e==null)t=r.generate();else if(C(e,r))t=ta.toLocalBufferType(new Uint8Array(e.buffer));else if(ArrayBuffer.isView(e)&&e.byteLength===tp)t=ta.toLocalBufferType(e);else if(typeof e=="string")t=r.bytesFromString(e);else throw new e9("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).");return d(this,r,[t,e6])}p(r,[{key:"id",get:function e(){return this.buffer},set:function e(e){this.buffer=e}},{key:"toHexString",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return e?[ta.toHex(this.buffer.subarray(0,4)),ta.toHex(this.buffer.subarray(4,6)),ta.toHex(this.buffer.subarray(6,8)),ta.toHex(this.buffer.subarray(8,10)),ta.toHex(this.buffer.subarray(10,16))].join("-"):ta.toHex(this.buffer)}},{key:"toString",value:function e(e){return e==="hex"?ta.toHex(this.id):e==="base64"?ta.toBase64(this.id):this.toHexString()}},{key:"toJSON",value:function e(){return this.toHexString()}},{key:"equals",value:function e(e){if(!e)return!1;if(C(e,r))return ta.equals(e.id,this.id);try{return ta.equals(new r(e).id,this.id)}catch(e){return!1}}},{key:"toBinary",value:function e(){return new tv(this.id,tv.SUBTYPE_UUID)}},{key:"inspect",value:function e(e,t,r){return r!==null&&r!==void 0?r:r=s,"new UUID(".concat(r(this.toHexString(),t),")")}}],[{key:"generate",value:function e(){var e=ta.randomBytes(tp);return e[6]=e[6]&15|64,e[8]=e[8]&63|128,e}},{key:"isValid",value:function e(e){return e?typeof e=="string"?r.isValidUUIDString(e):t(e)?e.byteLength===tp:e._bsontype==="Binary"&&e.sub_type===this.SUBTYPE_UUID&&e.buffer.byteLength===16:!1}},{key:"createFromHexString",value:function e(e){var t=r.bytesFromString(e);return new r(t)}},{key:"createFromBase64",value:function e(e){return new r(ta.fromBase64(e))}},{key:"bytesFromString",value:function e(e){if(!r.isValidUUIDString(e))throw new e9("UUID string representation must be 32 hex digits or canonical hyphenated representation");return ta.fromHex(e.replace(/-/g,""))}},{key:"isValidUUIDString",value:function e(e){return tm.test(e)||tE.test(e)}}]);return r}(tv),tg=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);var n;n=d(this,t),n.code=e.toString(),n.scope=r!==null&&r!==void 0?r:null;return n}p(t,[{key:"_bsontype",get:function e(){return"Code"}},{key:"toJSON",value:function e(){return this.scope!=null?{code:this.code,scope:this.scope}:{code:this.code}}},{key:"toExtendedJSON",value:function e(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}}},{key:"inspect",value:function e(e,t,r){r!==null&&r!==void 0?r:r=s;var n=r(this.code,t),o=n.includes("\n");this.scope!=null&&(n+=",".concat(o?"\n":" ").concat(r(this.scope,t)));var u=o&&this.scope===null;return"new Code(".concat(o?"\n":"").concat(n).concat(u?"\n":"",")")}}],[{key:"fromExtendedJSON",value:function e(e){return new t(e.$code,e.$scope)}}]);return t}(tc);var tA=/*#__PURE__*/function(e){A(t,e);function t(e,r,n,o){f(this,t);var u;u=d(this,t);var i=e.split(".");i.length===2&&(n=i.shift(),e=i.shift()),u.collection=e,u.oid=r,u.db=n,u.fields=o||{};return u}p(t,[{key:"_bsontype",get:function e(){return"DBRef"}},{key:"namespace",get:function e(){return this.collection},set:function e(e){this.collection=e}},{key:"toJSON",value:function e(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(e.$db=this.db),e}},{key:"toExtendedJSON",value:function e(e){e=e||{};var t={$ref:this.collection,$id:this.oid};return e.legacy||(this.db&&(t.$db=this.db),t=Object.assign(t,this.fields)),t}},{key:"inspect",value:function e(e,t,r){r!==null&&r!==void 0?r:r=s;var n=[r(this.namespace,t),r(this.oid,t)].concat(U(this.db?[r(this.db,t)]:[]),U(Object.keys(this.fields).length>0?[r(this.fields,t)]:[]));return n[1]=r===s?"new ObjectId(".concat(n[1],")"):n[1],"new DBRef(".concat(n.join(", "),")")}}],[{key:"fromExtendedJSON",value:function e(e){var r=Object.assign({},e);return delete r.$ref,delete r.$id,delete r.$db,new t(e.$ref,e.$id,e.$db,r)}}]);return t}(tc);var tC;try{tC=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(e){}var tS=65536,tb=1<<24,tO=tS*tS,tw=tO*tO,t_=tw/2,tD={},tB={},tT=20,tF=/^(\+?0|(\+|-)?[1-9][0-9]*)$/,tM=/*#__PURE__*/function(e){A(t,e);function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;f(this,t);var o;o=d(this,t);var u=typeof r=="boolean"?r:!!n,i=typeof r=="number"?r:0,s=typeof e=="string"?t.fromString(e,u):(typeof e==="undefined"?"undefined":j(e))=="bigint"?t.fromBigInt(e,u):{low:e|0,high:i|0,unsigned:u};o.low=s.low,o.high=s.high,o.unsigned=s.unsigned;return o}p(t,[{key:"_bsontype",get:function e(){return"Long"}},{key:"__isLong__",get:function e(){return!0}},{key:"add",value:function e(e){t.isLong(e)||(e=t.fromValue(e));var r=this.high>>>16,n=this.high&65535,o=this.low>>>16,u=this.low&65535,i=e.high>>>16,s=e.high&65535,a=e.low>>>16,c=e.low&65535,l=0,d=0,f=0,h=0;return h+=u+c,f+=h>>>16,h&=65535,f+=o+a,d+=f>>>16,f&=65535,d+=n+s,l+=d>>>16,d&=65535,l+=r+i,l&=65535,t.fromBits(f<<16|h,l<<16|d,this.unsigned)}},{key:"and",value:function e(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low&e.low,this.high&e.high,this.unsigned)}},{key:"compare",value:function e(e){if(t.isLong(e)||(e=t.fromValue(e)),this.eq(e))return 0;var r=this.isNegative(),n=e.isNegative();return r&&!n?-1:!r&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1}},{key:"comp",value:function e(e){return this.compare(e)}},{key:"divide",value:function e(e){if(t.isLong(e)||(e=t.fromValue(e)),e.isZero())throw new e9("division by zero");if(tC){if(!this.unsigned&&this.high===-0x80000000&&e.low===-1&&e.high===-1)return this;var r=(this.unsigned?tC.div_u:tC.div_s)(this.low,this.high,e.low,e.high);return t.fromBits(r,tC.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?t.UZERO:t.ZERO;var n,o,u;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return t.UZERO;if(e.gt(this.shru(1)))return t.UONE;u=t.UZERO}else{if(this.eq(t.MIN_VALUE))return e.eq(t.ONE)||e.eq(t.NEG_ONE)?t.MIN_VALUE:e.eq(t.MIN_VALUE)?t.ONE:(n=this.shr(1).div(e).shl(1),n.eq(t.ZERO)?e.isNegative()?t.ONE:t.NEG_ONE:(o=this.sub(e.mul(n)),u=n.add(o.div(e)),u));if(e.eq(t.MIN_VALUE))return this.unsigned?t.UZERO:t.ZERO;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();u=t.ZERO}for(o=this;o.gte(e);){n=Math.max(1,Math.floor(o.toNumber()/e.toNumber()));var i=Math.ceil(Math.log(n)/Math.LN2),s=i<=48?1:Math.pow(2,i-48),a=t.fromNumber(n),c=a.mul(e);for(;c.isNegative()||c.gt(o);)n-=s,a=t.fromNumber(n,this.unsigned),c=a.mul(e);a.isZero()&&(a=t.ONE),u=u.add(a),o=o.sub(c)}return u}},{key:"div",value:function e(e){return this.divide(e)}},{key:"equals",value:function e(e){return t.isLong(e)||(e=t.fromValue(e)),this.unsigned!==e.unsigned&&this.high>>>31===1&&e.high>>>31===1?!1:this.high===e.high&&this.low===e.low}},{key:"eq",value:function e(e){return this.equals(e)}},{key:"getHighBits",value:function e(){return this.high}},{key:"getHighBitsUnsigned",value:function e(){return this.high>>>0}},{key:"getLowBits",value:function e(){return this.low}},{key:"getLowBitsUnsigned",value:function e(){return this.low>>>0}},{key:"getNumBitsAbs",value:function e(){if(this.isNegative())return this.eq(t.MIN_VALUE)?64:this.neg().getNumBitsAbs();var e=this.high!==0?this.high:this.low,r;for(r=31;r>0&&(e&1<<r)===0;r--);return this.high!==0?r+33:r+1}},{key:"greaterThan",value:function e(e){return this.comp(e)>0}},{key:"gt",value:function e(e){return this.greaterThan(e)}},{key:"greaterThanOrEqual",value:function e(e){return this.comp(e)>=0}},{key:"gte",value:function e(e){return this.greaterThanOrEqual(e)}},{key:"ge",value:function e(e){return this.greaterThanOrEqual(e)}},{key:"isEven",value:function e(){return(this.low&1)===0}},{key:"isNegative",value:function e(){return!this.unsigned&&this.high<0}},{key:"isOdd",value:function e(){return(this.low&1)===1}},{key:"isPositive",value:function e(){return this.unsigned||this.high>=0}},{key:"isZero",value:function e(){return this.high===0&&this.low===0}},{key:"lessThan",value:function e(e){return this.comp(e)<0}},{key:"lt",value:function e(e){return this.lessThan(e)}},{key:"lessThanOrEqual",value:function e(e){return this.comp(e)<=0}},{key:"lte",value:function e(e){return this.lessThanOrEqual(e)}},{key:"modulo",value:function e(e){if(t.isLong(e)||(e=t.fromValue(e)),tC){var r=(this.unsigned?tC.rem_u:tC.rem_s)(this.low,this.high,e.low,e.high);return t.fromBits(r,tC.get_high(),this.unsigned)}return this.sub(this.div(e).mul(e))}},{key:"mod",value:function e(e){return this.modulo(e)}},{key:"rem",value:function e(e){return this.modulo(e)}},{key:"multiply",value:function e(e){if(this.isZero())return t.ZERO;if(t.isLong(e)||(e=t.fromValue(e)),tC){var r=tC.mul(this.low,this.high,e.low,e.high);return t.fromBits(r,tC.get_high(),this.unsigned)}if(e.isZero())return t.ZERO;if(this.eq(t.MIN_VALUE))return e.isOdd()?t.MIN_VALUE:t.ZERO;if(e.eq(t.MIN_VALUE))return this.isOdd()?t.MIN_VALUE:t.ZERO;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(t.TWO_PWR_24)&&e.lt(t.TWO_PWR_24))return t.fromNumber(this.toNumber()*e.toNumber(),this.unsigned);var n=this.high>>>16,o=this.high&65535,u=this.low>>>16,i=this.low&65535,s=e.high>>>16,a=e.high&65535,c=e.low>>>16,l=e.low&65535,d=0,f=0,h=0,v=0;return v+=i*l,h+=v>>>16,v&=65535,h+=u*l,f+=h>>>16,h&=65535,h+=i*c,f+=h>>>16,h&=65535,f+=o*l,d+=f>>>16,f&=65535,f+=u*c,d+=f>>>16,f&=65535,f+=i*a,d+=f>>>16,f&=65535,d+=n*l+o*c+u*a+i*s,d&=65535,t.fromBits(h<<16|v,d<<16|f,this.unsigned)}},{key:"mul",value:function e(e){return this.multiply(e)}},{key:"negate",value:function e(){return!this.unsigned&&this.eq(t.MIN_VALUE)?t.MIN_VALUE:this.not().add(t.ONE)}},{key:"neg",value:function e(){return this.negate()}},{key:"not",value:function e(){return t.fromBits(~this.low,~this.high,this.unsigned)}},{key:"notEquals",value:function e(e){return!this.equals(e)}},{key:"neq",value:function e(e){return this.notEquals(e)}},{key:"ne",value:function e(e){return this.notEquals(e)}},{key:"or",value:function e(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low|e.low,this.high|e.high,this.unsigned)}},{key:"shiftLeft",value:function e(e){return t.isLong(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?t.fromBits(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):t.fromBits(0,this.low<<e-32,this.unsigned)}},{key:"shl",value:function e(e){return this.shiftLeft(e)}},{key:"shiftRight",value:function e(e){return t.isLong(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?t.fromBits(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):t.fromBits(this.high>>e-32,this.high>=0?0:-1,this.unsigned)}},{key:"shr",value:function e(e){return this.shiftRight(e)}},{key:"shiftRightUnsigned",value:function e(e){if(t.isLong(e)&&(e=e.toInt()),e&=63,e===0)return this;{var r=this.high;if(e<32){var n=this.low;return t.fromBits(n>>>e|r<<32-e,r>>>e,this.unsigned)}else return e===32?t.fromBits(r,0,this.unsigned):t.fromBits(r>>>e-32,0,this.unsigned)}}},{key:"shr_u",value:function e(e){return this.shiftRightUnsigned(e)}},{key:"shru",value:function e(e){return this.shiftRightUnsigned(e)}},{key:"subtract",value:function e(e){return t.isLong(e)||(e=t.fromValue(e)),this.add(e.neg())}},{key:"sub",value:function e(e){return this.subtract(e)}},{key:"toInt",value:function e(){return this.unsigned?this.low>>>0:this.low}},{key:"toNumber",value:function e(){return this.unsigned?(this.high>>>0)*tO+(this.low>>>0):this.high*tO+(this.low>>>0)}},{key:"toBigInt",value:function e(){return BigInt(this.toString())}},{key:"toBytes",value:function e(e){return e?this.toBytesLE():this.toBytesBE()}},{key:"toBytesLE",value:function e(){var e=this.high,t=this.low;return[t&255,t>>>8&255,t>>>16&255,t>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]}},{key:"toBytesBE",value:function e(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,t>>>24,t>>>16&255,t>>>8&255,t&255]}},{key:"toSigned",value:function e(){return this.unsigned?t.fromBits(this.low,this.high,!1):this}},{key:"toString",value:function e(e){if(e=e||10,e<2||36<e)throw new e9("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(t.MIN_VALUE)){var r=t.fromNumber(e),n=this.div(r),o=n.mul(r).sub(this);return n.toString(e)+o.toInt().toString(e)}else return"-"+this.neg().toString(e);var u=t.fromNumber(Math.pow(e,6),this.unsigned),i=this,s="";for(;;){var a=i.div(u),c=(i.sub(a.mul(u)).toInt()>>>0).toString(e);if(i=a,i.isZero())return c+s;for(;c.length<6;)c="0"+c;s=""+c+s}}},{key:"toUnsigned",value:function e(){return this.unsigned?this:t.fromBits(this.low,this.high,!0)}},{key:"xor",value:function e(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low^e.low,this.high^e.high,this.unsigned)}},{key:"eqz",value:function e(){return this.isZero()}},{key:"le",value:function e(e){return this.lessThanOrEqual(e)}},{key:"toExtendedJSON",value:function e(e){return e&&e.relaxed?this.toNumber():{$numberLong:this.toString()}}},{key:"inspect",value:function e(e,t,r){r!==null&&r!==void 0?r:r=s;var n=r(this.toString(),t),o=this.unsigned?", ".concat(r(this.unsigned,t)):"";return"new Long(".concat(n).concat(o,")")}}],[{key:"fromBits",value:function e(e,r,n){return new t(e,r,n)}},{key:"fromInt",value:function e(e,r){var n,o,u;return r?(e>>>=0,(u=0<=e&&e<256)&&(o=tB[e],o)?o:(n=t.fromBits(e,(e|0)<0?-1:0,!0),u&&(tB[e]=n),n)):(e|=0,(u=-128<=e&&e<128)&&(o=tD[e],o)?o:(n=t.fromBits(e,e<0?-1:0,!1),u&&(tD[e]=n),n))}},{key:"fromNumber",value:function e(e,r){if(isNaN(e))return r?t.UZERO:t.ZERO;if(r){if(e<0)return t.UZERO;if(e>=tw)return t.MAX_UNSIGNED_VALUE}else{if(e<=-0x8000000000000000)return t.MIN_VALUE;if(e+1>=t_)return t.MAX_VALUE}return e<0?t.fromNumber(-e,r).neg():t.fromBits(e%tO|0,e/tO|0,r)}},{key:"fromBigInt",value:function e(e,r){var n=BigInt(0xffffffff),o=BigInt(32);return new t(Number(e&n),Number(e>>o&n),r)}},{key:"_fromString",value:function e(e,r,n){if(e.length===0)throw new e9("empty string");if(n<2||36<n)throw new e9("radix");var o;if((o=e.indexOf("-"))>0)throw new e9("interior hyphen");if(o===0)return t._fromString(e.substring(1),r,n).neg();var u=t.fromNumber(Math.pow(n,8)),i=t.ZERO;for(var s=0;s<e.length;s+=8){var a=Math.min(8,e.length-s),c=parseInt(e.substring(s,s+a),n);if(a<8){var l=t.fromNumber(Math.pow(n,a));i=i.mul(l).add(t.fromNumber(c))}else i=i.mul(u),i=i.add(t.fromNumber(c))}return i.unsigned=r,i}},{key:"fromStringStrict",value:function e(e,r,n){var o=!1;if(typeof r=="number"?(n=r,r=!1):o=!!r,n!==null&&n!==void 0?n:n=10,e.trim()!==e)throw new e9("Input: '".concat(e,"' contains leading and/or trailing whitespace"));if(!b(e,n))throw new e9("Input: '".concat(e,"' contains invalid characters for radix: ").concat(n));var u=S(e),i=t._fromString(u,o,n);if(i.toString(n).toLowerCase()!==u.toLowerCase())throw new e9("Input: ".concat(e," is not representable as ").concat(i.unsigned?"an unsigned":"a signed"," 64-bit Long ").concat(n!=null?"with radix: ".concat(n):""));return i}},{key:"fromString",value:function e(e,r,n){var o=!1;return typeof r=="number"?(n=r,r=!1):o=!!r,n!==null&&n!==void 0?n:n=10,e==="NaN"&&n<24||(e==="Infinity"||e==="+Infinity"||e==="-Infinity")&&n<35?t.ZERO:t._fromString(e,o,n)}},{key:"fromBytes",value:function e(e,r,n){return n?t.fromBytesLE(e,r):t.fromBytesBE(e,r)}},{key:"fromBytesLE",value:function e(e,r){return new t(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,r)}},{key:"fromBytesBE",value:function e(e,r){return new t(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],r)}},{key:"isLong",value:function e(e){return e!=null&&(typeof e==="undefined"?"undefined":j(e))=="object"&&"__isLong__"in e&&e.__isLong__===!0}},{key:"fromValue",value:function e(e,r){return typeof e=="number"?t.fromNumber(e,r):typeof e=="string"?t.fromString(e,r):t.fromBits(e.low,e.high,typeof r=="boolean"?r:e.unsigned)}},{key:"fromExtendedJSON",value:function e(e,r){var n=B({},r),o=n.useBigInt64,u=o===void 0?!1:o,i=n.relaxed,s=i===void 0?!0:i;if(e.$numberLong.length>tT)throw new e9("$numberLong string is too long");if(!tF.test(e.$numberLong))throw new e9('$numberLong string "'.concat(e.$numberLong,'" is in an invalid format'));if(u){var a=BigInt(e.$numberLong);return BigInt.asIntN(64,a)}var c=t.fromString(e.$numberLong);return s?c.toNumber():c}}]);return t}(tc);tM.TWO_PWR_24=tM.fromInt(tb);tM.MAX_UNSIGNED_VALUE=tM.fromBits(-1,-1,!0);tM.ZERO=tM.fromInt(0);tM.UZERO=tM.fromInt(0,!0);tM.ONE=tM.fromInt(1);tM.UONE=tM.fromInt(1,!0);tM.NEG_ONE=tM.fromInt(-1);tM.MAX_VALUE=tM.fromBits(-1,0x7fffffff,!1);tM.MIN_VALUE=tM.fromBits(0,-0x80000000,!1);var tR=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,tk=/^(\+|-)?(Infinity|inf)$/i,tI=/^(\+|-)?NaN$/i,tN=6111,tP=-6176,tx=6176,tL=34,tU=ta.fromNumberArray([124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),tj=ta.fromNumberArray([248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),tz=ta.fromNumberArray([120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),tW=/^([-+])?(\d+)?$/,tV=31,tG=16383,tH=30,tq=31;var tK=/*#__PURE__*/function(e){A(r,e);function r(e){f(this,r);var n;if(n=d(this,r),typeof e=="string")n.bytes=r.fromString(e).bytes;else if(C(e,Uint8Array)||t(e)){if(e.byteLength!==16)throw new e9("Decimal128 must take a Buffer of 16 bytes");n.bytes=e}else throw new e9("Decimal128 must take a Buffer or string");return n}p(r,[{key:"_bsontype",get:function e(){return"Decimal128"}},{key:"toString",value:function e(){var e,t=0,r=new Array(36);for(var n=0;n<r.length;n++)r[n]=0;var o=0,u=!1,i,s={parts:[0,0,0,0]},a,c,l=[];o=0;var d=this.bytes,f=d[o++]|d[o++]<<8|d[o++]<<16|d[o++]<<24,h=d[o++]|d[o++]<<8|d[o++]<<16|d[o++]<<24,v=d[o++]|d[o++]<<8|d[o++]<<16|d[o++]<<24,p=d[o++]|d[o++]<<8|d[o++]<<16|d[o++]<<24;o=0,({low:new tM(f,h),high:new tM(v,p)}).high.lessThan(tM.ZERO)&&l.push("-");var m=p>>26&tV;if(m>>3===3){if(m===tH)return l.join("")+"Infinity";if(m===tq)return"NaN";e=p>>15&tG,i=8+(p>>14&1)}else i=p>>14&7,e=p>>17&tG;var E=e-tx;if(s.parts[0]=(p&16383)+((i&15)<<14),s.parts[1]=v,s.parts[2]=h,s.parts[3]=f,s.parts[0]===0&&s.parts[1]===0&&s.parts[2]===0&&s.parts[3]===0)u=!0;else for(c=3;c>=0;c--){var y=0,g=w(s);if(s=g.quotient,y=g.rem.low,!!y)for(a=8;a>=0;a--)r[c*9+a]=y%10,y=Math.floor(y/10)}if(u)t=1,r[o]=0;else for(t=36;!r[o];)t=t-1,o=o+1;var A=t-1+E;if(A>=34||A<=-7||E>0){if(t>34)return l.push("0"),E>0?l.push("E+".concat(E)):E<0&&l.push("E".concat(E)),l.join("");l.push("".concat(r[o++])),t=t-1,t&&l.push(".");for(var C=0;C<t;C++)l.push("".concat(r[o++]));l.push("E"),A>0?l.push("+".concat(A)):l.push("".concat(A))}else if(E>=0)for(var S=0;S<t;S++)l.push("".concat(r[o++]));else{var b=t+E;if(b>0)for(var O=0;O<b;O++)l.push("".concat(r[o++]));else l.push("0");for(l.push(".");b++<0;)l.push("0");for(var _=0;_<t-Math.max(b-1,0);_++)l.push("".concat(r[o++]))}return l.join("")}},{key:"toJSON",value:function e(){return{$numberDecimal:this.toString()}}},{key:"toExtendedJSON",value:function e(){return{$numberDecimal:this.toString()}}},{key:"inspect",value:function e(e,t,r){return r!==null&&r!==void 0?r:r=s,"new Decimal128(".concat(r(this.toString(),t),")")}}],[{key:"fromString",value:function e(e){return r._fromString(e,{allowRounding:!1})}},{key:"fromStringWithRounding",value:function e(e){return r._fromString(e,{allowRounding:!0})}},{key:"_fromString",value:function e(e,t){var n=!1,o=!1,u=!1,i=!1,s=0,a=0,c=0,l=0,d=0,f=[0],h=0,v=0,p=0,m=0,E=new tM(0,0),y=new tM(0,0),g=0,A=0;if(e.length>=7e3)throw new e9(""+e+" not a valid Decimal128 string");var C=e.match(tR),S=e.match(tk),b=e.match(tI);if(!C&&!S&&!b||e.length===0)throw new e9(""+e+" not a valid Decimal128 string");if(C){var w=C[2],B=C[4],F=C[5],M=C[6];B&&M===void 0&&T(e,"missing exponent power"),B&&w===void 0&&T(e,"missing exponent base"),B===void 0&&(F||M)&&T(e,"missing e before exponent")}if((e[A]==="+"||e[A]==="-")&&(o=!0,n=e[A++]==="-"),!O(e[A])&&e[A]!=="."){if(e[A]==="i"||e[A]==="I")return new r(n?tj:tz);if(e[A]==="N")return new r(tU)}for(;O(e[A])||e[A]===".";){if(e[A]==="."){u&&T(e,"contains multiple periods"),u=!0,A=A+1;continue}h<tL&&(e[A]!=="0"||i)&&(i||(d=a),i=!0,f[v++]=parseInt(e[A],10),h=h+1),i&&(c=c+1),u&&(l=l+1),a=a+1,A=A+1}if(u&&!a)throw new e9(""+e+" not a valid Decimal128 string");if(e[A]==="e"||e[A]==="E"){var R=e.substr(++A).match(tW);if(!R||!R[2])return new r(tU);m=parseInt(R[0],10),A=A+R[0].length}if(e[A])return new r(tU);if(!h)f[0]=0,c=1,h=1,s=0;else if(p=h-1,s=c,s!==1)for(;e[d+s-1+Number(o)+Number(u)]==="0";)s=s-1;for(m<=l&&l>m+16384?m=tP:m=m-l;m>tN;){if(p=p+1,p>=tL){if(s===0){m=tN;break}T(e,"overflow")}m=m-1}if(t.allowRounding){for(;m<tP||h<c;){if(p===0&&s<h){m=tP,s=0;break}if(h<c?c=c-1:p=p-1,m<tN)m=m+1;else{if(f.join("").match(/^0+$/)){m=tN;break}T(e,"overflow")}}if(p+1<s){var k=a;u&&(d=d+1,k=k+1),o&&(d=d+1,k=k+1);var I=parseInt(e[d+p+1],10),N=0;if(I>=5&&(N=1,I===5)){N=f[p]%2===1?1:0;for(var P=d+p+2;P<k;P++)if(parseInt(e[P],10)){N=1;break}}if(N){var x=p;for(;x>=0&&++f[x]>9;x--)if(f[x]=0,x===0)if(m<tN)m=m+1,f[x]=1;else return new r(n?tj:tz)}}}else{for(;m<tP||h<c;){if(p===0){if(s===0){m=tP;break}T(e,"exponent underflow")}h<c?(e[c-1+Number(o)+Number(u)]!=="0"&&s!==0&&T(e,"inexact rounding"),c=c-1):(f[p]!==0&&T(e,"inexact rounding"),p=p-1),m<tN?m=m+1:T(e,"overflow")}p+1<s&&(u&&(d=d+1),o&&(d=d+1),parseInt(e[d+p+1],10)!==0&&T(e,"inexact rounding"))}if(E=tM.fromNumber(0),y=tM.fromNumber(0),s===0)E=tM.fromNumber(0),y=tM.fromNumber(0);else if(p<17){var L=0;for(y=tM.fromNumber(f[L++]),E=new tM(0,0);L<=p;L++)y=y.multiply(tM.fromNumber(10)),y=y.add(tM.fromNumber(f[L]))}else{var U=0;for(E=tM.fromNumber(f[U++]);U<=p-17;U++)E=E.multiply(tM.fromNumber(10)),E=E.add(tM.fromNumber(f[U]));for(y=tM.fromNumber(f[U++]);U<=p;U++)y=y.multiply(tM.fromNumber(10)),y=y.add(tM.fromNumber(f[U]))}var j=_(E,tM.fromString("100000000000000000"));j.low=j.low.add(y),D(j.low,y)&&(j.high=j.high.add(tM.fromNumber(1))),g=m+tx;var z={low:tM.fromNumber(0),high:tM.fromNumber(0)};j.high.shiftRightUnsigned(49).and(tM.fromNumber(1)).equals(tM.fromNumber(1))?(z.high=z.high.or(tM.fromNumber(3).shiftLeft(61)),z.high=z.high.or(tM.fromNumber(g).and(tM.fromNumber(16383).shiftLeft(47))),z.high=z.high.or(j.high.and(tM.fromNumber(0x7fffffffffff)))):(z.high=z.high.or(tM.fromNumber(g&16383).shiftLeft(49)),z.high=z.high.or(j.high.and(tM.fromNumber(0x1ffffffffffff)))),z.low=j.low,n&&(z.high=z.high.or(tM.fromString("9223372036854775808")));var W=ta.allocateUnsafe(16);return A=0,W[A++]=z.low.low&255,W[A++]=z.low.low>>8&255,W[A++]=z.low.low>>16&255,W[A++]=z.low.low>>24&255,W[A++]=z.low.high&255,W[A++]=z.low.high>>8&255,W[A++]=z.low.high>>16&255,W[A++]=z.low.high>>24&255,W[A++]=z.high.low&255,W[A++]=z.high.low>>8&255,W[A++]=z.high.low>>16&255,W[A++]=z.high.low>>24&255,W[A++]=z.high.high&255,W[A++]=z.high.high>>8&255,W[A++]=z.high.high>>16&255,W[A++]=z.high.high>>24&255,new r(W)}},{key:"fromExtendedJSON",value:function e(e){return r.fromString(e.$numberDecimal)}}]);return r}(tc),tY=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);var r;r=d(this,t),C(e,Number)&&(e=e.valueOf()),r.value=+e;return r}p(t,[{key:"_bsontype",get:function e(){return"Double"}},{key:"valueOf",value:function e(){return this.value}},{key:"toJSON",value:function e(){return this.value}},{key:"toString",value:function e(e){return this.value.toString(e)}},{key:"toExtendedJSON",value:function e(e){return e&&(e.legacy||e.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()}}},{key:"inspect",value:function e(e,t,r){return r!==null&&r!==void 0?r:r=s,"new Double(".concat(r(this.value,t),")")}}],[{key:"fromString",value:function e(e){var r=Number(e);if(e==="NaN")return new t(NaN);if(e==="Infinity")return new t(1/0);if(e==="-Infinity")return new t(-1/0);if(!Number.isFinite(r))throw new e9("Input: ".concat(e," is not representable as a Double"));if(e.trim()!==e)throw new e9("Input: '".concat(e,"' contains whitespace"));if(e==="")throw new e9("Input is an empty string");if(/[^-0-9.+eE]/.test(e))throw new e9("Input: '".concat(e,"' is not in decimal or exponential notation"));return new t(r)}},{key:"fromExtendedJSON",value:function e(e,r){var n=parseFloat(e.$numberDouble);return r&&r.relaxed?n:new t(n)}}]);return t}(tc),t$=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);var r;r=d(this,t),C(e,Number)&&(e=e.valueOf()),r.value=+e|0;return r}p(t,[{key:"_bsontype",get:function e(){return"Int32"}},{key:"valueOf",value:function e(){return this.value}},{key:"toString",value:function e(e){return this.value.toString(e)}},{key:"toJSON",value:function e(){return this.value}},{key:"toExtendedJSON",value:function e(e){return e&&(e.relaxed||e.legacy)?this.value:{$numberInt:this.value.toString()}}},{key:"inspect",value:function e(e,t,r){return r!==null&&r!==void 0?r:r=s,"new Int32(".concat(r(this.value,t),")")}}],[{key:"fromString",value:function e(e){var r=S(e),n=Number(e);if(eF<n)throw new e9("Input: '".concat(e,"' is larger than the maximum value for Int32"));if(eM>n)throw new e9("Input: '".concat(e,"' is smaller than the minimum value for Int32"));if(Number.isSafeInteger(n)){if(n.toString()!==r)throw new e9("Input: '".concat(e,"' is not a valid Int32 string"))}else throw new e9("Input: '".concat(e,"' is not a safe integer"));return new t(n)}},{key:"fromExtendedJSON",value:function e(e,r){return r&&r.relaxed?parseInt(e.$numberInt,10):new t(e.$numberInt)}}]);return t}(tc),tJ=/*#__PURE__*/function(e){A(t,e);function t(){f(this,t);return d(this,t,arguments)}p(t,[{key:"_bsontype",get:function e(){return"MaxKey"}},{key:"toExtendedJSON",value:function e(){return{$maxKey:1}}},{key:"inspect",value:function e(){return"new MaxKey()"}}],[{key:"fromExtendedJSON",value:function e(){return new t}}]);return t}(tc),tX=/*#__PURE__*/function(e){A(t,e);function t(){f(this,t);return d(this,t,arguments)}p(t,[{key:"_bsontype",get:function e(){return"MinKey"}},{key:"toExtendedJSON",value:function e(){return{$minKey:1}}},{key:"inspect",value:function e(){return"new MinKey()"}}],[{key:"fromExtendedJSON",value:function e(){return new t}}]);return t}(tc),tQ=null,tZ=new WeakMap,t1=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);var r;r=d(this,t);var n;if((typeof e==="undefined"?"undefined":j(e))=="object"&&e&&"id"in e){if(typeof e.id!="string"&&!ArrayBuffer.isView(e.id))throw new e9("Argument passed in must have an id that is of type string or Buffer");"toHexString"in e&&typeof e.toHexString=="function"?n=ta.fromHex(e.toHexString()):n=e.id}else n=e;if(n==null||typeof n=="number")r.buffer=t.generate(typeof n=="number"?n:void 0);else if(ArrayBuffer.isView(n)&&n.byteLength===12)r.buffer=ta.toLocalBufferType(n);else if(typeof n=="string")if(t.validateHexString(n))r.buffer=ta.fromHex(n),t.cacheHexString&&tZ.set(r,n);else throw new e9("input must be a 24 character hex string, 12 byte Uint8Array, or an integer");else throw new e9("Argument passed in does not match the accepted types");return r}p(t,[{key:"_bsontype",get:function e(){return"ObjectId"}},{key:"id",get:function e(){return this.buffer},set:function e(e){this.buffer=e,t.cacheHexString&&tZ.set(this,ta.toHex(e))}},{key:"toHexString",value:function e(){if(t.cacheHexString){var e=tZ.get(this);if(e)return e}var r=ta.toHex(this.id);return t.cacheHexString&&tZ.set(this,r),r}},{key:"toString",value:function e(e){return e==="base64"?ta.toBase64(this.id):e==="hex"?this.toHexString():this.toHexString()}},{key:"toJSON",value:function e(){return this.toHexString()}},{key:"equals",value:function e(e){if(e==null)return!1;if(t.is(e))return this.buffer[11]===e.buffer[11]&&ta.equals(this.buffer,e.buffer);if(typeof e=="string")return e.toLowerCase()===this.toHexString();if((typeof e==="undefined"?"undefined":j(e))=="object"&&typeof e.toHexString=="function"){var r=e.toHexString(),n=this.toHexString();return typeof r=="string"&&r.toLowerCase()===n}return!1}},{key:"getTimestamp",value:function e(){var e=new Date,t=th.getUint32BE(this.buffer,0);return e.setTime(Math.floor(t)*1e3),e}},{key:"serializeInto",value:function e(e,t){return e[t]=this.buffer[0],e[t+1]=this.buffer[1],e[t+2]=this.buffer[2],e[t+3]=this.buffer[3],e[t+4]=this.buffer[4],e[t+5]=this.buffer[5],e[t+6]=this.buffer[6],e[t+7]=this.buffer[7],e[t+8]=this.buffer[8],e[t+9]=this.buffer[9],e[t+10]=this.buffer[10],e[t+11]=this.buffer[11],12}},{key:"toExtendedJSON",value:function e(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}}},{key:"isCached",value:function e(){return t.cacheHexString&&tZ.has(this)}},{key:"inspect",value:function e(e,t,r){return r!==null&&r!==void 0?r:r=s,"new ObjectId(".concat(r(this.toHexString(),t),")")}}],[{key:"validateHexString",value:function e(e){if((e===null||e===void 0?void 0:e.length)!==24)return!1;for(var t=0;t<24;t++){var r=e.charCodeAt(t);if(!(r>=48&&r<=57||r>=97&&r<=102||r>=65&&r<=70))return!1}return!0}},{key:"getInc",value:function e(){return t.index=(t.index+1)%0xffffff}},{key:"generate",value:function e(e){typeof e!="number"&&(e=Math.floor(Date.now()/1e3));var r=t.getInc(),n=ta.allocateUnsafe(12);return th.setInt32BE(n,0,e),tQ===null&&(tQ=ta.randomBytes(5)),n[4]=tQ[0],n[5]=tQ[1],n[6]=tQ[2],n[7]=tQ[3],n[8]=tQ[4],n[11]=r&255,n[10]=r>>8&255,n[9]=r>>16&255,n}},{key:"is",value:function e(e){return e!=null&&(typeof e==="undefined"?"undefined":j(e))=="object"&&"_bsontype"in e&&e._bsontype==="ObjectId"}},{key:"createPk",value:function e(){return new t}},{key:"createFromTime",value:function e(e){var r=ta.allocate(12);for(var n=11;n>=4;n--)r[n]=0;return th.setInt32BE(r,0,e),new t(r)}},{key:"createFromHexString",value:function e(e){if((e===null||e===void 0?void 0:e.length)!==24)throw new e9("hex string must be 24 characters");return new t(ta.fromHex(e))}},{key:"createFromBase64",value:function e(e){if((e===null||e===void 0?void 0:e.length)!==16)throw new e9("base64 string must be 16 characters");return new t(ta.fromBase64(e))}},{key:"isValid",value:function e(e){if(e==null)return!1;if(typeof e=="string")return t.validateHexString(e);try{return new t(e),!0}catch(e){return!1}}},{key:"fromExtendedJSON",value:function e(e){return new t(e.$oid)}}]);return t}(tc);t1.index=Math.floor(Math.random()*0xffffff);var t0=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);var n;if(n=d(this,t),n.pattern=e,n.options=k(r!==null&&r!==void 0?r:""),n.pattern.indexOf("\0")!==-1)throw new e9("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(n.pattern)));if(n.options.indexOf("\0")!==-1)throw new e9("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(n.options)));for(var o=0;o<n.options.length;o++)if(!(n.options[o]==="i"||n.options[o]==="m"||n.options[o]==="x"||n.options[o]==="l"||n.options[o]==="s"||n.options[o]==="u"))throw new e9("The regular expression option [".concat(n.options[o],"] is not supported"));return n}p(t,[{key:"_bsontype",get:function e(){return"BSONRegExp"}},{key:"toExtendedJSON",value:function e(e){return e=e||{},e.legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}}},{key:"inspect",value:function e(e,t,r){var n;var o=(n=a(t))!==null&&n!==void 0?n:function(e){return e};r!==null&&r!==void 0?r:r=s;var u=o(r(this.pattern),"regexp"),i=o(r(this.options),"regexp");return"new BSONRegExp(".concat(u,", ").concat(i,")")}}],[{key:"parseOptions",value:function e(e){return e?e.split("").sort().join(""):""}},{key:"fromExtendedJSON",value:function e(e){if("$regex"in e)if(typeof e.$regex!="string"){if(e.$regex._bsontype==="BSONRegExp")return e}else return new t(e.$regex,t.parseOptions(e.$options));if("$regularExpression"in e)return new t(e.$regularExpression.pattern,t.parseOptions(e.$regularExpression.options));throw new e9("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(e)))}}]);return t}(tc),t2=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);var r;r=d(this,t),r.value=e;return r}p(t,[{key:"_bsontype",get:function e(){return"BSONSymbol"}},{key:"valueOf",value:function e(){return this.value}},{key:"toString",value:function e(){return this.value}},{key:"toJSON",value:function e(){return this.value}},{key:"toExtendedJSON",value:function e(){return{$symbol:this.value}}},{key:"inspect",value:function e(e,t,r){return r!==null&&r!==void 0?r:r=s,"new BSONSymbol(".concat(r(this.value,t),")")}}],[{key:"fromExtendedJSON",value:function e(e){return new t(e.$symbol)}}]);return t}(tc),t3=tM,t6=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);var r;if(e==null)r=d(this,t,[0,0,!0]);else if((typeof e==="undefined"?"undefined":j(e))=="bigint")r=d(this,t,[e,!0]);else if(tM.isLong(e))r=d(this,t,[e.low,e.high,!0]);else if((typeof e==="undefined"?"undefined":j(e))=="object"&&"t"in e&&"i"in e){if(typeof e.t!="number"&&(j(e.t)!="object"||e.t._bsontype!=="Int32"))throw new e9("Timestamp constructed from { t, i } must provide t as a number");if(typeof e.i!="number"&&(j(e.i)!="object"||e.i._bsontype!=="Int32"))throw new e9("Timestamp constructed from { t, i } must provide i as a number");var o=Number(e.t),u=Number(e.i);if(o<0||Number.isNaN(o))throw new e9("Timestamp constructed from { t, i } must provide a positive t");if(u<0||Number.isNaN(u))throw new e9("Timestamp constructed from { t, i } must provide a positive i");if(o>0xffffffff)throw new e9("Timestamp constructed from { t, i } must provide t equal or less than uint32 max");if(u>0xffffffff)throw new e9("Timestamp constructed from { t, i } must provide i equal or less than uint32 max");r=d(this,t,[u,o,!0])}else throw new e9("A Timestamp can only be constructed with: bigint, Long, or { t: number; i: number }");return n(r)}p(t,[{key:"_bsontype",get:function e(){return"Timestamp"}},{key:"i",get:function e(){return this.low>>>0}},{key:"t",get:function e(){return this.high>>>0}},{key:"toJSON",value:function e(){return{$timestamp:this.toString()}}},{key:"toExtendedJSON",value:function e(){return{$timestamp:{t:this.t,i:this.i}}}},{key:"inspect",value:function e(e,t,r){r!==null&&r!==void 0?r:r=s;var n=r(this.t,t),o=r(this.i,t);return"new Timestamp({ t: ".concat(n,", i: ").concat(o," })")}}],[{key:"fromInt",value:function e(e){return new t(tM.fromInt(e,!0))}},{key:"fromNumber",value:function e(e){return new t(tM.fromNumber(e,!0))}},{key:"fromBits",value:function e(e,r){return new t({i:e,t:r})}},{key:"fromString",value:function e(e,r){return new t(tM.fromString(e,!0,r))}},{key:"fromExtendedJSON",value:function e(e){var r=tM.isLong(e.$timestamp.i)?e.$timestamp.i.getLowBitsUnsigned():e.$timestamp.i,n=tM.isLong(e.$timestamp.t)?e.$timestamp.t.getLowBitsUnsigned():e.$timestamp.t;return new t({t:n,i:r})}}]);return t}(t3);t6.MAX_VALUE=tM.MAX_UNSIGNED_VALUE;var t4=tM.fromNumber(eI),t9=tM.fromNumber(eN);var t7=/^\$ref$|^\$id$|^\$db$/;function t8(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;var o,u,i,s;var a=r.fieldsAsRaw==null?null:r.fieldsAsRaw,c=r.raw==null?!1:r.raw,l=typeof r.bsonRegExp=="boolean"?r.bsonRegExp:!1,d=(o=r.promoteBuffers)!==null&&o!==void 0?o:!1,f=(u=r.promoteLongs)!==null&&u!==void 0?u:!0,h=(i=r.promoteValues)!==null&&i!==void 0?i:!0,v=(s=r.useBigInt64)!==null&&s!==void 0?s:!1;if(v&&!h)throw new e9("Must either request bigint or Long for int64 deserialization");if(v&&!f)throw new e9("Must either request bigint or Long for int64 deserialization");var p=r.validation==null?{utf8:!0}:r.validation,m=!0,E,y,A=p.utf8;if(typeof A=="boolean")E=A;else{m=!1;var C=Object.keys(A).map(function(e){return A[e]});if(C.length===0)throw new e9("UTF-8 validation setting cannot be empty");if(typeof C[0]!="boolean")throw new e9("Invalid UTF-8 validation option, must specify boolean values");if(E=C[0],!C.every(function(e){return e===E}))throw new e9("Invalid UTF-8 validation option - keys must be all true or all false")}if(!m){y=new Set;var S=true,b=false,O=undefined;try{for(var w=Object.keys(A)[Symbol.iterator](),_;!(S=(_=w.next()).done);S=true){var D=_.value;y.add(D)}}catch(e){b=true;O=e}finally{try{if(!S&&w.return!=null){w.return()}}finally{if(b){throw O}}}}var T=t;if(e.length<5)throw new e9("corrupt bson message < 5 bytes long");var M=th.getInt32LE(e,t);if(t+=4,M<5||M>e.length)throw new e9("corrupt bson message");var R=n?[]:{},k=0,I=n?!1:null;for(;;){var N=e[t++];if(N===0)break;var P=t;for(;e[P]!==0&&P<e.length;)P++;if(P>=e.byteLength)throw new e9("Bad BSON Document: illegal CString");var x=n?k++:ta.toUTF8(e,t,P,!1),L=!0;m||(y===null||y===void 0?void 0:y.has(x))?L=E:L=!E,I!==!1&&x[0]==="$"&&(I=t7.test(x));var U=void 0;if(t=P+1,N===ex){var j=th.getInt32LE(e,t);if(t+=4,j<=0||j>e.length-t||e[t+j-1]!==0)throw new e9("bad string length in bson");U=ta.toUTF8(e,t,t+j-1,L),t=t+j}else if(N===eW){var z=ta.allocateUnsafe(12);for(var W=0;W<12;W++)z[W]=e[t+W];U=new t1(z),t=t+12}else if(N===eX&&h===!1)U=new t$(th.getInt32LE(e,t)),t+=4;else if(N===eX)U=th.getInt32LE(e,t),t+=4;else if(N===eP)U=th.getFloat64LE(e,t),t+=8,h===!1&&(U=new tY(U));else if(N===eG){var V=th.getInt32LE(e,t),G=th.getInt32LE(e,t+4);t+=8,U=new Date(new tM(V,G).toNumber())}else if(N===eV){if(e[t]!==0&&e[t]!==1)throw new e9("illegal boolean type value");U=e[t++]===1}else if(N===eL){var H=t,q=th.getInt32LE(e,t);if(q<=0||q>e.length-t)throw new e9("bad embedded document length in bson");if(c)U=e.subarray(t,t+q);else{var K=r;m||(K=F(B({},r),{validation:{utf8:L}})),U=t8(e,H,K,!1)}t=t+q}else if(N===eU){var Y=t,$=th.getInt32LE(e,t),J=r,X=t+$;if(a&&a[x]&&(J=F(B({},r),{raw:!0})),m||(J=F(B({},J),{validation:{utf8:L}})),U=t8(e,Y,J,!0),t=t+$,e[t-1]!==0)throw new e9("invalid array terminator byte");if(t!==X)throw new e9("corrupted array bson")}else if(N===ez)U=void 0;else if(N===eH)U=null;else if(N===eZ)if(v)U=th.getBigInt64LE(e,t),t+=8;else{var Q=th.getInt32LE(e,t),Z=th.getInt32LE(e,t+4);t+=8;var ee=new tM(Q,Z);f&&h===!0?U=ee.lessThanOrEqual(t4)&&ee.greaterThanOrEqual(t9)?ee.toNumber():ee:U=ee}else if(N===e1){var et=ta.allocateUnsafe(16);for(var er=0;er<16;er++)et[er]=e[t+er];t=t+16,U=new tK(et)}else if(N===ej){var en=th.getInt32LE(e,t);t+=4;var eo=en,eu=e[t++];if(en<0)throw new e9("Negative binary type element size found");if(en>e.byteLength)throw new e9("Binary type size larger than document size");if(eu===tv.SUBTYPE_BYTE_ARRAY){if(en=th.getInt32LE(e,t),t+=4,en<0)throw new e9("Negative binary type element size found for subtype 0x02");if(en>eo-4)throw new e9("Binary type with subtype 0x02 contains too long binary size");if(en<eo-4)throw new e9("Binary type with subtype 0x02 contains too short binary size")}d&&h?U=ta.toLocalBufferType(e.subarray(t,t+en)):(U=new tv(e.subarray(t,t+en),eu),eu===e6&&ty.isValid(U)&&(U=U.toUUID())),t=t+en}else if(N===eq&&l===!1){for(P=t;e[P]!==0&&P<e.length;)P++;if(P>=e.length)throw new e9("Bad BSON Document: illegal CString");var ei=ta.toUTF8(e,t,P,!1);for(t=P+1,P=t;e[P]!==0&&P<e.length;)P++;if(P>=e.length)throw new e9("Bad BSON Document: illegal CString");var es=ta.toUTF8(e,t,P,!1);t=P+1;var ea=new Array(es.length);for(P=0;P<es.length;P++)switch(es[P]){case"m":ea[P]="m";break;case"s":ea[P]="g";break;case"i":ea[P]="i";break}U=new RegExp(ei,ea.join(""))}else if(N===eq&&l===!0){for(P=t;e[P]!==0&&P<e.length;)P++;if(P>=e.length)throw new e9("Bad BSON Document: illegal CString");var ec=ta.toUTF8(e,t,P,!1);for(t=P+1,P=t;e[P]!==0&&P<e.length;)P++;if(P>=e.length)throw new e9("Bad BSON Document: illegal CString");var el=ta.toUTF8(e,t,P,!1);t=P+1,U=new t0(ec,el)}else if(N===e$){var ed=th.getInt32LE(e,t);if(t+=4,ed<=0||ed>e.length-t||e[t+ed-1]!==0)throw new e9("bad string length in bson");var ef=ta.toUTF8(e,t,t+ed-1,L);U=h?ef:new t2(ef),t=t+ed}else if(N===eQ)U=new t6({i:th.getUint32LE(e,t),t:th.getUint32LE(e,t+4)}),t+=8;else if(N===e0)U=new tX;else if(N===e2)U=new tJ;else if(N===eY){var eh=th.getInt32LE(e,t);if(t+=4,eh<=0||eh>e.length-t||e[t+eh-1]!==0)throw new e9("bad string length in bson");var ev=ta.toUTF8(e,t,t+eh-1,L);U=new tg(ev),t=t+eh}else if(N===eJ){var ep=th.getInt32LE(e,t);if(t+=4,ep<13)throw new e9("code_w_scope total size shorter minimum expected length");var em=th.getInt32LE(e,t);if(t+=4,em<=0||em>e.length-t||e[t+em-1]!==0)throw new e9("bad string length in bson");var eE=ta.toUTF8(e,t,t+em-1,L);t=t+em;var ey=t,eg=th.getInt32LE(e,t),eA=t8(e,ey,r,!1);if(t=t+eg,ep<8+eg+em)throw new e9("code_w_scope total size is too short, truncating scope");if(ep>8+eg+em)throw new e9("code_w_scope total size is too long, clips outer document");U=new tg(eE,eA)}else if(N===eK){var eC=th.getInt32LE(e,t);if(t+=4,eC<=0||eC>e.length-t||e[t+eC-1]!==0)throw new e9("bad string length in bson");var eS=ta.toUTF8(e,t,t+eC-1,L);t=t+eC;var eb=ta.allocateUnsafe(12);for(var eO=0;eO<12;eO++)eb[eO]=e[t+eO];var ew=new t1(eb);t=t+12,U=new tA(eS,ew)}else throw new e9("Detected unknown BSON type ".concat(N.toString(16),' for fieldname "').concat(x,'"'));x==="__proto__"?Object.defineProperty(R,x,{value:U,writable:!0,enumerable:!0,configurable:!0}):R[x]=U}if(M!==t-T)throw n?new e9("corrupt array bson"):new e9("corrupt object bson");if(!I)return R;if(g(R)){var e_=Object.assign({},R);return delete e_.$ref,delete e_.$id,delete e_.$db,new tA(R.$ref,R.$id,R.$db,e_)}return R}var t5=/\x00/,re=new Set(["$db","$ref","$id","$clusterTime"]);var rt={$oid:t1,$binary:tv,$uuid:tv,$symbol:t2,$numberInt:t$,$numberDecimal:tK,$numberDouble:tY,$numberLong:tM,$minKey:tX,$maxKey:tJ,$regex:t0,$regularExpression:t0,$timestamp:t6};function rr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof e=="number"){var r=e<=eF&&e>=eM,n=e<=eR&&e>=ek;if(t.relaxed||t.legacy)return e;if(Number.isInteger(e)&&!Object.is(e,-0)){if(r)return new t$(e);if(n)return t.useBigInt64?BigInt(e):tM.fromNumber(e)}return new tY(e)}if(e==null||(typeof e==="undefined"?"undefined":j(e))!="object")return e;if(e.$undefined)return null;var o=Object.keys(e).filter(function(t){return t.startsWith("$")&&e[t]!=null});for(var u=0;u<o.length;u++){var i=rt[o[u]];if(i)return i.fromExtendedJSON(e,t)}if(e.$date!=null){var s=e.$date,a=new Date;if(t.legacy)if(typeof s=="number")a.setTime(s);else if(typeof s=="string")a.setTime(Date.parse(s));else if((typeof s==="undefined"?"undefined":j(s))=="bigint")a.setTime(Number(s));else throw new e8("Unrecognized type for EJSON date: ".concat(typeof s==="undefined"?"undefined":j(s)));else if(typeof s=="string")a.setTime(Date.parse(s));else if(tM.isLong(s))a.setTime(s.toNumber());else if(typeof s=="number"&&t.relaxed)a.setTime(s);else if((typeof s==="undefined"?"undefined":j(s))=="bigint")a.setTime(Number(s));else throw new e8("Unrecognized type for EJSON date: ".concat(typeof s==="undefined"?"undefined":j(s)));return a}if(e.$code!=null){var c=Object.assign({},e);return e.$scope&&(c.$scope=rr(e.$scope)),tg.fromExtendedJSON(e)}if(g(e)||e.$dbPointer){var l=e.$ref?e:e.$dbPointer;if(C(l,tA))return l;var d=Object.keys(l).filter(function(e){return e.startsWith("$")}),f=!0;if(d.forEach(function(e){["$ref","$id","$db"].indexOf(e)===-1&&(f=!1)}),f)return tA.fromExtendedJSON(l)}return e}function rn(e,t){if(C(e,Map)||u(e)){var r=Object.create(null);var n=true,s=false,a=undefined;try{for(var c=e[Symbol.iterator](),l;!(n=(l=c.next()).done);n=true){var d=N(l.value,2),f=d[0],h=d[1];if(typeof f!="string")throw new e9("Can only serialize maps with string keys");r[f]=h}}catch(e){s=true;a=e}finally{try{if(!n&&c.return!=null){c.return()}}finally{if(s){throw a}}}return rn(r,t)}if(((typeof e==="undefined"?"undefined":j(e))=="object"||typeof e=="function")&&e!==null){var v=t.seenObjects.findIndex(function(t){return t.obj===e});if(v!==-1){var p=t.seenObjects.map(function(e){return e.propertyName}),m=p.slice(0,v).map(function(e){return"".concat(e," -> ")}).join(""),E=p[v],y=" -> "+p.slice(v+1,p.length-1).map(function(e){return"".concat(e," -> ")}).join(""),g=p[p.length-1],A=" ".repeat(m.length+E.length/2),S="-".repeat(y.length+(E.length+g.length)/2-1);throw new e9("Converting circular structure to EJSON:\n ".concat(m).concat(E).concat(y).concat(g,"\n ").concat(A,"\\").concat(S,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return el(e,t);if(e===void 0)return null;if(C(e,Date)||i(e)){var b=e.getTime(),O=b>-1&&b<2534023188e5;return t.legacy?t.relaxed&&O?{$date:e.getTime()}:{$date:ed(e)}:t.relaxed&&O?{$date:ed(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(typeof e=="number"&&(!t.relaxed||!isFinite(e))){if(Number.isInteger(e)&&!Object.is(e,-0)){if(e>=eM&&e<=eF)return{$numberInt:e.toString()};if(e>=ek&&e<=eR)return{$numberLong:e.toString()}}return{$numberDouble:Object.is(e,-0)?"-0.0":e.toString()}}if((typeof e==="undefined"?"undefined":j(e))=="bigint")return t.relaxed?Number(BigInt.asIntN(64,e)):{$numberLong:BigInt.asIntN(64,e).toString()};if(C(e,RegExp)||o(e)){var w=e.flags;if(w===void 0){var _=e.toString().match(/[gimuy]*$/);_&&(w=_[0])}return new t0(e.source,w).toExtendedJSON(t)}return e!=null&&(typeof e==="undefined"?"undefined":j(e))=="object"?ef(e,t):e}var ro={Binary:function(e){return new tv(e.value(),e.sub_type)},Code:function(e){return new tg(e.code,e.scope)},DBRef:function(e){return new tA(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new tK(e.bytes)},Double:function(e){return new tY(e.value)},Int32:function(e){return new t$(e.value)},Long:function(e){return tM.fromBits(e.low!=null?e.low:e.low_,e.low!=null?e.high:e.high_,e.low!=null?e.unsigned:e.unsigned_)},MaxKey:function(){return new tJ},MinKey:function(){return new tX},ObjectId:function(e){return new t1(e)},BSONRegExp:function(e){return new t0(e.pattern,e.options)},BSONSymbol:function(e){return new t2(e.value)},Timestamp:function(e){return t6.fromBits(e.low,e.high)}};var ru=Object.create(null);ru.parse=eh;ru.stringify=ev;ru.serialize=ep;ru.deserialize=em;Object.freeze(ru);var ri=Object.create(null);ri.parseToElements=eg;ri.ByteUtils=ta;ri.NumberUtils=th;Object.freeze(ri);var rs=1024*1024*17,ra=ta.allocate(rs);var rc=Object.freeze({__proto__:null,BSONError:e9,BSONOffsetError:e5,BSONRegExp:t0,BSONRuntimeError:e8,BSONSymbol:t2,BSONType:e4,BSONValue:tc,BSONVersionError:e7,Binary:tv,Code:tg,DBRef:tA,Decimal128:tK,Double:tY,EJSON:ru,Int32:t$,Long:tM,MaxKey:tJ,MinKey:tX,ObjectId:t1,Timestamp:t6,UUID:ty,calculateObjectSize:eO,deserialize:eb,deserializeStream:ew,onDemand:ri,serialize:eC,serializeWithBufferAndIndex:eS,setInternalBufferSize:eA});e.BSON=rc;e.BSONError=e9;e.BSONOffsetError=e5;e.BSONRegExp=t0;e.BSONRuntimeError=e8;e.BSONSymbol=t2;e.BSONType=e4;e.BSONValue=tc;e.BSONVersionError=e7;e.Binary=tv;e.Code=tg;e.DBRef=tA;e.Decimal128=tK;e.Double=tY;e.EJSON=ru;e.Int32=t$;e.Long=tM;e.MaxKey=tJ;e.MinKey=tX;e.ObjectId=t1;e.Timestamp=t6;e.UUID=ty;e.calculateObjectSize=eO;e.deserialize=eb;e.deserializeStream=ew;e.onDemand=ri;e.serialize=eC;e.serializeWithBufferAndIndex=eS;e.setInternalBufferSize=eA});var ea=et(function(e){"use strict";var t=function e(e,t){var r=u.BSON.onDemand.parseToElements(e,t);return Array.isArray(r)?r:U(r)};var r=function e(e){var t=e.fieldsAsRaw,r=e.useBigInt64,n=e.promoteValues,o=e.promoteBuffers,u=e.promoteLongs,i=e.serializeFunctions,s=e.ignoreUndefined,a=e.bsonRegExp,c=e.raw,l=e.enableUtf8Validation;return{fieldsAsRaw:t,useBigInt64:r,promoteValues:n,promoteBuffers:o,promoteLongs:u,serializeFunctions:i,ignoreUndefined:s,bsonRegExp:a,raw:c,enableUtf8Validation:l}};var n=function e(e,t){var r=t===null||t===void 0?void 0:t.bsonOptions;var n,o,u,i,s,a,c,l,d,f,h,v,p,m,E,y,g,A,C,S;return{raw:(o=(n=e===null||e===void 0?void 0:e.raw)!==null&&n!==void 0?n:r===null||r===void 0?void 0:r.raw)!==null&&o!==void 0?o:!1,useBigInt64:(i=(u=e===null||e===void 0?void 0:e.useBigInt64)!==null&&u!==void 0?u:r===null||r===void 0?void 0:r.useBigInt64)!==null&&i!==void 0?i:!1,promoteLongs:(a=(s=e===null||e===void 0?void 0:e.promoteLongs)!==null&&s!==void 0?s:r===null||r===void 0?void 0:r.promoteLongs)!==null&&a!==void 0?a:!0,promoteValues:(l=(c=e===null||e===void 0?void 0:e.promoteValues)!==null&&c!==void 0?c:r===null||r===void 0?void 0:r.promoteValues)!==null&&l!==void 0?l:!0,promoteBuffers:(f=(d=e===null||e===void 0?void 0:e.promoteBuffers)!==null&&d!==void 0?d:r===null||r===void 0?void 0:r.promoteBuffers)!==null&&f!==void 0?f:!1,ignoreUndefined:(v=(h=e===null||e===void 0?void 0:e.ignoreUndefined)!==null&&h!==void 0?h:r===null||r===void 0?void 0:r.ignoreUndefined)!==null&&v!==void 0?v:!1,bsonRegExp:(m=(p=e===null||e===void 0?void 0:e.bsonRegExp)!==null&&p!==void 0?p:r===null||r===void 0?void 0:r.bsonRegExp)!==null&&m!==void 0?m:!1,serializeFunctions:(y=(E=e===null||e===void 0?void 0:e.serializeFunctions)!==null&&E!==void 0?E:r===null||r===void 0?void 0:r.serializeFunctions)!==null&&y!==void 0?y:!1,fieldsAsRaw:(A=(g=e===null||e===void 0?void 0:e.fieldsAsRaw)!==null&&g!==void 0?g:r===null||r===void 0?void 0:r.fieldsAsRaw)!==null&&A!==void 0?A:{},enableUtf8Validation:(S=(C=e===null||e===void 0?void 0:e.enableUtf8Validation)!==null&&C!==void 0?C:r===null||r===void 0?void 0:r.enableUtf8Validation)!==null&&S!==void 0?S:!0}};var o=function e(e){return(e===null||e===void 0?void 0:e.enableUtf8Validation)===!1?{utf8:!1}:{utf8:{writeErrors:!1}}};ei();Object.defineProperty(e,"__esModule",{value:!0});e.toUTF8=e.getBigInt64LE=e.getFloat64LE=e.getInt32LE=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;e.parseToElementsToArray=t;e.pluckBSONSerializeOptions=r;e.resolveBSONOptions=n;e.parseUtf8ValidationOption=o;var u=es(),i=es();Object.defineProperty(e,"Binary",{enumerable:!0,get:function e(){return i.Binary}});Object.defineProperty(e,"BSON",{enumerable:!0,get:function e(){return i.BSON}});Object.defineProperty(e,"BSONError",{enumerable:!0,get:function e(){return i.BSONError}});Object.defineProperty(e,"BSONRegExp",{enumerable:!0,get:function e(){return i.BSONRegExp}});Object.defineProperty(e,"BSONSymbol",{enumerable:!0,get:function e(){return i.BSONSymbol}});Object.defineProperty(e,"BSONType",{enumerable:!0,get:function e(){return i.BSONType}});Object.defineProperty(e,"calculateObjectSize",{enumerable:!0,get:function e(){return i.calculateObjectSize}});Object.defineProperty(e,"Code",{enumerable:!0,get:function e(){return i.Code}});Object.defineProperty(e,"DBRef",{enumerable:!0,get:function e(){return i.DBRef}});Object.defineProperty(e,"Decimal128",{enumerable:!0,get:function e(){return i.Decimal128}});Object.defineProperty(e,"deserialize",{enumerable:!0,get:function e(){return i.deserialize}});Object.defineProperty(e,"Double",{enumerable:!0,get:function e(){return i.Double}});Object.defineProperty(e,"EJSON",{enumerable:!0,get:function e(){return i.EJSON}});Object.defineProperty(e,"Int32",{enumerable:!0,get:function e(){return i.Int32}});Object.defineProperty(e,"Long",{enumerable:!0,get:function e(){return i.Long}});Object.defineProperty(e,"MaxKey",{enumerable:!0,get:function e(){return i.MaxKey}});Object.defineProperty(e,"MinKey",{enumerable:!0,get:function e(){return i.MinKey}});Object.defineProperty(e,"ObjectId",{enumerable:!0,get:function e(){return i.ObjectId}});Object.defineProperty(e,"serialize",{enumerable:!0,get:function e(){return i.serialize}});Object.defineProperty(e,"Timestamp",{enumerable:!0,get:function e(){return i.Timestamp}});Object.defineProperty(e,"UUID",{enumerable:!0,get:function e(){return i.UUID}});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});var ec=et(function(e){"use strict";var t=function e(e){return e!=null&&(typeof e==="undefined"?"undefined":j(e))=="object"&&"errors"in e&&Array.isArray(e.errors)};var r=function t(t,r,n){if(C(t,$))return!0;if(C(t,v)&&(r>=9||o(t))&&!t.hasErrorLabel(e.MongoErrorLabel.HandshakeError))return!1;if(C(t,eo)){var u;if(n==="Mongos"&&r<9)return es.has((u=t.result.code)!==null&&u!==void 0?u:0);var i;var s=(i=t.result.writeConcernError.code)!==null&&i!==void 0?i:Number(t.code);return es.has(Number.isNaN(s)?0:s)}return C(t,v)?es.has(Number(t.code)):!!(e.LEGACY_NOT_WRITABLE_PRIMARY_ERROR_MESSAGE.test(t.message)||e.NODE_IS_RECOVERING_ERROR_MESSAGE.test(t.message))};var o=function t(t){return t.hasErrorLabel(e.MongoErrorLabel.RetryableWriteError)||t.hasErrorLabel(e.MongoErrorLabel.PoolRequstedRetry)};var u=function t(t){return!!((typeof t.code=="number"?eu.has(t.code):!1)||C(t,$)||e.LEGACY_NOT_WRITABLE_PRIMARY_ERROR_MESSAGE.test(t.message)||e.NODE_IS_RECOVERING_ERROR_MESSAGE.test(t.message))};var i=function t(t){return typeof t.code=="number"?ea.has(t.code):e.LEGACY_NOT_PRIMARY_OR_SECONDARY_ERROR_MESSAGE.test(t.message)||e.NODE_IS_RECOVERING_ERROR_MESSAGE.test(t.message)};var s=function t(t){return typeof t.code=="number"?ec.has(t.code):i(t)?!1:e.LEGACY_NOT_WRITABLE_PRIMARY_ERROR_MESSAGE.test(t.message)};var a=function e(e){return!!(typeof e.code=="number"&&el.has(e.code))};var c=function e(e){return C(e,X)||e==null?!0:i(e)||s(e)};var l=function e(e){return!!(C(e,$)&&e.message.match(/timed out/))};var h=function t(t,r){return t==null||!C(t,v)?!1:C(t,$)?!0:r!=null&&r>=9?t.code===e.MONGODB_ERROR_CODES.CursorNotFound?!0:t.hasErrorLabel(e.MongoErrorLabel.ResumableChangeStreamError):typeof t.code=="number"?e.GET_MORE_RESUMABLE_CODES.has(t.code):!1};ei();Object.defineProperty(e,"__esModule",{value:!0});e.MongoWriteConcernError=e.MongoServerSelectionError=e.MongoSystemError=e.MongoMissingDependencyError=e.MongoMissingCredentialsError=e.MongoCompatibilityError=e.MongoInvalidArgumentError=e.MongoParseError=e.MongoNetworkTimeoutError=e.MongoNetworkError=e.MongoTopologyClosedError=e.MongoCursorExhaustedError=e.MongoServerClosedError=e.MongoCursorInUseError=e.MongoOperationTimeoutError=e.MongoUnexpectedServerResponseError=e.MongoGridFSChunkError=e.MongoGridFSStreamError=e.MongoTailableCursorError=e.MongoChangeStreamError=e.MongoClientBulkWriteExecutionError=e.MongoClientBulkWriteCursorError=e.MongoClientBulkWriteError=e.MongoGCPError=e.MongoAzureError=e.MongoOIDCError=e.MongoAWSError=e.MongoKerberosError=e.MongoExpiredSessionError=e.MongoTransactionError=e.MongoNotConnectedError=e.MongoDecompressionError=e.MongoBatchReExecutionError=e.MongoStalePrimaryError=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;e.needsRetryableWriteLabel=r;e.isRetryableWriteError=o;e.isRetryableReadError=u;e.isNodeShuttingDownError=a;e.isSDAMUnrecoverableError=c;e.isNetworkTimeoutError=l;e.isResumableError=h;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"});var v=/*#__PURE__*/function(e){A(r,e);function r(e,t){f(this,r);var n;n=d(this,r,[e,t]),n.errorLabelSet=new Set;return n}p(r,[{key:"errorLabels",get:function e(){return Array.from(this.errorLabelSet)}},{key:"name",get:function e(){return"MongoError"}},{key:"errmsg",get:function e(){return this.message}},{key:"hasErrorLabel",value:function e(e){return this.errorLabelSet.has(e)}},{key:"addErrorLabel",value:function e(e){this.errorLabelSet.add(e)}}],[{key:"buildErrorMessage",value:function e(e){return typeof e=="string"?e:t(e)&&e.message.length===0?e.errors.length===0?"AggregateError has an empty errors array. Please check the `cause` property for more information.":e.errors.map(function(e){var t=e.message;return t}).join(", "):e!=null&&(typeof e==="undefined"?"undefined":j(e))=="object"&&"message"in e&&typeof e.message=="string"?e.message:"empty error message"}}]);return r}(V(Error));e.MongoError=v;var m=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);var r;var n=true,o=false,u=undefined;if(r=d(this,t,[e.message||e.errmsg||e.$err||"n/a"]),e.errorLabels)try{for(var i=e.errorLabels[Symbol.iterator](),s;!(n=(s=i.next()).done);n=true){var a=s.value;r.addErrorLabel(a)}}catch(e){o=true;u=e}finally{try{if(!n&&i.return!=null){i.return()}}finally{if(o){throw u}}}r.errorResponse=e;for(var c in e)c!=="errorLabels"&&c!=="errmsg"&&c!=="message"&&c!=="errorResponse"&&(r[c]=e[c]);return r}p(t,[{key:"name",get:function e(){return"MongoServerError"}}]);return t}(v);e.MongoServerError=m;var E=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);return d(this,t,[e,r])}p(t,[{key:"name",get:function e(){return"MongoDriverError"}}]);return t}(v);e.MongoDriverError=E;var y=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);return d(this,t,[e,r])}p(t,[{key:"name",get:function e(){return"MongoAPIError"}}]);return t}(E);e.MongoAPIError=y;var g=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);return d(this,t,[e,r])}p(t,[{key:"name",get:function e(){return"MongoRuntimeError"}}]);return t}(E);e.MongoRuntimeError=g;var S=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);return d(this,t,[e,r])}p(t,[{key:"name",get:function e(){return"MongoStalePrimaryError"}}]);return t}(g);e.MongoStalePrimaryError=S;var b=/*#__PURE__*/function(e){A(t,e);function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"This batch has already been executed, create new batch to execute";f(this,t);return d(this,t,[e])}p(t,[{key:"name",get:function e(){return"MongoBatchReExecutionError"}}]);return t}(y);e.MongoBatchReExecutionError=b;var O=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);return d(this,t,[e])}p(t,[{key:"name",get:function e(){return"MongoDecompressionError"}}]);return t}(g);e.MongoDecompressionError=O;var w=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);return d(this,t,[e])}p(t,[{key:"name",get:function e(){return"MongoNotConnectedError"}}]);return t}(y);e.MongoNotConnectedError=w;var _=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);return d(this,t,[e])}p(t,[{key:"name",get:function e(){return"MongoTransactionError"}}]);return t}(y);e.MongoTransactionError=_;var D=/*#__PURE__*/function(e){A(t,e);function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"Cannot use a session that has ended";f(this,t);return d(this,t,[e])}p(t,[{key:"name",get:function e(){return"MongoExpiredSessionError"}}]);return t}(y);e.MongoExpiredSessionError=D;var T=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);return d(this,t,[e])}p(t,[{key:"name",get:function e(){return"MongoKerberosError"}}]);return t}(g);e.MongoKerberosError=T;var F=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);return d(this,t,[e,r])}p(t,[{key:"name",get:function e(){return"MongoAWSError"}}]);return t}(g);e.MongoAWSError=F;var M=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);return d(this,t,[e])}p(t,[{key:"name",get:function e(){return"MongoOIDCError"}}]);return t}(g);e.MongoOIDCError=M;var R=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);return d(this,t,[e])}p(t,[{key:"name",get:function e(){return"MongoAzureError"}}]);return t}(M);e.MongoAzureError=R;var k=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);return d(this,t,[e])}p(t,[{key:"name",get:function e(){return"MongoGCPError"}}]);return t}(M);e.MongoGCPError=k;var I=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);var r;r=d(this,t,[e]),r.writeConcernErrors=[],r.writeErrors=new Map;return r}p(t,[{key:"name",get:function e(){return"MongoClientBulkWriteError"}}]);return t}(m);e.MongoClientBulkWriteError=I;var N=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);return d(this,t,[e])}p(t,[{key:"name",get:function e(){return"MongoClientBulkWriteCursorError"}}]);return t}(g);e.MongoClientBulkWriteCursorError=N;var P=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);return d(this,t,[e])}p(t,[{key:"name",get:function e(){return"MongoClientBulkWriteExecutionError"}}]);return t}(g);e.MongoClientBulkWriteExecutionError=P;var x=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);return d(this,t,[e])}p(t,[{key:"name",get:function e(){return"MongoChangeStreamError"}}]);return t}(g);e.MongoChangeStreamError=x;var L=/*#__PURE__*/function(e){A(t,e);function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"Tailable cursor does not support this operation";f(this,t);return d(this,t,[e])}p(t,[{key:"name",get:function e(){return"MongoTailableCursorError"}}]);return t}(y);e.MongoTailableCursorError=L;var U=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);return d(this,t,[e])}p(t,[{key:"name",get:function e(){return"MongoGridFSStreamError"}}]);return t}(g);e.MongoGridFSStreamError=U;var z=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);return d(this,t,[e])}p(t,[{key:"name",get:function e(){return"MongoGridFSChunkError"}}]);return t}(g);e.MongoGridFSChunkError=z;var W=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);return d(this,t,[e,r])}p(t,[{key:"name",get:function e(){return"MongoUnexpectedServerResponseError"}}]);return t}(g);e.MongoUnexpectedServerResponseError=W;var G=/*#__PURE__*/function(e){A(t,e);function t(){f(this,t);return d(this,t,arguments)}p(t,[{key:"name",get:function e(){return"MongoOperationTimeoutError"}}]);return t}(E);e.MongoOperationTimeoutError=G;var H=/*#__PURE__*/function(e){A(t,e);function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"Cursor is already initialized";f(this,t);return d(this,t,[e])}p(t,[{key:"name",get:function e(){return"MongoCursorInUseError"}}]);return t}(y);e.MongoCursorInUseError=H;var q=/*#__PURE__*/function(e){A(t,e);function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"Server is closed";f(this,t);return d(this,t,[e])}p(t,[{key:"name",get:function e(){return"MongoServerClosedError"}}]);return t}(y);e.MongoServerClosedError=q;var K=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);return d(this,t,[e||"Cursor is exhausted"])}p(t,[{key:"name",get:function e(){return"MongoCursorExhaustedError"}}]);return t}(y);e.MongoCursorExhaustedError=K;var Y=/*#__PURE__*/function(e){A(t,e);function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"Topology is closed";f(this,t);return d(this,t,[e])}p(t,[{key:"name",get:function e(){return"MongoTopologyClosedError"}}]);return t}(y);e.MongoTopologyClosedError=Y;var $=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);var n;n=d(this,t,[e,{cause:r===null||r===void 0?void 0:r.cause}]),n.beforeHandshake=!!(r===null||r===void 0?void 0:r.beforeHandshake);return n}p(t,[{key:"name",get:function e(){return"MongoNetworkError"}}]);return t}(v);e.MongoNetworkError=$;var J=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);return d(this,t,[e,r])}p(t,[{key:"name",get:function e(){return"MongoNetworkTimeoutError"}}]);return t}($);e.MongoNetworkTimeoutError=J;var X=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);return d(this,t,[e])}p(t,[{key:"name",get:function e(){return"MongoParseError"}}]);return t}(E);e.MongoParseError=X;var Q=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);return d(this,t,[e,r])}p(t,[{key:"name",get:function e(){return"MongoInvalidArgumentError"}}]);return t}(y);e.MongoInvalidArgumentError=Q;var Z=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);return d(this,t,[e])}p(t,[{key:"name",get:function e(){return"MongoCompatibilityError"}}]);return t}(y);e.MongoCompatibilityError=Z;var ee=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);return d(this,t,[e])}p(t,[{key:"name",get:function e(){return"MongoMissingCredentialsError"}}]);return t}(y);e.MongoMissingCredentialsError=ee;var et=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);var n;n=d(this,t,[e,r]),n.dependencyName=r.dependencyName;return n}p(t,[{key:"name",get:function e(){return"MongoMissingDependencyError"}}]);return t}(y);e.MongoMissingDependencyError=et;var er=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);var o;var u;r&&r.error?o=d(this,t,[v.buildErrorMessage(r.error.message||r.error),{cause:r.error}]):o=d(this,t,[e]),r&&(n(o).reason=r),n(o).code=(u=r.error)===null||u===void 0?void 0:u.code;return n(o)}p(t,[{key:"name",get:function e(){return"MongoSystemError"}}]);return t}(v);e.MongoSystemError=er;var en=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);return d(this,t,[e,r])}p(t,[{key:"name",get:function e(){return"MongoServerSelectionError"}}]);return t}(er);e.MongoServerSelectionError=en;var eo=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);var r;r=d(this,t,[B({},e.writeConcernError,e)]),r.errInfo=e.writeConcernError.errInfo,r.result=e;return r}p(t,[{key:"name",get:function e(){return"MongoWriteConcernError"}}]);return t}(m);e.MongoWriteConcernError=eo;var eu=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]),es=eu;var ea=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]),ec=new Set([e.MONGODB_ERROR_CODES.NotWritablePrimary,e.MONGODB_ERROR_CODES.NotPrimaryNoSecondaryOk,e.MONGODB_ERROR_CODES.LegacyNotPrimary]),el=new Set([e.MONGODB_ERROR_CODES.InterruptedAtShutdown,e.MONGODB_ERROR_CODES.ShutdownInProgress])});var el=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.ReadPreference=e.ReadPreferenceMode=void 0;var t=ec();e.ReadPreferenceMode=Object.freeze({primary:"primary",primaryPreferred:"primaryPreferred",secondary:"secondary",secondaryPreferred:"secondaryPreferred",nearest:"nearest"});var r=/*#__PURE__*/function(){function e(r,n,o){f(this,e);if(!e.isValid(r))throw new t.MongoInvalidArgumentError("Invalid read preference mode ".concat(JSON.stringify(r)));if(o==null&&(typeof n==="undefined"?"undefined":j(n))=="object"&&!Array.isArray(n))o=n,n=void 0;else if(n&&!Array.isArray(n))throw new t.MongoInvalidArgumentError("ReadPreference tags must be an array");if(this.mode=r,this.tags=n,this.hedge=o===null||o===void 0?void 0:o.hedge,this.maxStalenessSeconds=void 0,this.minWireVersion=void 0,o=o!==null&&o!==void 0?o:{},o.maxStalenessSeconds!=null){if(o.maxStalenessSeconds<=0)throw new t.MongoInvalidArgumentError("maxStalenessSeconds must be a positive integer");this.maxStalenessSeconds=o.maxStalenessSeconds,this.minWireVersion=5}if(this.mode===e.PRIMARY){if(this.tags&&Array.isArray(this.tags)&&this.tags.length>0)throw new t.MongoInvalidArgumentError("Primary read preference cannot be combined with tags");if(this.maxStalenessSeconds)throw new t.MongoInvalidArgumentError("Primary read preference cannot be combined with maxStalenessSeconds");if(this.hedge)throw new t.MongoInvalidArgumentError("Primary read preference cannot be combined with hedge")}}p(e,[{key:"preference",get:function e(){return this.mode}},{key:"isValid",value:function t(t){return e.isValid(typeof t=="string"?t:this.mode)}},{key:"secondaryOk",value:function t(){return new Set([e.PRIMARY_PREFERRED,e.SECONDARY,e.SECONDARY_PREFERRED,e.NEAREST]).has(this.mode)}},{key:"equals",value:function e(e){return e.mode===this.mode}},{key:"toJSON",value:function e(){var e={mode:this.mode};return Array.isArray(this.tags)&&(e.tags=this.tags),this.maxStalenessSeconds&&(e.maxStalenessSeconds=this.maxStalenessSeconds),this.hedge&&(e.hedge=this.hedge),e}}],[{key:"fromString",value:function t(t){return new e(t)}},{key:"fromOptions",value:function t(t){var r;if(!t)return;var n;var o=(n=t.readPreference)!==null&&n!==void 0?n:(r=t.session)===null||r===void 0?void 0:r.transaction.options.readPreference,u=t.readPreferenceTags;if(o!=null){if(typeof o=="string")return new e(o,u,{maxStalenessSeconds:t.maxStalenessSeconds,hedge:t.hedge});if(!C(o,e)&&(typeof o==="undefined"?"undefined":j(o))=="object"){var i=o.mode||o.preference;var s;if(i&&typeof i=="string")return new e(i,(s=o.tags)!==null&&s!==void 0?s:u,{maxStalenessSeconds:o.maxStalenessSeconds,hedge:t.hedge})}return u&&(o.tags=u),o}}},{key:"translate",value:function r(r){if(r.readPreference==null)return r;var n=r.readPreference;if(typeof n=="string")r.readPreference=new e(n);else if(n&&!C(n,e)&&(typeof n==="undefined"?"undefined":j(n))=="object"){var o=n.mode||n.preference;o&&typeof o=="string"&&(r.readPreference=new e(o,n.tags,{maxStalenessSeconds:n.maxStalenessSeconds}))}else if(!C(n,e))throw new t.MongoInvalidArgumentError("Invalid read preference: ".concat(n));return r}},{key:"isValid",value:function t(t){return new Set([e.PRIMARY,e.PRIMARY_PREFERRED,e.SECONDARY,e.SECONDARY_PREFERRED,e.NEAREST,null]).has(t)}}]);return e}();e.ReadPreference=r;r.PRIMARY=e.ReadPreferenceMode.primary;r.PRIMARY_PREFERRED=e.ReadPreferenceMode.primaryPreferred;r.SECONDARY=e.ReadPreferenceMode.secondary;r.SECONDARY_PREFERRED=e.ReadPreferenceMode.secondaryPreferred;r.NEAREST=e.ReadPreferenceMode.nearest;r.primary=new r(e.ReadPreferenceMode.primary);r.primaryPreferred=new r(e.ReadPreferenceMode.primaryPreferred);r.secondary=new r(e.ReadPreferenceMode.secondary);r.secondaryPreferred=new r(e.ReadPreferenceMode.secondaryPreferred);r.nearest=new r(e.ReadPreferenceMode.nearest)});var ed=et(function(e){"use strict";var t=function e(e,t){(e.clusterTime==null||t.clusterTime.greaterThan(e.clusterTime.clusterTime))&&(e.clusterTime=t)};ei();Object.defineProperty(e,"__esModule",{value:!0});e.ServerType=e.TopologyType=e.STATE_CONNECTED=e.STATE_CONNECTING=e.STATE_CLOSED=e.STATE_CLOSING=void 0;e._advanceClusterTime=t;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"})});var ef=et(function(e){"use strict";var t=function e(){return function(e,t){return s(e,t.filter(function(e){return e.isWritable}))}};var r=function e(e){return function(t,r){return e?r.filter(function(t){return t.address===e.address&&t.type!==m.ServerType.Unknown}):[]}};var n=function t(t,r){return!r||!t||t&&t<e.MIN_SECONDARY_WRITE_WIRE_VERSION?h(p.ReadPreference.primary):h(r)};var o=function e(e,t,r){if(e.maxStalenessSeconds==null||e.maxStalenessSeconds<0)return r;var n=e.maxStalenessSeconds,o=(t.heartbeatFrequencyMS+E)/1e3;if(n<o)throw new v.MongoInvalidArgumentError('Option "maxStalenessSeconds" must be at least '.concat(o," seconds"));if(n<y)throw new v.MongoInvalidArgumentError('Option "maxStalenessSeconds" must be at least '.concat(y," seconds"));if(t.type===m.TopologyType.ReplicaSetWithPrimary){var u=Array.from(t.servers.values()).filter(a)[0];return r.reduce(function(r,n){var o;var i=(n.lastUpdateTime-n.lastWriteDate-(u.lastUpdateTime-u.lastWriteDate)+t.heartbeatFrequencyMS)/1e3,s=(o=e.maxStalenessSeconds)!==null&&o!==void 0?o:0;return i<=s&&r.push(n),r},[])}if(t.type===m.TopologyType.ReplicaSetNoPrimary){if(r.length===0)return r;var i=r.reduce(function(e,t){return t.lastWriteDate>e.lastWriteDate?t:e});return r.reduce(function(r,n){var o;var u=(i.lastWriteDate-n.lastWriteDate+t.heartbeatFrequencyMS)/1e3,s=(o=e.maxStalenessSeconds)!==null&&o!==void 0?o:0;return u<=s&&r.push(n),r},[])}return r};var u=function e(e,t){var r=Object.keys(e),n=Object.keys(t);for(var o=0;o<r.length;++o){var u=r[o];if(n.indexOf(u)===-1||t[u]!==e[u])return!1}return!0};var i=function e(e,t){var r=function(r){var n=e.tags[r],o=t.reduce(function(e,t){return u(n,t.tags)&&e.push(t),e},[]);if(o.length)return{v:o}};if(e.tags==null||Array.isArray(e.tags)&&e.tags.length===0)return t;for(var n=0;n<e.tags.length;++n){var o=r(n);if(j(o)==="object")return o.v}return[]};var s=function e(e,t){var r=t.reduce(function(e,t){return Math.min(t.roundTripTime,e)},1/0),n=r+e.localThresholdMS;return t.reduce(function(e,t){return t.roundTripTime<=n&&t.roundTripTime>=r&&e.push(t),e},[])};var a=function e(e){return e.type===m.ServerType.RSPrimary};var c=function e(e){return e.type===m.ServerType.RSSecondary};var l=function e(e){return e.type===m.ServerType.RSSecondary||e.type===m.ServerType.RSPrimary};var d=function e(e){return e.type!==m.ServerType.Unknown};var f=function e(e){return e.type===m.ServerType.LoadBalancer};var h=function e(e){if(!e.isValid())throw new v.MongoInvalidArgumentError("Invalid read preference specified");return function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];var u=t.commonWireVersion;if(u&&e.minWireVersion&&e.minWireVersion>u)throw new v.MongoCompatibilityError("Minimum wire version '".concat(e.minWireVersion,"' required, but found '").concat(u,"'"));if(t.type===m.TopologyType.LoadBalanced)return r.filter(f);if(t.type===m.TopologyType.Unknown)return[];if(t.type===m.TopologyType.Single)return s(t,r.filter(d));if(t.type===m.TopologyType.Sharded){var h=r.filter(function(e){return!n.includes(e)}),E=h.length>0?h:n;return s(t,E.filter(d))}var y=e.mode;if(y===p.ReadPreference.PRIMARY)return r.filter(a);if(y===p.ReadPreference.PRIMARY_PREFERRED){var g=r.filter(a);if(g.length)return g}var A=y===p.ReadPreference.NEAREST?l:c,C=s(t,i(e,o(e,t,r.filter(A))));return y===p.ReadPreference.SECONDARY_PREFERRED&&C.length===0?r.filter(a):C}};ei();Object.defineProperty(e,"__esModule",{value:!0});e.MIN_SECONDARY_WRITE_WIRE_VERSION=void 0;e.writableServerSelector=t;e.sameServerSelector=r;e.secondaryWritableServerSelector=n;e.readPreferenceServerSelector=h;var v=ec(),p=el(),m=ed(),E=1e4,y=90;e.MIN_SECONDARY_WRITE_WIRE_VERSION=13});var eh=et(function(e){"use strict";ei();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="4.0";e.MAX_SUPPORTED_SERVER_VERSION="8.0";e.MIN_SUPPORTED_WIRE_VERSION=7;e.MAX_SUPPORTED_WIRE_VERSION=25;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});var ev=et(function(e){"use strict";ei();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].concat(U(e.CMAP_EVENTS)));e.LOCAL_SERVER_EVENTS=Object.freeze([e.CONNECT,e.DESCRIPTION_RECEIVED,e.CLOSED,e.ENDED]);e.MONGO_CLIENT_EVENTS=Object.freeze(U(e.CMAP_EVENTS).concat(U(e.APM_EVENTS),U(e.TOPOLOGY_EVENTS),U(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")});var ep=et(function(e){"use strict";ei();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 t=/*#__PURE__*/function(){function t(r){f(this,t);var n;this.level=(n=e.ReadConcernLevel[r])!==null&&n!==void 0?n:r}p(t,[{key:"toJSON",value:function e(){return{level:this.level}}}],[{key:"fromOptions",value:function e(e){if(e!=null){if(e.readConcern){var r=e.readConcern;if(C(r,t))return r;if(typeof r=="string")return new t(r);if("level"in r&&r.level)return new t(r.level)}if(e.level)return new t(e.level)}}},{key:"MAJORITY",get:function t(){return e.ReadConcernLevel.majority}},{key:"AVAILABLE",get:function t(){return e.ReadConcernLevel.available}},{key:"LINEARIZABLE",get:function t(){return e.ReadConcernLevel.linearizable}},{key:"SNAPSHOT",get:function t(){return e.ReadConcernLevel.snapshot}}]);return t}();e.ReadConcern=t});var em=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.OnDemandDocument=void 0;var t=ea(),r=/*#__PURE__*/function(){function e(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,u=arguments.length>3?arguments[3]:void 0;f(this,e);this.bson=r,this.offset=n,this.isArray=o,this.cache=Object.create(null),this.indexFound=Object.create(null),this.elements=u!==null&&u!==void 0?u:(0,t.parseToElementsToArray)(this.bson,n)}p(e,[{key:"isElementName",value:function e(e,t){var r=t[2],n=t[1];if(e.length!==r)return!1;var o=n+r;for(var u=n,i=0;i<e.length&&u<o;i++,u++)if(this.bson[u]!==e.charCodeAt(i))return!1;return!0}},{key:"getElement",value:function e(e){var t=this.cache[e];if(t===!1)return null;if(t!=null)return t;if(typeof e=="number")if(this.isArray)if(e<this.elements.length){var r={element:this.elements[e],value:void 0};return this.cache[e]=r,this.indexFound[e]=!0,r}else return null;else return null;for(var n=0;n<this.elements.length;n++){var o=this.elements[n];if(!(n in this.indexFound)&&this.isElementName(e,o)){var u={element:o,value:void 0};return this.cache[e]=u,this.indexFound[n]=!0,u}}return this.cache[e]=!1,null}},{key:"toJSValue",value:function r(r,n){var o=r[0],u=r[3],i=r[4];if(n!==o)return null;switch(n){case t.BSONType.null:case t.BSONType.undefined:return null;case t.BSONType.double:return(0,t.getFloat64LE)(this.bson,u);case t.BSONType.int:return(0,t.getInt32LE)(this.bson,u);case t.BSONType.long:return(0,t.getBigInt64LE)(this.bson,u);case t.BSONType.bool:return!!this.bson[u];case t.BSONType.objectId:return new t.ObjectId(this.bson.subarray(u,u+12));case t.BSONType.timestamp:return new t.Timestamp((0,t.getBigInt64LE)(this.bson,u));case t.BSONType.string:return(0,t.toUTF8)(this.bson,u+4,u+i-1,!1);case t.BSONType.binData:{var s=(0,t.getInt32LE)(this.bson,u),a=this.bson[u+4];if(a===2){var c=(0,t.getInt32LE)(this.bson,u+1+4);if(c<0)throw new t.BSONError("Negative binary type element size found for subtype 0x02");if(c>s-4)throw new t.BSONError("Binary type with subtype 0x02 contains too long binary size");if(c<s-4)throw new t.BSONError("Binary type with subtype 0x02 contains too short binary size");return new t.Binary(this.bson.subarray(u+1+4+4,u+1+4+4+c),2)}return new t.Binary(this.bson.subarray(u+1+4,u+1+4+s),a)}case t.BSONType.date:return new Date(Number((0,t.getBigInt64LE)(this.bson,u)));case t.BSONType.object:return new e(this.bson,u);case t.BSONType.array:return new e(this.bson,u,!0);default:throw new t.BSONError("Unsupported BSON type: ".concat(n))}}},{key:"size",value:function e(){return this.elements.length}},{key:"has",value:function e(e){var t=this.cache[e];return t===!1?!1:t!=null?!0:this.getElement(e)!=null}},{key:"get",value:function e(e,r,n){var o=this.getElement(e);if(o==null){if(n===!0)throw new t.BSONError('BSON element "'.concat(e,'" is missing'));return null}if(o.value==null){var u=this.toJSValue(o.element,r);if(u==null){if(n===!0)throw new t.BSONError('BSON element "'.concat(e,'" is missing'));return null}o.value=u}return o.value}},{key:"getNumber",value:function e(e,r){var n,o;var u=this.get(e,t.BSONType.bool),i=u==null?null:u?1:0,s=this.get(e,t.BSONType.long),a=s==null?null:Number(s),c=(o=(n=i!==null&&i!==void 0?i:a)!==null&&n!==void 0?n:this.get(e,t.BSONType.int))!==null&&o!==void 0?o:this.get(e,t.BSONType.double);if(r===!0&&c==null)throw new t.BSONError('BSON element "'.concat(e,'" is missing'));return c}},{key:"toObject",value:function e(e){return(0,t.deserialize)(this.bson,F(B({},e),{index:this.offset,allowObjectSmallerThanBufferSize:!0}))}},{key:"toBytes",value:function e(){var e=(0,t.getInt32LE)(this.bson,this.offset);return this.bson.subarray(this.offset,this.offset+e)}}]);return e}();e.OnDemandDocument=r});var eE=et(function(e){"use strict";var t=function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];if(n[2]===2){var o=n[1];if(e[o]===111&&e[o+1]===107){var u=n[3],i=n[4];for(var s=u;s<u+i;s++)if(e[s]!==0)return!1;return!0}}}return!0};ei();Object.defineProperty(e,"__esModule",{value:!0});e.ClientBulkWriteCursorResponse=e.ExplainedCursorResponse=e.CursorResponse=e.MongoDBResponse=void 0;e.isErrorResponse=t;var r=ea(),n=ec(),o=eg(),u=em();var i=/*#__PURE__*/function(e){A(o,e);function o(){f(this,o);return d(this,o,arguments)}p(o,[{key:"get",value:function e(e,t,r){try{return y(g(o.prototype),"get",this).call(this,e,t,r)}catch(e){throw new n.MongoUnexpectedServerResponseError(e.message,{cause:e})}}},{key:"isMaxTimeExpiredError",get:function e(){var e;if(this.ok===0&&this.code===n.MONGODB_ERROR_CODES.MaxTimeMSExpired)return!0;if(this.ok===0)return!1;if(((e=this.get("writeConcernError",r.BSONType.object))===null||e===void 0?void 0:e.getNumber("code"))===n.MONGODB_ERROR_CODES.MaxTimeMSExpired)return!0;var t=this.get("writeErrors",r.BSONType.array);if(t===null||t===void 0?void 0:t.size()){var o;for(var u=0;u<t.size();u++)if(((o=t.get(u,r.BSONType.object))===null||o===void 0?void 0:o.getNumber("code"))===n.MONGODB_ERROR_CODES.MaxTimeMSExpired)return!0}return!1}},{key:"recoveryToken",get:function e(){var e;var t;return(t=(e=this.get("recoveryToken",r.BSONType.object))===null||e===void 0?void 0:e.toObject({promoteValues:!1,promoteLongs:!1,promoteBuffers:!1,validation:{utf8:!0}}))!==null&&t!==void 0?t:null}},{key:"atClusterTime",get:function e(){var e;var t;return(t=(e=this.get("cursor",r.BSONType.object))===null||e===void 0?void 0:e.get("atClusterTime",r.BSONType.timestamp))!==null&&t!==void 0?t:this.get("atClusterTime",r.BSONType.timestamp)}},{key:"operationTime",get:function e(){return this.get("operationTime",r.BSONType.timestamp)}},{key:"ok",get:function e(){return this.getNumber("ok")?1:0}},{key:"$err",get:function e(){return this.get("$err",r.BSONType.string)}},{key:"errmsg",get:function e(){return this.get("errmsg",r.BSONType.string)}},{key:"code",get:function e(){return this.getNumber("code")}},{key:"$clusterTime",get:function e(){if(!("clusterTime"in this)){var e;var t=this.get("$clusterTime",r.BSONType.object);if(t==null)return this.clusterTime=null,null;var n=t.get("clusterTime",r.BSONType.timestamp,!0),o=(e=t.get("signature",r.BSONType.object))===null||e===void 0?void 0:e.toObject();this.clusterTime={clusterTime:n,signature:o}}var u;return(u=this.clusterTime)!==null&&u!==void 0?u:null}},{key:"toObject",value:function e(e){var t=F(B({},(0,r.pluckBSONSerializeOptions)(e!==null&&e!==void 0?e:{})),{validation:(0,r.parseUtf8ValidationOption)(e)});return y(g(o.prototype),"toObject",this).call(this,t)}}],[{key:"is",value:function e(e){return C(e,o)}},{key:"make",value:function e(e){var n=(0,r.parseToElementsToArray)(e,0);return t(e,n)?new o(e,0,!1,n):new this(e,0,!1,n)}}]);return o}(u.OnDemandDocument);e.MongoDBResponse=i;i.empty=new i(new Uint8Array([13,0,0,0,16,111,107,0,1,0,0,0,0]));var s=/*#__PURE__*/function(e){A(t,e);function t(){f(this,t);var e;e=d(this,t,arguments),e._batch=null,e.iterated=0,e._encryptedBatch=null;return e}p(t,[{key:"cursor",get:function e(){return this.get("cursor",r.BSONType.object,!0)}},{key:"id",get:function e(){try{return r.Long.fromBigInt(this.cursor.get("id",r.BSONType.long,!0))}catch(e){throw new n.MongoUnexpectedServerResponseError(e.message,{cause:e})}}},{key:"ns",get:function e(){var e=this.cursor.get("ns",r.BSONType.string);return e!=null?(0,o.ns)(e):null}},{key:"length",get:function e(){return Math.max(this.batchSize-this.iterated,0)}},{key:"encryptedBatch",get:function e(){var e;if(this.encryptedResponse==null)return null;if(this._encryptedBatch!=null)return this._encryptedBatch;var t=(e=this.encryptedResponse)===null||e===void 0?void 0:e.get("cursor",r.BSONType.object);if(t===null||t===void 0?void 0:t.has("firstBatch"))this._encryptedBatch=t.get("firstBatch",r.BSONType.array,!0);else if(t===null||t===void 0?void 0:t.has("nextBatch"))this._encryptedBatch=t.get("nextBatch",r.BSONType.array,!0);else throw new n.MongoUnexpectedServerResponseError("Cursor document did not contain a batch");return this._encryptedBatch}},{key:"batch",get:function e(){if(this._batch!=null)return this._batch;var e=this.cursor;if(e.has("firstBatch"))this._batch=e.get("firstBatch",r.BSONType.array,!0);else if(e.has("nextBatch"))this._batch=e.get("nextBatch",r.BSONType.array,!0);else throw new n.MongoUnexpectedServerResponseError("Cursor document did not contain a batch");return this._batch}},{key:"batchSize",get:function e(){var e;return(e=this.batch)===null||e===void 0?void 0:e.size()}},{key:"postBatchResumeToken",get:function e(){var e;var t;return(t=(e=this.cursor.get("postBatchResumeToken",r.BSONType.object))===null||e===void 0?void 0:e.toObject({promoteValues:!1,promoteLongs:!1,promoteBuffers:!1,validation:{utf8:!0}}))!==null&&t!==void 0?t:null}},{key:"shift",value:function e(e){var t;if(this.iterated>=this.batchSize)return null;var n,u;var i=(n=this.batch.get(this.iterated,r.BSONType.object,!0))!==null&&n!==void 0?n:null,s=(u=(t=this.encryptedBatch)===null||t===void 0?void 0:t.get(this.iterated,r.BSONType.object,!0))!==null&&u!==void 0?u:null;if(this.iterated+=1,e===null||e===void 0?void 0:e.raw)return i.toBytes();{var a=i.toObject(e);return s&&(0,o.decorateDecryptionResult)(a,s.toObject(e),!0),a}}},{key:"clear",value:function e(){this.iterated=this.batchSize}}],[{key:"is",value:function e(e){return C(e,t)||e===t.emptyGetMore}}]);return t}(i);e.CursorResponse=s;s.emptyGetMore={id:new r.Long(0),length:0,shift:function(){return null}};var a=/*#__PURE__*/function(e){A(t,e);function t(){f(this,t);var e;e=d(this,t,arguments),e.isExplain=!0,e._length=1;return e}p(t,[{key:"id",get:function e(){return r.Long.fromBigInt(0n)}},{key:"batchSize",get:function e(){return 0}},{key:"ns",get:function e(){return null}},{key:"length",get:function e(){return this._length}},{key:"shift",value:function e(e){return this._length===0?null:(this._length-=1,this.toObject(e))}}]);return t}(s);e.ExplainedCursorResponse=a;var c=/*#__PURE__*/function(e){A(t,e);function t(){f(this,t);return d(this,t,arguments)}p(t,[{key:"insertedCount",get:function e(){return this.get("nInserted",r.BSONType.int,!0)}},{key:"upsertedCount",get:function e(){return this.get("nUpserted",r.BSONType.int,!0)}},{key:"matchedCount",get:function e(){return this.get("nMatched",r.BSONType.int,!0)}},{key:"modifiedCount",get:function e(){return this.get("nModified",r.BSONType.int,!0)}},{key:"deletedCount",get:function e(){return this.get("nDeleted",r.BSONType.int,!0)}},{key:"writeConcernError",get:function e(){return this.get("writeConcernError",r.BSONType.object,!1)}}]);return t}(s);e.ClientBulkWriteCursorResponse=c});var ey=et(function(e){"use strict";var t=function e(e){if((typeof e==="undefined"?"undefined":j(e))=="object"&&e!=null){var t=r.MongoDBResponse.is(e)&&e.has("writeConcernError")?e.toObject():!r.MongoDBResponse.is(e)&&"writeConcernError"in e?e:null;if(t!=null)throw new n.MongoWriteConcernError(t)}};ei();Object.defineProperty(e,"__esModule",{value:!0});e.WriteConcern=e.WRITE_CONCERN_KEYS=void 0;e.throwIfWriteConcernError=t;var r=eE(),n=ec();e.WRITE_CONCERN_KEYS=["w","wtimeout","j","journal","fsync"];var o=/*#__PURE__*/function(){function e(t,r,n,o){f(this,e);t!=null&&(Number.isNaN(Number(t))?this.w=t:this.w=Number(t)),r!=null&&(this.wtimeoutMS=this.wtimeout=r),n!=null&&(this.journal=this.j=n),o!=null&&(this.journal=this.j=!!o)}p(e,null,[{key:"apply",value:function e(e,t){var r={};return t.w!=null&&(r.w=t.w),t.wtimeoutMS!=null&&(r.wtimeout=t.wtimeoutMS),t.journal!=null&&(r.j=t.j),e.writeConcern=r,e}},{key:"fromOptions",value:function t(t,r){if(t==null)return;r=r!==null&&r!==void 0?r:{};var n;typeof t=="string"||typeof t=="number"?n={w:t}:C(t,e)?n=t:n=t.writeConcern;var o=C(r,e)?r:r.writeConcern,u=B({},o,n),i=u.w,s=i===void 0?void 0:i,a=u.wtimeout,c=a===void 0?void 0:a,l=u.j,d=l===void 0?void 0:l,f=u.fsync,h=f===void 0?void 0:f,v=u.journal,p=v===void 0?void 0:v,m=u.wtimeoutMS,E=m===void 0?void 0:m;if(s!=null||c!=null||E!=null||d!=null||p!=null||h!=null)return new e(s,c!==null&&c!==void 0?c:E,d!==null&&d!==void 0?d:p,h)}}]);return e}();e.WriteConcern=o});var eg=et(function(e){"use strict";var t=function e(e){return e!=null&&(typeof e==="undefined"?"undefined":j(e))=="object"&&Symbol.toStringTag in e&&e[Symbol.toStringTag]==="Uint8Array"};var r=function e(e,t){var r=true,n=false,o=undefined;try{for(var u=t[Symbol.iterator](),i;!(r=(i=u.next()).done);r=true){var s=i.value;if(e===s||s.startsWith("*.")&&(e===null||e===void 0?void 0:e.endsWith(s.substring(2,s.length)))||s.startsWith("*/")&&(e===null||e===void 0?void 0:e.endsWith(s.substring(2,s.length))))return!0}}catch(e){n=true;o=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw o}}}return!1};var n=function e(e){var t;if(typeof e=="string")t=e;else if(Array.isArray(e))t={},e.forEach(function(e){t[e]=1});else if(e!=null&&(typeof e==="undefined"?"undefined":j(e))=="object"){t={};for(var r in e)t[r]=e[r]}return t};var o=function e(e){return ek(e)==="[object Object]"};var u=function e(e,t){return B({},e,t)};var i=function e(e,t){var r={};for(var n in e)t.includes(n)&&(r[n]=e[n]);return r};var s=function e(e,t){var r;return t&&((r=t.s.options)===null||r===void 0?void 0:r.retryWrites)&&(e.retryWrites=!0),e};var c=function e(e){return e!=null&&(typeof e==="undefined"?"undefined":j(e))=="object"&&"then"in e&&typeof e.then=="function"};var l=function e(e,t,r){var n=v(t).capabilities;if(r.collation&&j(r.collation)=="object")if(n&&n.commandsTakeCollation)e.collation=r.collation;else throw new eB.MongoCompatibilityError("Current topology does not support collation")};var h=function e(e,t,r){if(r&&r.session&&r.session.inTransaction())return;var n=Object.assign({},e.readConcern||{});t.s.readConcern&&Object.assign(n,t.s.readConcern),Object.keys(n).length>0&&Object.assign(e,{readConcern:n})};var v=function e(e){if("topology"in e&&e.topology)return e.topology;if("client"in e&&e.client.topology)return e.client.topology;throw new eB.MongoNotConnectedError("MongoClient must be connected to perform this operation")};var E=function e(e){return eI.fromString(e)};var C=function e(){var e,t,r;var n=arguments;return H(this,function(o){switch(o.label){case 0:e=n.length>0&&n[0]!==void 0?n[0]:0;t=e;o.label=1;case 1:r=t;t+=1;return[4,r];case 2:o.sent();o.label=3;case 3:return[3,1];case 4:return[2]}})};var S=function e(){var e=eE.randomBytes(16);return e[6]=e[6]&15|64,e[8]=e[8]&63|128,e};var b=function e(e){if(e){var t;if(e.loadBalanced||((t=e.serverApi)===null||t===void 0?void 0:t.version))return e_.MAX_SUPPORTED_WIRE_VERSION;if(e.hello)return e.hello.maxWireVersion;if("lastHello"in e&&typeof e.lastHello=="function"){var r=e.lastHello();if(r)return r.maxWireVersion}if(e.description&&"maxWireVersion"in e.description&&e.description.maxWireVersion!=null)return e.description.maxWireVersion}return 0};var O=function e(e,t){return!Array.isArray(e)||!Array.isArray(t)?!1:e.length===t.length&&e.every(function(e,r){return e===t[r]})};var w=function e(e,t){return e===t?!0:!e||!t?e===t:!(e==null&&t!=null||e!=null&&t==null||e.constructor.name!==t.constructor.name||e.message!==t.message)};var _=function e(e){return function(t,r){var n=e[t.s.state];if(n&&n.indexOf(r)<0)throw new eB.MongoRuntimeError("illegal state transition from [".concat(t.s.state,"] => [").concat(r,"], allowed: [").concat(n,"]"));t.emit("stateChanged",t.s.state,r),t.s.state=r}};var D=function e(){var e=process.hrtime();return Math.floor(e[0]*1e3+e[1]/1e6)};var T=function e(e){if(typeof e!="number")return-1;var t=D()-e;return t<0?0:t};var M=function e(e,t){var r=e.s.options,n=r.socketTimeoutMS,o=r.serverSelectionTimeoutMS,u=r.waitQueueTimeoutMS,i=r.timeoutMS;return B({socketTimeoutMS:n,serverSelectionTimeoutMS:o,waitQueueTimeoutMS:u,timeoutMS:i},t)};var R=function e(e,t){var r;var n=Object.assign({},t,(0,ew.resolveBSONOptions)(t,e)),o=(r=t===null||t===void 0?void 0:t.timeoutMS)!==null&&r!==void 0?r:e===null||e===void 0?void 0:e.timeoutMS,u=t===null||t===void 0?void 0:t.session;if(!(u===null||u===void 0?void 0:u.inTransaction())){var i;var s=(i=eT.ReadConcern.fromOptions(t))!==null&&i!==void 0?i:e===null||e===void 0?void 0:e.readConcern;s&&(n.readConcern=s);var a;var c=(a=eR.WriteConcern.fromOptions(t))!==null&&a!==void 0?a:e===null||e===void 0?void 0:e.writeConcern;c&&(o!=null&&(c=eR.WriteConcern.fromOptions({writeConcern:F(B({},c),{wtimeout:void 0,wtimeoutMS:void 0})})),n.writeConcern=c)}n.timeoutMS=o;var l;var d=(l=eF.ReadPreference.fromOptions(t))!==null&&l!==void 0?l:e===null||e===void 0?void 0:e.readPreference;if(d&&(n.readPreference=d),(u===null||u===void 0?void 0:u.explicit)&&(u===null||u===void 0?void 0:u.timeoutContext)!=null&&(t===null||t===void 0?void 0:t.timeoutMS)!=null)throw new eB.MongoInvalidArgumentError("An operation cannot be given a timeoutMS setting when inside a withTransaction call that has a timeoutMS setting");return n};var k=function e(e,t){e=Array.isArray(e)?new Set(e):e,t=Array.isArray(t)?new Set(t):t;var r=true,n=false,o=undefined;try{for(var u=t[Symbol.iterator](),i;!(r=(i=u.next()).done);r=true){var s=i.value;if(!e.has(s))return!1}}catch(e){n=true;o=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw o}}}return!0};var I=function e(e){return!!(e[eD.LEGACY_HELLO_COMMAND]||e.hello)};var N=function e(e,t){var r=new Set(e);var n=true,o=false,u=undefined;try{for(var i=t[Symbol.iterator](),s;!(n=(s=i.next()).done);n=true){var a=s.value;r.delete(a)}}catch(e){o=true;u=e}finally{try{if(!n&&i.return!=null){i.return()}}finally{if(o){throw u}}}return r};var P=function e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0;if(!o(e))return!1;var r=e.constructor;if(r&&r.prototype&&(!o(r.prototype)||!ex(r.prototype,"isPrototypeOf")))return!1;if(t){var n=Object.keys(e);return k(n,t)}return!0};var x=function t(t){return process.emitWarning(t,{code:e.MONGODB_WARNING_CODE})};var U=function e(e){if(!ez.has(e))return ez.add(e),x(e)};var z=function e(e){return Object.values(e).join(", ")};var W=function e(e){return e?!!(e.loadBalanced||e.description.logicalSessionTimeoutMinutes!=null&&e.description.type!==eM.ServerType.Standalone):!1};var V=function e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;var r=Array.from(e);if(t>r.length)throw new eB.MongoRuntimeError("Limit must be less than the number of items");var n=r.length,o=t%r.length===0?1:r.length-t;for(;n>o;){var u=Math.floor(Math.random()*n);n-=1;var i=r[n];r[n]=r[u],r[u]=i}return t%r.length===0?r:r.slice(o)};var G=function e(e){return!!(e.aggregate||e.count||e.distinct||e.find||e.geoNear)};var q=function t(t,r){return t==null&&r==null?0:t==null?-1:r==null?1:e.ByteUtils.compare(t.id,r.id)};var K=function e(e){if(typeof e=="number")return Math.trunc(e);var t=Number.parseInt(String(e),10);return Number.isNaN(t)?null:t};var Y=function e(e){var t=K(e);return t!=null&&t>=0?t:null};var $=function e(e,t){var r=e.endsWith(".")?e.slice(0,e.length-1):e,n=t.endsWith(".")?t.slice(0,t.length-1):t,o=/^.*?\./,u=n.split(".").length<3,i=".".concat(r.replace(o,"")),s=u?n:".".concat(n.replace(o,""));if(s.startsWith(".")||(s="."+s),u&&r.split(".").length<=n.split(".").length)throw new eB.MongoAPIError("Server record does not have at least one more domain level than parent URI");if(!i.endsWith(s))throw new eB.MongoAPIError("Server record does not share hostname with parent URI")};var J=function e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(r,n){var o,u=eA.get(e,t,function(e){e.setEncoding("utf8");var t="";e.on("data",function(e){return t+=e}),e.on("end",function(){(0,eC.clearTimeout)(o),r({status:e.statusCode,body:t})})}).on("error",function(e){(0,eC.clearTimeout)(o),n(e)}).end();o=(0,eC.setTimeout)(function(){u.destroy(new eB.MongoNetworkTimeoutError("request timed out after 10 seconds"))},1e4)})};var X=function e(e){return eW.apply(this,arguments)};var Q=function e(e,t){return!!(t&&e.test(t.toLowerCase()))};var ee=function e(){var e,t;return{promise:new Promise(function(r,n){e=r,t=n}),resolve:e,reject:t}};var et=function e(e){};var er=function e(e,t,r){return eV.apply(this,arguments)};var en=function e(e,t,r){var n;if((typeof r.forceServerObjectId=="boolean"?r.forceServerObjectId:(n=e.s.db.options)===null||n===void 0?void 0:n.forceServerObjectId)===!0)return t;var o=function(t){return t._id==null&&(t._id=e.s.pkFactory.createPk()),t};return Array.isArray(t)?t.map(o):o(t)};var eo=function e(e,t){return eG.apply(this,arguments)};var eu=function e(e,t){return e===0?t:t===0?e:Math.min(e,t)};var es=function e(){};var ef=function t(t,r){if(t!=null)return t.addEventListener("abort",r,{once:!0}),m({},e.kDispose,function(){return t.removeEventListener("abort",r)})};var em=function e(e,t){return eK.apply(this,arguments)};ei();Object.defineProperty(e,"__esModule",{value:!0});e.kDispose=e.randomBytes=e.COSMOS_DB_MSG=e.DOCUMENT_DB_MSG=e.COSMOS_DB_CHECK=e.DOCUMENT_DB_CHECK=e.MONGODB_WARNING_CODE=e.DEFAULT_PK_FACTORY=e.HostAddress=e.BufferPool=e.List=e.MongoDBCollectionNamespace=e.MongoDBNamespace=e.ByteUtils=void 0;e.isUint8Array=t;e.hostMatchesWildcards=r;e.normalizeHintField=n;e.isObject=o;e.mergeOptions=u;e.filterOptions=i;e.applyRetryableWrites=s;e.isPromiseLike=c;e.decorateWithCollation=l;e.decorateWithReadConcern=h;e.getTopology=v;e.ns=E;e.makeCounter=C;e.uuidV4=S;e.maxWireVersion=b;e.arrayStrictEqual=O;e.errorStrictEqual=w;e.makeStateMachine=_;e.now=D;e.calculateDurationInMs=T;e.hasAtomicOperators=eP;e.resolveTimeoutOptions=M;e.resolveOptions=R;e.isSuperset=k;e.isHello=I;e.setDifference=N;e.isRecord=P;e.emitWarning=x;e.emitWarningOnce=U;e.enumToString=z;e.supportsRetryableWrites=W;e.shuffle=V;e.commandSupportsReadConcern=G;e.compareObjectId=q;e.parseInteger=K;e.parseUnsignedInteger=Y;e.checkParentDomainMatch=$;e.get=J;e.request=X;e.isHostMatch=Q;e.promiseWithResolvers=ee;e.squashError=et;e.once=er;e.maybeAddIdToDocuments=en;e.fileIsAccessible=eo;e.csotMin=eu;e.noop=es;e.decorateDecryptionResult=eH;e.addAbortListener=ef;e.abortable=em;var eE=Z("crypto"),eg=Z("fs"),eA=Z("http"),eC=Z("timers"),eS=Z("url"),eb=Z("url"),eO=Z("util"),ew=ea(),e_=eh(),eD=ev(),eB=ec(),eT=ep(),eF=el(),eM=ed(),eR=ey();e.ByteUtils={toLocalBufferType:function e(e){return Buffer.isBuffer(e)?e:Buffer.from(e.buffer,e.byteOffset,e.byteLength)},equals:function t(t,r){return e.ByteUtils.toLocalBufferType(t).equals(r)},compare:function t(t,r){return e.ByteUtils.toLocalBufferType(t).compare(r)},toBase64:function t(t){return e.ByteUtils.toLocalBufferType(t).toString("base64")}};var ek=function(e){return Object.prototype.toString.call(e)};var eI=/*#__PURE__*/function(){function e(t,r){f(this,e);this.db=t,this.collection=r,this.collection=r===""?void 0:r}p(e,[{key:"toString",value:function e(){return this.collection?"".concat(this.db,".").concat(this.collection):this.db}},{key:"withCollection",value:function e(e){return new eN(this.db,e)}}],[{key:"fromString",value:function t(t){if(typeof t!="string"||t==="")throw new eB.MongoRuntimeError('Cannot parse namespace from "'.concat(t,'"'));var r=L(t.split(".")),n=r[0],o=r.slice(1),u=o.join(".");return new e(n,u===""?void 0:u)}}]);return e}();e.MongoDBNamespace=eI;var eN=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);var n;n=d(this,t,[e,r]),n.collection=r;return n}p(t,null,[{key:"fromString",value:function e(e){return y(g(t),"fromString",this).call(this,e)}}]);return t}(eI);e.MongoDBCollectionNamespace=eN;function eP(e){if(Array.isArray(e)){var t=true,r=false,n=undefined;try{for(var o=e[Symbol.iterator](),u;!(t=(u=o.next()).done);t=true){var i=u.value;if(eP(i))return!0}}catch(e){r=true;n=e}finally{try{if(!t&&o.return!=null){o.return()}}finally{if(r){throw n}}}return!1}var s=Object.keys(e);return s.length>0&&s[0][0]==="$"}var ex=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var eL=/*#__PURE__*/function(){function e(){f(this,e);this.count=0,this.head={next:null,prev:null,value:null},this.head.next=this.head,this.head.prev=this.head}p(e,[{key:"length",get:function e(){return this.count}},{key:Symbol.toStringTag,get:function e(){return"List"}},{key:"toArray",value:function e(){return Array.from(this)}},{key:"toString",value:function e(){return"head <=> ".concat(this.toArray().join(" <=> ")," <=> head")}},{key:Symbol.iterator,value:function e(){var e,t,r,n,o,u,i;return H(this,function(s){switch(s.label){case 0:e=true,t=false,r=undefined;s.label=1;case 1:s.trys.push([1,6,7,8]);n=this.nodes()[Symbol.iterator]();s.label=2;case 2:if(!!(e=(o=n.next()).done))return[3,5];u=o.value;return[4,u.value];case 3:s.sent();s.label=4;case 4:e=true;return[3,2];case 5:return[3,8];case 6:i=s.sent();t=true;r=i;return[3,8];case 7:try{if(!e&&n.return!=null){n.return()}}finally{if(t){throw r}}return[7];case 8:return[2]}})}},{key:"nodes",value:function e(){var e,t;return H(this,function(r){switch(r.label){case 0:e=this.head.next;r.label=1;case 1:if(!(e!==this.head))return[3,4];t=e.next;return[4,e];case 2:r.sent(),e=t;r.label=3;case 3:return[3,1];case 4:return[2]}})}},{key:"push",value:function e(e){this.count+=1;var t={next:this.head,prev:this.head.prev,value:e};this.head.prev.next=t,this.head.prev=t}},{key:"pushMany",value:function e(e){var t=true,r=false,n=undefined;try{for(var o=e[Symbol.iterator](),u;!(t=(u=o.next()).done);t=true){var i=u.value;this.push(i)}}catch(e){r=true;n=e}finally{try{if(!t&&o.return!=null){o.return()}}finally{if(r){throw n}}}}},{key:"unshift",value:function e(e){this.count+=1;var t={next:this.head.next,prev:this.head,value:e};this.head.next.prev=t,this.head.next=t}},{key:"remove",value:function e(e){if(e===this.head||this.length===0)return null;this.count-=1;var t=e.prev,r=e.next;return t.next=r,r.prev=t,e.value}},{key:"shift",value:function e(){return this.remove(this.head.next)}},{key:"pop",value:function e(){return this.remove(this.head.prev)}},{key:"prune",value:function e(e){var t=true,r=false,n=undefined;try{for(var o=this.nodes()[Symbol.iterator](),u;!(t=(u=o.next()).done);t=true){var i=u.value;e(i.value)&&this.remove(i)}}catch(e){r=true;n=e}finally{try{if(!t&&o.return!=null){o.return()}}finally{if(r){throw n}}}}},{key:"clear",value:function e(){this.count=0,this.head.next=this.head,this.head.prev=this.head}},{key:"first",value:function e(){return this.head.next.value}},{key:"last",value:function e(){return this.head.prev.value}}]);return e}();e.List=eL;var eU=/*#__PURE__*/function(){function e(){f(this,e);this.buffers=new eL,this.totalByteLength=0}p(e,[{key:"length",get:function e(){return this.totalByteLength}},{key:"append",value:function e(e){this.buffers.push(e),this.totalByteLength+=e.length}},{key:"getInt32",value:function e(){if(this.totalByteLength<4)return null;var e=this.buffers.first();if(e!=null&&e.byteLength>=4)return e.readInt32LE(0);var t=this.read(4),r=t.readInt32LE(0);return this.totalByteLength+=4,this.buffers.unshift(t),r}},{key:"read",value:function e(e){if(typeof e!="number"||e<0)throw new eB.MongoInvalidArgumentError('Argument "size" must be a non-negative number');if(e>this.totalByteLength)return Buffer.alloc(0);var t=Buffer.allocUnsafe(e);for(var r=0;r<e;){var n=this.buffers.shift();if(n==null)break;var o=e-r,u=Math.min(o,n.byteLength),i=n.subarray(0,u);t.set(i,r),r+=u,this.totalByteLength-=u,u<n.byteLength&&this.buffers.unshift(n.subarray(u))}return t}}]);return e}();e.BufferPool=eU;var ej=/*#__PURE__*/function(){function e(t){f(this,e);this.host=void 0,this.port=void 0,this.socketPath=void 0,this.isIPv6=!1;var r=t.split(" ").join("%20");if(r.endsWith(".sock")){this.socketPath=decodeURIComponent(r);return}var n="iLoveJS://".concat(r),o;try{o=new eb.URL(n)}catch(e){var u=new eB.MongoRuntimeError("Unable to parse ".concat(r," with URL"));throw u.cause=e,u}var i=o.hostname,s=o.port,a=decodeURIComponent(i).toLowerCase();if(a.startsWith("[")&&a.endsWith("]")&&(this.isIPv6=!0,a=a.substring(1,i.length-1)),this.host=a.toLowerCase(),typeof s=="number"?this.port=s:typeof s=="string"&&s!==""?this.port=Number.parseInt(s,10):this.port=27017,this.port===0)throw new eB.MongoParseError("Invalid port (zero) with hostname");Object.freeze(this)}p(e,[{key:Symbol.for("nodejs.util.inspect.custom"),value:function e(){return this.inspect()}},{key:"inspect",value:function e(){return"new HostAddress('".concat(this.toString(),"')")}},{key:"toString",value:function e(){return typeof this.host=="string"?this.isIPv6?"[".concat(this.host,"]:").concat(this.port):"".concat(this.host,":").concat(this.port):"".concat(this.socketPath)}},{key:"toHostPort",value:function e(){if(this.socketPath)return{host:this.socketPath,port:0};var e,t;var r=(e=this.host)!==null&&e!==void 0?e:"",n=(t=this.port)!==null&&t!==void 0?t:0;return{host:r,port:n}}}],[{key:"fromString",value:function t(t){return new e(t)}},{key:"fromHostPort",value:function t(t,r){return t.includes(":")&&(t="[".concat(t,"]")),e.fromString("".concat(t,":").concat(r))}},{key:"fromSrvRecord",value:function t(t){var r=t.name,n=t.port;return e.fromHostPort(r,n)}}]);return e}();e.HostAddress=ej;e.DEFAULT_PK_FACTORY={createPk:function e(){return new ew.ObjectId}};e.MONGODB_WARNING_CODE="MONGODB DRIVER";var ez=new Set;function eW(){eW=a(function(e){var t;var r=arguments;return H(this,function(n){switch(n.label){case 0:t=r.length>1&&r[1]!==void 0?r[1]:{};return[4,new Promise(function(r,n){var o=B({method:"GET",timeout:1e4,json:!0},eS.parse(e),t),u=eA.request(o,function(e){e.setEncoding("utf8");var o="";e.on("data",function(e){o+=e}),e.once("end",function(){if(t.json===!1){r(o);return}try{var e=JSON.parse(o);r(e)}catch(e){n(new eB.MongoRuntimeError('Invalid JSON response: "'.concat(o,'"')))}})});u.once("timeout",function(){return u.destroy(new eB.MongoNetworkTimeoutError("Network request to ".concat(e," timed out after ").concat(t.timeout," ms")))}),u.once("error",function(e){return n(e)}),u.end()})];case 1:return[2,n.sent()]}})});return eW.apply(this,arguments)}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";e.randomBytes=(0,eO.promisify)(eE.randomBytes);function eV(){eV=a(function(t,r,n){var o,u,i,s,a,c,l,d;return H(this,function(f){switch(f.label){case 0:n===null||n===void 0?void 0:(o=n.signal)===null||o===void 0?void 0:o.throwIfAborted();u=ee(),i=u.promise,s=u.resolve,a=u.reject,c=function(e){return s(e)},l=function(e){return a(e)},d=ef(n===null||n===void 0?void 0:n.signal,function(){a(this.reason)});t.once(r,c).once("error",l);f.label=1;case 1:f.trys.push([1,,3,4]);return[4,i];case 2:return[2,f.sent()];case 3:t.off(r,c),t.off("error",l),d===null||d===void 0?void 0:d[e.kDispose]();return[7];case 4:return[2]}})});return eV.apply(this,arguments)}function eG(){eG=a(function(e,t){var r;return H(this,function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,eg.promises.access(e,t)];case 1:return[2,(n.sent(),!0)];case 2:r=n.sent();return[2,!1];case 3:return[2]}})});return eG.apply(this,arguments)}function eH(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(r&&(Buffer.isBuffer(t)&&(t=(0,ew.deserialize)(t)),Buffer.isBuffer(e)))throw new eB.MongoRuntimeError("Expected result of decryption to be deserialized BSON object");var n=true,o=false,u=undefined;if(!(!e||(typeof e==="undefined"?"undefined":j(e))!="object"))try{for(var i=Object.keys(e)[Symbol.iterator](),s;!(n=(s=i.next()).done);n=true){var a=s.value;var c=t[a];if(c&&c._bsontype==="Binary"&&c.sub_type===6){e[eD.kDecoratedKeys]||Object.defineProperty(e,eD.kDecoratedKeys,{value:[],configurable:!0,enumerable:!1,writable:!1}),e[eD.kDecoratedKeys].push(a);continue}eH(e[a],c,!1)}}catch(e){o=true;u=e}finally{try{if(!n&&i.return!=null){i.return()}}finally{if(o){throw u}}}}var eq;e.kDispose=(eq=Symbol.dispose)!==null&&eq!==void 0?eq:Symbol("dispose");function eK(){eK=a(function(t,r){var n,o,u,i,s;return H(this,function(a){switch(a.label){case 0:n=r.signal;if(!(n==null))return[3,2];return[4,t];case 1:return[2,a.sent()];case 2:o=ee(),u=o.promise,i=o.reject,s=n.aborted?i(n.reason):ef(n,function(){i(this.reason)});a.label=3;case 3:a.trys.push([3,,5,6]);return[4,Promise.race([t,u])];case 4:return[2,a.sent()];case 5:s===null||s===void 0?void 0:s[e.kDispose]();return[7];case 6:return[2]}})});return eK.apply(this,arguments)}});var eA=et(function(e){"use strict";var t=function e(e){return e!=null&&(typeof e==="undefined"?"undefined":j(e))=="object"&&"serverSelectionTimeoutMS"in e&&typeof e.serverSelectionTimeoutMS=="number"&&"waitQueueTimeoutMS"in e&&typeof e.waitQueueTimeoutMS=="number"};var r=function e(e){return e!=null&&(typeof e==="undefined"?"undefined":j(e))=="object"&&"serverSelectionTimeoutMS"in e&&typeof e.serverSelectionTimeoutMS=="number"&&"timeoutMS"in e&&typeof e.timeoutMS=="number"};ei();Object.defineProperty(e,"__esModule",{value:!0});e.LegacyTimeoutContext=e.CSOTTimeoutContext=e.TimeoutContext=e.Timeout=e.TimeoutError=void 0;var n=Z("timers"),o=ec(),u=eg(),i=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);var n;n=d(this,t,[e,r]),n.duration=r.duration;return n}p(t,[{key:"name",get:function e(){return"TimeoutError"}}],[{key:"is",value:function e(e){return e!=null&&(typeof e==="undefined"?"undefined":j(e))=="object"&&"name"in e&&e.name==="TimeoutError"}}]);return t}(V(Error));e.TimeoutError=i;var s=/*#__PURE__*/function(e){A(t,e);function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){return null},r=arguments.length>1?arguments[1]:void 0;f(this,t);var s;var a;var c=(a=r===null||r===void 0?void 0:r.duration)!==null&&a!==void 0?a:0,l=!!(r===null||r===void 0?void 0:r.unref),h=r===null||r===void 0?void 0:r.rejection;if(c<0)throw new o.MongoInvalidArgumentError("Cannot create a Timeout with a negative duration");var v;s=d(this,t,[function(t,r){v=r,e(u.noop,r)}]),s.ended=null,s.timedOut=!1,s.cleared=!1,s.duration=c,s.start=Math.trunc(performance.now()),h==null&&s.duration>0?(s.id=(0,n.setTimeout)(function(){s.ended=Math.trunc(performance.now()),s.timedOut=!0,v(new i("Expired after ".concat(c,"ms"),{duration:c}))},s.duration),typeof s.id.unref=="function"&&l&&s.id.unref()):h!=null&&(s.ended=Math.trunc(performance.now()),s.timedOut=!0,v(h));return s}p(t,[{key:"remainingTime",get:function e(){return this.timedOut?0:this.duration===0?1/0:this.start+this.duration-Math.trunc(performance.now())}},{key:"timeElapsed",get:function e(){return Math.trunc(performance.now())-this.start}},{key:"clear",value:function e(){(0,n.clearTimeout)(this.id),this.id=void 0,this.timedOut=!1,this.cleared=!0}},{key:"throwIfExpired",value:function e(){if(this.timedOut)throw this.then(void 0,u.squashError),new i("Timed out",{duration:this.duration})}}],[{key:"expires",value:function e(e,r){return new t(void 0,{duration:e,unref:r})}},{key:"reject",value:function e(e){return new t(void 0,{duration:0,unref:!0,rejection:e})}}]);return t}(V(Promise));e.Timeout=s;var a=/*#__PURE__*/function(){function e(){f(this,e)}p(e,null,[{key:"create",value:function e(e){var n,u;if(((n=e.session)===null||n===void 0?void 0:n.timeoutContext)!=null)return(u=e.session)===null||u===void 0?void 0:u.timeoutContext;if(r(e))return new c(e);if(t(e))return new l(e);throw new o.MongoRuntimeError("Unrecognized options")}}]);return e}();e.TimeoutContext=a;var c=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);var r;r=d(this,t),r.minRoundTripTime=0,r.start=Math.trunc(performance.now()),r.timeoutMS=e.timeoutMS,r.serverSelectionTimeoutMS=e.serverSelectionTimeoutMS,r.socketTimeoutMS=e.socketTimeoutMS,r.clearServerSelectionTimeout=!1;return r}p(t,[{key:"maxTimeMS",get:function e(){return this.remainingTimeMS-this.minRoundTripTime}},{key:"remainingTimeMS",get:function e(){var e=Math.trunc(performance.now())-this.start;return this.timeoutMS<=0?1/0:this.timeoutMS-e}},{key:"csotEnabled",value:function e(){return!0}},{key:"serverSelectionTimeout",get:function e(){var e;if(j(this._serverSelectionTimeout)!="object"||((e=this._serverSelectionTimeout)===null||e===void 0?void 0:e.cleared)){var t=this,r=t.remainingTimeMS,n=t.serverSelectionTimeoutMS;if(r<=0)return s.reject(new o.MongoOperationTimeoutError("Timed out in server selection after ".concat(this.timeoutMS,"ms")));n!==0&&(0,u.csotMin)(r,n)===n?this._serverSelectionTimeout=s.expires(n):r>0&&Number.isFinite(r)?this._serverSelectionTimeout=s.expires(r):this._serverSelectionTimeout=null}return this._serverSelectionTimeout}},{key:"connectionCheckoutTimeout",get:function e(){var e;if(j(this._connectionCheckoutTimeout)!="object"||((e=this._connectionCheckoutTimeout)===null||e===void 0?void 0:e.cleared))if(j(this._serverSelectionTimeout)=="object")this._connectionCheckoutTimeout=this._serverSelectionTimeout;else throw new o.MongoRuntimeError("Unreachable. If you are seeing this error, please file a ticket on the NODE driver project on Jira");return this._connectionCheckoutTimeout}},{key:"timeoutForSocketWrite",get:function e(){var e=this,t=e.remainingTimeMS;return Number.isFinite(t)?t>0?s.expires(t):s.reject(new o.MongoOperationTimeoutError("Timed out before socket write")):null}},{key:"timeoutForSocketRead",get:function e(){var e=this,t=e.remainingTimeMS;return Number.isFinite(t)?t>0?s.expires(t):s.reject(new o.MongoOperationTimeoutError("Timed out before socket read")):null}},{key:"refresh",value:function e(){var e,t;this.start=Math.trunc(performance.now()),this.minRoundTripTime=0,(e=this._serverSelectionTimeout)===null||e===void 0?void 0:e.clear(),(t=this._connectionCheckoutTimeout)===null||t===void 0?void 0:t.clear()}},{key:"clear",value:function e(){var e,t;(e=this._serverSelectionTimeout)===null||e===void 0?void 0:e.clear(),(t=this._connectionCheckoutTimeout)===null||t===void 0?void 0:t.clear()}},{key:"getRemainingTimeMSOrThrow",value:function e(e){var t=this,r=t.remainingTimeMS;if(r<=0)throw new o.MongoOperationTimeoutError(e!==null&&e!==void 0?e:"Expired after ".concat(this.timeoutMS,"ms"));return r}},{key:"clone",value:function e(){var e=new t({timeoutMS:this.timeoutMS,serverSelectionTimeoutMS:this.serverSelectionTimeoutMS});return e.start=this.start,e}},{key:"refreshed",value:function e(){return new t(this)}},{key:"addMaxTimeMSToCommand",value:function e(e,t){if(t.omitMaxTimeMS)return;var r=this.remainingTimeMS-this.minRoundTripTime;r>0&&Number.isFinite(r)&&(e.maxTimeMS=r)}},{key:"getSocketTimeoutMS",value:function e(){return 0}}]);return t}(a);e.CSOTTimeoutContext=c;var l=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);var r;r=d(this,t),r.options=e,r.clearServerSelectionTimeout=!0;return r}p(t,[{key:"csotEnabled",value:function e(){return!1}},{key:"serverSelectionTimeout",get:function e(){return this.options.serverSelectionTimeoutMS!=null&&this.options.serverSelectionTimeoutMS>0?s.expires(this.options.serverSelectionTimeoutMS):null}},{key:"connectionCheckoutTimeout",get:function e(){return this.options.waitQueueTimeoutMS!=null&&this.options.waitQueueTimeoutMS>0?s.expires(this.options.waitQueueTimeoutMS):null}},{key:"timeoutForSocketWrite",get:function e(){return null}},{key:"timeoutForSocketRead",get:function e(){return null}},{key:"refresh",value:function e(){}},{key:"clear",value:function e(){}},{key:"maxTimeMS",get:function e(){return null}},{key:"refreshed",value:function e(){return new t(this.options)}},{key:"addMaxTimeMSToCommand",value:function e(e,t){}},{key:"getSocketTimeoutMS",value:function e(){return this.options.socketTimeoutMS}}]);return t}(a);e.LegacyTimeoutContext=l});var eC=et(function(e){"use strict";var t=function e(e,t){return!Array.isArray(t)&&!C(t,Set)&&(t=[t]),t=new Set(t),Object.defineProperty(e,"aspects",{value:t,writable:!1}),t};ei();Object.defineProperty(e,"__esModule",{value:!0});e.AbstractOperation=e.Aspect=void 0;e.defineAspects=t;var r=ea(),n=el();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"),COMMAND_BATCHING:Symbol("COMMAND_BATCHING")};var o=/*#__PURE__*/function(){function t(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};f(this,t);var u;this.readPreference=this.hasAspect(e.Aspect.WRITE_OPERATION)?n.ReadPreference.primary:(u=n.ReadPreference.fromOptions(o))!==null&&u!==void 0?u:n.ReadPreference.primary,this.bsonOptions=(0,r.resolveBSONOptions)(o),this._session=o.session!=null?o.session:void 0,this.options=o,this.bypassPinningCheck=!!o.bypassPinningCheck,this.trySecondaryWrite=!1}p(t,[{key:"hasAspect",value:function e(e){var t=this.constructor;return t.aspects==null?!1:t.aspects.has(e)}},{key:"session",get:function e(){return this._session}},{key:"clearSession",value:function e(){this._session=void 0}},{key:"resetBatch",value:function e(){return!0}},{key:"canRetryRead",get:function t(){return this.hasAspect(e.Aspect.RETRYABLE)&&this.hasAspect(e.Aspect.READ_OPERATION)}},{key:"canRetryWrite",get:function t(){return this.hasAspect(e.Aspect.RETRYABLE)&&this.hasAspect(e.Aspect.WRITE_OPERATION)}}]);return t}();e.AbstractOperation=o});var eS=et(function(e){"use strict";var t=function e(e,t,r){return h.apply(this,arguments)};var r=function e(e){return v.apply(this,arguments)};var n=function e(e,t){return p.apply(this,arguments)};ei();Object.defineProperty(e,"__esModule",{value:!0});e.executeOperation=t;var o=ec(),u=el(),i=ef(),s=eA(),c=eg(),l=eC(),d=o.MONGODB_ERROR_CODES.IllegalOperation,f="This MongoDB deployment does not support retryable writes. Please add retryWrites=false to your connection string.";function h(){h=a(function(e,t,i){var a,d,f,h,v,p,m,E,y;return H(this,function(g){switch(g.label){case 0:if(!C(t,l.AbstractOperation))throw new o.MongoRuntimeError("This method requires a valid operation instance");if(!(e.topology==null))return[3,2];return[4,(0,c.abortable)(r(e),t.options)];case 1:h=g.sent();return[3,3];case 2:h=e.topology;g.label=3;case 3:a=h,d=t.session;if(d==null)f=Symbol(),d=e.startSession({owner:f,explicit:!1});else{if(d.hasEnded)throw new o.MongoExpiredSessionError("Use of expired sessions is not permitted");if(d.snapshotEnabled&&!a.capabilities.supportsSnapshotReads)throw new o.MongoCompatibilityError("Snapshot reads require MongoDB 5.0 or later");if(d.client!==e)throw new o.MongoInvalidArgumentError("ClientSession must be from the same MongoClient")}p=(v=t.readPreference)!==null&&v!==void 0?v:u.ReadPreference.primary,m=!!(d===null||d===void 0?void 0:d.inTransaction()),E=t.hasAspect(l.Aspect.READ_OPERATION);if(m&&!p.equals(u.ReadPreference.primary)&&(E||t.commandName==="runCommand"))throw new o.MongoTransactionError("Read preference in a transaction must be primary, not: ".concat(p.mode));(d===null||d===void 0?void 0:d.isPinned)&&d.transaction.isCommitted&&!t.bypassPinningCheck&&d.unpin(),i!==null&&i!==void 0?i:i=s.TimeoutContext.create({session:d,serverSelectionTimeoutMS:e.s.options.serverSelectionTimeoutMS,waitQueueTimeoutMS:e.s.options.waitQueueTimeoutMS,timeoutMS:t.options.timeoutMS});g.label=4;case 4:g.trys.push([4,,6,9]);return[4,n(t,{topology:a,timeoutContext:i,session:d,readPreference:p})];case 5:return[2,g.sent()];case 6:y=(d===null||d===void 0?void 0:d.owner)!=null&&d.owner===f;if(!y)return[3,8];return[4,d.endSession()];case 7:y=g.sent();g.label=8;case 8:y;return[7];case 9:return[2]}})});return h.apply(this,arguments)}function v(){v=a(function(e){return H(this,function(t){switch(t.label){case 0:if(!(e.topology==null))return[3,4];if(e.s.hasBeenClosed)throw new o.MongoNotConnectedError("Client must be connected before running operations");e.s.options.__skipPingOnConnect=!0;t.label=1;case 1:t.trys.push([1,,3,4]);return[4,e.connect()];case 2:if(t.sent(),e.topology==null)throw new o.MongoRuntimeError("client.connect did not create a topology but also did not throw");return[2,e.topology];case 3:delete e.s.options.__skipPingOnConnect;return[7];case 4:return[2,e.topology]}})});return v.apply(this,arguments)}function p(){p=a(function(e,t){var r,n,u,s,a,h,v,p,m,E,y,g,A,S,b,O,w,_,D;return H(this,function(B){switch(B.label){case 0:r=t.topology,n=t.timeoutContext,u=t.session,s=t.readPreference;e.hasAspect(l.Aspect.MUST_SELECT_SAME_SERVER)?h=(0,i.sameServerSelector)((a=e.server)===null||a===void 0?void 0:a.description):e.trySecondaryWrite?h=(0,i.secondaryWritableServerSelector)(r.commonWireVersion,s):h=s;return[4,r.selectServer(h,{session:u,operationName:e.commandName,timeoutContext:n,signal:e.options.signal})];case 1:p=B.sent(),m=e.hasAspect(l.Aspect.READ_OPERATION),E=e.hasAspect(l.Aspect.WRITE_OPERATION),y=(v=u===null||u===void 0?void 0:u.inTransaction())!==null&&v!==void 0?v:!1,g=r.s.options.retryReads&&!y&&e.canRetryRead,A=r.s.options.retryWrites&&!y&&(0,c.supportsRetryableWrites)(p)&&e.canRetryWrite,S=e.hasAspect(l.Aspect.RETRYABLE)&&u!=null&&(m&&g||E&&A);E&&A&&u!=null&&(e.options.willRetryWrite=!0,u.incrementTransactionNumber());b=S?n.csotEnabled()?1/0:2:1;_=0;B.label=2;case 2:if(!(_<b))return[3,8];if(!O)return[3,4];if(E&&O.code===d)throw new o.MongoServerError({message:f,errmsg:f,originalError:O});if(e.hasAspect(l.Aspect.COMMAND_BATCHING)&&!e.canRetryWrite||E&&!(0,o.isRetryableWriteError)(O)||m&&!(0,o.isRetryableReadError)(O))throw O;C(O,o.MongoNetworkError)&&e.hasAspect(l.Aspect.CURSOR_CREATING)&&u!=null&&u.isPinned&&!u.inTransaction()&&u.unpin({force:!0,forceClear:!0});return[4,r.selectServer(h,{session:u,operationName:e.commandName,previousServer:w,signal:e.options.signal})];case 3:if(p=B.sent(),E&&!(0,c.supportsRetryableWrites)(p))throw new o.MongoUnexpectedServerResponseError("Selected server does not support retryable writes");B.label=4;case 4:B.trys.push([4,6,,7]);_>0&&e.hasAspect(l.Aspect.COMMAND_BATCHING)&&e.resetBatch();return[4,e.execute(p,u,n)];case 5:return[2,B.sent()];case 6:D=B.sent();if(!C(D,o.MongoError))throw D;if(O!=null&&D.hasErrorLabel(o.MongoErrorLabel.NoWritesPerformed))throw O;w=p.description,O=D,n.clear();return[3,7];case 7:_++;return[3,2];case 8:throw O!==null&&O!==void 0?O:new o.MongoRuntimeError("Tried to propagate retryability error, but no error was found.")}})});return p.apply(this,arguments)}});var eb=et(function(e){"use strict";var t=function t(t){var r=Object.values(e.SeverityLevel),n=t===null||t===void 0?void 0:t.toLowerCase();return n!=null&&r.includes(n)?n:null};var r=function e(e){return{write:(0,E.promisify)(function(t,r){var n=(0,E.inspect)(t,{compact:!0,breakLength:1/0});e.write("".concat(n,"\n"),"utf-8",r)})}};var n=function e(e,t){var n=e.MONGODB_LOG_PATH,o=t.mongodbLogPath;return typeof o=="string"&&/^stderr$/i.test(o)?{mongodbLogPath:r(process.stderr),mongodbLogPathIsStdErr:!0}:typeof o=="string"&&/^stdout$/i.test(o)?{mongodbLogPath:r(process.stdout),mongodbLogPathIsStdErr:!1}:(typeof o==="undefined"?"undefined":j(o))=="object"&&typeof(o===null||o===void 0?void 0:o.write)=="function"?{mongodbLogPath:o,mongodbLogPathIsStdErr:!1}:n&&/^stderr$/i.test(n)?{mongodbLogPath:r(process.stderr),mongodbLogPathIsStdErr:!0}:n&&/^stdout$/i.test(n)?{mongodbLogPath:r(process.stdout),mongodbLogPathIsStdErr:!1}:{mongodbLogPath:r(process.stderr),mongodbLogPathIsStdErr:!0}};var o=function e(e,r,n){var o,u;return(u=(o=t(e))!==null&&o!==void 0?o:t(r))!==null&&u!==void 0?u:n};var u=function t(t,r){var n=e.SEVERITY_LEVEL_MAP.getNumericSeverityLevel(t),o=e.SEVERITY_LEVEL_MAP.getNumericSeverityLevel(r);return n<o?-1:n>o?1:0};var i=function e(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n="",o=0,u=function e(e,r){if(!(o>=t)){if(e==="")return o+=1,r;if(o+=e.length+4,r==null)return r;switch(typeof r==="undefined"?"undefined":j(r)){case"string":o+=r.length+2;break;case"number":case"bigint":o+=String(r).length;break;case"boolean":o+=r?4:5;break;case"object":if((0,C.isUint8Array)(r))o+=22+r.byteLength+r.byteLength*.33+18|0;else if("_bsontype"in r){var n=r;switch(n._bsontype){case"Int32":o+=String(n.value).length;break;case"Double":o+=(n.value|0)===n.value?String(n.value).length+2:String(n.value).length;break;case"Long":o+=n.toString().length;break;case"ObjectId":o+=35;break;case"MaxKey":case"MinKey":o+=13;break;case"Binary":o+=22+r.position+r.position*.33+18|0;break;case"Timestamp":o+=19+String(n.t).length+5+String(n.i).length+2;break;case"Code":n.scope==null?o+=n.code.length+10+2:o+=n.code.length+10+11;break;case"BSONRegExp":o+=34+n.pattern.length+13+n.options.length+3;break}}}return r}};if(typeof e=="string")n=e;else if(typeof e=="function")n=e.name;else try{t!==0?n=y.EJSON.stringify(e,u,0,r):n=y.EJSON.stringify(e,r)}catch(e){n="Extended JSON serialization failed with: ".concat(e.message)}return t!==0&&n.length>t&&n.charCodeAt(t-1)!==n.codePointAt(t-1)&&(t--,t===0)?"":t!==0&&n.length>t?"".concat(n.slice(0,t),"..."):n};var s=function e(e){var t=e;return t.toLog!==void 0&&typeof t.toLog=="function"};var a=function t(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.DEFAULT_MAX_DOCUMENT_LENGTH;var o=r.selector,u=r.operation,s=r.topologyDescription,a=r.message;return t.selector=i(o,n),t.operation=u,t.topologyDescription=i(s,n),t.message=a,t};var c=function e(e,t){e.commandName=t.commandName,e.requestId=t.requestId,e.driverConnectionId=t.connectionId;var r=C.HostAddress.fromString(t.address).toHostPort(),n=r.host,o=r.port;return e.serverHost=n,e.serverPort=o,(t===null||t===void 0?void 0:t.serviceId)&&(e.serviceId=t.serviceId.toHexString()),e.databaseName=t.databaseName,e.serverConnectionId=t.serverConnectionId,e};var l=function e(e,t){var r=C.HostAddress.fromString(t.address).toHostPort(),n=r.host,o=r.port;return e.serverHost=n,e.serverPort=o,e};var h=function e(e,t){return e.topologyId=t.topologyId,e};var v=function e(e,t){var r=t.awaited,n=t.connectionId;e.awaited=r,e.driverConnectionId=t.connectionId;var o=C.HostAddress.fromString(n).toHostPort(),u=o.host,i=o.port;return e.serverHost=u,e.serverPort=i,e};var m=function t(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.DEFAULT_MAX_DOCUMENT_LENGTH;var n=Object.create(null);switch(t.name){case g.SERVER_SELECTION_STARTED:return n=a(n,t,r),n;case g.SERVER_SELECTION_FAILED:var o;return n=a(n,t,r),n.failure=(o=t.failure)===null||o===void 0?void 0:o.message,n;case g.SERVER_SELECTION_SUCCEEDED:return n=a(n,t,r),n.serverHost=t.serverHost,n.serverPort=t.serverPort,n;case g.WAITING_FOR_SUITABLE_SERVER:return n=a(n,t,r),n.remainingTimeMS=t.remainingTimeMS,n;case g.COMMAND_STARTED:return n=c(n,t),n.message="Command started",n.command=i(t.command,r,{relaxed:!0}),n.databaseName=t.databaseName,n;case g.COMMAND_SUCCEEDED:return n=c(n,t),n.message="Command succeeded",n.durationMS=t.duration,n.reply=i(t.reply,r,{relaxed:!0}),n;case g.COMMAND_FAILED:var u;var s;return n=c(n,t),n.message="Command failed",n.durationMS=t.duration,n.failure=(s=(u=t.failure)===null||u===void 0?void 0:u.message)!==null&&s!==void 0?s:"(redacted)",n;case g.CONNECTION_POOL_CREATED:if(n=l(n,t),n.message="Connection pool created",t.options){var d=t.options,f=d.maxIdleTimeMS,p=d.minPoolSize,m=d.maxPoolSize,E=d.maxConnecting,y=d.waitQueueTimeoutMS;n=F(B({},n),{maxIdleTimeMS:f,minPoolSize:p,maxPoolSize:m,maxConnecting:E,waitQueueTimeoutMS:y})}return n;case g.CONNECTION_POOL_READY:return n=l(n,t),n.message="Connection pool ready",n;case g.CONNECTION_POOL_CLEARED:var A,C;return n=l(n,t),n.message="Connection pool cleared",((A=t.serviceId)===null||A===void 0?void 0:A._bsontype)==="ObjectId"&&(n.serviceId=(C=t.serviceId)===null||C===void 0?void 0:C.toHexString()),n;case g.CONNECTION_POOL_CLOSED:return n=l(n,t),n.message="Connection pool closed",n;case g.CONNECTION_CREATED:return n=l(n,t),n.message="Connection created",n.driverConnectionId=t.connectionId,n;case g.CONNECTION_READY:return n=l(n,t),n.message="Connection ready",n.driverConnectionId=t.connectionId,n.durationMS=t.durationMS,n;case g.CONNECTION_CLOSED:switch(n=l(n,t),n.message="Connection closed",n.driverConnectionId=t.connectionId,t.reason){case"stale":n.reason="Connection became stale because the pool was cleared";break;case"idle":n.reason="Connection has been available but unused for longer than the configured max idle time";break;case"error":n.reason="An error occurred while using the connection",t.error&&(n.error=t.error);break;case"poolClosed":n.reason="Connection pool was closed";break;default:n.reason="Unknown close reason: ".concat(t.reason)}return n;case g.CONNECTION_CHECK_OUT_STARTED:return n=l(n,t),n.message="Connection checkout started",n;case g.CONNECTION_CHECK_OUT_FAILED:switch(n=l(n,t),n.message="Connection checkout failed",t.reason){case"poolClosed":n.reason="Connection pool was closed";break;case"timeout":n.reason="Wait queue timeout elapsed without a connection becoming available";break;case"connectionError":n.reason="An error occurred while trying to establish a new connection",t.error&&(n.error=t.error);break;default:n.reason="Unknown close reason: ".concat(t.reason)}return n.durationMS=t.durationMS,n;case g.CONNECTION_CHECKED_OUT:return n=l(n,t),n.message="Connection checked out",n.driverConnectionId=t.connectionId,n.durationMS=t.durationMS,n;case g.CONNECTION_CHECKED_IN:return n=l(n,t),n.message="Connection checked in",n.driverConnectionId=t.connectionId,n;case g.SERVER_OPENING:return n=h(n,t),n=l(n,t),n.message="Starting server monitoring",n;case g.SERVER_CLOSED:return n=h(n,t),n=l(n,t),n.message="Stopped server monitoring",n;case g.SERVER_HEARTBEAT_STARTED:return n=h(n,t),n=v(n,t),n.message="Server heartbeat started",n;case g.SERVER_HEARTBEAT_SUCCEEDED:return n=h(n,t),n=v(n,t),n.message="Server heartbeat succeeded",n.durationMS=t.duration,n.serverConnectionId=t.serverConnectionId,n.reply=i(t.reply,r,{relaxed:!0}),n;case g.SERVER_HEARTBEAT_FAILED:var S;return n=h(n,t),n=v(n,t),n.message="Server heartbeat failed",n.durationMS=t.duration,n.failure=(S=t.failure)===null||S===void 0?void 0:S.message,n;case g.TOPOLOGY_OPENING:return n=h(n,t),n.message="Starting topology monitoring",n;case g.TOPOLOGY_CLOSED:return n=h(n,t),n.message="Stopped topology monitoring",n;case g.TOPOLOGY_DESCRIPTION_CHANGED:return n=h(n,t),n.message="Topology description changed",n.previousDescription=n.reply=i(t.previousDescription,r),n.newDescription=n.reply=i(t.newDescription,r),n;default:var b=true,O=false,w=undefined;try{for(var _=Object.entries(t)[Symbol.iterator](),D;!(b=(D=_.next()).done);b=true){var T=N(D.value,2),M=T[0],R=T[1];R!=null&&(n[M]=R)}}catch(e){O=true;w=e}finally{try{if(!b&&_.return!=null){_.return()}}finally{if(O){throw w}}}}return n};ei();Object.defineProperty(e,"__esModule",{value:!0});e.MongoLogger=e.MongoLoggableComponent=e.SEVERITY_LEVEL_MAP=e.DEFAULT_MAX_DOCUMENT_LENGTH=e.SeverityLevel=void 0;e.parseSeverityFromString=t;e.createStdioLogger=r;e.stringifyWithMaxLen=i;e.defaultLogTransform=m;var E=Z("util"),y=ea(),g=ev(),C=eg();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 S=/*#__PURE__*/function(e){A(t,e);function t(e){var r;f(this,t);var n;var o=[];var u=true,i=false,s=undefined;try{for(var a=e[Symbol.iterator](),c;!(u=(c=a.next()).done);u=true){var l=N(c.value,2),h=l[0],v=l[1];o.push([v,h])}}catch(e){i=true;s=e}finally{try{if(!u&&a.return!=null){a.return()}}finally{if(i){throw s}}}return(r=o).push.apply(r,U(e)),n=d(this,t,[o])}p(t,[{key:"getNumericSeverityLevel",value:function e(e){return this.get(e)}},{key:"getSeverityLevelName",value:function e(e){return this.get(e)}}]);return t}(V(Map));e.SEVERITY_LEVEL_MAP=new S([[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"});var b=/*#__PURE__*/function(){function t(e){f(this,t);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=e.componentSeverities,this.maxDocumentLength=e.maxDocumentLength,this.logDestination=e.logDestination,this.logDestinationIsStdErr=e.logDestinationIsStdErr,this.severities=this.createLoggingSeverities()}p(t,[{key:"createLoggingSeverities",value:function t(){var t=Object();var r=true,n=false,o=undefined;try{for(var i=Object.values(e.MongoLoggableComponent)[Symbol.iterator](),s;!(r=(s=i.next()).done);r=true){var a=s.value;t[a]={};var c=true,l=false,d=undefined;try{for(var f=Object.values(e.SeverityLevel)[Symbol.iterator](),h;!(c=(h=f.next()).done);c=true){var v=h.value;t[a][v]=u(v,this.componentSeverities[a])<=0}}catch(e){l=true;d=e}finally{try{if(!c&&f.return!=null){f.return()}}finally{if(l){throw d}}}}}catch(e){n=true;o=e}finally{try{if(!r&&i.return!=null){i.return()}}finally{if(n){throw o}}}return t}},{key:"turnOffSeverities",value:function t(){var t=true,r=false,n=undefined;try{for(var o=Object.values(e.MongoLoggableComponent)[Symbol.iterator](),u;!(t=(u=o.next()).done);t=true){var i=u.value;this.componentSeverities[i]=e.SeverityLevel.OFF;var s=true,a=false,c=undefined;try{for(var l=Object.values(e.SeverityLevel)[Symbol.iterator](),d;!(s=(d=l.next()).done);s=true){var f=d.value;this.severities[i][f]=!1}}catch(e){a=true;c=e}finally{try{if(!s&&l.return!=null){l.return()}}finally{if(a){throw c}}}}}catch(e){r=true;n=e}finally{try{if(!t&&o.return!=null){o.return()}}finally{if(r){throw n}}}}},{key:"logWriteFailureHandler",value:function t(t){if(this.logDestinationIsStdErr){this.turnOffSeverities(),this.clearPendingLog();return}this.logDestination=r(process.stderr),this.logDestinationIsStdErr=!0,this.clearPendingLog(),this.error(e.MongoLoggableComponent.CLIENT,{toLog:function e(){return{message:"User input for mongodbLogPath is now invalid. Logging is halted.",error:t.message}}}),this.turnOffSeverities(),this.clearPendingLog()}},{key:"clearPendingLog",value:function e(){this.pendingLog=null}},{key:"willLog",value:function t(t,r){return r===e.SeverityLevel.OFF?!1:this.severities[t][r]}},{key:"log",value:function e(e,t,r){var n=this;if(!this.willLog(t,e))return;var o={t:new Date,c:t,s:e};if(typeof r=="string"?o.message=r:(typeof r==="undefined"?"undefined":j(r))=="object"&&(s(r)?o=B({},o,r.toLog()):o=B({},o,m(r,this.maxDocumentLength))),(0,C.isPromiseLike)(this.pendingLog)){this.pendingLog=this.pendingLog.then(function(){return n.logDestination.write(o)}).then(this.clearPendingLog.bind(this),this.logWriteFailureHandler.bind(this));return}try{var u=this.logDestination.write(o);(0,C.isPromiseLike)(u)&&(this.pendingLog=u.then(this.clearPendingLog.bind(this),this.logWriteFailureHandler.bind(this)))}catch(e){this.logWriteFailureHandler(e)}}}],[{key:"resolveOptions",value:function t(t,r){var u,i,s,a,c,l;var d=n(t,r),f=F(B({},t,r),{mongodbLogPath:d.mongodbLogPath,mongodbLogPathIsStdErr:d.mongodbLogPathIsStdErr}),h=o((u=f.mongodbLogComponentSeverities)===null||u===void 0?void 0:u.default,f.MONGODB_LOG_ALL,e.SeverityLevel.OFF);var v,p;return{componentSeverities:{command:o((i=f.mongodbLogComponentSeverities)===null||i===void 0?void 0:i.command,f.MONGODB_LOG_COMMAND,h),topology:o((s=f.mongodbLogComponentSeverities)===null||s===void 0?void 0:s.topology,f.MONGODB_LOG_TOPOLOGY,h),serverSelection:o((a=f.mongodbLogComponentSeverities)===null||a===void 0?void 0:a.serverSelection,f.MONGODB_LOG_SERVER_SELECTION,h),connection:o((c=f.mongodbLogComponentSeverities)===null||c===void 0?void 0:c.connection,f.MONGODB_LOG_CONNECTION,h),client:o((l=f.mongodbLogComponentSeverities)===null||l===void 0?void 0:l.client,f.MONGODB_LOG_CLIENT,h),default:h},maxDocumentLength:(p=(v=f.mongodbLogMaxDocumentLength)!==null&&v!==void 0?v:(0,C.parseUnsignedInteger)(f.MONGODB_LOG_MAX_DOCUMENT_LENGTH))!==null&&p!==void 0?p:1e3,logDestination:f.mongodbLogPath,logDestinationIsStdErr:f.mongodbLogPathIsStdErr}}}]);return t}();e.MongoLogger=b});var eO=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.CancellationToken=e.TypedEventEmitter=void 0;var t=Z("events"),r=eb(),n=eg(),o=/*#__PURE__*/function(e){A(t,e);function t(){f(this,t);return d(this,t,arguments)}p(t,[{key:"emitAndLog",value:function e(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++){r[n-1]=arguments[n]}var o;this.emit.apply(this,[e].concat(U(r))),this.component&&((o=this.mongoLogger)===null||o===void 0?void 0:o.debug(this.component,r[0]))}},{key:"emitAndLogHeartbeat",value:function e(e,t,r){for(var n=arguments.length,o=new Array(n>3?n-3:0),u=3;u<n;u++){o[u-3]=arguments[u]}if(this.emit.apply(this,[e].concat(U(o))),this.component){var i;var s=B({topologyId:t,serverConnectionId:r!==null&&r!==void 0?r:null},o[0]);(i=this.mongoLogger)===null||i===void 0?void 0:i.debug(this.component,s)}}},{key:"emitAndLogCommand",value:function e(e,t,n,o){for(var u=arguments.length,i=new Array(u>4?u-4:0),s=4;s<u;s++){i[s-4]=arguments[s]}if(e&&this.emit.apply(this,[t].concat(U(i))),o){var a;var c=B({databaseName:n},i[0]);(a=this.mongoLogger)===null||a===void 0?void 0:a.debug(r.MongoLoggableComponent.COMMAND,c)}}}]);return t}(t.EventEmitter);e.TypedEventEmitter=o;var u=/*#__PURE__*/function(e){A(t,e);function t(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++){r[o]=arguments[o]}f(this,t);var u;u=d(this,t,U(r)),u.on("error",n.noop);return u}return t}(o);e.CancellationToken=u});var ew=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.GetMoreOperation=void 0;var t=eE(),r=ec(),n=eg(),o=eC(),u=/*#__PURE__*/function(e){A(o,e);function o(e,t,r,n){f(this,o);var u;u=d(this,o,[n]),u.options=n,u.ns=e,u.cursorId=t,u.server=r;return u}p(o,[{key:"commandName",get:function e(){return"getMore"}},{key:"execute",value:function e(e,o,u){var i=this;return a(function(){var o,s,a;return H(this,function(c){switch(c.label){case 0:if(e!==i.server)throw new r.MongoRuntimeError("Getmore must run on the same server operation began on");if(i.cursorId==null||i.cursorId.isZero())throw new r.MongoRuntimeError("Unable to iterate cursor with no id");o=i.ns.collection;if(o==null)throw new r.MongoRuntimeError("A collection name must be determined before getMore");s={getMore:i.cursorId,collection:o};typeof i.options.batchSize=="number"&&(s.batchSize=Math.abs(i.options.batchSize)),typeof i.options.maxAwaitTimeMS=="number"&&(s.maxTimeMS=i.options.maxAwaitTimeMS),i.options.comment!==void 0&&(0,n.maxWireVersion)(e)>=9&&(s.comment=i.options.comment);a=B({returnFieldSelector:null,documentsReturnedIn:"nextBatch",timeoutContext:u},i.options);return[4,e.command(i.ns,s,a,t.CursorResponse)];case 1:return[2,c.sent()]}})})()}}]);return o}(o.AbstractOperation);e.GetMoreOperation=u;(0,o.defineAspects)(u,[o.Aspect.READ_OPERATION,o.Aspect.MUST_SELECT_SAME_SERVER])});var e_=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.KillCursorsOperation=void 0;var t=ec(),r=eg(),n=eC(),o=/*#__PURE__*/function(e){A(n,e);function n(e,t,r,o){f(this,n);var u;u=d(this,n,[o]),u.ns=t,u.cursorId=e,u.server=r;return u}p(n,[{key:"commandName",get:function e(){return"killCursors"}},{key:"execute",value:function e(e,n,o){var u=this;return a(function(){var i,s,a;return H(this,function(c){switch(c.label){case 0:if(e!==u.server)throw new t.MongoRuntimeError("Killcursor must run on the same server operation began on");i=u.ns.collection;if(i==null)throw new t.MongoRuntimeError("A collection name must be determined before killCursors");s={killCursors:i,cursors:[u.cursorId]};c.label=1;case 1:c.trys.push([1,3,,4]);return[4,e.command(u.ns,s,{session:n,timeoutContext:o})];case 2:c.sent();return[3,4];case 3:a=c.sent();(0,r.squashError)(a);return[3,4];case 4:return[2]}})})()}}]);return n}(n.AbstractOperation);e.KillCursorsOperation=o;(0,n.defineAspects)(o,[n.Aspect.MUST_SELECT_SAME_SERVER])});var eD=et(function(e){"use strict";var t=function e(e,t){var r={q:e,limit:typeof t.limit=="number"?t.limit:0};return t.collation&&(r.collation=t.collation),t.hint&&(r.hint=t.hint),r};ei();Object.defineProperty(e,"__esModule",{value:!0});e.DeleteManyOperation=e.DeleteOneOperation=e.DeleteOperation=void 0;e.makeDeleteStatement=t;var r=ec(),n=r3(),o=eC(),u=/*#__PURE__*/function(e){A(t,e);function t(e,r,n){f(this,t);var o;o=d(this,t,[void 0,n]),o.options=n,o.ns=e,o.statements=r;return o}p(t,[{key:"commandName",get:function e(){return"delete"}},{key:"canRetryWrite",get:function e(){return y(g(t.prototype),"canRetryWrite",this)===!1?!1:this.statements.every(function(e){return e.limit!=null?e.limit>0:!0})}},{key:"execute",value:function e(e,n,o){var u=this;var i=this,s=function(){return y(g(t.prototype),"executeCommand",u)};return a(function(){var t,u,a,c;return H(this,function(l){switch(l.label){case 0:u=(t=i.options)!==null&&t!==void 0?t:{},a=typeof u.ordered=="boolean"?u.ordered:!0,c={delete:i.ns.collection,deletes:i.statements,ordered:a};if(u.let&&(c.let=u.let),u.comment!==void 0&&(c.comment=u.comment),i.writeConcern&&i.writeConcern.w===0&&i.statements.find(function(e){return e.hint}))throw new r.MongoCompatibilityError("hint is not supported with unacknowledged writes");return[4,s().call(i,e,n,c,o)];case 1:return[2,l.sent()]}})})()}}]);return t}(n.CommandOperation);e.DeleteOperation=u;var i=/*#__PURE__*/function(e){A(n,e);function n(e,r,o){f(this,n);return d(this,n,[e.s.namespace,[t(r,F(B({},o),{limit:1}))],o])}p(n,[{key:"execute",value:function e(e,t,o){var u=this;var i=this,s=function(){return y(g(n.prototype),"execute",u)};return a(function(){var n,u;return H(this,function(a){switch(a.label){case 0:return[4,s().call(i,e,t,o)];case 1:u=a.sent();if(i.explain)return[2,u];if(u.code)throw new r.MongoServerError(u);if(u.writeErrors)throw new r.MongoServerError(u.writeErrors[0]);return[2,{acknowledged:((n=i.writeConcern)===null||n===void 0?void 0:n.w)!==0,deletedCount:u.n}]}})})()}}]);return n}(u);e.DeleteOneOperation=i;var s=/*#__PURE__*/function(e){A(n,e);function n(e,r,o){f(this,n);return d(this,n,[e.s.namespace,[t(r,o)],o])}p(n,[{key:"execute",value:function e(e,t,o){var u=this;var i=this,s=function(){return y(g(n.prototype),"execute",u)};return a(function(){var n,u;return H(this,function(a){switch(a.label){case 0:return[4,s().call(i,e,t,o)];case 1:u=a.sent();if(i.explain)return[2,u];if(u.code)throw new r.MongoServerError(u);if(u.writeErrors)throw new r.MongoServerError(u.writeErrors[0]);return[2,{acknowledged:((n=i.writeConcern)===null||n===void 0?void 0:n.w)!==0,deletedCount:u.n}]}})})()}}]);return n}(u);e.DeleteManyOperation=s;(0,o.defineAspects)(u,[o.Aspect.RETRYABLE,o.Aspect.WRITE_OPERATION]);(0,o.defineAspects)(i,[o.Aspect.RETRYABLE,o.Aspect.WRITE_OPERATION,o.Aspect.EXPLAINABLE,o.Aspect.SKIP_COLLATION]);(0,o.defineAspects)(s,[o.Aspect.WRITE_OPERATION,o.Aspect.EXPLAINABLE,o.Aspect.SKIP_COLLATION])});var eB=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.BulkWriteOperation=void 0;var t=eC(),r=/*#__PURE__*/function(e){A(t,e);function t(e,r,n){f(this,t);var o;o=d(this,t,[n]),o.options=n,o.collection=e,o.operations=r;return o}p(t,[{key:"commandName",get:function e(){return"bulkWrite"}},{key:"execute",value:function e(e,t,r){var n=this;return a(function(){var e,o,u,i,s;return H(this,function(a){switch(a.label){case 0:e=n.collection,o=n.operations,u=F(B({},n.options,n.bsonOptions),{readPreference:n.readPreference,timeoutContext:r}),i=u.ordered===!1?e.initializeUnorderedBulkOp(u):e.initializeOrderedBulkOp(u);for(s=0;s<o.length;s++)i.raw(o[s]);return[4,i.execute(F(B({},u),{session:t}))];case 1:return[2,a.sent()]}})})()}}]);return t}(t.AbstractOperation);e.BulkWriteOperation=r;(0,t.defineAspects)(r,[t.Aspect.WRITE_OPERATION])});var eT=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.InsertManyOperation=e.InsertOneOperation=e.InsertOperation=void 0;var t=ec(),r=eg(),n=ey(),o=eB(),u=r3(),i=eC(),s=/*#__PURE__*/function(e){A(t,e);function t(e,r,n){f(this,t);var o;var u;o=d(this,t,[void 0,n]),o.options=F(B({},n),{checkKeys:(u=n.checkKeys)!==null&&u!==void 0?u:!1}),o.ns=e,o.documents=r;return o}p(t,[{key:"commandName",get:function e(){return"insert"}},{key:"execute",value:function e(e,r,n){var o=this;var u=this,i=function(){return y(g(t.prototype),"executeCommand",o)};return a(function(){var t,o,s,a;return H(this,function(c){switch(c.label){case 0:o=(t=u.options)!==null&&t!==void 0?t:{},s=typeof o.ordered=="boolean"?o.ordered:!0,a={insert:u.ns.collection,documents:u.documents,ordered:s};typeof o.bypassDocumentValidation=="boolean"&&(a.bypassDocumentValidation=o.bypassDocumentValidation),o.comment!==void 0&&(a.comment=o.comment);return[4,i().call(u,e,r,a,n)];case 1:return[2,c.sent()]}})})()}}]);return t}(u.CommandOperation);e.InsertOperation=s;var c=/*#__PURE__*/function(e){A(n,e);function n(e,t,o){f(this,n);return d(this,n,[e.s.namespace,(0,r.maybeAddIdToDocuments)(e,[t],o),o])}p(n,[{key:"execute",value:function e(e,r,o){var u=this;var i=this,s=function(){return y(g(n.prototype),"execute",u)};return a(function(){var n,u;return H(this,function(a){switch(a.label){case 0:return[4,s().call(i,e,r,o)];case 1:u=a.sent();if(u.code)throw new t.MongoServerError(u);if(u.writeErrors)throw new t.MongoServerError(u.writeErrors[0]);return[2,{acknowledged:((n=i.writeConcern)===null||n===void 0?void 0:n.w)!==0,insertedId:i.documents[0]._id}]}})})()}}]);return n}(s);e.InsertOneOperation=c;var l=/*#__PURE__*/function(e){A(r,e);function r(e,n,o){f(this,r);var u;if(u=d(this,r,[o]),!Array.isArray(n))throw new t.MongoInvalidArgumentError('Argument "docs" must be an array of documents');u.options=o,u.collection=e,u.docs=n;return u}p(r,[{key:"commandName",get:function e(){return"insert"}},{key:"execute",value:function e(e,r,u){var i=this;return a(function(){var s,a,c,l,d,f;return H(this,function(h){switch(h.label){case 0:s=i.collection,a=F(B({},i.options,i.bsonOptions),{readPreference:i.readPreference}),c=n.WriteConcern.fromOptions(a),l=new o.BulkWriteOperation(s,i.docs.map(function(e){return{insertOne:{document:e}}}),a);h.label=1;case 1:h.trys.push([1,3,,4]);return[4,l.execute(e,r,u)];case 2:d=h.sent();return[2,{acknowledged:(c===null||c===void 0?void 0:c.w)!==0,insertedCount:d.insertedCount,insertedIds:d.insertedIds}];case 3:f=h.sent();throw f&&f.message==="Operation must be an object with an operation key"?new t.MongoInvalidArgumentError("Collection.insertMany() cannot be called with an array that has null/undefined values"):f;case 4:return[2]}})})()}}]);return r}(i.AbstractOperation);e.InsertManyOperation=l;(0,i.defineAspects)(s,[i.Aspect.RETRYABLE,i.Aspect.WRITE_OPERATION]);(0,i.defineAspects)(c,[i.Aspect.RETRYABLE,i.Aspect.WRITE_OPERATION]);(0,i.defineAspects)(l,[i.Aspect.WRITE_OPERATION])});var eF=et(function(e){"use strict";var t=function e(e,t,n){if(e==null||(typeof e==="undefined"?"undefined":j(e))!="object")throw new r.MongoInvalidArgumentError("Selector must be a valid JavaScript object");if(t==null||(typeof t==="undefined"?"undefined":j(t))!="object")throw new r.MongoInvalidArgumentError("Document must be a valid JavaScript object");var o={q:e,u:t};return typeof n.upsert=="boolean"&&(o.upsert=n.upsert),n.multi&&(o.multi=n.multi),n.hint&&(o.hint=n.hint),n.arrayFilters&&(o.arrayFilters=n.arrayFilters),n.collation&&(o.collation=n.collation),o};ei();Object.defineProperty(e,"__esModule",{value:!0});e.ReplaceOneOperation=e.UpdateManyOperation=e.UpdateOneOperation=e.UpdateOperation=void 0;e.makeUpdateStatement=t;var r=ec(),n=eg(),o=r3(),u=eC(),i=/*#__PURE__*/function(e){A(t,e);function t(e,r,n){f(this,t);var o;o=d(this,t,[void 0,n]),o.options=n,o.ns=e,o.statements=r;return o}p(t,[{key:"commandName",get:function e(){return"update"}},{key:"canRetryWrite",get:function e(){return y(g(t.prototype),"canRetryWrite",this)===!1?!1:this.statements.every(function(e){return e.multi==null||e.multi===!1})}},{key:"execute",value:function e(e,n,o){var u=this;var i=this,s=function(){return y(g(t.prototype),"executeCommand",u)};return a(function(){var t,u,a,c;return H(this,function(l){switch(l.label){case 0:u=(t=i.options)!==null&&t!==void 0?t:{},a=typeof u.ordered=="boolean"?u.ordered:!0,c={update:i.ns.collection,updates:i.statements,ordered:a};if(typeof u.bypassDocumentValidation=="boolean"&&(c.bypassDocumentValidation=u.bypassDocumentValidation),u.let&&(c.let=u.let),u.comment!==void 0&&(c.comment=u.comment),i.writeConcern&&i.writeConcern.w===0&&i.statements.find(function(e){return e.hint}))throw new r.MongoCompatibilityError("hint is not supported with unacknowledged writes");return[4,s().call(i,e,n,c,o)];case 1:return[2,l.sent()]}})})()}}]);return t}(o.CommandOperation);e.UpdateOperation=i;var s=/*#__PURE__*/function(e){A(o,e);function o(e,u,i,s){f(this,o);var a;if(a=d(this,o,[e.s.namespace,[t(u,i,F(B({},s),{multi:!1}))],s]),!(0,n.hasAtomicOperators)(i))throw new r.MongoInvalidArgumentError("Update document requires atomic operators");return a}p(o,[{key:"execute",value:function e(e,t,n){var u=this;var i=this,s=function(){return y(g(o.prototype),"execute",u)};return a(function(){var o,u,a;return H(this,function(c){switch(c.label){case 0:return[4,s().call(i,e,t,n)];case 1:u=c.sent();if(i.explain!=null)return[2,u];if(u.code)throw new r.MongoServerError(u);if(u.writeErrors)throw new r.MongoServerError(u.writeErrors[0]);return[2,{acknowledged:((o=i.writeConcern)===null||o===void 0?void 0:o.w)!==0,modifiedCount:(a=u.nModified)!==null&&a!==void 0?a:u.n,upsertedId:Array.isArray(u.upserted)&&u.upserted.length>0?u.upserted[0]._id:null,upsertedCount:Array.isArray(u.upserted)&&u.upserted.length?u.upserted.length:0,matchedCount:Array.isArray(u.upserted)&&u.upserted.length>0?0:u.n}]}})})()}}]);return o}(i);e.UpdateOneOperation=s;var c=/*#__PURE__*/function(e){A(o,e);function o(e,u,i,s){f(this,o);var a;if(a=d(this,o,[e.s.namespace,[t(u,i,F(B({},s),{multi:!0}))],s]),!(0,n.hasAtomicOperators)(i))throw new r.MongoInvalidArgumentError("Update document requires atomic operators");return a}p(o,[{key:"execute",value:function e(e,t,n){var u=this;var i=this,s=function(){return y(g(o.prototype),"execute",u)};return a(function(){var o,u,a;return H(this,function(c){switch(c.label){case 0:return[4,s().call(i,e,t,n)];case 1:u=c.sent();if(i.explain!=null)return[2,u];if(u.code)throw new r.MongoServerError(u);if(u.writeErrors)throw new r.MongoServerError(u.writeErrors[0]);return[2,{acknowledged:((o=i.writeConcern)===null||o===void 0?void 0:o.w)!==0,modifiedCount:(a=u.nModified)!==null&&a!==void 0?a:u.n,upsertedId:Array.isArray(u.upserted)&&u.upserted.length>0?u.upserted[0]._id:null,upsertedCount:Array.isArray(u.upserted)&&u.upserted.length?u.upserted.length:0,matchedCount:Array.isArray(u.upserted)&&u.upserted.length>0?0:u.n}]}})})()}}]);return o}(i);e.UpdateManyOperation=c;var l=/*#__PURE__*/function(e){A(o,e);function o(e,u,i,s){f(this,o);var a;if(a=d(this,o,[e.s.namespace,[t(u,i,F(B({},s),{multi:!1}))],s]),(0,n.hasAtomicOperators)(i))throw new r.MongoInvalidArgumentError("Replacement document must not contain atomic operators");return a}p(o,[{key:"execute",value:function e(e,t,n){var u=this;var i=this,s=function(){return y(g(o.prototype),"execute",u)};return a(function(){var o,u,a;return H(this,function(c){switch(c.label){case 0:return[4,s().call(i,e,t,n)];case 1:u=c.sent();if(i.explain!=null)return[2,u];if(u.code)throw new r.MongoServerError(u);if(u.writeErrors)throw new r.MongoServerError(u.writeErrors[0]);return[2,{acknowledged:((o=i.writeConcern)===null||o===void 0?void 0:o.w)!==0,modifiedCount:(a=u.nModified)!==null&&a!==void 0?a:u.n,upsertedId:Array.isArray(u.upserted)&&u.upserted.length>0?u.upserted[0]._id:null,upsertedCount:Array.isArray(u.upserted)&&u.upserted.length?u.upserted.length:0,matchedCount:Array.isArray(u.upserted)&&u.upserted.length>0?0:u.n}]}})})()}}]);return o}(i);e.ReplaceOneOperation=l;(0,u.defineAspects)(i,[u.Aspect.RETRYABLE,u.Aspect.WRITE_OPERATION,u.Aspect.SKIP_COLLATION]);(0,u.defineAspects)(s,[u.Aspect.RETRYABLE,u.Aspect.WRITE_OPERATION,u.Aspect.EXPLAINABLE,u.Aspect.SKIP_COLLATION]);(0,u.defineAspects)(c,[u.Aspect.WRITE_OPERATION,u.Aspect.EXPLAINABLE,u.Aspect.SKIP_COLLATION]);(0,u.defineAspects)(l,[u.Aspect.RETRYABLE,u.Aspect.WRITE_OPERATION,u.Aspect.SKIP_COLLATION])});var eM=et(function(e){"use strict";var t=function e(e,t,r,i){if(r?i=r:i&&i.result&&(i=i.result),i==null)return;if(i.ok===0&&t.ok===1){t.ok=0;var s={index:0,code:i.code||0,errmsg:i.message,errInfo:i.errInfo,op:e.operations[0]};t.writeErrors.push(new w(s));return}else if(i.ok===0&&t.ok===0)return;n(e)&&i.n&&(t.nInserted=t.nInserted+i.n),u(e)&&i.n&&(t.nRemoved=t.nRemoved+i.n);var a=0;if(Array.isArray(i.upserted)){a=i.upserted.length;for(var c=0;c<i.upserted.length;c++)t.upserted.push({index:i.upserted[c].index+e.originalZeroIndex,_id:i.upserted[c]._id})}else i.upserted&&(a=1,t.upserted.push({index:e.originalZeroIndex,_id:i.upserted}));if(o(e)&&i.n){var l=i.nModified;t.nUpserted=t.nUpserted+a,t.nMatched=t.nMatched+(i.n-a),typeof l=="number"?t.nModified=t.nModified+l:t.nModified=0}if(Array.isArray(i.writeErrors))for(var d=0;d<i.writeErrors.length;d++){var f={index:e.originalIndexes[i.writeErrors[d].index],code:i.writeErrors[d].code,errmsg:i.writeErrors[d].errmsg,errInfo:i.writeErrors[d].errInfo,op:e.operations[i.writeErrors[d].index]};t.writeErrors.push(new w(f))}i.writeConcernError&&t.writeConcernErrors.push(new O(i.writeConcernError))};var r=function e(e,t){return _.apply(this,arguments)};var n=function t(t){return t.batchType===e.BatchType.INSERT};var o=function t(t){return t.batchType===e.BatchType.UPDATE};var u=function t(t){return t.batchType===e.BatchType.DELETE};var i=function e(e){var t=e.s,r=t.currentOp;return e.s.currentOp=void 0,r||(r={}),r};ei();Object.defineProperty(e,"__esModule",{value:!0});e.BulkOperationBase=e.BulkWriteShimOperation=e.FindOperators=e.MongoBulkWriteError=e.WriteError=e.WriteConcernError=e.BulkWriteResult=e.Batch=e.BatchType=void 0;e.mergeBatchResults=t;var s=ea(),c=ec(),l=eD(),h=eS(),v=eT(),m=eC(),E=eF(),y=eg(),g=ey();e.BatchType=Object.freeze({INSERT:1,UPDATE:2,DELETE:3});var S=function e(t,r){f(this,e);this.originalZeroIndex=r,this.currentIndex=0,this.originalIndexes=[],this.batchType=t,this.operations=[],this.size=0,this.sizeBytes=0};e.Batch=S;var b=/*#__PURE__*/function(){function e(t,r){f(this,e);var n,o,u,i,s;this.result=t,this.insertedCount=(n=this.result.nInserted)!==null&&n!==void 0?n:0,this.matchedCount=(o=this.result.nMatched)!==null&&o!==void 0?o:0,this.modifiedCount=(u=this.result.nModified)!==null&&u!==void 0?u:0,this.deletedCount=(i=this.result.nRemoved)!==null&&i!==void 0?i:0,this.upsertedCount=(s=this.result.upserted.length)!==null&&s!==void 0?s:0,this.upsertedIds=e.generateIdMap(this.result.upserted),this.insertedIds=e.generateIdMap(this.getSuccessfullyInsertedIds(t,r)),Object.defineProperty(this,"result",{value:this.result,enumerable:!1})}p(e,[{key:"ok",get:function e(){return this.result.ok}},{key:"getSuccessfullyInsertedIds",value:function e(e,t){return e.writeErrors.length===0?e.insertedIds:t?e.insertedIds.slice(0,e.writeErrors[0].index):e.insertedIds.filter(function(t){var r=t.index;return!e.writeErrors.some(function(e){return r===e.index})})}},{key:"getUpsertedIdAt",value:function e(e){return this.result.upserted[e]}},{key:"getRawResponse",value:function e(){return this.result}},{key:"hasWriteErrors",value:function e(){return this.result.writeErrors.length>0}},{key:"getWriteErrorCount",value:function e(){return this.result.writeErrors.length}},{key:"getWriteErrorAt",value:function e(e){return e<this.result.writeErrors.length?this.result.writeErrors[e]:void 0}},{key:"getWriteErrors",value:function e(){return this.result.writeErrors}},{key:"getWriteConcernError",value:function e(){if(this.result.writeConcernErrors.length!==0){if(this.result.writeConcernErrors.length===1)return this.result.writeConcernErrors[0];{var e="";for(var t=0;t<this.result.writeConcernErrors.length;t++){var r=this.result.writeConcernErrors[t];e=e+r.errmsg,t===0&&(e=e+" and ")}return new O({errmsg:e,code:c.MONGODB_ERROR_CODES.WriteConcernFailed})}}}},{key:"toString",value:function e(){return"BulkWriteResult(".concat(s.EJSON.stringify(this.result),")")}},{key:"isOk",value:function e(){return this.result.ok===1}}],[{key:"generateIdMap",value:function e(e){var t={};var r=true,n=false,o=undefined;try{for(var u=e[Symbol.iterator](),i;!(r=(i=u.next()).done);r=true){var s=i.value;t[s.index]=s._id}}catch(e){n=true;o=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw o}}}return t}}]);return e}();e.BulkWriteResult=b;var O=/*#__PURE__*/function(){function e(t){f(this,e);this.serverError=t}p(e,[{key:"code",get:function e(){return this.serverError.code}},{key:"errmsg",get:function e(){return this.serverError.errmsg}},{key:"errInfo",get:function e(){return this.serverError.errInfo}},{key:"toJSON",value:function e(){return this.serverError}},{key:"toString",value:function e(){return"WriteConcernError(".concat(this.errmsg,")")}}]);return e}();e.WriteConcernError=O;var w=/*#__PURE__*/function(){function e(t){f(this,e);this.err=t}p(e,[{key:"code",get:function e(){return this.err.code}},{key:"index",get:function e(){return this.err.index}},{key:"errmsg",get:function e(){return this.err.errmsg}},{key:"errInfo",get:function e(){return this.err.errInfo}},{key:"getOperation",value:function e(){return this.err.op}},{key:"toJSON",value:function e(){return{code:this.err.code,index:this.err.index,errmsg:this.err.errmsg,op:this.err.op}}},{key:"toString",value:function e(){return"WriteError(".concat(JSON.stringify(this.toJSON()),")")}}]);return e}();e.WriteError=w;function _(){_=a(function(e,r){var i,s,a,d,f,p,m,g,A,S,O,w,_,T,M;return H(this,function(R){switch(R.label){case 0:if(e.s.batches.length===0)return[2,new b(e.s.bulkResult,e.isOrdered)];i=true,s=false,a=undefined;R.label=1;case 1:R.trys.push([1,9,10,11]);d=e.s.batches[Symbol.iterator]();R.label=2;case 2:if(!!(i=(f=d.next()).done))return[3,8];p=f.value;m=(0,y.resolveOptions)(e,F(B({},r),{ordered:e.isOrdered}));m.bypassDocumentValidation!==!0&&delete m.bypassDocumentValidation,e.s.bypassDocumentValidation===!0&&(m.bypassDocumentValidation=!0),e.s.checkKeys===!1&&(m.checkKeys=!1),m.retryWrites&&(o(p)&&(m.retryWrites=m.retryWrites&&!p.operations.some(function(e){return e.multi})),u(p)&&(m.retryWrites=m.retryWrites&&!p.operations.some(function(e){return e.limit===0})));g=n(p)?new v.InsertOperation(e.s.namespace,p.operations,m):o(p)?new E.UpdateOperation(e.s.namespace,p.operations,m):u(p)?new l.DeleteOperation(e.s.namespace,p.operations,m):null;if(g==null)throw new c.MongoRuntimeError("Unknown batchType: ".concat(p.batchType));A=null,S=void 0;R.label=3;case 3:R.trys.push([3,5,,6]);return[4,(0,h.executeOperation)(e.s.collection.client,g,m.timeoutContext)];case 4:S=R.sent();return[3,6];case 5:O=R.sent();A=O;return[3,6];case 6:if(A!=null)if(C(A,c.MongoWriteConcernError)){t(p,e.s.bulkResult,A,S);w=new b(e.s.bulkResult,e.isOrdered);throw new D({message:A.result.writeConcernError.errmsg,code:A.result.writeConcernError.code},w)}else throw new D(A,new b(e.s.bulkResult,e.isOrdered));t(p,e.s.bulkResult,A,S);_=new b(e.s.bulkResult,e.isOrdered);e.handleWriteError(_);R.label=7;case 7:i=true;return[3,2];case 8:return[3,11];case 9:T=R.sent();s=true;a=T;return[3,11];case 10:try{if(!i&&d.return!=null){d.return()}}finally{if(s){throw a}}return[7];case 11:e.s.batches.length=0;M=new b(e.s.bulkResult,e.isOrdered);return[2,(e.handleWriteError(M),M)]}})});return _.apply(this,arguments)}var D=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);var n;var o;n=d(this,t,[e]),n.writeErrors=[],C(e,O)?n.err=e:C(e,Error)||(n.message=e.message,n.code=e.code,n.writeErrors=(o=e.writeErrors)!==null&&o!==void 0?o:[]),n.result=r,Object.assign(n,e);return n}p(t,[{key:"name",get:function e(){return"MongoBulkWriteError"}},{key:"insertedCount",get:function e(){return this.result.insertedCount}},{key:"matchedCount",get:function e(){return this.result.matchedCount}},{key:"modifiedCount",get:function e(){return this.result.modifiedCount}},{key:"deletedCount",get:function e(){return this.result.deletedCount}},{key:"upsertedCount",get:function e(){return this.result.upsertedCount}},{key:"insertedIds",get:function e(){return this.result.insertedIds}},{key:"upsertedIds",get:function e(){return this.result.upsertedIds}}]);return t}(c.MongoServerError);e.MongoBulkWriteError=D;var T=/*#__PURE__*/function(){function t(e){f(this,t);this.bulkOperation=e}p(t,[{key:"update",value:function t(t){var r=i(this.bulkOperation);return this.bulkOperation.addToOperationsList(e.BatchType.UPDATE,(0,E.makeUpdateStatement)(r.selector,t,F(B({},r),{multi:!0})))}},{key:"updateOne",value:function t(t){if(!(0,y.hasAtomicOperators)(t))throw new c.MongoInvalidArgumentError("Update document requires atomic operators");var r=i(this.bulkOperation);return this.bulkOperation.addToOperationsList(e.BatchType.UPDATE,(0,E.makeUpdateStatement)(r.selector,t,F(B({},r),{multi:!1})))}},{key:"replaceOne",value:function t(t){if((0,y.hasAtomicOperators)(t))throw new c.MongoInvalidArgumentError("Replacement document must not use atomic operators");var r=i(this.bulkOperation);return this.bulkOperation.addToOperationsList(e.BatchType.UPDATE,(0,E.makeUpdateStatement)(r.selector,t,F(B({},r),{multi:!1})))}},{key:"deleteOne",value:function t(){var t=i(this.bulkOperation);return this.bulkOperation.addToOperationsList(e.BatchType.DELETE,(0,l.makeDeleteStatement)(t.selector,F(B({},t),{limit:1})))}},{key:"delete",value:function t(){var t=i(this.bulkOperation);return this.bulkOperation.addToOperationsList(e.BatchType.DELETE,(0,l.makeDeleteStatement)(t.selector,F(B({},t),{limit:0})))}},{key:"upsert",value:function e(){return this.bulkOperation.s.currentOp||(this.bulkOperation.s.currentOp={}),this.bulkOperation.s.currentOp.upsert=!0,this}},{key:"collation",value:function e(e){return this.bulkOperation.s.currentOp||(this.bulkOperation.s.currentOp={}),this.bulkOperation.s.currentOp.collation=e,this}},{key:"arrayFilters",value:function e(e){return this.bulkOperation.s.currentOp||(this.bulkOperation.s.currentOp={}),this.bulkOperation.s.currentOp.arrayFilters=e,this}},{key:"hint",value:function e(e){return this.bulkOperation.s.currentOp||(this.bulkOperation.s.currentOp={}),this.bulkOperation.s.currentOp.hint=e,this}}]);return t}();e.FindOperators=T;var M=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);var n;n=d(this,t,[r]),n.bulkOperation=e;return n}p(t,[{key:"commandName",get:function e(){return"bulkWrite"}},{key:"execute",value:function e(e,t,n){var o=this;return a(function(){return H(this,function(e){switch(e.label){case 0:o.options.session==null&&(o.options.session=t);return[4,r(o.bulkOperation,F(B({},o.options),{timeoutContext:n}))];case 1:return[2,e.sent()]}})})()}}]);return t}(m.AbstractOperation);e.BulkWriteShimOperation=M;var R=/*#__PURE__*/function(){function t(e,r,n){f(this,t);this.collection=e,this.isOrdered=n;var o=(0,y.getTopology)(e);r=r!==null&&r!==void 0?r:{};var u=e.s.namespace,i=!1,a=void 0,c=o.lastHello(),l=!!(o.s.options&&o.s.options.autoEncrypter),d=c&&c.maxBsonObjectSize?c.maxBsonObjectSize:1024*1024*16,h=l?1024*1024*2:d,v=c&&c.maxWriteBatchSize?c.maxWriteBatchSize:1e3,p=(v-1).toString(10).length+2,m=Object.assign({},r);m=(0,y.applyRetryableWrites)(m,e.s.db);var E={ok:1,writeErrors:[],writeConcernErrors:[],insertedIds:[],nInserted:0,nUpserted:0,nMatched:0,nModified:0,nRemoved:0,upserted:[]};this.s={bulkResult:E,currentBatch:void 0,currentIndex:0,currentBatchSize:0,currentBatchSizeBytes:0,currentInsertBatch:void 0,currentUpdateBatch:void 0,currentRemoveBatch:void 0,batches:[],writeConcern:g.WriteConcern.fromOptions(r),maxBsonObjectSize:d,maxBatchSizeBytes:h,maxWriteBatchSize:v,maxKeySize:p,namespace:u,topology:o,options:m,bsonOptions:(0,s.resolveBSONOptions)(r),currentOp:a,executed:i,collection:e,err:void 0,checkKeys:typeof r.checkKeys=="boolean"?r.checkKeys:!1},r.bypassDocumentValidation===!0&&(this.s.bypassDocumentValidation=!0)}p(t,[{key:"insert",value:function t(t){return(0,y.maybeAddIdToDocuments)(this.collection,t,{forceServerObjectId:this.shouldForceServerObjectId()}),this.addToOperationsList(e.BatchType.INSERT,t)}},{key:"find",value:function e(e){if(!e)throw new c.MongoInvalidArgumentError("Bulk find operation must specify a selector");return this.s.currentOp={selector:e},new T(this)}},{key:"raw",value:function t(t){if(t==null||(typeof t==="undefined"?"undefined":j(t))!="object")throw new c.MongoInvalidArgumentError("Operation must be an object with an operation key");if("insertOne"in t){var r=this.shouldForceServerObjectId(),n=t.insertOne&&t.insertOne.document==null?t.insertOne:t.insertOne.document;return(0,y.maybeAddIdToDocuments)(this.collection,n,{forceServerObjectId:r}),this.addToOperationsList(e.BatchType.INSERT,n)}if("replaceOne"in t||"updateOne"in t||"updateMany"in t){if("replaceOne"in t){if("q"in t.replaceOne)throw new c.MongoInvalidArgumentError("Raw operations are not allowed");var o=(0,E.makeUpdateStatement)(t.replaceOne.filter,t.replaceOne.replacement,F(B({},t.replaceOne),{multi:!1}));if((0,y.hasAtomicOperators)(o.u))throw new c.MongoInvalidArgumentError("Replacement document must not use atomic operators");return this.addToOperationsList(e.BatchType.UPDATE,o)}if("updateOne"in t){if("q"in t.updateOne)throw new c.MongoInvalidArgumentError("Raw operations are not allowed");var u=(0,E.makeUpdateStatement)(t.updateOne.filter,t.updateOne.update,F(B({},t.updateOne),{multi:!1}));if(!(0,y.hasAtomicOperators)(u.u))throw new c.MongoInvalidArgumentError("Update document requires atomic operators");return this.addToOperationsList(e.BatchType.UPDATE,u)}if("updateMany"in t){if("q"in t.updateMany)throw new c.MongoInvalidArgumentError("Raw operations are not allowed");var i=(0,E.makeUpdateStatement)(t.updateMany.filter,t.updateMany.update,F(B({},t.updateMany),{multi:!0}));if(!(0,y.hasAtomicOperators)(i.u))throw new c.MongoInvalidArgumentError("Update document requires atomic operators");return this.addToOperationsList(e.BatchType.UPDATE,i)}}if("deleteOne"in t){if("q"in t.deleteOne)throw new c.MongoInvalidArgumentError("Raw operations are not allowed");return this.addToOperationsList(e.BatchType.DELETE,(0,l.makeDeleteStatement)(t.deleteOne.filter,F(B({},t.deleteOne),{limit:1})))}if("deleteMany"in t){if("q"in t.deleteMany)throw new c.MongoInvalidArgumentError("Raw operations are not allowed");return this.addToOperationsList(e.BatchType.DELETE,(0,l.makeDeleteStatement)(t.deleteMany.filter,F(B({},t.deleteMany),{limit:0})))}throw new c.MongoInvalidArgumentError("bulkWrite only supports insertOne, updateOne, updateMany, deleteOne, deleteMany")}},{key:"length",get:function e(){return this.s.currentIndex}},{key:"bsonOptions",get:function e(){return this.s.bsonOptions}},{key:"writeConcern",get:function e(){return this.s.writeConcern}},{key:"batches",get:function e(){var e=U(this.s.batches);return this.isOrdered?this.s.currentBatch&&e.push(this.s.currentBatch):(this.s.currentInsertBatch&&e.push(this.s.currentInsertBatch),this.s.currentUpdateBatch&&e.push(this.s.currentUpdateBatch),this.s.currentRemoveBatch&&e.push(this.s.currentRemoveBatch)),e}},{key:"execute",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var t=this;return a(function(){var r,n,o;return H(this,function(u){switch(u.label){case 0:if(t.s.executed)throw new c.MongoBatchReExecutionError;r=g.WriteConcern.fromOptions(e);if(r&&(t.s.writeConcern=r),t.isOrdered?t.s.currentBatch&&t.s.batches.push(t.s.currentBatch):(t.s.currentInsertBatch&&t.s.batches.push(t.s.currentInsertBatch),t.s.currentUpdateBatch&&t.s.batches.push(t.s.currentUpdateBatch),t.s.currentRemoveBatch&&t.s.batches.push(t.s.currentRemoveBatch)),t.s.batches.length===0)throw new c.MongoInvalidArgumentError("Invalid BulkOperation, Batch cannot be empty");t.s.executed=!0;n=B({},t.s.options,e),o=new M(t,n);return[4,(0,h.executeOperation)(t.s.collection.client,o,n.timeoutContext)];case 1:return[2,u.sent()]}})})()}},{key:"handleWriteError",value:function e(e){if(this.s.bulkResult.writeErrors.length>0){var t=this.s.bulkResult.writeErrors[0].errmsg?this.s.bulkResult.writeErrors[0].errmsg:"write operation failed";throw new D({message:t,code:this.s.bulkResult.writeErrors[0].code,writeErrors:this.s.bulkResult.writeErrors},e)}var r=e.getWriteConcernError();if(r)throw new D(r,e)}},{key:"shouldForceServerObjectId",value:function e(){var e;return this.s.options.forceServerObjectId===!0||((e=this.s.collection.s.db.options)===null||e===void 0?void 0:e.forceServerObjectId)===!0}}]);return t}();e.BulkOperationBase=R});var eR=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.OrderedBulkOperation=void 0;var t=ea(),r=ec(),n=eM(),o=/*#__PURE__*/function(e){A(o,e);function o(e,t){f(this,o);return d(this,o,[e,t,!0])}p(o,[{key:"addToOperationsList",value:function e(e,o){var u=t.calculateObjectSize(o,{checkKeys:!1,ignoreUndefined:!1});if(u>=this.s.maxBsonObjectSize)throw new r.MongoInvalidArgumentError("Document is larger than the maximum size ".concat(this.s.maxBsonObjectSize));this.s.currentBatch==null&&(this.s.currentBatch=new n.Batch(e,this.s.currentIndex));var i=this.s.maxKeySize;if((this.s.currentBatchSize+1>=this.s.maxWriteBatchSize||this.s.currentBatchSize>0&&this.s.currentBatchSizeBytes+i+u>=this.s.maxBatchSizeBytes||this.s.currentBatch.batchType!==e)&&(this.s.batches.push(this.s.currentBatch),this.s.currentBatch=new n.Batch(e,this.s.currentIndex),this.s.currentBatchSize=0,this.s.currentBatchSizeBytes=0),e===n.BatchType.INSERT&&this.s.bulkResult.insertedIds.push({index:this.s.currentIndex,_id:o._id}),Array.isArray(o))throw new r.MongoInvalidArgumentError("Operation passed in cannot be an Array");return this.s.currentBatch.originalIndexes.push(this.s.currentIndex),this.s.currentBatch.operations.push(o),this.s.currentBatchSize+=1,this.s.currentBatchSizeBytes+=i+u,this.s.currentIndex+=1,this}}]);return o}(n.BulkOperationBase);e.OrderedBulkOperation=o});var ek=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.UnorderedBulkOperation=void 0;var t=ea(),r=ec(),n=eM(),o=/*#__PURE__*/function(e){A(o,e);function o(e,t){f(this,o);return d(this,o,[e,t,!1])}p(o,[{key:"handleWriteError",value:function e(e){if(!this.s.batches.length)return y(g(o.prototype),"handleWriteError",this).call(this,e)}},{key:"addToOperationsList",value:function e(e,o){var u=t.calculateObjectSize(o,{checkKeys:!1,ignoreUndefined:!1});if(u>=this.s.maxBsonObjectSize)throw new r.MongoInvalidArgumentError("Document is larger than the maximum size ".concat(this.s.maxBsonObjectSize));this.s.currentBatch=void 0,e===n.BatchType.INSERT?this.s.currentBatch=this.s.currentInsertBatch:e===n.BatchType.UPDATE?this.s.currentBatch=this.s.currentUpdateBatch:e===n.BatchType.DELETE&&(this.s.currentBatch=this.s.currentRemoveBatch);var i=this.s.maxKeySize;if(this.s.currentBatch==null&&(this.s.currentBatch=new n.Batch(e,this.s.currentIndex)),(this.s.currentBatch.size+1>=this.s.maxWriteBatchSize||this.s.currentBatch.size>0&&this.s.currentBatch.sizeBytes+i+u>=this.s.maxBatchSizeBytes||this.s.currentBatch.batchType!==e)&&(this.s.batches.push(this.s.currentBatch),this.s.currentBatch=new n.Batch(e,this.s.currentIndex)),Array.isArray(o))throw new r.MongoInvalidArgumentError("Operation passed in cannot be an Array");return this.s.currentBatch.operations.push(o),this.s.currentBatch.originalIndexes.push(this.s.currentIndex),this.s.currentIndex=this.s.currentIndex+1,e===n.BatchType.INSERT?(this.s.currentInsertBatch=this.s.currentBatch,this.s.bulkResult.insertedIds.push({index:this.s.bulkResult.insertedIds.length,_id:o._id})):e===n.BatchType.UPDATE?this.s.currentUpdateBatch=this.s.currentBatch:e===n.BatchType.DELETE&&(this.s.currentRemoveBatch=this.s.currentBatch),this.s.currentBatch.size+=1,this.s.currentBatch.sizeBytes+=i+u,this}}]);return o}(n.BulkOperationBase);e.UnorderedBulkOperation=o});var eI=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.AggregateOperation=e.DB_AGGREGATE_COLLECTION=void 0;var t=eE(),r=ec(),n=eg(),o=ey(),u=r3(),i=eC();e.DB_AGGREGATE_COLLECTION=1;var s=8,c=/*#__PURE__*/function(u){A(i,u);function i(t,n,o){f(this,i);var u;if(u=d(this,i,[void 0,F(B({},o),{dbName:t.db})]),u.options=B({},o),u.target=t.collection||e.DB_AGGREGATE_COLLECTION,u.pipeline=n,u.hasWriteStage=!1,typeof(o===null||o===void 0?void 0:o.out)=="string")u.pipeline=u.pipeline.concat({$out:o.out}),u.hasWriteStage=!0;else if(n.length>0){var s=n[n.length-1];(s.$out||s.$merge)&&(u.hasWriteStage=!0)}if(u.hasWriteStage?u.trySecondaryWrite=!0:delete u.options.writeConcern,u.explain&&u.writeConcern)throw new r.MongoInvalidArgumentError('Option "explain" cannot be used on an aggregate call with writeConcern');if((o===null||o===void 0?void 0:o.cursor)!=null&&j(o.cursor)!="object")throw new r.MongoInvalidArgumentError("Cursor options must be an object");return u}p(i,[{key:"commandName",get:function e(){return"aggregate"}},{key:"canRetryRead",get:function e(){return!this.hasWriteStage}},{key:"addToPipeline",value:function e(e){this.pipeline.push(e)}},{key:"execute",value:function e(e,r,u){var c=this;var l=this,d=function(){return y(g(i.prototype),"executeCommand",c)};return a(function(){var i,a,c;return H(this,function(f){switch(f.label){case 0:i=l.options,a=(0,n.maxWireVersion)(e),c={aggregate:l.target,pipeline:l.pipeline};l.hasWriteStage&&a<s&&(l.readConcern=void 0),l.hasWriteStage&&l.writeConcern&&o.WriteConcern.apply(c,l.writeConcern),i.bypassDocumentValidation===!0&&(c.bypassDocumentValidation=i.bypassDocumentValidation),typeof i.allowDiskUse=="boolean"&&(c.allowDiskUse=i.allowDiskUse),i.hint&&(c.hint=i.hint),i.let&&(c.let=i.let),i.comment!==void 0&&(c.comment=i.comment),c.cursor=i.cursor||{},i.batchSize&&!l.hasWriteStage&&(c.cursor.batchSize=i.batchSize);return[4,d().call(l,e,r,c,u,l.explain?t.ExplainedCursorResponse:t.CursorResponse)];case 1:return[2,f.sent()]}})})()}}]);return i}(u.CommandOperation);e.AggregateOperation=c;(0,i.defineAspects)(c,[i.Aspect.READ_OPERATION,i.Aspect.RETRYABLE,i.Aspect.EXPLAINABLE,i.Aspect.CURSOR_CREATING])});var eN=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.AggregationCursor=void 0;var t=ec(),r=r2(),n=eI(),o=eS(),u=eg(),i=r0(),s=/*#__PURE__*/function(e){A(s,e);function s(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};f(this,s);var u;u=d(this,s,[e,r,o]),u.pipeline=n,u.aggregateOptions=o;var a=u.pipeline[u.pipeline.length-1];if(u.cursorOptions.timeoutMS!=null&&u.cursorOptions.timeoutMode===i.CursorTimeoutMode.ITERATION&&((a===null||a===void 0?void 0:a.$merge)!=null||(a===null||a===void 0?void 0:a.$out)!=null))throw new t.MongoAPIError("Cannot use $out or $merge stage with ITERATION timeoutMode");return u}p(s,[{key:"clone",value:function e(){var e=(0,u.mergeOptions)({},this.aggregateOptions);return delete e.session,new s(this.client,this.namespace,this.pipeline,B({},e))}},{key:"map",value:function e(e){return y(g(s.prototype),"map",this).call(this,e)}},{key:"_initialize",value:function e(e){var u=this;return a(function(){var i,s,a;return H(this,function(c){switch(c.label){case 0:i=F(B({},u.aggregateOptions,u.cursorOptions),{session:e,signal:u.signal});if(i.explain)try{(0,r.validateExplainTimeoutOptions)(i,r.Explain.fromOptions(i))}catch(e){throw new t.MongoAPIError("timeoutMS cannot be used with explain when explain is specified in aggregateOptions")}s=new n.AggregateOperation(u.namespace,u.pipeline,i);return[4,(0,o.executeOperation)(u.client,s,u.timeoutContext)];case 1:a=c.sent();return[2,{server:s.server,session:e,response:a}]}})})()}},{key:"explain",value:function e(e,t){var r=this;return a(function(){var u,i,s;return H(this,function(a){switch(a.label){case 0:u=r.resolveExplainTimeoutOptions(e,t),i=u.explain,s=u.timeout;return[4,(0,o.executeOperation)(r.client,new n.AggregateOperation(r.namespace,r.pipeline,F(B({},r.aggregateOptions,r.cursorOptions,s),{explain:i!==null&&i!==void 0?i:!0})))];case 1:return[2,a.sent().shift(r.deserializationOptions)]}})})()}},{key:"addStage",value:function e(e){if(this.throwIfInitialized(),this.cursorOptions.timeoutMS!=null&&this.cursorOptions.timeoutMode===i.CursorTimeoutMode.ITERATION&&(e.$out!=null||e.$merge!=null))throw new t.MongoAPIError("Cannot use $out or $merge stage with ITERATION timeoutMode");return this.pipeline.push(e),this}},{key:"group",value:function e(e){return this.addStage({$group:e})}},{key:"limit",value:function e(e){return this.addStage({$limit:e})}},{key:"match",value:function e(e){return this.addStage({$match:e})}},{key:"out",value:function e(e){return this.addStage({$out:e})}},{key:"project",value:function e(e){return this.addStage({$project:e})}},{key:"lookup",value:function e(e){return this.addStage({$lookup:e})}},{key:"redact",value:function e(e){return this.addStage({$redact:e})}},{key:"skip",value:function e(e){return this.addStage({$skip:e})}},{key:"sort",value:function e(e){return this.addStage({$sort:e})}},{key:"unwind",value:function e(e){return this.addStage({$unwind:e})}},{key:"geoNear",value:function e(e){return this.addStage({$geoNear:e})}}]);return s}(r.ExplainableCursor);e.AggregationCursor=s});var eP=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.CountOperation=void 0;var t=r3(),r=eC(),n=/*#__PURE__*/function(e){A(t,e);function t(e,r,n){f(this,t);var o;o=d(this,t,[{s:{namespace:e}},n]),o.options=n,o.collectionName=e.collection,o.query=r;return o}p(t,[{key:"commandName",get:function e(){return"count"}},{key:"execute",value:function e(e,r,n){var o=this;var u=this,i=function(){return y(g(t.prototype),"executeCommand",o)};return a(function(){var t,o,s;return H(this,function(a){switch(a.label){case 0:t=u.options,o={count:u.collectionName,query:u.query};typeof t.limit=="number"&&(o.limit=t.limit),typeof t.skip=="number"&&(o.skip=t.skip),t.hint!=null&&(o.hint=t.hint),typeof t.maxTimeMS=="number"&&(o.maxTimeMS=t.maxTimeMS);return[4,i().call(u,e,r,o,n)];case 1:s=a.sent();return[2,s?s.n:0]}})})()}}]);return t}(t.CommandOperation);e.CountOperation=n;(0,r.defineAspects)(n,[r.Aspect.READ_OPERATION,r.Aspect.RETRYABLE])});var ex=et(function(e){"use strict";var t=function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;var t="".concat(e).toLowerCase();if(r(e))return e;switch(t){case"ascending":case"asc":case"1":return 1;case"descending":case"desc":case"-1":return-1;default:throw new f.MongoInvalidArgumentError("Invalid sort direction: ".concat(JSON.stringify(e)))}};var r=function e(e){return(typeof e==="undefined"?"undefined":j(e))=="object"&&e!=null&&"$meta"in e&&typeof e.$meta=="string"};var n=function e(e){if(Array.isArray(e)&&e.length===2)try{return t(e[1]),!0}catch(e){return!1}return!1};var o=function e(e){return Array.isArray(e)&&Array.isArray(e[0])};var u=function e(e){return C(e,Map)&&e.size>0};var i=function e(e){return new Map([["".concat(e[0]),t([e[1]])]])};var s=function e(e){var r=e.map(function(e){var r=N(e,2),n=r[0],o=r[1];return["".concat(n),t(o)]});return new Map(r)};var a=function e(e){var t=e.map(function(e){return["".concat(e),1]});return new Map(t)};var c=function e(e){var r=Object.entries(e).map(function(e){var r=N(e,2),n=r[0],o=r[1];return["".concat(n),t(o)]});return new Map(r)};var l=function e(e){var r=Array.from(e).map(function(e){var r=N(e,2),n=r[0],o=r[1];return["".concat(n),t(o)]});return new Map(r)};var d=function e(e,r){if(e!=null){if(typeof e=="string")return new Map([[e,t(r)]]);if((typeof e==="undefined"?"undefined":j(e))!="object")throw new f.MongoInvalidArgumentError("Invalid sort format: ".concat(JSON.stringify(e)," Sort must be a valid object"));if(!Array.isArray(e))return u(e)?l(e):Object.keys(e).length?c(e):void 0;if(e.length)return o(e)?s(e):n(e)?i(e):a(e)}};ei();Object.defineProperty(e,"__esModule",{value:!0});e.formatSort=d;var f=ec()});var eL=et(function(e){"use strict";var t=function e(e,t,r){var n={find:e.collection,filter:t};if(r.sort&&(n.sort=(0,i.formatSort)(r.sort)),r.projection){var o=r.projection;o&&Array.isArray(o)&&(o=o.length?o.reduce(function(e,t){return e[t]=1,e},{}):{_id:1}),n.projection=o}r.hint&&(n.hint=(0,s.normalizeHintField)(r.hint)),typeof r.skip=="number"&&(n.skip=r.skip),typeof r.limit=="number"&&(r.limit<0?(n.limit=-r.limit,n.singleBatch=!0):n.limit=r.limit),typeof r.batchSize=="number"&&(r.batchSize<0?(r.limit&&r.limit!==0&&Math.abs(r.batchSize)<Math.abs(r.limit)&&(n.limit=-r.batchSize),n.singleBatch=!0):n.batchSize=r.batchSize),typeof r.singleBatch=="boolean"&&(n.singleBatch=r.singleBatch),r.comment!==void 0&&(n.comment=r.comment),typeof r.maxTimeMS=="number"&&(n.maxTimeMS=r.maxTimeMS);var a=u.ReadConcern.fromOptions(r);return a&&(n.readConcern=a.toJSON()),r.max&&(n.max=r.max),r.min&&(n.min=r.min),typeof r.returnKey=="boolean"&&(n.returnKey=r.returnKey),typeof r.showRecordId=="boolean"&&(n.showRecordId=r.showRecordId),typeof r.tailable=="boolean"&&(n.tailable=r.tailable),typeof r.oplogReplay=="boolean"&&(n.oplogReplay=r.oplogReplay),typeof r.timeout=="boolean"?n.noCursorTimeout=!r.timeout:typeof r.noCursorTimeout=="boolean"&&(n.noCursorTimeout=r.noCursorTimeout),typeof r.awaitData=="boolean"&&(n.awaitData=r.awaitData),typeof r.allowPartialResults=="boolean"&&(n.allowPartialResults=r.allowPartialResults),r.collation&&(n.collation=r.collation),typeof r.allowDiskUse=="boolean"&&(n.allowDiskUse=r.allowDiskUse),r.let&&(n.let=r.let),n};ei();Object.defineProperty(e,"__esModule",{value:!0});e.FindOperation=void 0;var r=eE(),n=ec(),o=r2(),u=ep(),i=ex(),s=eg(),c=r3(),l=eC(),h=/*#__PURE__*/function(e){A(u,e);function u(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};f(this,u);var o;if(o=d(this,u,[void 0,r]),o.options=B({},r),delete o.options.writeConcern,o.ns=e,(typeof t==="undefined"?"undefined":j(t))!="object"||Array.isArray(t))throw new n.MongoInvalidArgumentError("Query filter must be a plain object or ObjectId");o.filter=t!=null&&t._bsontype==="ObjectId"?{_id:t}:t;return o}p(u,[{key:"commandName",get:function e(){return"find"}},{key:"execute",value:function e(e,n,u){var i=this;return a(function(){var s,a;return H(this,function(c){switch(c.label){case 0:i.server=e;s=i.options,a=t(i.ns,i.filter,s);i.explain&&((0,o.validateExplainTimeoutOptions)(i.options,i.explain),a=(0,o.decorateWithExplain)(a,i.explain));return[4,e.command(i.ns,a,F(B({},i.options,i.bsonOptions),{documentsReturnedIn:"firstBatch",session:n,timeoutContext:u}),i.explain?r.ExplainedCursorResponse:r.CursorResponse)];case 1:return[2,c.sent()]}})})()}}]);return u}(c.CommandOperation);e.FindOperation=h;(0,l.defineAspects)(h,[l.Aspect.READ_OPERATION,l.Aspect.RETRYABLE,l.Aspect.EXPLAINABLE,l.Aspect.CURSOR_CREATING])});var eU=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.FindCursor=e.FLAGS=void 0;var t=eE(),r=ec(),n=r2(),o=eP(),u=eS(),i=eL(),s=ex(),c=eg();e.FLAGS=["tailable","oplogReplay","noCursorTimeout","awaitData","exhaust","partial"];var l=/*#__PURE__*/function(e){A(l,e);function l(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};f(this,l);var o;o=d(this,l,[e,t,n]),o.numReturned=0,o.cursorFilter=r,o.findOptions=n,n.sort!=null&&(o.findOptions.sort=(0,s.formatSort)(n.sort));return o}p(l,[{key:"clone",value:function e(){var e=(0,c.mergeOptions)({},this.findOptions);return delete e.session,new l(this.client,this.namespace,this.cursorFilter,B({},e))}},{key:"map",value:function e(e){return y(g(l.prototype),"map",this).call(this,e)}},{key:"_initialize",value:function e(e){var t=this;return a(function(){var o,s,a;return H(this,function(c){switch(c.label){case 0:o=F(B({},t.findOptions,t.cursorOptions),{session:e,signal:t.signal});if(o.explain)try{(0,n.validateExplainTimeoutOptions)(o,n.Explain.fromOptions(o))}catch(e){throw new r.MongoAPIError("timeoutMS cannot be used with explain when explain is specified in findOptions")}s=new i.FindOperation(t.namespace,t.cursorFilter,o);return[4,(0,u.executeOperation)(t.client,s,t.timeoutContext)];case 1:a=c.sent();return[2,(t.numReturned=a.batchSize,{server:s.server,session:e,response:a})]}})})()}},{key:"getMore",value:function e(e){var r=this;var n=this,o=function(){return y(g(l.prototype),"getMore",r)};return a(function(){var r,u,i,s;return H(this,function(a){switch(a.label){case 0:r=n.numReturned;if(!r)return[3,5];u=n.findOptions.limit;if(!(e=u&&u>0&&r+e>u?u-r:e,e<=0))return[3,5];a.label=1;case 1:a.trys.push([1,3,,4]);return[4,n.close()];case 2:a.sent();return[3,4];case 3:i=a.sent();(0,c.squashError)(i);return[3,4];case 4:return[2,t.CursorResponse.emptyGetMore];case 5:return[4,o().call(n,e)];case 6:s=a.sent();return[2,(n.numReturned=n.numReturned+s.batchSize,s)]}})})()}},{key:"count",value:function e(e){var t=this;return a(function(){return H(this,function(n){switch(n.label){case 0:if((0,c.emitWarningOnce)("cursor.count is deprecated and will be removed in the next major version, please use `collection.estimatedDocumentCount` or `collection.countDocuments` instead "),typeof e=="boolean")throw new r.MongoInvalidArgumentError("Invalid first parameter to count");return[4,(0,u.executeOperation)(t.client,new o.CountOperation(t.namespace,t.cursorFilter,B({},t.findOptions,t.cursorOptions,e)))];case 1:return[2,n.sent()]}})})()}},{key:"explain",value:function e(e,t){var r=this;return a(function(){var n,o,s;return H(this,function(a){switch(a.label){case 0:n=r.resolveExplainTimeoutOptions(e,t),o=n.explain,s=n.timeout;return[4,(0,u.executeOperation)(r.client,new i.FindOperation(r.namespace,r.cursorFilter,F(B({},r.findOptions,r.cursorOptions,s),{explain:o!==null&&o!==void 0?o:!0})))];case 1:return[2,a.sent().shift(r.deserializationOptions)]}})})()}},{key:"filter",value:function e(e){return this.throwIfInitialized(),this.cursorFilter=e,this}},{key:"hint",value:function e(e){return this.throwIfInitialized(),this.findOptions.hint=e,this}},{key:"min",value:function e(e){return this.throwIfInitialized(),this.findOptions.min=e,this}},{key:"max",value:function e(e){return this.throwIfInitialized(),this.findOptions.max=e,this}},{key:"returnKey",value:function e(e){return this.throwIfInitialized(),this.findOptions.returnKey=e,this}},{key:"showRecordId",value:function e(e){return this.throwIfInitialized(),this.findOptions.showRecordId=e,this}},{key:"addQueryModifier",value:function e(e,t){if(this.throwIfInitialized(),e[0]!=="$")throw new r.MongoInvalidArgumentError("".concat(e," is not a valid query modifier"));switch(e.substr(1)){case"comment":this.findOptions.comment=t;break;case"explain":this.findOptions.explain=t;break;case"hint":this.findOptions.hint=t;break;case"max":this.findOptions.max=t;break;case"maxTimeMS":this.findOptions.maxTimeMS=t;break;case"min":this.findOptions.min=t;break;case"orderby":this.findOptions.sort=(0,s.formatSort)(t);break;case"query":this.cursorFilter=t;break;case"returnKey":this.findOptions.returnKey=t;break;case"showDiskLoc":this.findOptions.showRecordId=t;break;default:throw new r.MongoInvalidArgumentError("Invalid query modifier: ".concat(e))}return this}},{key:"comment",value:function e(e){return this.throwIfInitialized(),this.findOptions.comment=e,this}},{key:"maxAwaitTimeMS",value:function e(e){if(this.throwIfInitialized(),typeof e!="number")throw new r.MongoInvalidArgumentError("Argument for maxAwaitTimeMS must be a number");return this.findOptions.maxAwaitTimeMS=e,this}},{key:"maxTimeMS",value:function e(e){if(this.throwIfInitialized(),typeof e!="number")throw new r.MongoInvalidArgumentError("Argument for maxTimeMS must be a number");return this.findOptions.maxTimeMS=e,this}},{key:"project",value:function e(e){return this.throwIfInitialized(),this.findOptions.projection=e,this}},{key:"sort",value:function e(e,t){if(this.throwIfInitialized(),this.findOptions.tailable)throw new r.MongoTailableCursorError("Tailable cursor does not support sorting");return this.findOptions.sort=(0,s.formatSort)(e,t),this}},{key:"allowDiskUse",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(this.throwIfInitialized(),!this.findOptions.sort)throw new r.MongoInvalidArgumentError('Option "allowDiskUse" requires a sort specification');return e?(this.findOptions.allowDiskUse=!0,this):(this.findOptions.allowDiskUse=!1,this)}},{key:"collation",value:function e(e){return this.throwIfInitialized(),this.findOptions.collation=e,this}},{key:"limit",value:function e(e){if(this.throwIfInitialized(),this.findOptions.tailable)throw new r.MongoTailableCursorError("Tailable cursor does not support limit");if(typeof e!="number")throw new r.MongoInvalidArgumentError('Operation "limit" requires an integer');return this.findOptions.limit=e,this}},{key:"skip",value:function e(e){if(this.throwIfInitialized(),this.findOptions.tailable)throw new r.MongoTailableCursorError("Tailable cursor does not support skip");if(typeof e!="number")throw new r.MongoInvalidArgumentError('Operation "skip" requires an integer');return this.findOptions.skip=e,this}}]);return l}(n.ExplainableCursor);e.FindCursor=l});var ej=et(function(e){"use strict";var t=function e(e){return typeof e=="number"||e==="2d"||e==="2dsphere"||e==="text"||e==="geoHaystack"};var r=function e(e){return Array.isArray(e)&&e.length===2&&t(e[1])};var n=function e(e){var t=new Map,n=!Array.isArray(e)||r(e)?[e]:e;var o;var u=true,i=false,a=undefined,c=true,l=false,d=undefined,f=true,h=false,v=undefined;try{for(var p=n[Symbol.iterator](),m;!(f=(m=p.next()).done);f=true){var E=m.value;if(typeof E=="string")t.set(E,1);else if(Array.isArray(E))t.set(E[0],(o=E[1])!==null&&o!==void 0?o:1);else if(C(E,Map))try{for(var y=E[Symbol.iterator](),g;!(u=(g=y.next()).done);u=true){var A=N(g.value,2),S=A[0],b=A[1];t.set(S,b)}}catch(e){i=true;a=e}finally{try{if(!u&&y.return!=null){y.return()}}finally{if(i){throw a}}}else if((0,s.isObject)(E))try{for(var O=Object.entries(E)[Symbol.iterator](),w;!(c=(w=O.next()).done);c=true){var _=N(w.value,2),D=_[0],B=_[1];t.set(D,B)}}catch(e){l=true;d=e}finally{try{if(!c&&O.return!=null){O.return()}}finally{if(l){throw d}}}}}catch(e){h=true;v=e}finally{try{if(!f&&p.return!=null){p.return()}}finally{if(h){throw v}}}return t};var o=function e(e){var t=Object.entries(e).filter(function(e){var t=N(e,1),r=t[0];return h.has(r)});return Object.fromEntries(t.map(function(e){var t=N(e,2),r=t[0],n=t[1];return r==="version"?["v",n]:[r,n]}))};ei();Object.defineProperty(e,"__esModule",{value:!0});e.ListIndexesOperation=e.DropIndexOperation=e.CreateIndexesOperation=void 0;var u=eE(),i=ec(),s=eg(),c=r3(),l=eC(),h=new Set(["background","unique","name","partialFilterExpression","sparse","hidden","expireAfterSeconds","storageEngine","collation","version","weights","default_language","language_override","textIndexVersion","2dsphereIndexVersion","bits","min","max","bucketSize","wildcardProjection"]);var v=/*#__PURE__*/function(e){A(t,e);function t(e,r,n,u){f(this,t);var i;i=d(this,t,[e,u]),i.options=u!==null&&u!==void 0?u:{},i.collectionName=r,i.indexes=n.map(function(e){var t;var r=C(e.key,Map)?e.key:new Map(Object.entries(e.key)),n=(t=e.name)!==null&&t!==void 0?t:Array.from(r).flat().join("_");return F(B({},o(e)),{name:n,key:r})});return i}p(t,[{key:"commandName",get:function e(){return"createIndexes"}},{key:"execute",value:function e(e,r,n){var o=this;var u=this,c=function(){return y(g(t.prototype),"executeCommand",o)};return a(function(){var t,o,a,l;return H(this,function(d){switch(d.label){case 0:t=u.options,o=u.indexes,a=(0,s.maxWireVersion)(e),l={createIndexes:u.collectionName,indexes:o};if(t.commitQuorum!=null){if(a<9)throw new i.MongoCompatibilityError("Option `commitQuorum` for `createIndexes` not supported on servers < 4.4");l.commitQuorum=t.commitQuorum}u.options.collation=void 0;return[4,c().call(u,e,r,l,n)];case 1:return[2,(d.sent(),o.map(function(e){return e.name||""}))]}})})()}}],[{key:"fromIndexDescriptionArray",value:function e(e,r,n,o){return new t(e,r,n,o)}},{key:"fromIndexSpecification",value:function e(e,r,o){var u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};var i=n(o),s=F(B({},u),{key:i});return new t(e,r,[s],u)}}]);return t}(c.CommandOperation);e.CreateIndexesOperation=v;var m=/*#__PURE__*/function(e){A(t,e);function t(e,r,n){f(this,t);var o;o=d(this,t,[e,n]),o.options=n!==null&&n!==void 0?n:{},o.collection=e,o.indexName=r;return o}p(t,[{key:"commandName",get:function e(){return"dropIndexes"}},{key:"execute",value:function e(e,r,n){var o=this;var u=this,i=function(){return y(g(t.prototype),"executeCommand",o)};return a(function(){var t;return H(this,function(o){switch(o.label){case 0:t={dropIndexes:u.collection.collectionName,index:u.indexName};return[4,i().call(u,e,r,t,n)];case 1:return[2,o.sent()]}})})()}}]);return t}(c.CommandOperation);e.DropIndexOperation=m;var E=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);var n;n=d(this,t,[e,r]),n.options=B({},r),delete n.options.writeConcern,n.collectionNamespace=e.s.namespace;return n}p(t,[{key:"commandName",get:function e(){return"listIndexes"}},{key:"execute",value:function e(e,r,n){var o=this;var i=this,c=function(){return y(g(t.prototype),"executeCommand",o)};return a(function(){var t,o,a;return H(this,function(l){switch(l.label){case 0:t=(0,s.maxWireVersion)(e),o=i.options.batchSize?{batchSize:i.options.batchSize}:{},a={listIndexes:i.collectionNamespace.collection,cursor:o};t>=9&&i.options.comment!==void 0&&(a.comment=i.options.comment);return[4,c().call(i,e,r,a,n,u.CursorResponse)];case 1:return[2,l.sent()]}})})()}}]);return t}(c.CommandOperation);e.ListIndexesOperation=E;(0,l.defineAspects)(E,[l.Aspect.READ_OPERATION,l.Aspect.RETRYABLE,l.Aspect.CURSOR_CREATING]);(0,l.defineAspects)(v,[l.Aspect.WRITE_OPERATION]);(0,l.defineAspects)(m,[l.Aspect.WRITE_OPERATION])});var ez=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.ListIndexesCursor=void 0;var t=eS(),r=ej(),n=r0(),o=/*#__PURE__*/function(e){A(n,e);function n(e,t){f(this,n);var r;r=d(this,n,[e.client,e.s.namespace,t]),r.parent=e,r.options=t;return r}p(n,[{key:"clone",value:function e(){return new n(this.parent,B({},this.options,this.cursorOptions))}},{key:"_initialize",value:function e(e){var n=this;return a(function(){var o,u;return H(this,function(i){switch(i.label){case 0:o=new r.ListIndexesOperation(n.parent,F(B({},n.cursorOptions,n.options),{session:e}));return[4,(0,t.executeOperation)(n.parent.client,o,n.timeoutContext)];case 1:u=i.sent();return[2,{server:o.server,session:e,response:u}]}})})()}}]);return n}(n.AbstractCursor);e.ListIndexesCursor=o});var eW=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.ListSearchIndexesCursor=void 0;var t=eN(),r=/*#__PURE__*/function(e){A(t,e);function t(e,r){var n=e.fullNamespace,o=e.client,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};f(this,t);var i=r==null?[{$listSearchIndexes:{}}]:[{$listSearchIndexes:{name:r}}];return d(this,t,[o,n,i,u])}return t}(t.AggregationCursor);e.ListSearchIndexesCursor=r});var eV=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.DistinctOperation=void 0;var t=eg(),r=r3(),n=eC(),o=/*#__PURE__*/function(e){A(r,e);function r(e,t,n,o){f(this,r);var u;u=d(this,r,[e,o]),u.options=o!==null&&o!==void 0?o:{},u.collection=e,u.key=t,u.query=n;return u}p(r,[{key:"commandName",get:function e(){return"distinct"}},{key:"execute",value:function e(e,n,o){var u=this;var i=this,s=function(){return y(g(r.prototype),"executeCommand",u)};return a(function(){var r,u,a,c,l,d;return H(this,function(f){switch(f.label){case 0:r=i.collection,u=i.key,a=i.query,c=i.options,l={distinct:r.collectionName,key:u,query:a};typeof c.maxTimeMS=="number"&&(l.maxTimeMS=c.maxTimeMS),j(c.comment)<"u"&&(l.comment=c.comment),(0,t.decorateWithReadConcern)(l,r,c),(0,t.decorateWithCollation)(l,r,c);return[4,s().call(i,e,n,l,o)];case 1:d=f.sent();return[2,i.explain?d:d.values]}})})()}}]);return r}(r.CommandOperation);e.DistinctOperation=o;(0,n.defineAspects)(o,[n.Aspect.READ_OPERATION,n.Aspect.RETRYABLE,n.Aspect.EXPLAINABLE])});var eG=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.DropDatabaseOperation=e.DropCollectionOperation=void 0;var t=ec(),r=r3(),n=eC(),o=/*#__PURE__*/function(e){A(r,e);function r(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};f(this,r);var o;o=d(this,r,[e,n]),o.db=e,o.options=n,o.name=t;return o}p(r,[{key:"commandName",get:function e(){return"drop"}},{key:"execute",value:function e(e,n,o){var u=this;return a(function(){var i,s,a,c,l,d,f,h,v,p,m,E,y,g,A,S,b,O;return H(this,function(w){switch(w.label){case 0:d=u.db,f=u.options,h=u.name,v=(i=d.client.s.options.autoEncryption)===null||i===void 0?void 0:i.encryptedFieldsMap,p=(l=f.encryptedFields)!==null&&l!==void 0?l:v===null||v===void 0?void 0:v["".concat(d.databaseName,".").concat(h)];m=!p&&v;if(!m)return[3,2];return[4,d.listCollections({name:h},{nameOnly:!1}).toArray()];case 1:m=p=(c=w.sent())===null||c===void 0?void 0:(a=c[0])===null||a===void 0?void 0:(s=a.options)===null||s===void 0?void 0:s.encryptedFields;w.label=2;case 2:if(!(m,p))return[3,8];E=p.escCollection||"enxcol_.".concat(h,".esc"),y=p.ecocCollection||"enxcol_.".concat(h,".ecoc");g=0,A=[E,y];w.label=3;case 3:if(!(g<A.length))return[3,8];S=A[g];b=new r(d,S);w.label=4;case 4:w.trys.push([4,6,,7]);return[4,b.executeWithoutEncryptedFieldsCheck(e,n,o)];case 5:w.sent();return[3,7];case 6:O=w.sent();if(!C(O,t.MongoServerError)||O.code!==t.MONGODB_ERROR_CODES.NamespaceNotFound)throw O;return[3,7];case 7:g++;return[3,3];case 8:return[4,u.executeWithoutEncryptedFieldsCheck(e,n,o)];case 9:return[2,w.sent()]}})})()}},{key:"executeWithoutEncryptedFieldsCheck",value:function e(e,t,n){var o=this;var u=this,i=function(){return y(g(r.prototype),"executeCommand",o)};return a(function(){return H(this,function(r){switch(r.label){case 0:return[4,i().call(u,e,t,{drop:u.name},n)];case 1:return[2,(r.sent(),!0)]}})})()}}]);return r}(r.CommandOperation);e.DropCollectionOperation=o;var u=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);var n;n=d(this,t,[e,r]),n.options=r;return n}p(t,[{key:"commandName",get:function e(){return"dropDatabase"}},{key:"execute",value:function e(e,r,n){var o=this;var u=this,i=function(){return y(g(t.prototype),"executeCommand",o)};return a(function(){return H(this,function(t){switch(t.label){case 0:return[4,i().call(u,e,r,{dropDatabase:1},n)];case 1:return[2,(t.sent(),!0)]}})})()}}]);return t}(r.CommandOperation);e.DropDatabaseOperation=u;(0,n.defineAspects)(o,[n.Aspect.WRITE_OPERATION]);(0,n.defineAspects)(u,[n.Aspect.WRITE_OPERATION])});var eH=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.EstimatedDocumentCountOperation=void 0;var t=r3(),r=eC(),n=/*#__PURE__*/function(e){A(t,e);function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};f(this,t);var n;n=d(this,t,[e,r]),n.options=r,n.collectionName=e.collectionName;return n}p(t,[{key:"commandName",get:function e(){return"count"}},{key:"execute",value:function e(e,r,n){var o=this;var u=this,i=function(){return y(g(t.prototype),"executeCommand",o)};return a(function(){var t,o;return H(this,function(s){switch(s.label){case 0:o={count:u.collectionName};typeof u.options.maxTimeMS=="number"&&(o.maxTimeMS=u.options.maxTimeMS),u.options.comment!==void 0&&(o.comment=u.options.comment);return[4,i().call(u,e,r,o,n)];case 1:return[2,((t=s.sent())===null||t===void 0?void 0:t.n)||0]}})})()}}]);return t}(t.CommandOperation);e.EstimatedDocumentCountOperation=n;(0,r.defineAspects)(n,[r.Aspect.READ_OPERATION,r.Aspect.RETRYABLE,r.Aspect.CURSOR_CREATING])});var eq=et(function(e){"use strict";var t=function t(t,r){return t.new=r.returnDocument===e.ReturnDocument.AFTER,t.upsert=r.upsert===!0,r.bypassDocumentValidation===!0&&(t.bypassDocumentValidation=r.bypassDocumentValidation),t};ei();Object.defineProperty(e,"__esModule",{value:!0});e.FindOneAndUpdateOperation=e.FindOneAndReplaceOperation=e.FindOneAndDeleteOperation=e.FindAndModifyOperation=e.ReturnDocument=void 0;var r=ec(),n=el(),o=ex(),u=eg(),i=r3(),s=eC();e.ReturnDocument=Object.freeze({BEFORE:"before",AFTER:"after"});var c=/*#__PURE__*/function(e){A(t,e);function t(e,r,u){f(this,t);var i;var s;i=d(this,t,[e,u]),i.options=u!==null&&u!==void 0?u:{},i.cmdBase={remove:!1,new:!1,upsert:!1},(s=u.includeResultMetadata)!==null&&s!==void 0?s:u.includeResultMetadata=!1;var a=(0,o.formatSort)(u.sort);a&&(i.cmdBase.sort=a),u.projection&&(i.cmdBase.fields=u.projection),u.maxTimeMS&&(i.cmdBase.maxTimeMS=u.maxTimeMS),u.writeConcern&&(i.cmdBase.writeConcern=u.writeConcern),u.let&&(i.cmdBase.let=u.let),u.comment!==void 0&&(i.cmdBase.comment=u.comment),i.readPreference=n.ReadPreference.primary,i.collection=e,i.query=r;return i}p(t,[{key:"commandName",get:function e(){return"findAndModify"}},{key:"execute",value:function e(e,n,o){var i=this;var s=this,c=function(){return y(g(t.prototype),"executeCommand",i)};return a(function(){var t,i,a,l,d,f,h;return H(this,function(v){switch(v.label){case 0:t=s.collection,i=s.query,a=B({},s.options,s.bsonOptions),l=B({findAndModify:t.collectionName,query:i},s.cmdBase);if((0,u.decorateWithCollation)(l,t,a),a.hint){;if(((d=s.writeConcern)===null||d===void 0?void 0:d.w)===0||(0,u.maxWireVersion)(e)<8)throw new r.MongoCompatibilityError("The current topology does not support a hint on findAndModify commands");l.hint=a.hint}return[4,c().call(s,e,n,l,o)];case 1:f=v.sent();return[2,a.includeResultMetadata?f:(h=f.value)!==null&&h!==void 0?h:null]}})})()}}]);return t}(i.CommandOperation);e.FindAndModifyOperation=c;var l=/*#__PURE__*/function(e){A(t,e);function t(e,n,o){f(this,t);var u;if(n==null||(typeof n==="undefined"?"undefined":j(n))!="object")throw new r.MongoInvalidArgumentError('Argument "filter" must be an object');u=d(this,t,[e,n,o]),u.cmdBase.remove=!0;return u}return t}(c);e.FindOneAndDeleteOperation=l;var h=/*#__PURE__*/function(e){A(n,e);function n(e,o,i,s){f(this,n);var a;if(o==null||(typeof o==="undefined"?"undefined":j(o))!="object")throw new r.MongoInvalidArgumentError('Argument "filter" must be an object');if(i==null||(typeof i==="undefined"?"undefined":j(i))!="object")throw new r.MongoInvalidArgumentError('Argument "replacement" must be an object');if((0,u.hasAtomicOperators)(i))throw new r.MongoInvalidArgumentError("Replacement document must not contain atomic operators");a=d(this,n,[e,o,s]),a.cmdBase.update=i,t(a.cmdBase,s);return a}return n}(c);e.FindOneAndReplaceOperation=h;var v=/*#__PURE__*/function(e){A(n,e);function n(e,o,i,s){f(this,n);var a;if(o==null||(typeof o==="undefined"?"undefined":j(o))!="object")throw new r.MongoInvalidArgumentError('Argument "filter" must be an object');if(i==null||(typeof i==="undefined"?"undefined":j(i))!="object")throw new r.MongoInvalidArgumentError('Argument "update" must be an object');if(!(0,u.hasAtomicOperators)(i))throw new r.MongoInvalidArgumentError("Update document requires atomic operators");a=d(this,n,[e,o,s]),a.cmdBase.update=i,t(a.cmdBase,s),s.arrayFilters&&(a.cmdBase.arrayFilters=s.arrayFilters);return a}return n}(c);e.FindOneAndUpdateOperation=v;(0,s.defineAspects)(c,[s.Aspect.WRITE_OPERATION,s.Aspect.RETRYABLE,s.Aspect.EXPLAINABLE])});var eK=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.IsCappedOperation=void 0;var t=ec(),r=eC(),n=/*#__PURE__*/function(e){A(r,e);function r(e,t){f(this,r);var n;n=d(this,r,[t]),n.options=t,n.collection=e;return n}p(r,[{key:"commandName",get:function e(){return"listCollections"}},{key:"execute",value:function e(e,r){var n=this;return a(function(){var e,o,u,i;return H(this,function(s){switch(s.label){case 0:o=n.collection;return[4,o.s.db.listCollections({name:o.collectionName},F(B({},n.options),{nameOnly:!1,readPreference:n.readPreference,session:r})).toArray()];case 1:u=N.apply(void 0,[s.sent(),1]),i=u[0];if(i==null||i.options==null)throw new t.MongoAPIError("collection ".concat(o.namespace," not found"));return[2,!!((e=i.options)===null||e===void 0?void 0:e.capped)]}})})()}}]);return r}(r.AbstractOperation);e.IsCappedOperation=n});var eY=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.OptionsOperation=void 0;var t=ec(),r=eC(),n=/*#__PURE__*/function(e){A(r,e);function r(e,t){f(this,r);var n;n=d(this,r,[t]),n.options=t,n.collection=e;return n}p(r,[{key:"commandName",get:function e(){return"listCollections"}},{key:"execute",value:function e(e,r){var n=this;return a(function(){var e,o,u;return H(this,function(i){switch(i.label){case 0:e=n.collection;return[4,e.s.db.listCollections({name:e.collectionName},F(B({},n.options),{nameOnly:!1,readPreference:n.readPreference,session:r})).toArray()];case 1:o=N.apply(void 0,[i.sent(),1]),u=o[0];if(u==null||u.options==null)throw new t.MongoAPIError("collection ".concat(e.namespace," not found"));return[2,u.options]}})})()}}]);return r}(r.AbstractOperation);e.OptionsOperation=n});var e$=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.RenameOperation=void 0;var t=eZ(),r=eg(),n=r3(),o=eC(),u=/*#__PURE__*/function(e){A(n,e);function n(e,t,o){f(this,n);var u;u=d(this,n,[e,o]),u.collection=e,u.newName=t,u.options=o,u.ns=new r.MongoDBNamespace("admin","$cmd");return u}p(n,[{key:"commandName",get:function e(){return"renameCollection"}},{key:"execute",value:function e(e,r,o){var u=this;var i=this,s=function(){return y(g(n.prototype),"executeCommand",u)};return a(function(){var n,u,a,c;return H(this,function(l){switch(l.label){case 0:n=i.collection.namespace,u=i.collection.s.namespace.withCollection(i.newName).toString(),a=typeof i.options.dropTarget=="boolean"?i.options.dropTarget:!1,c={renameCollection:n,to:u,dropTarget:a};return[4,s().call(i,e,r,c,o)];case 1:return[2,(l.sent(),new t.Collection(i.collection.s.db,i.newName,i.collection.s.options))]}})})()}}]);return n}(n.CommandOperation);e.RenameOperation=u;(0,o.defineAspects)(u,[o.Aspect.WRITE_OPERATION])});var eJ=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.CreateSearchIndexesOperation=void 0;var t=eC(),r=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);var n;n=d(this,t),n.collection=e,n.descriptions=r;return n}p(t,[{key:"commandName",get:function e(){return"createSearchIndexes"}},{key:"execute",value:function e(e,t,r){var n=this;return a(function(){var o,u,i,s;return H(this,function(a){switch(a.label){case 0:u=n.collection.fullNamespace,i={createSearchIndexes:u.collection,indexes:n.descriptions};return[4,e.command(u,i,{session:t,timeoutContext:r})];case 1:return[2,((s=(o=a.sent())===null||o===void 0?void 0:o.indexesCreated)!==null&&s!==void 0?s:[]).map(function(e){var t=e.name;return t})]}})})()}}]);return t}(t.AbstractOperation);e.CreateSearchIndexesOperation=r});var eX=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.DropSearchIndexOperation=void 0;var t=ec(),r=eC(),n=/*#__PURE__*/function(e){A(r,e);function r(e,t){f(this,r);var n;n=d(this,r),n.collection=e,n.name=t;return n}p(r,[{key:"commandName",get:function e(){return"dropSearchIndex"}},{key:"execute",value:function e(e,r,n){var o=this;return a(function(){var u,i,s;return H(this,function(a){switch(a.label){case 0:u=o.collection.fullNamespace,i={dropSearchIndex:u.collection};typeof o.name=="string"&&(i.name=o.name);a.label=1;case 1:a.trys.push([1,3,,4]);return[4,e.command(u,i,{session:r,timeoutContext:n})];case 2:a.sent();return[3,4];case 3:s=a.sent();if(!(C(s,t.MongoServerError)&&s.code===t.MONGODB_ERROR_CODES.NamespaceNotFound))throw s;return[3,4];case 4:return[2]}})})()}}]);return r}(r.AbstractOperation);e.DropSearchIndexOperation=n});var eQ=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.UpdateSearchIndexOperation=void 0;var t=eC(),r=/*#__PURE__*/function(e){A(t,e);function t(e,r,n){f(this,t);var o;o=d(this,t),o.collection=e,o.name=r,o.definition=n;return o}p(t,[{key:"commandName",get:function e(){return"updateSearchIndex"}},{key:"execute",value:function e(e,t,r){var n=this;return a(function(){var o,u;return H(this,function(i){switch(i.label){case 0:o=n.collection.fullNamespace,u={updateSearchIndex:o.collection,name:n.name,definition:n.definition};return[4,e.command(o,u,{session:t,timeoutContext:r})];case 1:i.sent();return[2]}})})()}}]);return t}(t.AbstractOperation);e.UpdateSearchIndexOperation=r});var eZ=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.Collection=void 0;var t=ea(),r=eR(),n=ek(),o=tr(),u=eN(),i=eU(),s=ez(),c=eW(),l=ec(),d=eB(),h=eP(),v=eD(),m=eV(),E=eG(),y=eH(),g=eS(),A=eq(),S=ej(),b=eT(),O=eK(),w=eY(),_=e$(),D=eJ(),T=eX(),M=eQ(),R=eF(),k=ep(),I=el(),P=eg(),x=ey(),L=/*#__PURE__*/function(){function e(r,n,o){f(this,e);var u;var i;this.s={db:r,options:o,namespace:new P.MongoDBCollectionNamespace(r.databaseName,n),pkFactory:(i=(u=r.options)===null||u===void 0?void 0:u.pkFactory)!==null&&i!==void 0?i:P.DEFAULT_PK_FACTORY,readPreference:I.ReadPreference.fromOptions(o),bsonOptions:(0,t.resolveBSONOptions)(o,r),readConcern:k.ReadConcern.fromOptions(o),writeConcern:x.WriteConcern.fromOptions(o)},this.client=r.client}p(e,[{key:"dbName",get:function e(){return this.s.namespace.db}},{key:"collectionName",get:function e(){return this.s.namespace.collection}},{key:"namespace",get:function e(){return this.fullNamespace.toString()}},{key:"fullNamespace",get:function e(){return this.s.namespace}},{key:"readConcern",get:function e(){return this.s.readConcern==null?this.s.db.readConcern:this.s.readConcern}},{key:"readPreference",get:function e(){return this.s.readPreference==null?this.s.db.readPreference:this.s.readPreference}},{key:"bsonOptions",get:function e(){return this.s.bsonOptions}},{key:"writeConcern",get:function e(){return this.s.writeConcern==null?this.s.db.writeConcern:this.s.writeConcern}},{key:"hint",get:function e(){return this.s.collectionHint},set:function e(e){this.s.collectionHint=(0,P.normalizeHintField)(e)}},{key:"timeoutMS",get:function e(){return this.s.options.timeoutMS}},{key:"insertOne",value:function e(e,t){var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:return[4,(0,g.executeOperation)(r.client,new b.InsertOneOperation(r,e,(0,P.resolveOptions)(r,t)))];case 1:return[2,n.sent()]}})})()}},{key:"insertMany",value:function e(e,t){var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:return[4,(0,g.executeOperation)(r.client,new b.InsertManyOperation(r,e,(0,P.resolveOptions)(r,t!==null&&t!==void 0?t:{ordered:!0})))];case 1:return[2,n.sent()]}})})()}},{key:"bulkWrite",value:function e(e,t){var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:if(!Array.isArray(e))throw new l.MongoInvalidArgumentError('Argument "operations" must be an array of documents');return[4,(0,g.executeOperation)(r.client,new d.BulkWriteOperation(r,e,(0,P.resolveOptions)(r,t!==null&&t!==void 0?t:{ordered:!0})))];case 1:return[2,n.sent()]}})})()}},{key:"updateOne",value:function e(e,t,r){var n=this;return a(function(){return H(this,function(o){switch(o.label){case 0:return[4,(0,g.executeOperation)(n.client,new R.UpdateOneOperation(n,e,t,(0,P.resolveOptions)(n,r)))];case 1:return[2,o.sent()]}})})()}},{key:"replaceOne",value:function e(e,t,r){var n=this;return a(function(){return H(this,function(o){switch(o.label){case 0:return[4,(0,g.executeOperation)(n.client,new R.ReplaceOneOperation(n,e,t,(0,P.resolveOptions)(n,r)))];case 1:return[2,o.sent()]}})})()}},{key:"updateMany",value:function e(e,t,r){var n=this;return a(function(){return H(this,function(o){switch(o.label){case 0:return[4,(0,g.executeOperation)(n.client,new R.UpdateManyOperation(n,e,t,(0,P.resolveOptions)(n,r)))];case 1:return[2,o.sent()]}})})()}},{key:"deleteOne",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:return[4,(0,g.executeOperation)(r.client,new v.DeleteOneOperation(r,e,(0,P.resolveOptions)(r,t)))];case 1:return[2,n.sent()]}})})()}},{key:"deleteMany",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:return[4,(0,g.executeOperation)(r.client,new v.DeleteManyOperation(r,e,(0,P.resolveOptions)(r,t)))];case 1:return[2,n.sent()]}})})()}},{key:"rename",value:function e(e,t){var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:return[4,(0,g.executeOperation)(r.client,new _.RenameOperation(r,e,(0,P.resolveOptions)(void 0,F(B({},t),{readPreference:I.ReadPreference.PRIMARY}))))];case 1:return[2,n.sent()]}})})()}},{key:"drop",value:function e(e){var t=this;return a(function(){return H(this,function(r){switch(r.label){case 0:return[4,(0,g.executeOperation)(t.client,new E.DropCollectionOperation(t.s.db,t.collectionName,e))];case 1:return[2,r.sent()]}})})()}},{key:"findOne",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var r=this;return a(function(){var n,o;return H(this,function(u){switch(u.label){case 0:n=r.find(e,t).limit(-1).batchSize(1);return[4,n.next()];case 1:o=u.sent();return[4,n.close()];case 2:return[2,(u.sent(),o)]}})})()}},{key:"find",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new i.FindCursor(this.client,this.s.namespace,e,(0,P.resolveOptions)(this,t))}},{key:"options",value:function e(e){var t=this;return a(function(){return H(this,function(r){switch(r.label){case 0:return[4,(0,g.executeOperation)(t.client,new w.OptionsOperation(t,(0,P.resolveOptions)(t,e)))];case 1:return[2,r.sent()]}})})()}},{key:"isCapped",value:function e(e){var t=this;return a(function(){return H(this,function(r){switch(r.label){case 0:return[4,(0,g.executeOperation)(t.client,new O.IsCappedOperation(t,(0,P.resolveOptions)(t,e)))];case 1:return[2,r.sent()]}})})()}},{key:"createIndex",value:function e(e,t){var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:return[4,(0,g.executeOperation)(r.client,S.CreateIndexesOperation.fromIndexSpecification(r,r.collectionName,e,(0,P.resolveOptions)(r,t)))];case 1:return[2,n.sent()[0]]}})})()}},{key:"createIndexes",value:function e(e,t){var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:return[4,(0,g.executeOperation)(r.client,S.CreateIndexesOperation.fromIndexDescriptionArray(r,r.collectionName,e,(0,P.resolveOptions)(r,F(B({},t),{maxTimeMS:void 0}))))];case 1:return[2,n.sent()]}})})()}},{key:"dropIndex",value:function e(e,t){var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:return[4,(0,g.executeOperation)(r.client,new S.DropIndexOperation(r,e,F(B({},(0,P.resolveOptions)(r,t)),{readPreference:I.ReadPreference.primary})))];case 1:return[2,n.sent()]}})})()}},{key:"dropIndexes",value:function e(e){var t=this;return a(function(){var r;return H(this,function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,(0,g.executeOperation)(t.client,new S.DropIndexOperation(t,"*",(0,P.resolveOptions)(t,e)))];case 1:return[2,(n.sent(),!0)];case 2:r=n.sent();if(C(r,l.MongoOperationTimeoutError))throw r;return[2,!1];case 3:return[2]}})})()}},{key:"listIndexes",value:function e(e){return new s.ListIndexesCursor(this,(0,P.resolveOptions)(this,e))}},{key:"indexExists",value:function e(e,t){var r=this;return a(function(){var n,o,u;return H(this,function(i){switch(i.label){case 0:n=Array.isArray(e)?e:[e];u=Set.bind;return[4,r.listIndexes(t).map(function(e){var t=e.name;return t}).toArray()];case 1:o=new(u.apply(Set,[void 0,i.sent()]));return[2,n.every(function(e){return o.has(e)})]}})})()}},{key:"indexInformation",value:function e(e){var t=this;return a(function(){var r;return H(this,function(n){switch(n.label){case 0:return[4,t.indexes(F(B({},e),{full:(r=e===null||e===void 0?void 0:e.full)!==null&&r!==void 0?r:!1}))];case 1:return[2,n.sent()]}})})()}},{key:"estimatedDocumentCount",value:function e(e){var t=this;return a(function(){return H(this,function(r){switch(r.label){case 0:return[4,(0,g.executeOperation)(t.client,new y.EstimatedDocumentCountOperation(t,(0,P.resolveOptions)(t,e)))];case 1:return[2,r.sent()]}})})()}},{key:"countDocuments",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var r=this;return a(function(){var n,o,u,i;return H(this,function(s){switch(s.label){case 0:n=[];n.push({$match:e}),typeof t.skip=="number"&&n.push({$skip:t.skip}),typeof t.limit=="number"&&n.push({$limit:t.limit}),n.push({$group:{_id:1,n:{$sum:1}}});o=r.aggregate(n,t);return[4,o.next()];case 1:u=s.sent();return[4,o.close()];case 2:return[2,(s.sent(),(i=u===null||u===void 0?void 0:u.n)!==null&&i!==void 0?i:0)]}})})()}},{key:"distinct",value:function e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n=this;return a(function(){return H(this,function(o){switch(o.label){case 0:return[4,(0,g.executeOperation)(n.client,new m.DistinctOperation(n,e,t,(0,P.resolveOptions)(n,r)))];case 1:return[2,o.sent()]}})})()}},{key:"indexes",value:function e(e){var t=this;return a(function(){var r,n;return H(this,function(o){switch(o.label){case 0:return[4,t.listIndexes(e).toArray()];case 1:r=o.sent();return[2,((n=e===null||e===void 0?void 0:e.full)!==null&&n!==void 0?n:!0)?r:Object.fromEntries(r.map(function(e){var t=e.name,r=e.key;return[t,Object.entries(r)]}))]}})})()}},{key:"findOneAndDelete",value:function e(e,t){var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:return[4,(0,g.executeOperation)(r.client,new A.FindOneAndDeleteOperation(r,e,(0,P.resolveOptions)(r,t)))];case 1:return[2,n.sent()]}})})()}},{key:"findOneAndReplace",value:function e(e,t,r){var n=this;return a(function(){return H(this,function(o){switch(o.label){case 0:return[4,(0,g.executeOperation)(n.client,new A.FindOneAndReplaceOperation(n,e,t,(0,P.resolveOptions)(n,r)))];case 1:return[2,o.sent()]}})})()}},{key:"findOneAndUpdate",value:function e(e,t,r){var n=this;return a(function(){return H(this,function(o){switch(o.label){case 0:return[4,(0,g.executeOperation)(n.client,new A.FindOneAndUpdateOperation(n,e,t,(0,P.resolveOptions)(n,r)))];case 1:return[2,o.sent()]}})})()}},{key:"aggregate",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(!Array.isArray(e))throw new l.MongoInvalidArgumentError('Argument "pipeline" must be an array of aggregation stages');return new u.AggregationCursor(this.client,this.s.namespace,e,(0,P.resolveOptions)(this,t))}},{key:"watch",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Array.isArray(e)||(t=e,e=[]),new o.ChangeStream(this,e,(0,P.resolveOptions)(this,t))}},{key:"initializeUnorderedBulkOp",value:function e(e){return new n.UnorderedBulkOperation(this,(0,P.resolveOptions)(this,e))}},{key:"initializeOrderedBulkOp",value:function e(e){return new r.OrderedBulkOperation(this,(0,P.resolveOptions)(this,e))}},{key:"count",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:return[4,(0,g.executeOperation)(r.client,new h.CountOperation(r.fullNamespace,e,(0,P.resolveOptions)(r,t)))];case 1:return[2,n.sent()]}})})()}},{key:"listSearchIndexes",value:function e(e,t){t=(typeof e==="undefined"?"undefined":j(e))=="object"?e:t!==null&&t!==void 0?t:{};var r=e==null||(typeof e==="undefined"?"undefined":j(e))=="object"?null:e;return new c.ListSearchIndexesCursor(this,r,t)}},{key:"createSearchIndex",value:function e(e){var t=this;return a(function(){var r,n;return H(this,function(o){switch(o.label){case 0:return[4,t.createSearchIndexes([e])];case 1:r=N.apply(void 0,[o.sent(),1]),n=r[0];return[2,n]}})})()}},{key:"createSearchIndexes",value:function e(e){var t=this;return a(function(){return H(this,function(r){switch(r.label){case 0:return[4,(0,g.executeOperation)(t.client,new D.CreateSearchIndexesOperation(t,e))];case 1:return[2,r.sent()]}})})()}},{key:"dropSearchIndex",value:function e(e){var t=this;return a(function(){return H(this,function(r){switch(r.label){case 0:return[4,(0,g.executeOperation)(t.client,new T.DropSearchIndexOperation(t,e))];case 1:return[2,r.sent()]}})})()}},{key:"updateSearchIndex",value:function e(e,t){var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:return[4,(0,g.executeOperation)(r.client,new M.UpdateSearchIndexOperation(r,e,t))];case 1:return[2,n.sent()]}})})()}}]);return e}();e.Collection=L});var e1=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.ChangeStreamCursor=void 0;var t=tr(),r=ev(),n=eI(),o=eS(),u=eg(),i=r0(),s=/*#__PURE__*/function(e){A(i,e);function i(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};f(this,i);var o;var u;o=d(this,i,[e,t,F(B({},n),{tailable:!0,awaitData:!0})]),o.pipeline=r,o.changeStreamCursorOptions=n,o._resumeToken=null,o.startAtOperationTime=(u=n.startAtOperationTime)!==null&&u!==void 0?u:null,n.startAfter?o.resumeToken=n.startAfter:n.resumeAfter&&(o.resumeToken=n.resumeAfter);return o}p(i,[{key:"resumeToken",get:function e(){return this._resumeToken},set:function e(e){this._resumeToken=e,this.emit(t.ChangeStream.RESUME_TOKEN_CHANGED,e)}},{key:"resumeOptions",get:function e(){var e=B({},this.changeStreamCursorOptions);for(var t=0,r=["resumeAfter","startAfter","startAtOperationTime"];t<r.length;t++){var n=r[t];delete e[n]}return this.resumeToken!=null?this.changeStreamCursorOptions.startAfter&&!this.hasReceived?e.startAfter=this.resumeToken:e.resumeAfter=this.resumeToken:this.startAtOperationTime!=null&&(0,u.maxWireVersion)(this.server)>=7&&(e.startAtOperationTime=this.startAtOperationTime),e}},{key:"cacheResumeToken",value:function e(e){this.bufferedCount()===0&&this.postBatchResumeToken?this.resumeToken=this.postBatchResumeToken:this.resumeToken=e,this.hasReceived=!0}},{key:"_processBatch",value:function e(e){var t=e.postBatchResumeToken;t&&(this.postBatchResumeToken=t,e.batchSize===0&&(this.resumeToken=t))}},{key:"clone",value:function e(){return new i(this.client,this.namespace,this.pipeline,B({},this.cursorOptions))}},{key:"_initialize",value:function e(e){var t=this;return a(function(){var i,s,a;return H(this,function(c){switch(c.label){case 0:i=new n.AggregateOperation(t.namespace,t.pipeline,F(B({},t.cursorOptions,t.changeStreamCursorOptions),{session:e}));return[4,(0,o.executeOperation)(e.client,i,t.timeoutContext)];case 1:s=c.sent(),a=i.server;return[2,(t.maxWireVersion=(0,u.maxWireVersion)(a),t.startAtOperationTime==null&&t.changeStreamCursorOptions.resumeAfter==null&&t.changeStreamCursorOptions.startAfter==null&&t.maxWireVersion>=7&&(t.startAtOperationTime=s.operationTime),t._processBatch(s),t.emit(r.INIT,s),t.emit(r.RESPONSE),{server:a,session:e,response:s})]}})})()}},{key:"getMore",value:function e(e){var r=this;var n=this,o=function(){return y(g(i.prototype),"getMore",r)};return a(function(){var r;return H(this,function(i){switch(i.label){case 0:return[4,o().call(n,e)];case 1:r=i.sent();return[2,(n.maxWireVersion=(0,u.maxWireVersion)(n.server),n._processBatch(r),n.emit(t.ChangeStream.MORE,r),n.emit(t.ChangeStream.RESPONSE),r)]}})})()}}]);return i}(i.AbstractCursor);e.ChangeStreamCursor=s});var e0=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.ListCollectionsOperation=void 0;var t=eE(),r=eg(),n=r3(),o=eC(),u=/*#__PURE__*/function(e){A(n,e);function n(e,t,r){f(this,n);var o;o=d(this,n,[e,r]),o.options=B({},r),delete o.options.writeConcern,o.db=e,o.filter=t,o.nameOnly=!!o.options.nameOnly,o.authorizedCollections=!!o.options.authorizedCollections,typeof o.options.batchSize=="number"&&(o.batchSize=o.options.batchSize);return o}p(n,[{key:"commandName",get:function e(){return"listCollections"}},{key:"execute",value:function e(e,o,u){var i=this;var s=this,c=function(){return y(g(n.prototype),"executeCommand",i)};return a(function(){return H(this,function(n){switch(n.label){case 0:return[4,c().call(s,e,o,s.generateCommand((0,r.maxWireVersion)(e)),u,t.CursorResponse)];case 1:return[2,n.sent()]}})})()}},{key:"generateCommand",value:function e(e){var t={listCollections:1,filter:this.filter,cursor:this.batchSize?{batchSize:this.batchSize}:{},nameOnly:this.nameOnly,authorizedCollections:this.authorizedCollections};return e>=9&&this.options.comment!==void 0&&(t.comment=this.options.comment),t}}]);return n}(n.CommandOperation);e.ListCollectionsOperation=u;(0,o.defineAspects)(u,[o.Aspect.READ_OPERATION,o.Aspect.RETRYABLE,o.Aspect.CURSOR_CREATING])});var e2=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.ListCollectionsCursor=void 0;var t=eS(),r=e0(),n=r0(),o=/*#__PURE__*/function(e){A(n,e);function n(e,t,r){f(this,n);var o;o=d(this,n,[e.client,e.s.namespace,r]),o.parent=e,o.filter=t,o.options=r;return o}p(n,[{key:"clone",value:function e(){return new n(this.parent,this.filter,B({},this.options,this.cursorOptions))}},{key:"_initialize",value:function e(e){var n=this;return a(function(){var o,u;return H(this,function(i){switch(i.label){case 0:o=new r.ListCollectionsOperation(n.parent,n.filter,F(B({},n.cursorOptions,n.options),{session:e,signal:n.signal}));return[4,(0,t.executeOperation)(n.parent.client,o,n.timeoutContext)];case 1:u=i.sent();return[2,{server:o.server,session:e,response:u}]}})})()}}]);return n}(n.AbstractCursor);e.ListCollectionsCursor=o});var e3=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.RunAdminCommandOperation=e.RunCommandOperation=void 0;var t=eg(),r=eC(),n=/*#__PURE__*/function(e){A(t,e);function t(e,r,n){f(this,t);var o;o=d(this,t,[n]),o.command=r,o.options=n,o.ns=e.s.namespace.withCollection("$cmd");return o}p(t,[{key:"commandName",get:function e(){return"runCommand"}},{key:"execute",value:function e(e,t,r){var n=this;return a(function(){return H(this,function(o){switch(o.label){case 0:n.server=e;return[4,e.command(n.ns,n.command,F(B({},n.options),{readPreference:n.readPreference,session:t,timeoutContext:r}),n.options.responseType)];case 1:return[2,o.sent()]}})})()}}]);return t}(r.AbstractOperation);e.RunCommandOperation=n;var o=/*#__PURE__*/function(e){A(r,e);function r(e,n){f(this,r);var o;o=d(this,r,[n]),o.command=e,o.options=n,o.ns=new t.MongoDBNamespace("admin","$cmd");return o}p(r,[{key:"commandName",get:function e(){return"runCommand"}},{key:"execute",value:function e(e,t,r){var n=this;return a(function(){return H(this,function(o){switch(o.label){case 0:n.server=e;return[4,e.command(n.ns,n.command,F(B({},n.options),{readPreference:n.readPreference,session:t,timeoutContext:r}))];case 1:return[2,o.sent()]}})})()}}]);return r}(r.AbstractOperation);e.RunAdminCommandOperation=o});var e6=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.RunCommandCursor=void 0;var t=eE(),r=ec(),n=eS(),o=ew(),u=e3(),i=eg(),s=r0(),c=/*#__PURE__*/function(e){A(s,e);function s(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};f(this,s);var n;n=d(this,s,[e.client,(0,i.ns)(e.namespace),r]),n.getMoreOptions={},n.db=e,n.command=Object.freeze(B({},t));return n}p(s,[{key:"setComment",value:function e(e){return this.getMoreOptions.comment=e,this}},{key:"setMaxTimeMS",value:function e(e){return this.getMoreOptions.maxAwaitTimeMS=e,this}},{key:"setBatchSize",value:function e(e){return this.getMoreOptions.batchSize=e,this}},{key:"clone",value:function e(){throw new r.MongoAPIError("Clone not supported, create a new cursor with db.runCursorCommand")}},{key:"withReadConcern",value:function e(e){throw new r.MongoAPIError("RunCommandCursor does not support readConcern it must be attached to the command being run")}},{key:"addCursorFlag",value:function e(e,t){throw new r.MongoAPIError("RunCommandCursor does not support cursor flags, they must be attached to the command being run")}},{key:"maxTimeMS",value:function e(e){throw new r.MongoAPIError("maxTimeMS must be configured on the command document directly, to configure getMore.maxTimeMS use cursor.setMaxTimeMS()")}},{key:"batchSize",value:function e(e){throw new r.MongoAPIError("batchSize must be configured on the command document directly, to configure getMore.batchSize use cursor.setBatchSize()")}},{key:"_initialize",value:function e(e){var r=this;return a(function(){var o,i;return H(this,function(s){switch(s.label){case 0:o=new u.RunCommandOperation(r.db,r.command,F(B({},r.cursorOptions),{session:e,readPreference:r.cursorOptions.readPreference,responseType:t.CursorResponse}));return[4,(0,n.executeOperation)(r.client,o,r.timeoutContext)];case 1:i=s.sent();return[2,{server:o.server,session:e,response:i}]}})})()}},{key:"getMore",value:function e(e){var t=this;return a(function(){var e;return H(this,function(r){switch(r.label){case 0:e=new o.GetMoreOperation(t.namespace,t.id,t.server,B(F(B({},t.cursorOptions),{session:t.session}),t.getMoreOptions));return[4,(0,n.executeOperation)(t.client,e,t.timeoutContext)];case 1:return[2,r.sent()]}})})()}}]);return s}(s.AbstractCursor);e.RunCommandCursor=c});var e4=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.CollectionsOperation=void 0;var t=eZ(),r=eC(),n=/*#__PURE__*/function(e){A(r,e);function r(e,t){f(this,r);var n;n=d(this,r,[t]),n.options=t,n.db=e;return n}p(r,[{key:"commandName",get:function e(){return"listCollections"}},{key:"execute",value:function e(e,r){var n=this;return a(function(){var e,o,u,i,s,a,c,l,d;return H(this,function(f){switch(f.label){case 0:return[4,n.db.listCollections({},F(B({},n.options),{nameOnly:!0,readPreference:n.readPreference,session:r})).toArray()];case 1:e=f.sent(),o=[];u=true,i=false,s=undefined;try{for(a=e[Symbol.iterator]();!(u=(c=a.next()).done);u=true){l=c.value,d=l.name;d.includes("$")||o.push(new t.Collection(n.db,d,n.db.s.options))}}catch(e){i=true;s=e}finally{try{if(!u&&a.return!=null){a.return()}}finally{if(i){throw s}}}return[2,o]}})})()}}]);return r}(r.AbstractOperation);e.CollectionsOperation=n});var e9=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.CreateCollectionOperation=void 0;var t=eh(),r=eZ(),n=ec(),o=r3(),u=ej(),i=eC(),s=new Set(["w","wtimeout","timeoutMS","j","fsync","autoIndexId","pkFactory","raw","readPreference","session","readConcern","writeConcern","raw","fieldsAsRaw","useBigInt64","promoteLongs","promoteValues","promoteBuffers","bsonRegExp","serializeFunctions","ignoreUndefined","enableUtf8Validation"]),c="Driver support of Queryable Encryption is incompatible with server. Upgrade server to use Queryable Encryption.",l=/*#__PURE__*/function(e){A(o,e);function o(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};f(this,o);var n;n=d(this,o,[e,r]),n.options=r,n.db=e,n.name=t;return n}p(o,[{key:"commandName",get:function e(){return"create"}},{key:"execute",value:function e(e,r,i){var s=this;return a(function(){var a,l,d,f,h,v,p,m,E,y,g,A,C,S,b,O;return H(this,function(w){switch(w.label){case 0:f=s.db,h=s.name,v=s.options,p=(d=v.encryptedFields)!==null&&d!==void 0?d:(l=f.client.s.options.autoEncryption)===null||l===void 0?void 0:(a=l.encryptedFieldsMap)===null||a===void 0?void 0:a["".concat(f.databaseName,".").concat(h)];if(!p)return[3,5];if(!e.loadBalanced&&e.description.maxWireVersion<t.MIN_SUPPORTED_QE_WIRE_VERSION)throw new n.MongoCompatibilityError("".concat(c," The minimum server version required is ").concat(t.MIN_SUPPORTED_QE_SERVER_VERSION));y=(m=p.escCollection)!==null&&m!==void 0?m:"enxcol_.".concat(h,".esc"),g=(E=p.ecocCollection)!==null&&E!==void 0?E:"enxcol_.".concat(h,".ecoc");A=0,C=[y,g];w.label=1;case 1:if(!(A<C.length))return[3,4];S=C[A];return[4,new o(f,S,{clusteredIndex:{key:{_id:1},unique:!0}}).executeWithoutEncryptedFieldsCheck(e,r,i)];case 2:w.sent();w.label=3;case 3:A++;return[3,1];case 4:v.encryptedFields||(s.options=F(B({},s.options),{encryptedFields:p}));w.label=5;case 5:return[4,s.executeWithoutEncryptedFieldsCheck(e,r,i)];case 6:b=w.sent();O=p;if(!O)return[3,8];return[4,u.CreateIndexesOperation.fromIndexSpecification(f,h,{__safeContent__:1},{}).execute(e,r,i)];case 7:O=w.sent();w.label=8;case 8:return[2,(O,b)]}})})()}},{key:"executeWithoutEncryptedFieldsCheck",value:function e(e,t,n){var u=this;var i=this,c=function(){return y(g(o.prototype),"executeCommand",u)};return a(function(){var o,u,a,l,d;return H(this,function(d){switch(d.label){case 0:o=i.db,u=i.name,a=i.options,l={create:u};for(var f in a)a[f]!=null&&typeof a[f]!="function"&&!s.has(f)&&(l[f]=a[f]);return[4,c().call(i,e,t,l,n)];case 1:return[2,(d.sent(),new r.Collection(o,u,a))]}})})()}}]);return o}(o.CommandOperation);e.CreateCollectionOperation=l;(0,i.defineAspects)(l,[i.Aspect.WRITE_OPERATION])});var e7=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.ProfilingLevelOperation=void 0;var t=ec(),r=r3(),n=/*#__PURE__*/function(e){A(r,e);function r(e,t){f(this,r);var n;n=d(this,r,[e,t]),n.options=t;return n}p(r,[{key:"commandName",get:function e(){return"profile"}},{key:"execute",value:function e(e,n,o){var u=this;var i=this,s=function(){return y(g(r.prototype),"executeCommand",u)};return a(function(){var r,u;return H(this,function(a){switch(a.label){case 0:return[4,s().call(i,e,n,{profile:-1},o)];case 1:r=a.sent();if(r.ok===1){u=r.was;if(u===0)return[2,"off"];if(u===1)return[2,"slow_only"];if(u===2)return[2,"all"];throw new t.MongoUnexpectedServerResponseError("Illegal profiling level value ".concat(u))}else throw new t.MongoUnexpectedServerResponseError("Error with profile command");return[2]}})})()}}]);return r}(r.CommandOperation);e.ProfilingLevelOperation=n});var e8=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.RemoveUserOperation=void 0;var t=r3(),r=eC(),n=/*#__PURE__*/function(e){A(t,e);function t(e,r,n){f(this,t);var o;o=d(this,t,[e,n]),o.options=n,o.username=r;return o}p(t,[{key:"commandName",get:function e(){return"dropUser"}},{key:"execute",value:function e(e,r,n){var o=this;var u=this,i=function(){return y(g(t.prototype),"executeCommand",o)};return a(function(){return H(this,function(t){switch(t.label){case 0:return[4,i().call(u,e,r,{dropUser:u.username},n)];case 1:return[2,(t.sent(),!0)]}})})()}}]);return t}(t.CommandOperation);e.RemoveUserOperation=n;(0,r.defineAspects)(n,[r.Aspect.WRITE_OPERATION])});var e5=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.SetProfilingLevelOperation=e.ProfilingLevel=void 0;var t=ec(),r=eg(),n=r3(),o=new Set(["off","slow_only","all"]);e.ProfilingLevel=Object.freeze({off:"off",slowOnly:"slow_only",all:"all"});var u=/*#__PURE__*/function(n){A(u,n);function u(t,r,n){f(this,u);var o;switch(o=d(this,u,[t,n]),o.options=n,r){case e.ProfilingLevel.off:o.profile=0;break;case e.ProfilingLevel.slowOnly:o.profile=1;break;case e.ProfilingLevel.all:o.profile=2;break;default:o.profile=0;break}o.level=r;return o}p(u,[{key:"commandName",get:function e(){return"profile"}},{key:"execute",value:function n(n,i,s){var c=this;var l=this,d=function(){return y(g(u.prototype),"executeCommand",c)};return a(function(){var u;return H(this,function(a){switch(a.label){case 0:u=l.level;if(!o.has(u))throw new t.MongoInvalidArgumentError('Profiling level must be one of "'.concat((0,r.enumToString)(e.ProfilingLevel),'"'));return[4,d().call(l,n,i,{profile:l.profile},s)];case 1:return[2,(a.sent(),u)]}})})()}}]);return u}(n.CommandOperation);e.SetProfilingLevelOperation=u});var te=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.DbStatsOperation=void 0;var t=r3(),r=eC(),n=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);var n;n=d(this,t,[e,r]),n.options=r;return n}p(t,[{key:"commandName",get:function e(){return"dbStats"}},{key:"execute",value:function e(e,r,n){var o=this;var u=this,i=function(){return y(g(t.prototype),"executeCommand",o)};return a(function(){var t;return H(this,function(o){switch(o.label){case 0:t={dbStats:!0};u.options.scale!=null&&(t.scale=u.options.scale);return[4,i().call(u,e,r,t,n)];case 1:return[2,o.sent()]}})})()}}]);return t}(t.CommandOperation);e.DbStatsOperation=n;(0,r.defineAspects)(n,[r.Aspect.READ_OPERATION])});var tt=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.Db=void 0;var t=r9(),r=ea(),n=tr(),o=eZ(),u=ev(),i=eN(),s=e2(),c=e6(),l=ec(),d=e4(),h=e9(),v=eG(),m=eS(),E=ej(),y=e7(),g=e8(),A=e$(),C=e3(),S=e5(),b=te(),O=ep(),w=el(),_=eg(),D=ey(),T=["writeConcern","readPreference","readPreferenceTags","native_parser","forceServerObjectId","pkFactory","serializeFunctions","raw","authSource","ignoreUndefined","readConcern","retryMiliSeconds","numberOfRetries","useBigInt64","promoteBuffers","promoteLongs","bsonRegExp","enableUtf8Validation","promoteValues","compression","retryWrites","timeoutMS"],M=/*#__PURE__*/function(){function e(t,n,o){f(this,e);if(o=o!==null&&o!==void 0?o:{},o=(0,_.filterOptions)(o,T),typeof n=="string"&&n.includes("."))throw new l.MongoInvalidArgumentError("Database names cannot contain the character '.'");var u;this.s={options:o,readPreference:w.ReadPreference.fromOptions(o),bsonOptions:(0,r.resolveBSONOptions)(o,t),pkFactory:(u=o===null||o===void 0?void 0:o.pkFactory)!==null&&u!==void 0?u:_.DEFAULT_PK_FACTORY,readConcern:O.ReadConcern.fromOptions(o),writeConcern:D.WriteConcern.fromOptions(o),namespace:new _.MongoDBNamespace(n)},this.client=t}p(e,[{key:"databaseName",get:function e(){return this.s.namespace.db}},{key:"options",get:function e(){return this.s.options}},{key:"secondaryOk",get:function e(){var e;return((e=this.s.readPreference)===null||e===void 0?void 0:e.preference)!=="primary"||!1}},{key:"readConcern",get:function e(){return this.s.readConcern}},{key:"readPreference",get:function e(){return this.s.readPreference==null?this.client.readPreference:this.s.readPreference}},{key:"bsonOptions",get:function e(){return this.s.bsonOptions}},{key:"writeConcern",get:function e(){return this.s.writeConcern}},{key:"namespace",get:function e(){return this.s.namespace.toString()}},{key:"timeoutMS",get:function e(){var e;return(e=this.s.options)===null||e===void 0?void 0:e.timeoutMS}},{key:"createCollection",value:function e(e,t){var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:return[4,(0,m.executeOperation)(r.client,new h.CreateCollectionOperation(r,e,(0,_.resolveOptions)(r,t)))];case 1:return[2,n.sent()]}})})()}},{key:"command",value:function e(e,t){var n=this;return a(function(){var o;return H(this,function(u){switch(u.label){case 0:return[4,(0,m.executeOperation)(n.client,new C.RunCommandOperation(n,e,(0,_.resolveOptions)(void 0,F(B({},(0,r.resolveBSONOptions)(t)),{timeoutMS:(o=t===null||t===void 0?void 0:t.timeoutMS)!==null&&o!==void 0?o:n.timeoutMS,session:t===null||t===void 0?void 0:t.session,readPreference:t===null||t===void 0?void 0:t.readPreference,signal:t===null||t===void 0?void 0:t.signal}))))];case 1:return[2,u.sent()]}})})()}},{key:"aggregate",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return new i.AggregationCursor(this.client,this.s.namespace,e,(0,_.resolveOptions)(this,t))}},{key:"admin",value:function e(){return new t.Admin(this)}},{key:"collection",value:function e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof t=="function")throw new l.MongoInvalidArgumentError("The callback form of this helper has been removed.");return new o.Collection(this,e,(0,_.resolveOptions)(this,t))}},{key:"stats",value:function e(e){var t=this;return a(function(){return H(this,function(r){switch(r.label){case 0:return[4,(0,m.executeOperation)(t.client,new b.DbStatsOperation(t,(0,_.resolveOptions)(t,e)))];case 1:return[2,r.sent()]}})})()}},{key:"listCollections",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new s.ListCollectionsCursor(this,e,(0,_.resolveOptions)(this,t))}},{key:"renameCollection",value:function e(e,t,r){var n=this;return a(function(){return H(this,function(o){switch(o.label){case 0:return[4,(0,m.executeOperation)(n.client,new A.RenameOperation(n.collection(e),t,(0,_.resolveOptions)(void 0,F(B({},r),{new_collection:!0,readPreference:w.ReadPreference.primary}))))];case 1:return[2,o.sent()]}})})()}},{key:"dropCollection",value:function e(e,t){var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:return[4,(0,m.executeOperation)(r.client,new v.DropCollectionOperation(r,e,(0,_.resolveOptions)(r,t)))];case 1:return[2,n.sent()]}})})()}},{key:"dropDatabase",value:function e(e){var t=this;return a(function(){return H(this,function(r){switch(r.label){case 0:return[4,(0,m.executeOperation)(t.client,new v.DropDatabaseOperation(t,(0,_.resolveOptions)(t,e)))];case 1:return[2,r.sent()]}})})()}},{key:"collections",value:function e(e){var t=this;return a(function(){return H(this,function(r){switch(r.label){case 0:return[4,(0,m.executeOperation)(t.client,new d.CollectionsOperation(t,(0,_.resolveOptions)(t,e)))];case 1:return[2,r.sent()]}})})()}},{key:"createIndex",value:function e(e,t,r){var n=this;return a(function(){return H(this,function(o){switch(o.label){case 0:return[4,(0,m.executeOperation)(n.client,E.CreateIndexesOperation.fromIndexSpecification(n,e,t,r))];case 1:return[2,o.sent()[0]]}})})()}},{key:"removeUser",value:function e(e,t){var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:return[4,(0,m.executeOperation)(r.client,new g.RemoveUserOperation(r,e,(0,_.resolveOptions)(r,t)))];case 1:return[2,n.sent()]}})})()}},{key:"setProfilingLevel",value:function e(e,t){var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:return[4,(0,m.executeOperation)(r.client,new S.SetProfilingLevelOperation(r,e,(0,_.resolveOptions)(r,t)))];case 1:return[2,n.sent()]}})})()}},{key:"profilingLevel",value:function e(e){var t=this;return a(function(){return H(this,function(r){switch(r.label){case 0:return[4,(0,m.executeOperation)(t.client,new y.ProfilingLevelOperation(t,(0,_.resolveOptions)(t,e)))];case 1:return[2,r.sent()]}})})()}},{key:"indexInformation",value:function e(e,t){var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:return[4,r.collection(e).indexInformation((0,_.resolveOptions)(r,t))];case 1:return[2,n.sent()]}})})()}},{key:"watch",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Array.isArray(e)||(t=e,e=[]),new n.ChangeStream(this,e,(0,_.resolveOptions)(this,t))}},{key:"runCursorCommand",value:function e(e,t){return new c.RunCommandCursor(this,e,t)}}]);return e}();e.Db=M;M.SYSTEM_NAMESPACE_COLLECTION=u.SYSTEM_NAMESPACE_COLLECTION;M.SYSTEM_INDEX_COLLECTION=u.SYSTEM_INDEX_COLLECTION;M.SYSTEM_PROFILE_COLLECTION=u.SYSTEM_PROFILE_COLLECTION;M.SYSTEM_USER_COLLECTION=u.SYSTEM_USER_COLLECTION;M.SYSTEM_COMMAND_COLLECTION=u.SYSTEM_COMMAND_COLLECTION;M.SYSTEM_JS_COLLECTION=u.SYSTEM_JS_COLLECTION});var tr=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.ChangeStream=void 0;var t=eZ(),r=ev(),n=r0(),o=e1(),u=tt(),i=ec(),s=rZ(),l=eO(),h=r1(),v=eA(),m=eg(),E=["resumeAfter","startAfter","startAtOperationTime","fullDocument","fullDocumentBeforeChange","showExpandedEvents"],y={COLLECTION:Symbol("Collection"),DATABASE:Symbol("Database"),CLUSTER:Symbol("Cluster")},g=[r.RESUME_TOKEN_CHANGED,r.END,r.CLOSE],S="A change stream document has been received that lacks a resume token (_id).",b="ChangeStream is closed",O=/*#__PURE__*/function(e){A(r,e);function r(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};f(this,r);var a;a=d(this,r),a.pipeline=n,a.options=B({},o);var c;if(delete a.options.writeConcern,C(e,t.Collection))a.type=y.COLLECTION,c=e.s.db.client.options.serverSelectionTimeoutMS;else if(C(e,u.Db))a.type=y.DATABASE,c=e.client.options.serverSelectionTimeoutMS;else if(C(e,s.MongoClient))a.type=y.CLUSTER,c=e.options.serverSelectionTimeoutMS;else throw new i.MongoChangeStreamError("Parent provided to ChangeStream constructor must be an instance of Collection, Db, or MongoClient");a.contextOwner=Symbol(),a.parent=e,a.namespace=e.s.namespace,!a.options.readPreference&&e.readPreference&&(a.options.readPreference=e.readPreference),a.cursor=a._createChangeStreamCursor(o),a.isClosed=!1,a.mode=!1,a.on("newListener",function(e){e==="change"&&a.cursor&&a.listenerCount("change")===0&&a._streamEvents(a.cursor)}),a.on("removeListener",function(e){var t;e==="change"&&a.listenerCount("change")===0&&a.cursor&&((t=a.cursorStream)===null||t===void 0?void 0:t.removeAllListeners("data"))}),a.options.timeoutMS!=null&&(a.timeoutContext=new v.CSOTTimeoutContext({timeoutMS:a.options.timeoutMS,serverSelectionTimeoutMS:c}));return a}p(r,[{key:"asyncDispose",value:function e(){var e=this;return a(function(){return H(this,function(t){switch(t.label){case 0:return[4,e.close()];case 1:t.sent();return[2]}})})()}},{key:"resumeToken",get:function e(){var e;return(e=this.cursor)===null||e===void 0?void 0:e.resumeToken}},{key:"hasNext",value:function e(){var e=this;return a(function(){var t,r,n,o,u;return H(this,function(s){switch(s.label){case 0:e._setIsIterator(),(t=e.timeoutContext)===null||t===void 0?void 0:t.refresh();s.label=1;case 1:s.trys.push([1,,15,16]);s.label=2;case 2:s.trys.push([2,4,,13]);return[4,e.cursor.hasNext()];case 3:return[2,s.sent()];case 4:r=s.sent();s.label=5;case 5:s.trys.push([5,7,,12]);return[4,e._processErrorIteratorMode(r,e.cursor.id!=null)];case 6:s.sent();return[3,12];case 7:n=s.sent();if(C(n,i.MongoOperationTimeoutError)&&e.cursor.id==null)throw n;s.label=8;case 8:s.trys.push([8,10,,11]);return[4,e.close()];case 9:s.sent();return[3,11];case 10:o=s.sent();(0,m.squashError)(o);return[3,11];case 11:throw n;case 12:return[3,13];case 13:return[3,2];case 14:return[3,16];case 15:(u=e.timeoutContext)===null||u===void 0?void 0:u.clear();return[7];case 16:return[2]}})})()}},{key:"next",value:function e(){var e=this;return a(function(){var t,r,n,o,u,s;return H(this,function(a){switch(a.label){case 0:e._setIsIterator(),(t=e.timeoutContext)===null||t===void 0?void 0:t.refresh();a.label=1;case 1:a.trys.push([1,,15,16]);a.label=2;case 2:a.trys.push([2,4,,13]);return[4,e.cursor.next()];case 3:r=a.sent();return[2,e._processChange(r!==null&&r!==void 0?r:null)];case 4:n=a.sent();a.label=5;case 5:a.trys.push([5,7,,12]);return[4,e._processErrorIteratorMode(n,e.cursor.id!=null)];case 6:a.sent();return[3,12];case 7:o=a.sent();if(C(o,i.MongoOperationTimeoutError)&&e.cursor.id==null)throw o;a.label=8;case 8:a.trys.push([8,10,,11]);return[4,e.close()];case 9:a.sent();return[3,11];case 10:u=a.sent();(0,m.squashError)(u);return[3,11];case 11:throw o;case 12:return[3,13];case 13:return[3,2];case 14:return[3,16];case 15:(s=e.timeoutContext)===null||s===void 0?void 0:s.clear();return[7];case 16:return[2]}})})()}},{key:"tryNext",value:function e(){var e=this;return a(function(){var t,r,n,o,u,s;return H(this,function(a){switch(a.label){case 0:e._setIsIterator(),(t=e.timeoutContext)===null||t===void 0?void 0:t.refresh();a.label=1;case 1:a.trys.push([1,,15,16]);a.label=2;case 2:a.trys.push([2,4,,13]);return[4,e.cursor.tryNext()];case 3:return[2,(r=a.sent())!==null&&r!==void 0?r:null];case 4:n=a.sent();a.label=5;case 5:a.trys.push([5,7,,12]);return[4,e._processErrorIteratorMode(n,e.cursor.id!=null)];case 6:a.sent();return[3,12];case 7:o=a.sent();if(C(o,i.MongoOperationTimeoutError)&&e.cursor.id==null)throw o;a.label=8;case 8:a.trys.push([8,10,,11]);return[4,e.close()];case 9:a.sent();return[3,11];case 10:u=a.sent();(0,m.squashError)(u);return[3,11];case 11:throw o;case 12:return[3,13];case 13:return[3,2];case 14:return[3,16];case 15:(s=e.timeoutContext)===null||s===void 0?void 0:s.clear();return[7];case 16:return[2]}})})()}},{key:Symbol.asyncIterator,value:function e(){var e=this;return W(function(){var t;return H(this,function(r){switch(r.label){case 0:if(!!e.closed)return[3,11];r.label=1;case 1:r.trys.push([1,,7,11]);r.label=2;case 2:return[4,c(e.next())];case 3:return[4,r.sent()];case 4:r.sent();r.label=5;case 5:return[3,2];case 6:return[3,11];case 7:r.trys.push([7,9,,10]);return[4,c(e.close())];case 8:r.sent();return[3,10];case 9:t=r.sent();(0,m.squashError)(t);return[3,10];case 10:return[7];case 11:return[2]}})})()}},{key:"closed",get:function e(){return this.isClosed||this.cursor.closed}},{key:"close",value:function e(){var e=this;return a(function(){var t,r;return H(this,function(n){switch(n.label){case 0:(t=e.timeoutContext)===null||t===void 0?void 0:t.clear(),e.timeoutContext=void 0,e.isClosed=!0;r=e.cursor;n.label=1;case 1:n.trys.push([1,,3,4]);return[4,r.close()];case 2:n.sent();return[3,4];case 3:e._endStream();return[7];case 4:return[2]}})})()}},{key:"stream",value:function e(e){if(this.closed)throw new i.MongoChangeStreamError(b);return this.streamOptions=e,this.cursor.stream(e)}},{key:"_setIsEmitter",value:function e(){if(this.mode==="iterator")throw new i.MongoAPIError("ChangeStream cannot be used as an EventEmitter after being used as an iterator");this.mode="emitter"}},{key:"_setIsIterator",value:function e(){if(this.mode==="emitter")throw new i.MongoAPIError("ChangeStream cannot be used as an iterator after being used as an EventEmitter");this.mode="iterator"}},{key:"_createChangeStreamCursor",value:function e(e){var t=this;var u=(0,m.filterOptions)(e,E);this.type===y.CLUSTER&&(u.allChangesForCluster=!0);var s=[{$changeStream:u}].concat(U(this.pipeline)),a=this.type===y.CLUSTER?this.parent:this.type===y.DATABASE?this.parent.client:this.type===y.COLLECTION?this.parent.client:null;if(a==null)throw new i.MongoRuntimeError("Changestream type should only be one of cluster, database, collection. Found ".concat(this.type.toString()));var c=new o.ChangeStreamCursor(a,this.namespace,s,F(B({},e),{timeoutContext:this.timeoutContext?new n.CursorTimeoutContext(this.timeoutContext,this.contextOwner):void 0}));var l=true,d=false,f=undefined;try{var h=function(){var e=p.value;c.on(e,function(r){return t.emit(e,r)})};for(var v=g[Symbol.iterator](),p;!(l=(p=v.next()).done);l=true)h()}catch(e){d=true;f=e}finally{try{if(!l&&v.return!=null){v.return()}}finally{if(d){throw f}}}return this.listenerCount(r.CHANGE)>0&&this._streamEvents(c),c}},{key:"_closeEmitterModeWithError",value:function e(e){this.emit(r.ERROR,e),this.close().then(void 0,m.squashError)}},{key:"_streamEvents",value:function e(e){var t=this;this._setIsEmitter();var n;var o=(n=this.cursorStream)!==null&&n!==void 0?n:e.stream();this.cursorStream=o,o.on("data",function(e){var n;try{var o=t._processChange(e);t.emit(r.CHANGE,o)}catch(e){t.emit(r.ERROR,e)}(n=t.timeoutContext)===null||n===void 0?void 0:n.refresh()}),o.on("error",function(e){return t._processErrorStreamMode(e,t.cursor.id!=null)})}},{key:"_endStream",value:function e(){var e,t,r,n;(e=this.cursorStream)===null||e===void 0?void 0:e.removeAllListeners("data"),(t=this.cursorStream)===null||t===void 0?void 0:t.removeAllListeners("close"),(r=this.cursorStream)===null||r===void 0?void 0:r.removeAllListeners("end"),(n=this.cursorStream)===null||n===void 0?void 0:n.destroy(),this.cursorStream=void 0}},{key:"_processChange",value:function e(e){if(this.isClosed)throw new i.MongoAPIError(b);if(e==null)throw new i.MongoRuntimeError(b);if(e&&!e._id)throw new i.MongoChangeStreamError(S);return this.cursor.cacheResumeToken(e._id),this.options.startAtOperationTime=void 0,e}},{key:"_processErrorStreamMode",value:function e(e,t){var n=this;this.isClosed||(t&&((0,i.isResumableError)(e,this.cursor.maxWireVersion)||C(e,i.MongoOperationTimeoutError))?(this._endStream(),this.cursor.close().then(function(){return n._resume(e)},function(t){return(0,m.squashError)(t),n._resume(e)}).then(function(){C(e,i.MongoOperationTimeoutError)&&n.emit(r.ERROR,e)},function(){return n._closeEmitterModeWithError(e)})):this._closeEmitterModeWithError(e))}},{key:"_processErrorIteratorMode",value:function e(e,t){var r=this;return a(function(){var n,o;return H(this,function(u){switch(u.label){case 0:if(r.isClosed)throw new i.MongoAPIError(b);if(!(t&&((0,i.isResumableError)(e,r.cursor.maxWireVersion)||C(e,i.MongoOperationTimeoutError))))return[3,6];u.label=1;case 1:u.trys.push([1,3,,4]);return[4,r.cursor.close()];case 2:u.sent();return[3,4];case 3:n=u.sent();(0,m.squashError)(n);return[3,4];case 4:return[4,r._resume(e)];case 5:if(u.sent(),C(e,i.MongoOperationTimeoutError))throw e;return[3,10];case 6:u.trys.push([6,8,,9]);return[4,r.close()];case 7:u.sent();return[3,9];case 8:o=u.sent();(0,m.squashError)(o);return[3,9];case 9:throw e;case 10:return[2]}})})()}},{key:"_resume",value:function e(e){var t=this;return a(function(){var r,n,o;return H(this,function(u){switch(u.label){case 0:(r=t.timeoutContext)===null||r===void 0?void 0:r.refresh();n=(0,m.getTopology)(t.parent);u.label=1;case 1:u.trys.push([1,3,,5]);return[4,n.selectServer(t.cursor.readPreference,{operationName:"reconnect topology in change stream",timeoutContext:t.timeoutContext})];case 2:u.sent(),t.cursor=t._createChangeStreamCursor(t.cursor.resumeOptions);return[3,5];case 3:o=u.sent();return[4,t.close()];case 4:throw u.sent(),e;case 5:return[2]}})})()}}]);return r}(l.TypedEventEmitter);e.ChangeStream=O;O.RESPONSE=r.RESPONSE;O.MORE=r.MORE;O.INIT=r.INIT;O.CLOSE=r.CLOSE;O.CHANGE=r.CHANGE;O.END=r.END;O.ERROR=r.ERROR;O.RESUME_TOKEN_CHANGED=r.RESUME_TOKEN_CHANGED;(0,h.configureResourceManagement)(O.prototype)});var tn=et(function(e){"use strict";var t=function e(e){var t=e?{kModuleError:e}:{};return new Proxy(t,{get:function(t,r){if(r==="kModuleError")return e;throw e},set:function(){throw e}})};var r=function e(){var e;try{e=Z("kerberos")}catch(r){e=t(new l.MongoMissingDependencyError("Optional module `kerberos` not found. Please install it to enable kerberos authentication",{cause:r,dependencyName:"kerberos"}))}return e};var n=function e(){var e;try{e=Z("@mongodb-js/zstd")}catch(r){e=t(new l.MongoMissingDependencyError("Optional module `@mongodb-js/zstd` not found. Please install it to enable zstd compression",{cause:r,dependencyName:"zstd"}))}return e};var o=function e(){try{return Z("@aws-sdk/credential-providers")}catch(e){return t(new l.MongoMissingDependencyError("Optional module `@aws-sdk/credential-providers` not found. Please install it to enable getting aws credentials via the official sdk.",{cause:e,dependencyName:"@aws-sdk/credential-providers"}))}};var u=function e(){try{return Z("gcp-metadata")}catch(e){return t(new l.MongoMissingDependencyError("Optional module `gcp-metadata` not found. Please install it to enable getting gcp credentials via the official sdk.",{cause:e,dependencyName:"gcp-metadata"}))}};var i=function e(){try{return Z("snappy")}catch(e){return{kModuleError:new l.MongoMissingDependencyError("Optional module `snappy` not found. Please install it to enable snappy compression",{cause:e,dependencyName:"snappy"})}}};var s=function e(){try{return Z("socks")}catch(e){return{kModuleError:new l.MongoMissingDependencyError("Optional module `socks` not found. Please install it to connections over a SOCKS5 proxy",{cause:e,dependencyName:"socks"})}}};var a=function e(){var e;try{e=Z("aws4")}catch(r){e=t(new l.MongoMissingDependencyError("Optional module `aws4` not found. Please install it to enable AWS authentication",{cause:r,dependencyName:"aws4"}))}return e};var c=function e(){var e=null;try{e=Z("mongodb-client-encryption")}catch(e){return{kModuleError:new l.MongoMissingDependencyError("Optional module `mongodb-client-encryption` not found. Please install it to use auto encryption or ClientEncryption.",{cause:e,dependencyName:"mongodb-client-encryption"})}}return e};ei();Object.defineProperty(e,"__esModule",{value:!0});e.aws4=void 0;e.getKerberos=r;e.getZstdLibrary=n;e.getAwsCredentialProvider=o;e.getGcpMetadata=u;e.getSnappy=i;e.getSocks=s;e.getMongoDBClientEncryption=c;var l=ec();e.aws4=a()});var to=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.AuthProvider=e.AuthContext=void 0;var t=ec(),r=function e(t,r,n){f(this,e);this.reauthenticating=!1,this.connection=t,this.credentials=r,this.options=n};e.AuthContext=r;var n=/*#__PURE__*/function(){function e(){f(this,e)}p(e,[{key:"prepare",value:function e(e,t){return a(function(){return H(this,function(t){return[2,e]})})()}},{key:"reauth",value:function e(e){var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:if(e.reauthenticating)throw new t.MongoRuntimeError("Reauthentication already in progress.");n.label=1;case 1:n.trys.push([1,,3,4]);e.reauthenticating=!0;return[4,r.auth(e)];case 2:n.sent();return[3,4];case 3:e.reauthenticating=!1;return[7];case 4:return[2]}})})()}}]);return e}();e.AuthProvider=n});var tu=et(function(e){"use strict";var t=function e(e,t){return g.apply(this,arguments)};var r=function e(e){return b.apply(this,arguments)};var n=function e(e){return{saslStart:1,mechanism:"GSSAPI",payload:e,autoAuthorize:1}};var o=function e(e,t){return{saslContinue:1,conversationId:t,payload:e}};var u=function e(e,t,r){return O.apply(this,arguments)};var i=function e(e,t,r){return w.apply(this,arguments)};var s=function e(e,t){return _.apply(this,arguments)};var c=function e(e){return D.apply(this,arguments)};var l=function e(){C||(C=(0,v.getKerberos)())};ei();Object.defineProperty(e,"__esModule",{value:!0});e.GSSAPI=e.GSSAPICanonicalizationValue=void 0;e.performGSSAPICanonicalizeHostName=s;e.resolveCname=c;var h=Z("dns"),v=tn(),m=ec(),E=eg(),y=to();e.GSSAPICanonicalizationValue=Object.freeze({on:!0,off:!1,none:"none",forward:"forward",forwardAndReverse:"forwardAndReverse"});function g(){g=a(function(e,t){return H(this,function(r){switch(r.label){case 0:return[4,e.command((0,E.ns)("$external.$cmd"),t)];case 1:return[2,r.sent()]}})});return g.apply(this,arguments)}var C,S=/*#__PURE__*/function(e){A(s,e);function s(){f(this,s);return d(this,s,arguments)}p(s,[{key:"auth",value:function e(e){return a(function(){var s,a,c,l,d,f,h,v,p;return H(this,function(E){switch(E.label){case 0:s=e.connection,a=e.credentials;if(a==null)throw new m.MongoMissingCredentialsError("Credentials required for GSSAPI authentication");c=a.username;return[4,r(e)];case 1:l=E.sent();return[4,l.step("")];case 2:d=E.sent();return[4,t(s,n(d))];case 3:f=E.sent();return[4,u(l,10,f.payload)];case 4:h=E.sent();return[4,t(s,o(h,f.conversationId))];case 5:v=E.sent();return[4,i(l,c,v.payload)];case 6:p=E.sent();return[4,t(s,{saslContinue:1,conversationId:v.conversationId,payload:p})];case 7:E.sent();return[2]}})})()}}]);return s}(y.AuthProvider);e.GSSAPI=S;function b(){b=a(function(e){var t,r,n,o,u,i,a,c,d,f,h,v,p,E;return H(this,function(y){switch(y.label){case 0:t=e.options,r=t.hostAddress,n=e.credentials;if(!r||typeof r.host!="string"||!n)throw new m.MongoInvalidArgumentError("Connection must have host and port and credentials defined.");if(l(),"kModuleError"in C)throw C.kModuleError;u=C.initializeClient,i=n.username,a=n.password,c=n.mechanismProperties,d=(o=c.SERVICE_NAME)!==null&&o!==void 0?o:"mongodb";return[4,s(r.host,c)];case 1:f=y.sent(),h={};a!=null&&Object.assign(h,{user:i,password:a});p=(v=c.SERVICE_HOST)!==null&&v!==void 0?v:f,E="".concat(d).concat(process.platform==="win32"?"/":"@").concat(p);"SERVICE_REALM"in c&&(E="".concat(E,"@").concat(c.SERVICE_REALM));return[4,u(E,h)];case 2:return[2,y.sent()]}})});return b.apply(this,arguments)}function O(){O=a(function(e,t,r){var n;return H(this,function(o){switch(o.label){case 0:o.trys.push([0,2,,4]);return[4,e.step(r)];case 1:return[2,o.sent()||""];case 2:n=o.sent();if(t===0)throw n;return[4,u(e,t-1,r)];case 3:return[2,o.sent()];case 4:return[2]}})});return O.apply(this,arguments)}function w(){w=a(function(e,t,r){var n;return H(this,function(o){switch(o.label){case 0:return[4,e.unwrap(r)];case 1:n=o.sent();return[4,e.wrap(n||"",{user:t})];case 2:return[2,o.sent()]}})});return w.apply(this,arguments)}function _(){_=a(function(t,r){var n,o,u,i,s;return H(this,function(a){switch(a.label){case 0:n=r.CANONICALIZE_HOST_NAME;if(!n||n===e.GSSAPICanonicalizationValue.none)return[2,t];if(!(n===e.GSSAPICanonicalizationValue.on||n===e.GSSAPICanonicalizationValue.forwardAndReverse))return[3,7];return[4,h.promises.lookup(t)];case 1:o=a.sent(),u=o.address;a.label=2;case 2:a.trys.push([2,4,,6]);return[4,h.promises.resolvePtr(u)];case 3:i=a.sent();return[2,i.length>0?i[0]:t];case 4:s=a.sent();return[4,c(t)];case 5:return[2,a.sent()];case 6:return[3,9];case 7:return[4,c(t)];case 8:return[2,a.sent()];case 9:return[2]}})});return _.apply(this,arguments)}function D(){D=a(function(e){var t,r;return H(this,function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,h.promises.resolveCname(e)];case 1:t=n.sent();return[2,t.length>0?t[0]:e];case 2:r=n.sent();return[2,e];case 3:return[2]}})});return D.apply(this,arguments)}});var ti=et(function(e){"use strict";ei();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])});var ts=et(function(e){"use strict";var t=function e(e){return e&&Array.isArray(e.saslSupportedMechs)?e.saslSupportedMechs.includes(o.AuthMechanism.MONGODB_SCRAM_SHA256)?o.AuthMechanism.MONGODB_SCRAM_SHA256:o.AuthMechanism.MONGODB_SCRAM_SHA1:o.AuthMechanism.MONGODB_SCRAM_SHA256};ei();Object.defineProperty(e,"__esModule",{value:!0});e.MongoCredentials=e.DEFAULT_ALLOWED_HOSTS=void 0;var r=ec(),n=tu(),o=ti();var u=["test","azure","gcp","k8s"],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 s="TOKEN_RESOURCE must be set in the auth mechanism properties when ENVIRONMENT is azure or gcp.",a=/*#__PURE__*/function(){function a(t){f(this,a);var r;this.username=(r=t.username)!==null&&r!==void 0?r:"",this.password=t.password,this.source=t.source,!this.source&&t.db&&(this.source=t.db),this.mechanism=t.mechanism||o.AuthMechanism.MONGODB_DEFAULT,this.mechanismProperties=t.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=F(B({},this.mechanismProperties),{AWS_SESSION_TOKEN:process.env.AWS_SESSION_TOKEN}))),this.mechanism===o.AuthMechanism.MONGODB_OIDC&&!this.mechanismProperties.ALLOWED_HOSTS&&(this.mechanismProperties=F(B({},this.mechanismProperties),{ALLOWED_HOSTS:e.DEFAULT_ALLOWED_HOSTS})),Object.freeze(this.mechanismProperties),Object.freeze(this)}p(a,[{key:"equals",value:function e(e){return this.mechanism===e.mechanism&&this.username===e.username&&this.password===e.password&&this.source===e.source}},{key:"resolveAuthMechanism",value:function e(e){return this.mechanism.match(/DEFAULT/i)?new a({username:this.username,password:this.password,source:this.source,mechanism:t(e),mechanismProperties:this.mechanismProperties}):this}},{key:"validate",value:function e(){if((this.mechanism===o.AuthMechanism.MONGODB_GSSAPI||this.mechanism===o.AuthMechanism.MONGODB_PLAIN||this.mechanism===o.AuthMechanism.MONGODB_SCRAM_SHA1||this.mechanism===o.AuthMechanism.MONGODB_SCRAM_SHA256)&&!this.username)throw new r.MongoMissingCredentialsError("Username required for mechanism '".concat(this.mechanism,"'"));if(this.mechanism===o.AuthMechanism.MONGODB_OIDC){if(this.username&&this.mechanismProperties.ENVIRONMENT&&this.mechanismProperties.ENVIRONMENT!=="azure")throw new r.MongoInvalidArgumentError("username and ENVIRONMENT '".concat(this.mechanismProperties.ENVIRONMENT,"' may not be used together for mechanism '").concat(this.mechanism,"'."));if(this.username&&this.password)throw new r.MongoInvalidArgumentError("No password is allowed in ENVIRONMENT '".concat(this.mechanismProperties.ENVIRONMENT,"' for '").concat(this.mechanism,"'."));if((this.mechanismProperties.ENVIRONMENT==="azure"||this.mechanismProperties.ENVIRONMENT==="gcp")&&!this.mechanismProperties.TOKEN_RESOURCE)throw new r.MongoInvalidArgumentError(s);if(this.mechanismProperties.ENVIRONMENT&&!u.includes(this.mechanismProperties.ENVIRONMENT))throw new r.MongoInvalidArgumentError("Currently only a ENVIRONMENT in ".concat(u.join(",")," is supported for mechanism '").concat(this.mechanism,"'."));if(!this.mechanismProperties.ENVIRONMENT&&!this.mechanismProperties.OIDC_CALLBACK&&!this.mechanismProperties.OIDC_HUMAN_CALLBACK)throw new r.MongoInvalidArgumentError("Either a ENVIRONMENT, OIDC_CALLBACK, or OIDC_HUMAN_CALLBACK must be specified for mechanism '".concat(this.mechanism,"'."));if(this.mechanismProperties.ALLOWED_HOSTS){var e=this.mechanismProperties.ALLOWED_HOSTS;if(!Array.isArray(e))throw new r.MongoInvalidArgumentError(i);var t=true,a=false,c=undefined;try{for(var l=e[Symbol.iterator](),d;!(t=(d=l.next()).done);t=true){var f=d.value;if(typeof f!="string")throw new r.MongoInvalidArgumentError(i)}}catch(e){a=true;c=e}finally{try{if(!t&&l.return!=null){l.return()}}finally{if(a){throw c}}}}}if(o.AUTH_MECHS_AUTH_SRC_EXTERNAL.has(this.mechanism)&&this.source!=null&&this.source!=="$external")throw new r.MongoAPIError("Invalid source '".concat(this.source,"' for mechanism '").concat(this.mechanism,"' specified."));if(this.mechanism===o.AuthMechanism.MONGODB_PLAIN&&this.source==null)throw new r.MongoAPIError("PLAIN Authentication Mechanism needs an auth source");if(this.mechanism===o.AuthMechanism.MONGODB_X509&&this.password!=null){if(this.password===""){Reflect.set(this,"password",void 0);return}throw new r.MongoAPIError("Password not allowed for mechanism MONGODB-X509")}var h;var v=(h=this.mechanismProperties.CANONICALIZE_HOST_NAME)!==null&&h!==void 0?h:!1;if(!Object.values(n.GSSAPICanonicalizationValue).includes(v))throw new r.MongoAPIError("Invalid CANONICALIZE_HOST_NAME value: ".concat(v))}}],[{key:"merge",value:function e(e,t){var r,n,u,i,s,c,l,d,f,h,v;return new a({username:(n=(r=t.username)!==null&&r!==void 0?r:e===null||e===void 0?void 0:e.username)!==null&&n!==void 0?n:"",password:(i=(u=t.password)!==null&&u!==void 0?u:e===null||e===void 0?void 0:e.password)!==null&&i!==void 0?i:"",mechanism:(c=(s=t.mechanism)!==null&&s!==void 0?s:e===null||e===void 0?void 0:e.mechanism)!==null&&c!==void 0?c:o.AuthMechanism.MONGODB_DEFAULT,mechanismProperties:(d=(l=t.mechanismProperties)!==null&&l!==void 0?l:e===null||e===void 0?void 0:e.mechanismProperties)!==null&&d!==void 0?d:{},source:(v=(h=(f=t.source)!==null&&f!==void 0?f:t.db)!==null&&h!==void 0?h:e===null||e===void 0?void 0:e.source)!==null&&v!==void 0?v:"admin"})}}]);return a}();e.MongoCredentials=a});var ta=et(function(e){"use strict";var t=function e(e,t,r){return r.globals&&(e=r.globals[e.name]),new e("".concat(r.context?r.context:"Value"," ").concat(t,"."))};var r=function e(e,r){if((typeof e==="undefined"?"undefined":j(e))=="bigint")throw t(TypeError,"is a BigInt which cannot be converted to a number",r);return r.globals?r.globals.Number(e):Number(e)};var n=function e(e){return e>0&&e%1===.5&&(e&1)===0||e<0&&e%1===-.5&&(e&1)===1?s(Math.floor(e)):s(Math.round(e))};var o=function e(e){return s(Math.trunc(e))};var u=function e(e){return e<0?-1:1};var i=function e(e,t){var r=e%t;return u(t)!==u(r)?r+t:r};var s=function e(e){return e===0?0:e};var a=function e(e,u){var a=u.unsigned;var c,l;a?(c=0,l=Math.pow(2,e)-1):(c=-Math.pow(2,e-1),l=Math.pow(2,e-1)-1);var d=Math.pow(2,e),f=Math.pow(2,e-1);return function(e){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var h=r(e,u);if(h=s(h),u.enforceRange){if(!Number.isFinite(h))throw t(TypeError,"is not a finite number",u);if(h=o(h),h<c||h>l)throw t(TypeError,"is outside the accepted range of ".concat(c," to ").concat(l,", inclusive"),u);return h}return!Number.isNaN(h)&&u.clamp?(h=Math.min(Math.max(h,c),l),h=n(h),h):!Number.isFinite(h)||h===0?0:(h=o(h),h>=c&&h<=l?h:(h=i(h,d),!a&&h>=f?h-d:h))}};var c=function e(e,u){var i=u.unsigned;var a=Number.MAX_SAFE_INTEGER,c=i?0:Number.MIN_SAFE_INTEGER,l=i?BigInt.asUintN:BigInt.asIntN;return function(u){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var d=r(u,i);if(d=s(d),i.enforceRange){if(!Number.isFinite(d))throw t(TypeError,"is not a finite number",i);if(d=o(d),d<c||d>a)throw t(TypeError,"is outside the accepted range of ".concat(c," to ").concat(a,", inclusive"),i);return d}if(!Number.isNaN(d)&&i.clamp)return d=Math.min(Math.max(d,c),a),d=n(d),d;if(!Number.isFinite(d)||d===0)return 0;var f=BigInt(o(d));return f=l(e,f),Number(f)}};var l=function e(e){try{return h.call(e),!0}catch(e){return!1}};var d=function e(e){try{return v.call(e),!0}catch(e){return!1}};var f=function e(e){try{return new Uint8Array(e),!1}catch(e){return!0}};ei();e.any=function(e){return e};e.undefined=function(){};e.boolean=function(e){return!!e};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"]=c(64,{unsigned:!1});e["unsigned long long"]=c(64,{unsigned:!0});e.double=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var o=r(e,n);if(!Number.isFinite(o))throw t(TypeError,"is not a finite floating-point value",n);return o};e["unrestricted double"]=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return r(e,t)};e.float=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var o=r(e,n);if(!Number.isFinite(o))throw t(TypeError,"is not a finite floating-point value",n);if(Object.is(o,-0))return o;var u=Math.fround(o);if(!Number.isFinite(u))throw t(TypeError,"is outside the range of a single-precision floating-point value",n);return u};e["unrestricted float"]=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var n=r(e,t);return isNaN(n)||Object.is(n,-0)?n:Math.fround(n)};e.DOMString=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(r.treatNullAsEmptyString&&e===null)return"";if((typeof e==="undefined"?"undefined":j(e))=="symbol")throw t(TypeError,"is a symbol, which cannot be converted to a string",r);return(r.globals?r.globals.String:String)(e)};e.ByteString=function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var o=e.DOMString(r,n),u;for(var i=0;(u=o.codePointAt(i))!==void 0;++i)if(u>255)throw t(TypeError,"is not a valid ByteString",n);return o};e.USVString=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var n=e.DOMString(t,r),o=n.length,u=[];for(var i=0;i<o;++i){var s=n.charCodeAt(i);if(s<55296||s>57343)u.push(String.fromCodePoint(s));else if(56320<=s&&s<=57343)u.push(String.fromCodePoint(65533));else if(i===o-1)u.push(String.fromCodePoint(65533));else{var a=n.charCodeAt(i+1);if(56320<=a&&a<=57343){var c=s&1023,l=a&1023;u.push(String.fromCodePoint(65536+1024*c+l)),++i}else u.push(String.fromCodePoint(65533))}}return u.join("")};e.object=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e===null||(typeof e==="undefined"?"undefined":j(e))!="object"&&typeof e!="function")throw t(TypeError,"is not an object",r);return e};var h=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get,v=typeof SharedArrayBuffer=="function"?Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype,"byteLength").get:null;e.ArrayBuffer=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!l(e))throw r.allowShared&&!d(e)?t(TypeError,"is not an ArrayBuffer or SharedArrayBuffer",r):t(TypeError,"is not an ArrayBuffer",r);if(f(e))throw t(TypeError,"is a detached ArrayBuffer",r);return e};var p=Object.getOwnPropertyDescriptor(DataView.prototype,"byteLength").get;e.DataView=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};try{p.call(e)}catch(e){throw t(TypeError,"is not a DataView",r)}if(!r.allowShared&&d(e.buffer))throw t(TypeError,"is backed by a SharedArrayBuffer, which is not allowed",r);if(f(e.buffer))throw t(TypeError,"is backed by a detached ArrayBuffer",r);return e};var m=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array).prototype,Symbol.toStringTag).get;[Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array,Uint8ClampedArray,Float32Array,Float64Array].forEach(function(r){var n=r.name,o=RegExp("^[AEIOU]","u").test(n)?"an":"a";e[n]=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!ArrayBuffer.isView(e)||m.call(e)!==n)throw t(TypeError,"is not ".concat(o," ").concat(n," object"),r);if(!r.allowShared&&d(e.buffer))throw t(TypeError,"is a view on a SharedArrayBuffer, which is not allowed",r);if(f(e.buffer))throw t(TypeError,"is a view on a detached ArrayBuffer",r);return e}});e.ArrayBufferView=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!ArrayBuffer.isView(e))throw t(TypeError,"is not a view on an ArrayBuffer or SharedArrayBuffer",r);if(!r.allowShared&&d(e.buffer))throw t(TypeError,"is a view on a SharedArrayBuffer, which is not allowed",r);if(f(e.buffer))throw t(TypeError,"is a view on a detached ArrayBuffer",r);return e};e.BufferSource=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(ArrayBuffer.isView(e)){if(!r.allowShared&&d(e.buffer))throw t(TypeError,"is a view on a SharedArrayBuffer, which is not allowed",r);if(f(e.buffer))throw t(TypeError,"is a view on a detached ArrayBuffer",r);return e}if(!r.allowShared&&!l(e))throw t(TypeError,"is not an ArrayBuffer or a view on one",r);if(r.allowShared&&!d(e)&&!l(e))throw t(TypeError,"is not an ArrayBuffer, SharedArrayBuffer, or a view on one",r);if(f(e))throw t(TypeError,"is a detached ArrayBuffer",r);return e};e.DOMTimeStamp=e["unsigned long long"]});var tc=et(function(e,t){"use strict";var r=function e(e){return(typeof e==="undefined"?"undefined":j(e))=="object"&&e!==null||typeof e=="function"};var n=function e(e,t){var r=true,n=false,o=undefined;try{for(var u=Reflect.ownKeys(t)[Symbol.iterator](),i;!(r=(i=u.next()).done);r=true){var s=i.value;var a=Reflect.getOwnPropertyDescriptor(t,s);if(a&&!Reflect.defineProperty(e,s,a))throw new TypeError("Cannot redefine property: ".concat(String(s)))}}catch(e){n=true;o=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw o}}}};var o=function e(e,t){var r=u(e);return Object.defineProperties(Object.create(r["%Object.prototype%"]),Object.getOwnPropertyDescriptors(t))};var u=function e(e){if(v(e,y))return e[y];var t=Object.create(null);t["%Object.prototype%"]=e.Object.prototype,t["%IteratorPrototype%"]=Object.getPrototypeOf(Object.getPrototypeOf(new e.Array()[Symbol.iterator]()));try{t["%AsyncIteratorPrototype%"]=Object.getPrototypeOf(Object.getPrototypeOf(e.eval("(async function* () {})").prototype))}catch(e){t["%AsyncIteratorPrototype%"]=g}return e[y]=t,t};var i=function e(e,t,r){return e[E]||(e[E]=Object.create(null)),t in e[E]||(e[E][t]=r()),e[E][t]};var s=function e(e){return e?e[p]:null};var a=function e(e){return e?e[m]:null};var c=function e(e){var t=s(e);return t||e};var l=function e(e){var t=a(e);return t||e};var d=function e(e){if(typeof e!="string")return!1;var t=e>>>0;if(t===Math.pow(2,32)-1)return!1;var r="".concat(t);return e===r};var f=function e(e){try{return C.call(e),!0}catch(e){return!1}};var h=function e(e,t){var r=N(e,2),n=r[0],o=r[1];var u;switch(t){case"key":u=n;break;case"value":u=o;break;case"key+value":u=[n,o];break}return{value:u,done:!1}};ei();var v=Function.prototype.call.bind(Object.prototype.hasOwnProperty);var p=Symbol("wrapper"),m=Symbol("impl"),E=Symbol("SameObject caches"),y=Symbol.for("[webidl2js] constructor registry"),g=Object.getPrototypeOf(Object.getPrototypeOf(/*#__PURE__*/W(function(){return H(this,function(e){return[2]})})).prototype);var A=Symbol("internal");var C=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get;var S=Symbol("supports property index"),b=Symbol("supported property indices"),O=Symbol("supports property name"),w=Symbol("supported property names"),_=Symbol("indexed property get"),D=Symbol("indexed property set new"),B=Symbol("indexed property set existing"),T=Symbol("named property get"),F=Symbol("named property set new"),M=Symbol("named property set existing"),R=Symbol("named property delete"),k=Symbol("async iterator get the next iteration result"),I=Symbol("async iterator return steps"),P=Symbol("async iterator initialization steps"),x=Symbol("async iterator end of iteration");t.exports=e={isObject:r,hasOwn:v,define:n,newObjectInRealm:o,wrapperSymbol:p,implSymbol:m,getSameObject:i,ctorRegistrySymbol:y,initCtorRegistry:u,wrapperForImpl:s,implForWrapper:a,tryWrapperForImpl:c,tryImplForWrapper:l,iterInternalSymbol:A,isArrayBuffer:f,isArrayIndexPropName:d,supportsPropertyIndex:S,supportedPropertyIndices:b,supportsPropertyName:O,supportedPropertyNames:w,indexedGet:_,indexedSetNew:D,indexedSetExisting:B,namedGet:T,namedSetNew:F,namedSetExisting:M,namedDelete:R,asyncIteratorNext:k,asyncIteratorReturn:I,asyncIteratorInit:P,asyncIteratorEOI:x,iteratorResult:h}});var tl={};er(tl,{decode:function(){return tD},default:function(){return tR},encode:function(){return tB},toASCII:function(){return tF},toUnicode:function(){return tT},ucs2decode:function(){return tv},ucs2encode:function(){return tb}});function td(e){throw new RangeError(tg[e])}function tf(e,t){var r=[],n=e.length;for(;n--;)r[n]=t(e[n]);return r}function th(e,t){var r=e.split("@"),n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(ty,".");var o=e.split("."),u=tf(o,t).join(".");return n+u}function tv(e){var t=[],r=0,n=e.length;for(;r<n;){var o=e.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){var u=e.charCodeAt(r++);(u&64512)==56320?t.push(((o&1023)<<10)+(u&1023)+65536):(t.push(o),r--)}else t.push(o)}return t}var tp,tm,tE,ty,tg,tA,tC,tS,tb,tO,tw,t_,tD,tB,tT,tF,tM,tR,tk=ee(function(){"use strict";var e;ei();tp="-",tm=/^xn--/,tE=/[^\0-\x7F]/,ty=/[\x2E\u3002\uFF0E\uFF61]/g,tg={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},tA=35,tC=Math.floor,tS=String.fromCharCode;tb=function(t){return(e=String).fromCodePoint.apply(e,U(t))},tO=function e(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:36},tw=function e(e,t){return e+22+75*(e<26)-((t!=0)<<5)},t_=function e(e,t,r){var n=0;for(e=r?tC(e/700):e>>1,e+=tC(e/t);e>tA*26>>1;n+=36)e=tC(e/tA);return tC(n+(tA+1)*e/(e+38))},tD=function e(e){var t;var r=[],n=e.length,o=0,u=128,i=72,s=e.lastIndexOf(tp);s<0&&(s=0);for(var a=0;a<s;++a)e.charCodeAt(a)>=128&&td("not-basic"),r.push(e.charCodeAt(a));for(var c=s>0?s+1:0;c<n;){var l=o;for(var d=1,f=36;;f+=36){c>=n&&td("invalid-input");var h=tO(e.charCodeAt(c++));h>=36&&td("invalid-input"),h>tC((0x7fffffff-o)/d)&&td("overflow"),o+=h*d;var v=f<=i?1:f>=i+26?26:f-i;if(h<v)break;var p=36-v;d>tC(0x7fffffff/p)&&td("overflow"),d*=p}var m=r.length+1;i=t_(o-l,m,l==0),tC(o/m)>0x7fffffff-u&&td("overflow"),u+=tC(o/m),o%=m,r.splice(o++,0,u)}return(t=String).fromCodePoint.apply(t,U(r))},tB=function e(e){var t=[];e=tv(e);var r=e.length,n=128,o=0,u=72;var i=true,s=false,a=undefined;try{for(var c=e[Symbol.iterator](),l;!(i=(l=c.next()).done);i=true){var d=l.value;d<128&&t.push(tS(d))}}catch(e){s=true;a=e}finally{try{if(!i&&c.return!=null){c.return()}}finally{if(s){throw a}}}var f=t.length,h=f;for(f&&t.push(tp);h<r;){var v=0x7fffffff;var p=true,m=false,E=undefined;try{for(var y=e[Symbol.iterator](),g;!(p=(g=y.next()).done);p=true){var A=g.value;A>=n&&A<v&&(v=A)}}catch(e){m=true;E=e}finally{try{if(!p&&y.return!=null){y.return()}}finally{if(m){throw E}}}var C=h+1;v-n>tC((0x7fffffff-o)/C)&&td("overflow"),o+=(v-n)*C,n=v;var S=true,b=false,O=undefined;try{for(var w=e[Symbol.iterator](),_;!(S=(_=w.next()).done);S=true){var D=_.value;if(D<n&&++o>0x7fffffff&&td("overflow"),D===n){var B=o;for(var T=36;;T+=36){var F=T<=u?1:T>=u+26?26:T-u;if(B<F)break;var M=B-F,R=36-F;t.push(tS(tw(F+M%R,0))),B=tC(M/R)}t.push(tS(tw(B,0))),u=t_(o,C,h===f),o=0,++h}}}catch(e){b=true;O=e}finally{try{if(!S&&w.return!=null){w.return()}}finally{if(b){throw O}}}++o,++n}return t.join("")},tT=function e(e){return th(e,function(e){return tm.test(e)?tD(e.slice(4).toLowerCase()):e})},tF=function e(e){return th(e,function(e){return tE.test(e)?"xn--"+tB(e):e})},tM={version:"2.3.1",ucs2:{decode:tv,encode:tb},decode:tD,encode:tB,toASCII:tF,toUnicode:tT},tR=tM});var tI=et(function(e,t){"use strict";ei();var r=RegExp("[\\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\\u0897-\\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{10D69}-\\u{10D6D}\\u{10EAB}\\u{10EAC}\\u{10EFC}-\\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{113B8}-\\u{113C0}\\u{113C2}\\u{113C5}\\u{113C7}-\\u{113CA}\\u{113CC}-\\u{113D0}\\u{113D2}\\u{113E1}\\u{113E2}\\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{11F5A}\\u{13440}\\u{13447}-\\u{13455}\\u{1611E}-\\u{1612F}\\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{1E5EE}\\u{1E5EF}\\u{1E8D0}-\\u{1E8D6}\\u{1E944}-\\u{1E94A}\\u{E0100}-\\u{E01EF}]","u"),n=RegExp("[\\u094D\\u09CD\\u0A4D\\u0ACD\\u0B4D\\u0BCD\\u0C4D\\u0CCD\\u0D3B\\u0D3C\\u0D4D\\u0DCA\\u0E3A\\u0EBA\\u0F84\\u1039\\u103A\\u1714\\u1715\\u1734\\u17D2\\u1A60\\u1B44\\u1BAA\\u1BAB\\u1BF2\\u1BF3\\u2D7F\\uA806\\uA82C\\uA8C4\\uA953\\uA9C0\\uAAF6\\uABED\\u{10A3F}\\u{11046}\\u{11070}\\u{1107F}\\u{110B9}\\u{11133}\\u{11134}\\u{111C0}\\u{11235}\\u{112EA}\\u{1134D}\\u{113CE}-\\u{113D0}\\u{11442}\\u{114C2}\\u{115BF}\\u{1163F}\\u{116B6}\\u{1172B}\\u{11839}\\u{1193D}\\u{1193E}\\u{119E0}\\u{11A34}\\u{11A47}\\u{11A99}\\u{11C3F}\\u{11D44}\\u{11D45}\\u{11D97}\\u{11F41}\\u{11F42}\\u{1612F}]","u"),o=RegExp("[\\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\\u0886\\u0889-\\u088D\\u08A0-\\u08A9\\u08AF\\u08B0\\u08B3-\\u08B8\\u08BA-\\u08C8\\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{10EC3}\\u{10EC4}\\u{10F30}-\\u{10F32}\\u{10F34}-\\u{10F44}\\u{10F51}-\\u{10F53}\\u{10F70}-\\u{10F73}\\u{10F76}-\\u{10F81}\\u{10FB0}\\u{10FB2}\\u{10FB3}\\u{10FB8}\\u{10FBB}\\u{10FBC}\\u{10FBE}\\u{10FBF}\\u{10FC1}\\u{10FC4}\\u{10FCA}\\u{10FCB}\\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\\u0897-\\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\\u0CBF\\u0CC6\\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\\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\\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\\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{10D69}-\\u{10D6D}\\u{10EAB}\\u{10EAC}\\u{10EFC}-\\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{113BB}-\\u{113C0}\\u{113CE}\\u{113D0}\\u{113D2}\\u{113E1}\\u{113E2}\\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{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{11F00}\\u{11F01}\\u{11F36}-\\u{11F3A}\\u{11F40}\\u{11F42}\\u{11F5A}\\u{13430}-\\u{13440}\\u{13447}-\\u{13455}\\u{1611E}-\\u{16129}\\u{1612D}-\\u{1612F}\\u{16AF0}-\\u{16AF4}\\u{16B30}-\\u{16B36}\\u{16F4F}\\u{16F8F}-\\u{16F92}\\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{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{1E5EE}\\u{1E5EF}\\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\\u0897-\\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\\u0CBF\\u0CC6\\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\\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\\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\\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{10D69}-\\u{10D6D}\\u{10EAB}\\u{10EAC}\\u{10EFC}-\\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{113BB}-\\u{113C0}\\u{113CE}\\u{113D0}\\u{113D2}\\u{113E1}\\u{113E2}\\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{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{11F00}\\u{11F01}\\u{11F36}-\\u{11F3A}\\u{11F40}\\u{11F42}\\u{11F5A}\\u{13430}-\\u{13440}\\u{13447}-\\u{13455}\\u{1611E}-\\u{16129}\\u{1612D}-\\u{1612F}\\u{16AF0}-\\u{16AF4}\\u{16B30}-\\u{16B36}\\u{16F4F}\\u{16F8F}-\\u{16F92}\\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{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{1E5EE}\\u{1E5EF}\\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-\\u0858\\u0860\\u0862-\\u0865\\u0867-\\u086A\\u0870-\\u0882\\u0886\\u0889-\\u088E\\u08A0-\\u08AC\\u08AE-\\u08C8\\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{10EC2}-\\u{10EC4}\\u{10F30}-\\u{10F44}\\u{10F51}-\\u{10F54}\\u{10F70}-\\u{10F81}\\u{10FB0}\\u{10FB2}-\\u{10FB6}\\u{10FB8}-\\u{10FBF}\\u{10FC1}-\\u{10FC4}\\u{10FC9}\\u{10FCA}\\u{1E900}-\\u{1E943}]","u"),u=RegExp("[\\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{10D40}-\\u{10D65}\\u{10D6F}-\\u{10D85}\\u{10D8E}\\u{10D8F}\\u{10E60}-\\u{10E7E}\\u{10E80}-\\u{10EA9}\\u{10EAD}\\u{10EB0}\\u{10EB1}\\u{10EC2}-\\u{10EC4}\\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=RegExp("[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\\u1B4E-\\u1B6A\\u1B74-\\u1B7F\\u1B82-\\u1BA1\\u1BA6\\u1BA7\\u1BAA\\u1BAE-\\u1BE5\\u1BE7\\u1BEA-\\u1BEC\\u1BEE\\u1BF2\\u1BF3\\u1BFC-\\u1C2B\\u1C34\\u1C35\\u1C3B-\\u1C49\\u1C4D-\\u1C8A\\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-\\uA7CD\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7DC\\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{105C0}-\\u{105F3}\\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{11380}-\\u{11389}\\u{1138B}\\u{1138E}\\u{11390}-\\u{113B5}\\u{113B7}-\\u{113BA}\\u{113C2}\\u{113C5}\\u{113C7}-\\u{113CA}\\u{113CC}\\u{113CD}\\u{113CF}\\u{113D1}\\u{113D3}-\\u{113D5}\\u{113D7}\\u{113D8}\\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{116D0}-\\u{116E3}\\u{11700}-\\u{1171A}\\u{1171E}\\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{11BC0}-\\u{11BE1}\\u{11BF0}-\\u{11BF9}\\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{13460}-\\u{143FA}\\u{14400}-\\u{14646}\\u{16100}-\\u{1611D}\\u{1612A}-\\u{1612C}\\u{16130}-\\u{16139}\\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{16D40}-\\u{16D79}\\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{18CFF}-\\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{1CCD6}-\\u{1CCEF}\\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{1D6C0}\\u{1D6C2}-\\u{1D6DA}\\u{1D6DC}-\\u{1D6FA}\\u{1D6FC}-\\u{1D714}\\u{1D716}-\\u{1D734}\\u{1D736}-\\u{1D74E}\\u{1D750}-\\u{1D76E}\\u{1D770}-\\u{1D788}\\u{1D78A}-\\u{1D7A8}\\u{1D7AA}-\\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{1E5D0}-\\u{1E5ED}\\u{1E5F0}-\\u{1E5FA}\\u{1E5FF}\\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{2EBF0}-\\u{2EE5D}\\u{2F800}-\\u{2FA1D}\\u{30000}-\\u{3134A}\\u{31350}-\\u{323AF}\\u{F0000}-\\u{FFFFD}\\u{100000}-\\u{10FFFD}]","u"),s=RegExp("[\\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{10D4A}-\\u{10D65}\\u{10D6F}-\\u{10D85}\\u{10D8E}\\u{10D8F}\\u{10E80}-\\u{10EA9}\\u{10EAD}\\u{10EB0}\\u{10EB1}\\u{10EC2}-\\u{10EC4}\\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=RegExp("^[\\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\\u0897-\\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-\\u2429\\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-\\u2FFF\\u3001-\\u3004\\u3008-\\u3020\\u302A-\\u302D\\u3030\\u3036\\u3037\\u303D-\\u303F\\u3099-\\u309C\\u30A0\\u30FB\\u31C0-\\u31E5\\u31EF\\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{10D40}-\\u{10D65}\\u{10D69}-\\u{10D85}\\u{10D8E}\\u{10D8F}\\u{10E60}-\\u{10E7E}\\u{10E80}-\\u{10EA9}\\u{10EAB}-\\u{10EAD}\\u{10EB0}\\u{10EB1}\\u{10EC2}-\\u{10EC4}\\u{10EFC}-\\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{113BB}-\\u{113C0}\\u{113CE}\\u{113D0}\\u{113D2}\\u{113E1}\\u{113E2}\\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{11F5A}\\u{11FD5}-\\u{11FF1}\\u{13440}\\u{13447}-\\u{13455}\\u{1611E}-\\u{16129}\\u{1612D}-\\u{1612F}\\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{1CC00}-\\u{1CCD5}\\u{1CCF0}-\\u{1CCF9}\\u{1CD00}-\\u{1CEB3}\\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{1D6C1}\\u{1D6DB}\\u{1D6FB}\\u{1D715}\\u{1D735}\\u{1D74F}\\u{1D76F}\\u{1D789}\\u{1D7A9}\\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{1E5EE}\\u{1E5EF}\\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{1F8BB}\\u{1F8C0}\\u{1F8C1}\\u{1F900}-\\u{1FA53}\\u{1FA60}-\\u{1FA6D}\\u{1FA70}-\\u{1FA7C}\\u{1FA80}-\\u{1FA89}\\u{1FA8F}-\\u{1FAC6}\\u{1FACE}-\\u{1FADC}\\u{1FADF}-\\u{1FAE9}\\u{1FAF0}-\\u{1FAF8}\\u{1FB00}-\\u{1FB92}\\u{1FB94}-\\u{1FBF9}\\u{E0001}\\u{E0020}-\\u{E007F}\\u{E0100}-\\u{E01EF}]*$","u"),c=RegExp("[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{10D40}-\\u{10D65}\\u{10D6F}-\\u{10D85}\\u{10D8E}\\u{10D8F}\\u{10E60}-\\u{10E7E}\\u{10E80}-\\u{10EA9}\\u{10EAD}\\u{10EB0}\\u{10EB1}\\u{10EC2}-\\u{10EC4}\\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{1CCF0}-\\u{1CCF9}\\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\\u0897-\\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{10D69}-\\u{10D6D}\\u{10EAB}\\u{10EAC}\\u{10EFC}-\\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{113BB}-\\u{113C0}\\u{113CE}\\u{113D0}\\u{113D2}\\u{113E1}\\u{113E2}\\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{11F5A}\\u{13440}\\u{13447}-\\u{13455}\\u{1611E}-\\u{16129}\\u{1612D}-\\u{1612F}\\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{1E5EE}\\u{1E5EF}\\u{1E8D0}-\\u{1E8D6}\\u{1E944}-\\u{1E94A}\\u{E0100}-\\u{E01EF}]*$","u"),l=RegExp("[0-9\\xB2\\xB3\\xB9\\u06F0-\\u06F9\\u2070\\u2074-\\u2079\\u2080-\\u2089\\u2488-\\u249B\\uFF10-\\uFF19\\u{102E1}-\\u{102FB}\\u{1CCF0}-\\u{1CCF9}\\u{1D7CE}-\\u{1D7FF}\\u{1F100}-\\u{1F10A}\\u{1FBF0}-\\u{1FBF9}]","u"),d=RegExp("[\\u0600-\\u0605\\u0660-\\u0669\\u066B\\u066C\\u06DD\\u0890\\u0891\\u08E2\\u{10D30}-\\u{10D39}\\u{10D40}-\\u{10D49}\\u{10E60}-\\u{10E7E}]","u"),f=RegExp("^[\\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\\u0897-\\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\\u1B4E-\\u1BF3\\u1BFC-\\u1C37\\u1C3B-\\u1C49\\u1C4D-\\u1C8A\\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-\\u2429\\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-\\u2FFF\\u3001-\\u303F\\u3041-\\u3096\\u3099-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u3190-\\u31E5\\u31EF-\\u321E\\u3220-\\uA48C\\uA490-\\uA4C6\\uA4D0-\\uA62B\\uA640-\\uA6F7\\uA700-\\uA7CD\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7DC\\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{105C0}-\\u{105F3}\\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{10D69}-\\u{10D6E}\\u{10EAB}\\u{10EAC}\\u{10EFC}-\\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{11380}-\\u{11389}\\u{1138B}\\u{1138E}\\u{11390}-\\u{113B5}\\u{113B7}-\\u{113C0}\\u{113C2}\\u{113C5}\\u{113C7}-\\u{113CA}\\u{113CC}-\\u{113D5}\\u{113D7}\\u{113D8}\\u{113E1}\\u{113E2}\\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{116D0}-\\u{116E3}\\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{11BC0}-\\u{11BE1}\\u{11BF0}-\\u{11BF9}\\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{11F5A}\\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{13460}-\\u{143FA}\\u{14400}-\\u{14646}\\u{16100}-\\u{16139}\\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{16D40}-\\u{16D79}\\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{18CFF}-\\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{1CC00}-\\u{1CCF9}\\u{1CD00}-\\u{1CEB3}\\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{1E5D0}-\\u{1E5FA}\\u{1E5FF}\\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{1F8BB}\\u{1F8C0}\\u{1F8C1}\\u{1F900}-\\u{1FA53}\\u{1FA60}-\\u{1FA6D}\\u{1FA70}-\\u{1FA7C}\\u{1FA80}-\\u{1FA89}\\u{1FA8F}-\\u{1FAC6}\\u{1FACE}-\\u{1FADC}\\u{1FADF}-\\u{1FAE9}\\u{1FAF0}-\\u{1FAF8}\\u{1FB00}-\\u{1FB92}\\u{1FB94}-\\u{1FBF9}\\u{20000}-\\u{2A6DF}\\u{2A700}-\\u{2B739}\\u{2B740}-\\u{2B81D}\\u{2B820}-\\u{2CEA1}\\u{2CEB0}-\\u{2EBE0}\\u{2EBF0}-\\u{2EE5D}\\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"),h=RegExp("[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\\u1B4E-\\u1B6A\\u1B74-\\u1B7F\\u1B82-\\u1BA1\\u1BA6\\u1BA7\\u1BAA\\u1BAE-\\u1BE5\\u1BE7\\u1BEA-\\u1BEC\\u1BEE\\u1BF2\\u1BF3\\u1BFC-\\u1C2B\\u1C34\\u1C35\\u1C3B-\\u1C49\\u1C4D-\\u1C8A\\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-\\uA7CD\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7DC\\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{105C0}-\\u{105F3}\\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{11380}-\\u{11389}\\u{1138B}\\u{1138E}\\u{11390}-\\u{113B5}\\u{113B7}-\\u{113BA}\\u{113C2}\\u{113C5}\\u{113C7}-\\u{113CA}\\u{113CC}\\u{113CD}\\u{113CF}\\u{113D1}\\u{113D3}-\\u{113D5}\\u{113D7}\\u{113D8}\\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{116D0}-\\u{116E3}\\u{11700}-\\u{1171A}\\u{1171E}\\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{11BC0}-\\u{11BE1}\\u{11BF0}-\\u{11BF9}\\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{13460}-\\u{143FA}\\u{14400}-\\u{14646}\\u{16100}-\\u{1611D}\\u{1612A}-\\u{1612C}\\u{16130}-\\u{16139}\\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{16D40}-\\u{16D79}\\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{18CFF}-\\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{1CCD6}-\\u{1CCF9}\\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{1D6C0}\\u{1D6C2}-\\u{1D6DA}\\u{1D6DC}-\\u{1D6FA}\\u{1D6FC}-\\u{1D714}\\u{1D716}-\\u{1D734}\\u{1D736}-\\u{1D74E}\\u{1D750}-\\u{1D76E}\\u{1D770}-\\u{1D788}\\u{1D78A}-\\u{1D7A8}\\u{1D7AA}-\\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{1E5D0}-\\u{1E5ED}\\u{1E5F0}-\\u{1E5FA}\\u{1E5FF}\\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{2EBF0}-\\u{2EE5D}\\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\\u0897-\\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{10D69}-\\u{10D6D}\\u{10EAB}\\u{10EAC}\\u{10EFC}-\\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{113BB}-\\u{113C0}\\u{113CE}\\u{113D0}\\u{113D2}\\u{113E1}\\u{113E2}\\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{11F5A}\\u{13440}\\u{13447}-\\u{13455}\\u{1611E}-\\u{16129}\\u{1612D}-\\u{1612F}\\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{1E5EE}\\u{1E5EF}\\u{1E8D0}-\\u{1E8D6}\\u{1E944}-\\u{1E94A}\\u{E0100}-\\u{E01EF}]*$","u");t.exports={combiningMarks:r,combiningClassVirama:n,validZWNJ:o,bidiDomain:u,bidiS1LTR:i,bidiS1RTL:s,bidiS2:a,bidiS3:c,bidiS4EN:l,bidiS4AN:d,bidiS5:f,bidiS6:h}});var tN=et(function(e,t){t.exports=[[[0,44],2],[[45,46],2],[47,2],[[48,57],2],[[58,64],2],[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],2],[[97,122],2],[[123,127],2],[[128,159],3],[160,1," "],[[161,167],2],[168,1," ̈"],[169,2],[170,1,"a"],[[171,172],2],[173,7],[174,2],[175,1," ̄"],[[176,177],2],[178,1,"2"],[179,1,"3"],[180,1," ́"],[181,1,"μ"],[182,2],[183,2],[184,1," ̧"],[185,1,"1"],[186,1,"o"],[187,2],[188,1,"1⁄4"],[189,1,"1⁄2"],[190,1,"3⁄4"],[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,"ā"],[257,2],[258,1,"ă"],[259,2],[260,1,"ą"],[261,2],[262,1,"ć"],[263,2],[264,1,"ĉ"],[265,2],[266,1,"ċ"],[267,2],[268,1,"č"],[269,2],[270,1,"ď"],[271,2],[272,1,"đ"],[273,2],[274,1,"ē"],[275,2],[276,1,"ĕ"],[277,2],[278,1,"ė"],[279,2],[280,1,"ę"],[281,2],[282,1,"ě"],[283,2],[284,1,"ĝ"],[285,2],[286,1,"ğ"],[287,2],[288,1,"ġ"],[289,2],[290,1,"ģ"],[291,2],[292,1,"ĥ"],[293,2],[294,1,"ħ"],[295,2],[296,1,"ĩ"],[297,2],[298,1,"ī"],[299,2],[300,1,"ĭ"],[301,2],[302,1,"į"],[303,2],[304,1,"i̇"],[305,2],[[306,307],1,"ij"],[308,1,"ĵ"],[309,2],[310,1,"ķ"],[[311,312],2],[313,1,"ĺ"],[314,2],[315,1,"ļ"],[316,2],[317,1,"ľ"],[318,2],[[319,320],1,"l\xb7"],[321,1,"ł"],[322,2],[323,1,"ń"],[324,2],[325,1,"ņ"],[326,2],[327,1,"ň"],[328,2],[329,1,"ʼn"],[330,1,"ŋ"],[331,2],[332,1,"ō"],[333,2],[334,1,"ŏ"],[335,2],[336,1,"ő"],[337,2],[338,1,"œ"],[339,2],[340,1,"ŕ"],[341,2],[342,1,"ŗ"],[343,2],[344,1,"ř"],[345,2],[346,1,"ś"],[347,2],[348,1,"ŝ"],[349,2],[350,1,"ş"],[351,2],[352,1,"š"],[353,2],[354,1,"ţ"],[355,2],[356,1,"ť"],[357,2],[358,1,"ŧ"],[359,2],[360,1,"ũ"],[361,2],[362,1,"ū"],[363,2],[364,1,"ŭ"],[365,2],[366,1,"ů"],[367,2],[368,1,"ű"],[369,2],[370,1,"ų"],[371,2],[372,1,"ŵ"],[373,2],[374,1,"ŷ"],[375,2],[376,1,"\xff"],[377,1,"ź"],[378,2],[379,1,"ż"],[380,2],[381,1,"ž"],[382,2],[383,1,"s"],[384,2],[385,1,"ɓ"],[386,1,"ƃ"],[387,2],[388,1,"ƅ"],[389,2],[390,1,"ɔ"],[391,1,"ƈ"],[392,2],[393,1,"ɖ"],[394,1,"ɗ"],[395,1,"ƌ"],[[396,397],2],[398,1,"ǝ"],[399,1,"ə"],[400,1,"ɛ"],[401,1,"ƒ"],[402,2],[403,1,"ɠ"],[404,1,"ɣ"],[405,2],[406,1,"ɩ"],[407,1,"ɨ"],[408,1,"ƙ"],[[409,411],2],[412,1,"ɯ"],[413,1,"ɲ"],[414,2],[415,1,"ɵ"],[416,1,"ơ"],[417,2],[418,1,"ƣ"],[419,2],[420,1,"ƥ"],[421,2],[422,1,"ʀ"],[423,1,"ƨ"],[424,2],[425,1,"ʃ"],[[426,427],2],[428,1,"ƭ"],[429,2],[430,1,"ʈ"],[431,1,"ư"],[432,2],[433,1,"ʊ"],[434,1,"ʋ"],[435,1,"ƴ"],[436,2],[437,1,"ƶ"],[438,2],[439,1,"ʒ"],[440,1,"ƹ"],[[441,443],2],[444,1,"ƽ"],[[445,451],2],[[452,454],1,"dž"],[[455,457],1,"lj"],[[458,460],1,"nj"],[461,1,"ǎ"],[462,2],[463,1,"ǐ"],[464,2],[465,1,"ǒ"],[466,2],[467,1,"ǔ"],[468,2],[469,1,"ǖ"],[470,2],[471,1,"ǘ"],[472,2],[473,1,"ǚ"],[474,2],[475,1,"ǜ"],[[476,477],2],[478,1,"ǟ"],[479,2],[480,1,"ǡ"],[481,2],[482,1,"ǣ"],[483,2],[484,1,"ǥ"],[485,2],[486,1,"ǧ"],[487,2],[488,1,"ǩ"],[489,2],[490,1,"ǫ"],[491,2],[492,1,"ǭ"],[493,2],[494,1,"ǯ"],[[495,496],2],[[497,499],1,"dz"],[500,1,"ǵ"],[501,2],[502,1,"ƕ"],[503,1,"ƿ"],[504,1,"ǹ"],[505,2],[506,1,"ǻ"],[507,2],[508,1,"ǽ"],[509,2],[510,1,"ǿ"],[511,2],[512,1,"ȁ"],[513,2],[514,1,"ȃ"],[515,2],[516,1,"ȅ"],[517,2],[518,1,"ȇ"],[519,2],[520,1,"ȉ"],[521,2],[522,1,"ȋ"],[523,2],[524,1,"ȍ"],[525,2],[526,1,"ȏ"],[527,2],[528,1,"ȑ"],[529,2],[530,1,"ȓ"],[531,2],[532,1,"ȕ"],[533,2],[534,1,"ȗ"],[535,2],[536,1,"ș"],[537,2],[538,1,"ț"],[539,2],[540,1,"ȝ"],[541,2],[542,1,"ȟ"],[543,2],[544,1,"ƞ"],[545,2],[546,1,"ȣ"],[547,2],[548,1,"ȥ"],[549,2],[550,1,"ȧ"],[551,2],[552,1,"ȩ"],[553,2],[554,1,"ȫ"],[555,2],[556,1,"ȭ"],[557,2],[558,1,"ȯ"],[559,2],[560,1,"ȱ"],[561,2],[562,1,"ȳ"],[563,2],[[564,566],2],[[567,569],2],[570,1,"ⱥ"],[571,1,"ȼ"],[572,2],[573,1,"ƚ"],[574,1,"ⱦ"],[[575,576],2],[577,1,"ɂ"],[578,2],[579,1,"ƀ"],[580,1,"ʉ"],[581,1,"ʌ"],[582,1,"ɇ"],[583,2],[584,1,"ɉ"],[585,2],[586,1,"ɋ"],[587,2],[588,1,"ɍ"],[589,2],[590,1,"ɏ"],[591,2],[[592,680],2],[[681,685],2],[[686,687],2],[688,1,"h"],[689,1,"ɦ"],[690,1,"j"],[691,1,"r"],[692,1,"ɹ"],[693,1,"ɻ"],[694,1,"ʁ"],[695,1,"w"],[696,1,"y"],[[697,705],2],[[706,709],2],[[710,721],2],[[722,727],2],[728,1," ̆"],[729,1," ̇"],[730,1," ̊"],[731,1," ̨"],[732,1," ̃"],[733,1," ̋"],[734,2],[735,2],[736,1,"ɣ"],[737,1,"l"],[738,1,"s"],[739,1,"x"],[740,1,"ʕ"],[[741,745],2],[[746,747],2],[748,2],[749,2],[750,2],[[751,767],2],[[768,831],2],[832,1,"̀"],[833,1,"́"],[834,2],[835,1,"̓"],[836,1,"̈́"],[837,1,"ι"],[[838,846],2],[847,7],[[848,855],2],[[856,860],2],[[861,863],2],[[864,865],2],[866,2],[[867,879],2],[880,1,"ͱ"],[881,2],[882,1,"ͳ"],[883,2],[884,1,"ʹ"],[885,2],[886,1,"ͷ"],[887,2],[[888,889],3],[890,1," ι"],[[891,893],2],[894,1,";"],[895,1,"ϳ"],[[896,899],3],[900,1," ́"],[901,1," ̈́"],[902,1,"ά"],[903,1,"\xb7"],[904,1,"έ"],[905,1,"ή"],[906,1,"ί"],[907,3],[908,1,"ό"],[909,3],[910,1,"ύ"],[911,1,"ώ"],[912,2],[913,1,"α"],[914,1,"β"],[915,1,"γ"],[916,1,"δ"],[917,1,"ε"],[918,1,"ζ"],[919,1,"η"],[920,1,"θ"],[921,1,"ι"],[922,1,"κ"],[923,1,"λ"],[924,1,"μ"],[925,1,"ν"],[926,1,"ξ"],[927,1,"ο"],[928,1,"π"],[929,1,"ρ"],[930,3],[931,1,"σ"],[932,1,"τ"],[933,1,"υ"],[934,1,"φ"],[935,1,"χ"],[936,1,"ψ"],[937,1,"ω"],[938,1,"ϊ"],[939,1,"ϋ"],[[940,961],2],[962,6,"σ"],[[963,974],2],[975,1,"ϗ"],[976,1,"β"],[977,1,"θ"],[978,1,"υ"],[979,1,"ύ"],[980,1,"ϋ"],[981,1,"φ"],[982,1,"π"],[983,2],[984,1,"ϙ"],[985,2],[986,1,"ϛ"],[987,2],[988,1,"ϝ"],[989,2],[990,1,"ϟ"],[991,2],[992,1,"ϡ"],[993,2],[994,1,"ϣ"],[995,2],[996,1,"ϥ"],[997,2],[998,1,"ϧ"],[999,2],[1e3,1,"ϩ"],[1001,2],[1002,1,"ϫ"],[1003,2],[1004,1,"ϭ"],[1005,2],[1006,1,"ϯ"],[1007,2],[1008,1,"κ"],[1009,1,"ρ"],[1010,1,"σ"],[1011,2],[1012,1,"θ"],[1013,1,"ε"],[1014,2],[1015,1,"ϸ"],[1016,2],[1017,1,"σ"],[1018,1,"ϻ"],[1019,2],[1020,2],[1021,1,"ͻ"],[1022,1,"ͼ"],[1023,1,"ͽ"],[1024,1,"ѐ"],[1025,1,"ё"],[1026,1,"ђ"],[1027,1,"ѓ"],[1028,1,"є"],[1029,1,"ѕ"],[1030,1,"і"],[1031,1,"ї"],[1032,1,"ј"],[1033,1,"љ"],[1034,1,"њ"],[1035,1,"ћ"],[1036,1,"ќ"],[1037,1,"ѝ"],[1038,1,"ў"],[1039,1,"џ"],[1040,1,"а"],[1041,1,"б"],[1042,1,"в"],[1043,1,"г"],[1044,1,"д"],[1045,1,"е"],[1046,1,"ж"],[1047,1,"з"],[1048,1,"и"],[1049,1,"й"],[1050,1,"к"],[1051,1,"л"],[1052,1,"м"],[1053,1,"н"],[1054,1,"о"],[1055,1,"п"],[1056,1,"р"],[1057,1,"с"],[1058,1,"т"],[1059,1,"у"],[1060,1,"ф"],[1061,1,"х"],[1062,1,"ц"],[1063,1,"ч"],[1064,1,"ш"],[1065,1,"щ"],[1066,1,"ъ"],[1067,1,"ы"],[1068,1,"ь"],[1069,1,"э"],[1070,1,"ю"],[1071,1,"я"],[[1072,1103],2],[1104,2],[[1105,1116],2],[1117,2],[[1118,1119],2],[1120,1,"ѡ"],[1121,2],[1122,1,"ѣ"],[1123,2],[1124,1,"ѥ"],[1125,2],[1126,1,"ѧ"],[1127,2],[1128,1,"ѩ"],[1129,2],[1130,1,"ѫ"],[1131,2],[1132,1,"ѭ"],[1133,2],[1134,1,"ѯ"],[1135,2],[1136,1,"ѱ"],[1137,2],[1138,1,"ѳ"],[1139,2],[1140,1,"ѵ"],[1141,2],[1142,1,"ѷ"],[1143,2],[1144,1,"ѹ"],[1145,2],[1146,1,"ѻ"],[1147,2],[1148,1,"ѽ"],[1149,2],[1150,1,"ѿ"],[1151,2],[1152,1,"ҁ"],[1153,2],[1154,2],[[1155,1158],2],[1159,2],[[1160,1161],2],[1162,1,"ҋ"],[1163,2],[1164,1,"ҍ"],[1165,2],[1166,1,"ҏ"],[1167,2],[1168,1,"ґ"],[1169,2],[1170,1,"ғ"],[1171,2],[1172,1,"ҕ"],[1173,2],[1174,1,"җ"],[1175,2],[1176,1,"ҙ"],[1177,2],[1178,1,"қ"],[1179,2],[1180,1,"ҝ"],[1181,2],[1182,1,"ҟ"],[1183,2],[1184,1,"ҡ"],[1185,2],[1186,1,"ң"],[1187,2],[1188,1,"ҥ"],[1189,2],[1190,1,"ҧ"],[1191,2],[1192,1,"ҩ"],[1193,2],[1194,1,"ҫ"],[1195,2],[1196,1,"ҭ"],[1197,2],[1198,1,"ү"],[1199,2],[1200,1,"ұ"],[1201,2],[1202,1,"ҳ"],[1203,2],[1204,1,"ҵ"],[1205,2],[1206,1,"ҷ"],[1207,2],[1208,1,"ҹ"],[1209,2],[1210,1,"һ"],[1211,2],[1212,1,"ҽ"],[1213,2],[1214,1,"ҿ"],[1215,2],[1216,1,"ӏ"],[1217,1,"ӂ"],[1218,2],[1219,1,"ӄ"],[1220,2],[1221,1,"ӆ"],[1222,2],[1223,1,"ӈ"],[1224,2],[1225,1,"ӊ"],[1226,2],[1227,1,"ӌ"],[1228,2],[1229,1,"ӎ"],[1230,2],[1231,2],[1232,1,"ӑ"],[1233,2],[1234,1,"ӓ"],[1235,2],[1236,1,"ӕ"],[1237,2],[1238,1,"ӗ"],[1239,2],[1240,1,"ә"],[1241,2],[1242,1,"ӛ"],[1243,2],[1244,1,"ӝ"],[1245,2],[1246,1,"ӟ"],[1247,2],[1248,1,"ӡ"],[1249,2],[1250,1,"ӣ"],[1251,2],[1252,1,"ӥ"],[1253,2],[1254,1,"ӧ"],[1255,2],[1256,1,"ө"],[1257,2],[1258,1,"ӫ"],[1259,2],[1260,1,"ӭ"],[1261,2],[1262,1,"ӯ"],[1263,2],[1264,1,"ӱ"],[1265,2],[1266,1,"ӳ"],[1267,2],[1268,1,"ӵ"],[1269,2],[1270,1,"ӷ"],[1271,2],[1272,1,"ӹ"],[1273,2],[1274,1,"ӻ"],[1275,2],[1276,1,"ӽ"],[1277,2],[1278,1,"ӿ"],[1279,2],[1280,1,"ԁ"],[1281,2],[1282,1,"ԃ"],[1283,2],[1284,1,"ԅ"],[1285,2],[1286,1,"ԇ"],[1287,2],[1288,1,"ԉ"],[1289,2],[1290,1,"ԋ"],[1291,2],[1292,1,"ԍ"],[1293,2],[1294,1,"ԏ"],[1295,2],[1296,1,"ԑ"],[1297,2],[1298,1,"ԓ"],[1299,2],[1300,1,"ԕ"],[1301,2],[1302,1,"ԗ"],[1303,2],[1304,1,"ԙ"],[1305,2],[1306,1,"ԛ"],[1307,2],[1308,1,"ԝ"],[1309,2],[1310,1,"ԟ"],[1311,2],[1312,1,"ԡ"],[1313,2],[1314,1,"ԣ"],[1315,2],[1316,1,"ԥ"],[1317,2],[1318,1,"ԧ"],[1319,2],[1320,1,"ԩ"],[1321,2],[1322,1,"ԫ"],[1323,2],[1324,1,"ԭ"],[1325,2],[1326,1,"ԯ"],[1327,2],[1328,3],[1329,1,"ա"],[1330,1,"բ"],[1331,1,"գ"],[1332,1,"դ"],[1333,1,"ե"],[1334,1,"զ"],[1335,1,"է"],[1336,1,"ը"],[1337,1,"թ"],[1338,1,"ժ"],[1339,1,"ի"],[1340,1,"լ"],[1341,1,"խ"],[1342,1,"ծ"],[1343,1,"կ"],[1344,1,"հ"],[1345,1,"ձ"],[1346,1,"ղ"],[1347,1,"ճ"],[1348,1,"մ"],[1349,1,"յ"],[1350,1,"ն"],[1351,1,"շ"],[1352,1,"ո"],[1353,1,"չ"],[1354,1,"պ"],[1355,1,"ջ"],[1356,1,"ռ"],[1357,1,"ս"],[1358,1,"վ"],[1359,1,"տ"],[1360,1,"ր"],[1361,1,"ց"],[1362,1,"ւ"],[1363,1,"փ"],[1364,1,"ք"],[1365,1,"օ"],[1366,1,"ֆ"],[[1367,1368],3],[1369,2],[[1370,1375],2],[1376,2],[[1377,1414],2],[1415,1,"եւ"],[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,"اٴ"],[1654,1,"وٴ"],[1655,1,"ۇٴ"],[1656,1,"يٴ"],[[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,2198],3],[2199,2],[[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,"क़"],[2393,1,"ख़"],[2394,1,"ग़"],[2395,1,"ज़"],[2396,1,"ड़"],[2397,1,"ढ़"],[2398,1,"फ़"],[2399,1,"य़"],[[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,"ড়"],[2525,1,"ঢ়"],[2526,3],[2527,1,"য়"],[[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,"ਲ਼"],[2612,3],[2613,2],[2614,1,"ਸ਼"],[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,"ਖ਼"],[2650,1,"ਗ਼"],[2651,1,"ਜ਼"],[2652,2],[2653,3],[2654,1,"ਫ਼"],[[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,"ଡ଼"],[2909,1,"ଢ଼"],[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,"ํา"],[[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,"ໍາ"],[[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,"ຫນ"],[3805,1,"ຫມ"],[[3806,3807],2],[[3808,3839],3],[3840,2],[[3841,3850],2],[3851,2],[3852,1,"་"],[[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,"གྷ"],[[3908,3911],2],[3912,3],[[3913,3916],2],[3917,1,"ཌྷ"],[[3918,3921],2],[3922,1,"དྷ"],[[3923,3926],2],[3927,1,"བྷ"],[[3928,3931],2],[3932,1,"ཛྷ"],[[3933,3944],2],[3945,1,"ཀྵ"],[3946,2],[[3947,3948],2],[[3949,3952],3],[[3953,3954],2],[3955,1,"ཱི"],[3956,2],[3957,1,"ཱུ"],[3958,1,"ྲྀ"],[3959,1,"ྲཱྀ"],[3960,1,"ླྀ"],[3961,1,"ླཱྀ"],[[3962,3968],2],[3969,1,"ཱྀ"],[[3970,3972],2],[3973,2],[[3974,3979],2],[[3980,3983],2],[[3984,3986],2],[3987,1,"ྒྷ"],[[3988,3989],2],[3990,2],[3991,2],[3992,3],[[3993,3996],2],[3997,1,"ྜྷ"],[[3998,4001],2],[4002,1,"ྡྷ"],[[4003,4006],2],[4007,1,"ྦྷ"],[[4008,4011],2],[4012,1,"ྫྷ"],[4013,2],[[4014,4016],2],[[4017,4023],2],[4024,2],[4025,1,"ྐྵ"],[[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,1,"ⴀ"],[4257,1,"ⴁ"],[4258,1,"ⴂ"],[4259,1,"ⴃ"],[4260,1,"ⴄ"],[4261,1,"ⴅ"],[4262,1,"ⴆ"],[4263,1,"ⴇ"],[4264,1,"ⴈ"],[4265,1,"ⴉ"],[4266,1,"ⴊ"],[4267,1,"ⴋ"],[4268,1,"ⴌ"],[4269,1,"ⴍ"],[4270,1,"ⴎ"],[4271,1,"ⴏ"],[4272,1,"ⴐ"],[4273,1,"ⴑ"],[4274,1,"ⴒ"],[4275,1,"ⴓ"],[4276,1,"ⴔ"],[4277,1,"ⴕ"],[4278,1,"ⴖ"],[4279,1,"ⴗ"],[4280,1,"ⴘ"],[4281,1,"ⴙ"],[4282,1,"ⴚ"],[4283,1,"ⴛ"],[4284,1,"ⴜ"],[4285,1,"ⴝ"],[4286,1,"ⴞ"],[4287,1,"ⴟ"],[4288,1,"ⴠ"],[4289,1,"ⴡ"],[4290,1,"ⴢ"],[4291,1,"ⴣ"],[4292,1,"ⴤ"],[4293,1,"ⴥ"],[4294,3],[4295,1,"ⴧ"],[[4296,4300],3],[4301,1,"ⴭ"],[[4302,4303],3],[[4304,4342],2],[[4343,4344],2],[[4345,4346],2],[4347,2],[4348,1,"ნ"],[[4349,4351],2],[[4352,4441],2],[[4442,4446],2],[[4447,4448],7],[[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,"Ᏸ"],[5113,1,"Ᏹ"],[5114,1,"Ᏺ"],[5115,1,"Ᏻ"],[5116,1,"Ᏼ"],[5117,1,"Ᏽ"],[[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],7],[[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,6154],2],[[6155,6158],7],[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,3],[[6990,6991],2],[[6992,7001],2],[[7002,7018],2],[[7019,7027],2],[[7028,7036],2],[[7037,7038],2],[7039,2],[[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,"в"],[7297,1,"д"],[7298,1,"о"],[7299,1,"с"],[[7300,7301],1,"т"],[7302,1,"ъ"],[7303,1,"ѣ"],[7304,1,"ꙋ"],[7305,1,""],[7306,2],[[7307,7311],3],[7312,1,"ა"],[7313,1,"ბ"],[7314,1,"გ"],[7315,1,"დ"],[7316,1,"ე"],[7317,1,"ვ"],[7318,1,"ზ"],[7319,1,"თ"],[7320,1,"ი"],[7321,1,"კ"],[7322,1,"ლ"],[7323,1,"მ"],[7324,1,"ნ"],[7325,1,"ო"],[7326,1,"პ"],[7327,1,"ჟ"],[7328,1,"რ"],[7329,1,"ს"],[7330,1,"ტ"],[7331,1,"უ"],[7332,1,"ფ"],[7333,1,"ქ"],[7334,1,"ღ"],[7335,1,"ყ"],[7336,1,"შ"],[7337,1,"ჩ"],[7338,1,"ც"],[7339,1,"ძ"],[7340,1,"წ"],[7341,1,"ჭ"],[7342,1,"ხ"],[7343,1,"ჯ"],[7344,1,"ჰ"],[7345,1,"ჱ"],[7346,1,"ჲ"],[7347,1,"ჳ"],[7348,1,"ჴ"],[7349,1,"ჵ"],[7350,1,"ჶ"],[7351,1,"ჷ"],[7352,1,"ჸ"],[7353,1,"ჹ"],[7354,1,"ჺ"],[[7355,7356],3],[7357,1,"ჽ"],[7358,1,"ჾ"],[7359,1,"ჿ"],[[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,"ǝ"],[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,"ȣ"],[7486,1,"p"],[7487,1,"r"],[7488,1,"t"],[7489,1,"u"],[7490,1,"w"],[7491,1,"a"],[7492,1,"ɐ"],[7493,1,"ɑ"],[7494,1,"ᴂ"],[7495,1,"b"],[7496,1,"d"],[7497,1,"e"],[7498,1,"ə"],[7499,1,"ɛ"],[7500,1,"ɜ"],[7501,1,"g"],[7502,2],[7503,1,"k"],[7504,1,"m"],[7505,1,"ŋ"],[7506,1,"o"],[7507,1,"ɔ"],[7508,1,"ᴖ"],[7509,1,"ᴗ"],[7510,1,"p"],[7511,1,"t"],[7512,1,"u"],[7513,1,"ᴝ"],[7514,1,"ɯ"],[7515,1,"v"],[7516,1,"ᴥ"],[7517,1,"β"],[7518,1,"γ"],[7519,1,"δ"],[7520,1,"φ"],[7521,1,"χ"],[7522,1,"i"],[7523,1,"r"],[7524,1,"u"],[7525,1,"v"],[7526,1,"β"],[7527,1,"γ"],[7528,1,"ρ"],[7529,1,"φ"],[7530,1,"χ"],[7531,2],[[7532,7543],2],[7544,1,"н"],[[7545,7578],2],[7579,1,"ɒ"],[7580,1,"c"],[7581,1,"ɕ"],[7582,1,"\xf0"],[7583,1,"ɜ"],[7584,1,"f"],[7585,1,"ɟ"],[7586,1,"ɡ"],[7587,1,"ɥ"],[7588,1,"ɨ"],[7589,1,"ɩ"],[7590,1,"ɪ"],[7591,1,"ᵻ"],[7592,1,"ʝ"],[7593,1,"ɭ"],[7594,1,"ᶅ"],[7595,1,"ʟ"],[7596,1,"ɱ"],[7597,1,"ɰ"],[7598,1,"ɲ"],[7599,1,"ɳ"],[7600,1,"ɴ"],[7601,1,"ɵ"],[7602,1,"ɸ"],[7603,1,"ʂ"],[7604,1,"ʃ"],[7605,1,"ƫ"],[7606,1,"ʉ"],[7607,1,"ʊ"],[7608,1,"ᴜ"],[7609,1,"ʋ"],[7610,1,"ʌ"],[7611,1,"z"],[7612,1,"ʐ"],[7613,1,"ʑ"],[7614,1,"ʒ"],[7615,1,"θ"],[[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,"ḁ"],[7681,2],[7682,1,"ḃ"],[7683,2],[7684,1,"ḅ"],[7685,2],[7686,1,"ḇ"],[7687,2],[7688,1,"ḉ"],[7689,2],[7690,1,"ḋ"],[7691,2],[7692,1,"ḍ"],[7693,2],[7694,1,"ḏ"],[7695,2],[7696,1,"ḑ"],[7697,2],[7698,1,"ḓ"],[7699,2],[7700,1,"ḕ"],[7701,2],[7702,1,"ḗ"],[7703,2],[7704,1,"ḙ"],[7705,2],[7706,1,"ḛ"],[7707,2],[7708,1,"ḝ"],[7709,2],[7710,1,"ḟ"],[7711,2],[7712,1,"ḡ"],[7713,2],[7714,1,"ḣ"],[7715,2],[7716,1,"ḥ"],[7717,2],[7718,1,"ḧ"],[7719,2],[7720,1,"ḩ"],[7721,2],[7722,1,"ḫ"],[7723,2],[7724,1,"ḭ"],[7725,2],[7726,1,"ḯ"],[7727,2],[7728,1,"ḱ"],[7729,2],[7730,1,"ḳ"],[7731,2],[7732,1,"ḵ"],[7733,2],[7734,1,"ḷ"],[7735,2],[7736,1,"ḹ"],[7737,2],[7738,1,"ḻ"],[7739,2],[7740,1,"ḽ"],[7741,2],[7742,1,"ḿ"],[7743,2],[7744,1,"ṁ"],[7745,2],[7746,1,"ṃ"],[7747,2],[7748,1,"ṅ"],[7749,2],[7750,1,"ṇ"],[7751,2],[7752,1,"ṉ"],[7753,2],[7754,1,"ṋ"],[7755,2],[7756,1,"ṍ"],[7757,2],[7758,1,"ṏ"],[7759,2],[7760,1,"ṑ"],[7761,2],[7762,1,"ṓ"],[7763,2],[7764,1,"ṕ"],[7765,2],[7766,1,"ṗ"],[7767,2],[7768,1,"ṙ"],[7769,2],[7770,1,"ṛ"],[7771,2],[7772,1,"ṝ"],[7773,2],[7774,1,"ṟ"],[7775,2],[7776,1,"ṡ"],[7777,2],[7778,1,"ṣ"],[7779,2],[7780,1,"ṥ"],[7781,2],[7782,1,"ṧ"],[7783,2],[7784,1,"ṩ"],[7785,2],[7786,1,"ṫ"],[7787,2],[7788,1,"ṭ"],[7789,2],[7790,1,"ṯ"],[7791,2],[7792,1,"ṱ"],[7793,2],[7794,1,"ṳ"],[7795,2],[7796,1,"ṵ"],[7797,2],[7798,1,"ṷ"],[7799,2],[7800,1,"ṹ"],[7801,2],[7802,1,"ṻ"],[7803,2],[7804,1,"ṽ"],[7805,2],[7806,1,"ṿ"],[7807,2],[7808,1,"ẁ"],[7809,2],[7810,1,"ẃ"],[7811,2],[7812,1,"ẅ"],[7813,2],[7814,1,"ẇ"],[7815,2],[7816,1,"ẉ"],[7817,2],[7818,1,"ẋ"],[7819,2],[7820,1,"ẍ"],[7821,2],[7822,1,"ẏ"],[7823,2],[7824,1,"ẑ"],[7825,2],[7826,1,"ẓ"],[7827,2],[7828,1,"ẕ"],[[7829,7833],2],[7834,1,"aʾ"],[7835,1,"ṡ"],[[7836,7837],2],[7838,1,"\xdf"],[7839,2],[7840,1,"ạ"],[7841,2],[7842,1,"ả"],[7843,2],[7844,1,"ấ"],[7845,2],[7846,1,"ầ"],[7847,2],[7848,1,"ẩ"],[7849,2],[7850,1,"ẫ"],[7851,2],[7852,1,"ậ"],[7853,2],[7854,1,"ắ"],[7855,2],[7856,1,"ằ"],[7857,2],[7858,1,"ẳ"],[7859,2],[7860,1,"ẵ"],[7861,2],[7862,1,"ặ"],[7863,2],[7864,1,"ẹ"],[7865,2],[7866,1,"ẻ"],[7867,2],[7868,1,"ẽ"],[7869,2],[7870,1,"ế"],[7871,2],[7872,1,"ề"],[7873,2],[7874,1,"ể"],[7875,2],[7876,1,"ễ"],[7877,2],[7878,1,"ệ"],[7879,2],[7880,1,"ỉ"],[7881,2],[7882,1,"ị"],[7883,2],[7884,1,"ọ"],[7885,2],[7886,1,"ỏ"],[7887,2],[7888,1,"ố"],[7889,2],[7890,1,"ồ"],[7891,2],[7892,1,"ổ"],[7893,2],[7894,1,"ỗ"],[7895,2],[7896,1,"ộ"],[7897,2],[7898,1,"ớ"],[7899,2],[7900,1,"ờ"],[7901,2],[7902,1,"ở"],[7903,2],[7904,1,"ỡ"],[7905,2],[7906,1,"ợ"],[7907,2],[7908,1,"ụ"],[7909,2],[7910,1,"ủ"],[7911,2],[7912,1,"ứ"],[7913,2],[7914,1,"ừ"],[7915,2],[7916,1,"ử"],[7917,2],[7918,1,"ữ"],[7919,2],[7920,1,"ự"],[7921,2],[7922,1,"ỳ"],[7923,2],[7924,1,"ỵ"],[7925,2],[7926,1,"ỷ"],[7927,2],[7928,1,"ỹ"],[7929,2],[7930,1,"ỻ"],[7931,2],[7932,1,"ỽ"],[7933,2],[7934,1,"ỿ"],[7935,2],[[7936,7943],2],[7944,1,"ἀ"],[7945,1,"ἁ"],[7946,1,"ἂ"],[7947,1,"ἃ"],[7948,1,"ἄ"],[7949,1,"ἅ"],[7950,1,"ἆ"],[7951,1,"ἇ"],[[7952,7957],2],[[7958,7959],3],[7960,1,"ἐ"],[7961,1,"ἑ"],[7962,1,"ἒ"],[7963,1,"ἓ"],[7964,1,"ἔ"],[7965,1,"ἕ"],[[7966,7967],3],[[7968,7975],2],[7976,1,"ἠ"],[7977,1,"ἡ"],[7978,1,"ἢ"],[7979,1,"ἣ"],[7980,1,"ἤ"],[7981,1,"ἥ"],[7982,1,"ἦ"],[7983,1,"ἧ"],[[7984,7991],2],[7992,1,"ἰ"],[7993,1,"ἱ"],[7994,1,"ἲ"],[7995,1,"ἳ"],[7996,1,"ἴ"],[7997,1,"ἵ"],[7998,1,"ἶ"],[7999,1,"ἷ"],[[8e3,8005],2],[[8006,8007],3],[8008,1,"ὀ"],[8009,1,"ὁ"],[8010,1,"ὂ"],[8011,1,"ὃ"],[8012,1,"ὄ"],[8013,1,"ὅ"],[[8014,8015],3],[[8016,8023],2],[8024,3],[8025,1,"ὑ"],[8026,3],[8027,1,"ὓ"],[8028,3],[8029,1,"ὕ"],[8030,3],[8031,1,"ὗ"],[[8032,8039],2],[8040,1,"ὠ"],[8041,1,"ὡ"],[8042,1,"ὢ"],[8043,1,"ὣ"],[8044,1,"ὤ"],[8045,1,"ὥ"],[8046,1,"ὦ"],[8047,1,"ὧ"],[8048,2],[8049,1,"ά"],[8050,2],[8051,1,"έ"],[8052,2],[8053,1,"ή"],[8054,2],[8055,1,"ί"],[8056,2],[8057,1,"ό"],[8058,2],[8059,1,"ύ"],[8060,2],[8061,1,"ώ"],[[8062,8063],3],[8064,1,"ἀι"],[8065,1,"ἁι"],[8066,1,"ἂι"],[8067,1,"ἃι"],[8068,1,"ἄι"],[8069,1,"ἅι"],[8070,1,"ἆι"],[8071,1,"ἇι"],[8072,1,"ἀι"],[8073,1,"ἁι"],[8074,1,"ἂι"],[8075,1,"ἃι"],[8076,1,"ἄι"],[8077,1,"ἅι"],[8078,1,"ἆι"],[8079,1,"ἇι"],[8080,1,"ἠι"],[8081,1,"ἡι"],[8082,1,"ἢι"],[8083,1,"ἣι"],[8084,1,"ἤι"],[8085,1,"ἥι"],[8086,1,"ἦι"],[8087,1,"ἧι"],[8088,1,"ἠι"],[8089,1,"ἡι"],[8090,1,"ἢι"],[8091,1,"ἣι"],[8092,1,"ἤι"],[8093,1,"ἥι"],[8094,1,"ἦι"],[8095,1,"ἧι"],[8096,1,"ὠι"],[8097,1,"ὡι"],[8098,1,"ὢι"],[8099,1,"ὣι"],[8100,1,"ὤι"],[8101,1,"ὥι"],[8102,1,"ὦι"],[8103,1,"ὧι"],[8104,1,"ὠι"],[8105,1,"ὡι"],[8106,1,"ὢι"],[8107,1,"ὣι"],[8108,1,"ὤι"],[8109,1,"ὥι"],[8110,1,"ὦι"],[8111,1,"ὧι"],[[8112,8113],2],[8114,1,"ὰι"],[8115,1,"αι"],[8116,1,"άι"],[8117,3],[8118,2],[8119,1,"ᾶι"],[8120,1,"ᾰ"],[8121,1,"ᾱ"],[8122,1,"ὰ"],[8123,1,"ά"],[8124,1,"αι"],[8125,1," ̓"],[8126,1,"ι"],[8127,1," ̓"],[8128,1," ͂"],[8129,1," ̈͂"],[8130,1,"ὴι"],[8131,1,"ηι"],[8132,1,"ήι"],[8133,3],[8134,2],[8135,1,"ῆι"],[8136,1,"ὲ"],[8137,1,"έ"],[8138,1,"ὴ"],[8139,1,"ή"],[8140,1,"ηι"],[8141,1," ̓̀"],[8142,1," ̓́"],[8143,1," ̓͂"],[[8144,8146],2],[8147,1,"ΐ"],[[8148,8149],3],[[8150,8151],2],[8152,1,"ῐ"],[8153,1,"ῑ"],[8154,1,"ὶ"],[8155,1,"ί"],[8156,3],[8157,1," ̔̀"],[8158,1," ̔́"],[8159,1," ̔͂"],[[8160,8162],2],[8163,1,"ΰ"],[[8164,8167],2],[8168,1,"ῠ"],[8169,1,"ῡ"],[8170,1,"ὺ"],[8171,1,"ύ"],[8172,1,"ῥ"],[8173,1," ̈̀"],[8174,1," ̈́"],[8175,1,"`"],[[8176,8177],3],[8178,1,"ὼι"],[8179,1,"ωι"],[8180,1,"ώι"],[8181,3],[8182,2],[8183,1,"ῶι"],[8184,1,"ὸ"],[8185,1,"ό"],[8186,1,"ὼ"],[8187,1,"ώ"],[8188,1,"ωι"],[8189,1," ́"],[8190,1," ̔"],[8191,3],[[8192,8202],1," "],[8203,7],[[8204,8205],6,""],[[8206,8207],3],[8208,2],[8209,1,"‐"],[[8210,8214],2],[8215,1," ̳"],[[8216,8227],2],[[8228,8230],3],[8231,2],[[8232,8238],3],[8239,1," "],[[8240,8242],2],[8243,1,"′′"],[8244,1,"′′′"],[8245,2],[8246,1,"‵‵"],[8247,1,"‵‵‵"],[[8248,8251],2],[8252,1,"!!"],[8253,2],[8254,1," ̅"],[[8255,8262],2],[8263,1,"??"],[8264,1,"?!"],[8265,1,"!?"],[[8266,8269],2],[[8270,8274],2],[[8275,8276],2],[[8277,8278],2],[8279,1,"′′′′"],[[8280,8286],2],[8287,1," "],[[8288,8291],7],[8292,7],[8293,3],[[8294,8297],3],[[8298,8303],7],[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,1,"+"],[8315,1,"−"],[8316,1,"="],[8317,1,"("],[8318,1,")"],[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,1,"+"],[8331,1,"−"],[8332,1,"="],[8333,1,"("],[8334,1,")"],[8335,3],[8336,1,"a"],[8337,1,"e"],[8338,1,"o"],[8339,1,"x"],[8340,1,"ə"],[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,1,"a/c"],[8449,1,"a/s"],[8450,1,"c"],[8451,1,"\xb0c"],[8452,2],[8453,1,"c/o"],[8454,1,"c/u"],[8455,1,"ɛ"],[8456,2],[8457,1,"\xb0f"],[8458,1,"g"],[[8459,8462],1,"h"],[8463,1,"ħ"],[[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,"ω"],[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,1,"ⅎ"],[8499,1,"m"],[8500,1,"o"],[8501,1,"א"],[8502,1,"ב"],[8503,1,"ג"],[8504,1,"ד"],[8505,1,"i"],[8506,2],[8507,1,"fax"],[8508,1,"π"],[[8509,8510],1,"γ"],[8511,1,"π"],[8512,1,"∑"],[[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⁄7"],[8529,1,"1⁄9"],[8530,1,"1⁄10"],[8531,1,"1⁄3"],[8532,1,"2⁄3"],[8533,1,"1⁄5"],[8534,1,"2⁄5"],[8535,1,"3⁄5"],[8536,1,"4⁄5"],[8537,1,"1⁄6"],[8538,1,"5⁄6"],[8539,1,"1⁄8"],[8540,1,"3⁄8"],[8541,1,"5⁄8"],[8542,1,"7⁄8"],[8543,1,"1⁄"],[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,1,"ↄ"],[8580,2],[[8581,8584],2],[8585,1,"0⁄3"],[[8586,8587],2],[[8588,8591],3],[[8592,8682],2],[[8683,8691],2],[[8692,8703],2],[[8704,8747],2],[8748,1,"∫∫"],[8749,1,"∫∫∫"],[8750,2],[8751,1,"∮∮"],[8752,1,"∮∮∮"],[[8753,8945],2],[[8946,8959],2],[8960,2],[8961,2],[[8962,9e3],2],[9001,1,"〈"],[9002,1,"〉"],[[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,9257],2],[[9258,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,1,"(1)"],[9333,1,"(2)"],[9334,1,"(3)"],[9335,1,"(4)"],[9336,1,"(5)"],[9337,1,"(6)"],[9338,1,"(7)"],[9339,1,"(8)"],[9340,1,"(9)"],[9341,1,"(10)"],[9342,1,"(11)"],[9343,1,"(12)"],[9344,1,"(13)"],[9345,1,"(14)"],[9346,1,"(15)"],[9347,1,"(16)"],[9348,1,"(17)"],[9349,1,"(18)"],[9350,1,"(19)"],[9351,1,"(20)"],[[9352,9371],3],[9372,1,"(a)"],[9373,1,"(b)"],[9374,1,"(c)"],[9375,1,"(d)"],[9376,1,"(e)"],[9377,1,"(f)"],[9378,1,"(g)"],[9379,1,"(h)"],[9380,1,"(i)"],[9381,1,"(j)"],[9382,1,"(k)"],[9383,1,"(l)"],[9384,1,"(m)"],[9385,1,"(n)"],[9386,1,"(o)"],[9387,1,"(p)"],[9388,1,"(q)"],[9389,1,"(r)"],[9390,1,"(s)"],[9391,1,"(t)"],[9392,1,"(u)"],[9393,1,"(v)"],[9394,1,"(w)"],[9395,1,"(x)"],[9396,1,"(y)"],[9397,1,"(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,"∫∫∫∫"],[[10765,10867],2],[10868,1,"::="],[10869,1,"=="],[10870,1,"==="],[[10871,10971],2],[10972,1,"⫝̸"],[[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,"ⰰ"],[11265,1,"ⰱ"],[11266,1,"ⰲ"],[11267,1,"ⰳ"],[11268,1,"ⰴ"],[11269,1,"ⰵ"],[11270,1,"ⰶ"],[11271,1,"ⰷ"],[11272,1,"ⰸ"],[11273,1,"ⰹ"],[11274,1,"ⰺ"],[11275,1,"ⰻ"],[11276,1,"ⰼ"],[11277,1,"ⰽ"],[11278,1,"ⰾ"],[11279,1,"ⰿ"],[11280,1,"ⱀ"],[11281,1,"ⱁ"],[11282,1,"ⱂ"],[11283,1,"ⱃ"],[11284,1,"ⱄ"],[11285,1,"ⱅ"],[11286,1,"ⱆ"],[11287,1,"ⱇ"],[11288,1,"ⱈ"],[11289,1,"ⱉ"],[11290,1,"ⱊ"],[11291,1,"ⱋ"],[11292,1,"ⱌ"],[11293,1,"ⱍ"],[11294,1,"ⱎ"],[11295,1,"ⱏ"],[11296,1,"ⱐ"],[11297,1,"ⱑ"],[11298,1,"ⱒ"],[11299,1,"ⱓ"],[11300,1,"ⱔ"],[11301,1,"ⱕ"],[11302,1,"ⱖ"],[11303,1,"ⱗ"],[11304,1,"ⱘ"],[11305,1,"ⱙ"],[11306,1,"ⱚ"],[11307,1,"ⱛ"],[11308,1,"ⱜ"],[11309,1,"ⱝ"],[11310,1,"ⱞ"],[11311,1,"ⱟ"],[[11312,11358],2],[11359,2],[11360,1,"ⱡ"],[11361,2],[11362,1,"ɫ"],[11363,1,"ᵽ"],[11364,1,"ɽ"],[[11365,11366],2],[11367,1,"ⱨ"],[11368,2],[11369,1,"ⱪ"],[11370,2],[11371,1,"ⱬ"],[11372,2],[11373,1,"ɑ"],[11374,1,"ɱ"],[11375,1,"ɐ"],[11376,1,"ɒ"],[11377,2],[11378,1,"ⱳ"],[11379,2],[11380,2],[11381,1,"ⱶ"],[[11382,11383],2],[[11384,11387],2],[11388,1,"j"],[11389,1,"v"],[11390,1,"ȿ"],[11391,1,"ɀ"],[11392,1,"ⲁ"],[11393,2],[11394,1,"ⲃ"],[11395,2],[11396,1,"ⲅ"],[11397,2],[11398,1,"ⲇ"],[11399,2],[11400,1,"ⲉ"],[11401,2],[11402,1,"ⲋ"],[11403,2],[11404,1,"ⲍ"],[11405,2],[11406,1,"ⲏ"],[11407,2],[11408,1,"ⲑ"],[11409,2],[11410,1,"ⲓ"],[11411,2],[11412,1,"ⲕ"],[11413,2],[11414,1,"ⲗ"],[11415,2],[11416,1,"ⲙ"],[11417,2],[11418,1,"ⲛ"],[11419,2],[11420,1,"ⲝ"],[11421,2],[11422,1,"ⲟ"],[11423,2],[11424,1,"ⲡ"],[11425,2],[11426,1,"ⲣ"],[11427,2],[11428,1,"ⲥ"],[11429,2],[11430,1,"ⲧ"],[11431,2],[11432,1,"ⲩ"],[11433,2],[11434,1,"ⲫ"],[11435,2],[11436,1,"ⲭ"],[11437,2],[11438,1,"ⲯ"],[11439,2],[11440,1,"ⲱ"],[11441,2],[11442,1,"ⲳ"],[11443,2],[11444,1,"ⲵ"],[11445,2],[11446,1,"ⲷ"],[11447,2],[11448,1,"ⲹ"],[11449,2],[11450,1,"ⲻ"],[11451,2],[11452,1,"ⲽ"],[11453,2],[11454,1,"ⲿ"],[11455,2],[11456,1,"ⳁ"],[11457,2],[11458,1,"ⳃ"],[11459,2],[11460,1,"ⳅ"],[11461,2],[11462,1,"ⳇ"],[11463,2],[11464,1,"ⳉ"],[11465,2],[11466,1,"ⳋ"],[11467,2],[11468,1,"ⳍ"],[11469,2],[11470,1,"ⳏ"],[11471,2],[11472,1,"ⳑ"],[11473,2],[11474,1,"ⳓ"],[11475,2],[11476,1,"ⳕ"],[11477,2],[11478,1,"ⳗ"],[11479,2],[11480,1,"ⳙ"],[11481,2],[11482,1,"ⳛ"],[11483,2],[11484,1,"ⳝ"],[11485,2],[11486,1,"ⳟ"],[11487,2],[11488,1,"ⳡ"],[11489,2],[11490,1,"ⳣ"],[[11491,11492],2],[[11493,11498],2],[11499,1,"ⳬ"],[11500,2],[11501,1,"ⳮ"],[[11502,11505],2],[11506,1,"ⳳ"],[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,"ⵡ"],[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,"母"],[[11936,12018],2],[12019,1,"龟"],[[12020,12031],3],[12032,1,"一"],[12033,1,"丨"],[12034,1,"丶"],[12035,1,"丿"],[12036,1,"乙"],[12037,1,"亅"],[12038,1,"二"],[12039,1,"亠"],[12040,1,"人"],[12041,1,"儿"],[12042,1,"入"],[12043,1,"八"],[12044,1,"冂"],[12045,1,"冖"],[12046,1,"冫"],[12047,1,"几"],[12048,1,"凵"],[12049,1,"刀"],[12050,1,"力"],[12051,1,"勹"],[12052,1,"匕"],[12053,1,"匚"],[12054,1,"匸"],[12055,1,"十"],[12056,1,"卜"],[12057,1,"卩"],[12058,1,"厂"],[12059,1,"厶"],[12060,1,"又"],[12061,1,"口"],[12062,1,"囗"],[12063,1,"土"],[12064,1,"士"],[12065,1,"夂"],[12066,1,"夊"],[12067,1,"夕"],[12068,1,"大"],[12069,1,"女"],[12070,1,"子"],[12071,1,"宀"],[12072,1,"寸"],[12073,1,"小"],[12074,1,"尢"],[12075,1,"尸"],[12076,1,"屮"],[12077,1,"山"],[12078,1,"巛"],[12079,1,"工"],[12080,1,"己"],[12081,1,"巾"],[12082,1,"干"],[12083,1,"幺"],[12084,1,"广"],[12085,1,"廴"],[12086,1,"廾"],[12087,1,"弋"],[12088,1,"弓"],[12089,1,"彐"],[12090,1,"彡"],[12091,1,"彳"],[12092,1,"心"],[12093,1,"戈"],[12094,1,"戶"],[12095,1,"手"],[12096,1,"支"],[12097,1,"攴"],[12098,1,"文"],[12099,1,"斗"],[12100,1,"斤"],[12101,1,"方"],[12102,1,"无"],[12103,1,"日"],[12104,1,"曰"],[12105,1,"月"],[12106,1,"木"],[12107,1,"欠"],[12108,1,"止"],[12109,1,"歹"],[12110,1,"殳"],[12111,1,"毋"],[12112,1,"比"],[12113,1,"毛"],[12114,1,"氏"],[12115,1,"气"],[12116,1,"水"],[12117,1,"火"],[12118,1,"爪"],[12119,1,"父"],[12120,1,"爻"],[12121,1,"爿"],[12122,1,"片"],[12123,1,"牙"],[12124,1,"牛"],[12125,1,"犬"],[12126,1,"玄"],[12127,1,"玉"],[12128,1,"瓜"],[12129,1,"瓦"],[12130,1,"甘"],[12131,1,"生"],[12132,1,"用"],[12133,1,"田"],[12134,1,"疋"],[12135,1,"疒"],[12136,1,"癶"],[12137,1,"白"],[12138,1,"皮"],[12139,1,"皿"],[12140,1,"目"],[12141,1,"矛"],[12142,1,"矢"],[12143,1,"石"],[12144,1,"示"],[12145,1,"禸"],[12146,1,"禾"],[12147,1,"穴"],[12148,1,"立"],[12149,1,"竹"],[12150,1,"米"],[12151,1,"糸"],[12152,1,"缶"],[12153,1,"网"],[12154,1,"羊"],[12155,1,"羽"],[12156,1,"老"],[12157,1,"而"],[12158,1,"耒"],[12159,1,"耳"],[12160,1,"聿"],[12161,1,"肉"],[12162,1,"臣"],[12163,1,"自"],[12164,1,"至"],[12165,1,"臼"],[12166,1,"舌"],[12167,1,"舛"],[12168,1,"舟"],[12169,1,"艮"],[12170,1,"色"],[12171,1,"艸"],[12172,1,"虍"],[12173,1,"虫"],[12174,1,"血"],[12175,1,"行"],[12176,1,"衣"],[12177,1,"襾"],[12178,1,"見"],[12179,1,"角"],[12180,1,"言"],[12181,1,"谷"],[12182,1,"豆"],[12183,1,"豕"],[12184,1,"豸"],[12185,1,"貝"],[12186,1,"赤"],[12187,1,"走"],[12188,1,"足"],[12189,1,"身"],[12190,1,"車"],[12191,1,"辛"],[12192,1,"辰"],[12193,1,"辵"],[12194,1,"邑"],[12195,1,"酉"],[12196,1,"釆"],[12197,1,"里"],[12198,1,"金"],[12199,1,"長"],[12200,1,"門"],[12201,1,"阜"],[12202,1,"隶"],[12203,1,"隹"],[12204,1,"雨"],[12205,1,"靑"],[12206,1,"非"],[12207,1,"面"],[12208,1,"革"],[12209,1,"韋"],[12210,1,"韭"],[12211,1,"音"],[12212,1,"頁"],[12213,1,"風"],[12214,1,"飛"],[12215,1,"食"],[12216,1,"首"],[12217,1,"香"],[12218,1,"馬"],[12219,1,"骨"],[12220,1,"高"],[12221,1,"髟"],[12222,1,"鬥"],[12223,1,"鬯"],[12224,1,"鬲"],[12225,1,"鬼"],[12226,1,"魚"],[12227,1,"鳥"],[12228,1,"鹵"],[12229,1,"鹿"],[12230,1,"麥"],[12231,1,"麻"],[12232,1,"黃"],[12233,1,"黍"],[12234,1,"黑"],[12235,1,"黹"],[12236,1,"黽"],[12237,1,"鼎"],[12238,1,"鼓"],[12239,1,"鼠"],[12240,1,"鼻"],[12241,1,"齊"],[12242,1,"齒"],[12243,1,"龍"],[12244,1,"龜"],[12245,1,"龠"],[[12246,12271],3],[[12272,12283],3],[[12284,12287],3],[12288,1," "],[12289,2],[12290,1,"."],[[12291,12292],2],[[12293,12295],2],[[12296,12329],2],[[12330,12333],2],[[12334,12341],2],[12342,1,"〒"],[12343,2],[12344,1,"十"],[12345,1,"卄"],[12346,1,"卅"],[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,1," ゙"],[12444,1," ゚"],[[12445,12446],2],[12447,1,"より"],[12448,2],[[12449,12542],2],[12543,1,"コト"],[[12544,12548],3],[[12549,12588],2],[12589,2],[12590,2],[12591,2],[12592,3],[12593,1,"ᄀ"],[12594,1,"ᄁ"],[12595,1,"ᆪ"],[12596,1,"ᄂ"],[12597,1,"ᆬ"],[12598,1,"ᆭ"],[12599,1,"ᄃ"],[12600,1,"ᄄ"],[12601,1,"ᄅ"],[12602,1,"ᆰ"],[12603,1,"ᆱ"],[12604,1,"ᆲ"],[12605,1,"ᆳ"],[12606,1,"ᆴ"],[12607,1,"ᆵ"],[12608,1,"ᄚ"],[12609,1,"ᄆ"],[12610,1,"ᄇ"],[12611,1,"ᄈ"],[12612,1,"ᄡ"],[12613,1,"ᄉ"],[12614,1,"ᄊ"],[12615,1,"ᄋ"],[12616,1,"ᄌ"],[12617,1,"ᄍ"],[12618,1,"ᄎ"],[12619,1,"ᄏ"],[12620,1,"ᄐ"],[12621,1,"ᄑ"],[12622,1,"ᄒ"],[12623,1,"ᅡ"],[12624,1,"ᅢ"],[12625,1,"ᅣ"],[12626,1,"ᅤ"],[12627,1,"ᅥ"],[12628,1,"ᅦ"],[12629,1,"ᅧ"],[12630,1,"ᅨ"],[12631,1,"ᅩ"],[12632,1,"ᅪ"],[12633,1,"ᅫ"],[12634,1,"ᅬ"],[12635,1,"ᅭ"],[12636,1,"ᅮ"],[12637,1,"ᅯ"],[12638,1,"ᅰ"],[12639,1,"ᅱ"],[12640,1,"ᅲ"],[12641,1,"ᅳ"],[12642,1,"ᅴ"],[12643,1,"ᅵ"],[12644,7],[12645,1,"ᄔ"],[12646,1,"ᄕ"],[12647,1,"ᇇ"],[12648,1,"ᇈ"],[12649,1,"ᇌ"],[12650,1,"ᇎ"],[12651,1,"ᇓ"],[12652,1,"ᇗ"],[12653,1,"ᇙ"],[12654,1,"ᄜ"],[12655,1,"ᇝ"],[12656,1,"ᇟ"],[12657,1,"ᄝ"],[12658,1,"ᄞ"],[12659,1,"ᄠ"],[12660,1,"ᄢ"],[12661,1,"ᄣ"],[12662,1,"ᄧ"],[12663,1,"ᄩ"],[12664,1,"ᄫ"],[12665,1,"ᄬ"],[12666,1,"ᄭ"],[12667,1,"ᄮ"],[12668,1,"ᄯ"],[12669,1,"ᄲ"],[12670,1,"ᄶ"],[12671,1,"ᅀ"],[12672,1,"ᅇ"],[12673,1,"ᅌ"],[12674,1,"ᇱ"],[12675,1,"ᇲ"],[12676,1,"ᅗ"],[12677,1,"ᅘ"],[12678,1,"ᅙ"],[12679,1,"ᆄ"],[12680,1,"ᆅ"],[12681,1,"ᆈ"],[12682,1,"ᆑ"],[12683,1,"ᆒ"],[12684,1,"ᆔ"],[12685,1,"ᆞ"],[12686,1,"ᆡ"],[12687,3],[[12688,12689],2],[12690,1,"一"],[12691,1,"二"],[12692,1,"三"],[12693,1,"四"],[12694,1,"上"],[12695,1,"中"],[12696,1,"下"],[12697,1,"甲"],[12698,1,"乙"],[12699,1,"丙"],[12700,1,"丁"],[12701,1,"天"],[12702,1,"地"],[12703,1,"人"],[[12704,12727],2],[[12728,12730],2],[[12731,12735],2],[[12736,12751],2],[[12752,12771],2],[[12772,12773],2],[[12774,12782],3],[12783,3],[[12784,12799],2],[12800,1,"(ᄀ)"],[12801,1,"(ᄂ)"],[12802,1,"(ᄃ)"],[12803,1,"(ᄅ)"],[12804,1,"(ᄆ)"],[12805,1,"(ᄇ)"],[12806,1,"(ᄉ)"],[12807,1,"(ᄋ)"],[12808,1,"(ᄌ)"],[12809,1,"(ᄎ)"],[12810,1,"(ᄏ)"],[12811,1,"(ᄐ)"],[12812,1,"(ᄑ)"],[12813,1,"(ᄒ)"],[12814,1,"(가)"],[12815,1,"(나)"],[12816,1,"(다)"],[12817,1,"(라)"],[12818,1,"(마)"],[12819,1,"(바)"],[12820,1,"(사)"],[12821,1,"(아)"],[12822,1,"(자)"],[12823,1,"(차)"],[12824,1,"(카)"],[12825,1,"(타)"],[12826,1,"(파)"],[12827,1,"(하)"],[12828,1,"(주)"],[12829,1,"(오전)"],[12830,1,"(오후)"],[12831,3],[12832,1,"(一)"],[12833,1,"(二)"],[12834,1,"(三)"],[12835,1,"(四)"],[12836,1,"(五)"],[12837,1,"(六)"],[12838,1,"(七)"],[12839,1,"(八)"],[12840,1,"(九)"],[12841,1,"(十)"],[12842,1,"(月)"],[12843,1,"(火)"],[12844,1,"(水)"],[12845,1,"(木)"],[12846,1,"(金)"],[12847,1,"(土)"],[12848,1,"(日)"],[12849,1,"(株)"],[12850,1,"(有)"],[12851,1,"(社)"],[12852,1,"(名)"],[12853,1,"(特)"],[12854,1,"(財)"],[12855,1,"(祝)"],[12856,1,"(労)"],[12857,1,"(代)"],[12858,1,"(呼)"],[12859,1,"(学)"],[12860,1,"(監)"],[12861,1,"(企)"],[12862,1,"(資)"],[12863,1,"(協)"],[12864,1,"(祭)"],[12865,1,"(休)"],[12866,1,"(自)"],[12867,1,"(至)"],[12868,1,"問"],[12869,1,"幼"],[12870,1,"文"],[12871,1,"箏"],[[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,"ᄀ"],[12897,1,"ᄂ"],[12898,1,"ᄃ"],[12899,1,"ᄅ"],[12900,1,"ᄆ"],[12901,1,"ᄇ"],[12902,1,"ᄉ"],[12903,1,"ᄋ"],[12904,1,"ᄌ"],[12905,1,"ᄎ"],[12906,1,"ᄏ"],[12907,1,"ᄐ"],[12908,1,"ᄑ"],[12909,1,"ᄒ"],[12910,1,"가"],[12911,1,"나"],[12912,1,"다"],[12913,1,"라"],[12914,1,"마"],[12915,1,"바"],[12916,1,"사"],[12917,1,"아"],[12918,1,"자"],[12919,1,"차"],[12920,1,"카"],[12921,1,"타"],[12922,1,"파"],[12923,1,"하"],[12924,1,"참고"],[12925,1,"주의"],[12926,1,"우"],[12927,2],[12928,1,"一"],[12929,1,"二"],[12930,1,"三"],[12931,1,"四"],[12932,1,"五"],[12933,1,"六"],[12934,1,"七"],[12935,1,"八"],[12936,1,"九"],[12937,1,"十"],[12938,1,"月"],[12939,1,"火"],[12940,1,"水"],[12941,1,"木"],[12942,1,"金"],[12943,1,"土"],[12944,1,"日"],[12945,1,"株"],[12946,1,"有"],[12947,1,"社"],[12948,1,"名"],[12949,1,"特"],[12950,1,"財"],[12951,1,"祝"],[12952,1,"労"],[12953,1,"秘"],[12954,1,"男"],[12955,1,"女"],[12956,1,"適"],[12957,1,"優"],[12958,1,"印"],[12959,1,"注"],[12960,1,"項"],[12961,1,"休"],[12962,1,"写"],[12963,1,"正"],[12964,1,"上"],[12965,1,"中"],[12966,1,"下"],[12967,1,"左"],[12968,1,"右"],[12969,1,"医"],[12970,1,"宗"],[12971,1,"学"],[12972,1,"監"],[12973,1,"企"],[12974,1,"資"],[12975,1,"協"],[12976,1,"夜"],[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月"],[12993,1,"2月"],[12994,1,"3月"],[12995,1,"4月"],[12996,1,"5月"],[12997,1,"6月"],[12998,1,"7月"],[12999,1,"8月"],[13e3,1,"9月"],[13001,1,"10月"],[13002,1,"11月"],[13003,1,"12月"],[13004,1,"hg"],[13005,1,"erg"],[13006,1,"ev"],[13007,1,"ltd"],[13008,1,"ア"],[13009,1,"イ"],[13010,1,"ウ"],[13011,1,"エ"],[13012,1,"オ"],[13013,1,"カ"],[13014,1,"キ"],[13015,1,"ク"],[13016,1,"ケ"],[13017,1,"コ"],[13018,1,"サ"],[13019,1,"シ"],[13020,1,"ス"],[13021,1,"セ"],[13022,1,"ソ"],[13023,1,"タ"],[13024,1,"チ"],[13025,1,"ツ"],[13026,1,"テ"],[13027,1,"ト"],[13028,1,"ナ"],[13029,1,"ニ"],[13030,1,"ヌ"],[13031,1,"ネ"],[13032,1,"ノ"],[13033,1,"ハ"],[13034,1,"ヒ"],[13035,1,"フ"],[13036,1,"ヘ"],[13037,1,"ホ"],[13038,1,"マ"],[13039,1,"ミ"],[13040,1,"ム"],[13041,1,"メ"],[13042,1,"モ"],[13043,1,"ヤ"],[13044,1,"ユ"],[13045,1,"ヨ"],[13046,1,"ラ"],[13047,1,"リ"],[13048,1,"ル"],[13049,1,"レ"],[13050,1,"ロ"],[13051,1,"ワ"],[13052,1,"ヰ"],[13053,1,"ヱ"],[13054,1,"ヲ"],[13055,1,"令和"],[13056,1,"アパート"],[13057,1,"アルファ"],[13058,1,"アンペア"],[13059,1,"アール"],[13060,1,"イニング"],[13061,1,"インチ"],[13062,1,"ウォン"],[13063,1,"エスクード"],[13064,1,"エーカー"],[13065,1,"オンス"],[13066,1,"オーム"],[13067,1,"カイリ"],[13068,1,"カラット"],[13069,1,"カロリー"],[13070,1,"ガロン"],[13071,1,"ガンマ"],[13072,1,"ギガ"],[13073,1,"ギニー"],[13074,1,"キュリー"],[13075,1,"ギルダー"],[13076,1,"キロ"],[13077,1,"キログラム"],[13078,1,"キロメートル"],[13079,1,"キロワット"],[13080,1,"グラム"],[13081,1,"グラムトン"],[13082,1,"クルゼイロ"],[13083,1,"クローネ"],[13084,1,"ケース"],[13085,1,"コルナ"],[13086,1,"コーポ"],[13087,1,"サイクル"],[13088,1,"サンチーム"],[13089,1,"シリング"],[13090,1,"センチ"],[13091,1,"セント"],[13092,1,"ダース"],[13093,1,"デシ"],[13094,1,"ドル"],[13095,1,"トン"],[13096,1,"ナノ"],[13097,1,"ノット"],[13098,1,"ハイツ"],[13099,1,"パーセント"],[13100,1,"パーツ"],[13101,1,"バーレル"],[13102,1,"ピアストル"],[13103,1,"ピクル"],[13104,1,"ピコ"],[13105,1,"ビル"],[13106,1,"ファラッド"],[13107,1,"フィート"],[13108,1,"ブッシェル"],[13109,1,"フラン"],[13110,1,"ヘクタール"],[13111,1,"ペソ"],[13112,1,"ペニヒ"],[13113,1,"ヘルツ"],[13114,1,"ペンス"],[13115,1,"ページ"],[13116,1,"ベータ"],[13117,1,"ポイント"],[13118,1,"ボルト"],[13119,1,"ホン"],[13120,1,"ポンド"],[13121,1,"ホール"],[13122,1,"ホーン"],[13123,1,"マイクロ"],[13124,1,"マイル"],[13125,1,"マッハ"],[13126,1,"マルク"],[13127,1,"マンション"],[13128,1,"ミクロン"],[13129,1,"ミリ"],[13130,1,"ミリバール"],[13131,1,"メガ"],[13132,1,"メガトン"],[13133,1,"メートル"],[13134,1,"ヤード"],[13135,1,"ヤール"],[13136,1,"ユアン"],[13137,1,"リットル"],[13138,1,"リラ"],[13139,1,"ルピー"],[13140,1,"ルーブル"],[13141,1,"レム"],[13142,1,"レントゲン"],[13143,1,"ワット"],[13144,1,"0点"],[13145,1,"1点"],[13146,1,"2点"],[13147,1,"3点"],[13148,1,"4点"],[13149,1,"5点"],[13150,1,"6点"],[13151,1,"7点"],[13152,1,"8点"],[13153,1,"9点"],[13154,1,"10点"],[13155,1,"11点"],[13156,1,"12点"],[13157,1,"13点"],[13158,1,"14点"],[13159,1,"15点"],[13160,1,"16点"],[13161,1,"17点"],[13162,1,"18点"],[13163,1,"19点"],[13164,1,"20点"],[13165,1,"21点"],[13166,1,"22点"],[13167,1,"23点"],[13168,1,"24点"],[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,"平成"],[13180,1,"昭和"],[13181,1,"大正"],[13182,1,"明治"],[13183,1,"株式会社"],[13184,1,"pa"],[13185,1,"na"],[13186,1,"μa"],[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,"μf"],[13197,1,"μg"],[13198,1,"mg"],[13199,1,"kg"],[13200,1,"hz"],[13201,1,"khz"],[13202,1,"mhz"],[13203,1,"ghz"],[13204,1,"thz"],[13205,1,"μl"],[13206,1,"ml"],[13207,1,"dl"],[13208,1,"kl"],[13209,1,"fm"],[13210,1,"nm"],[13211,1,"μm"],[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∕s"],[13224,1,"m∕s2"],[13225,1,"pa"],[13226,1,"kpa"],[13227,1,"mpa"],[13228,1,"gpa"],[13229,1,"rad"],[13230,1,"rad∕s"],[13231,1,"rad∕s2"],[13232,1,"ps"],[13233,1,"ns"],[13234,1,"μs"],[13235,1,"ms"],[13236,1,"pv"],[13237,1,"nv"],[13238,1,"μv"],[13239,1,"mv"],[13240,1,"kv"],[13241,1,"mv"],[13242,1,"pw"],[13243,1,"nw"],[13244,1,"μw"],[13245,1,"mw"],[13246,1,"kw"],[13247,1,"mw"],[13248,1,"kω"],[13249,1,"mω"],[13250,3],[13251,1,"bq"],[13252,1,"cc"],[13253,1,"cd"],[13254,1,"c∕kg"],[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∕m"],[13279,1,"a∕m"],[13280,1,"1日"],[13281,1,"2日"],[13282,1,"3日"],[13283,1,"4日"],[13284,1,"5日"],[13285,1,"6日"],[13286,1,"7日"],[13287,1,"8日"],[13288,1,"9日"],[13289,1,"10日"],[13290,1,"11日"],[13291,1,"12日"],[13292,1,"13日"],[13293,1,"14日"],[13294,1,"15日"],[13295,1,"16日"],[13296,1,"17日"],[13297,1,"18日"],[13298,1,"19日"],[13299,1,"20日"],[13300,1,"21日"],[13301,1,"22日"],[13302,1,"23日"],[13303,1,"24日"],[13304,1,"25日"],[13305,1,"26日"],[13306,1,"27日"],[13307,1,"28日"],[13308,1,"29日"],[13309,1,"30日"],[13310,1,"31日"],[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,"ꙁ"],[42561,2],[42562,1,"ꙃ"],[42563,2],[42564,1,"ꙅ"],[42565,2],[42566,1,"ꙇ"],[42567,2],[42568,1,"ꙉ"],[42569,2],[42570,1,"ꙋ"],[42571,2],[42572,1,"ꙍ"],[42573,2],[42574,1,"ꙏ"],[42575,2],[42576,1,"ꙑ"],[42577,2],[42578,1,"ꙓ"],[42579,2],[42580,1,"ꙕ"],[42581,2],[42582,1,"ꙗ"],[42583,2],[42584,1,"ꙙ"],[42585,2],[42586,1,"ꙛ"],[42587,2],[42588,1,"ꙝ"],[42589,2],[42590,1,"ꙟ"],[42591,2],[42592,1,"ꙡ"],[42593,2],[42594,1,"ꙣ"],[42595,2],[42596,1,"ꙥ"],[42597,2],[42598,1,"ꙧ"],[42599,2],[42600,1,"ꙩ"],[42601,2],[42602,1,"ꙫ"],[42603,2],[42604,1,"ꙭ"],[[42605,42607],2],[[42608,42611],2],[[42612,42619],2],[[42620,42621],2],[42622,2],[42623,2],[42624,1,"ꚁ"],[42625,2],[42626,1,"ꚃ"],[42627,2],[42628,1,"ꚅ"],[42629,2],[42630,1,"ꚇ"],[42631,2],[42632,1,"ꚉ"],[42633,2],[42634,1,"ꚋ"],[42635,2],[42636,1,"ꚍ"],[42637,2],[42638,1,"ꚏ"],[42639,2],[42640,1,"ꚑ"],[42641,2],[42642,1,"ꚓ"],[42643,2],[42644,1,"ꚕ"],[42645,2],[42646,1,"ꚗ"],[42647,2],[42648,1,"ꚙ"],[42649,2],[42650,1,"ꚛ"],[42651,2],[42652,1,"ъ"],[42653,1,"ь"],[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,"ꜣ"],[42787,2],[42788,1,"ꜥ"],[42789,2],[42790,1,"ꜧ"],[42791,2],[42792,1,"ꜩ"],[42793,2],[42794,1,"ꜫ"],[42795,2],[42796,1,"ꜭ"],[42797,2],[42798,1,"ꜯ"],[[42799,42801],2],[42802,1,"ꜳ"],[42803,2],[42804,1,"ꜵ"],[42805,2],[42806,1,"ꜷ"],[42807,2],[42808,1,"ꜹ"],[42809,2],[42810,1,"ꜻ"],[42811,2],[42812,1,"ꜽ"],[42813,2],[42814,1,"ꜿ"],[42815,2],[42816,1,"ꝁ"],[42817,2],[42818,1,"ꝃ"],[42819,2],[42820,1,"ꝅ"],[42821,2],[42822,1,"ꝇ"],[42823,2],[42824,1,"ꝉ"],[42825,2],[42826,1,"ꝋ"],[42827,2],[42828,1,"ꝍ"],[42829,2],[42830,1,"ꝏ"],[42831,2],[42832,1,"ꝑ"],[42833,2],[42834,1,"ꝓ"],[42835,2],[42836,1,"ꝕ"],[42837,2],[42838,1,"ꝗ"],[42839,2],[42840,1,"ꝙ"],[42841,2],[42842,1,"ꝛ"],[42843,2],[42844,1,"ꝝ"],[42845,2],[42846,1,"ꝟ"],[42847,2],[42848,1,"ꝡ"],[42849,2],[42850,1,"ꝣ"],[42851,2],[42852,1,"ꝥ"],[42853,2],[42854,1,"ꝧ"],[42855,2],[42856,1,"ꝩ"],[42857,2],[42858,1,"ꝫ"],[42859,2],[42860,1,"ꝭ"],[42861,2],[42862,1,"ꝯ"],[42863,2],[42864,1,"ꝯ"],[[42865,42872],2],[42873,1,"ꝺ"],[42874,2],[42875,1,"ꝼ"],[42876,2],[42877,1,"ᵹ"],[42878,1,"ꝿ"],[42879,2],[42880,1,"ꞁ"],[42881,2],[42882,1,"ꞃ"],[42883,2],[42884,1,"ꞅ"],[42885,2],[42886,1,"ꞇ"],[[42887,42888],2],[[42889,42890],2],[42891,1,"ꞌ"],[42892,2],[42893,1,"ɥ"],[42894,2],[42895,2],[42896,1,"ꞑ"],[42897,2],[42898,1,"ꞓ"],[42899,2],[[42900,42901],2],[42902,1,"ꞗ"],[42903,2],[42904,1,"ꞙ"],[42905,2],[42906,1,"ꞛ"],[42907,2],[42908,1,"ꞝ"],[42909,2],[42910,1,"ꞟ"],[42911,2],[42912,1,"ꞡ"],[42913,2],[42914,1,"ꞣ"],[42915,2],[42916,1,"ꞥ"],[42917,2],[42918,1,"ꞧ"],[42919,2],[42920,1,"ꞩ"],[42921,2],[42922,1,"ɦ"],[42923,1,"ɜ"],[42924,1,"ɡ"],[42925,1,"ɬ"],[42926,1,"ɪ"],[42927,2],[42928,1,"ʞ"],[42929,1,"ʇ"],[42930,1,"ʝ"],[42931,1,"ꭓ"],[42932,1,"ꞵ"],[42933,2],[42934,1,"ꞷ"],[42935,2],[42936,1,"ꞹ"],[42937,2],[42938,1,"ꞻ"],[42939,2],[42940,1,"ꞽ"],[42941,2],[42942,1,"ꞿ"],[42943,2],[42944,1,"ꟁ"],[42945,2],[42946,1,"ꟃ"],[42947,2],[42948,1,"ꞔ"],[42949,1,"ʂ"],[42950,1,"ᶎ"],[42951,1,"ꟈ"],[42952,2],[42953,1,"ꟊ"],[42954,2],[42955,1,"ɤ"],[42956,1,""],[42957,2],[[42958,42959],3],[42960,1,"ꟑ"],[42961,2],[42962,3],[42963,2],[42964,3],[42965,2],[42966,1,"ꟗ"],[42967,2],[42968,1,"ꟙ"],[42969,2],[42970,1,""],[42971,2],[42972,1,"ƛ"],[[42973,42993],3],[42994,1,"c"],[42995,1,"f"],[42996,1,"q"],[42997,1,"ꟶ"],[42998,2],[42999,2],[43e3,1,"ħ"],[43001,1,"œ"],[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,"ꜧ"],[43869,1,"ꬷ"],[43870,1,"ɫ"],[43871,1,"ꭒ"],[[43872,43875],2],[[43876,43877],2],[[43878,43879],2],[43880,2],[43881,1,"ʍ"],[[43882,43883],2],[[43884,43887],3],[43888,1,"Ꭰ"],[43889,1,"Ꭱ"],[43890,1,"Ꭲ"],[43891,1,"Ꭳ"],[43892,1,"Ꭴ"],[43893,1,"Ꭵ"],[43894,1,"Ꭶ"],[43895,1,"Ꭷ"],[43896,1,"Ꭸ"],[43897,1,"Ꭹ"],[43898,1,"Ꭺ"],[43899,1,"Ꭻ"],[43900,1,"Ꭼ"],[43901,1,"Ꭽ"],[43902,1,"Ꭾ"],[43903,1,"Ꭿ"],[43904,1,"Ꮀ"],[43905,1,"Ꮁ"],[43906,1,"Ꮂ"],[43907,1,"Ꮃ"],[43908,1,"Ꮄ"],[43909,1,"Ꮅ"],[43910,1,"Ꮆ"],[43911,1,"Ꮇ"],[43912,1,"Ꮈ"],[43913,1,"Ꮉ"],[43914,1,"Ꮊ"],[43915,1,"Ꮋ"],[43916,1,"Ꮌ"],[43917,1,"Ꮍ"],[43918,1,"Ꮎ"],[43919,1,"Ꮏ"],[43920,1,"Ꮐ"],[43921,1,"Ꮑ"],[43922,1,"Ꮒ"],[43923,1,"Ꮓ"],[43924,1,"Ꮔ"],[43925,1,"Ꮕ"],[43926,1,"Ꮖ"],[43927,1,"Ꮗ"],[43928,1,"Ꮘ"],[43929,1,"Ꮙ"],[43930,1,"Ꮚ"],[43931,1,"Ꮛ"],[43932,1,"Ꮜ"],[43933,1,"Ꮝ"],[43934,1,"Ꮞ"],[43935,1,"Ꮟ"],[43936,1,"Ꮠ"],[43937,1,"Ꮡ"],[43938,1,"Ꮢ"],[43939,1,"Ꮣ"],[43940,1,"Ꮤ"],[43941,1,"Ꮥ"],[43942,1,"Ꮦ"],[43943,1,"Ꮧ"],[43944,1,"Ꮨ"],[43945,1,"Ꮩ"],[43946,1,"Ꮪ"],[43947,1,"Ꮫ"],[43948,1,"Ꮬ"],[43949,1,"Ꮭ"],[43950,1,"Ꮮ"],[43951,1,"Ꮯ"],[43952,1,"Ꮰ"],[43953,1,"Ꮱ"],[43954,1,"Ꮲ"],[43955,1,"Ꮳ"],[43956,1,"Ꮴ"],[43957,1,"Ꮵ"],[43958,1,"Ꮶ"],[43959,1,"Ꮷ"],[43960,1,"Ꮸ"],[43961,1,"Ꮹ"],[43962,1,"Ꮺ"],[43963,1,"Ꮻ"],[43964,1,"Ꮼ"],[43965,1,"Ꮽ"],[43966,1,"Ꮾ"],[43967,1,"Ꮿ"],[[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,"豈"],[63745,1,"更"],[63746,1,"車"],[63747,1,"賈"],[63748,1,"滑"],[63749,1,"串"],[63750,1,"句"],[[63751,63752],1,"龜"],[63753,1,"契"],[63754,1,"金"],[63755,1,"喇"],[63756,1,"奈"],[63757,1,"懶"],[63758,1,"癩"],[63759,1,"羅"],[63760,1,"蘿"],[63761,1,"螺"],[63762,1,"裸"],[63763,1,"邏"],[63764,1,"樂"],[63765,1,"洛"],[63766,1,"烙"],[63767,1,"珞"],[63768,1,"落"],[63769,1,"酪"],[63770,1,"駱"],[63771,1,"亂"],[63772,1,"卵"],[63773,1,"欄"],[63774,1,"爛"],[63775,1,"蘭"],[63776,1,"鸞"],[63777,1,"嵐"],[63778,1,"濫"],[63779,1,"藍"],[63780,1,"襤"],[63781,1,"拉"],[63782,1,"臘"],[63783,1,"蠟"],[63784,1,"廊"],[63785,1,"朗"],[63786,1,"浪"],[63787,1,"狼"],[63788,1,"郎"],[63789,1,"來"],[63790,1,"冷"],[63791,1,"勞"],[63792,1,"擄"],[63793,1,"櫓"],[63794,1,"爐"],[63795,1,"盧"],[63796,1,"老"],[63797,1,"蘆"],[63798,1,"虜"],[63799,1,"路"],[63800,1,"露"],[63801,1,"魯"],[63802,1,"鷺"],[63803,1,"碌"],[63804,1,"祿"],[63805,1,"綠"],[63806,1,"菉"],[63807,1,"錄"],[63808,1,"鹿"],[63809,1,"論"],[63810,1,"壟"],[63811,1,"弄"],[63812,1,"籠"],[63813,1,"聾"],[63814,1,"牢"],[63815,1,"磊"],[63816,1,"賂"],[63817,1,"雷"],[63818,1,"壘"],[63819,1,"屢"],[63820,1,"樓"],[63821,1,"淚"],[63822,1,"漏"],[63823,1,"累"],[63824,1,"縷"],[63825,1,"陋"],[63826,1,"勒"],[63827,1,"肋"],[63828,1,"凜"],[63829,1,"凌"],[63830,1,"稜"],[63831,1,"綾"],[63832,1,"菱"],[63833,1,"陵"],[63834,1,"讀"],[63835,1,"拏"],[63836,1,"樂"],[63837,1,"諾"],[63838,1,"丹"],[63839,1,"寧"],[63840,1,"怒"],[63841,1,"率"],[63842,1,"異"],[63843,1,"北"],[63844,1,"磻"],[63845,1,"便"],[63846,1,"復"],[63847,1,"不"],[63848,1,"泌"],[63849,1,"數"],[63850,1,"索"],[63851,1,"參"],[63852,1,"塞"],[63853,1,"省"],[63854,1,"葉"],[63855,1,"說"],[63856,1,"殺"],[63857,1,"辰"],[63858,1,"沈"],[63859,1,"拾"],[63860,1,"若"],[63861,1,"掠"],[63862,1,"略"],[63863,1,"亮"],[63864,1,"兩"],[63865,1,"凉"],[63866,1,"梁"],[63867,1,"糧"],[63868,1,"良"],[63869,1,"諒"],[63870,1,"量"],[63871,1,"勵"],[63872,1,"呂"],[63873,1,"女"],[63874,1,"廬"],[63875,1,"旅"],[63876,1,"濾"],[63877,1,"礪"],[63878,1,"閭"],[63879,1,"驪"],[63880,1,"麗"],[63881,1,"黎"],[63882,1,"力"],[63883,1,"曆"],[63884,1,"歷"],[63885,1,"轢"],[63886,1,"年"],[63887,1,"憐"],[63888,1,"戀"],[63889,1,"撚"],[63890,1,"漣"],[63891,1,"煉"],[63892,1,"璉"],[63893,1,"秊"],[63894,1,"練"],[63895,1,"聯"],[63896,1,"輦"],[63897,1,"蓮"],[63898,1,"連"],[63899,1,"鍊"],[63900,1,"列"],[63901,1,"劣"],[63902,1,"咽"],[63903,1,"烈"],[63904,1,"裂"],[63905,1,"說"],[63906,1,"廉"],[63907,1,"念"],[63908,1,"捻"],[63909,1,"殮"],[63910,1,"簾"],[63911,1,"獵"],[63912,1,"令"],[63913,1,"囹"],[63914,1,"寧"],[63915,1,"嶺"],[63916,1,"怜"],[63917,1,"玲"],[63918,1,"瑩"],[63919,1,"羚"],[63920,1,"聆"],[63921,1,"鈴"],[63922,1,"零"],[63923,1,"靈"],[63924,1,"領"],[63925,1,"例"],[63926,1,"禮"],[63927,1,"醴"],[63928,1,"隸"],[63929,1,"惡"],[63930,1,"了"],[63931,1,"僚"],[63932,1,"寮"],[63933,1,"尿"],[63934,1,"料"],[63935,1,"樂"],[63936,1,"燎"],[63937,1,"療"],[63938,1,"蓼"],[63939,1,"遼"],[63940,1,"龍"],[63941,1,"暈"],[63942,1,"阮"],[63943,1,"劉"],[63944,1,"杻"],[63945,1,"柳"],[63946,1,"流"],[63947,1,"溜"],[63948,1,"琉"],[63949,1,"留"],[63950,1,"硫"],[63951,1,"紐"],[63952,1,"類"],[63953,1,"六"],[63954,1,"戮"],[63955,1,"陸"],[63956,1,"倫"],[63957,1,"崙"],[63958,1,"淪"],[63959,1,"輪"],[63960,1,"律"],[63961,1,"慄"],[63962,1,"栗"],[63963,1,"率"],[63964,1,"隆"],[63965,1,"利"],[63966,1,"吏"],[63967,1,"履"],[63968,1,"易"],[63969,1,"李"],[63970,1,"梨"],[63971,1,"泥"],[63972,1,"理"],[63973,1,"痢"],[63974,1,"罹"],[63975,1,"裏"],[63976,1,"裡"],[63977,1,"里"],[63978,1,"離"],[63979,1,"匿"],[63980,1,"溺"],[63981,1,"吝"],[63982,1,"燐"],[63983,1,"璘"],[63984,1,"藺"],[63985,1,"隣"],[63986,1,"鱗"],[63987,1,"麟"],[63988,1,"林"],[63989,1,"淋"],[63990,1,"臨"],[63991,1,"立"],[63992,1,"笠"],[63993,1,"粒"],[63994,1,"狀"],[63995,1,"炙"],[63996,1,"識"],[63997,1,"什"],[63998,1,"茶"],[63999,1,"刺"],[64e3,1,"切"],[64001,1,"度"],[64002,1,"拓"],[64003,1,"糖"],[64004,1,"宅"],[64005,1,"洞"],[64006,1,"暴"],[64007,1,"輻"],[64008,1,"行"],[64009,1,"降"],[64010,1,"見"],[64011,1,"廓"],[64012,1,"兀"],[64013,1,"嗀"],[[64014,64015],2],[64016,1,"塚"],[64017,2],[64018,1,"晴"],[[64019,64020],2],[64021,1,"凞"],[64022,1,"猪"],[64023,1,"益"],[64024,1,"礼"],[64025,1,"神"],[64026,1,"祥"],[64027,1,"福"],[64028,1,"靖"],[64029,1,"精"],[64030,1,"羽"],[64031,2],[64032,1,"蘒"],[64033,2],[64034,1,"諸"],[[64035,64036],2],[64037,1,"逸"],[64038,1,"都"],[[64039,64041],2],[64042,1,"飯"],[64043,1,"飼"],[64044,1,"館"],[64045,1,"鶴"],[64046,1,"郞"],[64047,1,"隷"],[64048,1,"侮"],[64049,1,"僧"],[64050,1,"免"],[64051,1,"勉"],[64052,1,"勤"],[64053,1,"卑"],[64054,1,"喝"],[64055,1,"嘆"],[64056,1,"器"],[64057,1,"塀"],[64058,1,"墨"],[64059,1,"層"],[64060,1,"屮"],[64061,1,"悔"],[64062,1,"慨"],[64063,1,"憎"],[64064,1,"懲"],[64065,1,"敏"],[64066,1,"既"],[64067,1,"暑"],[64068,1,"梅"],[64069,1,"海"],[64070,1,"渚"],[64071,1,"漢"],[64072,1,"煮"],[64073,1,"爫"],[64074,1,"琢"],[64075,1,"碑"],[64076,1,"社"],[64077,1,"祉"],[64078,1,"祈"],[64079,1,"祐"],[64080,1,"祖"],[64081,1,"祝"],[64082,1,"禍"],[64083,1,"禎"],[64084,1,"穀"],[64085,1,"突"],[64086,1,"節"],[64087,1,"練"],[64088,1,"縉"],[64089,1,"繁"],[64090,1,"署"],[64091,1,"者"],[64092,1,"臭"],[[64093,64094],1,"艹"],[64095,1,"著"],[64096,1,"褐"],[64097,1,"視"],[64098,1,"謁"],[64099,1,"謹"],[64100,1,"賓"],[64101,1,"贈"],[64102,1,"辶"],[64103,1,"逸"],[64104,1,"難"],[64105,1,"響"],[64106,1,"頻"],[64107,1,"恵"],[64108,1,"\uD850\uDEEE"],[64109,1,"舘"],[[64110,64111],3],[64112,1,"並"],[64113,1,"况"],[64114,1,"全"],[64115,1,"侀"],[64116,1,"充"],[64117,1,"冀"],[64118,1,"勇"],[64119,1,"勺"],[64120,1,"喝"],[64121,1,"啕"],[64122,1,"喙"],[64123,1,"嗢"],[64124,1,"塚"],[64125,1,"墳"],[64126,1,"奄"],[64127,1,"奔"],[64128,1,"婢"],[64129,1,"嬨"],[64130,1,"廒"],[64131,1,"廙"],[64132,1,"彩"],[64133,1,"徭"],[64134,1,"惘"],[64135,1,"慎"],[64136,1,"愈"],[64137,1,"憎"],[64138,1,"慠"],[64139,1,"懲"],[64140,1,"戴"],[64141,1,"揄"],[64142,1,"搜"],[64143,1,"摒"],[64144,1,"敖"],[64145,1,"晴"],[64146,1,"朗"],[64147,1,"望"],[64148,1,"杖"],[64149,1,"歹"],[64150,1,"殺"],[64151,1,"流"],[64152,1,"滛"],[64153,1,"滋"],[64154,1,"漢"],[64155,1,"瀞"],[64156,1,"煮"],[64157,1,"瞧"],[64158,1,"爵"],[64159,1,"犯"],[64160,1,"猪"],[64161,1,"瑱"],[64162,1,"甆"],[64163,1,"画"],[64164,1,"瘝"],[64165,1,"瘟"],[64166,1,"益"],[64167,1,"盛"],[64168,1,"直"],[64169,1,"睊"],[64170,1,"着"],[64171,1,"磌"],[64172,1,"窱"],[64173,1,"節"],[64174,1,"类"],[64175,1,"絛"],[64176,1,"練"],[64177,1,"缾"],[64178,1,"者"],[64179,1,"荒"],[64180,1,"華"],[64181,1,"蝹"],[64182,1,"襁"],[64183,1,"覆"],[64184,1,"視"],[64185,1,"調"],[64186,1,"諸"],[64187,1,"請"],[64188,1,"謁"],[64189,1,"諾"],[64190,1,"諭"],[64191,1,"謹"],[64192,1,"變"],[64193,1,"贈"],[64194,1,"輸"],[64195,1,"遲"],[64196,1,"醙"],[64197,1,"鉶"],[64198,1,"陼"],[64199,1,"難"],[64200,1,"靖"],[64201,1,"韛"],[64202,1,"響"],[64203,1,"頋"],[64204,1,"頻"],[64205,1,"鬒"],[64206,1,"龜"],[64207,1,"\uD84A\uDC4A"],[64208,1,"\uD84A\uDC44"],[64209,1,"\uD84C\uDFD5"],[64210,1,"㮝"],[64211,1,"䀘"],[64212,1,"䀹"],[64213,1,"\uD854\uDE49"],[64214,1,"\uD857\uDCD0"],[64215,1,"\uD85F\uDED3"],[64216,1,"齃"],[64217,1,"龎"],[[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,"մն"],[64276,1,"մե"],[64277,1,"մի"],[64278,1,"վն"],[64279,1,"մխ"],[[64280,64284],3],[64285,1,"יִ"],[64286,2],[64287,1,"ײַ"],[64288,1,"ע"],[64289,1,"א"],[64290,1,"ד"],[64291,1,"ה"],[64292,1,"כ"],[64293,1,"ל"],[64294,1,"ם"],[64295,1,"ר"],[64296,1,"ת"],[64297,1,"+"],[64298,1,"שׁ"],[64299,1,"שׂ"],[64300,1,"שּׁ"],[64301,1,"שּׂ"],[64302,1,"אַ"],[64303,1,"אָ"],[64304,1,"אּ"],[64305,1,"בּ"],[64306,1,"גּ"],[64307,1,"דּ"],[64308,1,"הּ"],[64309,1,"וּ"],[64310,1,"זּ"],[64311,3],[64312,1,"טּ"],[64313,1,"יּ"],[64314,1,"ךּ"],[64315,1,"כּ"],[64316,1,"לּ"],[64317,3],[64318,1,"מּ"],[64319,3],[64320,1,"נּ"],[64321,1,"סּ"],[64322,3],[64323,1,"ףּ"],[64324,1,"פּ"],[64325,3],[64326,1,"צּ"],[64327,1,"קּ"],[64328,1,"רּ"],[64329,1,"שּ"],[64330,1,"תּ"],[64331,1,"וֹ"],[64332,1,"בֿ"],[64333,1,"כֿ"],[64334,1,"פֿ"],[64335,1,"אל"],[[64336,64337],1,"ٱ"],[[64338,64341],1,"ٻ"],[[64342,64345],1,"پ"],[[64346,64349],1,"ڀ"],[[64350,64353],1,"ٺ"],[[64354,64357],1,"ٿ"],[[64358,64361],1,"ٹ"],[[64362,64365],1,"ڤ"],[[64366,64369],1,"ڦ"],[[64370,64373],1,"ڄ"],[[64374,64377],1,"ڃ"],[[64378,64381],1,"چ"],[[64382,64385],1,"ڇ"],[[64386,64387],1,"ڍ"],[[64388,64389],1,"ڌ"],[[64390,64391],1,"ڎ"],[[64392,64393],1,"ڈ"],[[64394,64395],1,"ژ"],[[64396,64397],1,"ڑ"],[[64398,64401],1,"ک"],[[64402,64405],1,"گ"],[[64406,64409],1,"ڳ"],[[64410,64413],1,"ڱ"],[[64414,64415],1,"ں"],[[64416,64419],1,"ڻ"],[[64420,64421],1,"ۀ"],[[64422,64425],1,"ہ"],[[64426,64429],1,"ھ"],[[64430,64431],1,"ے"],[[64432,64433],1,"ۓ"],[[64434,64449],2],[64450,2],[[64451,64466],3],[[64467,64470],1,"ڭ"],[[64471,64472],1,"ۇ"],[[64473,64474],1,"ۆ"],[[64475,64476],1,"ۈ"],[64477,1,"ۇٴ"],[[64478,64479],1,"ۋ"],[[64480,64481],1,"ۅ"],[[64482,64483],1,"ۉ"],[[64484,64487],1,"ې"],[[64488,64489],1,"ى"],[[64490,64491],1,"ئا"],[[64492,64493],1,"ئە"],[[64494,64495],1,"ئو"],[[64496,64497],1,"ئۇ"],[[64498,64499],1,"ئۆ"],[[64500,64501],1,"ئۈ"],[[64502,64504],1,"ئې"],[[64505,64507],1,"ئى"],[[64508,64511],1,"ی"],[64512,1,"ئج"],[64513,1,"ئح"],[64514,1,"ئم"],[64515,1,"ئى"],[64516,1,"ئي"],[64517,1,"بج"],[64518,1,"بح"],[64519,1,"بخ"],[64520,1,"بم"],[64521,1,"بى"],[64522,1,"بي"],[64523,1,"تج"],[64524,1,"تح"],[64525,1,"تخ"],[64526,1,"تم"],[64527,1,"تى"],[64528,1,"تي"],[64529,1,"ثج"],[64530,1,"ثم"],[64531,1,"ثى"],[64532,1,"ثي"],[64533,1,"جح"],[64534,1,"جم"],[64535,1,"حج"],[64536,1,"حم"],[64537,1,"خج"],[64538,1,"خح"],[64539,1,"خم"],[64540,1,"سج"],[64541,1,"سح"],[64542,1,"سخ"],[64543,1,"سم"],[64544,1,"صح"],[64545,1,"صم"],[64546,1,"ضج"],[64547,1,"ضح"],[64548,1,"ضخ"],[64549,1,"ضم"],[64550,1,"طح"],[64551,1,"طم"],[64552,1,"ظم"],[64553,1,"عج"],[64554,1,"عم"],[64555,1,"غج"],[64556,1,"غم"],[64557,1,"فج"],[64558,1,"فح"],[64559,1,"فخ"],[64560,1,"فم"],[64561,1,"فى"],[64562,1,"في"],[64563,1,"قح"],[64564,1,"قم"],[64565,1,"قى"],[64566,1,"قي"],[64567,1,"كا"],[64568,1,"كج"],[64569,1,"كح"],[64570,1,"كخ"],[64571,1,"كل"],[64572,1,"كم"],[64573,1,"كى"],[64574,1,"كي"],[64575,1,"لج"],[64576,1,"لح"],[64577,1,"لخ"],[64578,1,"لم"],[64579,1,"لى"],[64580,1,"لي"],[64581,1,"مج"],[64582,1,"مح"],[64583,1,"مخ"],[64584,1,"مم"],[64585,1,"مى"],[64586,1,"مي"],[64587,1,"نج"],[64588,1,"نح"],[64589,1,"نخ"],[64590,1,"نم"],[64591,1,"نى"],[64592,1,"ني"],[64593,1,"هج"],[64594,1,"هم"],[64595,1,"هى"],[64596,1,"هي"],[64597,1,"يج"],[64598,1,"يح"],[64599,1,"يخ"],[64600,1,"يم"],[64601,1,"يى"],[64602,1,"يي"],[64603,1,"ذٰ"],[64604,1,"رٰ"],[64605,1,"ىٰ"],[64606,1," ٌّ"],[64607,1," ٍّ"],[64608,1," َّ"],[64609,1," ُّ"],[64610,1," ِّ"],[64611,1," ّٰ"],[64612,1,"ئر"],[64613,1,"ئز"],[64614,1,"ئم"],[64615,1,"ئن"],[64616,1,"ئى"],[64617,1,"ئي"],[64618,1,"بر"],[64619,1,"بز"],[64620,1,"بم"],[64621,1,"بن"],[64622,1,"بى"],[64623,1,"بي"],[64624,1,"تر"],[64625,1,"تز"],[64626,1,"تم"],[64627,1,"تن"],[64628,1,"تى"],[64629,1,"تي"],[64630,1,"ثر"],[64631,1,"ثز"],[64632,1,"ثم"],[64633,1,"ثن"],[64634,1,"ثى"],[64635,1,"ثي"],[64636,1,"فى"],[64637,1,"في"],[64638,1,"قى"],[64639,1,"قي"],[64640,1,"كا"],[64641,1,"كل"],[64642,1,"كم"],[64643,1,"كى"],[64644,1,"كي"],[64645,1,"لم"],[64646,1,"لى"],[64647,1,"لي"],[64648,1,"ما"],[64649,1,"مم"],[64650,1,"نر"],[64651,1,"نز"],[64652,1,"نم"],[64653,1,"نن"],[64654,1,"نى"],[64655,1,"ني"],[64656,1,"ىٰ"],[64657,1,"ير"],[64658,1,"يز"],[64659,1,"يم"],[64660,1,"ين"],[64661,1,"يى"],[64662,1,"يي"],[64663,1,"ئج"],[64664,1,"ئح"],[64665,1,"ئخ"],[64666,1,"ئم"],[64667,1,"ئه"],[64668,1,"بج"],[64669,1,"بح"],[64670,1,"بخ"],[64671,1,"بم"],[64672,1,"به"],[64673,1,"تج"],[64674,1,"تح"],[64675,1,"تخ"],[64676,1,"تم"],[64677,1,"ته"],[64678,1,"ثم"],[64679,1,"جح"],[64680,1,"جم"],[64681,1,"حج"],[64682,1,"حم"],[64683,1,"خج"],[64684,1,"خم"],[64685,1,"سج"],[64686,1,"سح"],[64687,1,"سخ"],[64688,1,"سم"],[64689,1,"صح"],[64690,1,"صخ"],[64691,1,"صم"],[64692,1,"ضج"],[64693,1,"ضح"],[64694,1,"ضخ"],[64695,1,"ضم"],[64696,1,"طح"],[64697,1,"ظم"],[64698,1,"عج"],[64699,1,"عم"],[64700,1,"غج"],[64701,1,"غم"],[64702,1,"فج"],[64703,1,"فح"],[64704,1,"فخ"],[64705,1,"فم"],[64706,1,"قح"],[64707,1,"قم"],[64708,1,"كج"],[64709,1,"كح"],[64710,1,"كخ"],[64711,1,"كل"],[64712,1,"كم"],[64713,1,"لج"],[64714,1,"لح"],[64715,1,"لخ"],[64716,1,"لم"],[64717,1,"له"],[64718,1,"مج"],[64719,1,"مح"],[64720,1,"مخ"],[64721,1,"مم"],[64722,1,"نج"],[64723,1,"نح"],[64724,1,"نخ"],[64725,1,"نم"],[64726,1,"نه"],[64727,1,"هج"],[64728,1,"هم"],[64729,1,"هٰ"],[64730,1,"يج"],[64731,1,"يح"],[64732,1,"يخ"],[64733,1,"يم"],[64734,1,"يه"],[64735,1,"ئم"],[64736,1,"ئه"],[64737,1,"بم"],[64738,1,"به"],[64739,1,"تم"],[64740,1,"ته"],[64741,1,"ثم"],[64742,1,"ثه"],[64743,1,"سم"],[64744,1,"سه"],[64745,1,"شم"],[64746,1,"شه"],[64747,1,"كل"],[64748,1,"كم"],[64749,1,"لم"],[64750,1,"نم"],[64751,1,"نه"],[64752,1,"يم"],[64753,1,"يه"],[64754,1,"ـَّ"],[64755,1,"ـُّ"],[64756,1,"ـِّ"],[64757,1,"طى"],[64758,1,"طي"],[64759,1,"عى"],[64760,1,"عي"],[64761,1,"غى"],[64762,1,"غي"],[64763,1,"سى"],[64764,1,"سي"],[64765,1,"شى"],[64766,1,"شي"],[64767,1,"حى"],[64768,1,"حي"],[64769,1,"جى"],[64770,1,"جي"],[64771,1,"خى"],[64772,1,"خي"],[64773,1,"صى"],[64774,1,"صي"],[64775,1,"ضى"],[64776,1,"ضي"],[64777,1,"شج"],[64778,1,"شح"],[64779,1,"شخ"],[64780,1,"شم"],[64781,1,"شر"],[64782,1,"سر"],[64783,1,"صر"],[64784,1,"ضر"],[64785,1,"طى"],[64786,1,"طي"],[64787,1,"عى"],[64788,1,"عي"],[64789,1,"غى"],[64790,1,"غي"],[64791,1,"سى"],[64792,1,"سي"],[64793,1,"شى"],[64794,1,"شي"],[64795,1,"حى"],[64796,1,"حي"],[64797,1,"جى"],[64798,1,"جي"],[64799,1,"خى"],[64800,1,"خي"],[64801,1,"صى"],[64802,1,"صي"],[64803,1,"ضى"],[64804,1,"ضي"],[64805,1,"شج"],[64806,1,"شح"],[64807,1,"شخ"],[64808,1,"شم"],[64809,1,"شر"],[64810,1,"سر"],[64811,1,"صر"],[64812,1,"ضر"],[64813,1,"شج"],[64814,1,"شح"],[64815,1,"شخ"],[64816,1,"شم"],[64817,1,"سه"],[64818,1,"شه"],[64819,1,"طم"],[64820,1,"سج"],[64821,1,"سح"],[64822,1,"سخ"],[64823,1,"شج"],[64824,1,"شح"],[64825,1,"شخ"],[64826,1,"طم"],[64827,1,"ظم"],[[64828,64829],1,"اً"],[[64830,64831],2],[[64832,64847],2],[64848,1,"تجم"],[[64849,64850],1,"تحج"],[64851,1,"تحم"],[64852,1,"تخم"],[64853,1,"تمج"],[64854,1,"تمح"],[64855,1,"تمخ"],[[64856,64857],1,"جمح"],[64858,1,"حمي"],[64859,1,"حمى"],[64860,1,"سحج"],[64861,1,"سجح"],[64862,1,"سجى"],[[64863,64864],1,"سمح"],[64865,1,"سمج"],[[64866,64867],1,"سمم"],[[64868,64869],1,"صحح"],[64870,1,"صمم"],[[64871,64872],1,"شحم"],[64873,1,"شجي"],[[64874,64875],1,"شمخ"],[[64876,64877],1,"شمم"],[64878,1,"ضحى"],[[64879,64880],1,"ضخم"],[[64881,64882],1,"طمح"],[64883,1,"طمم"],[64884,1,"طمي"],[64885,1,"عجم"],[[64886,64887],1,"عمم"],[64888,1,"عمى"],[64889,1,"غمم"],[64890,1,"غمي"],[64891,1,"غمى"],[[64892,64893],1,"فخم"],[64894,1,"قمح"],[64895,1,"قمم"],[64896,1,"لحم"],[64897,1,"لحي"],[64898,1,"لحى"],[[64899,64900],1,"لجج"],[[64901,64902],1,"لخم"],[[64903,64904],1,"لمح"],[64905,1,"محج"],[64906,1,"محم"],[64907,1,"محي"],[64908,1,"مجح"],[64909,1,"مجم"],[64910,1,"مخج"],[64911,1,"مخم"],[[64912,64913],3],[64914,1,"مجخ"],[64915,1,"همج"],[64916,1,"همم"],[64917,1,"نحم"],[64918,1,"نحى"],[[64919,64920],1,"نجم"],[64921,1,"نجى"],[64922,1,"نمي"],[64923,1,"نمى"],[[64924,64925],1,"يمم"],[64926,1,"بخي"],[64927,1,"تجي"],[64928,1,"تجى"],[64929,1,"تخي"],[64930,1,"تخى"],[64931,1,"تمي"],[64932,1,"تمى"],[64933,1,"جمي"],[64934,1,"جحى"],[64935,1,"جمى"],[64936,1,"سخى"],[64937,1,"صحي"],[64938,1,"شحي"],[64939,1,"ضحي"],[64940,1,"لجي"],[64941,1,"لمي"],[64942,1,"يحي"],[64943,1,"يجي"],[64944,1,"يمي"],[64945,1,"ممي"],[64946,1,"قمي"],[64947,1,"نحي"],[64948,1,"قمح"],[64949,1,"لحم"],[64950,1,"عمي"],[64951,1,"كمي"],[64952,1,"نجح"],[64953,1,"مخي"],[64954,1,"لجم"],[64955,1,"كمم"],[64956,1,"لجم"],[64957,1,"نجح"],[64958,1,"جحي"],[64959,1,"حجي"],[64960,1,"مجي"],[64961,1,"فمي"],[64962,1,"بحي"],[64963,1,"كمم"],[64964,1,"عجم"],[64965,1,"صمم"],[64966,1,"سخي"],[64967,1,"نجي"],[[64968,64974],3],[64975,2],[[64976,65007],3],[65008,1,"صلے"],[65009,1,"قلے"],[65010,1,"الله"],[65011,1,"اكبر"],[65012,1,"محمد"],[65013,1,"صلعم"],[65014,1,"رسول"],[65015,1,"عليه"],[65016,1,"وسلم"],[65017,1,"صلى"],[65018,1,"صلى الله عليه وسلم"],[65019,1,"جل جلاله"],[65020,1,"ریال"],[65021,2],[[65022,65023],2],[[65024,65039],7],[65040,1,","],[65041,1,"、"],[65042,3],[65043,1,":"],[65044,1,";"],[65045,1,"!"],[65046,1,"?"],[65047,1,"〖"],[65048,1,"〗"],[65049,3],[[65050,65055],3],[[65056,65059],2],[[65060,65062],2],[[65063,65069],2],[[65070,65071],2],[65072,3],[65073,1,"—"],[65074,1,"–"],[[65075,65076],1,"_"],[65077,1,"("],[65078,1,")"],[65079,1,"{"],[65080,1,"}"],[65081,1,"〔"],[65082,1,"〕"],[65083,1,"【"],[65084,1,"】"],[65085,1,"《"],[65086,1,"》"],[65087,1,"〈"],[65088,1,"〉"],[65089,1,"「"],[65090,1,"」"],[65091,1,"『"],[65092,1,"』"],[[65093,65094],2],[65095,1,"["],[65096,1,"]"],[[65097,65100],1," ̅"],[[65101,65103],1,"_"],[65104,1,","],[65105,1,"、"],[65106,3],[65107,3],[65108,1,";"],[65109,1,":"],[65110,1,"?"],[65111,1,"!"],[65112,1,"—"],[65113,1,"("],[65114,1,")"],[65115,1,"{"],[65116,1,"}"],[65117,1,"〔"],[65118,1,"〕"],[65119,1,"#"],[65120,1,"&"],[65121,1,"*"],[65122,1,"+"],[65123,1,"-"],[65124,1,"<"],[65125,1,">"],[65126,1,"="],[65127,3],[65128,1,"\\"],[65129,1,"$"],[65130,1,"%"],[65131,1,"@"],[[65132,65135],3],[65136,1," ً"],[65137,1,"ـً"],[65138,1," ٌ"],[65139,2],[65140,1," ٍ"],[65141,3],[65142,1," َ"],[65143,1,"ـَ"],[65144,1," ُ"],[65145,1,"ـُ"],[65146,1," ِ"],[65147,1,"ـِ"],[65148,1," ّ"],[65149,1,"ـّ"],[65150,1," ْ"],[65151,1,"ـْ"],[65152,1,"ء"],[[65153,65154],1,"آ"],[[65155,65156],1,"أ"],[[65157,65158],1,"ؤ"],[[65159,65160],1,"إ"],[[65161,65164],1,"ئ"],[[65165,65166],1,"ا"],[[65167,65170],1,"ب"],[[65171,65172],1,"ة"],[[65173,65176],1,"ت"],[[65177,65180],1,"ث"],[[65181,65184],1,"ج"],[[65185,65188],1,"ح"],[[65189,65192],1,"خ"],[[65193,65194],1,"د"],[[65195,65196],1,"ذ"],[[65197,65198],1,"ر"],[[65199,65200],1,"ز"],[[65201,65204],1,"س"],[[65205,65208],1,"ش"],[[65209,65212],1,"ص"],[[65213,65216],1,"ض"],[[65217,65220],1,"ط"],[[65221,65224],1,"ظ"],[[65225,65228],1,"ع"],[[65229,65232],1,"غ"],[[65233,65236],1,"ف"],[[65237,65240],1,"ق"],[[65241,65244],1,"ك"],[[65245,65248],1,"ل"],[[65249,65252],1,"م"],[[65253,65256],1,"ن"],[[65257,65260],1,"ه"],[[65261,65262],1,"و"],[[65263,65264],1,"ى"],[[65265,65268],1,"ي"],[[65269,65270],1,"لآ"],[[65271,65272],1,"لأ"],[[65273,65274],1,"لإ"],[[65275,65276],1,"لا"],[[65277,65278],3],[65279,7],[65280,3],[65281,1,"!"],[65282,1,'"'],[65283,1,"#"],[65284,1,"$"],[65285,1,"%"],[65286,1,"&"],[65287,1,"'"],[65288,1,"("],[65289,1,")"],[65290,1,"*"],[65291,1,"+"],[65292,1,","],[65293,1,"-"],[65294,1,"."],[65295,1,"/"],[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,1,":"],[65307,1,";"],[65308,1,"<"],[65309,1,"="],[65310,1,">"],[65311,1,"?"],[65312,1,"@"],[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,1,"["],[65340,1,"\\"],[65341,1,"]"],[65342,1,"^"],[65343,1,"_"],[65344,1,"`"],[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,1,"{"],[65372,1,"|"],[65373,1,"}"],[65374,1,"~"],[65375,1,"⦅"],[65376,1,"⦆"],[65377,1,"."],[65378,1,"「"],[65379,1,"」"],[65380,1,"、"],[65381,1,"・"],[65382,1,"ヲ"],[65383,1,"ァ"],[65384,1,"ィ"],[65385,1,"ゥ"],[65386,1,"ェ"],[65387,1,"ォ"],[65388,1,"ャ"],[65389,1,"ュ"],[65390,1,"ョ"],[65391,1,"ッ"],[65392,1,"ー"],[65393,1,"ア"],[65394,1,"イ"],[65395,1,"ウ"],[65396,1,"エ"],[65397,1,"オ"],[65398,1,"カ"],[65399,1,"キ"],[65400,1,"ク"],[65401,1,"ケ"],[65402,1,"コ"],[65403,1,"サ"],[65404,1,"シ"],[65405,1,"ス"],[65406,1,"セ"],[65407,1,"ソ"],[65408,1,"タ"],[65409,1,"チ"],[65410,1,"ツ"],[65411,1,"テ"],[65412,1,"ト"],[65413,1,"ナ"],[65414,1,"ニ"],[65415,1,"ヌ"],[65416,1,"ネ"],[65417,1,"ノ"],[65418,1,"ハ"],[65419,1,"ヒ"],[65420,1,"フ"],[65421,1,"ヘ"],[65422,1,"ホ"],[65423,1,"マ"],[65424,1,"ミ"],[65425,1,"ム"],[65426,1,"メ"],[65427,1,"モ"],[65428,1,"ヤ"],[65429,1,"ユ"],[65430,1,"ヨ"],[65431,1,"ラ"],[65432,1,"リ"],[65433,1,"ル"],[65434,1,"レ"],[65435,1,"ロ"],[65436,1,"ワ"],[65437,1,"ン"],[65438,1,"゙"],[65439,1,"゚"],[65440,7],[65441,1,"ᄀ"],[65442,1,"ᄁ"],[65443,1,"ᆪ"],[65444,1,"ᄂ"],[65445,1,"ᆬ"],[65446,1,"ᆭ"],[65447,1,"ᄃ"],[65448,1,"ᄄ"],[65449,1,"ᄅ"],[65450,1,"ᆰ"],[65451,1,"ᆱ"],[65452,1,"ᆲ"],[65453,1,"ᆳ"],[65454,1,"ᆴ"],[65455,1,"ᆵ"],[65456,1,"ᄚ"],[65457,1,"ᄆ"],[65458,1,"ᄇ"],[65459,1,"ᄈ"],[65460,1,"ᄡ"],[65461,1,"ᄉ"],[65462,1,"ᄊ"],[65463,1,"ᄋ"],[65464,1,"ᄌ"],[65465,1,"ᄍ"],[65466,1,"ᄎ"],[65467,1,"ᄏ"],[65468,1,"ᄐ"],[65469,1,"ᄑ"],[65470,1,"ᄒ"],[[65471,65473],3],[65474,1,"ᅡ"],[65475,1,"ᅢ"],[65476,1,"ᅣ"],[65477,1,"ᅤ"],[65478,1,"ᅥ"],[65479,1,"ᅦ"],[[65480,65481],3],[65482,1,"ᅧ"],[65483,1,"ᅨ"],[65484,1,"ᅩ"],[65485,1,"ᅪ"],[65486,1,"ᅫ"],[65487,1,"ᅬ"],[[65488,65489],3],[65490,1,"ᅭ"],[65491,1,"ᅮ"],[65492,1,"ᅯ"],[65493,1,"ᅰ"],[65494,1,"ᅱ"],[65495,1,"ᅲ"],[[65496,65497],3],[65498,1,"ᅳ"],[65499,1,"ᅴ"],[65500,1,"ᅵ"],[[65501,65503],3],[65504,1,"\xa2"],[65505,1,"\xa3"],[65506,1,"\xac"],[65507,1," ̄"],[65508,1,"\xa6"],[65509,1,"\xa5"],[65510,1,"₩"],[65511,3],[65512,1,"│"],[65513,1,"←"],[65514,1,"↑"],[65515,1,"→"],[65516,1,"↓"],[65517,1,"■"],[65518,1,"○"],[[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,"\uD801\uDC28"],[66561,1,"\uD801\uDC29"],[66562,1,"\uD801\uDC2A"],[66563,1,"\uD801\uDC2B"],[66564,1,"\uD801\uDC2C"],[66565,1,"\uD801\uDC2D"],[66566,1,"\uD801\uDC2E"],[66567,1,"\uD801\uDC2F"],[66568,1,"\uD801\uDC30"],[66569,1,"\uD801\uDC31"],[66570,1,"\uD801\uDC32"],[66571,1,"\uD801\uDC33"],[66572,1,"\uD801\uDC34"],[66573,1,"\uD801\uDC35"],[66574,1,"\uD801\uDC36"],[66575,1,"\uD801\uDC37"],[66576,1,"\uD801\uDC38"],[66577,1,"\uD801\uDC39"],[66578,1,"\uD801\uDC3A"],[66579,1,"\uD801\uDC3B"],[66580,1,"\uD801\uDC3C"],[66581,1,"\uD801\uDC3D"],[66582,1,"\uD801\uDC3E"],[66583,1,"\uD801\uDC3F"],[66584,1,"\uD801\uDC40"],[66585,1,"\uD801\uDC41"],[66586,1,"\uD801\uDC42"],[66587,1,"\uD801\uDC43"],[66588,1,"\uD801\uDC44"],[66589,1,"\uD801\uDC45"],[66590,1,"\uD801\uDC46"],[66591,1,"\uD801\uDC47"],[66592,1,"\uD801\uDC48"],[66593,1,"\uD801\uDC49"],[66594,1,"\uD801\uDC4A"],[66595,1,"\uD801\uDC4B"],[66596,1,"\uD801\uDC4C"],[66597,1,"\uD801\uDC4D"],[66598,1,"\uD801\uDC4E"],[66599,1,"\uD801\uDC4F"],[[66600,66637],2],[[66638,66717],2],[[66718,66719],3],[[66720,66729],2],[[66730,66735],3],[66736,1,"\uD801\uDCD8"],[66737,1,"\uD801\uDCD9"],[66738,1,"\uD801\uDCDA"],[66739,1,"\uD801\uDCDB"],[66740,1,"\uD801\uDCDC"],[66741,1,"\uD801\uDCDD"],[66742,1,"\uD801\uDCDE"],[66743,1,"\uD801\uDCDF"],[66744,1,"\uD801\uDCE0"],[66745,1,"\uD801\uDCE1"],[66746,1,"\uD801\uDCE2"],[66747,1,"\uD801\uDCE3"],[66748,1,"\uD801\uDCE4"],[66749,1,"\uD801\uDCE5"],[66750,1,"\uD801\uDCE6"],[66751,1,"\uD801\uDCE7"],[66752,1,"\uD801\uDCE8"],[66753,1,"\uD801\uDCE9"],[66754,1,"\uD801\uDCEA"],[66755,1,"\uD801\uDCEB"],[66756,1,"\uD801\uDCEC"],[66757,1,"\uD801\uDCED"],[66758,1,"\uD801\uDCEE"],[66759,1,"\uD801\uDCEF"],[66760,1,"\uD801\uDCF0"],[66761,1,"\uD801\uDCF1"],[66762,1,"\uD801\uDCF2"],[66763,1,"\uD801\uDCF3"],[66764,1,"\uD801\uDCF4"],[66765,1,"\uD801\uDCF5"],[66766,1,"\uD801\uDCF6"],[66767,1,"\uD801\uDCF7"],[66768,1,"\uD801\uDCF8"],[66769,1,"\uD801\uDCF9"],[66770,1,"\uD801\uDCFA"],[66771,1,"\uD801\uDCFB"],[[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,"\uD801\uDD97"],[66929,1,"\uD801\uDD98"],[66930,1,"\uD801\uDD99"],[66931,1,"\uD801\uDD9A"],[66932,1,"\uD801\uDD9B"],[66933,1,"\uD801\uDD9C"],[66934,1,"\uD801\uDD9D"],[66935,1,"\uD801\uDD9E"],[66936,1,"\uD801\uDD9F"],[66937,1,"\uD801\uDDA0"],[66938,1,"\uD801\uDDA1"],[66939,3],[66940,1,"\uD801\uDDA3"],[66941,1,"\uD801\uDDA4"],[66942,1,"\uD801\uDDA5"],[66943,1,"\uD801\uDDA6"],[66944,1,"\uD801\uDDA7"],[66945,1,"\uD801\uDDA8"],[66946,1,"\uD801\uDDA9"],[66947,1,"\uD801\uDDAA"],[66948,1,"\uD801\uDDAB"],[66949,1,"\uD801\uDDAC"],[66950,1,"\uD801\uDDAD"],[66951,1,"\uD801\uDDAE"],[66952,1,"\uD801\uDDAF"],[66953,1,"\uD801\uDDB0"],[66954,1,"\uD801\uDDB1"],[66955,3],[66956,1,"\uD801\uDDB3"],[66957,1,"\uD801\uDDB4"],[66958,1,"\uD801\uDDB5"],[66959,1,"\uD801\uDDB6"],[66960,1,"\uD801\uDDB7"],[66961,1,"\uD801\uDDB8"],[66962,1,"\uD801\uDDB9"],[66963,3],[66964,1,"\uD801\uDDBB"],[66965,1,"\uD801\uDDBC"],[66966,3],[[66967,66977],2],[66978,3],[[66979,66993],2],[66994,3],[[66995,67001],2],[67002,3],[[67003,67004],2],[[67005,67007],3],[[67008,67059],2],[[67060,67071],3],[[67072,67382],2],[[67383,67391],3],[[67392,67413],2],[[67414,67423],3],[[67424,67431],2],[[67432,67455],3],[67456,2],[67457,1,"ː"],[67458,1,"ˑ"],[67459,1,"\xe6"],[67460,1,"ʙ"],[67461,1,"ɓ"],[67462,3],[67463,1,"ʣ"],[67464,1,"ꭦ"],[67465,1,"ʥ"],[67466,1,"ʤ"],[67467,1,"ɖ"],[67468,1,"ɗ"],[67469,1,"ᶑ"],[67470,1,"ɘ"],[67471,1,"ɞ"],[67472,1,"ʩ"],[67473,1,"ɤ"],[67474,1,"ɢ"],[67475,1,"ɠ"],[67476,1,"ʛ"],[67477,1,"ħ"],[67478,1,"ʜ"],[67479,1,"ɧ"],[67480,1,"ʄ"],[67481,1,"ʪ"],[67482,1,"ʫ"],[67483,1,"ɬ"],[67484,1,"\uD837\uDF04"],[67485,1,"ꞎ"],[67486,1,"ɮ"],[67487,1,"\uD837\uDF05"],[67488,1,"ʎ"],[67489,1,"\uD837\uDF06"],[67490,1,"\xf8"],[67491,1,"ɶ"],[67492,1,"ɷ"],[67493,1,"q"],[67494,1,"ɺ"],[67495,1,"\uD837\uDF08"],[67496,1,"ɽ"],[67497,1,"ɾ"],[67498,1,"ʀ"],[67499,1,"ʨ"],[67500,1,"ʦ"],[67501,1,"ꭧ"],[67502,1,"ʧ"],[67503,1,"ʈ"],[67504,1,"ⱱ"],[67505,3],[67506,1,"ʏ"],[67507,1,"ʡ"],[67508,1,"ʢ"],[67509,1,"ʘ"],[67510,1,"ǀ"],[67511,1,"ǁ"],[67512,1,"ǂ"],[67513,1,"\uD837\uDF0A"],[67514,1,"\uD837\uDF1E"],[[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,"\uD803\uDCC0"],[68737,1,"\uD803\uDCC1"],[68738,1,"\uD803\uDCC2"],[68739,1,"\uD803\uDCC3"],[68740,1,"\uD803\uDCC4"],[68741,1,"\uD803\uDCC5"],[68742,1,"\uD803\uDCC6"],[68743,1,"\uD803\uDCC7"],[68744,1,"\uD803\uDCC8"],[68745,1,"\uD803\uDCC9"],[68746,1,"\uD803\uDCCA"],[68747,1,"\uD803\uDCCB"],[68748,1,"\uD803\uDCCC"],[68749,1,"\uD803\uDCCD"],[68750,1,"\uD803\uDCCE"],[68751,1,"\uD803\uDCCF"],[68752,1,"\uD803\uDCD0"],[68753,1,"\uD803\uDCD1"],[68754,1,"\uD803\uDCD2"],[68755,1,"\uD803\uDCD3"],[68756,1,"\uD803\uDCD4"],[68757,1,"\uD803\uDCD5"],[68758,1,"\uD803\uDCD6"],[68759,1,"\uD803\uDCD7"],[68760,1,"\uD803\uDCD8"],[68761,1,"\uD803\uDCD9"],[68762,1,"\uD803\uDCDA"],[68763,1,"\uD803\uDCDB"],[68764,1,"\uD803\uDCDC"],[68765,1,"\uD803\uDCDD"],[68766,1,"\uD803\uDCDE"],[68767,1,"\uD803\uDCDF"],[68768,1,"\uD803\uDCE0"],[68769,1,"\uD803\uDCE1"],[68770,1,"\uD803\uDCE2"],[68771,1,"\uD803\uDCE3"],[68772,1,"\uD803\uDCE4"],[68773,1,"\uD803\uDCE5"],[68774,1,"\uD803\uDCE6"],[68775,1,"\uD803\uDCE7"],[68776,1,"\uD803\uDCE8"],[68777,1,"\uD803\uDCE9"],[68778,1,"\uD803\uDCEA"],[68779,1,"\uD803\uDCEB"],[68780,1,"\uD803\uDCEC"],[68781,1,"\uD803\uDCED"],[68782,1,"\uD803\uDCEE"],[68783,1,"\uD803\uDCEF"],[68784,1,"\uD803\uDCF0"],[68785,1,"\uD803\uDCF1"],[68786,1,"\uD803\uDCF2"],[[68787,68799],3],[[68800,68850],2],[[68851,68857],3],[[68858,68863],2],[[68864,68903],2],[[68904,68911],3],[[68912,68921],2],[[68922,68927],3],[[68928,68943],2],[68944,1,"\uD803\uDD70"],[68945,1,"\uD803\uDD71"],[68946,1,"\uD803\uDD72"],[68947,1,"\uD803\uDD73"],[68948,1,"\uD803\uDD74"],[68949,1,"\uD803\uDD75"],[68950,1,"\uD803\uDD76"],[68951,1,"\uD803\uDD77"],[68952,1,"\uD803\uDD78"],[68953,1,"\uD803\uDD79"],[68954,1,"\uD803\uDD7A"],[68955,1,"\uD803\uDD7B"],[68956,1,"\uD803\uDD7C"],[68957,1,"\uD803\uDD7D"],[68958,1,"\uD803\uDD7E"],[68959,1,"\uD803\uDD7F"],[68960,1,"\uD803\uDD80"],[68961,1,"\uD803\uDD81"],[68962,1,"\uD803\uDD82"],[68963,1,"\uD803\uDD83"],[68964,1,"\uD803\uDD84"],[68965,1,"\uD803\uDD85"],[[68966,68968],3],[[68969,68973],2],[68974,2],[[68975,68997],2],[[68998,69005],3],[[69006,69007],2],[[69008,69215],3],[[69216,69246],2],[69247,3],[[69248,69289],2],[69290,3],[[69291,69292],2],[69293,2],[[69294,69295],3],[[69296,69297],2],[[69298,69313],3],[[69314,69316],2],[[69317,69371],3],[69372,2],[[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,70527],3],[[70528,70537],2],[70538,3],[70539,2],[[70540,70541],3],[70542,2],[70543,3],[[70544,70581],2],[70582,3],[[70583,70592],2],[70593,3],[70594,2],[[70595,70596],3],[70597,2],[70598,3],[[70599,70602],2],[70603,3],[[70604,70611],2],[[70612,70613],2],[70614,3],[[70615,70616],2],[[70617,70624],3],[[70625,70626],2],[[70627,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,71375],3],[[71376,71395],2],[[71396,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,"\uD806\uDCC0"],[71841,1,"\uD806\uDCC1"],[71842,1,"\uD806\uDCC2"],[71843,1,"\uD806\uDCC3"],[71844,1,"\uD806\uDCC4"],[71845,1,"\uD806\uDCC5"],[71846,1,"\uD806\uDCC6"],[71847,1,"\uD806\uDCC7"],[71848,1,"\uD806\uDCC8"],[71849,1,"\uD806\uDCC9"],[71850,1,"\uD806\uDCCA"],[71851,1,"\uD806\uDCCB"],[71852,1,"\uD806\uDCCC"],[71853,1,"\uD806\uDCCD"],[71854,1,"\uD806\uDCCE"],[71855,1,"\uD806\uDCCF"],[71856,1,"\uD806\uDCD0"],[71857,1,"\uD806\uDCD1"],[71858,1,"\uD806\uDCD2"],[71859,1,"\uD806\uDCD3"],[71860,1,"\uD806\uDCD4"],[71861,1,"\uD806\uDCD5"],[71862,1,"\uD806\uDCD6"],[71863,1,"\uD806\uDCD7"],[71864,1,"\uD806\uDCD8"],[71865,1,"\uD806\uDCD9"],[71866,1,"\uD806\uDCDA"],[71867,1,"\uD806\uDCDB"],[71868,1,"\uD806\uDCDC"],[71869,1,"\uD806\uDCDD"],[71870,1,"\uD806\uDCDE"],[71871,1,"\uD806\uDCDF"],[[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,72639],3],[[72640,72672],2],[72673,2],[[72674,72687],3],[[72688,72697],2],[[72698,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,2],[[73563,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,78943],3],[[78944,82938],2],[[82939,82943],3],[[82944,83526],2],[[83527,90367],3],[[90368,90425],2],[[90426,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,93503],3],[[93504,93548],2],[[93549,93551],2],[[93552,93561],2],[[93562,93759],3],[93760,1,"\uD81B\uDE60"],[93761,1,"\uD81B\uDE61"],[93762,1,"\uD81B\uDE62"],[93763,1,"\uD81B\uDE63"],[93764,1,"\uD81B\uDE64"],[93765,1,"\uD81B\uDE65"],[93766,1,"\uD81B\uDE66"],[93767,1,"\uD81B\uDE67"],[93768,1,"\uD81B\uDE68"],[93769,1,"\uD81B\uDE69"],[93770,1,"\uD81B\uDE6A"],[93771,1,"\uD81B\uDE6B"],[93772,1,"\uD81B\uDE6C"],[93773,1,"\uD81B\uDE6D"],[93774,1,"\uD81B\uDE6E"],[93775,1,"\uD81B\uDE6F"],[93776,1,"\uD81B\uDE70"],[93777,1,"\uD81B\uDE71"],[93778,1,"\uD81B\uDE72"],[93779,1,"\uD81B\uDE73"],[93780,1,"\uD81B\uDE74"],[93781,1,"\uD81B\uDE75"],[93782,1,"\uD81B\uDE76"],[93783,1,"\uD81B\uDE77"],[93784,1,"\uD81B\uDE78"],[93785,1,"\uD81B\uDE79"],[93786,1,"\uD81B\uDE7A"],[93787,1,"\uD81B\uDE7B"],[93788,1,"\uD81B\uDE7C"],[93789,1,"\uD81B\uDE7D"],[93790,1,"\uD81B\uDE7E"],[93791,1,"\uD81B\uDE7F"],[[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,101630],3],[101631,2],[[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,117759],3],[[117760,117973],2],[117974,1,"a"],[117975,1,"b"],[117976,1,"c"],[117977,1,"d"],[117978,1,"e"],[117979,1,"f"],[117980,1,"g"],[117981,1,"h"],[117982,1,"i"],[117983,1,"j"],[117984,1,"k"],[117985,1,"l"],[117986,1,"m"],[117987,1,"n"],[117988,1,"o"],[117989,1,"p"],[117990,1,"q"],[117991,1,"r"],[117992,1,"s"],[117993,1,"t"],[117994,1,"u"],[117995,1,"v"],[117996,1,"w"],[117997,1,"x"],[117998,1,"y"],[117999,1,"z"],[118e3,1,"0"],[118001,1,"1"],[118002,1,"2"],[118003,1,"3"],[118004,1,"4"],[118005,1,"5"],[118006,1,"6"],[118007,1,"7"],[118008,1,"8"],[118009,1,"9"],[[118010,118015],3],[[118016,118451],2],[[118452,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,"\uD834\uDD57\uD834\uDD65"],[119135,1,"\uD834\uDD58\uD834\uDD65"],[119136,1,"\uD834\uDD58\uD834\uDD65\uD834\uDD6E"],[119137,1,"\uD834\uDD58\uD834\uDD65\uD834\uDD6F"],[119138,1,"\uD834\uDD58\uD834\uDD65\uD834\uDD70"],[119139,1,"\uD834\uDD58\uD834\uDD65\uD834\uDD71"],[119140,1,"\uD834\uDD58\uD834\uDD65\uD834\uDD72"],[[119141,119154],2],[[119155,119162],7],[[119163,119226],2],[119227,1,"\uD834\uDDB9\uD834\uDD65"],[119228,1,"\uD834\uDDBA\uD834\uDD65"],[119229,1,"\uD834\uDDB9\uD834\uDD65\uD834\uDD6E"],[119230,1,"\uD834\uDDBA\uD834\uDD65\uD834\uDD6E"],[119231,1,"\uD834\uDDB9\uD834\uDD65\uD834\uDD6F"],[119232,1,"\uD834\uDDBA\uD834\uDD65\uD834\uDD6F"],[[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,"ı"],[120485,1,"ȷ"],[[120486,120487],3],[120488,1,"α"],[120489,1,"β"],[120490,1,"γ"],[120491,1,"δ"],[120492,1,"ε"],[120493,1,"ζ"],[120494,1,"η"],[120495,1,"θ"],[120496,1,"ι"],[120497,1,"κ"],[120498,1,"λ"],[120499,1,"μ"],[120500,1,"ν"],[120501,1,"ξ"],[120502,1,"ο"],[120503,1,"π"],[120504,1,"ρ"],[120505,1,"θ"],[120506,1,"σ"],[120507,1,"τ"],[120508,1,"υ"],[120509,1,"φ"],[120510,1,"χ"],[120511,1,"ψ"],[120512,1,"ω"],[120513,1,"∇"],[120514,1,"α"],[120515,1,"β"],[120516,1,"γ"],[120517,1,"δ"],[120518,1,"ε"],[120519,1,"ζ"],[120520,1,"η"],[120521,1,"θ"],[120522,1,"ι"],[120523,1,"κ"],[120524,1,"λ"],[120525,1,"μ"],[120526,1,"ν"],[120527,1,"ξ"],[120528,1,"ο"],[120529,1,"π"],[120530,1,"ρ"],[[120531,120532],1,"σ"],[120533,1,"τ"],[120534,1,"υ"],[120535,1,"φ"],[120536,1,"χ"],[120537,1,"ψ"],[120538,1,"ω"],[120539,1,"∂"],[120540,1,"ε"],[120541,1,"θ"],[120542,1,"κ"],[120543,1,"φ"],[120544,1,"ρ"],[120545,1,"π"],[120546,1,"α"],[120547,1,"β"],[120548,1,"γ"],[120549,1,"δ"],[120550,1,"ε"],[120551,1,"ζ"],[120552,1,"η"],[120553,1,"θ"],[120554,1,"ι"],[120555,1,"κ"],[120556,1,"λ"],[120557,1,"μ"],[120558,1,"ν"],[120559,1,"ξ"],[120560,1,"ο"],[120561,1,"π"],[120562,1,"ρ"],[120563,1,"θ"],[120564,1,"σ"],[120565,1,"τ"],[120566,1,"υ"],[120567,1,"φ"],[120568,1,"χ"],[120569,1,"ψ"],[120570,1,"ω"],[120571,1,"∇"],[120572,1,"α"],[120573,1,"β"],[120574,1,"γ"],[120575,1,"δ"],[120576,1,"ε"],[120577,1,"ζ"],[120578,1,"η"],[120579,1,"θ"],[120580,1,"ι"],[120581,1,"κ"],[120582,1,"λ"],[120583,1,"μ"],[120584,1,"ν"],[120585,1,"ξ"],[120586,1,"ο"],[120587,1,"π"],[120588,1,"ρ"],[[120589,120590],1,"σ"],[120591,1,"τ"],[120592,1,"υ"],[120593,1,"φ"],[120594,1,"χ"],[120595,1,"ψ"],[120596,1,"ω"],[120597,1,"∂"],[120598,1,"ε"],[120599,1,"θ"],[120600,1,"κ"],[120601,1,"φ"],[120602,1,"ρ"],[120603,1,"π"],[120604,1,"α"],[120605,1,"β"],[120606,1,"γ"],[120607,1,"δ"],[120608,1,"ε"],[120609,1,"ζ"],[120610,1,"η"],[120611,1,"θ"],[120612,1,"ι"],[120613,1,"κ"],[120614,1,"λ"],[120615,1,"μ"],[120616,1,"ν"],[120617,1,"ξ"],[120618,1,"ο"],[120619,1,"π"],[120620,1,"ρ"],[120621,1,"θ"],[120622,1,"σ"],[120623,1,"τ"],[120624,1,"υ"],[120625,1,"φ"],[120626,1,"χ"],[120627,1,"ψ"],[120628,1,"ω"],[120629,1,"∇"],[120630,1,"α"],[120631,1,"β"],[120632,1,"γ"],[120633,1,"δ"],[120634,1,"ε"],[120635,1,"ζ"],[120636,1,"η"],[120637,1,"θ"],[120638,1,"ι"],[120639,1,"κ"],[120640,1,"λ"],[120641,1,"μ"],[120642,1,"ν"],[120643,1,"ξ"],[120644,1,"ο"],[120645,1,"π"],[120646,1,"ρ"],[[120647,120648],1,"σ"],[120649,1,"τ"],[120650,1,"υ"],[120651,1,"φ"],[120652,1,"χ"],[120653,1,"ψ"],[120654,1,"ω"],[120655,1,"∂"],[120656,1,"ε"],[120657,1,"θ"],[120658,1,"κ"],[120659,1,"φ"],[120660,1,"ρ"],[120661,1,"π"],[120662,1,"α"],[120663,1,"β"],[120664,1,"γ"],[120665,1,"δ"],[120666,1,"ε"],[120667,1,"ζ"],[120668,1,"η"],[120669,1,"θ"],[120670,1,"ι"],[120671,1,"κ"],[120672,1,"λ"],[120673,1,"μ"],[120674,1,"ν"],[120675,1,"ξ"],[120676,1,"ο"],[120677,1,"π"],[120678,1,"ρ"],[120679,1,"θ"],[120680,1,"σ"],[120681,1,"τ"],[120682,1,"υ"],[120683,1,"φ"],[120684,1,"χ"],[120685,1,"ψ"],[120686,1,"ω"],[120687,1,"∇"],[120688,1,"α"],[120689,1,"β"],[120690,1,"γ"],[120691,1,"δ"],[120692,1,"ε"],[120693,1,"ζ"],[120694,1,"η"],[120695,1,"θ"],[120696,1,"ι"],[120697,1,"κ"],[120698,1,"λ"],[120699,1,"μ"],[120700,1,"ν"],[120701,1,"ξ"],[120702,1,"ο"],[120703,1,"π"],[120704,1,"ρ"],[[120705,120706],1,"σ"],[120707,1,"τ"],[120708,1,"υ"],[120709,1,"φ"],[120710,1,"χ"],[120711,1,"ψ"],[120712,1,"ω"],[120713,1,"∂"],[120714,1,"ε"],[120715,1,"θ"],[120716,1,"κ"],[120717,1,"φ"],[120718,1,"ρ"],[120719,1,"π"],[120720,1,"α"],[120721,1,"β"],[120722,1,"γ"],[120723,1,"δ"],[120724,1,"ε"],[120725,1,"ζ"],[120726,1,"η"],[120727,1,"θ"],[120728,1,"ι"],[120729,1,"κ"],[120730,1,"λ"],[120731,1,"μ"],[120732,1,"ν"],[120733,1,"ξ"],[120734,1,"ο"],[120735,1,"π"],[120736,1,"ρ"],[120737,1,"θ"],[120738,1,"σ"],[120739,1,"τ"],[120740,1,"υ"],[120741,1,"φ"],[120742,1,"χ"],[120743,1,"ψ"],[120744,1,"ω"],[120745,1,"∇"],[120746,1,"α"],[120747,1,"β"],[120748,1,"γ"],[120749,1,"δ"],[120750,1,"ε"],[120751,1,"ζ"],[120752,1,"η"],[120753,1,"θ"],[120754,1,"ι"],[120755,1,"κ"],[120756,1,"λ"],[120757,1,"μ"],[120758,1,"ν"],[120759,1,"ξ"],[120760,1,"ο"],[120761,1,"π"],[120762,1,"ρ"],[[120763,120764],1,"σ"],[120765,1,"τ"],[120766,1,"υ"],[120767,1,"φ"],[120768,1,"χ"],[120769,1,"ψ"],[120770,1,"ω"],[120771,1,"∂"],[120772,1,"ε"],[120773,1,"θ"],[120774,1,"κ"],[120775,1,"φ"],[120776,1,"ρ"],[120777,1,"π"],[[120778,120779],1,"ϝ"],[[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,"а"],[122929,1,"б"],[122930,1,"в"],[122931,1,"г"],[122932,1,"д"],[122933,1,"е"],[122934,1,"ж"],[122935,1,"з"],[122936,1,"и"],[122937,1,"к"],[122938,1,"л"],[122939,1,"м"],[122940,1,"о"],[122941,1,"п"],[122942,1,"р"],[122943,1,"с"],[122944,1,"т"],[122945,1,"у"],[122946,1,"ф"],[122947,1,"х"],[122948,1,"ц"],[122949,1,"ч"],[122950,1,"ш"],[122951,1,"ы"],[122952,1,"э"],[122953,1,"ю"],[122954,1,"ꚉ"],[122955,1,"ә"],[122956,1,"і"],[122957,1,"ј"],[122958,1,"ө"],[122959,1,"ү"],[122960,1,"ӏ"],[122961,1,"а"],[122962,1,"б"],[122963,1,"в"],[122964,1,"г"],[122965,1,"д"],[122966,1,"е"],[122967,1,"ж"],[122968,1,"з"],[122969,1,"и"],[122970,1,"к"],[122971,1,"л"],[122972,1,"о"],[122973,1,"п"],[122974,1,"с"],[122975,1,"у"],[122976,1,"ф"],[122977,1,"х"],[122978,1,"ц"],[122979,1,"ч"],[122980,1,"ш"],[122981,1,"ъ"],[122982,1,"ы"],[122983,1,"ґ"],[122984,1,"і"],[122985,1,"ѕ"],[122986,1,"џ"],[122987,1,"ҫ"],[122988,1,"ꙑ"],[122989,1,"ұ"],[[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,124367],3],[[124368,124410],2],[[124411,124414],3],[124415,2],[[124416,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,"\uD83A\uDD22"],[125185,1,"\uD83A\uDD23"],[125186,1,"\uD83A\uDD24"],[125187,1,"\uD83A\uDD25"],[125188,1,"\uD83A\uDD26"],[125189,1,"\uD83A\uDD27"],[125190,1,"\uD83A\uDD28"],[125191,1,"\uD83A\uDD29"],[125192,1,"\uD83A\uDD2A"],[125193,1,"\uD83A\uDD2B"],[125194,1,"\uD83A\uDD2C"],[125195,1,"\uD83A\uDD2D"],[125196,1,"\uD83A\uDD2E"],[125197,1,"\uD83A\uDD2F"],[125198,1,"\uD83A\uDD30"],[125199,1,"\uD83A\uDD31"],[125200,1,"\uD83A\uDD32"],[125201,1,"\uD83A\uDD33"],[125202,1,"\uD83A\uDD34"],[125203,1,"\uD83A\uDD35"],[125204,1,"\uD83A\uDD36"],[125205,1,"\uD83A\uDD37"],[125206,1,"\uD83A\uDD38"],[125207,1,"\uD83A\uDD39"],[125208,1,"\uD83A\uDD3A"],[125209,1,"\uD83A\uDD3B"],[125210,1,"\uD83A\uDD3C"],[125211,1,"\uD83A\uDD3D"],[125212,1,"\uD83A\uDD3E"],[125213,1,"\uD83A\uDD3F"],[125214,1,"\uD83A\uDD40"],[125215,1,"\uD83A\uDD41"],[125216,1,"\uD83A\uDD42"],[125217,1,"\uD83A\uDD43"],[[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,"ا"],[126465,1,"ب"],[126466,1,"ج"],[126467,1,"د"],[126468,3],[126469,1,"و"],[126470,1,"ز"],[126471,1,"ح"],[126472,1,"ط"],[126473,1,"ي"],[126474,1,"ك"],[126475,1,"ل"],[126476,1,"م"],[126477,1,"ن"],[126478,1,"س"],[126479,1,"ع"],[126480,1,"ف"],[126481,1,"ص"],[126482,1,"ق"],[126483,1,"ر"],[126484,1,"ش"],[126485,1,"ت"],[126486,1,"ث"],[126487,1,"خ"],[126488,1,"ذ"],[126489,1,"ض"],[126490,1,"ظ"],[126491,1,"غ"],[126492,1,"ٮ"],[126493,1,"ں"],[126494,1,"ڡ"],[126495,1,"ٯ"],[126496,3],[126497,1,"ب"],[126498,1,"ج"],[126499,3],[126500,1,"ه"],[[126501,126502],3],[126503,1,"ح"],[126504,3],[126505,1,"ي"],[126506,1,"ك"],[126507,1,"ل"],[126508,1,"م"],[126509,1,"ن"],[126510,1,"س"],[126511,1,"ع"],[126512,1,"ف"],[126513,1,"ص"],[126514,1,"ق"],[126515,3],[126516,1,"ش"],[126517,1,"ت"],[126518,1,"ث"],[126519,1,"خ"],[126520,3],[126521,1,"ض"],[126522,3],[126523,1,"غ"],[[126524,126529],3],[126530,1,"ج"],[[126531,126534],3],[126535,1,"ح"],[126536,3],[126537,1,"ي"],[126538,3],[126539,1,"ل"],[126540,3],[126541,1,"ن"],[126542,1,"س"],[126543,1,"ع"],[126544,3],[126545,1,"ص"],[126546,1,"ق"],[126547,3],[126548,1,"ش"],[[126549,126550],3],[126551,1,"خ"],[126552,3],[126553,1,"ض"],[126554,3],[126555,1,"غ"],[126556,3],[126557,1,"ں"],[126558,3],[126559,1,"ٯ"],[126560,3],[126561,1,"ب"],[126562,1,"ج"],[126563,3],[126564,1,"ه"],[[126565,126566],3],[126567,1,"ح"],[126568,1,"ط"],[126569,1,"ي"],[126570,1,"ك"],[126571,3],[126572,1,"م"],[126573,1,"ن"],[126574,1,"س"],[126575,1,"ع"],[126576,1,"ف"],[126577,1,"ص"],[126578,1,"ق"],[126579,3],[126580,1,"ش"],[126581,1,"ت"],[126582,1,"ث"],[126583,1,"خ"],[126584,3],[126585,1,"ض"],[126586,1,"ظ"],[126587,1,"غ"],[126588,1,"ٮ"],[126589,3],[126590,1,"ڡ"],[126591,3],[126592,1,"ا"],[126593,1,"ب"],[126594,1,"ج"],[126595,1,"د"],[126596,1,"ه"],[126597,1,"و"],[126598,1,"ز"],[126599,1,"ح"],[126600,1,"ط"],[126601,1,"ي"],[126602,3],[126603,1,"ل"],[126604,1,"م"],[126605,1,"ن"],[126606,1,"س"],[126607,1,"ع"],[126608,1,"ف"],[126609,1,"ص"],[126610,1,"ق"],[126611,1,"ر"],[126612,1,"ش"],[126613,1,"ت"],[126614,1,"ث"],[126615,1,"خ"],[126616,1,"ذ"],[126617,1,"ض"],[126618,1,"ظ"],[126619,1,"غ"],[[126620,126624],3],[126625,1,"ب"],[126626,1,"ج"],[126627,1,"د"],[126628,3],[126629,1,"و"],[126630,1,"ز"],[126631,1,"ح"],[126632,1,"ط"],[126633,1,"ي"],[126634,3],[126635,1,"ل"],[126636,1,"م"],[126637,1,"ن"],[126638,1,"س"],[126639,1,"ع"],[126640,1,"ف"],[126641,1,"ص"],[126642,1,"ق"],[126643,1,"ر"],[126644,1,"ش"],[126645,1,"ت"],[126646,1,"ث"],[126647,1,"خ"],[126648,1,"ذ"],[126649,1,"ض"],[126650,1,"ظ"],[126651,1,"غ"],[[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,1,"0,"],[127234,1,"1,"],[127235,1,"2,"],[127236,1,"3,"],[127237,1,"4,"],[127238,1,"5,"],[127239,1,"6,"],[127240,1,"7,"],[127241,1,"8,"],[127242,1,"9,"],[[127243,127244],2],[[127245,127247],2],[127248,1,"(a)"],[127249,1,"(b)"],[127250,1,"(c)"],[127251,1,"(d)"],[127252,1,"(e)"],[127253,1,"(f)"],[127254,1,"(g)"],[127255,1,"(h)"],[127256,1,"(i)"],[127257,1,"(j)"],[127258,1,"(k)"],[127259,1,"(l)"],[127260,1,"(m)"],[127261,1,"(n)"],[127262,1,"(o)"],[127263,1,"(p)"],[127264,1,"(q)"],[127265,1,"(r)"],[127266,1,"(s)"],[127267,1,"(t)"],[127268,1,"(u)"],[127269,1,"(v)"],[127270,1,"(w)"],[127271,1,"(x)"],[127272,1,"(y)"],[127273,1,"(z)"],[127274,1,"〔s〕"],[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,"ほか"],[127489,1,"ココ"],[127490,1,"サ"],[[127491,127503],3],[127504,1,"手"],[127505,1,"字"],[127506,1,"双"],[127507,1,"デ"],[127508,1,"二"],[127509,1,"多"],[127510,1,"解"],[127511,1,"天"],[127512,1,"交"],[127513,1,"映"],[127514,1,"無"],[127515,1,"料"],[127516,1,"前"],[127517,1,"後"],[127518,1,"再"],[127519,1,"新"],[127520,1,"初"],[127521,1,"終"],[127522,1,"生"],[127523,1,"販"],[127524,1,"声"],[127525,1,"吹"],[127526,1,"演"],[127527,1,"投"],[127528,1,"捕"],[127529,1,"一"],[127530,1,"三"],[127531,1,"遊"],[127532,1,"左"],[127533,1,"中"],[127534,1,"右"],[127535,1,"指"],[127536,1,"走"],[127537,1,"打"],[127538,1,"禁"],[127539,1,"空"],[127540,1,"合"],[127541,1,"満"],[127542,1,"有"],[127543,1,"月"],[127544,1,"申"],[127545,1,"割"],[127546,1,"営"],[127547,1,"配"],[[127548,127551],3],[127552,1,"〔本〕"],[127553,1,"〔三〕"],[127554,1,"〔二〕"],[127555,1,"〔安〕"],[127556,1,"〔点〕"],[127557,1,"〔打〕"],[127558,1,"〔盗〕"],[127559,1,"〔勝〕"],[127560,1,"〔敗〕"],[[127561,127567],3],[127568,1,"得"],[127569,1,"可"],[[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,129211],2],[[129212,129215],3],[[129216,129217],2],[[129218,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,2],[[129674,129678],3],[129679,2],[[129680,129685],2],[[129686,129704],2],[[129705,129708],2],[[129709,129711],2],[[129712,129718],2],[[129719,129722],2],[[129723,129725],2],[129726,2],[129727,2],[[129728,129730],2],[[129731,129733],2],[129734,2],[[129735,129741],3],[[129742,129743],2],[[129744,129750],2],[[129751,129753],2],[[129754,129755],2],[129756,2],[[129757,129758],3],[129759,2],[[129760,129767],2],[129768,2],[129769,2],[[129770,129775],3],[[129776,129782],2],[[129783,129784],2],[[129785,129791],3],[[129792,129938],2],[129939,3],[[129940,129994],2],[[129995,130031],2],[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,191471],3],[[191472,192093],2],[[192094,194559],3],[194560,1,"丽"],[194561,1,"丸"],[194562,1,"乁"],[194563,1,"\uD840\uDD22"],[194564,1,"你"],[194565,1,"侮"],[194566,1,"侻"],[194567,1,"倂"],[194568,1,"偺"],[194569,1,"備"],[194570,1,"僧"],[194571,1,"像"],[194572,1,"㒞"],[194573,1,"\uD841\uDE3A"],[194574,1,"免"],[194575,1,"兔"],[194576,1,"兤"],[194577,1,"具"],[194578,1,"\uD841\uDD1C"],[194579,1,"㒹"],[194580,1,"內"],[194581,1,"再"],[194582,1,"\uD841\uDD4B"],[194583,1,"冗"],[194584,1,"冤"],[194585,1,"仌"],[194586,1,"冬"],[194587,1,"况"],[194588,1,"\uD864\uDDDF"],[194589,1,"凵"],[194590,1,"刃"],[194591,1,"㓟"],[194592,1,"刻"],[194593,1,"剆"],[194594,1,"割"],[194595,1,"剷"],[194596,1,"㔕"],[194597,1,"勇"],[194598,1,"勉"],[194599,1,"勤"],[194600,1,"勺"],[194601,1,"包"],[194602,1,"匆"],[194603,1,"北"],[194604,1,"卉"],[194605,1,"卑"],[194606,1,"博"],[194607,1,"即"],[194608,1,"卽"],[[194609,194611],1,"卿"],[194612,1,"\uD842\uDE2C"],[194613,1,"灰"],[194614,1,"及"],[194615,1,"叟"],[194616,1,"\uD842\uDF63"],[194617,1,"叫"],[194618,1,"叱"],[194619,1,"吆"],[194620,1,"咞"],[194621,1,"吸"],[194622,1,"呈"],[194623,1,"周"],[194624,1,"咢"],[194625,1,"哶"],[194626,1,"唐"],[194627,1,"啓"],[194628,1,"啣"],[[194629,194630],1,"善"],[194631,1,"喙"],[194632,1,"喫"],[194633,1,"喳"],[194634,1,"嗂"],[194635,1,"圖"],[194636,1,"嘆"],[194637,1,"圗"],[194638,1,"噑"],[194639,1,"噴"],[194640,1,"切"],[194641,1,"壮"],[194642,1,"城"],[194643,1,"埴"],[194644,1,"堍"],[194645,1,"型"],[194646,1,"堲"],[194647,1,"報"],[194648,1,"墬"],[194649,1,"\uD845\uDCE4"],[194650,1,"売"],[194651,1,"壷"],[194652,1,"夆"],[194653,1,"多"],[194654,1,"夢"],[194655,1,"奢"],[194656,1,"\uD845\uDEA8"],[194657,1,"\uD845\uDEEA"],[194658,1,"姬"],[194659,1,"娛"],[194660,1,"娧"],[194661,1,"姘"],[194662,1,"婦"],[194663,1,"㛮"],[194664,1,"㛼"],[194665,1,"嬈"],[[194666,194667],1,"嬾"],[194668,1,"\uD846\uDDC8"],[194669,1,"寃"],[194670,1,"寘"],[194671,1,"寧"],[194672,1,"寳"],[194673,1,"\uD846\uDF18"],[194674,1,"寿"],[194675,1,"将"],[194676,1,"当"],[194677,1,"尢"],[194678,1,"㞁"],[194679,1,"屠"],[194680,1,"屮"],[194681,1,"峀"],[194682,1,"岍"],[194683,1,"\uD847\uDDE4"],[194684,1,"嵃"],[194685,1,"\uD847\uDDE6"],[194686,1,"嵮"],[194687,1,"嵫"],[194688,1,"嵼"],[194689,1,"巡"],[194690,1,"巢"],[194691,1,"㠯"],[194692,1,"巽"],[194693,1,"帨"],[194694,1,"帽"],[194695,1,"幩"],[194696,1,"㡢"],[194697,1,"\uD848\uDD83"],[194698,1,"㡼"],[194699,1,"庰"],[194700,1,"庳"],[194701,1,"庶"],[194702,1,"廊"],[194703,1,"\uD868\uDF92"],[194704,1,"廾"],[[194705,194706],1,"\uD848\uDF31"],[194707,1,"舁"],[[194708,194709],1,"弢"],[194710,1,"㣇"],[194711,1,"\uD84C\uDEB8"],[194712,1,"\uD858\uDDDA"],[194713,1,"形"],[194714,1,"彫"],[194715,1,"㣣"],[194716,1,"徚"],[194717,1,"忍"],[194718,1,"志"],[194719,1,"忹"],[194720,1,"悁"],[194721,1,"㤺"],[194722,1,"㤜"],[194723,1,"悔"],[194724,1,"\uD849\uDED4"],[194725,1,"惇"],[194726,1,"慈"],[194727,1,"慌"],[194728,1,"慎"],[194729,1,"慌"],[194730,1,"慺"],[194731,1,"憎"],[194732,1,"憲"],[194733,1,"憤"],[194734,1,"憯"],[194735,1,"懞"],[194736,1,"懲"],[194737,1,"懶"],[194738,1,"成"],[194739,1,"戛"],[194740,1,"扝"],[194741,1,"抱"],[194742,1,"拔"],[194743,1,"捐"],[194744,1,"\uD84A\uDF0C"],[194745,1,"挽"],[194746,1,"拼"],[194747,1,"捨"],[194748,1,"掃"],[194749,1,"揤"],[194750,1,"\uD84A\uDFF1"],[194751,1,"搢"],[194752,1,"揅"],[194753,1,"掩"],[194754,1,"㨮"],[194755,1,"摩"],[194756,1,"摾"],[194757,1,"撝"],[194758,1,"摷"],[194759,1,"㩬"],[194760,1,"敏"],[194761,1,"敬"],[194762,1,"\uD84C\uDC0A"],[194763,1,"旣"],[194764,1,"書"],[194765,1,"晉"],[194766,1,"㬙"],[194767,1,"暑"],[194768,1,"㬈"],[194769,1,"㫤"],[194770,1,"冒"],[194771,1,"冕"],[194772,1,"最"],[194773,1,"暜"],[194774,1,"肭"],[194775,1,"䏙"],[194776,1,"朗"],[194777,1,"望"],[194778,1,"朡"],[194779,1,"杞"],[194780,1,"杓"],[194781,1,"\uD84C\uDFC3"],[194782,1,"㭉"],[194783,1,"柺"],[194784,1,"枅"],[194785,1,"桒"],[194786,1,"梅"],[194787,1,"\uD84D\uDC6D"],[194788,1,"梎"],[194789,1,"栟"],[194790,1,"椔"],[194791,1,"㮝"],[194792,1,"楂"],[194793,1,"榣"],[194794,1,"槪"],[194795,1,"檨"],[194796,1,"\uD84D\uDEA3"],[194797,1,"櫛"],[194798,1,"㰘"],[194799,1,"次"],[194800,1,"\uD84E\uDCA7"],[194801,1,"歔"],[194802,1,"㱎"],[194803,1,"歲"],[194804,1,"殟"],[194805,1,"殺"],[194806,1,"殻"],[194807,1,"\uD84E\uDE8D"],[194808,1,"\uD847\uDD0B"],[194809,1,"\uD84E\uDEFA"],[194810,1,"汎"],[194811,1,"\uD84F\uDCBC"],[194812,1,"沿"],[194813,1,"泍"],[194814,1,"汧"],[194815,1,"洖"],[194816,1,"派"],[194817,1,"海"],[194818,1,"流"],[194819,1,"浩"],[194820,1,"浸"],[194821,1,"涅"],[194822,1,"\uD84F\uDD1E"],[194823,1,"洴"],[194824,1,"港"],[194825,1,"湮"],[194826,1,"㴳"],[194827,1,"滋"],[194828,1,"滇"],[194829,1,"\uD84F\uDED1"],[194830,1,"淹"],[194831,1,"潮"],[194832,1,"\uD84F\uDF5E"],[194833,1,"\uD84F\uDF8E"],[194834,1,"濆"],[194835,1,"瀹"],[194836,1,"瀞"],[194837,1,"瀛"],[194838,1,"㶖"],[194839,1,"灊"],[194840,1,"災"],[194841,1,"灷"],[194842,1,"炭"],[194843,1,"\uD841\uDD25"],[194844,1,"煅"],[194845,1,"\uD850\uDE63"],[194846,1,"熜"],[194847,1,"\uD850\uDFAB"],[194848,1,"爨"],[194849,1,"爵"],[194850,1,"牐"],[194851,1,"\uD851\uDE08"],[194852,1,"犀"],[194853,1,"犕"],[194854,1,"\uD851\uDF35"],[194855,1,"\uD852\uDC14"],[194856,1,"獺"],[194857,1,"王"],[194858,1,"㺬"],[194859,1,"玥"],[[194860,194861],1,"㺸"],[194862,1,"瑇"],[194863,1,"瑜"],[194864,1,"瑱"],[194865,1,"璅"],[194866,1,"瓊"],[194867,1,"㼛"],[194868,1,"甤"],[194869,1,"\uD853\uDC36"],[194870,1,"甾"],[194871,1,"\uD853\uDC92"],[194872,1,"異"],[194873,1,"\uD848\uDD9F"],[194874,1,"瘐"],[194875,1,"\uD853\uDFA1"],[194876,1,"\uD853\uDFB8"],[194877,1,"\uD854\uDC44"],[194878,1,"㿼"],[194879,1,"䀈"],[194880,1,"直"],[194881,1,"\uD854\uDCF3"],[194882,1,"\uD854\uDCF2"],[194883,1,"\uD854\uDD19"],[194884,1,"\uD854\uDD33"],[194885,1,"眞"],[[194886,194887],1,"真"],[194888,1,"睊"],[194889,1,"䀹"],[194890,1,"瞋"],[194891,1,"䁆"],[194892,1,"䂖"],[194893,1,"\uD855\uDC1D"],[194894,1,"硎"],[194895,1,"碌"],[194896,1,"磌"],[194897,1,"䃣"],[194898,1,"\uD855\uDE26"],[194899,1,"祖"],[194900,1,"\uD855\uDE9A"],[194901,1,"\uD855\uDEC5"],[194902,1,"福"],[194903,1,"秫"],[194904,1,"䄯"],[194905,1,"穀"],[194906,1,"穊"],[194907,1,"穏"],[194908,1,"\uD856\uDD7C"],[[194909,194910],1,"\uD856\uDEA7"],[194911,1,"竮"],[194912,1,"䈂"],[194913,1,"\uD856\uDFAB"],[194914,1,"篆"],[194915,1,"築"],[194916,1,"䈧"],[194917,1,"\uD857\uDC80"],[194918,1,"糒"],[194919,1,"䊠"],[194920,1,"糨"],[194921,1,"糣"],[194922,1,"紀"],[194923,1,"\uD857\uDF86"],[194924,1,"絣"],[194925,1,"䌁"],[194926,1,"緇"],[194927,1,"縂"],[194928,1,"繅"],[194929,1,"䌴"],[194930,1,"\uD858\uDE28"],[194931,1,"\uD858\uDE47"],[194932,1,"䍙"],[194933,1,"\uD858\uDED9"],[194934,1,"罺"],[194935,1,"\uD858\uDF3E"],[194936,1,"羕"],[194937,1,"翺"],[194938,1,"者"],[194939,1,"\uD859\uDCDA"],[194940,1,"\uD859\uDD23"],[194941,1,"聠"],[194942,1,"\uD859\uDDA8"],[194943,1,"聰"],[194944,1,"\uD84C\uDF5F"],[194945,1,"䏕"],[194946,1,"育"],[194947,1,"脃"],[194948,1,"䐋"],[194949,1,"脾"],[194950,1,"媵"],[194951,1,"\uD859\uDFA7"],[194952,1,"\uD859\uDFB5"],[194953,1,"\uD84C\uDF93"],[194954,1,"\uD84C\uDF9C"],[194955,1,"舁"],[194956,1,"舄"],[194957,1,"辞"],[194958,1,"䑫"],[194959,1,"芑"],[194960,1,"芋"],[194961,1,"芝"],[194962,1,"劳"],[194963,1,"花"],[194964,1,"芳"],[194965,1,"芽"],[194966,1,"苦"],[194967,1,"\uD85A\uDF3C"],[194968,1,"若"],[194969,1,"茝"],[194970,1,"荣"],[194971,1,"莭"],[194972,1,"茣"],[194973,1,"莽"],[194974,1,"菧"],[194975,1,"著"],[194976,1,"荓"],[194977,1,"菊"],[194978,1,"菌"],[194979,1,"菜"],[194980,1,"\uD85B\uDC36"],[194981,1,"\uD85B\uDD6B"],[194982,1,"\uD85B\uDCD5"],[194983,1,"䔫"],[194984,1,"蓱"],[194985,1,"蓳"],[194986,1,"蔖"],[194987,1,"\uD85C\uDFCA"],[194988,1,"蕤"],[194989,1,"\uD85B\uDF2C"],[194990,1,"䕝"],[194991,1,"䕡"],[194992,1,"\uD85B\uDFB1"],[194993,1,"\uD85C\uDCD2"],[194994,1,"䕫"],[194995,1,"虐"],[194996,1,"虜"],[194997,1,"虧"],[194998,1,"虩"],[194999,1,"蚩"],[195e3,1,"蚈"],[195001,1,"蜎"],[195002,1,"蛢"],[195003,1,"蝹"],[195004,1,"蜨"],[195005,1,"蝫"],[195006,1,"螆"],[195007,1,"䗗"],[195008,1,"蟡"],[195009,1,"蠁"],[195010,1,"䗹"],[195011,1,"衠"],[195012,1,"衣"],[195013,1,"\uD85D\uDE67"],[195014,1,"裗"],[195015,1,"裞"],[195016,1,"䘵"],[195017,1,"裺"],[195018,1,"㒻"],[195019,1,"\uD85E\uDCAE"],[195020,1,"\uD85E\uDD66"],[195021,1,"䚾"],[195022,1,"䛇"],[195023,1,"誠"],[195024,1,"諭"],[195025,1,"變"],[195026,1,"豕"],[195027,1,"\uD85F\uDCA8"],[195028,1,"貫"],[195029,1,"賁"],[195030,1,"贛"],[195031,1,"起"],[195032,1,"\uD85F\uDF2F"],[195033,1,"\uD842\uDC04"],[195034,1,"跋"],[195035,1,"趼"],[195036,1,"跰"],[195037,1,"\uD842\uDCDE"],[195038,1,"軔"],[195039,1,"輸"],[195040,1,"\uD861\uDDD2"],[195041,1,"\uD861\uDDED"],[195042,1,"邔"],[195043,1,"郱"],[195044,1,"鄑"],[195045,1,"\uD861\uDF2E"],[195046,1,"鄛"],[195047,1,"鈸"],[195048,1,"鋗"],[195049,1,"鋘"],[195050,1,"鉼"],[195051,1,"鏹"],[195052,1,"鐕"],[195053,1,"\uD862\uDFFA"],[195054,1,"開"],[195055,1,"䦕"],[195056,1,"閷"],[195057,1,"\uD863\uDD77"],[195058,1,"䧦"],[195059,1,"雃"],[195060,1,"嶲"],[195061,1,"霣"],[195062,1,"\uD864\uDD45"],[195063,1,"\uD864\uDE1A"],[195064,1,"䩮"],[195065,1,"䩶"],[195066,1,"韠"],[195067,1,"\uD865\uDC0A"],[195068,1,"䪲"],[195069,1,"\uD865\uDC96"],[[195070,195071],1,"頋"],[195072,1,"頩"],[195073,1,"\uD865\uDDB6"],[195074,1,"飢"],[195075,1,"䬳"],[195076,1,"餩"],[195077,1,"馧"],[195078,1,"駂"],[195079,1,"駾"],[195080,1,"䯎"],[195081,1,"\uD866\uDF30"],[195082,1,"鬒"],[195083,1,"鱀"],[195084,1,"鳽"],[195085,1,"䳎"],[195086,1,"䳭"],[195087,1,"鵧"],[195088,1,"\uD868\uDCCE"],[195089,1,"䳸"],[195090,1,"\uD868\uDD05"],[195091,1,"\uD868\uDE0E"],[195092,1,"\uD868\uDE91"],[195093,1,"麻"],[195094,1,"䵖"],[195095,1,"黹"],[195096,1,"黾"],[195097,1,"鼅"],[195098,1,"鼏"],[195099,1,"鼖"],[195100,1,"鼻"],[195101,1,"\uD869\uDE00"],[[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]]});var tP=et(function(e,t){"use strict";ei();t.exports.STATUS_MAPPING={mapped:1,valid:2,disallowed:3,deviation:6,ignored:7}});var tx=et(function(e,t){"use strict";var r=function e(e){return RegExp("[^\\x00-\\x7F]","u").test(e)};var n=function e(e){var t=0,r=f.length-1;for(;t<=r;){var n=Math.floor((t+r)/2),o=f[n],u=Array.isArray(o[0])?o[0][0]:o[0],i=Array.isArray(o[0])?o[0][1]:o[0];if(u<=e&&i>=e)return o.slice(1);u>e?r=n-1:t=n+1}return null};var o=function e(e,t){var r=t.transitionalProcessing;var o="";var u=true,i=false,s=undefined;try{for(var a=e[Symbol.iterator](),c;!(u=(c=a.next()).done);u=true){var l=c.value;var d=N(n(l.codePointAt(0)),2),f=d[0],h=d[1];switch(f){case v.disallowed:o+=l;break;case v.ignored:break;case v.mapped:r&&l==="ẞ"?o+="ss":o+=h;break;case v.deviation:r?o+=h:o+=l;break;case v.valid:o+=l;break}}}catch(e){i=true;s=e}finally{try{if(!u&&a.return!=null){a.return()}}finally{if(i){throw s}}}return o};var u=function e(e,t){var r=t.checkHyphens,o=t.checkBidi,u=t.checkJoiners,i=t.transitionalProcessing,s=t.useSTD3ASCIIRules,a=t.isBidi;if(e.length===0)return!0;if(e.normalize("NFC")!==e)return!1;var c=Array.from(e);if(r&&(c[2]==="-"&&c[3]==="-"||e.startsWith("-")||e.endsWith("-"))||!r&&e.startsWith("xn--")||e.includes(".")||d.combiningMarks.test(c[0]))return!1;var l=true,f=false,h=undefined;try{for(var p=c[Symbol.iterator](),m;!(l=(m=p.next()).done);l=true){var E=m.value;var y=E.codePointAt(0),g=N(n(y),1),A=g[0];if(i){if(A!==v.valid)return!1}else if(A!==v.valid&&A!==v.deviation)return!1;if(s&&y<=127&&!RegExp("^[a-z][0-9]-$","u").test(E))return!1}}catch(e){f=true;h=e}finally{try{if(!l&&p.return!=null){p.return()}}finally{if(f){throw h}}}if(u){var C=0;var S=true,b=false,O=undefined;try{for(var w=c.entries()[Symbol.iterator](),_;!(S=(_=w.next()).done);S=true){var D=N(_.value,2),B=D[0],T=D[1];if(T===""||T===""){if(B>0){if(d.combiningClassVirama.test(c[B-1]))continue;if(T===""){var F=c.indexOf("",B+1),M=F<0?c.slice(C):c.slice(C,F);if(d.validZWNJ.test(M.join(""))){C=B+1;continue}}}return!1}}}catch(e){b=true;O=e}finally{try{if(!S&&w.return!=null){w.return()}}finally{if(b){throw O}}}}if(o&&a){var R;if(d.bidiS1LTR.test(c[0]))R=!1;else if(d.bidiS1RTL.test(c[0]))R=!0;else return!1;if(R){if(!d.bidiS2.test(e)||!d.bidiS3.test(e)||d.bidiS4EN.test(e)&&d.bidiS4AN.test(e))return!1}else if(!d.bidiS5.test(e)||!d.bidiS6.test(e))return!1}return!0};var i=function e(e){var t=e.map(function(e){if(e.startsWith("xn--"))try{return l.decode(e.substring(4))}catch(e){return""}return e}).join(".");return d.bidiDomain.test(t)};var s=function e(e,t){var n=o(e,t);n=n.normalize("NFC");var s=n.split("."),a=i(s),c=!1;var d=true,f=false,h=undefined;try{for(var v=s.entries()[Symbol.iterator](),p;!(d=(p=v.next()).done);d=true){var m=N(p.value,2),E=m[0],y=m[1];var g=y,A=t.transitionalProcessing;if(g.startsWith("xn--")){if(r(g)){c=!0;continue}try{g=l.decode(g.substring(4))}catch(e){if(!t.ignoreInvalidPunycode){c=!0;continue}}s[E]=g,(g===""||!r(g))&&(c=!0),A=!1}if(c)continue;u(g,F(B({},t),{transitionalProcessing:A,isBidi:a}))||(c=!0)}}catch(e){f=true;h=e}finally{try{if(!d&&v.return!=null){v.return()}}finally{if(f){throw h}}}return{string:s.join("."),error:c}};var a=function e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.checkHyphens,o=n===void 0?!1:n,u=t.checkBidi,i=u===void 0?!1:u,a=t.checkJoiners,c=a===void 0?!1:a,d=t.useSTD3ASCIIRules,f=d===void 0?!1:d,h=t.verifyDNSLength,v=h===void 0?!1:h,p=t.transitionalProcessing,m=p===void 0?!1:p,E=t.ignoreInvalidPunycode,y=E===void 0?!1:E;var g=s(e,{checkHyphens:o,checkBidi:i,checkJoiners:c,useSTD3ASCIIRules:f,transitionalProcessing:m,ignoreInvalidPunycode:y}),A=g.string.split(".");if(A=A.map(function(e){if(r(e))try{return"xn--".concat(l.encode(e))}catch(e){g.error=!0}return e}),v){var C=A.join(".").length;(C>253||C===0)&&(g.error=!0);for(var S=0;S<A.length;++S)if(A[S].length>63||A[S].length===0){g.error=!0;break}}return g.error?null:A.join(".")};var c=function e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.checkHyphens,n=r===void 0?!1:r,o=t.checkBidi,u=o===void 0?!1:o,i=t.checkJoiners,a=i===void 0?!1:i,c=t.useSTD3ASCIIRules,l=c===void 0?!1:c,d=t.transitionalProcessing,f=d===void 0?!1:d,h=t.ignoreInvalidPunycode,v=h===void 0?!1:h;var p=s(e,{checkHyphens:n,checkBidi:u,checkJoiners:a,useSTD3ASCIIRules:l,transitionalProcessing:f,ignoreInvalidPunycode:v});return{domain:p.string,error:p.error}};ei();var l=(tk(),eu(tl)),d=tI(),f=tN(),h=tP(),v=h.STATUS_MAPPING;t.exports={toASCII:a,toUnicode:c}});var tL=et(function(e,t){"use strict";var r=function e(e){return e>=48&&e<=57};var n=function e(e){return e>=65&&e<=90||e>=97&&e<=122};var o=function e(e){return n(e)||r(e)};var u=function e(e){return r(e)||e>=65&&e<=70||e>=97&&e<=102};ei();t.exports={isASCIIDigit:r,isASCIIAlpha:n,isASCIIAlphanumeric:o,isASCIIHex:u}});var tU=et(function(e,t){"use strict";var r=function e(e){return o.encode(e)};var n=function e(e){return u.decode(e)};ei();var o=new TextEncoder,u=new TextDecoder("utf-8",{ignoreBOM:!0});t.exports={utf8Encode:r,utf8DecodeWithoutBOM:n}});var tj=et(function(e,t){"use strict";var r=function e(e){return e.codePointAt(0)};var n=function e(e){var t=e.toString(16).toUpperCase();return t.length===1&&(t="0".concat(t)),"%".concat(t)};var o=function e(e){var t=new Uint8Array(e.byteLength),r=0;for(var n=0;n<e.byteLength;++n){var o=e[n];if(o!==37)t[r++]=o;else if(o===37&&(!y(e[n+1])||!y(e[n+2])))t[r++]=o;else{var u=parseInt(String.fromCodePoint(e[n+1],e[n+2]),16);t[r++]=u,n+=2}}return t.slice(0,r)};var u=function e(e){var t=A(e);return o(t)};var i=function e(e){return e<=31||e>126};var s=function e(e){return i(e)||C.has(e)};var a=function e(e){return i(e)||S.has(e)};var c=function e(e){return a(e)||e===r("'")};var l=function e(e){return a(e)||b.has(e)};var d=function e(e){return l(e)||O.has(e)};var f=function e(e){return d(e)||w.has(e)};var h=function e(e){return f(e)||_.has(e)};var v=function e(e,t){var r=A(e),o="";var u=true,i=false,s=undefined;try{for(var a=r[Symbol.iterator](),c;!(u=(c=a.next()).done);u=true){var l=c.value;t(l)?o+=n(l):o+=String.fromCharCode(l)}}catch(e){i=true;s=e}finally{try{if(!u&&a.return!=null){a.return()}}finally{if(i){throw s}}}return o};var p=function e(e,t){return v(String.fromCodePoint(e),t)};var m=function e(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var n="";var o=true,u=false,i=undefined;try{for(var s=e[Symbol.iterator](),a;!(o=(a=s.next()).done);o=true){var c=a.value;r&&c===" "?n+="+":n+=v(c,t)}}catch(e){u=true;i=e}finally{try{if(!o&&s.return!=null){s.return()}}finally{if(u){throw i}}}return n};ei();var E=tL(),y=E.isASCIIHex,g=tU(),A=g.utf8Encode;var C=new Set([r(" "),r('"'),r("<"),r(">"),r("`")]);var S=new Set([r(" "),r('"'),r("#"),r("<"),r(">")]);var b=new Set([r("?"),r("`"),r("{"),r("}"),r("^")]);var O=new Set([r("/"),r(":"),r(";"),r("="),r("@"),r("["),r("\\"),r("]"),r("|")]);var w=new Set([r("$"),r("%"),r("&"),r("+"),r(",")]);var _=new Set([r("!"),r("'"),r("("),r(")"),r("~")]);t.exports={isC0ControlPercentEncode:i,isFragmentPercentEncode:s,isQueryPercentEncode:a,isSpecialQueryPercentEncode:c,isPathPercentEncode:l,isUserinfoPercentEncode:d,isURLEncodedPercentEncode:h,percentDecodeString:u,percentDecodeBytes:o,utf8PercentEncodeString:m,utf8PercentEncodeCodePoint:p}});var tz=et(function(e,t){"use strict";var r=function e(e){return e.codePointAt(0)};var n=function e(e){return U(e).length};var o=function e(e,t){var r=e[t];return isNaN(r)?void 0:String.fromCodePoint(r)};var u=function e(e){return e==="."||e.toLowerCase()==="%2e"};var i=function e(e){return e=e.toLowerCase(),e===".."||e==="%2e."||e===".%2e"||e==="%2e%2e"};var s=function e(e,t){return W.isASCIIAlpha(e)&&(t===r(":")||t===r("|"))};var a=function e(e){return e.length===2&&W.isASCIIAlpha(e.codePointAt(0))&&(e[1]===":"||e[1]==="|")};var c=function e(e){return e.length===2&&W.isASCIIAlpha(e.codePointAt(0))&&e[1]===":"};var l=function e(e){return e.search(RegExp("\\u0000|\\u0009|\\u000A|\\u000D|\\u0020|#|\\/|:|<|>|\\?|@|\\[|\\\\|\\]|\\^|\\|","u"))!==-1};var d=function e(e){return l(e)||e.search(RegExp("[\\u0000-\\u001F]|%|\\u007F","u"))!==-1};var f=function e(e){return et[e]!==void 0};var h=function e(e){return f(e.scheme)};var v=function e(e){return!f(e.scheme)};var p=function e(e){return et[e]};var m=function e(e){if(e==="")return er;var t=10;if(e.length>=2&&e.charAt(0)==="0"&&e.charAt(1).toLowerCase()==="x"?(e=e.substring(2),t=16):e.length>=2&&e.charAt(0)==="0"&&(e=e.substring(1),t=8),e==="")return 0;var r=RegExp("[^0-7]","u");return t===10&&(r=RegExp("[^0-9]","u")),t===16&&(r=RegExp("[^0-9A-Fa-f]","u")),r.test(e)?er:parseInt(e,t)};var E=function e(e){var t=e.split(".");if(t[t.length-1]===""&&t.length>1&&t.pop(),t.length>4)return er;var r=[];var n=true,o=false,u=undefined;try{for(var i=t[Symbol.iterator](),s;!(n=(s=i.next()).done);n=true){var a=s.value;var c=m(a);if(c===er)return er;r.push(c)}}catch(e){o=true;u=e}finally{try{if(!n&&i.return!=null){i.return()}}finally{if(o){throw u}}}for(var l=0;l<r.length-1;++l)if(r[l]>255)return er;if(r[r.length-1]>=Math.pow(256,5-r.length))return er;var d=r.pop(),f=0;var h=true,v=false,p=undefined;try{for(var E=r[Symbol.iterator](),y;!(h=(y=E.next()).done);h=true){var g=y.value;d+=g*Math.pow(256,3-f),++f}}catch(e){v=true;p=e}finally{try{if(!h&&E.return!=null){E.return()}}finally{if(v){throw p}}}return d};var y=function e(e){var t="",r=e;for(var n=1;n<=4;++n)t=String(r%256)+t,n!==4&&(t=".".concat(t)),r=Math.floor(r/256);return t};var g=function e(e){var t=[0,0,0,0,0,0,0,0],n=0,u=null,i=0;if(e=Array.from(e,function(e){return e.codePointAt(0)}),e[i]===r(":")){if(e[i+1]!==r(":"))return er;i+=2,++n,u=n}for(;i<e.length;){if(n===8)return er;if(e[i]===r(":")){if(u!==null)return er;++i,++n,u=n;continue}var s=0,a=0;for(;a<4&&W.isASCIIHex(e[i]);)s=s*16+parseInt(o(e,i),16),++i,++a;if(e[i]===r(".")){if(a===0||(i-=a,n>6))return er;var c=0;for(;e[i]!==void 0;){var l=null;if(c>0)if(e[i]===r(".")&&c<4)++i;else return er;if(!W.isASCIIDigit(e[i]))return er;for(;W.isASCIIDigit(e[i]);){var d=parseInt(o(e,i));if(l===null)l=d;else{if(l===0)return er;l=l*10+d}if(l>255)return er;++i}t[n]=t[n]*256+l,++c,(c===2||c===4)&&++n}if(c!==4)return er;break}else if(e[i]===r(":")){if(++i,e[i]===void 0)return er}else if(e[i]!==void 0)return er;t[n]=s,++n}if(u!==null){var f=n-u;for(n=7;n!==0&&f>0;){var h=t[u+f-1];t[u+f-1]=t[n],t[n]=h,--n,--f}}else if(u===null&&n!==8)return er;return t};var A=function e(e){var t="",r=w(e),n=!1;for(var o=0;o<=7;++o)if(!(n&&e[o]===0)){if(n&&(n=!1),r===o){t+=o===0?"::":":",n=!0;continue}t+=e[o].toString(16),o!==7&&(t+=":")}return t};var S=function e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e[0]==="[")return e[e.length-1]!=="]"?er:g(e.substring(1,e.length-1));if(t)return O(e);var r=G(q(e)),n=D(r);return n===er?er:b(n)?E(n):n};var b=function e(e){var t=e.split(".");if(t[t.length-1]===""){if(t.length===1)return!1;t.pop()}var r=t[t.length-1];return!!(m(r)!==er||RegExp("^[0-9]+$","u").test(r))};var O=function e(e){return l(e)?er:Y(e,$)};var w=function e(e){var t=null,r=1,n=null,o=0;for(var u=0;u<e.length;++u)e[u]!==0?(o>r&&(t=n,r=o),n=null,o=0):(n===null&&(n=u),++o);return o>r?n:t};var _=function e(e){return typeof e=="number"?y(e):C(e,Array)?"[".concat(A(e),"]"):e};var D=function e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;var r=z.toASCII(e,{checkHyphens:t,checkBidi:!0,checkJoiners:!0,useSTD3ASCIIRules:t,transitionalProcessing:!1,verifyDNSLength:t,ignoreInvalidPunycode:!1});return r===null||!t&&(r===""||d(r))?er:r};var B=function e(e){var t=0,r=e.length;for(;t<r&&!(e.charCodeAt(t)>32);++t);for(;r>t&&!(e.charCodeAt(r-1)>32);--r);return e.substring(t,r)};var T=function e(e){return e.replace(RegExp("\\u0009|\\u000A|\\u000D","ug"),"")};var F=function e(e){var t=e.path;t.length!==0&&(e.scheme==="file"&&t.length===1&&I(t[0])||t.pop())};var M=function e(e){return e.username!==""||e.password!==""};var R=function e(e){return e.host===null||e.host===""||e.scheme==="file"};var k=function e(e){return typeof e.path=="string"};var I=function e(e){return RegExp("^[A-Za-z]:$","u").test(e)};var N=function e(e,t,r,n,o){if(this.pointer=0,this.input=e,this.base=t||null,this.encodingOverride=r||"utf-8",this.stateOverride=o,this.url=n,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null};var u=B(this.input);u!==this.input&&(this.parseError=!0),this.input=u}var i=T(this.input);for(i!==this.input&&(this.parseError=!0),this.input=i,this.state=o||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=Array.from(this.input,function(e){return e.codePointAt(0)});this.pointer<=this.input.length;++this.pointer){var s=this.input[this.pointer],a=isNaN(s)?void 0:String.fromCodePoint(s),c=this["parse ".concat(this.state)](s,a);if(c){if(c===er){this.failure=!0;break}}else break}};var P=function e(e,t){var r=e.length-t;return r>=2&&s(e[t],e[t+1])&&(r===2||en.has(e[t+2]))};var x=function e(e,t){var r="".concat(e.scheme,":");return e.host!==null&&(r+="//",(e.username!==""||e.password!=="")&&(r+=e.username,e.password!==""&&(r+=":".concat(e.password)),r+="@"),r+=_(e.host),e.port!==null&&(r+=":".concat(e.port))),e.host===null&&!k(e)&&e.path.length>1&&e.path[0]===""&&(r+="/."),r+=j(e),e.query!==null&&(r+="?".concat(e.query)),!t&&e.fragment!==null&&(r+="#".concat(e.fragment)),r};var L=function e(e){var t="".concat(e.scheme,"://");return t+=_(e.host),e.port!==null&&(t+=":".concat(e.port)),t};var j=function e(e){if(k(e))return e.path;var t="";var r=true,n=false,o=undefined;try{for(var u=e.path[Symbol.iterator](),i;!(r=(i=u.next()).done);r=true){var s=i.value;t+="/".concat(s)}}catch(e){n=true;o=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw o}}}return t};ei();var z=tx(),W=tL(),V=tU(),G=V.utf8DecodeWithoutBOM,H=tj(),q=H.percentDecodeString,K=H.utf8PercentEncodeCodePoint,Y=H.utf8PercentEncodeString,$=H.isC0ControlPercentEncode,J=H.isFragmentPercentEncode,X=H.isQueryPercentEncode,Q=H.isSpecialQueryPercentEncode,Z=H.isPathPercentEncode,ee=H.isUserinfoPercentEncode;var et={ftp:21,file:null,http:80,https:443,ws:80,wss:443},er=Symbol("failure");N.prototype["parse scheme start"]=function(e,t){if(W.isASCIIAlpha(e))this.buffer+=t.toLowerCase(),this.state="scheme";else if(!this.stateOverride)this.state="no scheme",--this.pointer;else return this.parseError=!0,er;return!0};N.prototype["parse scheme"]=function(e,t){if(W.isASCIIAlphanumeric(e)||e===r("+")||e===r("-")||e===r("."))this.buffer+=t.toLowerCase();else if(e===r(":")){if(this.stateOverride&&(h(this.url)&&!f(this.buffer)||!h(this.url)&&f(this.buffer)||(M(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===p(this.url.scheme)&&(this.url.port=null),!1;this.buffer="",this.url.scheme==="file"?((this.input[this.pointer+1]!==r("/")||this.input[this.pointer+2]!==r("/"))&&(this.parseError=!0),this.state="file"):h(this.url)&&this.base!==null&&this.base.scheme===this.url.scheme?this.state="special relative or authority":h(this.url)?this.state="special authority slashes":this.input[this.pointer+1]===r("/")?(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,er;return!0};N.prototype["parse no scheme"]=function(e){return this.base===null||k(this.base)&&e!==r("#")?er:(k(this.base)&&e===r("#")?(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)};N.prototype["parse special relative or authority"]=function(e){return e===r("/")&&this.input[this.pointer+1]===r("/")?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0};N.prototype["parse path or authority"]=function(e){return e===r("/")?this.state="authority":(this.state="path",--this.pointer),!0};N.prototype["parse relative"]=function(e){return this.url.scheme=this.base.scheme,e===r("/")?this.state="relative slash":h(this.url)&&e===r("\\")?(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,e===r("?")?(this.url.query="",this.state="query"):e===r("#")?(this.url.fragment="",this.state="fragment"):isNaN(e)||(this.url.query=null,this.url.path.pop(),this.state="path",--this.pointer)),!0};N.prototype["parse relative slash"]=function(e){return h(this.url)&&(e===r("/")||e===r("\\"))?(e===r("\\")&&(this.parseError=!0),this.state="special authority ignore slashes"):e===r("/")?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};N.prototype["parse special authority slashes"]=function(e){return e===r("/")&&this.input[this.pointer+1]===r("/")?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="special authority ignore slashes",--this.pointer),!0};N.prototype["parse special authority ignore slashes"]=function(e){return e!==r("/")&&e!==r("\\")?(this.state="authority",--this.pointer):this.parseError=!0,!0};N.prototype["parse authority"]=function(e,t){if(e===r("@")){this.parseError=!0,this.atFlag&&(this.buffer="%40".concat(this.buffer)),this.atFlag=!0;var o=n(this.buffer);for(var u=0;u<o;++u){var i=this.buffer.codePointAt(u);if(i===r(":")&&!this.passwordTokenSeenFlag){this.passwordTokenSeenFlag=!0;continue}var s=K(i,ee);this.passwordTokenSeenFlag?this.url.password+=s:this.url.username+=s}this.buffer=""}else if(isNaN(e)||e===r("/")||e===r("?")||e===r("#")||h(this.url)&&e===r("\\")){if(this.atFlag&&this.buffer==="")return this.parseError=!0,er;this.pointer-=n(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=t;return!0};N.prototype["parse hostname"]=N.prototype["parse host"]=function(e,t){if(this.stateOverride&&this.url.scheme==="file")--this.pointer,this.state="file host";else if(e===r(":")&&!this.arrFlag){if(this.buffer==="")return this.parseError=!0,er;if(this.stateOverride==="hostname")return!1;var n=S(this.buffer,v(this.url));if(n===er)return er;this.url.host=n,this.buffer="",this.state="port"}else if(isNaN(e)||e===r("/")||e===r("?")||e===r("#")||h(this.url)&&e===r("\\")){if(--this.pointer,h(this.url)&&this.buffer==="")return this.parseError=!0,er;if(this.stateOverride&&this.buffer===""&&(M(this.url)||this.url.port!==null))return this.parseError=!0,!1;var o=S(this.buffer,v(this.url));if(o===er)return er;if(this.url.host=o,this.buffer="",this.state="path start",this.stateOverride)return!1}else e===r("[")?this.arrFlag=!0:e===r("]")&&(this.arrFlag=!1),this.buffer+=t;return!0};N.prototype["parse port"]=function(e,t){if(W.isASCIIDigit(e))this.buffer+=t;else if(isNaN(e)||e===r("/")||e===r("?")||e===r("#")||h(this.url)&&e===r("\\")||this.stateOverride){if(this.buffer!==""){var n=parseInt(this.buffer);if(n>Math.pow(2,16)-1)return this.parseError=!0,er;this.url.port=n===p(this.url.scheme)?null:n,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}else return this.parseError=!0,er;return!0};var en=new Set([r("/"),r("\\"),r("?"),r("#")]);N.prototype["parse file"]=function(e){return this.url.scheme="file",this.url.host="",e===r("/")||e===r("\\")?(e===r("\\")&&(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,e===r("?")?(this.url.query="",this.state="query"):e===r("#")?(this.url.fragment="",this.state="fragment"):isNaN(e)||(this.url.query=null,P(this.input,this.pointer)?(this.parseError=!0,this.url.path=[]):F(this.url),this.state="path",--this.pointer)):(this.state="path",--this.pointer),!0};N.prototype["parse file slash"]=function(e){return e===r("/")||e===r("\\")?(e===r("\\")&&(this.parseError=!0),this.state="file host"):(this.base!==null&&this.base.scheme==="file"&&(!P(this.input,this.pointer)&&c(this.base.path[0])&&this.url.path.push(this.base.path[0]),this.url.host=this.base.host),this.state="path",--this.pointer),!0};N.prototype["parse file host"]=function(e,t){if(isNaN(e)||e===r("/")||e===r("\\")||e===r("?")||e===r("#"))if(--this.pointer,!this.stateOverride&&a(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{var n=S(this.buffer,v(this.url));if(n===er)return er;if(n==="localhost"&&(n=""),this.url.host=n,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=t;return!0};N.prototype["parse path start"]=function(e){return h(this.url)?(e===r("\\")&&(this.parseError=!0),this.state="path",e!==r("/")&&e!==r("\\")&&--this.pointer):!this.stateOverride&&e===r("?")?(this.url.query="",this.state="query"):!this.stateOverride&&e===r("#")?(this.url.fragment="",this.state="fragment"):e!==void 0?(this.state="path",e!==r("/")&&--this.pointer):this.stateOverride&&this.url.host===null&&this.url.path.push(""),!0};N.prototype["parse path"]=function(e){return isNaN(e)||e===r("/")||h(this.url)&&e===r("\\")||!this.stateOverride&&(e===r("?")||e===r("#"))?(h(this.url)&&e===r("\\")&&(this.parseError=!0),i(this.buffer)?(F(this.url),e!==r("/")&&!(h(this.url)&&e===r("\\"))&&this.url.path.push("")):u(this.buffer)&&e!==r("/")&&!(h(this.url)&&e===r("\\"))?this.url.path.push(""):u(this.buffer)||(this.url.scheme==="file"&&this.url.path.length===0&&a(this.buffer)&&(this.buffer="".concat(this.buffer[0],":")),this.url.path.push(this.buffer)),this.buffer="",e===r("?")&&(this.url.query="",this.state="query"),e===r("#")&&(this.url.fragment="",this.state="fragment")):(e===r("%")&&(!W.isASCIIHex(this.input[this.pointer+1])||!W.isASCIIHex(this.input[this.pointer+2]))&&(this.parseError=!0),this.buffer+=K(e,Z)),!0};N.prototype["parse opaque path"]=function(e){if(e===r("?"))this.url.query="",this.state="query";else if(e===r("#"))this.url.fragment="",this.state="fragment";else if(e===r(" ")){var t=this.input[this.pointer+1];t===r("?")||t===r("#")?this.url.path+="%20":this.url.path+=" "}else!isNaN(e)&&e!==r("%")&&(this.parseError=!0),e===r("%")&&(!W.isASCIIHex(this.input[this.pointer+1])||!W.isASCIIHex(this.input[this.pointer+2]))&&(this.parseError=!0),isNaN(e)||(this.url.path+=K(e,$));return!0};N.prototype["parse query"]=function(e,t){if((!h(this.url)||this.url.scheme==="ws"||this.url.scheme==="wss")&&(this.encodingOverride="utf-8"),!this.stateOverride&&e===r("#")||isNaN(e)){var n=h(this.url)?Q:X;this.url.query+=Y(this.buffer,n),this.buffer="",e===r("#")&&(this.url.fragment="",this.state="fragment")}else isNaN(e)||(e===r("%")&&(!W.isASCIIHex(this.input[this.pointer+1])||!W.isASCIIHex(this.input[this.pointer+2]))&&(this.parseError=!0),this.buffer+=t);return!0};N.prototype["parse fragment"]=function(e){return isNaN(e)||(e===r("%")&&(!W.isASCIIHex(this.input[this.pointer+1])||!W.isASCIIHex(this.input[this.pointer+2]))&&(this.parseError=!0),this.url.fragment+=K(e,J)),!0};t.exports.serializeURL=x;t.exports.serializePath=j;t.exports.serializeURLOrigin=function(e){switch(e.scheme){case"blob":{var r=t.exports.parseURL(j(e));return r===null||r.scheme!=="http"&&r.scheme!=="https"?"null":t.exports.serializeURLOrigin(r)}case"ftp":case"http":case"https":case"ws":case"wss":return L({scheme:e.scheme,host:e.host,port:e.port});case"file":return"null";default:return"null"}};t.exports.basicURLParse=function(e,t){t===void 0&&(t={});var r=new N(e,t.baseURL,t.encodingOverride,t.url,t.stateOverride);return r.failure?null:r.url};t.exports.setTheUsername=function(e,t){e.username=Y(t,ee)};t.exports.setThePassword=function(e,t){e.password=Y(t,ee)};t.exports.serializeHost=_;t.exports.cannotHaveAUsernamePasswordPort=R;t.exports.hasAnOpaquePath=k;t.exports.serializeInteger=function(e){return String(e)};t.exports.parseURL=function(e,r){return r===void 0&&(r={}),t.exports.basicURLParse(e,{baseURL:r.baseURL,encodingOverride:r.encodingOverride})}});var tW=et(function(e,t){"use strict";var r=function e(e){return e.codePointAt(0)};var n=function e(e){var t=i(e,r("&")),n=[];var o=true,u=false,a=undefined;try{for(var c=t[Symbol.iterator](),d;!(o=(d=c.next()).done);o=true){var h=d.value;if(h.length===0)continue;var v=void 0,p=void 0,m=h.indexOf(r("="));m>=0?(v=h.slice(0,m),p=h.slice(m+1)):(v=h,p=new Uint8Array(0)),v=s(v,43,32),p=s(p,43,32);var E=l(f(v)),y=l(f(p));n.push([E,y])}}catch(e){u=true;a=e}finally{try{if(!o&&c.return!=null){c.return()}}finally{if(u){throw a}}}return n};var o=function e(e){return n(c(e))};var u=function e(e){var t="";var r=true,n=false,o=undefined;try{for(var u=e.entries()[Symbol.iterator](),i;!(r=(i=u.next()).done);r=true){var s=N(i.value,2),a=s[0],c=s[1];var l=h(c[0],v,!0),d=h(c[1],v,!0);a!==0&&(t+="&"),t+="".concat(l,"=").concat(d)}}catch(e){n=true;o=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw o}}}return t};var i=function e(e,t){var r=[],n=0,o=e.indexOf(t);for(;o>=0;)r.push(e.slice(n,o)),n=o+1,o=e.indexOf(t,n);return n!==e.length&&r.push(e.slice(n)),r};var s=function e(e,t,r){var n=e.indexOf(t);for(;n>=0;)e[n]=r,n=e.indexOf(t,n+1);return e};ei();var a=tU(),c=a.utf8Encode,l=a.utf8DecodeWithoutBOM,d=tj(),f=d.percentDecodeBytes,h=d.utf8PercentEncodeString,v=d.isURLEncodedPercentEncode;t.exports={parseUrlencodedString:o,serializeUrlencoded:u}});var tV=et(function(e){"use strict";ei();var t=ta(),r=tc();e.convert=function(e,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u=o.context,i=u===void 0?"The provided value":u;var s=function o(){for(var o=arguments.length,u=new Array(o),s=0;s<o;s++){u[s]=arguments[s]}var a=r.tryWrapperForImpl(this),c;for(var l=0;l<u.length;l++)u[l]=r.tryWrapperForImpl(u[l]);return c=Reflect.apply(n,a,u),c=t.any(c,{context:i,globals:e}),c};if(typeof n!="function")throw new e.TypeError(i+" is not a function");return s.construct=function(){for(var o=arguments.length,u=new Array(o),s=0;s<o;s++){u[s]=arguments[s]}for(var a=0;a<u.length;a++)u[a]=r.tryWrapperForImpl(u[a]);var c=Reflect.construct(n,u);return c=t.any(c,{context:i,globals:e}),c},s[r.wrapperSymbol]=n,s.objectReference=n,s}});var tG=et(function(e){"use strict";ei();var t=tW();e.implementation=/*#__PURE__*/function(){function e(r,n,o){var u=o.doNotStripQMark,i=u===void 0?!1:u;f(this,e);var s=n[0];var a=true,c=false,l=undefined,d=true,h=false,v=undefined;if(this._list=[],this._url=null,!i&&typeof s=="string"&&s[0]==="?"&&(s=s.slice(1)),Array.isArray(s))try{for(var p=s[Symbol.iterator](),m;!(a=(m=p.next()).done);a=true){var E=m.value;if(E.length!==2)throw new TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence's element does not contain exactly two elements.");this._list.push([E[0],E[1]])}}catch(e){c=true;l=e}finally{try{if(!a&&p.return!=null){p.return()}}finally{if(c){throw l}}}else if((typeof s==="undefined"?"undefined":j(s))=="object"&&Object.getPrototypeOf(s)===null)try{for(var y=Object.keys(s)[Symbol.iterator](),g;!(d=(g=y.next()).done);d=true){var A=g.value;var C=s[A];this._list.push([A,C])}}catch(e){h=true;v=e}finally{try{if(!d&&y.return!=null){y.return()}}finally{if(h){throw v}}}else this._list=t.parseUrlencodedString(s)}p(e,[{key:"_updateSteps",value:function e(){if(this._url!==null){var e=t.serializeUrlencoded(this._list);e===""&&(e=null),this._url._url.query=e}}},{key:"size",get:function e(){return this._list.length}},{key:"append",value:function e(e,t){this._list.push([e,t]),this._updateSteps()}},{key:"delete",value:function e(e,t){var r=0;for(;r<this._list.length;)this._list[r][0]===e&&(t===void 0||this._list[r][1]===t)?this._list.splice(r,1):r++;this._updateSteps()}},{key:"get",value:function e(e){var t=true,r=false,n=undefined;try{for(var o=this._list[Symbol.iterator](),u;!(t=(u=o.next()).done);t=true){var i=u.value;if(i[0]===e)return i[1]}}catch(e){r=true;n=e}finally{try{if(!t&&o.return!=null){o.return()}}finally{if(r){throw n}}}return null}},{key:"getAll",value:function e(e){var t=[];var r=true,n=false,o=undefined;try{for(var u=this._list[Symbol.iterator](),i;!(r=(i=u.next()).done);r=true){var s=i.value;s[0]===e&&t.push(s[1])}}catch(e){n=true;o=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw o}}}return t}},{key:"has",value:function e(e,t){var r=true,n=false,o=undefined;try{for(var u=this._list[Symbol.iterator](),i;!(r=(i=u.next()).done);r=true){var s=i.value;if(s[0]===e&&(t===void 0||s[1]===t))return!0}}catch(e){n=true;o=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw o}}}return!1}},{key:"set",value:function e(e,t){var r=!1,n=0;for(;n<this._list.length;)this._list[n][0]===e?r?this._list.splice(n,1):(r=!0,this._list[n][1]=t,n++):n++;r||this._list.push([e,t]),this._updateSteps()}},{key:"sort",value:function e(){this._list.sort(function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:0}),this._updateSteps()}},{key:Symbol.iterator,value:function e(){return this._list[Symbol.iterator]()}},{key:"toString",value:function e(){return t.serializeUrlencoded(this._list)}}]);return e}()});var tH=et(function(e){"use strict";var t=function e(e,t){var r;return t!==void 0&&(r=t.prototype),n.isObject(r)||(r=e[s].URLSearchParams.prototype),Object.create(r)};ei();var r=ta(),n=tc(),o=tV(),u=n.newObjectInRealm,i=n.implSymbol,s=n.ctorRegistrySymbol,a="URLSearchParams";e.is=function(e){return n.isObject(e)&&n.hasOwn(e,i)&&C(e[i],l.implementation)};e.isImpl=function(e){return n.isObject(e)&&C(e,l.implementation)};e.convert=function(t,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u=o.context,i=u===void 0?"The provided value":u;if(e.is(r))return n.implForWrapper(r);throw new t.TypeError("".concat(i," is not of type 'URLSearchParams'."))};e.createDefaultIterator=function(e,t,r){var o=e[s]["URLSearchParams Iterator"],u=Object.create(o);return Object.defineProperty(u,n.iterInternalSymbol,{value:{target:t,kind:r,index:0},configurable:!0}),u};e.create=function(r,n,o){var u=t(r);return e.setup(u,r,n,o)};e.createImpl=function(t,r,o){var u=e.create(t,r,o);return n.implForWrapper(u)};e._internalSetup=function(e,t){};e.setup=function(t,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return u.wrapper=t,e._internalSetup(t,r),Object.defineProperty(t,i,{value:new l.implementation(r,o,u),configurable:!0}),t[i][n.wrapperSymbol]=t,l.init&&l.init(t[i]),t};e.new=function(r,o){var u=t(r,o);return e._internalSetup(u,r),Object.defineProperty(u,i,{value:Object.create(l.implementation.prototype),configurable:!0}),u[i][n.wrapperSymbol]=u,l.init&&l.init(u[i]),u[i]};var c=new Set(["Window","Worker"]);e.install=function(t,s){if(!s.some(function(e){return c.has(e)}))return;var l=n.initCtorRegistry(t);var d=/*#__PURE__*/function u(){function u(){f(this,u);var o=[];{var i=arguments[0];if(i!==void 0)if(n.isObject(i))if(i[Symbol.iterator]!==void 0)if(n.isObject(i)){var s=[],a=i;var c=true,l=false,d=undefined;try{for(var h=a[Symbol.iterator](),v;!(c=(v=h.next()).done);c=true){var p=v.value;if(n.isObject(p)){var m=[],E=p;var y=true,g=false,A=undefined;try{for(var S=E[Symbol.iterator](),b;!(y=(b=S.next()).done);y=true){var O=b.value;O=r.USVString(O,{context:"Failed to construct 'URLSearchParams': parameter 1 sequence's element's element",globals:t}),m.push(O)}}catch(e){g=true;A=e}finally{try{if(!y&&S.return!=null){S.return()}}finally{if(g){throw A}}}p=m}else throw new t.TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence's element is not an iterable object.");s.push(p)}}catch(e){l=true;d=e}finally{try{if(!c&&h.return!=null){h.return()}}finally{if(l){throw d}}}i=s}else throw new t.TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence is not an iterable object.");else if(n.isObject(i)){var w=Object.create(null);var _=true,D=false,B=undefined;try{for(var T=Reflect.ownKeys(i)[Symbol.iterator](),F;!(_=(F=T.next()).done);_=true){var M=F.value;var R=Object.getOwnPropertyDescriptor(i,M);if(R&&R.enumerable){var k=M;k=r.USVString(k,{context:"Failed to construct 'URLSearchParams': parameter 1 record's key",globals:t});var I=i[M];I=r.USVString(I,{context:"Failed to construct 'URLSearchParams': parameter 1 record's value",globals:t}),w[k]=I}}}catch(e){D=true;B=e}finally{try{if(!_&&T.return!=null){T.return()}}finally{if(D){throw B}}}i=w}else throw new t.TypeError("Failed to construct 'URLSearchParams': parameter 1 record is not an object.");else i=r.USVString(i,{context:"Failed to construct 'URLSearchParams': parameter 1",globals:t});else i="";o.push(i)}return e.setup(Object.create((C(this,u)?this.constructor:void 0).prototype),t,o)}p(u,[{key:"append",value:function o(o,u){var s;var a=this!==null&&this!==void 0?this:t;if(!e.is(a))throw new t.TypeError("'append' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<2)throw new t.TypeError("Failed to execute 'append' on 'URLSearchParams': 2 arguments required, but only ".concat(arguments.length," present."));var c=[];{var l=arguments[0];l=r.USVString(l,{context:"Failed to execute 'append' on 'URLSearchParams': parameter 1",globals:t}),c.push(l)}{var d=arguments[1];d=r.USVString(d,{context:"Failed to execute 'append' on 'URLSearchParams': parameter 2",globals:t}),c.push(d)}return n.tryWrapperForImpl((s=a[i]).append.apply(s,U(c)))}},{key:"delete",value:function o(o){var u;var s=this!==null&&this!==void 0?this:t;if(!e.is(s))throw new t.TypeError("'delete' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new t.TypeError("Failed to execute 'delete' on 'URLSearchParams': 1 argument required, but only ".concat(arguments.length," present."));var a=[];{var c=arguments[0];c=r.USVString(c,{context:"Failed to execute 'delete' on 'URLSearchParams': parameter 1",globals:t}),a.push(c)}{var l=arguments[1];l!==void 0&&(l=r.USVString(l,{context:"Failed to execute 'delete' on 'URLSearchParams': parameter 2",globals:t})),a.push(l)}return n.tryWrapperForImpl((u=s[i]).delete.apply(u,U(a)))}},{key:"get",value:function n(n){var o;var u=this!==null&&this!==void 0?this:t;if(!e.is(u))throw new t.TypeError("'get' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new t.TypeError("Failed to execute 'get' on 'URLSearchParams': 1 argument required, but only ".concat(arguments.length," present."));var s=[];{var a=arguments[0];a=r.USVString(a,{context:"Failed to execute 'get' on 'URLSearchParams': parameter 1",globals:t}),s.push(a)}return(o=u[i]).get.apply(o,U(s))}},{key:"getAll",value:function o(o){var u;var s=this!==null&&this!==void 0?this:t;if(!e.is(s))throw new t.TypeError("'getAll' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new t.TypeError("Failed to execute 'getAll' on 'URLSearchParams': 1 argument required, but only ".concat(arguments.length," present."));var a=[];{var c=arguments[0];c=r.USVString(c,{context:"Failed to execute 'getAll' on 'URLSearchParams': parameter 1",globals:t}),a.push(c)}return n.tryWrapperForImpl((u=s[i]).getAll.apply(u,U(a)))}},{key:"has",value:function n(n){var o;var u=this!==null&&this!==void 0?this:t;if(!e.is(u))throw new t.TypeError("'has' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new t.TypeError("Failed to execute 'has' on 'URLSearchParams': 1 argument required, but only ".concat(arguments.length," present."));var s=[];{var a=arguments[0];a=r.USVString(a,{context:"Failed to execute 'has' on 'URLSearchParams': parameter 1",globals:t}),s.push(a)}{var c=arguments[1];c!==void 0&&(c=r.USVString(c,{context:"Failed to execute 'has' on 'URLSearchParams': parameter 2",globals:t})),s.push(c)}return(o=u[i]).has.apply(o,U(s))}},{key:"set",value:function o(o,u){var s;var a=this!==null&&this!==void 0?this:t;if(!e.is(a))throw new t.TypeError("'set' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<2)throw new t.TypeError("Failed to execute 'set' on 'URLSearchParams': 2 arguments required, but only ".concat(arguments.length," present."));var c=[];{var l=arguments[0];l=r.USVString(l,{context:"Failed to execute 'set' on 'URLSearchParams': parameter 1",globals:t}),c.push(l)}{var d=arguments[1];d=r.USVString(d,{context:"Failed to execute 'set' on 'URLSearchParams': parameter 2",globals:t}),c.push(d)}return n.tryWrapperForImpl((s=a[i]).set.apply(s,U(c)))}},{key:"sort",value:function r(){var r=this!==null&&this!==void 0?this:t;if(!e.is(r))throw new t.TypeError("'sort' called on an object that is not a valid instance of URLSearchParams.");return n.tryWrapperForImpl(r[i].sort())}},{key:"toString",value:function r(){var r=this!==null&&this!==void 0?this:t;if(!e.is(r))throw new t.TypeError("'toString' called on an object that is not a valid instance of URLSearchParams.");return r[i].toString()}},{key:"keys",value:function r(){if(!e.is(this))throw new t.TypeError("'keys' called on an object that is not a valid instance of URLSearchParams.");return e.createDefaultIterator(t,this,"key")}},{key:"values",value:function r(){if(!e.is(this))throw new t.TypeError("'values' called on an object that is not a valid instance of URLSearchParams.");return e.createDefaultIterator(t,this,"value")}},{key:"entries",value:function r(){if(!e.is(this))throw new t.TypeError("'entries' called on an object that is not a valid instance of URLSearchParams.");return e.createDefaultIterator(t,this,"key+value")}},{key:"forEach",value:function r(r){if(!e.is(this))throw new t.TypeError("'forEach' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new t.TypeError("Failed to execute 'forEach' on 'iterable': 1 argument required, but only 0 present.");r=o.convert(t,r,{context:"Failed to execute 'forEach' on 'iterable': The callback provided as parameter 1"});var u=arguments[1],s=Array.from(this[i]),a=0;for(;a<s.length;){var c=N(s[a].map(n.tryWrapperForImpl),2),l=c[0],d=c[1];r.call(u,d,l,this),s=Array.from(this[i]),a++}}},{key:"size",get:function r(){var r=this!==null&&this!==void 0?this:t;if(!e.is(r))throw new t.TypeError("'get size' called on an object that is not a valid instance of URLSearchParams.");return r[i].size}}]);return u}();var h;Object.defineProperties(d.prototype,(h={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}},m(h,Symbol.toStringTag,{value:"URLSearchParams",configurable:!0}),m(h,Symbol.iterator,{value:d.prototype.entries,configurable:!0,writable:!0}),h)),l[a]=d,l["URLSearchParams Iterator"]=Object.create(l["%IteratorPrototype%"],m({},Symbol.toStringTag,{configurable:!0,value:"URLSearchParams Iterator"})),n.define(l["URLSearchParams Iterator"],{next:function e(){var e=this&&this[n.iterInternalSymbol];if(!e)throw new t.TypeError("next() called on a value that is not a URLSearchParams iterator object");var r=e.target,o=e.kind,s=e.index,a=Array.from(r[i]),c=a.length;if(s>=c)return u(t,{value:void 0,done:!0});var l=a[s];return e.index=s+1,u(t,n.iteratorResult(l.map(n.tryWrapperForImpl),o))}}),Object.defineProperty(t,a,{configurable:!0,writable:!0,value:d})};var l=tG()});var tq=et(function(e){"use strict";ei();var t=tz(),r=tW(),n=tH();e.implementation=/*#__PURE__*/function(){function e(r,o){var u=N(o,2),i=u[0],s=u[1];f(this,e);var a=null;if(s!==void 0&&(a=t.basicURLParse(s),a===null))throw new TypeError("Invalid base URL: ".concat(s));var c=t.basicURLParse(i,{baseURL:a});if(c===null)throw new TypeError("Invalid URL: ".concat(i));var l=c.query!==null?c.query:"";this._url=c,this._query=n.createImpl(r,[l],{doNotStripQMark:!0}),this._query._url=this}p(e,[{key:"href",get:function e(){return t.serializeURL(this._url)},set:function e(e){var n=t.basicURLParse(e);if(n===null)throw new TypeError("Invalid URL: ".concat(e));this._url=n,this._query._list.splice(0);var o=n.query;o!==null&&(this._query._list=r.parseUrlencodedString(o))}},{key:"origin",get:function e(){return t.serializeURLOrigin(this._url)}},{key:"protocol",get:function e(){return"".concat(this._url.scheme,":")},set:function e(e){t.basicURLParse("".concat(e,":"),{url:this._url,stateOverride:"scheme start"})}},{key:"username",get:function e(){return this._url.username},set:function e(e){t.cannotHaveAUsernamePasswordPort(this._url)||t.setTheUsername(this._url,e)}},{key:"password",get:function e(){return this._url.password},set:function e(e){t.cannotHaveAUsernamePasswordPort(this._url)||t.setThePassword(this._url,e)}},{key:"host",get:function e(){var e=this._url;return e.host===null?"":e.port===null?t.serializeHost(e.host):"".concat(t.serializeHost(e.host),":").concat(t.serializeInteger(e.port))},set:function e(e){t.hasAnOpaquePath(this._url)||t.basicURLParse(e,{url:this._url,stateOverride:"host"})}},{key:"hostname",get:function e(){return this._url.host===null?"":t.serializeHost(this._url.host)},set:function e(e){t.hasAnOpaquePath(this._url)||t.basicURLParse(e,{url:this._url,stateOverride:"hostname"})}},{key:"port",get:function e(){return this._url.port===null?"":t.serializeInteger(this._url.port)},set:function e(e){t.cannotHaveAUsernamePasswordPort(this._url)||(e===""?this._url.port=null:t.basicURLParse(e,{url:this._url,stateOverride:"port"}))}},{key:"pathname",get:function e(){return t.serializePath(this._url)},set:function e(e){t.hasAnOpaquePath(this._url)||(this._url.path=[],t.basicURLParse(e,{url:this._url,stateOverride:"path start"}))}},{key:"search",get:function e(){return this._url.query===null||this._url.query===""?"":"?".concat(this._url.query)},set:function e(e){var n=this._url;if(e===""){n.query=null,this._query._list=[];return}var o=e[0]==="?"?e.substring(1):e;n.query="",t.basicURLParse(o,{url:n,stateOverride:"query"}),this._query._list=r.parseUrlencodedString(o)}},{key:"searchParams",get:function e(){return this._query}},{key:"hash",get:function e(){return this._url.fragment===null||this._url.fragment===""?"":"#".concat(this._url.fragment)},set:function e(e){if(e===""){this._url.fragment=null;return}var r=e[0]==="#"?e.substring(1):e;this._url.fragment="",t.basicURLParse(r,{url:this._url,stateOverride:"fragment"})}},{key:"toJSON",value:function e(){return this.href}}],[{key:"parse",value:function t(t,r,n){try{return new e(t,[r,n])}catch(e){return null}}},{key:"canParse",value:function e(e,r){var n=null;return!(r!==void 0&&(n=t.basicURLParse(r),n===null)||t.basicURLParse(e,{baseURL:n})===null)}}]);return e}()});var tK=et(function(e){"use strict";var t=function e(e,t){var r;return t!==void 0&&(r=t.prototype),n.isObject(r)||(r=e[u].URL.prototype),Object.create(r)};ei();var r=ta(),n=tc(),o=n.implSymbol,u=n.ctorRegistrySymbol,i="URL";e.is=function(e){return n.isObject(e)&&n.hasOwn(e,o)&&C(e[o],a.implementation)};e.isImpl=function(e){return n.isObject(e)&&C(e,a.implementation)};e.convert=function(t,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u=o.context,i=u===void 0?"The provided value":u;if(e.is(r))return n.implForWrapper(r);throw new t.TypeError("".concat(i," is not of type 'URL'."))};e.create=function(r,n,o){var u=t(r);return e.setup(u,r,n,o)};e.createImpl=function(t,r,o){var u=e.create(t,r,o);return n.implForWrapper(u)};e._internalSetup=function(e,t){};e.setup=function(t,r){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return i.wrapper=t,e._internalSetup(t,r),Object.defineProperty(t,o,{value:new a.implementation(r,u,i),configurable:!0}),t[o][n.wrapperSymbol]=t,a.init&&a.init(t[o]),t};e.new=function(r,u){var i=t(r,u);return e._internalSetup(i,r),Object.defineProperty(i,o,{value:Object.create(a.implementation.prototype),configurable:!0}),i[o][n.wrapperSymbol]=i,a.init&&a.init(i[o]),i[o]};var s=new Set(["Window","Worker"]);e.install=function(t,u){if(!u.some(function(e){return s.has(e)}))return;var c=n.initCtorRegistry(t);var l=/*#__PURE__*/function u(){function u(n){f(this,u);if(arguments.length<1)throw new t.TypeError("Failed to construct 'URL': 1 argument required, but only ".concat(arguments.length," present."));var o=[];{var i=arguments[0];i=r.USVString(i,{context:"Failed to construct 'URL': parameter 1",globals:t}),o.push(i)}{var s=arguments[1];s!==void 0&&(s=r.USVString(s,{context:"Failed to construct 'URL': parameter 2",globals:t})),o.push(s)}return e.setup(Object.create((C(this,u)?this.constructor:void 0).prototype),t,o)}p(u,[{key:"toJSON",value:function r(){var r=this!==null&&this!==void 0?this:t;if(!e.is(r))throw new t.TypeError("'toJSON' called on an object that is not a valid instance of URL.");return r[o].toJSON()}},{key:"href",get:function r(){var r=this!==null&&this!==void 0?this:t;if(!e.is(r))throw new t.TypeError("'get href' called on an object that is not a valid instance of URL.");return r[o].href},set:function n(n){var u=this!==null&&this!==void 0?this:t;if(!e.is(u))throw new t.TypeError("'set href' called on an object that is not a valid instance of URL.");n=r.USVString(n,{context:"Failed to set the 'href' property on 'URL': The provided value",globals:t}),u[o].href=n}},{key:"toString",value:function r(){var r=this;if(!e.is(r))throw new t.TypeError("'toString' called on an object that is not a valid instance of URL.");return r[o].href}},{key:"origin",get:function r(){var r=this!==null&&this!==void 0?this:t;if(!e.is(r))throw new t.TypeError("'get origin' called on an object that is not a valid instance of URL.");return r[o].origin}},{key:"protocol",get:function r(){var r=this!==null&&this!==void 0?this:t;if(!e.is(r))throw new t.TypeError("'get protocol' called on an object that is not a valid instance of URL.");return r[o].protocol},set:function n(n){var u=this!==null&&this!==void 0?this:t;if(!e.is(u))throw new t.TypeError("'set protocol' called on an object that is not a valid instance of URL.");n=r.USVString(n,{context:"Failed to set the 'protocol' property on 'URL': The provided value",globals:t}),u[o].protocol=n}},{key:"username",get:function r(){var r=this!==null&&this!==void 0?this:t;if(!e.is(r))throw new t.TypeError("'get username' called on an object that is not a valid instance of URL.");return r[o].username},set:function n(n){var u=this!==null&&this!==void 0?this:t;if(!e.is(u))throw new t.TypeError("'set username' called on an object that is not a valid instance of URL.");n=r.USVString(n,{context:"Failed to set the 'username' property on 'URL': The provided value",globals:t}),u[o].username=n}},{key:"password",get:function r(){var r=this!==null&&this!==void 0?this:t;if(!e.is(r))throw new t.TypeError("'get password' called on an object that is not a valid instance of URL.");return r[o].password},set:function n(n){var u=this!==null&&this!==void 0?this:t;if(!e.is(u))throw new t.TypeError("'set password' called on an object that is not a valid instance of URL.");n=r.USVString(n,{context:"Failed to set the 'password' property on 'URL': The provided value",globals:t}),u[o].password=n}},{key:"host",get:function r(){var r=this!==null&&this!==void 0?this:t;if(!e.is(r))throw new t.TypeError("'get host' called on an object that is not a valid instance of URL.");return r[o].host},set:function n(n){var u=this!==null&&this!==void 0?this:t;if(!e.is(u))throw new t.TypeError("'set host' called on an object that is not a valid instance of URL.");n=r.USVString(n,{context:"Failed to set the 'host' property on 'URL': The provided value",globals:t}),u[o].host=n}},{key:"hostname",get:function r(){var r=this!==null&&this!==void 0?this:t;if(!e.is(r))throw new t.TypeError("'get hostname' called on an object that is not a valid instance of URL.");return r[o].hostname},set:function n(n){var u=this!==null&&this!==void 0?this:t;if(!e.is(u))throw new t.TypeError("'set hostname' called on an object that is not a valid instance of URL.");n=r.USVString(n,{context:"Failed to set the 'hostname' property on 'URL': The provided value",globals:t}),u[o].hostname=n}},{key:"port",get:function r(){var r=this!==null&&this!==void 0?this:t;if(!e.is(r))throw new t.TypeError("'get port' called on an object that is not a valid instance of URL.");return r[o].port},set:function n(n){var u=this!==null&&this!==void 0?this:t;if(!e.is(u))throw new t.TypeError("'set port' called on an object that is not a valid instance of URL.");n=r.USVString(n,{context:"Failed to set the 'port' property on 'URL': The provided value",globals:t}),u[o].port=n}},{key:"pathname",get:function r(){var r=this!==null&&this!==void 0?this:t;if(!e.is(r))throw new t.TypeError("'get pathname' called on an object that is not a valid instance of URL.");return r[o].pathname},set:function n(n){var u=this!==null&&this!==void 0?this:t;if(!e.is(u))throw new t.TypeError("'set pathname' called on an object that is not a valid instance of URL.");n=r.USVString(n,{context:"Failed to set the 'pathname' property on 'URL': The provided value",globals:t}),u[o].pathname=n}},{key:"search",get:function r(){var r=this!==null&&this!==void 0?this:t;if(!e.is(r))throw new t.TypeError("'get search' called on an object that is not a valid instance of URL.");return r[o].search},set:function n(n){var u=this!==null&&this!==void 0?this:t;if(!e.is(u))throw new t.TypeError("'set search' called on an object that is not a valid instance of URL.");n=r.USVString(n,{context:"Failed to set the 'search' property on 'URL': The provided value",globals:t}),u[o].search=n}},{key:"searchParams",get:function r(){var r=this!==null&&this!==void 0?this:t;if(!e.is(r))throw new t.TypeError("'get searchParams' called on an object that is not a valid instance of URL.");return n.getSameObject(this,"searchParams",function(){return n.tryWrapperForImpl(r[o].searchParams)})}},{key:"hash",get:function r(){var r=this!==null&&this!==void 0?this:t;if(!e.is(r))throw new t.TypeError("'get hash' called on an object that is not a valid instance of URL.");return r[o].hash},set:function n(n){var u=this!==null&&this!==void 0?this:t;if(!e.is(u))throw new t.TypeError("'set hash' called on an object that is not a valid instance of URL.");n=r.USVString(n,{context:"Failed to set the 'hash' property on 'URL': The provided value",globals:t}),u[o].hash=n}}],[{key:"parse",value:function e(e){var o;if(arguments.length<1)throw new t.TypeError("Failed to execute 'parse' on 'URL': 1 argument required, but only ".concat(arguments.length," present."));var u=[];{var i=arguments[0];i=r.USVString(i,{context:"Failed to execute 'parse' on 'URL': parameter 1",globals:t}),u.push(i)}{var s=arguments[1];s!==void 0&&(s=r.USVString(s,{context:"Failed to execute 'parse' on 'URL': parameter 2",globals:t})),u.push(s)}return n.tryWrapperForImpl((o=a.implementation).parse.apply(o,[t].concat(U(u))))}},{key:"canParse",value:function e(e){var n;if(arguments.length<1)throw new t.TypeError("Failed to execute 'canParse' on 'URL': 1 argument required, but only ".concat(arguments.length," present."));var o=[];{var u=arguments[0];u=r.USVString(u,{context:"Failed to execute 'canParse' on 'URL': parameter 1",globals:t}),o.push(u)}{var i=arguments[1];i!==void 0&&(i=r.USVString(i,{context:"Failed to execute 'canParse' on 'URL': parameter 2",globals:t})),o.push(i)}return(n=a.implementation).canParse.apply(n,U(o))}}]);return u}();Object.defineProperties(l.prototype,m({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(l,{parse:{enumerable:!0},canParse:{enumerable:!0}}),c[i]=l,Object.defineProperty(t,i,{configurable:!0,writable:!0,value:l}),u.includes("Window")&&Object.defineProperty(t,"webkitURL",{configurable:!0,writable:!0,value:l})};var a=tq()});var tY=et(function(e){"use strict";ei();var t=tK(),r=tH();e.URL=t;e.URLSearchParams=r});var t$=et(function(e){"use strict";ei();var t=tY(),r=t.URL,n=t.URLSearchParams,o=tz(),u=tj(),i={Array:Array,Object:Object,Promise:Promise,String:String,TypeError:TypeError};r.install(i,["Window"]);n.install(i,["Window"]);e.URL=i.URL;e.URLSearchParams=i.URLSearchParams;e.parseURL=o.parseURL;e.basicURLParse=o.basicURLParse;e.serializeURL=o.serializeURL;e.serializePath=o.serializePath;e.serializeHost=o.serializeHost;e.serializeInteger=o.serializeInteger;e.serializeURLOrigin=o.serializeURLOrigin;e.setTheUsername=o.setTheUsername;e.setThePassword=o.setThePassword;e.cannotHaveAUsernamePasswordPort=o.cannotHaveAUsernamePasswordPort;e.hasAnOpaquePath=o.hasAnOpaquePath;e.percentDecodeString=u.percentDecodeString;e.percentDecodeBytes=u.percentDecodeBytes});var tJ=et(function(e){"use strict";var t=function e(e,t){var r,n;var o=e.clone(),u=(r=t===null||t===void 0?void 0:t.replacementString)!==null&&r!==void 0?r:"_credentials_",s=(n=t===null||t===void 0?void 0:t.redactUsernames)!==null&&n!==void 0?n:!0;if((o.username||o.password)&&s?(o.username=u,o.password=""):o.password&&(o.password=u),o.searchParams.has("authMechanismProperties")){var a=new i.CommaAndColonSeparatedRecord(o.searchParams.get("authMechanismProperties"));a.get("AWS_SESSION_TOKEN")&&(a.set("AWS_SESSION_TOKEN",u),o.searchParams.set("authMechanismProperties",a.toString()))}return o.searchParams.has("tlsCertificateKeyFilePassword")&&o.searchParams.set("tlsCertificateKeyFilePassword",u),o.searchParams.has("proxyUsername")&&s&&o.searchParams.set("proxyUsername",u),o.searchParams.has("proxyPassword")&&o.searchParams.set("proxyPassword",u),o};var r=function e(e,t){var r,n;var o=(r=t===null||t===void 0?void 0:t.replacementString)!==null&&r!==void 0?r:"<credentials>",u=(n=t===null||t===void 0?void 0:t.redactUsernames)!==null&&n!==void 0?n:!0,s;try{s=new i.default(e)}catch(e){}if(s)return t=F(B({},t),{replacementString:"___credentials___"}),s.redact(t).toString().replace(/___credentials___/g,o);var a=o,c=[function(e){return e.replace(u?/(\/\/)(.*)(@)/g:/(\/\/[^@]*:)(.*)(@)/g,"$1".concat(a,"$3"))},function(e){return e.replace(/(AWS_SESSION_TOKEN(:|%3A))([^,&]+)/gi,"$1".concat(a))},function(e){return e.replace(/(tlsCertificateKeyFilePassword=)([^&]+)/gi,"$1".concat(a))},function(e){return u?e.replace(/(proxyUsername=)([^&]+)/gi,"$1".concat(a)):e},function(e){return e.replace(/(proxyPassword=)([^&]+)/gi,"$1".concat(a))}];var l=true,d=false,f=undefined;try{for(var h=c[Symbol.iterator](),v;!(l=(v=h.next()).done);l=true){var p=v.value;e=p(e)}}catch(e){d=true;f=e}finally{try{if(!l&&h.return!=null){h.return()}}finally{if(d){throw f}}}return e};ei();var n=e&&e.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function e(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),o=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(e,"__esModule",{value:!0});e.redactConnectionString=e.redactValidConnectionString=void 0;var i=u(tX());e.redactValidConnectionString=t;e.redactConnectionString=r});var tX=et(function(e){"use strict";var t=function e(e){return e.startsWith("mongodb://")||e.startsWith("mongodb+srv://")};var r=function e(e){return /*#__PURE__*/function(e){A(t,e);function t(){f(this,t);return d(this,t,arguments)}p(t,[{key:"append",value:function e(e,r){return y(g(t.prototype),"append",this).call(this,this._normalizeKey(e),r)}},{key:"delete",value:function e(e){return y(g(t.prototype),"delete",this).call(this,this._normalizeKey(e))}},{key:"get",value:function e(e){return y(g(t.prototype),"get",this).call(this,this._normalizeKey(e))}},{key:"getAll",value:function e(e){return y(g(t.prototype),"getAll",this).call(this,this._normalizeKey(e))}},{key:"has",value:function e(e){return y(g(t.prototype),"has",this).call(this,this._normalizeKey(e))}},{key:"set",value:function e(e,r){return y(g(t.prototype),"set",this).call(this,this._normalizeKey(e),r)}},{key:"keys",value:function e(){return y(g(t.prototype),"keys",this).call(this)}},{key:"values",value:function e(){return y(g(t.prototype),"values",this).call(this)}},{key:"entries",value:function e(){return y(g(t.prototype),"entries",this).call(this)}},{key:Symbol.iterator,value:function e(){return y(g(t.prototype),Symbol.iterator,this).call(this)}},{key:"_normalizeKey",value:function e(e){return a.prototype._normalizeKey.call(this,e)}}]);return t}(e)};ei();Object.defineProperty(e,"__esModule",{value:!0});e.CommaAndColonSeparatedRecord=e.ConnectionString=e.redactConnectionString=void 0;var o=t$(),u=tJ();Object.defineProperty(e,"redactConnectionString",{enumerable:!0,get:function e(){return u.redactConnectionString}});var i="__this_is_a_placeholder__";var s=RegExp("^(?<protocol>[^/]+):\\/\\/(?:(?<username>[^:@]*)(?::(?<password>[^@]*))?@)?(?<hosts>(?!:)[^/?@]*)(?<rest>.*)"),a=/*#__PURE__*/function(e){A(t,e);function t(){f(this,t);return d(this,t,arguments)}p(t,[{key:"delete",value:function e(e){return y(g(t.prototype),"delete",this).call(this,this._normalizeKey(e))}},{key:"get",value:function e(e){return y(g(t.prototype),"get",this).call(this,this._normalizeKey(e))}},{key:"has",value:function e(e){return y(g(t.prototype),"has",this).call(this,this._normalizeKey(e))}},{key:"set",value:function e(e,r){return y(g(t.prototype),"set",this).call(this,this._normalizeKey(e),r)}},{key:"_normalizeKey",value:function e(e){e="".concat(e);var t=true,r=false,n=undefined;try{for(var o=this.keys()[Symbol.iterator](),u;!(t=(u=o.next()).done);t=true){var i=u.value;if(i.toLowerCase()===e.toLowerCase()){e=i;break}}}catch(e){r=true;n=e}finally{try{if(!t&&o.return!=null){o.return()}}finally{if(r){throw n}}}return e}}]);return t}(V(Map));var c=/*#__PURE__*/function(e){A(t,e);function t(){f(this,t);return d(this,t,arguments)}return t}(o.URL),l=/*#__PURE__*/function(e){A(t,e);function t(){f(this,t);return d(this,t,arguments)}p(t,[{key:"name",get:function e(){return"MongoParseError"}}]);return t}(V(Error)),h=/*#__PURE__*/function(e){A(o,e);function o(e){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};f(this,o);var a;var c;var h=u.looseValidation;if(!h&&!t(e))throw new l('Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://"');var v=e.match(s);if(!v)throw new l('Invalid connection string "'.concat(e,'"'));var p=(c=v.groups)!==null&&c!==void 0?c:{},m=p.protocol,E=p.username,y=p.password,g=p.hosts,A=p.rest;if(!h){if(!m||!g)throw new l('Protocol and host list are required in "'.concat(e,'"'));try{decodeURIComponent(E!==null&&E!==void 0?E:""),decodeURIComponent(y!==null&&y!==void 0?y:"")}catch(e){throw new l(e.message)}var C=/[:/?#[\]@]/gi;if(E===null||E===void 0?void 0:E.match(C))throw new l("Username contains unescaped characters ".concat(E));if(!E||!y){var S=e.replace("".concat(m,"://"),"");if(S.startsWith("@")||S.startsWith(":"))throw new l("URI contained empty userinfo section")}if(y===null||y===void 0?void 0:y.match(C))throw new l("Password contains unescaped characters")}var b="";typeof E=="string"&&(b+=E),typeof y=="string"&&(b+=":".concat(y)),b&&(b+="@");try{a=d(this,o,["".concat(m.toLowerCase(),"://").concat(b).concat(i).concat(A)])}catch(t){throw h&&new o(e,F(B({},u),{looseValidation:!1})),typeof t.message=="string"&&(t.message=t.message.replace(i,g)),t}if(n(a)._hosts=g.split(","),!h){if(n(a).isSRV&&n(a).hosts.length!==1)throw new l("mongodb+srv URI cannot have multiple service names");if(n(a).isSRV&&n(a).hosts.some(function(e){return e.includes(":")}))throw new l("mongodb+srv URI cannot have port number")}n(a).pathname||(n(a).pathname="/"),Object.setPrototypeOf(n(a).searchParams,r(n(a).searchParams.constructor).prototype);return n(a)}p(o,[{key:"host",get:function e(){return i},set:function e(e){throw new Error("No single host for connection string")}},{key:"hostname",get:function e(){return i},set:function e(e){throw new Error("No single host for connection string")}},{key:"port",get:function e(){return""},set:function e(e){throw new Error("No single host for connection string")}},{key:"href",get:function e(){return this.toString()},set:function e(e){throw new Error("Cannot set href for connection strings")}},{key:"isSRV",get:function e(){return this.protocol.includes("srv")}},{key:"hosts",get:function e(){return this._hosts},set:function e(e){this._hosts=e}},{key:"toString",value:function e(){return y(g(o.prototype),"toString",this).call(this).replace(i,this.hosts.join(","))}},{key:"clone",value:function e(){return new o(this.toString(),{looseValidation:!0})}},{key:"redact",value:function e(e){return(0,u.redactValidConnectionString)(this,e)}},{key:"typedSearchParams",value:function e(){return this.searchParams}},{key:Symbol.for("nodejs.util.inspect.custom"),value:function e(){var e=this,t=e.href,r=e.origin,n=e.protocol,o=e.username,u=e.password,i=e.hosts,s=e.pathname,a=e.search,c=e.searchParams,l=e.hash;return{href:t,origin:r,protocol:n,username:o,password:u,hosts:i,pathname:s,search:a,searchParams:c,hash:l}}}]);return o}(c);e.ConnectionString=h;var v=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);var r;r=d(this,t);var n=true,o=false,u=undefined;try{for(var i=(e!==null&&e!==void 0?e:"").split(",")[Symbol.iterator](),s;!(n=(s=i.next()).done);n=true){var a=s.value;if(!a)continue;var c=a.indexOf(":");c===-1?r.set(a,""):r.set(a.slice(0,c),a.slice(c+1))}}catch(e){o=true;u=e}finally{try{if(!n&&i.return!=null){i.return()}}finally{if(o){throw u}}}return r}p(t,[{key:"toString",value:function e(){return U(this).map(function(e){return e.join(":")}).join(",")}}]);return t}(a);e.CommaAndColonSeparatedRecord=v;e.default=h});var tQ=et(function(e,t){t.exports={name:"mongodb",version:"6.15.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.9",bson:"^6.10.3","mongodb-connection-string-url":"^3.0.0"},peerDependencies:{"@aws-sdk/credential-providers":"^3.188.0","@mongodb-js/zstd":"^1.1.0 || ^2.0.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.632.0","@iarna/toml":"^2.2.5","@istanbuljs/nyc-config-typescript":"^1.0.2","@microsoft/api-extractor":"^7.49.2","@microsoft/tsdoc-config":"^0.17.1","@mongodb-js/zstd":"^2.0.0","@types/chai":"^4.3.17","@types/chai-subset":"^1.3.5","@types/express":"^4.17.21","@types/kerberos":"^1.1.5","@types/mocha":"^10.0.9","@types/node":"^22.13.0","@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.5","@typescript-eslint/eslint-plugin":"8.4.0","@typescript-eslint/parser":"8.4.0",chai:"^4.4.1","chai-subset":"^1.6.0",chalk:"^4.1.2",eslint:"9.9.0","eslint-config-prettier":"^9.1.0","eslint-plugin-mocha":"^10.4.1","eslint-plugin-prettier":"^5.2.3","eslint-plugin-simple-import-sort":"^12.1.1","eslint-plugin-tsdoc":"^0.4.0","eslint-plugin-unused-imports":"^4.1.4",express:"^4.21.2","gcp-metadata":"^5.3.0","js-yaml":"^4.1.0",mocha:"^10.8.2","mocha-sinon":"^2.1.2","mongodb-client-encryption":"^6.3.0","mongodb-legacy":"^6.1.3",nyc:"^15.1.0",prettier:"^3.4.2",semver:"^7.7.0",sinon:"^18.0.0","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.2",typescript:"5.5","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_USE_FLAT_CONFIG=false eslint --no-ignore --fix mongodb.d.ts lib/beta.d.ts","build:docs":"./etc/docs/build.ts","build:typedoc":"typedoc","build:nightly":"node ./.github/scripts/nightly.mjs","check:bench":"npm --prefix test/benchmarks/driver_bench start","check:coverage":"nyc npm run test:all","check:integration-coverage":"nyc npm run check:test","check:lambda":"mocha --config test/mocha_lambda.js test/integration/node-specific/examples/handler.test.js","check:lambda:aws":"mocha --config test/mocha_lambda.js 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":"npm run build:dts && ESLINT_USE_FLAT_CONFIG=false eslint -v && ESLINT_USE_FLAT_CONFIG=false 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.js test/manual/search-index-management.prose.test.ts","check:test":"mocha --config test/mocha_mongodb.js 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.js test/manual/atlas_connectivity.test.ts","check:resource-management":"mocha --config test/manual/mocharc.js test/manual/resource_management.test.ts","check:drivers-atlas-testing":"mocha --config test/mocha_mongodb.js test/atlas/drivers_atlas_testing.test.ts","check:adl":"mocha --config test/mocha_mongodb.js test/manual/atlas-data-lake-testing","check:aws":"nyc mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_aws.test.ts","check:oidc-auth":"mocha --config test/mocha_mongodb.js test/integration/auth/auth.spec.test.ts","check:oidc-test":"mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_oidc.prose.test.ts","check:oidc-azure":"mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_oidc_azure.prose.05.test.ts","check:oidc-gcp":"mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_oidc_gcp.prose.06.test.ts","check:oidc-k8s":"mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_oidc_k8s.prose.07.test.ts","check:kerberos":"nyc mocha --config test/manual/mocharc.js test/manual/kerberos.test.ts","check:tls":"mocha --config test/manual/mocharc.js test/manual/tls_support.test.ts","check:ldap":"nyc mocha --config test/manual/mocharc.js test/manual/ldap.test.ts","check:socks5":"mocha --config test/manual/mocharc.js test/manual/socks5.test.ts","check:csfle":"mocha --config test/mocha_mongodb.js 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"}}}});var tZ=et(function(e){"use strict";var t=function e(e){var t=new v(512),r=e.appName,n=r===void 0?"":r;if(n.length>0){var a=Buffer.byteLength(n,"utf8")<=128?e.appName:Buffer.from(n,"utf8").subarray(0,128).toString("utf8");t.ifItFitsItSits("application",{name:a})}var c=e.driverInfo,d=c.name,f=d===void 0?"":d,p=c.version,m=p===void 0?"":p,E=c.platform,y=E===void 0?"":E,g={name:f.length>0?"nodejs|".concat(f):"nodejs",version:m.length>0?"".concat(h,"|").concat(m):h};if(!t.ifItFitsItSits("driver",g))throw new l.MongoInvalidArgumentError("Unable to include driverInfo name and version, metadata cannot exceed 512 bytes");var A=u();if(y.length>0&&(A="".concat(A,"|").concat(y)),!t.ifItFitsItSits("platform",A))throw new l.MongoInvalidArgumentError("Unable to include driverInfo platform, metadata cannot exceed 512 bytes");var C=new Map().set("name",s.platform).set("architecture",s.arch).set("version",i.release()).set("type",i.type());if(!t.ifItFitsItSits("os",C)){var S=true,b=false,O=undefined;try{for(var w=C.keys()[Symbol.iterator](),_;!(S=(_=w.next()).done);S=true){var D=_.value;if(C.delete(D),C.size===0||t.ifItFitsItSits("os",C))break}}catch(e){b=true;O=e}finally{try{if(!S&&w.return!=null){w.return()}}finally{if(b){throw O}}}}var B=o();if(B!=null&&!t.ifItFitsItSits("env",B)){var T=true,F=false,M=undefined;try{for(var R=B.keys()[Symbol.iterator](),k;!(T=(k=R.next()).done);T=true){var I=k.value;if(B.delete(I),B.size===0||t.ifItFitsItSits("env",B))break}}catch(e){F=true;M=e}finally{try{if(!T&&R.return!=null){R.return()}}finally{if(F){throw M}}}}return t.toObject()};var r=function e(){return E.apply(this,arguments)};var n=function e(e){return y.apply(this,arguments)};var o=function e(){var e=s.env,t=e.AWS_EXECUTION_ENV,r=t===void 0?"":t,n=e.AWS_LAMBDA_RUNTIME_API,o=n===void 0?"":n,u=e.FUNCTIONS_WORKER_RUNTIME,i=u===void 0?"":u,a=e.K_SERVICE,l=a===void 0?"":a,d=e.FUNCTION_NAME,f=d===void 0?"":d,h=e.VERCEL,v=h===void 0?"":h,p=e.AWS_LAMBDA_FUNCTION_MEMORY_SIZE,m=p===void 0?"":p,E=e.AWS_REGION,y=E===void 0?"":E,g=e.FUNCTION_MEMORY_MB,A=g===void 0?"":g,C=e.FUNCTION_REGION,S=C===void 0?"":C,b=e.FUNCTION_TIMEOUT_SEC,O=b===void 0?"":b,w=e.VERCEL_REGION,_=w===void 0?"":w,D=r.startsWith("AWS_Lambda_")||o.length>0,B=i.length>0,T=l.length>0||f.length>0,F=v.length>0,M=new Map;return F&&!(B||T)?(_.length>0&&M.set("region",_),M.set("name","vercel"),M):D&&!(B||T||F)?(y.length>0&&M.set("region",y),m.length>0&&Number.isInteger(+m)&&M.set("memory_mb",new c.Int32(m)),M.set("name","aws.lambda"),M):B&&!(T||D||F)?(M.set("name","azure.func"),M):T&&!(B||D||F)?(S.length>0&&M.set("region",S),A.length>0&&Number.isInteger(+A)&&M.set("memory_mb",new c.Int32(A)),O.length>0&&Number.isInteger(+O)&&M.set("timeout_sec",new c.Int32(O)),M.set("name","gcp.func"),M):null};var u=function e(){var e,t,r,n,o,u;return"Deno"in globalThis?"Deno v".concat(typeof((t=Deno)===null||t===void 0?void 0:(e=t.version)===null||e===void 0?void 0:e.deno)=="string"?(n=Deno)===null||n===void 0?void 0:(r=n.version)===null||r===void 0?void 0:r.deno:"0.0.0-unknown",", ").concat(i.endianness()):"Bun"in globalThis?"Bun v".concat(typeof((o=Bun)===null||o===void 0?void 0:o.version)=="string"?(u=Bun)===null||u===void 0?void 0:u.version:"0.0.0-unknown",", ").concat(i.endianness()):"Node.js ".concat(s.version,", ").concat(i.endianness())};ei();Object.defineProperty(e,"__esModule",{value:!0});e.LimitedSizeDocument=void 0;e.makeClientMetadata=t;e.addContainerMetadata=n;e.getFAASEnv=o;var i=Z("os"),s=Z("process"),c=ea(),l=ec(),d=eg(),h=tQ().version,v=/*#__PURE__*/function(){function e(t){f(this,e);this.maxSize=t,this.document=new Map,this.documentSize=5}p(e,[{key:"ifItFitsItSits",value:function e(e,t){var r=c.BSON.serialize(new Map().set(e,t)).byteLength-5;return r+this.documentSize>this.maxSize?!1:(this.documentSize+=r,this.document.set(e,t),!0)}},{key:"toObject",value:function e(){return c.BSON.deserialize(c.BSON.serialize(this.document),{promoteLongs:!1,promoteBuffers:!1,promoteValues:!1,useBigInt64:!1})}}]);return e}();e.LimitedSizeDocument=v;var m;function E(){E=a(function(){var e,t,r,n,o,u;return H(this,function(i){switch(i.label){case 0:e={};m!==null&&m!==void 0?m:m=(0,d.fileIsAccessible)("/.dockerenv");return[4,m];case 1:t=i.sent(),r=s.env,n=r.KUBERNETES_SERVICE_HOST,o=n===void 0?"":n,u=o.length>0;return[2,(t&&(e.runtime="docker"),u&&(e.orchestrator="kubernetes"),e)]}})});return E.apply(this,arguments)}function y(){y=a(function(e){var t,n,o,u,i,s,a,c,l,d,f;return H(this,function(h){switch(h.label){case 0:return[4,r()];case 1:t=h.sent();if(Object.keys(t).length===0)return[2,e];n=new v(512),o=F(B({},e===null||e===void 0?void 0:e.env),{container:t});u=true,i=false,s=undefined;try{for(a=Object.entries(e)[Symbol.iterator]();!(u=(c=a.next()).done);u=true){l=N(c.value,2),d=l[0],f=l[1];d!=="env"?n.ifItFitsItSits(d,f):n.ifItFitsItSits("env",o)||n.ifItFitsItSits("env",f)}}catch(e){i=true;s=e}finally{try{if(!u&&a.return!=null){a.return()}}finally{if(i){throw s}}}return[2,("env"in e||n.ifItFitsItSits("env",o),n.toObject())]}})});return y.apply(this,arguments)}});var t1=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.OpCompressedRequest=e.OpMsgResponse=e.OpMsgRequest=e.DocumentSequence=e.OpReply=e.OpQueryRequest=void 0;var t=ea(),r=ec(),n=t0(),o=eh(),u=0,i=2,s=4,c=8,l=16,d=32,h=64,v=128,m=1,E=2,y=4,g=8,A=t.BSON.onDemand.ByteUtils.encodeUTF8Into,S=/*#__PURE__*/function(){function e(t,n,o){f(this,e);this.databaseName=t,this.query=n,this.moreToCome=!1;var u="".concat(t,".$cmd");if(typeof t!="string")throw new r.MongoRuntimeError("Database name must be a string for a query");if(n==null)throw new r.MongoRuntimeError("A query document must be specified for query");if(u.indexOf("\0")!==-1)throw new r.MongoRuntimeError("Namespace cannot contain a null character");var i;this.ns=u,this.numberToSkip=o.numberToSkip||0,this.numberToReturn=o.numberToReturn||0,this.returnFieldSelector=o.returnFieldSelector||void 0,this.requestId=(i=o.requestId)!==null&&i!==void 0?i:e.getRequestId(),this.pre32Limit=o.pre32Limit,this.serializeFunctions=typeof o.serializeFunctions=="boolean"?o.serializeFunctions:!1,this.ignoreUndefined=typeof o.ignoreUndefined=="boolean"?o.ignoreUndefined:!1,this.maxBsonSize=o.maxBsonSize||1024*1024*16,this.checkKeys=typeof o.checkKeys=="boolean"?o.checkKeys:!1,this.batchSize=this.numberToReturn,this.tailable=!1,this.secondaryOk=typeof o.secondaryOk=="boolean"?o.secondaryOk:!1,this.oplogReplay=!1,this.noCursorTimeout=!1,this.awaitData=!1,this.exhaust=!1,this.partial=!1}p(e,[{key:"incRequestId",value:function e(){this.requestId=u++}},{key:"nextRequestId",value:function e(){return u+1}},{key:"toBin",value:function e(){var e=[],r=null,n=0;this.tailable&&(n|=i),this.secondaryOk&&(n|=s),this.oplogReplay&&(n|=c),this.noCursorTimeout&&(n|=l),this.awaitData&&(n|=d),this.exhaust&&(n|=h),this.partial&&(n|=v),this.batchSize!==this.numberToReturn&&(this.numberToReturn=this.batchSize);var u=Buffer.alloc(4*4+4+Buffer.byteLength(this.ns)+1+4+4);e.push(u);var a=t.serialize(this.query,{checkKeys:this.checkKeys,serializeFunctions:this.serializeFunctions,ignoreUndefined:this.ignoreUndefined});e.push(a),this.returnFieldSelector&&Object.keys(this.returnFieldSelector).length>0&&(r=t.serialize(this.returnFieldSelector,{checkKeys:this.checkKeys,serializeFunctions:this.serializeFunctions,ignoreUndefined:this.ignoreUndefined}),e.push(r));var f=u.length+a.length+(r?r.length:0),p=4;return u[3]=f>>24&255,u[2]=f>>16&255,u[1]=f>>8&255,u[0]=f&255,u[p+3]=this.requestId>>24&255,u[p+2]=this.requestId>>16&255,u[p+1]=this.requestId>>8&255,u[p]=this.requestId&255,p=p+4,u[p+3]=0,u[p+2]=0,u[p+1]=0,u[p]=0,p=p+4,u[p+3]=o.OP_QUERY>>24&255,u[p+2]=o.OP_QUERY>>16&255,u[p+1]=o.OP_QUERY>>8&255,u[p]=o.OP_QUERY&255,p=p+4,u[p+3]=n>>24&255,u[p+2]=n>>16&255,u[p+1]=n>>8&255,u[p]=n&255,p=p+4,p=p+u.write(this.ns,p,"utf8")+1,u[p-1]=0,u[p+3]=this.numberToSkip>>24&255,u[p+2]=this.numberToSkip>>16&255,u[p+1]=this.numberToSkip>>8&255,u[p]=this.numberToSkip&255,p=p+4,u[p+3]=this.numberToReturn>>24&255,u[p+2]=this.numberToReturn>>16&255,u[p+1]=this.numberToReturn>>8&255,u[p]=this.numberToReturn&255,p=p+4,e}}],[{key:"getRequestId",value:function e(){return++u}}]);return e}();e.OpQueryRequest=S;var b=/*#__PURE__*/function(){function e(t,r,n,o){f(this,e);this.index=0,this.sections=[],this.moreToCome=!1,this.parsed=!1,this.raw=t,this.data=n,this.opts=o!==null&&o!==void 0?o:{useBigInt64:!1,promoteLongs:!0,promoteValues:!0,promoteBuffers:!1,bsonRegExp:!1},this.length=r.length,this.requestId=r.requestId,this.responseTo=r.responseTo,this.opCode=r.opCode,this.fromCompressed=r.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}p(e,[{key:"isParsed",value:function e(){return this.parsed}},{key:"parse",value:function e(){if(this.parsed)return this.sections[0];if(this.index=20,this.responseFlags=this.data.readInt32LE(0),this.cursorId=new t.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>Math.pow(2,32)-1)throw new RangeError("OP_REPLY numberReturned is an invalid array length ".concat(this.numberReturned));this.cursorNotFound=(this.responseFlags&m)!==0,this.queryFailure=(this.responseFlags&E)!==0,this.shardConfigStale=(this.responseFlags&y)!==0,this.awaitCapable=(this.responseFlags&g)!==0;for(var e=0;e<this.numberReturned;e++){var r=this.data[this.index]|this.data[this.index+1]<<8|this.data[this.index+2]<<16|this.data[this.index+3]<<24,n=this.data.subarray(this.index,this.index+r);this.sections.push(n),this.index=this.index+r}return this.parsed=!0,this.sections[0]}}]);return e}();e.OpReply=b;var O=1,w=2,_=65536,D=/*#__PURE__*/function(){function e(r,n){f(this,e);this.field=r,this.documents=[],this.chunks=[],this.serializedDocumentsLength=0;var o=Buffer.allocUnsafe(5+this.field.length+1);var u=true,i=false,s=undefined;if(o[0]=1,A(o,"".concat(this.field,"\0"),5),this.chunks.push(o),this.header=o,n)try{for(var a=n[Symbol.iterator](),c;!(u=(c=a.next()).done);u=true){var l=c.value;this.push(l,t.serialize(l))}}catch(e){i=true;s=e}finally{try{if(!u&&a.return!=null){a.return()}}finally{if(i){throw s}}}}p(e,[{key:"push",value:function e(e,t){var r;return this.serializedDocumentsLength+=t.length,this.documents.push(e),this.chunks.push(t),(r=this.header)===null||r===void 0?void 0:r.writeInt32LE(4+this.field.length+1+this.serializedDocumentsLength,1),this.serializedDocumentsLength+this.header.length}},{key:"toBin",value:function e(){return Buffer.concat(this.chunks)}}]);return e}();e.DocumentSequence=D;var B=/*#__PURE__*/function(){function e(t,n,o){f(this,e);var u;if(this.databaseName=t,this.command=n,this.options=o,n==null)throw new r.MongoInvalidArgumentError("Query document must be specified for query");var i;this.command.$db=t,this.options=o!==null&&o!==void 0?o:{},this.requestId=o.requestId?o.requestId:e.getRequestId(),this.serializeFunctions=typeof o.serializeFunctions=="boolean"?o.serializeFunctions:!1,this.ignoreUndefined=typeof o.ignoreUndefined=="boolean"?o.ignoreUndefined:!1,this.checkKeys=typeof o.checkKeys=="boolean"?o.checkKeys:!1,this.maxBsonSize=o.maxBsonSize||1024*1024*16,this.checksumPresent=!1,this.moreToCome=(i=o.moreToCome)!==null&&i!==void 0?i:((u=n.writeConcern)===null||u===void 0?void 0:u.w)===0,this.exhaustAllowed=typeof o.exhaustAllowed=="boolean"?o.exhaustAllowed:!1}p(e,[{key:"toBin",value:function e(){var e=[],t=0;this.checksumPresent&&(t|=O),this.moreToCome&&(t|=w),this.exhaustAllowed&&(t|=_);var r=Buffer.alloc(4*4+4);e.push(r);var n=r.length,u=this.command;return n+=this.makeSections(e,u),r.writeInt32LE(n,0),r.writeInt32LE(this.requestId,4),r.writeInt32LE(0,8),r.writeInt32LE(o.OP_MSG,12),r.writeUInt32LE(t,16),e}},{key:"makeSections",value:function e(e,t){var r=this.extractDocumentSequences(t),n=Buffer.allocUnsafe(1);n[0]=0;var o=this.serializeBson(t);return e.push(n),e.push(o),e.push(r),n.length+o.length+r.length}},{key:"extractDocumentSequences",value:function e(e){var t=[];var r=true,n=false,o=undefined;try{for(var u=Object.entries(e)[Symbol.iterator](),i;!(r=(i=u.next()).done);r=true){var s=N(i.value,2),a=s[0],c=s[1];C(c,D)&&(t.push(c.toBin()),delete e[a])}}catch(e){n=true;o=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw o}}}return t.length>0?Buffer.concat(t):Buffer.alloc(0)}},{key:"serializeBson",value:function e(e){return t.serialize(e,{checkKeys:this.checkKeys,serializeFunctions:this.serializeFunctions,ignoreUndefined:this.ignoreUndefined})}}],[{key:"getRequestId",value:function e(){return u=u+1&0x7fffffff,u}}]);return e}();e.OpMsgRequest=B;var T=/*#__PURE__*/function(){function e(t,r,n,o){f(this,e);this.index=0,this.sections=[],this.parsed=!1,this.raw=t,this.data=n,this.opts=o!==null&&o!==void 0?o:{useBigInt64:!1,promoteLongs:!0,promoteValues:!0,promoteBuffers:!1,bsonRegExp:!1},this.length=r.length,this.requestId=r.requestId,this.responseTo=r.responseTo,this.opCode=r.opCode,this.fromCompressed=r.fromCompressed,this.responseFlags=n.readInt32LE(0),this.checksumPresent=(this.responseFlags&O)!==0,this.moreToCome=(this.responseFlags&w)!==0,this.exhaustAllowed=(this.responseFlags&_)!==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}p(e,[{key:"isParsed",value:function e(){return this.parsed}},{key:"parse",value:function e(){if(this.parsed)return this.sections[0];for(this.index=4;this.index<this.data.length;){var e=this.data.readUInt8(this.index++);if(e===0){var t=this.data.readUInt32LE(this.index),n=this.data.subarray(this.index,this.index+t);this.sections.push(n),this.index+=t}else if(e===1)throw new r.MongoRuntimeError("OP_MSG Payload Type 1 detected unsupported protocol")}return this.parsed=!0,this.sections[0]}}]);return e}();e.OpMsgResponse=T;var F=16,M=9,R=/*#__PURE__*/function(){function e(t,r){f(this,e);this.command=t,this.options=r}p(e,[{key:"toBin",value:function e(){var e=this;return a(function(){var t,r,u,i,s,a;return H(this,function(c){switch(c.label){case 0:t=Buffer.concat(e.command.toBin()),r=t.slice(F),u=t.readInt32LE(12);return[4,(0,n.compress)(e.options,r)];case 1:i=c.sent(),s=Buffer.alloc(F);s.writeInt32LE(F+M+i.length,0),s.writeInt32LE(e.command.requestId,4),s.writeInt32LE(0,8),s.writeInt32LE(o.OP_COMPRESSED,12);a=Buffer.alloc(M);return[2,(a.writeInt32LE(u,0),a.writeInt32LE(r.length,4),a.writeUInt8(n.Compressor[e.options.agreedCompressor],8),[s,a,i])]}})})()}}],[{key:"canCompress",value:function e(e){var t=C(e,B)?e.command:e.query,r=Object.keys(t)[0];return!n.uncompressibleCommands.has(r)}}]);return e}();e.OpCompressedRequest=R});var t0=et(function(e){"use strict";var t=function e(){if(g==null){var e=(0,d.getSnappy)();if("kModuleError"in e)throw e.kModuleError;g=e}return g};var r=function e(e,t){return A.apply(this,arguments)};var n=function e(e,t){return C.apply(this,arguments)};var o=function e(){y||(y=(0,d.getZstdLibrary)())};var u=function e(e,t){return b.apply(this,arguments)};var i=function e(e){return O.apply(this,arguments)};ei();Object.defineProperty(e,"__esModule",{value:!0});e.uncompressibleCommands=e.Compressor=void 0;e.compress=r;e.decompress=n;e.compressCommand=u;e.decompressResponse=i;var s=Z("util"),c=Z("zlib"),l=ev(),d=tn(),f=ec(),h=t1(),v=eh();e.Compressor=Object.freeze({none:0,snappy:1,zlib:2,zstd:3});e.uncompressibleCommands=new Set([l.LEGACY_HELLO_COMMAND,"saslStart","saslContinue","getnonce","authenticate","createUser","updateUser","copydbSaslStart","copydbgetnonce","copydb"]);var p=3,m=(0,s.promisify)(c.inflate.bind(c)),E=(0,s.promisify)(c.deflate.bind(c)),y,g=null;function A(){A=a(function(e,r){var n,u;return H(this,function(i){switch(i.label){case 0:n={};u=e.agreedCompressor;switch(u){case"snappy":return[3,1];case"zstd":return[3,3];case"zlib":return[3,5]}return[3,7];case 1:g!==null&&g!==void 0?g:g=t();return[4,g.compress(r)];case 2:return[2,i.sent()];case 3:if(o(),"kModuleError"in y)throw y.kModuleError;return[4,y.compress(r,p)];case 4:return[2,i.sent()];case 5:e.zlibCompressionLevel&&(n.level=e.zlibCompressionLevel);return[4,E(r,n)];case 6:return[2,i.sent()];case 7:throw new f.MongoInvalidArgumentError("Unknown compressor ".concat(e.agreedCompressor," failed to compress"));case 8:return[2]}})});return A.apply(this,arguments)}function C(){C=a(function(r,n){return H(this,function(u){switch(u.label){case 0:if(r!==e.Compressor.snappy&&r!==e.Compressor.zstd&&r!==e.Compressor.zlib&&r!==e.Compressor.none)throw new f.MongoDecompressionError("Server sent message compressed using an unsupported compressor. (Received compressor ID ".concat(r,")"));switch(r){case e.Compressor.snappy:return[3,1];case e.Compressor.zstd:return[3,3];case e.Compressor.zlib:return[3,5]}return[3,7];case 1:g!==null&&g!==void 0?g:g=t();return[4,g.uncompress(n,{asBuffer:!0})];case 2:return[2,u.sent()];case 3:if(o(),"kModuleError"in y)throw y.kModuleError;return[4,y.decompress(n)];case 4:return[2,u.sent()];case 5:return[4,m(n)];case 6:return[2,u.sent()];case 7:return[2,n];case 8:return[2]}})});return C.apply(this,arguments)}var S=16;function b(){b=a(function(e,t){var r,n,o;return H(this,function(u){switch(u.label){case 0:return[4,(t.agreedCompressor==="none"||!h.OpCompressedRequest.canCompress(e)?e:new h.OpCompressedRequest(e,{agreedCompressor:(r=t.agreedCompressor)!==null&&r!==void 0?r:"none",zlibCompressionLevel:(n=t.zlibCompressionLevel)!==null&&n!==void 0?n:0})).toBin()];case 1:o=u.sent();return[2,Buffer.concat(o)]}})});return b.apply(this,arguments)}function O(){O=a(function(e){var t,r,o,u,i,s,a,c;return H(this,function(l){switch(l.label){case 0:t={length:e.readInt32LE(0),requestId:e.readInt32LE(4),responseTo:e.readInt32LE(8),opCode:e.readInt32LE(12)};if(t.opCode!==v.OP_COMPRESSED){r=t.opCode===v.OP_MSG?h.OpMsgResponse:h.OpReply,o=e.subarray(S);return[2,new r(e,t,o)]}u=F(B({},t),{fromCompressed:!0,opCode:e.readInt32LE(S),length:e.readInt32LE(S+4)}),i=e[S+8],s=e.slice(S+9),a=u.opCode===v.OP_MSG?h.OpMsgResponse:h.OpReply;return[4,n(i,s)];case 1:c=l.sent();if(c.length!==u.length)throw new f.MongoDecompressionError("Message body and message header must be the same length");return[2,new a(e,u,c)]}})});return O.apply(this,arguments)}});var t2=et(function(e){"use strict";var t=function e(e,t){return function(r,n,o,u){var s;try{var a=i[e](t,r,n);a.setAutoPadding(!1),s=a.update(o);var c=a.final();c.length>0&&(s=Buffer.concat([s,c]))}catch(e){return e}return s.copy(u),s.length}};var r=function e(e,t){try{i.randomFillSync(e,0,t)}catch(e){return e}return t};var n=function e(e,t){var r;try{r=i.createHash("sha256").update(e).digest()}catch(e){return e}return r.copy(t),r.length};var o=function e(e){return function(t,r,n){var o;try{o=i.createHmac(e,t).update(r).digest()}catch(e){return e}return o.copy(n),o.length}};var u=function e(e,t,r){var n;try{var o=i.createSign("sha256WithRSAEncryption"),u=Buffer.from("-----BEGIN PRIVATE KEY-----\n".concat(e.toString("base64"),"\n-----END PRIVATE KEY-----\n"));n=o.update(t).end().sign(u)}catch(e){return e}return n.copy(r),n.length};ei();Object.defineProperty(e,"__esModule",{value:!0});e.hmacSha256Hook=e.hmacSha512Hook=e.aes256CtrDecryptHook=e.aes256CtrEncryptHook=e.aes256CbcDecryptHook=e.aes256CbcEncryptHook=void 0;e.makeAES256Hook=t;e.randomHook=r;e.sha256Hook=n;e.makeHmacHook=o;e.signRsaSha256Hook=u;var i=Z("crypto");e.aes256CbcEncryptHook=t("createCipheriv","aes-256-cbc");e.aes256CbcDecryptHook=t("createDecipheriv","aes-256-cbc");e.aes256CtrEncryptHook=t("createCipheriv","aes-256-ctr");e.aes256CtrDecryptHook=t("createDecipheriv","aes-256-ctr");e.hmacSha512Hook=o("sha512");e.hmacSha256Hook=o("sha256")});var t3=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.MongoCryptKMSRequestNetworkTimeoutError=e.MongoCryptAzureKMSRequestError=e.MongoCryptCreateEncryptedCollectionError=e.MongoCryptCreateDataKeyError=e.MongoCryptInvalidArgumentError=e.MongoCryptError=void 0;var t=ec(),r=/*#__PURE__*/function(e){A(t,e);function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};f(this,t);return d(this,t,[e,r])}p(t,[{key:"name",get:function e(){return"MongoCryptError"}}]);return t}(t.MongoError);e.MongoCryptError=r;var n=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);return d(this,t,[e])}p(t,[{key:"name",get:function e(){return"MongoCryptInvalidArgumentError"}}]);return t}(r);e.MongoCryptInvalidArgumentError=n;var o=/*#__PURE__*/function(e){A(t,e);function t(e,r){var n=r.cause;f(this,t);var o;o=d(this,t,["Unable to complete creating data keys: ".concat(n.message),{cause:n}]),o.encryptedFields=e;return o}p(t,[{key:"name",get:function e(){return"MongoCryptCreateDataKeyError"}}]);return t}(r);e.MongoCryptCreateDataKeyError=o;var u=/*#__PURE__*/function(e){A(t,e);function t(e,r){var n=r.cause;f(this,t);var o;o=d(this,t,["Unable to create collection: ".concat(n.message),{cause:n}]),o.encryptedFields=e;return o}p(t,[{key:"name",get:function e(){return"MongoCryptCreateEncryptedCollectionError"}}]);return t}(r);e.MongoCryptCreateEncryptedCollectionError=u;var i=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);var n;n=d(this,t,[e]),n.body=r;return n}p(t,[{key:"name",get:function e(){return"MongoCryptAzureKMSRequestError"}}]);return t}(r);e.MongoCryptAzureKMSRequestError=i;var s=/*#__PURE__*/function(e){A(t,e);function t(){f(this,t);return d(this,t,arguments)}p(t,[{key:"name",get:function e(){return"MongoCryptKMSRequestNetworkTimeoutError"}}]);return t}(r);e.MongoCryptKMSRequestNetworkTimeoutError=s});var t6=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.LegacyAWSTemporaryCredentialProvider=e.AWSSDKCredentialProvider=e.AWSTemporaryCredentialProvider=void 0;var t=tn(),r=ec(),n=eg(),o="http://169.254.170.2",u="http://169.254.169.254",i="/latest/meta-data/iam/security-credentials",s=/*#__PURE__*/function(){function e(){f(this,e)}p(e,null,[{key:"awsSDK",get:function r(){var r;return(r=e._awsSDK)!==null&&r!==void 0?r:e._awsSDK=(0,t.getAwsCredentialProvider)(),e._awsSDK}},{key:"isAWSSDKInstalled",get:function t(){return!("kModuleError"in e.awsSDK)}}]);return e}();e.AWSTemporaryCredentialProvider=s;var c=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);var r;r=d(this,t),e&&(r._provider=e);return r}p(t,[{key:"provider",get:function e(){if("kModuleError"in s.awsSDK)throw s.awsSDK.kModuleError;if(this._provider)return this._provider;var e=process.env,t=e.AWS_STS_REGIONAL_ENDPOINTS,r=t===void 0?"":t,n=e.AWS_REGION,o=n===void 0?"":n;r=r.toLowerCase(),o=o.toLowerCase();var u=o.length!==0&&r.length!==0,i=r==="regional"||r==="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(o);return this._provider=u&&i?s.awsSDK.fromNodeProviderChain({clientConfig:{region:o}}):s.awsSDK.fromNodeProviderChain(),this._provider}},{key:"getCredentials",value:function e(){var e=this;return a(function(){var t,n;return H(this,function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);return[4,e.provider()];case 1:t=o.sent();return[2,{AccessKeyId:t.accessKeyId,SecretAccessKey:t.secretAccessKey,Token:t.sessionToken,Expiration:t.expiration}];case 2:n=o.sent();throw new r.MongoAWSError(n.message,{cause:n});case 3:return[2]}})})()}}]);return t}(s);e.AWSSDKCredentialProvider=c;var l=/*#__PURE__*/function(e){A(t,e);function t(){f(this,t);return d(this,t,arguments)}p(t,[{key:"getCredentials",value:function e(){return a(function(){var e,t;return H(this,function(r){switch(r.label){case 0:if(!process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI)return[3,2];return[4,(0,n.request)("".concat(o).concat(process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI))];case 1:return[2,r.sent()];case 2:return[4,(0,n.request)("".concat(u,"/latest/api/token"),{method:"PUT",json:!1,headers:{"X-aws-ec2-metadata-token-ttl-seconds":30}})];case 3:e=r.sent();return[4,(0,n.request)("".concat(u,"/").concat(i),{json:!1,headers:{"X-aws-ec2-metadata-token":e}})];case 4:t=r.sent();return[4,(0,n.request)("".concat(u,"/").concat(i,"/").concat(t),{headers:{"X-aws-ec2-metadata-token":e}})];case 5:return[2,r.sent()]}})})()}}]);return t}(s);e.LegacyAWSTemporaryCredentialProvider=l});var t4=et(function(e){"use strict";var t=function e(e,t){return n.apply(this,arguments)};ei();Object.defineProperty(e,"__esModule",{value:!0});e.loadAWSCredentials=t;var r=t6();function n(){n=a(function(e,t){var n,o,u,i,s,a,c,l;return H(this,function(d){switch(d.label){case 0:n=new r.AWSSDKCredentialProvider(t);return[4,n.getCredentials()];case 1:o=d.sent(),u=o.SecretAccessKey,i=u===void 0?"":u,s=o.AccessKeyId,a=s===void 0?"":s,c=o.Token,l={secretAccessKey:i,accessKeyId:a};return[2,(c!=null&&(l.sessionToken=c),F(B({},e),{aws:l}))]}})});return n.apply(this,arguments)}});var t9=et(function(e){"use strict";var t=function e(e){return h.apply(this,arguments)};var r=function e(e,t,r){return e.searchParams.append("api-version","2018-02-01"),e.searchParams.append("resource",t),r&&e.searchParams.append("client_id",r),e};var n=function t(t){var n;var o;var u=new URL((o=(n=t.url)===null||n===void 0?void 0:n.toString())!==null&&o!==void 0?o:e.AZURE_BASE_URL);return r(u,"https://vault.azure.net"),{headers:F(B({},t.headers),{"Content-Type":"application/json",Metadata:!0}),url:u}};var o=function e(){return v.apply(this,arguments)};var u=function e(e){return m.apply(this,arguments)};ei();Object.defineProperty(e,"__esModule",{value:!0});e.tokenCache=e.AzureCredentialCache=e.AZURE_BASE_URL=void 0;e.addAzureParams=r;e.prepareRequest=n;e.fetchAzureKMSToken=o;e.loadAzureCredentials=u;var i=ec(),s=eg(),c=t3(),l=6e3;e.AZURE_BASE_URL="http://169.254.169.254/metadata/identity/oauth2/token?";var d=/*#__PURE__*/function(){function e(){f(this,e);this.cachedToken=null}p(e,[{key:"getToken",value:function e(){var e=this;return a(function(){var t;return H(this,function(r){switch(r.label){case 0:t=e.cachedToken==null||e.needsRefresh(e.cachedToken);if(!t)return[3,2];return[4,e._getToken()];case 1:t=e.cachedToken=r.sent();r.label=2;case 2:return[2,(t,{accessToken:e.cachedToken.accessToken})]}})})()}},{key:"needsRefresh",value:function e(e){return e.expiresOnTimestamp-Date.now()<=l}},{key:"resetCache",value:function e(){this.cachedToken=null}},{key:"_getToken",value:function e(){return o()}}]);return e}();e.AzureCredentialCache=d;e.tokenCache=new d;function h(){h=a(function(e){var t,r,n,o;return H(this,function(u){t=e.status,r=e.body,n=function(){try{return JSON.parse(r)}catch(e){throw new c.MongoCryptAzureKMSRequestError("Malformed JSON body in GET request.")}}();if(t!==200)throw new c.MongoCryptAzureKMSRequestError("Unable to complete request.",n);if(!n.access_token)throw new c.MongoCryptAzureKMSRequestError("Malformed response body - missing field `access_token`.");if(!n.expires_in)throw new c.MongoCryptAzureKMSRequestError("Malformed response body - missing field `expires_in`.");o=Number(n.expires_in)*1e3;if(Number.isNaN(o))throw new c.MongoCryptAzureKMSRequestError("Malformed response body - unable to parse int from `expires_in` field.");return[2,{accessToken:n.access_token,expiresOnTimestamp:Date.now()+o}]})});return h.apply(this,arguments)}function v(){v=a(function(){var e,r,o,u,a,l;var d=arguments;return H(this,function(f){switch(f.label){case 0:e=d.length>0&&d[0]!==void 0?d[0]:{};r=n(e),o=r.headers,u=r.url;f.label=1;case 1:f.trys.push([1,4,,5]);return[4,(0,s.get)(u,{headers:o})];case 2:a=f.sent();return[4,t(a)];case 3:return[2,f.sent()];case 4:l=f.sent();throw C(l,i.MongoNetworkTimeoutError)?new c.MongoCryptAzureKMSRequestError("[Azure KMS] ".concat(l.message)):l;case 5:return[2]}})});return v.apply(this,arguments)}function m(){m=a(function(t){var r;return H(this,function(n){switch(n.label){case 0:return[4,e.tokenCache.getToken()];case 1:r=n.sent();return[2,F(B({},t),{azure:r})]}})});return m.apply(this,arguments)}});var t7=et(function(e){"use strict";var t=function e(e){return n.apply(this,arguments)};ei();Object.defineProperty(e,"__esModule",{value:!0});e.loadGCPCredentials=t;var r=tn();function n(){n=a(function(e){var t,n,o;return H(this,function(u){switch(u.label){case 0:t=(0,r.getGcpMetadata)();if("kModuleError"in t)return[2,e];return[4,t.instance({property:"service-accounts/default/token"})];case 1:n=u.sent(),o=n.access_token;return[2,F(B({},e),{gcp:{accessToken:o}})]}})});return n.apply(this,arguments)}});var t8=et(function(e){"use strict";var t=function e(e,t){var r=t[e];return r==null?!1:(typeof r==="undefined"?"undefined":j(r))=="object"&&Object.keys(r).length===0};var r=function e(e,t){return i.apply(this,arguments)};ei();Object.defineProperty(e,"__esModule",{value:!0});e.isEmptyCredentials=t;e.refreshKMSCredentials=r;var n=t4(),o=t9(),u=t7();function i(){i=a(function(e,r){var i,s,a,c;return H(this,function(l){switch(l.label){case 0:i=e;s=t("aws",e);if(!s)return[3,2];return[4,(0,n.loadAWSCredentials)(i,r===null||r===void 0?void 0:r.aws)];case 1:s=i=l.sent();l.label=2;case 2:s;a=t("gcp",e);if(!a)return[3,4];return[4,(0,u.loadGCPCredentials)(i)];case 3:a=i=l.sent();l.label=4;case 4:a;c=t("azure",e);if(!c)return[3,6];return[4,(0,o.loadAzureCredentials)(i)];case 5:c=i=l.sent();l.label=6;case 6:return[2,(c,i)]}})});return i.apply(this,arguments)}});var t5=et(function(e){"use strict";var t=function e(){if(y==null){var e=(0,l.getSocks)();if("kModuleError"in e)throw e.kModuleError;y=e}return y};var r=function e(e){process.env.MONGODB_CRYPT_DEBUG&&console.error(e)};ei();Object.defineProperty(e,"__esModule",{value:!0});e.StateMachine=void 0;var n=Z("fs/promises"),o=Z("net"),i=Z("tls"),s=ea(),c=r0(),l=tn(),d=ec(),h=eA(),v=eg(),m=re(),E=t3(),y=null;var g=0,A=1,S=2,b=3,O=7,w=4,_=5,D=6,T=443,M=new Map([[g,"MONGOCRYPT_CTX_ERROR"],[A,"MONGOCRYPT_CTX_NEED_MONGO_COLLINFO"],[S,"MONGOCRYPT_CTX_NEED_MONGO_MARKINGS"],[b,"MONGOCRYPT_CTX_NEED_MONGO_KEYS"],[O,"MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS"],[w,"MONGOCRYPT_CTX_NEED_KMS"],[_,"MONGOCRYPT_CTX_READY"],[D,"MONGOCRYPT_CTX_DONE"]]),R=["tlsInsecure","tlsAllowInvalidCertificates","tlsAllowInvalidHostnames","tlsDisableOCSPEndpointCheck","tlsDisableCertificateRevocationCheck"];var k,I=/*#__PURE__*/function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:(0,s.pluckBSONSerializeOptions)(t);f(this,e);this.options=t,this.bsonOptions=r}p(e,[{key:"execute",value:function e(e,t,n){var o=this;return a(function(){var i,a,c,l,d,f,h,v,p,m,y,C,B,T,F,R,I,N,P,x,L,U,j,z,W,V,G,q,K,Y,$,J,X,Q,Z,ee,et;return H(this,function(H){switch(H.label){case 0:a=e._keyVaultNamespace,c=e._keyVaultClient,l=e._metaDataClient,d=e._mongocryptdClient,f=e._mongocryptdManager,h=null,v=function(){return t.status},p=function(){return t.state};H.label=1;case 1:if(!(p()!==D&&p()!==g))return[3,41];m=((i=n.signal)===null||i===void 0?void 0:i.throwIfAborted(),r("[context#".concat(t.id,"] ").concat(M.get(p())||p())),p());switch(m){case A:return[3,2];case S:return[3,15];case b:return[3,20];case O:return[3,34];case w:return[3,36];case _:return[3,38]}return[3,39];case 2:y=(0,s.deserialize)(t.nextMongoOperation());if(!l)throw new E.MongoCryptError("unreachable state machine state: entered MONGOCRYPT_CTX_NEED_MONGO_COLLINFO but metadata client is undefined");C=o.fetchCollectionInfo(l,t.ns,y,n);B=false,T=false;H.label=3;case 3:H.trys.push([3,8,9,14]);R=u(C);H.label=4;case 4:return[4,R.next()];case 5:if(!(B=!(I=H.sent()).done))return[3,7];N=I.value;P=N;if(t.addMongoOperationResponse((0,s.serialize)(P)),p()===g)return[3,7];H.label=6;case 6:B=false;return[3,4];case 7:return[3,14];case 8:x=H.sent();T=true;F=x;return[3,14];case 9:H.trys.push([9,,12,13]);if(!(B&&R.return!=null))return[3,11];return[4,R.return()];case 10:H.sent();H.label=11;case 11:return[3,13];case 12:if(T){throw F}return[7];case 13:return[7];case 14:if(p()===g)return[3,40];t.finishMongoOperation();return[3,40];case 15:L=t.nextMongoOperation();if(p()===g)return[3,40];if(!d)throw new E.MongoCryptError("unreachable state machine state: entered MONGOCRYPT_CTX_NEED_MONGO_MARKINGS but mongocryptdClient is undefined");if(!f)return[3,17];return[4,f.withRespawn(o.markCommand.bind(o,d,t.ns,L,n))];case 16:j=H.sent();return[3,19];case 17:return[4,o.markCommand(d,t.ns,L,n)];case 18:j=H.sent();H.label=19;case 19:U=j;t.addMongoOperationResponse(U),t.finishMongoOperation();return[3,40];case 20:z=t.nextMongoOperation();return[4,o.fetchKeys(c,a,z,n)];case 21:W=H.sent();W.length===0&&(h=k!==null&&k!==void 0?k:k=(0,s.serialize)({v:[]}));V=false,G=false;H.label=22;case 22:H.trys.push([22,27,28,33]);K=u(W);H.label=23;case 23:return[4,K.next()];case 24:if(!(V=!(Y=H.sent()).done))return[3,26];$=Y.value;J=$;t.addMongoOperationResponse((0,s.serialize)(J));H.label=25;case 25:V=false;return[3,23];case 26:return[3,33];case 27:X=H.sent();G=true;q=X;return[3,33];case 28:H.trys.push([28,,31,32]);if(!(V&&K.return!=null))return[3,30];return[4,K.return()];case 29:H.sent();H.label=30;case 30:return[3,32];case 31:if(G){throw q}return[7];case 32:return[7];case 33:t.finishMongoOperation();return[3,40];case 34:return[4,e.askForKMSCredentials()];case 35:Q=H.sent();t.provideKMSProviders((0,s.serialize)(Q));return[3,40];case 36:return[4,Promise.all(o.requests(t,n))];case 37:H.sent(),t.finishKMSRequests();return[3,40];case 38:{Z=t.finalize();if(p()===g){ee=v().message||"Finalization error";throw new E.MongoCryptError(ee)}h=Z;return[3,40]}H.label=39;case 39:throw new E.MongoCryptError("Unknown state: ".concat(p()));case 40:return[3,1];case 41:if(p()===g||h==null){et=v().message;throw et||r("unidentifiable error in MongoCrypt - received an error status from `libmongocrypt` but received no error message."),new E.MongoCryptError(et!==null&&et!==void 0?et:"unidentifiable error in MongoCrypt - received an error status from `libmongocrypt` but received no error message.")}return[2,h]}})})()}},{key:"kmsRequest",value:function e(e,r){var n=this;return a(function(){var u,s,a,c,l,f,p,g,A,S,b,O,w,_,D,M,R,k,I,N,P,x,L,U,j,z;function W(){for(var e=0,t=[p,f];e<t.length;e++){var r=t[e];r&&r.destroy()}}function V(e){return new E.MongoCryptError("KMS request failed",{cause:e})}function G(){return new E.MongoCryptError("KMS request closed")}return H(this,function(E){switch(E.label){case 0:u=e.endpoint.split(":"),s=u[1]!=null?Number.parseInt(u[1],10):T,a=B({host:u[0],servername:u[0],port:s},(0,m.autoSelectSocketOptions)(n.options.socketOptions||{})),c=e.message,l=new v.BufferPool;g=n.options.tlsOptions;if(!g)return[3,4];A=e.kmsProvider,S=g[A];if(!S)return[3,4];b=n.validateTlsOptions(A,S);if(b)throw b;E.label=1;case 1:E.trys.push([1,3,,4]);return[4,n.setTlsOptions(S,a)];case 2:E.sent();return[3,4];case 3:O=E.sent();throw V(O);case 4:E.trys.push([4,11,12,13]);if(!(n.options.proxyOptions&&n.options.proxyOptions.proxyHost))return[3,9];f=new o.Socket;M=(0,v.promiseWithResolvers)(),R=M.promise,k=M.reject,I=M.resolve;f.once("error",function(e){return k(V(e))}).once("close",function(){return k(G())}).once("connect",function(){return I()});N=F(B({},a),{host:n.options.proxyOptions.proxyHost,port:n.options.proxyOptions.proxyPort||1080});f.connect(N);return[4,R];case 5:E.sent();E.label=6;case 6:E.trys.push([6,8,,9]);y!==null&&y!==void 0?y:y=t();return[4,y.SocksClient.createConnection({existing_socket:f,command:"connect",destination:{host:a.host,port:a.port},proxy:{host:"iLoveJavaScript",port:0,type:5,userId:n.options.proxyOptions.proxyUsername,password:n.options.proxyOptions.proxyPassword}})];case 7:a.socket=E.sent().socket;return[3,9];case 8:P=E.sent();throw V(P);case 9:p=i.connect(a,function(){p.write(c)});x=(0,v.promiseWithResolvers)(),L=x.promise,U=x.reject,j=x.resolve;w=(0,v.addAbortListener)(r===null||r===void 0?void 0:r.signal,function(){W(),U(this.reason)}),p.once("error",function(e){return U(V(e))}).once("close",function(){return U(G())}).on("data",function(t){for(l.append(t);e.bytesNeeded>0&&l.length;){var r=Math.min(e.bytesNeeded,l.length);e.addResponse(l.read(r))}e.bytesNeeded<=0&&j()});return[4,(r===null||r===void 0?void 0:(_=r.timeoutContext)===null||_===void 0?void 0:_.csotEnabled())?Promise.all([L,h.Timeout.expires((D=r.timeoutContext)===null||D===void 0?void 0:D.remainingTimeMS)]):L];case 10:E.sent();return[3,13];case 11:z=E.sent();throw C(z,h.TimeoutError)?new d.MongoOperationTimeoutError("KMS request timed out"):z;case 12:W(),w===null||w===void 0?void 0:w[v.kDispose]();return[7];case 13:return[2]}})})()}},{key:"requests",value:function e(e,t){var r;return H(this,function(n){switch(n.label){case 0:r=e.nextKMSRequest();n.label=1;case 1:if(!(r!=null))return[3,4];return[4,this.kmsRequest(r,t)];case 2:n.sent();n.label=3;case 3:r=e.nextKMSRequest();return[3,1];case 4:return[2]}})}},{key:"validateTlsOptions",value:function e(e,t){var r=Object.keys(t);var n=true,o=false,u=undefined;try{for(var i=R[Symbol.iterator](),s;!(n=(s=i.next()).done);n=true){var a=s.value;if(r.includes(a))return new E.MongoCryptError("Insecure TLS options prohibited for ".concat(e,": ").concat(a))}}catch(e){o=true;u=e}finally{try{if(!n&&i.return!=null){i.return()}}finally{if(o){throw u}}}}},{key:"setTlsOptions",value:function e(e,t){return a(function(){var r,o;return H(this,function(u){switch(u.label){case 0:if(!e.tlsCertificateKeyFile)return[3,2];return[4,n.readFile(e.tlsCertificateKeyFile)];case 1:r=u.sent();t.cert=t.key=r;u.label=2;case 2:o=e.tlsCAFile;if(!o)return[3,4];return[4,n.readFile(e.tlsCAFile)];case 3:o=t.ca=u.sent();u.label=4;case 4:o,e.tlsCertificateKeyFilePassword&&(t.passphrase=e.tlsCertificateKeyFilePassword);return[2]}})})()}},{key:"fetchCollectionInfo",value:function e(e,t,r,n){var o=v.MongoDBCollectionNamespace.fromString(t),u=o.db;return e.db(u).listCollections(r,{promoteLongs:!1,promoteValues:!1,timeoutContext:(n===null||n===void 0?void 0:n.timeoutContext)&&new c.CursorTimeoutContext(n===null||n===void 0?void 0:n.timeoutContext,Symbol()),signal:n===null||n===void 0?void 0:n.signal,nameOnly:!1})}},{key:"markCommand",value:function e(e,t,r,n){var o=this;return a(function(){var u,i,a,c,l,d,f;return H(this,function(h){switch(h.label){case 0:i=v.MongoDBCollectionNamespace.fromString(t),a=i.db,c={promoteLongs:!1,promoteValues:!1},l=(0,s.deserialize)(r,c),d={timeoutMS:void 0,signal:void 0};(n===null||n===void 0?void 0:(u=n.timeoutContext)===null||u===void 0?void 0:u.csotEnabled())&&(d.timeoutMS=n.timeoutContext.remainingTimeMS),(n===null||n===void 0?void 0:n.signal)&&(d.signal=n.signal);return[4,e.db(a).command(l,B({},c,d))];case 1:f=h.sent();return[2,(0,s.serialize)(f,o.bsonOptions)]}})})()}},{key:"fetchKeys",value:function e(e,t,r,n){var o=v.MongoDBCollectionNamespace.fromString(t),u=o.db,i=o.collection,a={timeoutContext:void 0,signal:void 0};return(n===null||n===void 0?void 0:n.timeoutContext)!=null&&(a.timeoutContext=new c.CursorTimeoutContext(n.timeoutContext,Symbol())),(n===null||n===void 0?void 0:n.signal)!=null&&(a.signal=n.signal),e.db(u).collection(i,{readConcern:{level:"majority"}}).find((0,s.deserialize)(r),a).toArray()}}]);return e}();e.StateMachine=I});var re=et(function(e){"use strict";var t=function e(e){var t={autoSelectFamily:!0};return"autoSelectFamily"in e&&(t.autoSelectFamily=e.autoSelectFamily),"autoSelectFamilyAttemptTimeout"in e&&(t.autoSelectFamilyAttemptTimeout=e.autoSelectFamilyAttemptTimeout),t};ei();Object.defineProperty(e,"__esModule",{value:!0});e.ClientEncryption=void 0;e.autoSelectSocketOptions=t;var r=ea(),n=tn(),o=eA(),u=eg(),i=t2(),s=t3(),c=t8(),l=t5(),d=/*#__PURE__*/function(){function e(t,n){f(this,e);var o;var a,l;this._client=t,this._proxyOptions=(a=n.proxyOptions)!==null&&a!==void 0?a:{},this._tlsOptions=(l=n.tlsOptions)!==null&&l!==void 0?l:{},this._kmsProviders=n.kmsProviders||{};var d=(0,u.resolveTimeoutOptions)(t,n),h=d.timeoutMS;if(this._timeoutMS=h,this._credentialProviders=n.credentialProviders,((o=n.credentialProviders)===null||o===void 0?void 0:o.aws)&&!(0,c.isEmptyCredentials)("aws",this._kmsProviders))throw new s.MongoCryptInvalidArgumentError("Can only provide a custom AWS credential provider when the state machine is configured for automatic AWS credential fetching");if(n.keyVaultNamespace==null)throw new s.MongoCryptInvalidArgumentError("Missing required option `keyVaultNamespace`");var v=F(B({},n),{cryptoCallbacks:i,kmsProviders:Buffer.isBuffer(this._kmsProviders)?this._kmsProviders:(0,r.serialize)(this._kmsProviders)});this._keyVaultNamespace=n.keyVaultNamespace,this._keyVaultClient=n.keyVaultClient||t;var p=e.getMongoCrypt();this._mongoCrypt=new p(v)}p(e,[{key:"createDataKey",value:function e(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var i=this;return a(function(){var a,c,d,f,h,v,p,m,E,y,g,A,C,S;return H(this,function(b){switch(b.label){case 0:if(n.keyAltNames&&!Array.isArray(n.keyAltNames))throw new s.MongoCryptInvalidArgumentError('Option "keyAltNames" must be an array of strings, but was of type '.concat(j(n.keyAltNames),"."));n.keyAltNames&&n.keyAltNames.length>0&&(a=n.keyAltNames.map(function(e,t){if(typeof e!="string")throw new s.MongoCryptInvalidArgumentError('Option "keyAltNames" must be an array of strings, but item at index '.concat(t," was of type ").concat(typeof e==="undefined"?"undefined":j(e)));return(0,r.serialize)({keyAltName:e})}));n.keyMaterial&&(c=(0,r.serialize)({keyMaterial:n.keyMaterial}));f=(0,r.serialize)(B({provider:e},n.masterKey)),h=i._mongoCrypt.makeDataKeyContext(f,{keyAltNames:a,keyMaterial:c}),v=new l.StateMachine({proxyOptions:i._proxyOptions,tlsOptions:i._tlsOptions,socketOptions:t(i._client.s.options)}),p=(d=n===null||n===void 0?void 0:n.timeoutContext)!==null&&d!==void 0?d:o.TimeoutContext.create((0,u.resolveTimeoutOptions)(i._client,{timeoutMS:i._timeoutMS}));S=(0,r.deserialize);return[4,v.execute(i,h,{timeoutContext:p})];case 1:m=S.apply(void 0,[b.sent()]),E=u.MongoDBCollectionNamespace.fromString(i._keyVaultNamespace),y=E.db,g=E.collection;return[4,i._keyVaultClient.db(y).collection(g).insertOne(m,{writeConcern:{w:"majority"},timeoutMS:(p===null||p===void 0?void 0:p.csotEnabled())?p===null||p===void 0?void 0:p.getRemainingTimeMSOrThrow():void 0})];case 2:A=b.sent(),C=A.insertedId;return[2,C]}})})()}},{key:"rewrapManyDataKey",value:function e(e,n){var i=this;return a(function(){var s,a,c,d,f,h,v,p,m,E,y,g,A,C;return H(this,function(S){switch(S.label){case 0:if(n){a=Object.assign({provider:n.provider},n.masterKey);s=(0,r.serialize)(a)}c=(0,r.serialize)(e),d=i._mongoCrypt.makeRewrapManyDataKeyContext(c,s),f=new l.StateMachine({proxyOptions:i._proxyOptions,tlsOptions:i._tlsOptions,socketOptions:t(i._client.s.options)}),h=o.TimeoutContext.create((0,u.resolveTimeoutOptions)(i._client,{timeoutMS:i._timeoutMS}));m=(0,r.deserialize);return[4,f.execute(i,d,{timeoutContext:h})];case 1:v=m.apply(void 0,[S.sent()]),p=v.v;if(p.length===0)return[2,{}];E=u.MongoDBCollectionNamespace.fromString(i._keyVaultNamespace),y=E.db,g=E.collection,A=p.map(function(e){return{updateOne:{filter:{_id:e._id},update:{$set:{masterKey:e.masterKey,keyMaterial:e.keyMaterial},$currentDate:{updateDate:!0}}}}});C={};return[4,i._keyVaultClient.db(y).collection(g).bulkWrite(A,{writeConcern:{w:"majority"},timeoutMS:h.csotEnabled()?h===null||h===void 0?void 0:h.remainingTimeMS:void 0})];case 2:return[2,(C.bulkWriteResult=S.sent(),C)]}})})()}},{key:"deleteKey",value:function e(e){var t=this;return a(function(){var r,n,o;return H(this,function(i){switch(i.label){case 0:r=u.MongoDBCollectionNamespace.fromString(t._keyVaultNamespace),n=r.db,o=r.collection;return[4,t._keyVaultClient.db(n).collection(o).deleteOne({_id:e},{writeConcern:{w:"majority"},timeoutMS:t._timeoutMS})];case 1:return[2,i.sent()]}})})()}},{key:"getKeys",value:function e(){var e=u.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace),t=e.db,r=e.collection;return this._keyVaultClient.db(t).collection(r).find({},{readConcern:{level:"majority"},timeoutMS:this._timeoutMS})}},{key:"getKey",value:function e(e){var t=this;return a(function(){var r,n,o;return H(this,function(i){switch(i.label){case 0:r=u.MongoDBCollectionNamespace.fromString(t._keyVaultNamespace),n=r.db,o=r.collection;return[4,t._keyVaultClient.db(n).collection(o).findOne({_id:e},{readConcern:{level:"majority"},timeoutMS:t._timeoutMS})];case 1:return[2,i.sent()]}})})()}},{key:"getKeyByAltName",value:function e(e){var t=this;return a(function(){var r,n,o;return H(this,function(i){switch(i.label){case 0:r=u.MongoDBCollectionNamespace.fromString(t._keyVaultNamespace),n=r.db,o=r.collection;return[4,t._keyVaultClient.db(n).collection(o).findOne({keyAltNames:e},{readConcern:{level:"majority"},timeoutMS:t._timeoutMS})];case 1:return[2,i.sent()]}})})()}},{key:"addKeyAltName",value:function e(e,t){var r=this;return a(function(){var n,o,i;return H(this,function(s){switch(s.label){case 0:n=u.MongoDBCollectionNamespace.fromString(r._keyVaultNamespace),o=n.db,i=n.collection;return[4,r._keyVaultClient.db(o).collection(i).findOneAndUpdate({_id:e},{$addToSet:{keyAltNames:t}},{writeConcern:{w:"majority"},returnDocument:"before",timeoutMS:r._timeoutMS})];case 1:return[2,s.sent()]}})})()}},{key:"removeKeyAltName",value:function e(e,t){var r=this;return a(function(){var n,o,i,s;return H(this,function(a){switch(a.label){case 0:n=u.MongoDBCollectionNamespace.fromString(r._keyVaultNamespace),o=n.db,i=n.collection,s=[{$set:{keyAltNames:{$cond:[{$eq:["$keyAltNames",[t]]},"$$REMOVE",{$filter:{input:"$keyAltNames",cond:{$ne:["$$this",t]}}}]}}}];return[4,r._keyVaultClient.db(o).collection(i).findOneAndUpdate({_id:e},s,{writeConcern:{w:"majority"},returnDocument:"before",timeoutMS:r._timeoutMS})];case 1:return[2,a.sent()]}})})()}},{key:"createEncryptedCollection",value:function e(e,t,r){var n=this;return a(function(){var i,c,l,d,f,h,v,p,m,y;return H(this,function(g){switch(g.label){case 0:i=r.provider,c=r.masterKey,l=E({},D(r.createCollectionOptions.encryptedFields)),d=M(r.createCollectionOptions,["encryptedFields"]),f=n._timeoutMS!=null?o.TimeoutContext.create((0,u.resolveTimeoutOptions)(n._client,{timeoutMS:n._timeoutMS})):void 0;if(!Array.isArray(l.fields))return[3,2];h=l.fields.map(/*#__PURE__*/function(){var e=a(function(e){var t,r,o;return H(this,function(u){switch(u.label){case 0:if(!(e==null||(typeof e==="undefined"?"undefined":j(e))!="object"||e.keyId!=null))return[3,1];t=e;return[3,3];case 1:r=[B({},e)];o={};return[4,n.createDataKey(i,{masterKey:c,timeoutContext:(f===null||f===void 0?void 0:f.csotEnabled())?f===null||f===void 0?void 0:f.clone():void 0})];case 2:t=F.apply(void 0,r.concat([(o.keyId=u.sent(),o)]));u.label=3;case 3:return[2,t]}})});return function(t){return e.apply(this,arguments)}}());return[4,Promise.allSettled(h)];case 1:v=g.sent();l.fields=v.map(function(e,t){return e.status==="fulfilled"?e.value:l.fields[t]});p=v.find(function(e){return e.status==="rejected"});if(p!=null)throw new s.MongoCryptCreateDataKeyError(l,{cause:p.reason});g.label=2;case 2:g.trys.push([2,4,,5]);m={};return[4,e.createCollection(t,F(B({},d),{encryptedFields:l,timeoutMS:(f===null||f===void 0?void 0:f.csotEnabled())?f===null||f===void 0?void 0:f.getRemainingTimeMSOrThrow():void 0}))];case 3:return[2,(m.collection=g.sent(),m.encryptedFields=l,m)];case 4:y=g.sent();throw new s.MongoCryptCreateEncryptedCollectionError(l,{cause:y});case 5:return[2]}})})()}},{key:"encrypt",value:function e(e,t){var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:return[4,r._encrypt(e,!1,t)];case 1:return[2,n.sent()]}})})()}},{key:"encryptExpression",value:function e(e,t){var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:return[4,r._encrypt(e,!0,t)];case 1:return[2,n.sent()]}})})()}},{key:"decrypt",value:function e(e){var n=this;return a(function(){var i,s,a,c,d,f,h;return H(this,function(v){switch(v.label){case 0:i=(0,r.serialize)({v:e}),s=n._mongoCrypt.makeExplicitDecryptionContext(i),a=new l.StateMachine({proxyOptions:n._proxyOptions,tlsOptions:n._tlsOptions,socketOptions:t(n._client.s.options)}),c=n._timeoutMS!=null?o.TimeoutContext.create((0,u.resolveTimeoutOptions)(n._client,{timeoutMS:n._timeoutMS})):void 0;h=(0,r.deserialize);return[4,a.execute(n,s,{timeoutContext:c})];case 1:d=h.apply(void 0,[v.sent()]),f=d.v;return[2,f]}})})()}},{key:"askForKMSCredentials",value:function e(){var e=this;return a(function(){return H(this,function(t){switch(t.label){case 0:return[4,(0,c.refreshKMSCredentials)(e._kmsProviders,e._credentialProviders)];case 1:return[2,t.sent()]}})})()}},{key:"_encrypt",value:function e(e,n,i){var c=this;return a(function(){var a,d,f,h,v,p,m,E,y,g,A,C,S,b;return H(this,function(O){switch(O.label){case 0:a=i.algorithm,d=i.keyId,f=i.keyAltName,h=i.contentionFactor,v=i.queryType,p=i.rangeOptions,m={expressionMode:n,algorithm:a};if(d&&(m.keyId=d.buffer),f){if(d)throw new s.MongoCryptInvalidArgumentError('"options" cannot contain both "keyId" and "keyAltName"');if(typeof f!="string")throw new s.MongoCryptInvalidArgumentError('"options.keyAltName" must be of type string, but was of type '.concat(typeof f==="undefined"?"undefined":j(f)));m.keyAltName=(0,r.serialize)({keyAltName:f})}(typeof h=="number"||(typeof h==="undefined"?"undefined":j(h))=="bigint")&&(m.contentionFactor=h),typeof v=="string"&&(m.queryType=v),(typeof p==="undefined"?"undefined":j(p))=="object"&&(m.rangeOptions=(0,r.serialize)(p));E=(0,r.serialize)({v:e}),y=new l.StateMachine({proxyOptions:c._proxyOptions,tlsOptions:c._tlsOptions,socketOptions:t(c._client.s.options)}),g=c._mongoCrypt.makeExplicitEncryptionContext(E,m),A=c._timeoutMS!=null?o.TimeoutContext.create((0,u.resolveTimeoutOptions)(c._client,{timeoutMS:c._timeoutMS})):void 0;b=(0,r.deserialize);return[4,y.execute(c,g,{timeoutContext:A})];case 1:C=b.apply(void 0,[O.sent()]),S=C.v;return[2,S]}})})()}}],[{key:"getMongoCrypt",value:function e(){var e=(0,n.getMongoDBClientEncryption)();if("kModuleError"in e)throw e.kModuleError;return e.MongoCrypt}},{key:"libmongocryptVersion",get:function t(){return e.getMongoCrypt().libmongocryptVersion}}]);return e}();e.ClientEncryption=d});var rt=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.MongocryptdManager=void 0;var t=ec(),r=/*#__PURE__*/function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};f(this,e);this.spawnPath="",this.spawnArgs=[],this.uri=typeof t.mongocryptdURI=="string"&&t.mongocryptdURI.length>0?t.mongocryptdURI:e.DEFAULT_MONGOCRYPTD_URI,this.bypassSpawn=!!t.mongocryptdBypassSpawn,Object.hasOwn(t,"mongocryptdSpawnPath")&&t.mongocryptdSpawnPath&&(this.spawnPath=t.mongocryptdSpawnPath),Object.hasOwn(t,"mongocryptdSpawnArgs")&&Array.isArray(t.mongocryptdSpawnArgs)&&(this.spawnArgs=this.spawnArgs.concat(t.mongocryptdSpawnArgs)),this.spawnArgs.filter(function(e){return typeof e=="string"}).every(function(e){return e.indexOf("--idleShutdownTimeoutSecs")<0})&&this.spawnArgs.push("--idleShutdownTimeoutSecs","60")}p(e,[{key:"spawn",value:function e(){var e=this;return a(function(){var t,r,n;return H(this,function(o){t=e.spawnPath||"mongocryptd",r=Z("child_process"),n=r.spawn;e._child=n(t,e.spawnArgs,{stdio:"ignore",detached:!0}),e._child.on("error",function(){}),e._child.unref();return[2]})})()}},{key:"withRespawn",value:function e(e){var r=this;return a(function(){var n;return H(this,function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);return[4,e()];case 1:return[2,o.sent()];case 2:n=o.sent();if(!(C(n,t.MongoNetworkTimeoutError)&&!r.bypassSpawn))throw n;return[3,3];case 3:return[4,r.spawn()];case 4:o.sent();return[4,e()];case 5:return[2,o.sent()]}})})()}}]);return e}();e.MongocryptdManager=r;r.DEFAULT_MONGOCRYPTD_URI="mongodb://localhost:27020"});var rr=et(function(e){"use strict";ei();var t;Object.defineProperty(e,"__esModule",{value:!0});e.AutoEncrypter=e.AutoEncryptionLoggerLevel=void 0;var r=Z("net"),n=ea(),o=ev(),u=tn(),i=ec(),s=rZ(),c=eg(),l=re(),d=t2(),h=t3(),v=rt(),m=t8(),E=t5();e.AutoEncryptionLoggerLevel=Object.freeze({FatalError:0,Error:1,Warning:2,Info:3,Trace:4});var y=/*#__PURE__*/function(){function e(o,u){f(this,e);var i,a;if(this[t]=!1,this._client=o,this._bypassEncryption=u.bypassAutoEncryption===!0,this._keyVaultNamespace=u.keyVaultNamespace||"admin.datakeys",this._keyVaultClient=u.keyVaultClient||o,this._metaDataClient=u.metadataClient||o,this._proxyOptions=u.proxyOptions||{},this._tlsOptions=u.tlsOptions||{},this._kmsProviders=u.kmsProviders||{},this._credentialProviders=u.credentialProviders,((i=u.credentialProviders)===null||i===void 0?void 0:i.aws)&&!(0,m.isEmptyCredentials)("aws",this._kmsProviders))throw new h.MongoCryptInvalidArgumentError("Can only provide a custom AWS credential provider when the state machine is configured for automatic AWS credential fetching");var c={enableMultipleCollinfo:!0,cryptoCallbacks:d};u.schemaMap&&(c.schemaMap=Buffer.isBuffer(u.schemaMap)?u.schemaMap:(0,n.serialize)(u.schemaMap)),u.encryptedFieldsMap&&(c.encryptedFieldsMap=Buffer.isBuffer(u.encryptedFieldsMap)?u.encryptedFieldsMap:(0,n.serialize)(u.encryptedFieldsMap)),c.kmsProviders=Buffer.isBuffer(this._kmsProviders)?this._kmsProviders:(0,n.serialize)(this._kmsProviders),((a=u.options)===null||a===void 0?void 0:a.logger)&&(c.logger=u.options.logger),u.extraOptions&&u.extraOptions.cryptSharedLibPath&&(c.cryptSharedLibPath=u.extraOptions.cryptSharedLibPath),u.bypassQueryAnalysis&&(c.bypassQueryAnalysis=u.bypassQueryAnalysis),this._bypassMongocryptdAndCryptShared=this._bypassEncryption||!!u.bypassQueryAnalysis,u.extraOptions&&u.extraOptions.cryptSharedLibSearchPaths?c.cryptSharedLibSearchPaths=u.extraOptions.cryptSharedLibSearchPaths:this._bypassMongocryptdAndCryptShared||(c.cryptSharedLibSearchPaths=["$SYSTEM"]);var p=e.getMongoCrypt();if(this._mongocrypt=new p(c),this._contextCounter=0,u.extraOptions&&u.extraOptions.cryptSharedLibRequired&&!this.cryptSharedLibVersionInfo)throw new h.MongoCryptInvalidArgumentError("`cryptSharedLibRequired` set but no crypt_shared library loaded");if(!this._bypassMongocryptdAndCryptShared&&!this.cryptSharedLibVersionInfo){var E;this._mongocryptdManager=new v.MongocryptdManager(u.extraOptions);var y={serverSelectionTimeoutMS:1e4};var g;(u.extraOptions==null||typeof u.extraOptions.mongocryptdURI!="string")&&!r.getDefaultAutoSelectFamily&&(y.family=4),r.getDefaultAutoSelectFamily&&Object.assign(y,(0,l.autoSelectSocketOptions)((g=(E=this._client.s)===null||E===void 0?void 0:E.options)!==null&&g!==void 0?g:{})),this._mongocryptdClient=new s.MongoClient(this._mongocryptdManager.uri,y)}}p(e,[{key:"init",value:function e(){var e=this;return a(function(){var t,r,n;return H(this,function(o){switch(o.label){case 0:if(!!(e._bypassMongocryptdAndCryptShared||e.cryptSharedLibVersionInfo))return[3,6];if(!e._mongocryptdManager)throw new i.MongoRuntimeError("Reached impossible state: mongocryptdManager is undefined when neither bypassSpawn nor the shared lib are specified.");if(!e._mongocryptdClient)throw new i.MongoRuntimeError("Reached impossible state: mongocryptdClient is undefined when neither bypassSpawn nor the shared lib are specified.");t=e._mongocryptdManager.bypassSpawn;if(t)return[3,2];return[4,e._mongocryptdManager.spawn()];case 1:t=o.sent();o.label=2;case 2:t;o.label=3;case 3:o.trys.push([3,5,,6]);return[4,e._mongocryptdClient.connect()];case 4:return[2,o.sent()];case 5:r=o.sent();n=r.message;throw n&&(n.match(/timed out after/)||n.match(/ENOTFOUND/))?new i.MongoRuntimeError("Unable to connect to `mongocryptd`, please make sure it is running or in your PATH for auto-spawn",{cause:r}):r;case 6:return[2]}})})()}},{key:"teardown",value:function e(e){var t=this;return a(function(){var r;return H(this,function(n){switch(n.label){case 0:return[4,(r=t._mongocryptdClient)===null||r===void 0?void 0:r.close(e)];case 1:n.sent();return[2]}})})()}},{key:"encrypt",value:function e(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var o=this;return a(function(){var u,i,s,a,d;return H(this,function(f){switch(f.label){case 0:if((u=r.signal)===null||u===void 0?void 0:u.throwIfAborted(),o._bypassEncryption)return[2,t];i=Buffer.isBuffer(t)?t:(0,n.serialize)(t,r),s=o._mongocrypt.makeEncryptionContext(c.MongoDBCollectionNamespace.fromString(e).db,i);s.id=o._contextCounter++,s.ns=e,s.document=t;a=new E.StateMachine({promoteValues:!1,promoteLongs:!1,proxyOptions:o._proxyOptions,tlsOptions:o._tlsOptions,socketOptions:(0,l.autoSelectSocketOptions)(o._client.s.options)});d=(0,n.deserialize);return[4,a.execute(o,s,r)];case 1:return[2,d.apply(void 0,[f.sent(),{promoteValues:!1,promoteLongs:!1}])]}})})()}},{key:"decrypt",value:function e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var r=this;return a(function(){var n,o;return H(this,function(u){switch(u.label){case 0:(n=t.signal)===null||n===void 0?void 0:n.throwIfAborted();o=r._mongocrypt.makeDecryptionContext(e);o.id=r._contextCounter++;return[4,new E.StateMachine(F(B({},t),{proxyOptions:r._proxyOptions,tlsOptions:r._tlsOptions,socketOptions:(0,l.autoSelectSocketOptions)(r._client.s.options)})).execute(r,o,t)];case 1:return[2,u.sent()]}})})()}},{key:"askForKMSCredentials",value:function e(){var e=this;return a(function(){return H(this,function(t){switch(t.label){case 0:return[4,(0,m.refreshKMSCredentials)(e._kmsProviders,e._credentialProviders)];case 1:return[2,t.sent()]}})})()}},{key:"cryptSharedLibVersionInfo",get:function e(){return this._mongocrypt.cryptSharedLibVersionInfo}}],[{key:"getMongoCrypt",value:function e(){var e=(0,u.getMongoDBClientEncryption)();if("kModuleError"in e)throw e.kModuleError;return e.MongoCrypt}},{key:"libmongocryptVersion",get:function t(){return e.getMongoCrypt().libmongocryptVersion}}]);return e}();e.AutoEncrypter=y;t=o.kDecorateResult});var rn=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.Encrypter=void 0;var t=Z("util"),r=rr(),n=ev(),o=tn(),u=ec(),i=rZ(),s=/*#__PURE__*/function(){function e(t,n,o){f(this,e);if(j(o.autoEncryption)!="object")throw new u.MongoInvalidArgumentError('Option "autoEncryption" must be specified');this.internalClient=null,this.bypassAutoEncryption=!!o.autoEncryption.bypassAutoEncryption,this.needsConnecting=!1,o.maxPoolSize===0&&o.autoEncryption.keyVaultClient==null?o.autoEncryption.keyVaultClient=t:o.autoEncryption.keyVaultClient==null&&(o.autoEncryption.keyVaultClient=this.getInternalClient(t,n,o)),this.bypassAutoEncryption?o.autoEncryption.metadataClient=void 0:o.maxPoolSize===0?o.autoEncryption.metadataClient=t:o.autoEncryption.metadataClient=this.getInternalClient(t,n,o),o.proxyHost&&(o.autoEncryption.proxyOptions={proxyHost:o.proxyHost,proxyPort:o.proxyPort,proxyUsername:o.proxyUsername,proxyPassword:o.proxyPassword}),this.autoEncrypter=new r.AutoEncrypter(t,o.autoEncryption)}p(e,[{key:"getInternalClient",value:function e(e,t,r){var o=this.internalClient;if(o==null){var u={};var s=true,a=false,c=undefined;try{for(var l=U(Object.getOwnPropertyNames(r)).concat(U(Object.getOwnPropertySymbols(r)))[Symbol.iterator](),d;!(s=(d=l.next()).done);s=true){var f=d.value;["autoEncryption","minPoolSize","servers","caseTranslate","dbName"].includes(f)||Reflect.set(u,f,Reflect.get(r,f))}}catch(e){a=true;c=e}finally{try{if(!s&&l.return!=null){l.return()}}finally{if(a){throw c}}}u.minPoolSize=0,o=new i.MongoClient(t,u),this.internalClient=o;var h=true,v=false,p=undefined,m=true,E=false,y=undefined;try{for(var g=n.MONGO_CLIENT_EVENTS[Symbol.iterator](),A;!(m=(A=g.next()).done);m=true){var C=A.value;try{for(var S=e.listeners(C)[Symbol.iterator](),b;!(h=(b=S.next()).done);h=true){var O=b.value;o.on(C,O)}}catch(e){v=true;p=e}finally{try{if(!h&&S.return!=null){S.return()}}finally{if(v){throw p}}}}}catch(e){E=true;y=e}finally{try{if(!m&&g.return!=null){g.return()}}finally{if(E){throw y}}}e.on("newListener",function(e,t){o===null||o===void 0?void 0:o.on(e,t)}),this.needsConnecting=!0}return o}},{key:"connectInternalClient",value:function e(){var e=this;return a(function(){var t,r;return H(this,function(n){switch(n.label){case 0:t=e.internalClient;r=e.needsConnecting&&t!=null;if(!r)return[3,2];e.needsConnecting=!1;return[4,t.connect()];case 1:r=n.sent();n.label=2;case 2:r;return[2]}})})()}},{key:"closeCallback",value:function e(e,r,n){(0,t.callbackify)(this.close.bind(this))(e,r,n)}},{key:"close",value:function e(e,t){var r=this;return a(function(){var n,o,u;return H(this,function(i){switch(i.label){case 0:i.trys.push([0,2,,3]);return[4,r.autoEncrypter.teardown(t)];case 1:i.sent();return[3,3];case 2:o=i.sent();n=o;return[3,3];case 3:u=r.internalClient;if(!(u!=null&&e!==u))return[3,5];return[4,u.close(t)];case 4:return[2,i.sent()];case 5:if(n!=null)throw n;return[2]}})})()}}],[{key:"checkForMongoCrypt",value:function e(){var e=(0,o.getMongoDBClientEncryption)();if("kModuleError"in e)throw new u.MongoMissingDependencyError("Auto-encryption requested, but the module is not installed. Please add `mongodb-client-encryption` as a dependency of your project",{cause:e.kModuleError,dependencyName:"mongodb-client-encryption"})}}]);return e}();e.Encrypter=s});var ro=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.ConnectionPoolMetrics=void 0;var t=/*#__PURE__*/function(){function e(){f(this,e);this.txnConnections=0,this.cursorConnections=0,this.otherConnections=0}p(e,[{key:"markPinned",value:function t(t){t===e.TXN?this.txnConnections+=1:t===e.CURSOR?this.cursorConnections+=1:this.otherConnections+=1}},{key:"markUnpinned",value:function t(t){t===e.TXN?this.txnConnections-=1:t===e.CURSOR?this.cursorConnections-=1:this.otherConnections-=1}},{key:"info",value:function e(e){return"Timed out while checking out a connection from connection pool: maxPoolSize: ".concat(e,", connections in use by cursors: ").concat(this.cursorConnections,", connections in use by transactions: ").concat(this.txnConnections,", connections in use by other operations: ").concat(this.otherConnections)}},{key:"reset",value:function e(){this.txnConnections=0,this.cursorConnections=0,this.otherConnections=0}}]);return e}();e.ConnectionPoolMetrics=t;t.TXN="txn";t.CURSOR="cursor";t.OTHER="other"});var ru=et(function(e){"use strict";var t=function e(e,t){return(t===null||t===void 0?void 0:t.loadBalanced)?s.ServerType.LoadBalancer:!e||!e.ok?s.ServerType.Unknown:e.isreplicaset?s.ServerType.RSGhost:e.msg&&e.msg==="isdbgrid"?s.ServerType.Mongos:e.setName?e.hidden?s.ServerType.RSOther:e.isWritablePrimary?s.ServerType.RSPrimary:e.secondary?s.ServerType.RSSecondary:e.arbiterOnly?s.ServerType.RSArbiter:s.ServerType.RSOther:s.ServerType.Standalone};var r=function e(e,t){var r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every(function(r){return t[r]===e[r]})};var n=function e(e,t){if(e==null||t==null||!e.processId.equals(t.processId))return-1;var r=j(e.counter)=="bigint"?o.Long.fromBigInt(e.counter):o.Long.isLong(e.counter)?e.counter:o.Long.fromNumber(e.counter),n=j(t.counter)=="bigint"?o.Long.fromBigInt(t.counter):o.Long.isLong(t.counter)?t.counter:o.Long.fromNumber(t.counter);return r.compare(n)};ei();Object.defineProperty(e,"__esModule",{value:!0});e.ServerDescription=void 0;e.parseServerType=t;e.compareTopologyVersion=n;var o=ea(),u=ec(),i=eg(),s=ed(),a=new Set([s.ServerType.RSPrimary,s.ServerType.Standalone,s.ServerType.Mongos,s.ServerType.LoadBalancer]),c=new Set([s.ServerType.RSPrimary,s.ServerType.RSSecondary,s.ServerType.Mongos,s.ServerType.Standalone,s.ServerType.LoadBalancer]),l=/*#__PURE__*/function(){function e(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};f(this,e);var s,a,c,l,d,h,v;if(r==null||r==="")throw new u.MongoRuntimeError("ServerDescription must be provided with a non-empty address");var p,m,E,y,g,A,C,S,b,O,w,_,D,B,T,F,M,R,k,I,N,P;this.address=typeof r=="string"?i.HostAddress.fromString(r).toString():r.toString(),this.type=t(n,o),this.hosts=(p=n===null||n===void 0?void 0:(s=n.hosts)===null||s===void 0?void 0:s.map(function(e){return e.toLowerCase()}))!==null&&p!==void 0?p:[],this.passives=(m=n===null||n===void 0?void 0:(a=n.passives)===null||a===void 0?void 0:a.map(function(e){return e.toLowerCase()}))!==null&&m!==void 0?m:[],this.arbiters=(E=n===null||n===void 0?void 0:(c=n.arbiters)===null||c===void 0?void 0:c.map(function(e){return e.toLowerCase()}))!==null&&E!==void 0?E:[],this.tags=(y=n===null||n===void 0?void 0:n.tags)!==null&&y!==void 0?y:{},this.minWireVersion=(g=n===null||n===void 0?void 0:n.minWireVersion)!==null&&g!==void 0?g:0,this.maxWireVersion=(A=n===null||n===void 0?void 0:n.maxWireVersion)!==null&&A!==void 0?A:0,this.roundTripTime=(C=o===null||o===void 0?void 0:o.roundTripTime)!==null&&C!==void 0?C:-1,this.minRoundTripTime=(S=o===null||o===void 0?void 0:o.minRoundTripTime)!==null&&S!==void 0?S:0,this.lastUpdateTime=(0,i.now)(),this.lastWriteDate=(b=n===null||n===void 0?void 0:(l=n.lastWrite)===null||l===void 0?void 0:l.lastWriteDate)!==null&&b!==void 0?b:0,this.error=(O=o.error)!==null&&O!==void 0?O:null,(d=this.error)===null||d===void 0?void 0:d.stack,this.topologyVersion=(_=(w=(h=this.error)===null||h===void 0?void 0:h.topologyVersion)!==null&&w!==void 0?w:n===null||n===void 0?void 0:n.topologyVersion)!==null&&_!==void 0?_:null,this.setName=(D=n===null||n===void 0?void 0:n.setName)!==null&&D!==void 0?D:null,this.setVersion=(B=n===null||n===void 0?void 0:n.setVersion)!==null&&B!==void 0?B:null,this.electionId=(T=n===null||n===void 0?void 0:n.electionId)!==null&&T!==void 0?T:null,this.logicalSessionTimeoutMinutes=(F=n===null||n===void 0?void 0:n.logicalSessionTimeoutMinutes)!==null&&F!==void 0?F:null,this.maxMessageSizeBytes=(M=n===null||n===void 0?void 0:n.maxMessageSizeBytes)!==null&&M!==void 0?M:null,this.maxWriteBatchSize=(R=n===null||n===void 0?void 0:n.maxWriteBatchSize)!==null&&R!==void 0?R:null,this.maxBsonObjectSize=(k=n===null||n===void 0?void 0:n.maxBsonObjectSize)!==null&&k!==void 0?k:null,this.primary=(I=n===null||n===void 0?void 0:n.primary)!==null&&I!==void 0?I:null,this.me=(N=n===null||n===void 0?void 0:(v=n.me)===null||v===void 0?void 0:v.toLowerCase())!==null&&N!==void 0?N:null,this.$clusterTime=(P=n===null||n===void 0?void 0:n.$clusterTime)!==null&&P!==void 0?P:null,this.iscryptd=!!(n===null||n===void 0?void 0:n.iscryptd)}p(e,[{key:"hostAddress",get:function e(){return i.HostAddress.fromString(this.address)}},{key:"allHosts",get:function e(){return this.hosts.concat(this.arbiters).concat(this.passives)}},{key:"isReadable",get:function e(){return this.type===s.ServerType.RSSecondary||this.isWritable}},{key:"isDataBearing",get:function e(){return c.has(this.type)}},{key:"isWritable",get:function e(){return a.has(this.type)}},{key:"host",get:function e(){var e=":".concat(this.port).length;return this.address.slice(0,-e)}},{key:"port",get:function e(){var e=this.address.split(":").pop();return e?Number.parseInt(e,10):27017}},{key:"equals",value:function e(e){var t=this.topologyVersion===(e===null||e===void 0?void 0:e.topologyVersion)||n(this.topologyVersion,e===null||e===void 0?void 0:e.topologyVersion)===0,o=this.electionId!=null&&(e===null||e===void 0?void 0:e.electionId)!=null?(0,i.compareObjectId)(this.electionId,e.electionId)===0:this.electionId===(e===null||e===void 0?void 0:e.electionId);return e!=null&&e.iscryptd===this.iscryptd&&(0,i.errorStrictEqual)(this.error,e.error)&&this.type===e.type&&this.minWireVersion===e.minWireVersion&&(0,i.arrayStrictEqual)(this.hosts,e.hosts)&&r(this.tags,e.tags)&&this.setName===e.setName&&this.setVersion===e.setVersion&&o&&this.primary===e.primary&&this.logicalSessionTimeoutMinutes===e.logicalSessionTimeoutMinutes&&t}}]);return e}();e.ServerDescription=l});var ri=et(function(e){"use strict";var t=function e(e){switch(e){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}};var r=function e(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null;var i=function(e,t,r){return"primary marked stale due to electionId/setVersion mismatch: server setVersion: ".concat(e.setVersion,", server electionId: ").concat(e.electionId,", topology setVersion: ").concat(t,", topology electionId: ").concat(r)};if(r=r||t.setName,r!==t.setName)return e.delete(t.address),[u(e),r,n,o];if(t.maxWireVersion>=17){var s;var f=(0,c.compareObjectId)(o,t.electionId),h=f===0,v=f===-1,p=(n!==null&&n!==void 0?n:-1)<=((s=t.setVersion)!==null&&s!==void 0?s:-1);if(v||h&&p)o=t.electionId,n=t.setVersion;else return e.set(t.address,new d.ServerDescription(t.address,void 0,{error:new a.MongoStalePrimaryError(i(t,n,o))})),[u(e),r,n,o]}else{var m=t.electionId?t.electionId:null;if(t.setVersion&&m){if(n&&o&&(n>t.setVersion||(0,c.compareObjectId)(o,m)>0))return e.set(t.address,new d.ServerDescription(t.address,void 0,{error:new a.MongoStalePrimaryError(i(t,n,o))})),[u(e),r,n,o];o=t.electionId}t.setVersion!=null&&(n==null||t.setVersion>n)&&(n=t.setVersion)}var E=true,y=false,g=undefined;try{for(var A=e[Symbol.iterator](),C;!(E=(C=A.next()).done);E=true){var S=N(C.value,2),b=S[0],O=S[1];if(O.type===l.ServerType.RSPrimary&&O.address!==t.address){e.set(b,new d.ServerDescription(O.address,void 0,{error:new a.MongoStalePrimaryError("primary marked stale due to discovery of newer primary")}));break}}}catch(e){y=true;g=e}finally{try{if(!E&&A.return!=null){A.return()}}finally{if(y){throw g}}}t.allHosts.forEach(function(t){e.has(t)||e.set(t,new d.ServerDescription(t))});var w=Array.from(e.keys()),_=t.allHosts;return w.filter(function(e){return _.indexOf(e)===-1}).forEach(function(t){e.delete(t)}),[u(e),r,n,o]};var n=function e(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(r==null)throw new a.MongoRuntimeError('Argument "setName" is required if connected to a replica set');return(r!==t.setName||t.me&&t.address!==t.me)&&e.delete(t.address),u(e)};var o=function e(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;var n=l.TopologyType.ReplicaSetNoPrimary;return r=r!==null&&r!==void 0?r:t.setName,r!==t.setName?(e.delete(t.address),[n,r]):(t.allHosts.forEach(function(t){e.has(t)||e.set(t,new d.ServerDescription(t))}),t.me&&t.address!==t.me&&e.delete(t.address),[n,r])};var u=function e(e){var t=true,r=false,n=undefined;try{for(var o=e.values()[Symbol.iterator](),u;!(t=(u=o.next()).done);t=true){var i=u.value;if(i.type===l.ServerType.RSPrimary)return l.TopologyType.ReplicaSetWithPrimary}}catch(e){r=true;n=e}finally{try{if(!t&&o.return!=null){o.return()}}finally{if(r){throw n}}}return l.TopologyType.ReplicaSetNoPrimary};ei();Object.defineProperty(e,"__esModule",{value:!0});e.TopologyDescription=void 0;var i=ea(),s=eh(),a=ec(),c=eg(),l=ed(),d=ru(),h=s.MIN_SUPPORTED_SERVER_VERSION,v=s.MAX_SUPPORTED_SERVER_VERSION,m=s.MIN_SUPPORTED_WIRE_VERSION,E=s.MAX_SUPPORTED_WIRE_VERSION,y=new Set([l.ServerType.Mongos,l.ServerType.Unknown]),g=new Set([l.ServerType.Mongos,l.ServerType.Standalone]),A=new Set([l.ServerType.RSSecondary,l.ServerType.RSArbiter,l.ServerType.RSOther]),C=/*#__PURE__*/function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null;f(this,e);var a,c;s=s!==null&&s!==void 0?s:{},this.type=t!==null&&t!==void 0?t:l.TopologyType.Unknown,this.servers=r!==null&&r!==void 0?r:new Map,this.stale=!1,this.compatible=!0,this.heartbeatFrequencyMS=(a=s.heartbeatFrequencyMS)!==null&&a!==void 0?a:0,this.localThresholdMS=(c=s.localThresholdMS)!==null&&c!==void 0?c:15,this.setName=n!==null&&n!==void 0?n:null,this.maxElectionId=u!==null&&u!==void 0?u:null,this.maxSetVersion=o!==null&&o!==void 0?o:null,this.commonWireVersion=i!==null&&i!==void 0?i:0;var d=true,p=false,y=undefined;try{for(var g=this.servers.values()[Symbol.iterator](),A;!(d=(A=g.next()).done);d=true){var C=A.value;if(!(C.type===l.ServerType.Unknown||C.type===l.ServerType.LoadBalancer)&&(C.minWireVersion>E&&(this.compatible=!1,this.compatibilityError="Server at ".concat(C.address," requires wire version ").concat(C.minWireVersion,", but this version of the driver only supports up to ").concat(E," (MongoDB ").concat(v,")")),C.maxWireVersion<m)){this.compatible=!1,this.compatibilityError="Server at ".concat(C.address," reports wire version ").concat(C.maxWireVersion,", but this version of the driver requires at least ").concat(m," (MongoDB ").concat(h,").");break}}}catch(e){p=true;y=e}finally{try{if(!d&&g.return!=null){g.return()}}finally{if(p){throw y}}}this.logicalSessionTimeoutMinutes=null;var S=true,b=false,O=undefined;try{for(var w=this.servers[Symbol.iterator](),_;!(S=(_=w.next()).done);S=true){var D=N(_.value,2),B=D[1];if(B.isReadable){if(B.logicalSessionTimeoutMinutes==null){this.logicalSessionTimeoutMinutes=null;break}if(this.logicalSessionTimeoutMinutes==null){this.logicalSessionTimeoutMinutes=B.logicalSessionTimeoutMinutes;continue}this.logicalSessionTimeoutMinutes=Math.min(this.logicalSessionTimeoutMinutes,B.logicalSessionTimeoutMinutes)}}}catch(e){b=true;O=e}finally{try{if(!S&&w.return!=null){w.return()}}finally{if(b){throw O}}}}p(e,[{key:"updateFromSrvPollingEvent",value:function t(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;var n=t.hostnames(),o=new Set(this.servers.keys()),u=new Set(n),i=new Set;var s=true,a=false,l=undefined;try{for(var f=o[Symbol.iterator](),h;!(s=(h=f.next()).done);s=true){var v=h.value;u.delete(v),n.has(v)||i.add(v)}}catch(e){a=true;l=e}finally{try{if(!s&&f.return!=null){f.return()}}finally{if(a){throw l}}}if(u.size===0&&i.size===0)return this;var p=new Map(this.servers);var m=true,E=false,y=undefined;try{for(var g=i[Symbol.iterator](),A;!(m=(A=g.next()).done);m=true){var C=A.value;p.delete(C)}}catch(e){E=true;y=e}finally{try{if(!m&&g.return!=null){g.return()}}finally{if(E){throw y}}}if(u.size>0){var S=true,b=false,O=undefined;if(r===0)try{for(var w=u[Symbol.iterator](),_;!(S=(_=w.next()).done);S=true){var D=_.value;p.set(D,new d.ServerDescription(D))}}catch(e){b=true;O=e}finally{try{if(!S&&w.return!=null){w.return()}}finally{if(b){throw O}}}else if(p.size<r){var B=(0,c.shuffle)(u,r-p.size);var T=true,F=false,M=undefined;try{for(var R=B[Symbol.iterator](),k;!(T=(k=R.next()).done);T=true){var I=k.value;p.set(I,new d.ServerDescription(I))}}catch(e){F=true;M=e}finally{try{if(!T&&R.return!=null){R.return()}}finally{if(F){throw M}}}}}return new e(this.type,p,this.setName,this.maxSetVersion,this.maxElectionId,this.commonWireVersion,{heartbeatFrequencyMS:this.heartbeatFrequencyMS,localThresholdMS:this.localThresholdMS})}},{key:"update",value:function i(i){var s=i.address,a=this,c=a.type,f=a.setName,h=a.maxSetVersion,v=a.maxElectionId,p=a.commonWireVersion,m=i.type,E=new Map(this.servers);if(i.maxWireVersion!==0&&(p==null?p=i.maxWireVersion:p=Math.min(p,i.maxWireVersion)),typeof i.setName=="string"&&typeof f=="string"&&i.setName!==f&&(c===l.TopologyType.Single?i=new d.ServerDescription(s):E.delete(s)),E.set(s,i),c===l.TopologyType.Single)return new e(l.TopologyType.Single,E,f,h,v,p,{heartbeatFrequencyMS:this.heartbeatFrequencyMS,localThresholdMS:this.localThresholdMS});if(c===l.TopologyType.Unknown&&(m===l.ServerType.Standalone&&this.servers.size!==1?E.delete(s):c=t(m)),c===l.TopologyType.Sharded&&(y.has(m)||E.delete(s)),c===l.TopologyType.ReplicaSetNoPrimary){if(g.has(m)&&E.delete(s),m===l.ServerType.RSPrimary){var C=r(E,i,f,h,v);c=C[0],f=C[1],h=C[2],v=C[3]}else if(A.has(m)){var S=o(E,i,f);c=S[0],f=S[1]}}if(c===l.TopologyType.ReplicaSetWithPrimary)if(g.has(m))E.delete(s),c=u(E);else if(m===l.ServerType.RSPrimary){var b=r(E,i,f,h,v);c=b[0],f=b[1],h=b[2],v=b[3]}else A.has(m)?c=n(E,i,f):c=u(E);return new e(c,E,f,h,v,p,{heartbeatFrequencyMS:this.heartbeatFrequencyMS,localThresholdMS:this.localThresholdMS})}},{key:"error",get:function e(){var e=Array.from(this.servers.values()).filter(function(e){return e.error});return e.length>0?e[0].error:null}},{key:"hasKnownServers",get:function e(){return Array.from(this.servers.values()).some(function(e){return e.type!==l.ServerType.Unknown})}},{key:"hasDataBearingServers",get:function e(){return Array.from(this.servers.values()).some(function(e){return e.isDataBearing})}},{key:"hasServer",value:function e(e){return this.servers.has(e)}},{key:"toJSON",value:function e(){return i.EJSON.serialize(this)}}]);return e}();e.TopologyDescription=C});var rs=et(function(e){"use strict";var t=function e(e){var t;var r=(t=e===null||e===void 0?void 0:e.readPreference)!==null&&t!==void 0?t:o.ReadPreference.primary;if(typeof r=="string"&&(r=o.ReadPreference.fromString(r)),!C(r,o.ReadPreference))throw new n.MongoInvalidArgumentError('Option "readPreference" must be a ReadPreference instance');return r};var r=function e(e){return e==null?!1:e.description&&e.description.type===u.ServerType.Mongos?!0:e.description&&C(e.description,i.TopologyDescription)?Array.from(e.description.servers.values()).some(function(e){return e.type===u.ServerType.Mongos}):!1};ei();Object.defineProperty(e,"__esModule",{value:!0});e.getReadPreference=t;e.isSharded=r;var n=ec(),o=el(),u=ed(),i=ri()});var ra=et(function(e){"use strict";var t=function e(e){return!!(e.commitTransaction||e.abortTransaction)};ei();Object.defineProperty(e,"__esModule",{value:!0});e.Transaction=e.TxnState=void 0;e.isTransactionCommand=t;var r=ec(),n=ep(),o=el(),u=ey();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 i;var s=(i={},m(i,e.TxnState.NO_TRANSACTION,[e.TxnState.NO_TRANSACTION,e.TxnState.STARTING_TRANSACTION]),m(i,e.TxnState.STARTING_TRANSACTION,[e.TxnState.TRANSACTION_IN_PROGRESS,e.TxnState.TRANSACTION_COMMITTED,e.TxnState.TRANSACTION_COMMITTED_EMPTY,e.TxnState.TRANSACTION_ABORTED]),m(i,e.TxnState.TRANSACTION_IN_PROGRESS,[e.TxnState.TRANSACTION_IN_PROGRESS,e.TxnState.TRANSACTION_COMMITTED,e.TxnState.TRANSACTION_ABORTED]),m(i,e.TxnState.TRANSACTION_COMMITTED,[e.TxnState.TRANSACTION_COMMITTED,e.TxnState.TRANSACTION_COMMITTED_EMPTY,e.TxnState.STARTING_TRANSACTION,e.TxnState.NO_TRANSACTION]),m(i,e.TxnState.TRANSACTION_ABORTED,[e.TxnState.STARTING_TRANSACTION,e.TxnState.NO_TRANSACTION]),m(i,e.TxnState.TRANSACTION_COMMITTED_EMPTY,[e.TxnState.TRANSACTION_COMMITTED_EMPTY,e.TxnState.NO_TRANSACTION]),i),a=new Set([e.TxnState.STARTING_TRANSACTION,e.TxnState.TRANSACTION_IN_PROGRESS]),c=new Set([e.TxnState.TRANSACTION_COMMITTED,e.TxnState.TRANSACTION_COMMITTED_EMPTY,e.TxnState.TRANSACTION_ABORTED]),l=/*#__PURE__*/function(){function t(i){f(this,t);i=i!==null&&i!==void 0?i:{},this.state=e.TxnState.NO_TRANSACTION,this.options={};var s=u.WriteConcern.fromOptions(i);if(s){if(s.w===0)throw new r.MongoTransactionError("Transactions do not support unacknowledged write concern");this.options.writeConcern=s}i.readConcern&&(this.options.readConcern=n.ReadConcern.fromOptions(i)),i.readPreference&&(this.options.readPreference=o.ReadPreference.fromOptions(i)),i.maxCommitTimeMS&&(this.options.maxTimeMS=i.maxCommitTimeMS),this._pinnedServer=void 0,this._recoveryToken=void 0}p(t,[{key:"server",get:function e(){return this._pinnedServer}},{key:"recoveryToken",get:function e(){return this._recoveryToken}},{key:"isPinned",get:function e(){return!!this.server}},{key:"isStarting",get:function t(){return this.state===e.TxnState.STARTING_TRANSACTION}},{key:"isActive",get:function e(){return a.has(this.state)}},{key:"isCommitted",get:function e(){return c.has(this.state)}},{key:"transition",value:function t(t){var n=s[this.state];if(n&&n.includes(t)){this.state=t,(this.state===e.TxnState.NO_TRANSACTION||this.state===e.TxnState.STARTING_TRANSACTION||this.state===e.TxnState.TRANSACTION_ABORTED)&&this.unpinServer();return}throw new r.MongoRuntimeError("Attempted illegal state transition from [".concat(this.state,"] to [").concat(t,"]"))}},{key:"pinServer",value:function e(e){this.isActive&&(this._pinnedServer=e)}},{key:"unpinServer",value:function e(){this._pinnedServer=void 0}}]);return t}();e.Transaction=l});var rc=et(function(e){"use strict";var t=function e(e){if(C(e,m.MongoError)){if((0,m.isRetryableWriteError)(e)||C(e,m.MongoWriteConcernError)||u(e)){if(n(e))return!0}else if(e.hasErrorLabel(m.MongoErrorLabel.TransientTransactionError))return!0}return!1};var r=function e(e){var t=(0,m.isRetryableWriteError)(e);return t||(t=C(e,m.MongoWriteConcernError)),t||(t=u(e)),t&&(t=n(e)),t};var n=function e(e){var t=C(e,m.MongoServerError)&&e.codeName&&I.has(e.codeName);return u(e)||!t&&e.code!==m.MONGODB_ERROR_CODES.UnsatisfiableWriteConcern&&e.code!==m.MONGODB_ERROR_CODES.UnknownReplWriteConcern};var o=function e(e,t){var r=e.pinnedConnection,n=t===null||t===void 0?void 0:t.error;if(e.inTransaction()&&n&&C(n,m.MongoError)&&n.hasErrorLabel(m.MongoErrorLabel.TransientTransactionError))return;var o=e.client.topology;if(r&&o!=null){var u=Array.from(o.s.servers.values())[0];((t===null||t===void 0?void 0:t.error)==null||(t===null||t===void 0?void 0:t.force))&&(u.pool.checkIn(r),e.pinnedConnection=void 0,r.emit(v.UNPINNED,e.transaction.state!==D.TxnState.NO_TRANSACTION?l.ConnectionPoolMetrics.TXN:l.ConnectionPoolMetrics.CURSOR),(t===null||t===void 0?void 0:t.forceClear)&&u.pool.clear({serviceId:r.serviceId}))}};var u=function e(e){var t;return e==null||!C(e,m.MongoServerError)?!1:e.code===m.MONGODB_ERROR_CODES.MaxTimeMSExpired||((t=e.writeConcernError)===null||t===void 0?void 0:t.code)===m.MONGODB_ERROR_CODES.MaxTimeMSExpired};var i=function e(e,t,r){var n;if(e.hasEnded)return new m.MongoExpiredSessionError;var o=e.serverSession;if(o==null)return new m.MongoRuntimeError("Unable to acquire server session");if(((n=r.writeConcern)===null||n===void 0?void 0:n.w)===0)return e&&e.explicit?new m.MongoAPIError("Cannot have explicit session with unacknowledged writes"):void 0;o.lastUse=(0,T.now)(),t.lsid=o.id;var u=e.inTransaction()||(0,D.isTransactionCommand)(t);if((!!r.willRetryWrite||u)&&(o.txnNumber+=e.txnNumberIncrement,e.txnNumberIncrement=0,t.txnNumber=c.Long.fromNumber(o.txnNumber)),!u){e.transaction.state!==D.TxnState.NO_TRANSACTION&&e.transaction.transition(D.TxnState.NO_TRANSACTION),e.supports.causalConsistency&&e.operationTime&&(0,T.commandSupportsReadConcern)(t)?(t.readConcern=t.readConcern||{},Object.assign(t.readConcern,{afterClusterTime:e.operationTime})):e.snapshotEnabled&&(t.readConcern=t.readConcern||{level:S.ReadConcernLevel.snapshot},e.snapshotTime!=null&&Object.assign(t.readConcern,{atClusterTime:e.snapshotTime}));return}if(t.autocommit=!1,e.transaction.state===D.TxnState.STARTING_TRANSACTION){var i;e.transaction.transition(D.TxnState.TRANSACTION_IN_PROGRESS),t.startTransaction=!0;var s=e.transaction.options.readConcern||(e===null||e===void 0?void 0:(i=e.clientOptions)===null||i===void 0?void 0:i.readConcern);s&&(t.readConcern=s),e.supports.causalConsistency&&e.operationTime&&(t.readConcern=t.readConcern||{},Object.assign(t.readConcern,{afterClusterTime:e.operationTime}))}};var s=function e(e,t){if(t.$clusterTime&&(0,w._advanceClusterTime)(e,t.$clusterTime),t.operationTime&&e&&e.supports.causalConsistency&&e.advanceOperationTime(t.operationTime),t.recoveryToken&&e&&e.inTransaction()&&(e.transaction._recoveryToken=t.recoveryToken),(e===null||e===void 0?void 0:e.snapshotEnabled)&&e.snapshotTime==null){var r=t.atClusterTime;r&&(e.snapshotTime=r)}};ei();Object.defineProperty(e,"__esModule",{value:!0});e.ServerSessionPool=e.ServerSession=e.ClientSession=void 0;e.maybeClearPinnedConnection=o;e.applySession=i;e.updateSessionFromResponse=s;var c=ea(),l=ro(),h=rs(),v=ev(),m=ec(),E=eO(),y=eS(),g=e3(),S=ep(),b=el(),O=r1(),w=ed(),_=eA(),D=ra(),T=eg(),M=ey(),R=8,k=/*#__PURE__*/function(e){A(n,e);function n(e,t,r,o){f(this,n);var u;var i;if(u=d(this,n),u.timeoutContext=null,u.on("error",T.noop),e==null)throw new m.MongoRuntimeError("ClientSession requires a MongoClient");if(t==null||!C(t,P))throw new m.MongoRuntimeError("ClientSession requires a ServerSessionPool");if(r=r!==null&&r!==void 0?r:{},u.snapshotEnabled=r.snapshot===!0,r.causalConsistency===!0&&u.snapshotEnabled)throw new m.MongoInvalidArgumentError('Properties "causalConsistency" and "snapshot" are mutually exclusive');var s;u.client=e,u.sessionPool=t,u.hasEnded=!1,u.clientOptions=o,u.timeoutMS=(s=r.defaultTimeoutMS)!==null&&s!==void 0?s:(i=e.s.options)===null||i===void 0?void 0:i.timeoutMS,u.explicit=!!r.explicit,u._serverSession=u.explicit?u.sessionPool.acquire():null,u.txnNumberIncrement=0;var a=u.explicit&&r.snapshot!==!0;var c;u.supports={causalConsistency:(c=r.causalConsistency)!==null&&c!==void 0?c:a},u.clusterTime=r.initialClusterTime,u.operationTime=void 0,u.owner=r.owner,u.defaultTransactionOptions=B({},r.defaultTransactionOptions),u.transaction=new D.Transaction;return u}p(n,[{key:"id",get:function e(){var e;return(e=this.serverSession)===null||e===void 0?void 0:e.id}},{key:"serverSession",get:function e(){var e=this._serverSession;if(e==null){if(this.explicit)throw new m.MongoRuntimeError("Unexpected null serverSession for an explicit session");if(this.hasEnded)throw new m.MongoRuntimeError("Unexpected null serverSession for an ended implicit session");e=this.sessionPool.acquire(),this._serverSession=e}return e}},{key:"loadBalanced",get:function e(){var e;return((e=this.client.topology)===null||e===void 0?void 0:e.description.type)===w.TopologyType.LoadBalanced}},{key:"pin",value:function e(e){if(this.pinnedConnection)throw TypeError("Cannot pin multiple connections to the same session");this.pinnedConnection=e,e.emit(v.PINNED,this.inTransaction()?l.ConnectionPoolMetrics.TXN:l.ConnectionPoolMetrics.CURSOR)}},{key:"unpin",value:function e(e){if(this.loadBalanced)return o(this,e);this.transaction.unpinServer()}},{key:"isPinned",get:function e(){return this.loadBalanced?!!this.pinnedConnection:this.transaction.isPinned}},{key:"endSession",value:function e(e){var t=this;return a(function(){var r,n,u;return H(this,function(i){switch(i.label){case 0:i.trys.push([0,3,4,5]);r=t.inTransaction();if(!r)return[3,2];return[4,t.abortTransaction(F(B({},e),{throwTimeout:!0}))];case 1:r=i.sent();i.label=2;case 2:r;return[3,5];case 3:n=i.sent();if(n.name==="MongoOperationTimeoutError")throw n;(0,T.squashError)(n);return[3,5];case 4:if(!t.hasEnded){u=t.serverSession;u!=null&&(t.sessionPool.release(u),t._serverSession=new N(u)),t.hasEnded=!0,t.emit("ended",t)}o(t,B({force:!0},e));return[7];case 5:return[2]}})})()}},{key:"asyncDispose",value:function e(){var e=this;return a(function(){return H(this,function(t){switch(t.label){case 0:return[4,e.endSession({force:!0})];case 1:t.sent();return[2]}})})()}},{key:"advanceOperationTime",value:function e(e){if(this.operationTime==null){this.operationTime=e;return}e.greaterThan(this.operationTime)&&(this.operationTime=e)}},{key:"advanceClusterTime",value:function e(e){var t,r;if(!e||(typeof e==="undefined"?"undefined":j(e))!="object")throw new m.MongoInvalidArgumentError("input cluster time must be an object");if(!e.clusterTime||e.clusterTime._bsontype!=="Timestamp")throw new m.MongoInvalidArgumentError('input cluster time "clusterTime" property must be a valid BSON Timestamp');if(!e.signature||((t=e.signature.hash)===null||t===void 0?void 0:t._bsontype)!=="Binary"||j(e.signature.keyId)!="bigint"&&typeof e.signature.keyId!="number"&&((r=e.signature.keyId)===null||r===void 0?void 0:r._bsontype)!=="Long")throw new m.MongoInvalidArgumentError('input cluster time must have a valid "signature" property with BSON Binary hash and BSON Long keyId');(0,w._advanceClusterTime)(this,e)}},{key:"equals",value:function e(e){return!C(e,n)||this.id==null||e.id==null?!1:T.ByteUtils.equals(this.id.id.buffer,e.id.id.buffer)}},{key:"incrementTransactionNumber",value:function e(){this.txnNumberIncrement+=1}},{key:"inTransaction",value:function e(){return this.transaction.isActive}},{key:"startTransaction",value:function e(e){var t,r,n;if(this.snapshotEnabled)throw new m.MongoCompatibilityError("Transactions are not supported in snapshot sessions");if(this.inTransaction())throw new m.MongoTransactionError("Transaction already in progress");this.isPinned&&this.transaction.isCommitted&&this.unpin();var o=(0,T.maxWireVersion)(this.client.topology);if((0,h.isSharded)(this.client.topology)&&o!=null&&o<R)throw new m.MongoCompatibilityError("Transactions are not supported on sharded clusters in MongoDB < 4.2.");var u,i,s,a,c,l,d;this.commitAttempted=!1,this.incrementTransactionNumber(),this.transaction=new D.Transaction({readConcern:(i=(u=e===null||e===void 0?void 0:e.readConcern)!==null&&u!==void 0?u:this.defaultTransactionOptions.readConcern)!==null&&i!==void 0?i:(t=this.clientOptions)===null||t===void 0?void 0:t.readConcern,writeConcern:(a=(s=e===null||e===void 0?void 0:e.writeConcern)!==null&&s!==void 0?s:this.defaultTransactionOptions.writeConcern)!==null&&a!==void 0?a:(r=this.clientOptions)===null||r===void 0?void 0:r.writeConcern,readPreference:(l=(c=e===null||e===void 0?void 0:e.readPreference)!==null&&c!==void 0?c:this.defaultTransactionOptions.readPreference)!==null&&l!==void 0?l:(n=this.clientOptions)===null||n===void 0?void 0:n.readPreference,maxCommitTimeMS:(d=e===null||e===void 0?void 0:e.maxCommitTimeMS)!==null&&d!==void 0?d:this.defaultTransactionOptions.maxCommitTimeMS}),this.transaction.transition(D.TxnState.STARTING_TRANSACTION)}},{key:"commitTransaction",value:function e(e){var n=this;return a(function(){var o,u,i,s,a,c,l,d,f,h,v;return H(this,function(p){switch(p.label){case 0:if(n.transaction.state===D.TxnState.NO_TRANSACTION)throw new m.MongoTransactionError("No transaction started");if(n.transaction.state===D.TxnState.STARTING_TRANSACTION||n.transaction.state===D.TxnState.TRANSACTION_COMMITTED_EMPTY){n.transaction.transition(D.TxnState.TRANSACTION_COMMITTED_EMPTY);return[2]}if(n.transaction.state===D.TxnState.TRANSACTION_ABORTED)throw new m.MongoTransactionError("Cannot call commitTransaction after calling abortTransaction");i={commitTransaction:1},s=typeof(e===null||e===void 0?void 0:e.timeoutMS)=="number"?e.timeoutMS:typeof n.timeoutMS=="number"?n.timeoutMS:null,a=(u=n.transaction.options.writeConcern)!==null&&u!==void 0?u:(o=n.clientOptions)===null||o===void 0?void 0:o.writeConcern;if(a!=null)if(s==null&&n.timeoutContext==null)M.WriteConcern.apply(i,B({wtimeoutMS:1e4,w:"majority"},a));else{c=Object.keys(a);(c.length>2||!c.includes("wtimeoutMS")&&!c.includes("wTimeoutMS"))&&M.WriteConcern.apply(i,F(B({},a),{wtimeoutMS:void 0}))}(n.transaction.state===D.TxnState.TRANSACTION_COMMITTED||n.commitAttempted)&&(s==null&&n.timeoutContext==null?M.WriteConcern.apply(i,F(B({wtimeoutMS:1e4},a),{w:"majority"})):M.WriteConcern.apply(i,F(B({w:"majority"},a),{wtimeoutMS:void 0}))),typeof n.transaction.options.maxTimeMS=="number"&&(i.maxTimeMS=n.transaction.options.maxTimeMS),n.transaction.recoveryToken&&(i.recoveryToken=n.transaction.recoveryToken);d=new g.RunAdminCommandOperation(i,{session:n,readPreference:b.ReadPreference.primary,bypassPinningCheck:!0}),f=(l=n.timeoutContext)!==null&&l!==void 0?l:typeof s=="number"?_.TimeoutContext.create({serverSelectionTimeoutMS:n.clientOptions.serverSelectionTimeoutMS,socketTimeoutMS:n.clientOptions.socketTimeoutMS,timeoutMS:s}):null;p.label=1;case 1:p.trys.push([1,3,8,9]);return[4,(0,y.executeOperation)(n.client,d,f)];case 2:p.sent(),n.commitAttempted=void 0;return[2];case 3:h=p.sent();if(!(n.commitAttempted=!0,C(h,m.MongoError)&&(0,m.isRetryableWriteError)(h)))return[3,7];M.WriteConcern.apply(i,F(B({wtimeoutMS:1e4},a),{w:"majority"})),n.unpin({force:!0});p.label=4;case 4:p.trys.push([4,6,,7]);return[4,(0,y.executeOperation)(n.client,new g.RunAdminCommandOperation(i,{session:n,readPreference:b.ReadPreference.primary,bypassPinningCheck:!0}),f)];case 5:p.sent();return[2];case 6:v=p.sent();throw r(v)&&v.addErrorLabel(m.MongoErrorLabel.UnknownTransactionCommitResult),t(v)&&n.unpin({error:v}),v;case 7:throw r(h)&&h.addErrorLabel(m.MongoErrorLabel.UnknownTransactionCommitResult),t(h)&&n.unpin({error:h}),h;case 8:n.transaction.transition(D.TxnState.TRANSACTION_COMMITTED);return[7];case 9:return[2]}})})()}},{key:"abortTransaction",value:function e(e){var t=this;return a(function(){var r,n,u,i,s,a,c,l,d,f;return H(this,function(h){switch(h.label){case 0:if(t.transaction.state===D.TxnState.NO_TRANSACTION)throw new m.MongoTransactionError("No transaction started");if(t.transaction.state===D.TxnState.STARTING_TRANSACTION){t.transaction.transition(D.TxnState.TRANSACTION_ABORTED);return[2]}if(t.transaction.state===D.TxnState.TRANSACTION_ABORTED)throw new m.MongoTransactionError("Cannot call abortTransaction twice");if(t.transaction.state===D.TxnState.TRANSACTION_COMMITTED||t.transaction.state===D.TxnState.TRANSACTION_COMMITTED_EMPTY)throw new m.MongoTransactionError("Cannot call abortTransaction after calling commitTransaction");i={abortTransaction:1},s=typeof(e===null||e===void 0?void 0:e.timeoutMS)=="number"?e.timeoutMS:((r=t.timeoutContext)===null||r===void 0?void 0:r.csotEnabled())?t.timeoutContext.timeoutMS:typeof t.timeoutMS=="number"?t.timeoutMS:null,a=s!=null?_.TimeoutContext.create({timeoutMS:s,serverSelectionTimeoutMS:t.clientOptions.serverSelectionTimeoutMS,socketTimeoutMS:t.clientOptions.socketTimeoutMS}):null,c=(u=t.transaction.options.writeConcern)!==null&&u!==void 0?u:(n=t.clientOptions)===null||n===void 0?void 0:n.writeConcern;c!=null&&s==null&&M.WriteConcern.apply(i,B({wtimeoutMS:1e4,w:"majority"},c)),t.transaction.recoveryToken&&(i.recoveryToken=t.transaction.recoveryToken);l=new g.RunAdminCommandOperation(i,{session:t,readPreference:b.ReadPreference.primary,bypassPinningCheck:!0});h.label=1;case 1:h.trys.push([1,3,8,9]);return[4,(0,y.executeOperation)(t.client,l,a)];case 2:h.sent(),t.unpin();return[2];case 3:d=h.sent();if(t.unpin(),d.name==="MongoRuntimeError"||(e===null||e===void 0?void 0:e.throwTimeout)&&d.name==="MongoOperationTimeoutError")throw d;if(!(C(d,m.MongoError)&&(0,m.isRetryableWriteError)(d)))return[3,7];h.label=4;case 4:h.trys.push([4,6,,7]);return[4,(0,y.executeOperation)(t.client,l,a)];case 5:h.sent();return[2];case 6:f=h.sent();if(f.name==="MongoRuntimeError"||(e===null||e===void 0?void 0:e.throwTimeout)&&f.name==="MongoOperationTimeoutError")throw f;return[3,7];case 7:return[3,9];case 8:t.transaction.transition(D.TxnState.TRANSACTION_ABORTED),t.loadBalanced&&o(t,{force:!1});return[7];case 9:return[2]}})})()}},{key:"toBSON",value:function e(){throw new m.MongoRuntimeError("ClientSession cannot be serialized to BSON.")}},{key:"withTransaction",value:function e(e,t){var r=this;return a(function(){var n,o,i,s,a,c,l,d,f,h,v;return H(this,function(p){switch(p.label){case 0:s=(i=(o=t===null||t===void 0?void 0:t.timeoutMS)!==null&&o!==void 0?o:r.timeoutMS)!==null&&i!==void 0?i:null;r.timeoutContext=s!=null?_.TimeoutContext.create({timeoutMS:s,serverSelectionTimeoutMS:r.clientOptions.serverSelectionTimeoutMS,socketTimeoutMS:r.clientOptions.socketTimeoutMS}):null;a=((n=r.timeoutContext)===null||n===void 0?void 0:n.csotEnabled())?r.timeoutContext.start:(0,T.now)(),c=!1;p.label=1;case 1:p.trys.push([1,,17,18]);p.label=2;case 2:if(!!c)return[3,16];r.startTransaction(t);p.label=3;case 3:p.trys.push([3,5,,10]);d=e(r);if(!(0,T.isPromiseLike)(d))throw new m.MongoInvalidArgumentError("Function provided to `withTransaction` must return a Promise");return[4,d];case 4:if(l=p.sent(),r.transaction.state===D.TxnState.NO_TRANSACTION||r.transaction.state===D.TxnState.TRANSACTION_COMMITTED||r.transaction.state===D.TxnState.TRANSACTION_ABORTED)return[2,l];return[3,10];case 5:f=p.sent();if(!(!C(f,m.MongoError)||C(f,m.MongoInvalidArgumentError)))return[3,7];return[4,r.abortTransaction()];case 6:throw p.sent(),f;case 7:h=r.transaction.state===D.TxnState.STARTING_TRANSACTION||r.transaction.state===D.TxnState.TRANSACTION_IN_PROGRESS;if(!h)return[3,9];return[4,r.abortTransaction()];case 8:h=p.sent();p.label=9;case 9:if(h,f.hasErrorLabel(m.MongoErrorLabel.TransientTransactionError)&&(r.timeoutContext!=null||(0,T.now)()-a<12e4))return[3,15];throw f;case 10:if(!!c)return[3,15];p.label=11;case 11:p.trys.push([11,13,,14]);return[4,r.commitTransaction()];case 12:p.sent(),c=!0;return[3,14];case 13:v=p.sent();if(!u(v)&&v.hasErrorLabel(m.MongoErrorLabel.UnknownTransactionCommitResult)&&(r.timeoutContext!=null||(0,T.now)()-a<12e4))return[3,14];if(v.hasErrorLabel(m.MongoErrorLabel.TransientTransactionError)&&(r.timeoutContext!=null||(0,T.now)()-a<12e4))return[3,15];throw v;case 14:return[3,10];case 15:return[3,2];case 16:return[2,l];case 17:r.timeoutContext=null;return[7];case 18:return[2]}})})()}}]);return n}(E.TypedEventEmitter);e.ClientSession=k;(0,O.configureResourceManagement)(k.prototype);var I=new Set(["CannotSatisfyWriteConcern","UnknownReplWriteConcern","UnsatisfiableWriteConcern"]);var N=/*#__PURE__*/function(){function e(t){f(this,e);if(t!=null){var r=Buffer.allocUnsafe(16);r.set(t.id.id.buffer),this.id={id:new c.Binary(r,t.id.id.sub_type)},this.lastUse=t.lastUse,this.txnNumber=t.txnNumber,this.isDirty=t.isDirty;return}this.id={id:new c.Binary((0,T.uuidV4)(),c.Binary.SUBTYPE_UUID)},this.lastUse=(0,T.now)(),this.txnNumber=0,this.isDirty=!1}p(e,[{key:"hasTimedOut",value:function e(e){return Math.round((0,T.calculateDurationInMs)(this.lastUse)%864e5%36e5/6e4)>e-1}}]);return e}();e.ServerSession=N;var P=/*#__PURE__*/function(){function e(t){f(this,e);if(t==null)throw new m.MongoRuntimeError("ServerSessionPool requires a MongoClient");this.client=t,this.sessions=new T.List}p(e,[{key:"acquire",value:function e(){var e;var t;var r=(t=(e=this.client.topology)===null||e===void 0?void 0:e.logicalSessionTimeoutMinutes)!==null&&t!==void 0?t:10,n=null;for(;this.sessions.length>0;){var o;var u=this.sessions.shift();if(u!=null&&(((o=this.client.topology)===null||o===void 0?void 0:o.loadBalanced)||!u.hasTimedOut(r))){n=u;break}}return n==null&&(n=new N),n}},{key:"release",value:function e(e){var t,r;var n;var o=(n=(t=this.client.topology)===null||t===void 0?void 0:t.logicalSessionTimeoutMinutes)!==null&&n!==void 0?n:10;if(((r=this.client.topology)===null||r===void 0?void 0:r.loadBalanced)&&!o&&this.sessions.unshift(e),!!o&&(this.sessions.prune(function(e){return e.hasTimedOut(o)}),!e.hasTimedOut(o))){if(e.isDirty)return;this.sessions.unshift(e)}}}]);return e}();e.ServerSessionPool=P});var rl=et(function(e){"use strict";var t=function e(e){var t;if(C(e,i.OpMsgRequest)){var r=B({},e.command);return C(r.ops,i.DocumentSequence)&&(r.ops=r.ops.documents),C(r.nsInfo,i.DocumentSequence)&&(r.nsInfo=r.nsInfo.documents),r}if((t=e.query)===null||t===void 0?void 0:t.$query){var n;return e.ns==="admin.$cmd"?n=Object.assign({},e.query.$query):(n={find:h(e)},Object.keys(m).forEach(function(t){e.query[t]!=null&&(n[m[t]]=B({},e.query[t]))})),Object.keys(E).forEach(function(t){var r=t;e[r]!=null&&(n[E[r]]=e[r])}),n}var o={},u=B({},e);return e.query&&(o=B({},e.query),u.query=o),e.query?o:u};var r=function e(e){return e&&(e.result?e.result:e)};var n=function e(e){var t;return"id"in e&&(t=e.id),{address:e.address,serviceId:e.serviceId,connectionId:t}};ei();Object.defineProperty(e,"__esModule",{value:!0});e.SENSITIVE_COMMANDS=e.CommandFailedEvent=e.CommandSucceededEvent=e.CommandStartedEvent=void 0;var o=ev(),u=eg(),i=t1(),s=/*#__PURE__*/function(){function r(u,i,s){f(this,r);this.name=o.COMMAND_STARTED;var a=t(i),c=d(a),l=n(u),h=l.address,p=l.connectionId,m=l.serviceId;e.SENSITIVE_COMMANDS.has(c)&&(this.commandObj={},this.commandObj[c]=!0),this.address=h,this.connectionId=p,this.serviceId=m,this.requestId=i.requestId,this.databaseName=i.databaseName,this.commandName=c,this.command=v(c,a,a),this.serverConnectionId=s}p(r,[{key:"hasServiceId",get:function e(){return!!this.serviceId}}]);return r}();e.CommandStartedEvent=s;var a=/*#__PURE__*/function(){function e(i,s,a,c,l){f(this,e);this.name=o.COMMAND_SUCCEEDED;var h=t(s),p=d(h),m=n(i),E=m.address,y=m.connectionId,g=m.serviceId;this.address=E,this.connectionId=y,this.serviceId=g,this.requestId=s.requestId,this.commandName=p,this.duration=(0,u.calculateDurationInMs)(c),this.reply=v(p,h,r(a)),this.serverConnectionId=l}p(e,[{key:"hasServiceId",get:function e(){return!!this.serviceId}}]);return e}();e.CommandSucceededEvent=a;var c=/*#__PURE__*/function(){function e(r,i,s,a,c){f(this,e);this.name=o.COMMAND_FAILED;var l=t(i),h=d(l),p=n(r),m=p.address,E=p.connectionId,y=p.serviceId;this.address=m,this.connectionId=E,this.serviceId=y,this.requestId=i.requestId,this.commandName=h,this.duration=(0,u.calculateDurationInMs)(a),this.failure=v(h,l,s),this.serverConnectionId=c}p(e,[{key:"hasServiceId",get:function e(){return!!this.serviceId}}]);return e}();e.CommandFailedEvent=c;e.SENSITIVE_COMMANDS=new Set(["authenticate","saslStart","saslContinue","getnonce","createUser","updateUser","copydbgetnonce","copydbsaslstart","copydb"]);var l=new Set(["hello",o.LEGACY_HELLO_COMMAND,o.LEGACY_HELLO_COMMAND_CAMEL_CASE]),d=function(e){return Object.keys(e)[0]},h=function(e){return e.ns.split(".")[1]},v=function(t,r,n){return e.SENSITIVE_COMMANDS.has(t)||l.has(t)&&r.speculativeAuthenticate?{}:n},m={$query:"filter",$orderby:"sort",$hint:"hint",$comment:"comment",$maxScan:"maxScan",$max:"max",$min:"min",$returnKey:"returnKey",$showDiskLoc:"showRecordId",$maxTimeMS:"maxTimeMS",$snapshot:"snapshot"},E={numberToSkip:"skip",numberToReturn:"batchSize",returnFieldSelector:"projection"}});var rd=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.StreamDescription=void 0;var t=ea(),r=ed(),n=ru(),o=["minWireVersion","maxWireVersion","maxBsonObjectSize","maxMessageSizeBytes","maxWriteBatchSize","logicalSessionTimeoutMinutes"],u=/*#__PURE__*/function(){function e(t,n){f(this,e);this.hello=null,this.address=t,this.type=r.ServerType.Unknown,this.minWireVersion=void 0,this.maxWireVersion=void 0,this.maxBsonObjectSize=0x1000000,this.maxMessageSizeBytes=48e6,this.maxWriteBatchSize=1e5,this.logicalSessionTimeoutMinutes=n===null||n===void 0?void 0:n.logicalSessionTimeoutMinutes,this.loadBalanced=!!(n===null||n===void 0?void 0:n.loadBalanced),this.compressors=n&&n.compressors&&Array.isArray(n.compressors)?n.compressors:[],this.serverConnectionId=null}p(e,[{key:"receiveResponse",value:function e(e){if(e!=null){this.hello=e,this.type=(0,n.parseServerType)(e),"connectionId"in e?this.serverConnectionId=this.parseServerConnectionID(e.connectionId):this.serverConnectionId=null;var t=true,r=false,u=undefined;try{for(var i=o[Symbol.iterator](),s;!(t=(s=i.next()).done);t=true){var a=s.value;e[a]!=null&&(this[a]=e[a]),"__nodejs_mock_server__"in e&&(this.__nodejs_mock_server__=e.__nodejs_mock_server__)}}catch(e){r=true;u=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(r){throw u}}}e.compression&&(this.compressor=this.compressors.filter(function(t){var r;return(r=e.compression)===null||r===void 0?void 0:r.includes(t)})[0])}}},{key:"parseServerConnectionID",value:function e(e){return t.Long.isLong(e)?e.toBigInt():BigInt(e)}}]);return e}();e.StreamDescription=u});var rf=et(function(e){"use strict";var t=function e(e,t){var n=t.timeoutContext,o=t.signal;o===null||o===void 0?void 0:o.throwIfAborted();var u=new r.List,i=new r.List,s=null,a=!1,c=m({next:function e(){var e=u.shift();if(e!=null)return Promise.resolve({value:e,done:!1});if(s!=null){var t=Promise.reject(s);return s=null,t}if(a)return v();var n=(0,r.promiseWithResolvers)(),o=n.promise,c=n.resolve,l=n.reject;return i.push({resolve:c,reject:l}),o},return:function e(){return v()},throw:function e(e){return h(e),Promise.resolve({value:void 0,done:!0})}},Symbol.asyncIterator,function(){return this});e.on("data",f),e.on("error",h);var l=(0,r.addAbortListener)(o,function(){h(this.reason)}),d=n===null||n===void 0?void 0:n.timeoutForSocketRead;return d===null||d===void 0?void 0:d.throwIfExpired(),d===null||d===void 0?void 0:d.then(void 0,h),c;function f(e){var t=i.shift();t!=null?t.resolve({value:e,done:!1}):u.push(e)}function h(e){var t=i.shift();t!=null?t.reject(e):s=e,v()}function v(){e.off("data",f),e.off("error",h),l===null||l===void 0?void 0:l[r.kDispose](),a=!0,d===null||d===void 0?void 0:d.clear();var t={value:void 0,done:a};var n=true,o=false,u=undefined;try{for(var s=i[Symbol.iterator](),c;!(n=(c=s.next()).done);n=true){var v=c.value;v.resolve(t)}}catch(e){o=true;u=e}finally{try{if(!n&&s.return!=null){s.return()}}finally{if(o){throw u}}}return Promise.resolve(t)}};ei();Object.defineProperty(e,"__esModule",{value:!0});e.onData=t;var r=eg()});var rh=et(function(e){"use strict";var t=function e(e){return e.description.logicalSessionTimeoutMinutes!=null};var r=function e(e,t){if(t.proxyHost)return t.hostAddress.toString();var r=e.remoteAddress,n=e.remotePort;return typeof r=="string"&&typeof n=="number"?w.HostAddress.fromHostPort(r,n).toString():(0,w.uuidV4)().toString("hex")};ei();Object.defineProperty(e,"__esModule",{value:!0});e.CryptoConnection=e.SizedMessageTransform=e.Connection=void 0;e.hasSessionSupport=t;var n=Z("stream"),o=Z("timers"),i=ea(),s=ev(),l=ec(),h=eb(),v=eO(),E=el(),S=ed(),b=rc(),O=eA(),w=eg(),_=rl(),D=t1(),T=rd(),M=t0(),R=rf(),k=eE(),I=rs();var P=/*#__PURE__*/function(e){A(t,e);function t(e,n){f(this,t);var o;var u;o=d(this,t),o.lastHelloMS=-1,o.helloOk=!1,o.delayedTimeoutId=null,o.closed=!1,o.clusterTime=null,o.error=null,o.dataEvents=null,o.on("error",w.noop),o.socket=e,o.id=n.id,o.address=r(e,n),o.socketTimeoutMS=(u=n.socketTimeoutMS)!==null&&u!==void 0?u:0,o.monitorCommands=n.monitorCommands,o.serverApi=n.serverApi,o.mongoLogger=n.mongoLogger,o.established=!1,o.description=new T.StreamDescription(o.address,n),o.generation=n.generation,o.lastUseTime=(0,w.now)(),o.messageStream=o.socket.on("error",o.onError.bind(o)).pipe(new x({connection:o})).on("error",o.onError.bind(o)),o.socket.on("close",o.onClose.bind(o)),o.socket.on("timeout",o.onTimeout.bind(o)),o.messageStream.pause();return o}p(t,[{key:"hello",get:function e(){return this.description.hello},set:function e(e){this.description.receiveResponse(e),Object.freeze(this.description)}},{key:"serviceId",get:function e(){var e;return(e=this.hello)===null||e===void 0?void 0:e.serviceId}},{key:"loadBalanced",get:function e(){return this.description.loadBalanced}},{key:"idleTime",get:function e(){return(0,w.calculateDurationInMs)(this.lastUseTime)}},{key:"hasSessionSupport",get:function e(){return this.description.logicalSessionTimeoutMinutes!=null}},{key:"supportsOpMsg",get:function e(){return this.description!=null&&(0,w.maxWireVersion)(this)>=6&&!this.description.__nodejs_mock_server__}},{key:"shouldEmitAndLogCommand",get:function e(){var e,t;var r;return(r=this.monitorCommands||this.established&&!((e=this.authContext)===null||e===void 0?void 0:e.reauthenticating)&&((t=this.mongoLogger)===null||t===void 0?void 0:t.willLog(h.MongoLoggableComponent.COMMAND,h.SeverityLevel.DEBUG)))!==null&&r!==void 0?r:!1}},{key:"markAvailable",value:function e(){this.lastUseTime=(0,w.now)()}},{key:"onError",value:function e(e){this.cleanup(e)}},{key:"onClose",value:function e(){var e="connection ".concat(this.id," to ").concat(this.address," closed");this.cleanup(new l.MongoNetworkError(e))}},{key:"onTimeout",value:function e(){var e=this;this.delayedTimeoutId=(0,o.setTimeout)(function(){var t="connection ".concat(e.id," to ").concat(e.address," timed out"),r=e.hello==null;e.cleanup(new l.MongoNetworkTimeoutError(t,{beforeHandshake:r}))},1).unref()}},{key:"destroy",value:function e(){if(this.closed)return;this.removeAllListeners(t.PINNED),this.removeAllListeners(t.UNPINNED);var e="connection ".concat(this.id," to ").concat(this.address," closed");this.cleanup(new l.MongoNetworkError(e))}},{key:"cleanup",value:function e(e){var r;this.closed||(this.socket.destroy(),this.error=e,(r=this.dataEvents)===null||r===void 0?void 0:r.throw(e).then(void 0,w.squashError),this.closed=!0,this.emit(t.CLOSE))}},{key:"prepareCommand",value:function e(e,t,r){var n;var o=B({},t),u=(0,I.getReadPreference)(r),i=r===null||r===void 0?void 0:r.session,s=this.clusterTime;if(this.serverApi){var a=this.serverApi,c=a.version,d=a.strict,f=a.deprecationErrors;o.apiVersion=c,d!=null&&(o.apiStrict=d),f!=null&&(o.apiDeprecationErrors=f)}if(this.hasSessionSupport&&i){i.clusterTime&&s&&i.clusterTime.clusterTime.greaterThan(s.clusterTime)&&(s=i.clusterTime);var h=(0,b.applySession)(i,o,r);if(h)throw h}else if(i===null||i===void 0?void 0:i.explicit)throw new l.MongoCompatibilityError("Current topology does not support sessions");s&&(o.$clusterTime=s),this.description.type!==S.ServerType.Standalone&&(!(0,I.isSharded)(this)&&!this.description.loadBalanced&&this.supportsOpMsg&&r.directConnection===!0&&(u===null||u===void 0?void 0:u.mode)==="primary"?o.$readPreference=E.ReadPreference.primaryPreferred.toJSON():(0,I.isSharded)(this)&&!this.supportsOpMsg&&(u===null||u===void 0?void 0:u.mode)!=="primary"?o={$query:o,$readPreference:u.toJSON()}:(u===null||u===void 0?void 0:u.mode)!=="primary"&&(o.$readPreference=u.toJSON()));var v=B({numberToSkip:0,numberToReturn:-1,checkKeys:!1,secondaryOk:u.secondaryOk()},r);return(n=r.timeoutContext)===null||n===void 0?void 0:n.addMaxTimeMSToCommand(o,r),this.supportsOpMsg?new D.OpMsgRequest(e,o,v):new D.OpQueryRequest(e,o,v)}},{key:"sendWire",value:function e(e,t,r){var n=this;return W(function(){var o,i,s,a,d,f,h,v,p,m,E,y,g,A,C;return H(this,function(S){switch(S.label){case 0:n.throwIfAborted();a=(s=(i=t.socketTimeoutMS)!==null&&i!==void 0?i:t===null||t===void 0?void 0:(o=t.timeoutContext)===null||o===void 0?void 0:o.getSocketTimeoutMS())!==null&&s!==void 0?s:n.socketTimeoutMS;n.socket.setTimeout(a);S.label=1;case 1:S.trys.push([1,,18,19]);return[4,c(n.writeCommand(e,{agreedCompressor:(f=n.description.compressor)!==null&&f!==void 0?f:"none",zlibCompressionLevel:n.description.zlibCompressionLevel,timeoutContext:t.timeoutContext,signal:t.signal}))];case 2:if(!(S.sent(),t.noResponse||e.moreToCome))return[3,4];return[4,k.MongoDBResponse.empty];case 3:S.sent();return[2];case 4:if(n.throwIfAborted(),((d=t.timeoutContext)===null||d===void 0?void 0:d.csotEnabled())&&t.timeoutContext.minRoundTripTime!=null&&t.timeoutContext.remainingTimeMS<t.timeoutContext.minRoundTripTime)throw new l.MongoOperationTimeoutError("Server roundtrip time is greater than the time remaining");h=false,v=false;S.label=5;case 5:S.trys.push([5,11,12,17]);m=u(n.readMany(t));S.label=6;case 6:return[4,c(m.next())];case 7:if(!(h=!(E=S.sent()).done))return[3,10];y=E.value;g=y;n.socket.setTimeout(0);A=g.parse();return[4,(r!==null&&r!==void 0?r:k.MongoDBResponse).make(A)];case 8:S.sent(),n.throwIfAborted(),n.socket.setTimeout(a);S.label=9;case 9:h=false;return[3,6];case 10:return[3,17];case 11:C=S.sent();v=true;p=C;return[3,17];case 12:S.trys.push([12,,15,16]);if(!(h&&m.return!=null))return[3,14];return[4,c(m.return())];case 13:S.sent();S.label=14;case 14:return[3,16];case 15:if(v){throw p}return[7];case 16:return[7];case 17:return[3,19];case 18:n.socket.setTimeout(0);return[7];case 19:return[2]}})})()}},{key:"sendCommand",value:function e(e,r,n,o){var i=this;return W(function(){var s,a,d,f,h,v,p,E,y,g,A,C,S,O,D,T;return H(this,function(M){switch(M.label){case 0:n===null||n===void 0?void 0:(s=n.signal)===null||s===void 0?void 0:s.throwIfAborted();a=i.prepareCommand(e.db,r,n),d=0;i.shouldEmitAndLogCommand&&(d=(0,w.now)(),i.emitAndLogCommand(i.monitorCommands,t.COMMAND_STARTED,a.databaseName,i.established,new _.CommandStartedEvent(i,a,i.description.serverConnectionId)));f=n.documentsReturnedIn==null||!n.raw?n:F(B({},n),{raw:!1,fieldsAsRaw:m({},n.documentsReturnedIn,!0)});M.label=1;case 1:M.trys.push([1,18,,19]);i.throwIfAborted();p=false,E=false;M.label=2;case 2:M.trys.push([2,11,12,17]);g=u(i.sendWire(a,n,o));M.label=3;case 3:return[4,c(g.next())];case 4:if(!(p=!(A=M.sent()).done))return[3,10];C=A.value;h=C;if(v=void 0,n.session!=null&&(0,b.updateSessionFromResponse)(n.session,h),h.$clusterTime&&(i.clusterTime=h.$clusterTime,i.emit(t.CLUSTER_TIME_RECEIVED,h.$clusterTime)),h.ok===0)throw((S=n.timeoutContext)===null||S===void 0?void 0:S.csotEnabled())&&h.isMaxTimeExpiredError?new l.MongoOperationTimeoutError("Server reported a timeout error",{cause:new l.MongoServerError(v!==null&&v!==void 0?v:v=h.toObject(f))}):new l.MongoServerError(v!==null&&v!==void 0?v:v=h.toObject(f));i.shouldEmitAndLogCommand&&i.emitAndLogCommand(i.monitorCommands,t.COMMAND_SUCCEEDED,a.databaseName,i.established,new _.CommandSucceededEvent(i,a,n.noResponse?void 0:a.moreToCome?{ok:1}:v!==null&&v!==void 0?v:v=h.toObject(f),d,i.description.serverConnectionId));if(!(o==null))return[3,6];return[4,v!==null&&v!==void 0?v:v=h.toObject(f)];case 5:O=M.sent();return[3,8];case 6:return[4,h];case 7:O=M.sent();M.label=8;case 8:O,i.throwIfAborted();M.label=9;case 9:p=false;return[3,3];case 10:return[3,17];case 11:D=M.sent();E=true;y=D;return[3,17];case 12:M.trys.push([12,,15,16]);if(!(p&&g.return!=null))return[3,14];return[4,c(g.return())];case 13:M.sent();M.label=14;case 14:return[3,16];case 15:if(E){throw y}return[7];case 16:return[7];case 17:return[3,19];case 18:T=M.sent();throw i.shouldEmitAndLogCommand&&i.emitAndLogCommand(i.monitorCommands,t.COMMAND_FAILED,a.databaseName,i.established,new _.CommandFailedEvent(i,a,T,d,i.description.serverConnectionId)),T;case 19:return[2]}})})()}},{key:"command",value:function e(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0;var o=this;return a(function(){var i,s,a,c,d,f,h,v,p,m,E;return H(this,function(y){switch(y.label){case 0:o.throwIfAborted(),(i=r.signal)===null||i===void 0?void 0:i.throwIfAborted();s=false,a=false;y.label=1;case 1:y.trys.push([1,6,7,12]);d=u(o.sendCommand(e,t,r,n));y.label=2;case 2:return[4,d.next()];case 3:if(!(s=!(f=y.sent()).done))return[3,5];h=f.value;v=h;if((p=r.timeoutContext)===null||p===void 0?void 0:p.csotEnabled()){;if(k.MongoDBResponse.is(v)){if(v.isMaxTimeExpiredError)throw new l.MongoOperationTimeoutError("Server reported a timeout error",{cause:new l.MongoServerError(v.toObject())})}else if(Array.isArray(v===null||v===void 0?void 0:v.writeErrors)&&v.writeErrors.some(function(e){return(e===null||e===void 0?void 0:e.code)===l.MONGODB_ERROR_CODES.MaxTimeMSExpired})||(v===null||v===void 0?void 0:(m=v.writeConcernError)===null||m===void 0?void 0:m.code)===l.MONGODB_ERROR_CODES.MaxTimeMSExpired)throw new l.MongoOperationTimeoutError("Server reported a timeout error",{cause:new l.MongoServerError(v)})}return[2,v];case 4:s=false;return[3,2];case 5:return[3,12];case 6:E=y.sent();a=true;c=E;return[3,12];case 7:y.trys.push([7,,10,11]);if(!(s&&d.return!=null))return[3,9];return[4,d.return()];case 8:y.sent();y.label=9;case 9:return[3,11];case 10:if(a){throw c}return[7];case 11:return[7];case 12:throw new l.MongoUnexpectedServerResponseError("Unable to get response from server")}})})()}},{key:"exhaustCommand",value:function e(e,t,r,n){var o=this;a(function(){var i,s,a,c,d,f,h,v;return H(this,function(p){switch(p.label){case 0:o.throwIfAborted();i=false,s=false;p.label=1;case 1:p.trys.push([1,6,7,12]);c=u(o.sendCommand(e,t,r));p.label=2;case 2:return[4,c.next()];case 3:if(!(i=!(d=p.sent()).done))return[3,5];f=d.value;h=f;n(void 0,h),o.throwIfAborted();p.label=4;case 4:i=false;return[3,2];case 5:return[3,12];case 6:v=p.sent();s=true;a=v;return[3,12];case 7:p.trys.push([7,,10,11]);if(!(i&&c.return!=null))return[3,9];return[4,c.return()];case 8:p.sent();p.label=9;case 9:return[3,11];case 10:if(s){throw a}return[7];case 11:return[7];case 12:throw new l.MongoUnexpectedServerResponseError("Server ended moreToCome unexpectedly")}})})().then(void 0,n)}},{key:"throwIfAborted",value:function e(){if(this.error)throw this.error}},{key:"writeCommand",value:function e(e,t){var r=this;return a(function(){var n,o,u,i,s,a,c,d,f,h,v,p,m;return H(this,function(E){switch(E.label){case 0:s=t.agreedCompressor==="none"||!D.OpCompressedRequest.canCompress(e)?e:new D.OpCompressedRequest(e,{agreedCompressor:(u=t.agreedCompressor)!==null&&u!==void 0?u:"none",zlibCompressionLevel:(i=t.zlibCompressionLevel)!==null&&i!==void 0?i:0});c=Buffer.concat;return[4,s.toBin()];case 1:a=c.apply(Buffer,[E.sent()]);if(((n=t.timeoutContext)===null||n===void 0?void 0:n.csotEnabled())&&t.timeoutContext.minRoundTripTime!=null&&t.timeoutContext.remainingTimeMS<t.timeoutContext.minRoundTripTime)throw new l.MongoOperationTimeoutError("Server roundtrip time is greater than the time remaining");if(r.socket.write(a))return[2];d=(0,w.once)(r.socket,"drain",t),f=t===null||t===void 0?void 0:(o=t.timeoutContext)===null||o===void 0?void 0:o.timeoutForSocketWrite,h=f?Promise.race([d,f]):d;E.label=2;case 2:E.trys.push([2,4,5,6]);return[4,h];case 3:return[2,E.sent()];case 4:v=E.sent();if(O.TimeoutError.is(v)){m=new l.MongoOperationTimeoutError("Timed out at socket write");throw r.onError(m),m}else v===((p=t.signal)===null||p===void 0?void 0:p.reason)&&r.onError(v);throw v;case 5:f===null||f===void 0?void 0:f.clear();return[7];case 6:return[2]}})})()}},{key:"readMany",value:function e(e){var t=this;return W(function(){var r,n,o,i,s,a,d,f,h,v,p,m;return H(this,function(E){switch(E.label){case 0:E.trys.push([0,15,16,17]);t.dataEvents=(0,R.onData)(t.messageStream,e),t.messageStream.resume();r=false,n=false;E.label=1;case 1:E.trys.push([1,8,9,14]);i=u(t.dataEvents);E.label=2;case 2:return[4,c(i.next())];case 3:if(!(r=!(s=E.sent()).done))return[3,7];a=s.value;d=a;return[4,c((0,M.decompressResponse)(d))];case 4:f=E.sent();return[4,f];case 5:if(E.sent(),!f.moreToCome)return[2];E.label=6;case 6:r=false;return[3,2];case 7:return[3,14];case 8:h=E.sent();n=true;o=h;return[3,14];case 9:E.trys.push([9,,12,13]);if(!(r&&i.return!=null))return[3,11];return[4,c(i.return())];case 10:E.sent();E.label=11;case 11:return[3,13];case 12:if(n){throw o}return[7];case 13:return[7];case 14:return[3,17];case 15:v=E.sent();if(O.TimeoutError.is(v)){m=new l.MongoOperationTimeoutError("Timed out during socket read (".concat(v.duration,"ms)"));throw t.dataEvents=null,t.onError(m),m}else v===((p=e.signal)===null||p===void 0?void 0:p.reason)&&t.onError(v);throw v;case 16:t.dataEvents=null,t.messageStream.pause(),t.throwIfAborted();return[7];case 17:return[2]}})})()}}]);return t}(v.TypedEventEmitter);e.Connection=P;P.COMMAND_STARTED=s.COMMAND_STARTED;P.COMMAND_SUCCEEDED=s.COMMAND_SUCCEEDED;P.COMMAND_FAILED=s.COMMAND_FAILED;P.CLUSTER_TIME_RECEIVED=s.CLUSTER_TIME_RECEIVED;P.CLOSE=s.CLOSE;P.PINNED=s.PINNED;P.UNPINNED=s.UNPINNED;var x=/*#__PURE__*/function(e){A(t,e);function t(e){var r=e.connection;f(this,t);var n;n=d(this,t,[{writableObjectMode:!1,readableObjectMode:!0}]),n.bufferPool=new w.BufferPool,n.connection=r;return n}p(t,[{key:"_transform",value:function e(e,t,r){this.connection.delayedTimeoutId!=null&&((0,o.clearTimeout)(this.connection.delayedTimeoutId),this.connection.delayedTimeoutId=null),this.bufferPool.append(e);var n=this.bufferPool.getInt32();if(n==null)return r();if(n<0)return r(new l.MongoParseError("Invalid message size: ".concat(n,", too small")));if(n>this.bufferPool.length)return r();var u=this.bufferPool.read(n);return r(null,u)}}]);return t}(n.Transform);e.SizedMessageTransform=x;var L=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);var n;n=d(this,t,[e,r]),n.autoEncrypter=r.autoEncrypter;return n}p(t,[{key:"command",value:function e(e,r,n,o){var u=this;var c=this,d=function(){return y(g(t.prototype),"command",u)};return a(function(){var t,u,a,f,h,v,p,m,E,y,g,A,S,b,O,_,D;return H(this,function(B){switch(B.label){case 0:t=c.autoEncrypter;if(!t)throw new l.MongoMissingDependencyError("No AutoEncrypter available for encryption",{dependencyName:"n/a"});u=(0,w.maxWireVersion)(c);if(!(u===0))return[3,2];return[4,d().call(c,e,r,n,o)];case 1:return[2,B.sent()];case 2:if(u<8)throw new l.MongoCompatibilityError("Auto-encryption requires a minimum MongoDB version of 4.2");a=r.find||r.findAndModify?r.sort:null,f=r.createIndexes?r.indexes.map(function(e){return e.key}):null;return[4,t.encrypt(e.toString(),r,n)];case 3:h=B.sent();v=true,p=false,m=undefined;if(a!=null&&(r.find||r.findAndModify)&&(h.sort=a),f!=null&&r.createIndexes)try{for(E=f.entries()[Symbol.iterator]();!(v=(y=E.next()).done);v=true){g=N(y.value,2),A=g[0],S=g[1];h.indexes[A].key=S}}catch(e){p=true;m=e}finally{try{if(!v&&E.return!=null){E.return()}}finally{if(p){throw m}}}return[4,d().call(c,e,h,n,o!==null&&o!==void 0?o:k.MongoDBResponse)];case 4:O=B.sent();return[4,t.decrypt(O.toBytes(),n)];case 5:_=B.sent(),D=(b=o===null||o===void 0?void 0:o.make(_))!==null&&b!==void 0?b:(0,i.deserialize)(_,n);return[2,(t[s.kDecorateResult]&&(o==null?(0,w.decorateDecryptionResult)(D,O.toObject(),!0):C(D,k.CursorResponse)&&(D.encryptedResponse=O)),D)]}})})()}}]);return t}(P);e.CryptoConnection=L});var rv=et(function(e){"use strict";var t=function e(e){return O.apply(this,arguments)};var r=function e(e,t){var r;var n=(r=e.connectionType)!==null&&r!==void 0?r:S.Connection;return e.autoEncrypter&&(n=S.CryptoConnection),new n(t,e)};var n=function e(e,t){var r=Number(e.maxWireVersion),n=Number(e.minWireVersion),o=!Number.isNaN(r)&&r>=b.MIN_SUPPORTED_WIRE_VERSION,u=!Number.isNaN(n)&&n<=b.MAX_SUPPORTED_WIRE_VERSION;if(o){if(u)return null;var i="Server at ".concat(t.hostAddress," reports minimum wire version ").concat(JSON.stringify(e.minWireVersion),", but this version of the Node.js Driver requires at most ").concat(b.MAX_SUPPORTED_WIRE_VERSION," (MongoDB ").concat(b.MAX_SUPPORTED_SERVER_VERSION,")");return new E.MongoCompatibilityError(i)}var s;var a="Server at ".concat(t.hostAddress," reports maximum wire version ").concat((s=JSON.stringify(e.maxWireVersion))!==null&&s!==void 0?s:0,", but this version of the Node.js Driver requires at least ").concat(b.MIN_SUPPORTED_WIRE_VERSION," (MongoDB ").concat(b.MIN_SUPPORTED_SERVER_VERSION,")");return new E.MongoCompatibilityError(a)};var o=function e(e,t){return w.apply(this,arguments)};var u=function e(e){return _.apply(this,arguments)};var i=function t(t){var r=t.hostAddress;if(!r)throw new E.MongoInvalidArgumentError('Option "hostAddress" is required');var n={};var o=true,u=false,i=undefined;try{for(var s=e.LEGAL_TCP_SOCKET_OPTIONS[Symbol.iterator](),a;!(o=(a=s.next()).done);o=true){var c=a.value;t[c]!=null&&(n[c]=t[c])}}catch(e){u=true;i=e}finally{try{if(!o&&s.return!=null){s.return()}}finally{if(u){throw i}}}if(typeof r.socketPath=="string")return n.path=r.socketPath,n;if(typeof r.host=="string")return n.host=r.host,n.port=r.port,n;throw new E.MongoRuntimeError("Unexpected HostAddress ".concat(JSON.stringify(r)))};var s=function t(t){var r=i(t);var n=true,o=false,u=undefined;try{for(var s=e.LEGAL_TLS_SOCKET_OPTIONS[Symbol.iterator](),a;!(n=(a=s.next()).done);n=true){var c=a.value;t[c]!=null&&(r[c]=t[c])}}catch(e){o=true;u=e}finally{try{if(!n&&s.return!=null){s.return()}}finally{if(o){throw u}}}return t.existingSocket&&(r.socket=t.existingSocket),r.servername==null&&r.host&&!f.isIP(r.host)&&(r.servername=r.host),r};var c=function e(e){return D.apply(this,arguments)};var l=function e(){if(T==null){var e=(0,p.getSocks)();if("kModuleError"in e)throw e.kModuleError;T=e}return T};var d=function e(e){return M.apply(this,arguments)};ei();Object.defineProperty(e,"__esModule",{value:!0});e.LEGAL_TCP_SOCKET_OPTIONS=e.LEGAL_TLS_SOCKET_OPTIONS=void 0;e.connect=t;e.makeConnection=r;e.performInitialHandshake=o;e.prepareHandshakeDocument=u;e.makeSocket=c;var f=Z("net"),h=Z("tls"),v=ev(),p=tn(),E=ec(),y=eg(),g=to(),A=ti(),S=rh(),b=eh();function O(){O=a(function(e){var t,n,u;return H(this,function(i){switch(i.label){case 0:t=null;i.label=1;case 1:i.trys.push([1,4,,5]);return[4,c(e)];case 2:n=i.sent();t=r(e,n);return[4,o(t,e)];case 3:return[2,(i.sent(),t)];case 4:u=i.sent();throw t===null||t===void 0?void 0:t.destroy(),u;case 5:return[2]}})});return O.apply(this,arguments)}function w(){w=a(function(e,t){var r,o,i,s,c,l,d,f,h,p;function m(e,t){return S.apply(this,arguments)}function S(){S=a(function(t,r){var n;return H(this,function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);return[4,e.command((0,y.ns)("admin.$cmd"),t,r)];case 1:return[2,o.sent()];case 2:n=o.sent();throw C(n,E.MongoError)&&n.addErrorLabel(E.MongoErrorLabel.HandshakeError),n;case 3:return[2]}})});return S.apply(this,arguments)}return H(this,function(a){switch(a.label){case 0:r=t.credentials;if(r&&r.mechanism!==A.AuthMechanism.MONGODB_DEFAULT&&!t.authProviders.getOrCreateProvider(r.mechanism,r.mechanismProperties))throw new E.MongoInvalidArgumentError("AuthMechanism '".concat(r.mechanism,"' not supported"));o=new g.AuthContext(e,r,t);e.authContext=o;return[4,u(o)];case 1:i=a.sent(),s=F(B({},t),{raw:!1});typeof t.connectTimeoutMS=="number"&&(s.socketTimeoutMS=t.connectTimeoutMS);c=new Date().getTime();return[4,m(i,s)];case 2:l=a.sent();"isWritablePrimary"in l||(l.isWritablePrimary=l[v.LEGACY_HELLO_COMMAND]),l.helloOk&&(e.helloOk=!0);d=n(l,t);if(d)throw d;if(t.loadBalanced&&!l.serviceId)throw new E.MongoCompatibilityError("Driver attempted to initialize in load balancing mode, but the server does not support this mode.");if(!(e.hello=l,e.lastHelloMS=new Date().getTime()-c,!l.arbiterOnly&&r))return[3,6];o.response=l;f=r.resolveAuthMechanism(l),h=t.authProviders.getOrCreateProvider(f.mechanism,f.mechanismProperties);if(!h)throw new E.MongoInvalidArgumentError("No AuthProvider for ".concat(f.mechanism," defined."));a.label=3;case 3:a.trys.push([3,5,,6]);return[4,h.auth(o)];case 4:a.sent();return[3,6];case 5:p=a.sent();throw C(p,E.MongoError)&&(p.addErrorLabel(E.MongoErrorLabel.HandshakeError),(0,E.needsRetryableWriteLabel)(p,l.maxWireVersion,e.description.type)&&p.addErrorLabel(E.MongoErrorLabel.RetryableWriteError)),p;case 6:e.established=!0;return[2]}})});return w.apply(this,arguments)}function _(){_=a(function(e){var t,r,n,o,u,i,s,a,c,l;return H(this,function(d){switch(d.label){case 0:r=e.options,n=r.compressors?r.compressors:[],o=e.connection,u=o.serverApi;return[4,r.extendedMetadata];case 1:i=d.sent(),s=(t={},m(t,(u===null||u===void 0?void 0:u.version)||r.loadBalanced===!0?"hello":v.LEGACY_HELLO_COMMAND,1),m(t,"helloOk",!0),m(t,"client",i),m(t,"compression",n),t);r.loadBalanced===!0&&(s.loadBalanced=!0);a=e.credentials;if(!a)return[3,5];if(!(a.mechanism===A.AuthMechanism.MONGODB_DEFAULT&&a.username))return[3,3];s.saslSupportedMechs="".concat(a.source,".").concat(a.username);c=e.options.authProviders.getOrCreateProvider(A.AuthMechanism.MONGODB_SCRAM_SHA256,a.mechanismProperties);if(!c)throw new E.MongoInvalidArgumentError("No AuthProvider for ".concat(A.AuthMechanism.MONGODB_SCRAM_SHA256," defined."));return[4,c.prepare(s,e)];case 2:return[2,d.sent()];case 3:l=e.options.authProviders.getOrCreateProvider(a.mechanism,a.mechanismProperties);if(!l)throw new E.MongoInvalidArgumentError("No AuthProvider for ".concat(a.mechanism," defined."));return[4,l.prepare(s,e)];case 4:return[2,d.sent()];case 5:return[2,s]}})});return _.apply(this,arguments)}e.LEGAL_TLS_SOCKET_OPTIONS=["allowPartialTrustChain","ALPNProtocols","ca","cert","checkServerIdentity","ciphers","crl","ecdhCurve","key","minDHSize","passphrase","pfx","rejectUnauthorized","secureContext","secureProtocol","servername","session"];e.LEGAL_TCP_SOCKET_OPTIONS=["autoSelectFamily","autoSelectFamilyAttemptTimeout","family","hints","localAddress","localPort","lookup"];function D(){D=a(function(e){var t,r,n,o,u,a,c,l,v,p,m,g,A,C,S,b,O,w;return H(this,function(_){switch(_.label){case 0:o=(t=e.tls)!==null&&t!==void 0?t:!1,u=(r=e.noDelay)!==null&&r!==void 0?r:!0,a=(n=e.connectTimeoutMS)!==null&&n!==void 0?n:3e4,c=e.existingSocket;if(!(e.proxyHost!=null))return[3,2];return[4,d(F(B({},e),{connectTimeoutMS:a}))];case 1:return[2,_.sent()];case 2:if(o){v=h.connect(s(e));typeof v.disableRenegotiation=="function"&&v.disableRenegotiation(),l=v}else c?l=c:l=f.createConnection(i(e));l.setKeepAlive(!0,3e5),l.setTimeout(a),l.setNoDelay(u);p=null,m=(0,y.promiseWithResolvers)(),g=m.promise,A=m.resolve,C=m.reject;if(c)A(l);else{S=performance.now(),b=o?"secureConnect":"connect";l.once(b,function(){return A(l)}).once("error",function(e){return C(new E.MongoNetworkError(E.MongoError.buildErrorMessage(e),{cause:e}))}).once("timeout",function(){C(new E.MongoNetworkTimeoutError("Socket '".concat(b,"' timed out after ").concat(performance.now()-S|0,"ms (connectTimeoutMS: ").concat(a,")")))}).once("close",function(){return C(new E.MongoNetworkError("Socket closed after ".concat(performance.now()-S|0," during connection establishment")))}),e.cancellationToken!=null&&(p=function(){return C(new E.MongoNetworkError("Socket connection establishment was cancelled after ".concat(performance.now()-S|0)))},e.cancellationToken.once("cancel",p))}_.label=3;case 3:_.trys.push([3,5,6,7]);return[4,g];case 4:return[2,(l=_.sent(),l)];case 5:O=_.sent();throw l.destroy(),O;case 6:l.setTimeout(0),p!=null&&((w=e.cancellationToken)===null||w===void 0?void 0:w.removeListener("cancel",p));return[7];case 7:return[2]}})});return D.apply(this,arguments)}var T=null;function M(){M=a(function(e){var t,r,n,o,u,s,a;return H(this,function(d){switch(d.label){case 0:n=y.HostAddress.fromHostPort((t=e.proxyHost)!==null&&t!==void 0?t:"",(r=e.proxyPort)!==null&&r!==void 0?r:1080);return[4,c(F(B({},e),{hostAddress:n,tls:!1,proxyHost:void 0}))];case 1:o=d.sent(),u=i(e);if(typeof u.host!="string"||typeof u.port!="number")throw new E.MongoInvalidArgumentError("Can only make Socks5 connections to TCP hosts");T!==null&&T!==void 0?T:T=l();d.label=2;case 2:d.trys.push([2,4,,5]);return[4,T.SocksClient.createConnection({existing_socket:o,timeout:e.connectTimeoutMS,command:"connect",destination:{host:u.host,port:u.port},proxy:{host:"iLoveJavaScript",port:0,type:5,userId:e.proxyUsername||void 0,password:e.proxyPassword||void 0}})];case 3:s=d.sent().socket;return[3,5];case 4:a=d.sent();throw new E.MongoNetworkError(E.MongoError.buildErrorMessage(a),{cause:a});case 5:return[4,c(F(B({},e),{existingSocket:s,proxyHost:void 0}))];case 6:return[2,d.sent()]}})});return M.apply(this,arguments)}});var rp=et(function(e){"use strict";ei();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 t=ev(),r=function e(r,n,o,u){f(this,e);this.name=t.SERVER_DESCRIPTION_CHANGED,this.topologyId=r,this.address=n,this.previousDescription=o,this.newDescription=u};e.ServerDescriptionChangedEvent=r;var n=function e(r,n){f(this,e);this.name=t.SERVER_OPENING,this.topologyId=r,this.address=n};e.ServerOpeningEvent=n;var o=function e(r,n){f(this,e);this.name=t.SERVER_CLOSED,this.topologyId=r,this.address=n};e.ServerClosedEvent=o;var u=function e(r,n,o){f(this,e);this.name=t.TOPOLOGY_DESCRIPTION_CHANGED,this.topologyId=r,this.previousDescription=n,this.newDescription=o};e.TopologyDescriptionChangedEvent=u;var i=function e(r){f(this,e);this.name=t.TOPOLOGY_OPENING,this.topologyId=r};e.TopologyOpeningEvent=i;var s=function e(r){f(this,e);this.name=t.TOPOLOGY_CLOSED,this.topologyId=r};e.TopologyClosedEvent=s;var a=function e(r,n){f(this,e);this.name=t.SERVER_HEARTBEAT_STARTED,this.connectionId=r,this.awaited=n};e.ServerHeartbeatStartedEvent=a;var c=function e(r,n,o,u){f(this,e);this.name=t.SERVER_HEARTBEAT_SUCCEEDED,this.connectionId=r,this.duration=n,this.reply=o!==null&&o!==void 0?o:{},this.awaited=u};e.ServerHeartbeatSucceededEvent=c;var l=function e(r,n,o,u){f(this,e);this.name=t.SERVER_HEARTBEAT_FAILED,this.connectionId=r,this.duration=n,this.failure=o,this.awaited=u};e.ServerHeartbeatFailedEvent=l});var rm=et(function(e){"use strict";ei();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 t=ev(),r=eg(),n=function e(t){f(this,e);this.time=new Date,this.address=t.address};e.ConnectionPoolMonitoringEvent=n;var o=/*#__PURE__*/function(e){A(r,e);function r(e){f(this,r);var n;n=d(this,r,[e]),n.name=t.CONNECTION_POOL_CREATED;var o=e.options,u=o.maxConnecting,i=o.maxPoolSize,s=o.minPoolSize,a=o.maxIdleTimeMS,c=o.waitQueueTimeoutMS;n.options={maxConnecting:u,maxPoolSize:i,minPoolSize:s,maxIdleTimeMS:a,waitQueueTimeoutMS:c};return n}return r}(n);e.ConnectionPoolCreatedEvent=o;var u=/*#__PURE__*/function(e){A(r,e);function r(e){f(this,r);var n;n=d(this,r,[e]),n.name=t.CONNECTION_POOL_READY;return n}return r}(n);e.ConnectionPoolReadyEvent=u;var i=/*#__PURE__*/function(e){A(r,e);function r(e){f(this,r);var n;n=d(this,r,[e]),n.name=t.CONNECTION_POOL_CLOSED;return n}return r}(n);e.ConnectionPoolClosedEvent=i;var s=/*#__PURE__*/function(e){A(r,e);function r(e,n){f(this,r);var o;o=d(this,r,[e]),o.name=t.CONNECTION_CREATED,o.connectionId=n.id;return o}return r}(n);e.ConnectionCreatedEvent=s;var a=/*#__PURE__*/function(e){A(n,e);function n(e,o,u){f(this,n);var i;i=d(this,n,[e]),i.name=t.CONNECTION_READY,i.durationMS=(0,r.now)()-u,i.connectionId=o.id;return i}return n}(n);e.ConnectionReadyEvent=a;var c=/*#__PURE__*/function(e){A(r,e);function r(e,n,o,u){f(this,r);var i;i=d(this,r,[e]),i.name=t.CONNECTION_CLOSED,i.connectionId=n.id,i.reason=o,i.serviceId=n.serviceId,i.error=u!==null&&u!==void 0?u:null;return i}return r}(n);e.ConnectionClosedEvent=c;var l=/*#__PURE__*/function(e){A(r,e);function r(e){f(this,r);var n;n=d(this,r,[e]),n.name=t.CONNECTION_CHECK_OUT_STARTED;return n}return r}(n);e.ConnectionCheckOutStartedEvent=l;var h=/*#__PURE__*/function(e){A(n,e);function n(e,o,u,i){f(this,n);var s;s=d(this,n,[e]),s.name=t.CONNECTION_CHECK_OUT_FAILED,s.durationMS=(0,r.now)()-u,s.reason=o,s.error=i;return s}return n}(n);e.ConnectionCheckOutFailedEvent=h;var v=/*#__PURE__*/function(e){A(n,e);function n(e,o,u){f(this,n);var i;i=d(this,n,[e]),i.name=t.CONNECTION_CHECKED_OUT,i.durationMS=(0,r.now)()-u,i.connectionId=o.id;return i}return n}(n);e.ConnectionCheckedOutEvent=v;var p=/*#__PURE__*/function(e){A(r,e);function r(e,n){f(this,r);var o;o=d(this,r,[e]),o.name=t.CONNECTION_CHECKED_IN,o.connectionId=n.id;return o}return r}(n);e.ConnectionCheckedInEvent=p;var m=/*#__PURE__*/function(e){A(r,e);function r(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};f(this,r);var o;o=d(this,r,[e]),o.name=t.CONNECTION_POOL_CLEARED,o.serviceId=n.serviceId,o.interruptInUseConnections=n.interruptInUseConnections;return o}return r}(n);e.ConnectionPoolClearedEvent=m});var rE=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.WaitQueueTimeoutError=e.PoolClearedOnNetworkError=e.PoolClearedError=e.PoolClosedError=void 0;var t=ec(),r=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);var r;r=d(this,t,["Attempted to check out a connection from closed connection pool"]),r.address=e.address;return r}p(t,[{key:"name",get:function e(){return"MongoPoolClosedError"}}]);return t}(t.MongoDriverError);e.PoolClosedError=r;var n=/*#__PURE__*/function(e){A(r,e);function r(e,n){f(this,r);var o;var u;var i=n||"Connection pool for ".concat(e.address,' was cleared because another operation failed with: "').concat((u=e.serverError)===null||u===void 0?void 0:u.message,'"');o=d(this,r,[i,e.serverError?{cause:e.serverError}:void 0]),o.address=e.address,o.addErrorLabel(t.MongoErrorLabel.PoolRequstedRetry);return o}p(r,[{key:"name",get:function e(){return"MongoPoolClearedError"}}]);return r}(t.MongoNetworkError);e.PoolClearedError=n;var o=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);return d(this,t,[e,"Connection to ".concat(e.address," interrupted due to server monitor timeout")])}p(t,[{key:"name",get:function e(){return"PoolClearedOnNetworkError"}}]);return t}(n);e.PoolClearedOnNetworkError=o;var u=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);var n;n=d(this,t,[e]),n.address=r;return n}p(t,[{key:"name",get:function e(){return"MongoWaitQueueTimeoutError"}}]);return t}(t.MongoDriverError);e.WaitQueueTimeoutError=u});var ry=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.ConnectionPool=e.PoolState=void 0;var t=Z("timers"),r=ev(),n=ec(),o=eO(),u=eA(),i=eg(),s=rv(),c=rh(),l=rm(),h=rE(),v=ro();e.PoolState=Object.freeze({paused:"paused",ready:"ready",closed:"closed"});var m=/*#__PURE__*/function(m){A(E,m);function E(t,r){f(this,E);var u;var s;var a,h,p,m,y,g;if(u=d(this,E),u.on("error",i.noop),u.options=Object.freeze(F(B({connectionType:c.Connection},r),{maxPoolSize:(a=r.maxPoolSize)!==null&&a!==void 0?a:100,minPoolSize:(h=r.minPoolSize)!==null&&h!==void 0?h:0,maxConnecting:(p=r.maxConnecting)!==null&&p!==void 0?p:2,maxIdleTimeMS:(m=r.maxIdleTimeMS)!==null&&m!==void 0?m:0,waitQueueTimeoutMS:(y=r.waitQueueTimeoutMS)!==null&&y!==void 0?y:0,minPoolSizeCheckFrequencyMS:(g=r.minPoolSizeCheckFrequencyMS)!==null&&g!==void 0?g:100,autoEncrypter:r.autoEncrypter})),u.options.minPoolSize>u.options.maxPoolSize)throw new n.MongoInvalidArgumentError("Connection pool minimum size must not be greater than maximum pool size");u.poolState=e.PoolState.paused,u.server=t,u.connections=new i.List,u.pending=0,u.checkedOut=new Set,u.minPoolSizeTimer=void 0,u.generation=0,u.serviceGenerations=new Map,u.connectionCounter=(0,i.makeCounter)(1),u.cancellationToken=new o.CancellationToken,u.cancellationToken.setMaxListeners(1/0),u.waitQueue=new i.List,u.metrics=new v.ConnectionPoolMetrics,u.processingWaitQueue=!1,u.mongoLogger=(s=u.server.topology.client)===null||s===void 0?void 0:s.mongoLogger,u.component="connection",process.nextTick(function(){u.emitAndLog(E.CONNECTION_POOL_CREATED,new l.ConnectionPoolCreatedEvent(u))});return u}p(E,[{key:"address",get:function e(){return this.options.hostAddress.toString()}},{key:"closed",get:function t(){return this.poolState===e.PoolState.closed}},{key:"totalConnectionCount",get:function e(){return this.availableConnectionCount+this.pendingConnectionCount+this.currentCheckedOutCount}},{key:"availableConnectionCount",get:function e(){return this.connections.length}},{key:"pendingConnectionCount",get:function e(){return this.pending}},{key:"currentCheckedOutCount",get:function e(){return this.checkedOut.size}},{key:"waitQueueSize",get:function e(){return this.waitQueue.length}},{key:"loadBalanced",get:function e(){return this.options.loadBalanced}},{key:"serverError",get:function e(){return this.server.description.error}},{key:"checkedOutConnections",get:function e(){return this.checkedOut}},{key:"waitQueueErrorMetrics",value:function e(){return this.metrics.info(this.options.maxPoolSize)}},{key:"ready",value:function r(){this.poolState===e.PoolState.paused&&(this.poolState=e.PoolState.ready,this.emitAndLog(E.CONNECTION_POOL_READY,new l.ConnectionPoolReadyEvent(this)),(0,t.clearTimeout)(this.minPoolSizeTimer),this.ensureMinPoolSize())}},{key:"checkOut",value:function e(e){var t=this;return a(function(){var r,o,s,a,c,d,f,v,p,m;return H(this,function(y){switch(y.label){case 0:r=(0,i.now)();t.emitAndLog(E.CONNECTION_CHECK_OUT_STARTED,new l.ConnectionCheckOutStartedEvent(t));o=(0,i.promiseWithResolvers)(),s=o.promise,a=o.resolve,c=o.reject,d=e.timeoutContext.connectionCheckoutTimeout,f={resolve:a,reject:c,cancelled:!1,checkoutTime:r},v=(0,i.addAbortListener)(e.signal,function(){f.cancelled=!0,c(this.reason)});t.waitQueue.push(f),process.nextTick(function(){return t.processWaitQueue()});y.label=1;case 1:y.trys.push([1,3,4,5]);d===null||d===void 0?void 0:d.throwIfExpired();return[4,d?Promise.race([s,d]):s];case 2:return[2,y.sent()];case 3:p=y.sent();if(u.TimeoutError.is(p)){d===null||d===void 0?void 0:d.clear(),f.cancelled=!0,t.emitAndLog(E.CONNECTION_CHECK_OUT_FAILED,new l.ConnectionCheckOutFailedEvent(t,"timeout",f.checkoutTime));m=new h.WaitQueueTimeoutError(t.loadBalanced?t.waitQueueErrorMetrics():"Timed out while checking out a connection from connection pool",t.address);throw e.timeoutContext.csotEnabled()?new n.MongoOperationTimeoutError("Timed out during connection checkout",{cause:m}):m}throw p;case 4:v===null||v===void 0?void 0:v[i.kDispose](),d===null||d===void 0?void 0:d.clear();return[7];case 5:return[2]}})})()}},{key:"checkIn",value:function e(e){var t=this;if(!this.checkedOut.has(e))return;var r=this.closed,n=this.connectionIsStale(e),o=!!(r||n||e.closed);if(o||(e.markAvailable(),this.connections.unshift(e)),this.checkedOut.delete(e),this.emitAndLog(E.CONNECTION_CHECKED_IN,new l.ConnectionCheckedInEvent(this,e)),o){var u=e.closed?"error":r?"poolClosed":"stale";this.destroyConnection(e,u)}process.nextTick(function(){return t.processWaitQueue()})}},{key:"clear",value:function t(){var t=this;var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this.closed)return;if(this.loadBalanced){var o=r.serviceId;if(!o)throw new n.MongoRuntimeError("ConnectionPool.clear() called in load balanced mode with no serviceId.");var u=o.toHexString(),i=this.serviceGenerations.get(u);if(i==null)throw new n.MongoRuntimeError("Service generations are required in load balancer mode.");this.serviceGenerations.set(u,i+1),this.emitAndLog(E.CONNECTION_POOL_CLEARED,new l.ConnectionPoolClearedEvent(this,{serviceId:o}));return}var s;var a=(s=r.interruptInUseConnections)!==null&&s!==void 0?s:!1,c=this.generation;this.generation+=1;var d=this.poolState===e.PoolState.paused;this.poolState=e.PoolState.paused,this.clearMinPoolSizeTimer(),d||this.emitAndLog(E.CONNECTION_POOL_CLEARED,new l.ConnectionPoolClearedEvent(this,{interruptInUseConnections:a})),a&&process.nextTick(function(){return t.interruptInUseConnections(c)}),this.processWaitQueue()}},{key:"interruptInUseConnections",value:function e(e){var t=true,r=false,n=undefined;try{for(var o=this.checkedOut[Symbol.iterator](),u;!(t=(u=o.next()).done);t=true){var i=u.value;i.generation<=e&&(i.onError(new h.PoolClearedOnNetworkError(this)),this.checkIn(i))}}catch(e){r=true;n=e}finally{try{if(!t&&o.return!=null){o.return()}}finally{if(r){throw n}}}}},{key:"close",value:function t(){if(!this.closed){this.cancellationToken.emit("cancel"),typeof this.connectionCounter.return=="function"&&this.connectionCounter.return(void 0),this.poolState=e.PoolState.closed,this.clearMinPoolSizeTimer(),this.processWaitQueue();var t=true,r=false,n=undefined;try{for(var o=this.connections[Symbol.iterator](),u;!(t=(u=o.next()).done);t=true){var i=u.value;this.emitAndLog(E.CONNECTION_CLOSED,new l.ConnectionClosedEvent(this,i,"poolClosed")),i.destroy()}}catch(e){r=true;n=e}finally{try{if(!t&&o.return!=null){o.return()}}finally{if(r){throw n}}}this.connections.clear(),this.emitAndLog(E.CONNECTION_POOL_CLOSED,new l.ConnectionPoolClosedEvent(this))}}},{key:"reauthenticate",value:function e(e){var t=this;return a(function(){var r,o,u,i;return H(this,function(s){switch(s.label){case 0:r=e.authContext;if(!r)throw new n.MongoRuntimeError("No auth context found on connection.");o=r.credentials;if(!o)throw new n.MongoMissingCredentialsError("Connection is missing credentials when asked to reauthenticate");u=o.resolveAuthMechanism(e.hello),i=t.server.topology.client.s.authProviders.getOrCreateProvider(u.mechanism,u.mechanismProperties);if(!i)throw new n.MongoMissingCredentialsError("Reauthenticate failed due to no auth provider for ".concat(o.mechanism));return[4,i.reauth(r)];case 1:s.sent();return[2]}})})()}},{key:"clearMinPoolSizeTimer",value:function e(){var e=this.minPoolSizeTimer;e&&(0,t.clearTimeout)(e)}},{key:"destroyConnection",value:function e(e,t){this.emitAndLog(E.CONNECTION_CLOSED,new l.ConnectionClosedEvent(this,e,t)),e.destroy()}},{key:"connectionIsStale",value:function e(e){var t=e.serviceId;if(this.loadBalanced&&t){var r=t.toHexString(),n=this.serviceGenerations.get(r);return e.generation!==n}return e.generation!==this.generation}},{key:"connectionIsIdle",value:function e(e){return!!(this.options.maxIdleTimeMS&&e.idleTime>this.options.maxIdleTimeMS)}},{key:"destroyConnectionIfPerished",value:function e(e){var t=this.connectionIsStale(e),r=this.connectionIsIdle(e);if(!t&&!r&&!e.closed)return!1;var n=e.closed?"error":t?"stale":"idle";return this.destroyConnection(e,n),!0}},{key:"createConnection",value:function t(t){var o=this;var u=F(B({},this.options),{id:this.connectionCounter.next().value,generation:this.generation,cancellationToken:this.cancellationToken,mongoLogger:this.mongoLogger,authProviders:this.server.topology.client.s.authProviders});this.pending++;var a=(0,i.now)();this.emitAndLog(E.CONNECTION_CREATED,new l.ConnectionCreatedEvent(this,{id:u.id})),(0,s.connect)(u).then(function(n){if(o.poolState!==e.PoolState.ready){o.pending--,n.destroy(),t(o.closed?new h.PoolClosedError(o):new h.PoolClearedError(o));return}var u=true,i=false,s=undefined;try{var d=function(){var e=v.value;n.on(e,function(t){return o.emit(e,t)})};for(var f=U(r.APM_EVENTS).concat([c.Connection.CLUSTER_TIME_RECEIVED])[Symbol.iterator](),v;!(u=(v=f.next()).done);u=true)d()}catch(e){i=true;s=e}finally{try{if(!u&&f.return!=null){f.return()}}finally{if(i){throw s}}}if(o.loadBalanced){n.on(c.Connection.PINNED,function(e){return o.metrics.markPinned(e)}),n.on(c.Connection.UNPINNED,function(e){return o.metrics.markUnpinned(e)});var p=n.serviceId;if(p){var m,y=p.toHexString();(m=o.serviceGenerations.get(y))?n.generation=m:(o.serviceGenerations.set(y,0),n.generation=0)}}n.markAvailable(),o.emitAndLog(E.CONNECTION_READY,new l.ConnectionReadyEvent(o,n,a)),o.pending--,t(void 0,n)},function(e){o.pending--,o.server.handleError(e),o.emitAndLog(E.CONNECTION_CLOSED,new l.ConnectionClosedEvent(o,{id:u.id,serviceId:void 0},"error",e)),(C(e,n.MongoNetworkError)||C(e,n.MongoServerError))&&(e.connectionGeneration=u.generation),t(e!==null&&e!==void 0?e:new n.MongoRuntimeError("Connection creation failed without error"))})}},{key:"ensureMinPoolSize",value:function r(){var r=this;var n=this.options.minPoolSize;this.poolState!==e.PoolState.ready||n===0||(this.connections.prune(function(e){return r.destroyConnectionIfPerished(e)}),this.totalConnectionCount<n&&this.pendingConnectionCount<this.options.maxConnecting?this.createConnection(function(n,o){!n&&o&&(r.connections.push(o),process.nextTick(function(){return r.processWaitQueue()})),r.poolState===e.PoolState.ready&&((0,t.clearTimeout)(r.minPoolSizeTimer),r.minPoolSizeTimer=(0,t.setTimeout)(function(){return r.ensureMinPoolSize()},r.options.minPoolSizeCheckFrequencyMS))}):((0,t.clearTimeout)(this.minPoolSizeTimer),this.minPoolSizeTimer=(0,t.setTimeout)(function(){return r.ensureMinPoolSize()},this.options.minPoolSizeCheckFrequencyMS)))}},{key:"processWaitQueue",value:function t(){var t,r=function(){var e=t.waitQueue.shift();!e||e.cancelled||t.createConnection(function(t,r){e.cancelled?!t&&r&&n.connections.push(r):t?(n.emitAndLog(E.CONNECTION_CHECK_OUT_FAILED,new l.ConnectionCheckOutFailedEvent(n,"connectionError",e.checkoutTime,t)),e.reject(t)):r&&(n.checkedOut.add(r),n.emitAndLog(E.CONNECTION_CHECKED_OUT,new l.ConnectionCheckedOutEvent(n,r,e.checkoutTime)),e.resolve(r)),process.nextTick(function(){return n.processWaitQueue()})})};var n=this;if(this.processingWaitQueue)return;for(this.processingWaitQueue=!0;this.waitQueueSize;){var o=this.waitQueue.first();if(!o){this.waitQueue.shift();continue}if(o.cancelled){this.waitQueue.shift();continue}if(this.poolState!==e.PoolState.ready){var u=this.closed?"poolClosed":"connectionError",i=this.closed?new h.PoolClosedError(this):new h.PoolClearedError(this);this.emitAndLog(E.CONNECTION_CHECK_OUT_FAILED,new l.ConnectionCheckOutFailedEvent(this,u,o.checkoutTime,i)),this.waitQueue.shift(),o.reject(i);continue}if(!this.availableConnectionCount)break;var s=this.connections.shift();if(!s)break;this.destroyConnectionIfPerished(s)||(this.checkedOut.add(s),this.emitAndLog(E.CONNECTION_CHECKED_OUT,new l.ConnectionCheckedOutEvent(this,s,o.checkoutTime)),this.waitQueue.shift(),o.resolve(s))}var a=this.options,c=a.maxPoolSize,d=a.maxConnecting;for(;this.waitQueueSize>0&&this.pendingConnectionCount<d&&(c===0||this.totalConnectionCount<c);)t=this,r();this.processingWaitQueue=!1}}]);return E}(o.TypedEventEmitter);e.ConnectionPool=m;m.CONNECTION_POOL_CREATED=r.CONNECTION_POOL_CREATED;m.CONNECTION_POOL_CLOSED=r.CONNECTION_POOL_CLOSED;m.CONNECTION_POOL_CLEARED=r.CONNECTION_POOL_CLEARED;m.CONNECTION_POOL_READY=r.CONNECTION_POOL_READY;m.CONNECTION_CREATED=r.CONNECTION_CREATED;m.CONNECTION_READY=r.CONNECTION_READY;m.CONNECTION_CLOSED=r.CONNECTION_CLOSED;m.CONNECTION_CHECK_OUT_STARTED=r.CONNECTION_CHECK_OUT_STARTED;m.CONNECTION_CHECK_OUT_FAILED=r.CONNECTION_CHECK_OUT_FAILED;m.CONNECTION_CHECKED_OUT=r.CONNECTION_CHECKED_OUT;m.CONNECTION_CHECKED_IN=r.CONNECTION_CHECKED_IN});var rg=et(function(e){"use strict";var t=function e(e,t){var r;e.loadBalanced||(C(t,y.MongoNetworkError)&&!C(t,y.MongoNetworkTimeoutError)&&((r=e.monitor)===null||r===void 0?void 0:r.reset()),e.emit(M.DESCRIPTION_RECEIVED,new T.ServerDescription(e.description.hostAddress,void 0,{error:t})))};var r=function e(e,t){return t?t.inTransaction()||t.transaction.isCommitted&&"commitTransaction"in e||"aggregate"in e||"find"in e||"getMore"in e||"listCollections"in e||"listIndexes"in e||"bulkWrite"in e:!1};var n=function e(e,t){return t.serviceId?t.generation!==e.serviceGenerations.get(t.serviceId.toHexString()):t.generation!==e.generation};var o=function e(e,t){var r=t.topologyVersion,n=e.description.topologyVersion;return(0,T.compareTopologyVersion)(n,r)<0};var u=function e(e,t){return e&&e.inTransaction()&&!(0,S.isTransactionCommand)(t)};var i=function e(e){return e.s.options.retryWrites!==!1};ei();Object.defineProperty(e,"__esModule",{value:!0});e.Server=void 0;var s;var c=rh(),l=ry(),h=rE(),v=ev(),y=ec(),g=eO(),S=ra(),b=eg(),O=ey(),w=ed(),_=rA(),T=ru(),F=(0,b.makeStateMachine)((s={},m(s,w.STATE_CLOSED,[w.STATE_CLOSED,w.STATE_CONNECTING]),m(s,w.STATE_CONNECTING,[w.STATE_CONNECTING,w.STATE_CLOSING,w.STATE_CONNECTED,w.STATE_CLOSED]),m(s,w.STATE_CONNECTED,[w.STATE_CONNECTED,w.STATE_CLOSING,w.STATE_CLOSED]),m(s,w.STATE_CLOSING,[w.STATE_CLOSING,w.STATE_CLOSED]),s)),M=/*#__PURE__*/function(e){A(s,e);function s(e,r,n){f(this,s);var o;o=d(this,s),o.on("error",b.noop),o.serverApi=n.serverApi;var u=B({hostAddress:r.hostAddress},n);o.topology=e,o.pool=new l.ConnectionPool(o,u),o.s={description:r,options:n,state:w.STATE_CLOSED,operationCount:0};var i=true,a=false,h=undefined;try{var p=function(){var e=E.value;o.pool.on(e,function(t){return o.emit(e,t)})};for(var m=U(v.CMAP_EVENTS).concat(U(v.APM_EVENTS))[Symbol.iterator](),E;!(i=(E=m.next()).done);i=true)p()}catch(e){a=true;h=e}finally{try{if(!i&&m.return!=null){m.return()}}finally{if(a){throw h}}}if(o.pool.on(c.Connection.CLUSTER_TIME_RECEIVED,function(e){o.clusterTime=e}),o.loadBalanced){o.monitor=null;return k(o)}o.monitor=new _.Monitor(o,o.s.options);var y=true,g=false,A=undefined;try{var C=function(){var e=O.value;o.monitor.on(e,function(t){return o.emit(e,t)})};for(var S=v.HEARTBEAT_EVENTS[Symbol.iterator](),O;!(y=(O=S.next()).done);y=true)C()}catch(e){g=true;A=e}finally{try{if(!y&&S.return!=null){S.return()}}finally{if(g){throw A}}}o.monitor.on("resetServer",function(e){return t(o,e)}),o.monitor.on(s.SERVER_HEARTBEAT_SUCCEEDED,function(e){var t,r;o.emit(s.DESCRIPTION_RECEIVED,new T.ServerDescription(o.description.hostAddress,e.reply,{roundTripTime:(t=o.monitor)===null||t===void 0?void 0:t.roundTripTime,minRoundTripTime:(r=o.monitor)===null||r===void 0?void 0:r.minRoundTripTime})),o.s.state===w.STATE_CONNECTING&&(F(o,w.STATE_CONNECTED),o.emit(s.CONNECT,o))});return o}p(s,[{key:"clusterTime",get:function e(){return this.topology.clusterTime},set:function e(e){this.topology.clusterTime=e}},{key:"description",get:function e(){return this.s.description}},{key:"name",get:function e(){return this.s.description.address}},{key:"autoEncrypter",get:function e(){if(this.s.options&&this.s.options.autoEncrypter)return this.s.options.autoEncrypter}},{key:"loadBalanced",get:function e(){return this.topology.description.type===w.TopologyType.LoadBalanced}},{key:"connect",value:function e(){var e;this.s.state===w.STATE_CLOSED&&(F(this,w.STATE_CONNECTING),this.loadBalanced?(F(this,w.STATE_CONNECTED),this.emit(s.CONNECT,this)):(e=this.monitor)===null||e===void 0?void 0:e.connect())}},{key:"destroy",value:function e(){var e;this.s.state!==w.STATE_CLOSED&&(F(this,w.STATE_CLOSING),this.loadBalanced||((e=this.monitor)===null||e===void 0?void 0:e.close()),this.pool.close(),F(this,w.STATE_CLOSED),this.emit("closed"))}},{key:"requestCheck",value:function e(){var e;this.loadBalanced||((e=this.monitor)===null||e===void 0?void 0:e.requestCheck())}},{key:"command",value:function e(e,t,n,o){var u=this;return a(function(){var i,s,a,c,l,d,f,v,p,m,g;return H(this,function(A){switch(A.label){case 0:i=E({},D(n));if(e.db==null||typeof e=="string")throw new y.MongoInvalidArgumentError("Namespace must not be a string");if(u.s.state===w.STATE_CLOSING||u.s.state===w.STATE_CLOSED)throw new y.MongoServerClosedError;i.directConnection=u.topology.s.options.directConnection,i.omitReadPreference&&delete i.readPreference,u.description.iscryptd&&(i.omitMaxTimeMS=!0);s=i.session,a=s===null||s===void 0?void 0:s.pinnedConnection;if(!(u.incrementOperationCount(),a==null))return[3,4];A.label=1;case 1:A.trys.push([1,3,,4]);return[4,u.pool.checkOut(i)];case 2:a=A.sent(),u.loadBalanced&&r(t,s)&&(s===null||s===void 0?void 0:s.pin(a));return[3,4];case 3:c=A.sent();throw u.decrementOperationCount(),C(c,h.PoolClearedError)||u.handleError(c),c;case 4:l=null;A.label=5;case 5:A.trys.push([5,10,18,19]);A.label=6;case 6:A.trys.push([6,8,,9]);return[4,a.command(e,t,i,o)];case 7:d=A.sent();return[2,((0,O.throwIfWriteConcernError)(d),d)];case 8:f=A.sent();throw u.decorateCommandError(a,t,i,f);case 9:return[3,19];case 10:v=A.sent();if(!(C(v,y.MongoError)&&v.code===y.MONGODB_ERROR_CODES.Reauthenticate))return[3,16];l=u.pool.reauthenticate(a),l.then(void 0,function(e){l=null,(0,b.squashError)(e)});return[4,(0,b.abortable)(l,i)];case 11:A.sent(),l=null;A.label=12;case 12:A.trys.push([12,14,,15]);return[4,a.command(e,t,i,o)];case 13:p=A.sent();return[2,((0,O.throwIfWriteConcernError)(p),p)];case 14:m=A.sent();throw u.decorateCommandError(a,t,i,m);case 15:return[3,17];case 16:throw v;case 17:return[3,19];case 18:if(u.decrementOperationCount(),(s===null||s===void 0?void 0:s.pinnedConnection)!==a)if(l!=null){g=function(){u.pool.checkIn(a)};l.then(g,g)}else u.pool.checkIn(a);return[7];case 19:return[2]}})})()}},{key:"handleError",value:function e(e,r){var n=this;if(!C(e,y.MongoError)||e.connectionGeneration&&e.connectionGeneration<this.pool.generation)return;var u=C(e,y.MongoNetworkError)&&!C(e,y.MongoNetworkTimeoutError),i=C(e,y.MongoNetworkError)&&e.beforeHandshake,s=e.hasErrorLabel(y.MongoErrorLabel.HandshakeError);if(u||i||s)this.loadBalanced?r&&this.pool.clear({serviceId:r.serviceId}):(e.addErrorLabel(y.MongoErrorLabel.ResetPool),t(this,e));else if((0,y.isSDAMUnrecoverableError)(e)&&o(this,e)){var a=(0,b.maxWireVersion)(this)<=7||(0,y.isNodeShuttingDownError)(e);this.loadBalanced&&r&&a&&this.pool.clear({serviceId:r.serviceId}),this.loadBalanced||(a&&e.addErrorLabel(y.MongoErrorLabel.ResetPool),t(this,e),process.nextTick(function(){return n.requestCheck()}))}}},{key:"decorateCommandError",value:function e(e,t,r,o){if((typeof o==="undefined"?"undefined":j(o))!="object"||o==null||!("name"in o))throw new y.MongoRuntimeError("An unexpected error type: "+(typeof o==="undefined"?"undefined":j(o)));if(o.name==="AbortError"&&"cause"in o&&C(o.cause,y.MongoError)&&(o=o.cause),!C(o,y.MongoError)||n(this.pool,e))return o;var s=r===null||r===void 0?void 0:r.session;return C(o,y.MongoNetworkError)?(s&&!s.hasEnded&&s.serverSession&&(s.serverSession.isDirty=!0),u(s,t)&&!o.hasErrorLabel(y.MongoErrorLabel.TransientTransactionError)&&o.addErrorLabel(y.MongoErrorLabel.TransientTransactionError),(i(this.topology)||(0,S.isTransactionCommand)(t))&&(0,b.supportsRetryableWrites)(this)&&!u(s,t)&&o.addErrorLabel(y.MongoErrorLabel.RetryableWriteError)):(i(this.topology)||(0,S.isTransactionCommand)(t))&&(0,y.needsRetryableWriteLabel)(o,(0,b.maxWireVersion)(this),this.description.type)&&!u(s,t)&&o.addErrorLabel(y.MongoErrorLabel.RetryableWriteError),s&&s.isPinned&&o.hasErrorLabel(y.MongoErrorLabel.TransientTransactionError)&&s.unpin({force:!0}),this.handleError(o,e),o}},{key:"decrementOperationCount",value:function e(){return this.s.operationCount-=1}},{key:"incrementOperationCount",value:function e(){return this.s.operationCount+=1}}]);return s}(g.TypedEventEmitter);e.Server=M;M.SERVER_HEARTBEAT_STARTED=v.SERVER_HEARTBEAT_STARTED;M.SERVER_HEARTBEAT_SUCCEEDED=v.SERVER_HEARTBEAT_SUCCEEDED;M.SERVER_HEARTBEAT_FAILED=v.SERVER_HEARTBEAT_FAILED;M.CONNECT=v.CONNECT;M.DESCRIPTION_RECEIVED=v.DESCRIPTION_RECEIVED;M.CLOSED=v.CLOSED;M.ENDED=v.ENDED});var rA=et(function(e){"use strict";var t=function e(e){return e.s.state===O.STATE_CLOSED||e.s.state===O.STATE_CLOSING};var r=function e(e){var t,r,n;(t=e.monitorId)===null||t===void 0?void 0:t.stop(),e.monitorId=void 0,(r=e.rttPinger)===null||r===void 0?void 0:r.close(),e.rttPinger=void 0,e.cancellationToken.emit("cancel"),(n=e.connection)===null||n===void 0?void 0:n.destroy(),e.connection=null,e.clearRttSamples()};var n=function t(t,r){if(r==null)return!1;var n=t.options.serverMonitoringMode;return n===e.ServerMonitoringMode.poll?!1:n===e.ServerMonitoringMode.stream?!0:!t.isRunningInFaasEnv};var o=function e(e,r){var o,u,s=e.server.description.topologyVersion,c=n(e,s);e.emitAndLogHeartbeat(_.Server.SERVER_HEARTBEAT_STARTED,e.server.topology.s.id,void 0,new w.ServerHeartbeatStartedEvent(e.address,c));function l(t){var n;(n=e.connection)===null||n===void 0?void 0:n.destroy(),e.connection=null,e.emitAndLogHeartbeat(_.Server.SERVER_HEARTBEAT_FAILED,e.server.topology.s.id,void 0,new w.ServerHeartbeatFailedEvent(e.address,(0,b.calculateDurationInMs)(o),t,u));var i=C(t,y.MongoError)?t:new y.MongoError(y.MongoError.buildErrorMessage(t),{cause:t});i.addErrorLabel(y.MongoErrorLabel.ResetPool),C(i,y.MongoNetworkTimeoutError)&&i.addErrorLabel(y.MongoErrorLabel.InterruptInUseConnections),e.emit("resetServer",i),r(t)}function d(t){var n;"isWritablePrimary"in t||(t.isWritablePrimary=t[E.LEGACY_HELLO_COMMAND]);var u;var i=c&&e.rttPinger?(u=e.rttPinger.latestRtt)!==null&&u!==void 0?u:(0,b.calculateDurationInMs)(o):(0,b.calculateDurationInMs)(o);e.addRttSample(i),e.emitAndLogHeartbeat(_.Server.SERVER_HEARTBEAT_SUCCEEDED,e.server.topology.s.id,t.connectionId,new w.ServerHeartbeatSucceededEvent(e.address,i,t,c)),c?(e.emitAndLogHeartbeat(_.Server.SERVER_HEARTBEAT_STARTED,e.server.topology.s.id,void 0,new w.ServerHeartbeatStartedEvent(e.address,!0)),o=(0,b.now)()):((n=e.rttPinger)===null||n===void 0?void 0:n.close(),e.rttPinger=void 0,r(void 0,t))}var f=e.connection;if(f&&!f.closed){var v=f.serverApi,p=f.helloOk,g=e.options.connectTimeoutMS,A=e.options.heartbeatFrequencyMS,S=B(m({},(v===null||v===void 0?void 0:v.version)||p?"hello":E.LEGACY_HELLO_COMMAND,1),c&&s?{maxAwaitTimeMS:A,topologyVersion:i(s)}:{}),O=c?{socketTimeoutMS:g?g+A:0,exhaustAllowed:!0}:{socketTimeoutMS:g};if(c&&e.rttPinger==null&&(e.rttPinger=new I(e)),o=(0,b.now)(),c)return u=!0,f.exhaustCommand((0,b.ns)("admin.$cmd"),S,O,function(e,t){return e?l(e):d(t)});u=!1,f.command((0,b.ns)("admin.$cmd"),S,O).then(d,l);return}a(function(){var t,r,n;return H(this,function(u){switch(u.label){case 0:return[4,(0,h.makeSocket)(e.connectOptions)];case 1:t=u.sent(),r=(0,h.makeConnection)(e.connectOptions,t);o=(0,b.now)();u.label=2;case 2:u.trys.push([2,4,,5]);return[4,(0,h.performInitialHandshake)(r,e.connectOptions)];case 3:return[2,(u.sent(),r)];case 4:n=u.sent();throw r.destroy(),n;case 5:return[2]}})})().then(function(u){var i,s;if(t(e)){u.destroy();return}var a=(0,b.calculateDurationInMs)(o);e.addRttSample(a),e.connection=u,e.emitAndLogHeartbeat(_.Server.SERVER_HEARTBEAT_SUCCEEDED,e.server.topology.s.id,(i=u.hello)===null||i===void 0?void 0:i.connectionId,new w.ServerHeartbeatSucceededEvent(e.address,a,u.hello,n(e,(s=u.hello)===null||s===void 0?void 0:s.topologyVersion))),r(void 0,u.hello)},function(t){e.connection=null,u=!1,l(t)})};var u=function e(e){return function(r){var u=function n(){t(e)||M(e,D),r()};if(e.s.state===T){process.nextTick(r);return}M(e,T);o(e,function(r,o){if(r&&e.server.description.type===O.ServerType.Unknown)return u();n(e,o===null||o===void 0?void 0:o.topologyVersion)&&(0,c.setTimeout)(function(){var r;t(e)||((r=e.monitorId)===null||r===void 0?void 0:r.wake())},0),u()})}};var i=function e(e){return{processId:e.processId,counter:l.Long.isLong(e.counter)?e.counter:l.Long.fromNumber(e.counter)}};ei();Object.defineProperty(e,"__esModule",{value:!0});e.RTTSampler=e.MonitorInterval=e.RTTPinger=e.Monitor=e.ServerMonitoringMode=void 0;var s;var c=Z("timers"),l=ea(),h=rv(),v=tZ(),E=ev(),y=ec(),g=eb(),S=eO(),b=eg(),O=ed(),w=rp(),_=rg(),D="idle",T="monitoring",M=(0,b.makeStateMachine)((s={},m(s,O.STATE_CLOSING,[O.STATE_CLOSING,D,O.STATE_CLOSED]),m(s,O.STATE_CLOSED,[O.STATE_CLOSED,T]),m(s,D,[D,T,O.STATE_CLOSING]),m(s,T,[T,D,O.STATE_CLOSING]),s)),R=new Set([O.STATE_CLOSING,O.STATE_CLOSED,T]);e.ServerMonitoringMode=Object.freeze({auto:"auto",poll:"poll",stream:"stream"});var k=/*#__PURE__*/function(e){A(n,e);function n(e,t){f(this,n);var r;var o;var u,i,s;r=d(this,n),r.component=g.MongoLoggableComponent.TOPOLOGY,r.on("error",b.noop),r.server=e,r.connection=null,r.cancellationToken=new S.CancellationToken,r.cancellationToken.setMaxListeners(1/0),r.monitorId=void 0,r.s={state:O.STATE_CLOSED},r.address=e.description.address,r.options=Object.freeze({connectTimeoutMS:(u=t.connectTimeoutMS)!==null&&u!==void 0?u:1e4,heartbeatFrequencyMS:(i=t.heartbeatFrequencyMS)!==null&&i!==void 0?i:1e4,minHeartbeatFrequencyMS:(s=t.minHeartbeatFrequencyMS)!==null&&s!==void 0?s:500,serverMonitoringMode:t.serverMonitoringMode}),r.isRunningInFaasEnv=(0,v.getFAASEnv)()!=null,r.mongoLogger=(o=r.server.topology.client)===null||o===void 0?void 0:o.mongoLogger,r.rttSampler=new P(10);var a=r.cancellationToken,c=F(B({id:"<monitor>",generation:e.pool.generation,cancellationToken:a,hostAddress:e.description.hostAddress},t),{raw:!1,useBigInt64:!1,promoteLongs:!0,promoteValues:!0,promoteBuffers:!0});delete c.credentials,c.autoEncrypter&&delete c.autoEncrypter,r.connectOptions=Object.freeze(c);return r}p(n,[{key:"connect",value:function e(){if(this.s.state!==O.STATE_CLOSED)return;var e=this.options.heartbeatFrequencyMS,t=this.options.minHeartbeatFrequencyMS;this.monitorId=new N(u(this),{heartbeatFrequencyMS:e,minHeartbeatFrequencyMS:t,immediate:!0})}},{key:"requestCheck",value:function e(){var e;R.has(this.s.state)||((e=this.monitorId)===null||e===void 0?void 0:e.wake())}},{key:"reset",value:function e(){var e=this.server.description.topologyVersion;if(t(this)||e==null)return;M(this,O.STATE_CLOSING),r(this),M(this,D);var n=this.options.heartbeatFrequencyMS,o=this.options.minHeartbeatFrequencyMS;this.monitorId=new N(u(this),{heartbeatFrequencyMS:n,minHeartbeatFrequencyMS:o})}},{key:"close",value:function e(){t(this)||(M(this,O.STATE_CLOSING),r(this),this.emit("close"),M(this,O.STATE_CLOSED))}},{key:"roundTripTime",get:function e(){return this.rttSampler.average()}},{key:"minRoundTripTime",get:function e(){return this.rttSampler.min()}},{key:"latestRtt",get:function e(){return this.rttSampler.last}},{key:"addRttSample",value:function e(e){this.rttSampler.addSample(e)}},{key:"clearRttSamples",value:function e(){this.rttSampler.clear()}}]);return n}(S.TypedEventEmitter);e.Monitor=k;var I=/*#__PURE__*/function(){function e(t){var r=this;f(this,e);var n;this.connection=void 0,this.cancellationToken=t.cancellationToken,this.closed=!1,this.monitor=t,this.latestRtt=(n=t.latestRtt)!==null&&n!==void 0?n:void 0;var o=t.options.heartbeatFrequencyMS;this.monitorId=(0,c.setTimeout)(function(){return r.measureRoundTripTime()},o)}p(e,[{key:"roundTripTime",get:function e(){return this.monitor.roundTripTime}},{key:"minRoundTripTime",get:function e(){return this.monitor.minRoundTripTime}},{key:"close",value:function e(){var e;this.closed=!0,(0,c.clearTimeout)(this.monitorId),(e=this.connection)===null||e===void 0?void 0:e.destroy(),this.connection=void 0}},{key:"measureAndReschedule",value:function e(e,t){var r=this;if(this.closed){t===null||t===void 0?void 0:t.destroy();return}this.connection==null&&(this.connection=t),this.latestRtt=(0,b.calculateDurationInMs)(e),this.monitorId=(0,c.setTimeout)(function(){return r.measureRoundTripTime()},this.monitor.options.heartbeatFrequencyMS)}},{key:"measureRoundTripTime",value:function e(){var e=this;var t;var r=(0,b.now)();if(this.closed)return;var n=this.connection;if(n==null){(0,h.connect)(this.monitor.connectOptions).then(function(t){e.measureAndReschedule(r,t)},function(){e.connection=void 0});return}var o=((t=n.serverApi)===null||t===void 0?void 0:t.version)||n.helloOk?"hello":E.LEGACY_HELLO_COMMAND;n.command((0,b.ns)("admin.$cmd"),m({},o,1),void 0).then(function(){return e.measureAndReschedule(r)},function(){var t;(t=e.connection)===null||t===void 0?void 0:t.destroy(),e.connection=void 0})}}]);return e}();e.RTTPinger=I;var N=/*#__PURE__*/function(){function e(t){var r=this;var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};f(this,e);var o,u;this.isExpeditedCallToFnScheduled=!1,this.stopped=!1,this.isExecutionInProgress=!1,this.hasExecutedOnce=!1,this._executeAndReschedule=function(){r.stopped||(r.timerId&&(0,c.clearTimeout)(r.timerId),r.isExpeditedCallToFnScheduled=!1,r.isExecutionInProgress=!0,r.fn(function(){r.lastExecutionEnded=(0,b.now)(),r.isExecutionInProgress=!1,r._reschedule(r.heartbeatFrequencyMS)}))},this.fn=t,this.lastExecutionEnded=-1/0,this.heartbeatFrequencyMS=(o=n.heartbeatFrequencyMS)!==null&&o!==void 0?o:1e3,this.minHeartbeatFrequencyMS=(u=n.minHeartbeatFrequencyMS)!==null&&u!==void 0?u:500,n.immediate?this._executeAndReschedule():this._reschedule(void 0)}p(e,[{key:"wake",value:function e(){var e=(0,b.now)()-this.lastExecutionEnded;if(e<0)return this._executeAndReschedule();if(!this.isExecutionInProgress&&!this.isExpeditedCallToFnScheduled){if(e<this.minHeartbeatFrequencyMS){this.isExpeditedCallToFnScheduled=!0,this._reschedule(this.minHeartbeatFrequencyMS-e);return}this._executeAndReschedule()}}},{key:"stop",value:function e(){this.stopped=!0,this.timerId&&((0,c.clearTimeout)(this.timerId),this.timerId=void 0),this.lastExecutionEnded=-1/0,this.isExpeditedCallToFnScheduled=!1}},{key:"toString",value:function e(){return JSON.stringify(this)}},{key:"toJSON",value:function e(){var e=(0,b.now)(),t=e-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:e,timeSinceLastCall:t}}},{key:"_reschedule",value:function e(e){this.stopped||(this.timerId&&(0,c.clearTimeout)(this.timerId),this.timerId=(0,c.setTimeout)(this._executeAndReschedule,e||this.heartbeatFrequencyMS))}}]);return e}();e.MonitorInterval=N;var P=/*#__PURE__*/function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10;f(this,e);this.rttSamples=new Float64Array(t),this.length=0,this.writeIndex=0}p(e,[{key:"addSample",value:function e(e){this.rttSamples[this.writeIndex++]=e,this.length<this.rttSamples.length&&this.length++,this.writeIndex%=this.rttSamples.length}},{key:"min",value:function e(){if(this.length<2)return 0;var e=this.rttSamples[0];for(var t=1;t<this.length;t++)this.rttSamples[t]<e&&(e=this.rttSamples[t]);return e}},{key:"average",value:function e(){if(this.length===0)return 0;var e=0;for(var t=0;t<this.length;t++)e+=this.rttSamples[t];return e/this.length}},{key:"last",get:function e(){return this.length===0?null:this.rttSamples[this.writeIndex===0?this.length-1:this.writeIndex-1]}},{key:"clear",value:function e(){this.length=0,this.writeIndex=0}}]);return e}();e.RTTSampler=P});var rC=et(function(e){"use strict";var t=function e(e){return /*#__PURE__*/function(){var t=a(function(t){var r;return H(this,function(n){switch(n.label){case 0:n.trys.push([0,2,,5]);return[4,v.promises[e](t)];case 1:return[2,n.sent()];case 2:r=n.sent();if(!(r.code===v.TIMEOUT))return[3,4];return[4,v.promises[e](t)];case 3:return[2,n.sent()];case 4:throw r;case 5:return[2]}})});return function(e){return t.apply(this,arguments)}}()};var r=function e(e){return $.apply(this,arguments)};var n=function e(e){if(!e)return;var t=function(t,r){if(e.has(t)&&e.has(r))throw new D.MongoAPIError("The '".concat(t,"' option cannot be used with the '").concat(r,"' option"))};t("tlsInsecure","tlsAllowInvalidCertificates"),t("tlsInsecure","tlsAllowInvalidHostnames"),t("tlsInsecure","tlsDisableCertificateRevocationCheck"),t("tlsInsecure","tlsDisableOCSPEndpointCheck"),t("tlsAllowInvalidCertificates","tlsDisableCertificateRevocationCheck"),t("tlsAllowInvalidCertificates","tlsDisableOCSPEndpointCheck"),t("tlsDisableCertificateRevocationCheck","tlsDisableOCSPEndpointCheck")};var o=function e(e,t){if(typeof t=="boolean")return t;switch(t){case"true":return!0;case"false":return!1;default:throw new D.MongoParseError("".concat(e,' must be either "true" or "false"'))}};var u=function e(e,t){var r=(0,P.parseInteger)(t);if(r!=null)return r;throw new D.MongoParseError("Expected ".concat(e," to be stringified int value, got: ").concat(t))};var i=function e(e,t){var r=u(e,t);if(r<0)throw new D.MongoParseError("".concat(e," can only be a positive int value, got: ").concat(t));return r};var s=function e(e){var t,r,n,o,u,i,s,a,c,l,d;return H(this,function(f){switch(f.label){case 0:if(e==="")return[2];t=e.split(",");r=true,n=false,o=undefined;f.label=1;case 1:f.trys.push([1,6,7,8]);u=t[Symbol.iterator]();f.label=2;case 2:if(!!(r=(i=u.next()).done))return[3,5];s=i.value;a=N(s.split(/:(.*)/),2),c=a[0],l=a[1];if(l==null)throw new D.MongoParseError("Cannot have undefined values in key value pairs");return[4,[c,l]];case 3:f.sent();f.label=4;case 4:r=true;return[3,2];case 5:return[3,8];case 6:d=f.sent();n=true;o=d;return[3,8];case 7:try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw o}}return[7];case 8:return[2]}})};var c=function t(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(r!=null&&!C(r,T.MongoClient)&&(u=r,r=void 0),u.useBigInt64&&typeof u.promoteLongs=="boolean"&&!u.promoteLongs)throw new D.MongoAPIError("Must request either bigint or Long for int64 deserialization");if(u.useBigInt64&&typeof u.promoteValues=="boolean"&&!u.promoteValues)throw new D.MongoAPIError("Must request either bigint or Long for int64 deserialization");var i=new m.default(t),s=i.hosts,a=i.isSRV,c=Object.create(null);c.hosts=a?[]:s.map(P.HostAddress.fromString);var d=new J;if(i.pathname!=="/"&&i.pathname!==""){var f=decodeURIComponent(i.pathname[0]==="/"?i.pathname.slice(1):i.pathname);f&&d.set("dbName",[f])}if(i.username!==""){var v={username:decodeURIComponent(i.username)};typeof i.password=="string"&&(v.password=decodeURIComponent(i.password)),d.set("auth",[v])}var p=true,E=false,y=undefined;try{for(var g=i.searchParams.keys()[Symbol.iterator](),A;!(p=(A=g.next()).done);p=true){var w=A.value;var B=i.searchParams.getAll(w),F=/readPreferenceTags/i.test(w);if(!F&&B.length>1)throw new D.MongoInvalidArgumentError('URI option "'.concat(w,'" cannot appear more than once in the connection string'));if(!F&&B.includes(""))throw new D.MongoAPIError('URI option "'.concat(w,'" cannot be specified with no value'));d.has(w)||d.set(w,B)}}catch(e){E=true;y=e}finally{try{if(!p&&g.return!=null){g.return()}}finally{if(E){throw y}}}var R=new J(Object.entries(u).filter(function(e){var t=N(e,2),r=t[1];return r!=null}));if(d.has("serverApi"))throw new D.MongoParseError("URI cannot contain `serverApi`, it can only be passed to the client");var k=d.get("authMechanismProperties");if(k){var I=true,x=false,L=undefined;try{for(var j=k[Symbol.iterator](),z;!(I=(z=j.next()).done);I=true){var W=z.value;if(/(^|,)ALLOWED_HOSTS:/.test(W))throw new D.MongoParseError("Auth mechanism property ALLOWED_HOSTS is not allowed in the connection string.")}}catch(e){x=true;L=e}finally{try{if(!I&&j.return!=null){j.return()}}finally{if(x){throw L}}}}if(R.has("loadBalanced"))throw new D.MongoParseError("loadBalanced is only a valid option in the URI");var V=new J,G=new Set(U(d.keys()).concat(U(R.keys())));var H=true,q=false,K=undefined;try{for(var Y=G[Symbol.iterator](),$;!(H=($=Y.next()).done);H=true){var X=$.value;var Q;var Z=[],ee=R.get(X);ee!=null&&Z.push(ee);var et;var er=(et=d.get(X))!==null&&et!==void 0?et:[];(Q=Z).push.apply(Q,U(er)),V.set(X,Z)}}catch(e){q=true;K=e}finally{try{if(!H&&Y.return!=null){Y.return()}}finally{if(q){throw K}}}if(V.has("tls")||V.has("ssl")){var en=(V.get("tls")||[]).concat(V.get("ssl")||[]).map(o.bind(null,"tls/ssl"));if(new Set(en).size!==1)throw new D.MongoParseError("All values of tls/ssl must be the same.")}n(V);var eo=(0,P.setDifference)(G,Array.from(Object.keys(e.OPTIONS)).map(function(e){return e.toLowerCase()}));if(eo.size!==0){var eu=eo.size>1?"options":"option",ei=eo.size>1?"are":"is";throw new D.MongoParseError("".concat(eu," ").concat(Array.from(eo).join(", ")," ").concat(ei," not supported"))}var es=true,ea=false,ec=undefined;try{for(var el=Object.entries(e.OPTIONS)[Symbol.iterator](),ed;!(es=(ed=el.next()).done);es=true){var ef=N(ed.value,2),eh=ef[0],ev=ef[1];var ep=V.get(eh);if(!ep||ep.length===0)e.DEFAULT_OPTIONS.has(eh)&&h(c,eh,ev,[e.DEFAULT_OPTIONS.get(eh)]);else{var em=ev.deprecated;if(em){var eE=typeof em=="string"?": ".concat(em):"";(0,P.emitWarning)("".concat(eh," is a deprecated option").concat(eE))}h(c,eh,ev,ep)}}}catch(e){ea=true;ec=e}finally{try{if(!es&&el.return!=null){el.return()}}finally{if(ea){throw ec}}}if(c.credentials){var ey=c.credentials.mechanism===b.AuthMechanism.MONGODB_GSSAPI,eg=c.credentials.mechanism===b.AuthMechanism.MONGODB_X509,eA=c.credentials.mechanism===b.AuthMechanism.MONGODB_AWS,eC=c.credentials.mechanism===b.AuthMechanism.MONGODB_OIDC;if((ey||eg)&&V.has("authSource")&&c.credentials.source!=="$external")throw new D.MongoParseError("authMechanism ".concat(c.credentials.mechanism," requires an authSource of '$external'"));if(!(ey||eg||eA||eC)&&c.dbName&&!V.has("authSource")&&(c.credentials=S.MongoCredentials.merge(c.credentials,{source:c.dbName})),eA&&c.credentials.username&&!c.credentials.password)throw new D.MongoMissingCredentialsError("When using ".concat(c.credentials.mechanism," password must be set when a username is specified"));c.credentials.validate(),c.credentials.password===""&&c.credentials.username===""&&c.credentials.mechanism===b.AuthMechanism.MONGODB_DEFAULT&&Object.keys(c.credentials.mechanismProperties).length===0&&delete c.credentials}if(c.dbName||(c.dbName="test"),l(s,c,a),r&&c.autoEncryption&&(_.Encrypter.checkForMongoCrypt(),c.encrypter=new _.Encrypter(r,t,u),c.autoEncrypter=c.encrypter.autoEncrypter),c.userSpecifiedAuthSource=R.has("authSource")||d.has("authSource"),c.userSpecifiedReplicaSet=R.has("replicaSet")||d.has("replicaSet"),a){if(c.srvHost=s[0],c.directConnection)throw new D.MongoAPIError("SRV URI does not support directConnection");if(c.srvMaxHosts>0&&typeof c.replicaSet=="string")throw new D.MongoParseError("Cannot use srvMaxHosts option with replicaSet");var eS=!R.has("tls")&&!d.has("tls"),eb=!R.has("ssl")&&!d.has("ssl");eS&&eb&&(c.tls=!0)}else if(d.has("srvMaxHosts")||R.has("srvMaxHosts")||d.has("srvServiceName")||R.has("srvServiceName"))throw new D.MongoParseError("Cannot use srvMaxHosts or srvServiceName with a non-srv connection string");if(c.directConnection&&c.hosts.length!==1)throw new D.MongoParseError("directConnection option requires exactly one host");if(!c.proxyHost&&(c.proxyPort||c.proxyUsername||c.proxyPassword))throw new D.MongoParseError("Must specify proxyHost if other proxy options are passed");if(c.proxyUsername&&!c.proxyPassword||!c.proxyUsername&&c.proxyPassword)throw new D.MongoParseError("Can only specify both of proxy username/password or neither");if(["proxyHost","proxyPort","proxyUsername","proxyPassword"].map(function(e){var t;return(t=d.get(e))!==null&&t!==void 0?t:[]}).some(function(e){return e.length>1}))throw new D.MongoParseError("Proxy options cannot be specified multiple times in the connection string");return c.mongoLoggerOptions=M.MongoLogger.resolveOptions({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},{mongodbLogPath:c.mongodbLogPath,mongodbLogComponentSeverities:c.mongodbLogComponentSeverities,mongodbLogMaxDocumentLength:c.mongodbLogMaxDocumentLength}),c.metadata=(0,O.makeClientMetadata)(c),c.extendedMetadata=(0,O.addContainerMetadata)(c.metadata).then(void 0,P.squashError),c};var l=function e(e,t,r){if(t.loadBalanced){if(e.length>1)throw new D.MongoParseError(z);if(t.replicaSet)throw new D.MongoParseError(W);if(t.directConnection)throw new D.MongoParseError(G);if(r&&t.srvMaxHosts>0)throw new D.MongoParseError("Cannot limit srv hosts with loadBalanced enabled")}};var h=function e(e,t,r,n){var s=r.target,a=r.type,c=r.transform,l=s!==null&&s!==void 0?s:t;switch(a){case"boolean":e[l]=o(l,n[0]);break;case"int":e[l]=u(l,n[0]);break;case"uint":e[l]=i(l,n[0]);break;case"string":if(n[0]==null)break;e[l]=String(n[0]);break;case"record":if(!(0,P.isRecord)(n[0]))throw new D.MongoParseError("".concat(l," must be an object"));e[l]=n[0];break;case"any":e[l]=n[0];break;default:{if(!c)throw new D.MongoParseError("Descriptors missing a type must define a transform");var d=c({name:l,options:e,values:n});e[l]=d;break}}};ei();Object.defineProperty(e,"__esModule",{value:!0});e.DEFAULT_OPTIONS=e.OPTIONS=void 0;e.resolveSRVRecord=r;e.parseOptions=c;var v=Z("dns"),m=tX(),E=Z("url"),S=ts(),b=ti(),O=tZ(),w=t0(),_=rn(),D=ec(),T=rZ(),M=eb(),R=ep(),k=el(),I=rA(),P=eg(),x=ey(),L=["authSource","replicaSet","loadBalanced"],z="loadBalanced option only supported with a single host in the URI",W="loadBalanced option not supported with a replicaSet option",G="loadBalanced option not supported when directConnection is provided";var K=t("resolveSrv"),Y=t("resolveTxt");function $(){$=a(function(e){var t,r,n,o,u,i,s,a,c,d,f,h,v,p,m,y,g,A,C,O,w;return H(this,function(_){switch(_.label){case 0:if(typeof e.srvHost!="string")throw new D.MongoAPIError('Option "srvHost" must not be empty');t=e.srvHost,r=Y(t);r.then(void 0,P.squashError);n="_".concat(e.srvServiceName,"._tcp.").concat(t);return[4,K(n)];case 1:o=_.sent();if(o.length===0)throw new D.MongoAPIError("No addresses found at host");u=true,i=false,s=undefined;try{for(a=o[Symbol.iterator]();!(u=(c=a.next()).done);u=true){d=c.value,f=d.name;(0,P.checkParentDomainMatch)(f,t)}}catch(e){i=true;s=e}finally{try{if(!u&&a.return!=null){a.return()}}finally{if(i){throw s}}}h=o.map(function(e){var t;return P.HostAddress.fromString("".concat(e.name,":").concat((t=e.port)!==null&&t!==void 0?t:27017))});l(h,e,!0);_.label=2;case 2:_.trys.push([2,4,,5]);return[4,r];case 3:v=_.sent();return[3,5];case 4:p=_.sent();if(p.code!=="ENODATA"&&p.code!=="ENOTFOUND")throw p;return[2,h];case 5:if(v.length>1)throw new D.MongoParseError("Multiple text records not allowed");m=new E.URLSearchParams(v[0].join(""));if(U(m.keys()).some(function(e){return!L.includes(e)}))throw new D.MongoParseError("Text record may only set any of: ".concat(L.join(", ")));if(L.some(function(e){return m.get(e)===""}))throw new D.MongoParseError("Cannot have empty URI params in DNS TXT Record");C=(y=m.get("authSource"))!==null&&y!==void 0?y:void 0,O=(g=m.get("replicaSet"))!==null&&g!==void 0?g:void 0,w=(A=m.get("loadBalanced"))!==null&&A!==void 0?A:void 0;if(!e.userSpecifiedAuthSource&&C&&e.credentials&&!b.AUTH_MECHS_AUTH_SRC_EXTERNAL.has(e.credentials.mechanism)&&(e.credentials=S.MongoCredentials.merge(e.credentials,{source:C})),!e.userSpecifiedReplicaSet&&O&&(e.replicaSet=O),w==="true"&&(e.loadBalanced=!0),e.replicaSet&&e.srvMaxHosts>0)throw new D.MongoParseError("Cannot combine replicaSet option with srvMaxHosts");return[2,(l(h,e,!0),h)]}})});return $.apply(this,arguments)}var J=/*#__PURE__*/function(e){A(t,e);function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];f(this,t);return d(this,t,[e.map(function(e){var t=N(e,2),r=t[0],n=t[1];return[r.toLowerCase(),n]})])}p(t,[{key:"has",value:function e(e){return y(g(t.prototype),"has",this).call(this,e.toLowerCase())}},{key:"get",value:function e(e){return y(g(t.prototype),"get",this).call(this,e.toLowerCase())}},{key:"set",value:function e(e,r){return y(g(t.prototype),"set",this).call(this,e.toLowerCase(),r)}},{key:"delete",value:function e(e){return y(g(t.prototype),"delete",this).call(this,e.toLowerCase())}}]);return t}(V(Map));e.OPTIONS={appName:{type:"string"},auth:{target:"credentials",transform:function e(e){var t=e.name,r=e.options,n=N(e.values,1),o=n[0];if(!(0,P.isRecord)(o,["username","password"]))throw new D.MongoParseError("".concat(t," must be an object with 'username' and 'password' properties"));return S.MongoCredentials.merge(r.credentials,{username:o.username,password:o.password})}},authMechanism:{target:"credentials",transform:function e(e){var t=e.options,r=N(e.values,1),n=r[0];var o,u;var i=Object.values(b.AuthMechanism),s=N(i.filter(function(e){return e.match(RegExp(String.raw(q(),n),"i"))}),1),a=s[0];if(!a)throw new D.MongoParseError("authMechanism one of ".concat(i,", got ").concat(n));var c=(o=t.credentials)===null||o===void 0?void 0:o.source;(a===b.AuthMechanism.MONGODB_PLAIN||b.AUTH_MECHS_AUTH_SRC_EXTERNAL.has(a))&&(c="$external");var l=(u=t.credentials)===null||u===void 0?void 0:u.password;return a===b.AuthMechanism.MONGODB_X509&&l===""&&(l=void 0),S.MongoCredentials.merge(t.credentials,{mechanism:a,source:c,password:l})}},authMechanismProperties:{target:"credentials",transform:function e(e){var t=e.options,r=e.values;var n=Object.create(null);var u=true,i=false,a=undefined,c=true,l=false,d=undefined;try{for(var f=r[Symbol.iterator](),h;!(c=(h=f.next()).done);c=true){var v=h.value;if(typeof v=="string")try{for(var p=s(v)[Symbol.iterator](),m;!(u=(m=p.next()).done);u=true){var E=N(m.value,2),y=E[0],g=E[1];try{n[y]=o(y,g)}catch(e){n[y]=g}}}catch(e){i=true;a=e}finally{try{if(!u&&p.return!=null){p.return()}}finally{if(i){throw a}}}else{if(!(0,P.isRecord)(v))throw new D.MongoParseError("AuthMechanismProperties must be an object");n=B({},v)}}}catch(e){l=true;d=e}finally{try{if(!c&&f.return!=null){f.return()}}finally{if(l){throw d}}}return S.MongoCredentials.merge(t.credentials,{mechanismProperties:n})}},authSource:{target:"credentials",transform:function e(e){var t=e.options,r=N(e.values,1),n=r[0];var o=String(n);return S.MongoCredentials.merge(t.credentials,{source:o})}},autoEncryption:{type:"record"},autoSelectFamily:{type:"boolean",default:!0},autoSelectFamilyAttemptTimeout:{type:"uint"},bsonRegExp:{type:"boolean"},serverApi:{target:"serverApi",transform:function e(e){var t=N(e.values,1),r=t[0];var n=typeof r=="string"?{version:r}:r,o=n&&n.version;if(!o)throw new D.MongoParseError('Invalid `serverApi` property; must specify a version from the following enum: ["'.concat(Object.values(T.ServerApiVersion).join('", "'),'"]'));if(!Object.values(T.ServerApiVersion).some(function(e){return e===o}))throw new D.MongoParseError("Invalid server API version=".concat(o,'; must be in the following enum: ["').concat(Object.values(T.ServerApiVersion).join('", "'),'"]'));return n}},checkKeys:{type:"boolean"},compressors:{default:"none",target:"compressors",transform:function e(e){var t=e.values;var r=new Set;var n=true,o=false,u=undefined;try{for(var i=t[Symbol.iterator](),s;!(n=(s=i.next()).done);n=true){var a=s.value;var c=typeof a=="string"?a.split(","):a;if(!Array.isArray(c))throw new D.MongoInvalidArgumentError("compressors must be an array or a comma-delimited list of strings");var l=true,d=false,f=undefined;try{for(var h=c[Symbol.iterator](),v;!(l=(v=h.next()).done);l=true){var p=v.value;if(Object.keys(w.Compressor).includes(String(p)))r.add(String(p));else throw new D.MongoInvalidArgumentError("".concat(p," is not a valid compression mechanism. Must be one of: ").concat(Object.keys(w.Compressor),"."))}}catch(e){d=true;f=e}finally{try{if(!l&&h.return!=null){h.return()}}finally{if(d){throw f}}}}}catch(e){o=true;u=e}finally{try{if(!n&&i.return!=null){i.return()}}finally{if(o){throw u}}}return U(r)}},connectTimeoutMS:{default:3e4,type:"uint"},dbName:{type:"string"},directConnection:{default:!1,type:"boolean"},driverInfo:{default:{},type:"record"},enableUtf8Validation:{type:"boolean",default:!0},family:{transform:function e(e){var t=e.name,r=N(e.values,1),n=r[0];var o=u(t,n);if(o===4||o===6)return o;throw new D.MongoParseError("Option 'family' must be 4 or 6 got ".concat(o,"."))}},fieldsAsRaw:{type:"record"},forceServerObjectId:{default:!1,type:"boolean"},fsync:{deprecated:"Please use journal instead",target:"writeConcern",transform:function e(e){var t=e.name,r=e.options,n=N(e.values,1),u=n[0];var i=x.WriteConcern.fromOptions({writeConcern:F(B({},r.writeConcern),{fsync:o(t,u)})});if(!i)throw new D.MongoParseError("Unable to make a writeConcern from fsync=".concat(u));return i}},heartbeatFrequencyMS:{default:1e4,type:"uint"},ignoreUndefined:{type:"boolean"},j:{deprecated:"Please use journal instead",target:"writeConcern",transform:function e(e){var t=e.name,r=e.options,n=N(e.values,1),u=n[0];var i=x.WriteConcern.fromOptions({writeConcern:F(B({},r.writeConcern),{journal:o(t,u)})});if(!i)throw new D.MongoParseError("Unable to make a writeConcern from journal=".concat(u));return i}},journal:{target:"writeConcern",transform:function e(e){var t=e.name,r=e.options,n=N(e.values,1),u=n[0];var i=x.WriteConcern.fromOptions({writeConcern:F(B({},r.writeConcern),{journal:o(t,u)})});if(!i)throw new D.MongoParseError("Unable to make a writeConcern from journal=".concat(u));return i}},loadBalanced:{default:!1,type:"boolean"},localThresholdMS:{default:15,type:"uint"},maxConnecting:{default:2,transform:function e(e){var t=e.name,r=N(e.values,1),n=r[0];var o=i(t,n);if(o===0)throw new D.MongoInvalidArgumentError("maxConnecting must be > 0 if specified");return o}},maxIdleTimeMS:{default:0,type:"uint"},maxPoolSize:{default:100,type:"uint"},maxStalenessSeconds:{target:"readPreference",transform:function e(e){var t=e.name,r=e.options,n=N(e.values,1),o=n[0];var u=i(t,o);return r.readPreference?k.ReadPreference.fromOptions({readPreference:F(B({},r.readPreference),{maxStalenessSeconds:u})}):new k.ReadPreference("secondary",void 0,{maxStalenessSeconds:u})}},minInternalBufferSize:{type:"uint"},minPoolSize:{default:0,type:"uint"},minHeartbeatFrequencyMS:{default:500,type:"uint"},monitorCommands:{default:!1,type:"boolean"},name:{target:"driverInfo",transform:function e(e){var t=N(e.values,1),r=t[0],n=e.options;return F(B({},n.driverInfo),{name:String(r)})}},noDelay:{default:!0,type:"boolean"},pkFactory:{default:P.DEFAULT_PK_FACTORY,transform:function e(e){var t=N(e.values,1),r=t[0];if((0,P.isRecord)(r,["createPk"])&&typeof r.createPk=="function")return r;throw new D.MongoParseError("Option pkFactory must be an object with a createPk function, got ".concat(r))}},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:function e(e){var t=N(e.values,1),r=t[0],n=e.options;if(C(r,R.ReadConcern)||(0,P.isRecord)(r,["level"]))return R.ReadConcern.fromOptions(B({},n.readConcern,r));throw new D.MongoParseError("ReadConcern must be an object, got ".concat(JSON.stringify(r)))}},readConcernLevel:{target:"readConcern",transform:function e(e){var t=N(e.values,1),r=t[0],n=e.options;return R.ReadConcern.fromOptions(F(B({},n.readConcern),{level:r}))}},readPreference:{default:k.ReadPreference.primary,transform:function e(e){var t=N(e.values,1),r=t[0],n=e.options;if(C(r,k.ReadPreference))return k.ReadPreference.fromOptions(B({readPreference:B({},n.readPreference,r)},r));if((0,P.isRecord)(r,["mode"])){var o=k.ReadPreference.fromOptions(B({readPreference:B({},n.readPreference,r)},r));if(o)return o;throw new D.MongoParseError("Cannot make read preference from ".concat(JSON.stringify(r)))}if(typeof r=="string"){var u,i,s;var a={hedge:(u=n.readPreference)===null||u===void 0?void 0:u.hedge,maxStalenessSeconds:(i=n.readPreference)===null||i===void 0?void 0:i.maxStalenessSeconds};return new k.ReadPreference(r,(s=n.readPreference)===null||s===void 0?void 0:s.tags,a)}throw new D.MongoParseError("Unknown ReadPreference value: ".concat(r))}},readPreferenceTags:{target:"readPreference",transform:function e(e){var t=e.values,r=e.options;var n=Array.isArray(t[0])?t[0]:t,o=[];var u=true,i=false,a=undefined;try{for(var c=n[Symbol.iterator](),l;!(u=(l=c.next()).done);u=true){var d=l.value;var f=Object.create(null);var h=true,v=false,p=undefined;if(typeof d=="string")try{for(var m=s(d)[Symbol.iterator](),E;!(h=(E=m.next()).done);h=true){var y=N(E.value,2),g=y[0],A=y[1];f[g]=A}}catch(e){v=true;p=e}finally{try{if(!h&&m.return!=null){m.return()}}finally{if(v){throw p}}}var C=true,S=false,b=undefined;if((0,P.isRecord)(d))try{for(var O=Object.entries(d)[Symbol.iterator](),w;!(C=(w=O.next()).done);C=true){var _=N(w.value,2),D=_[0],B=_[1];f[D]=B}}catch(e){S=true;b=e}finally{try{if(!C&&O.return!=null){O.return()}}finally{if(S){throw b}}}o.push(f)}}catch(e){i=true;a=e}finally{try{if(!u&&c.return!=null){c.return()}}finally{if(i){throw a}}}return k.ReadPreference.fromOptions({readPreference:r.readPreference,readPreferenceTags:o})}},replicaSet:{type:"string"},retryReads:{default:!0,type:"boolean"},retryWrites:{default:!0,type:"boolean"},serializeFunctions:{type:"boolean"},serverMonitoringMode:{default:"auto",transform:function e(e){var t=N(e.values,1),r=t[0];if(!Object.values(I.ServerMonitoringMode).includes(r))throw new D.MongoParseError("serverMonitoringMode must be one of `auto`, `poll`, or `stream`");return r}},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:function e(e){var t=e.name,r=N(e.values,1),n=r[0];return!o(t,n)}},tlsAllowInvalidHostnames:{target:"checkServerIdentity",transform:function e(e){var t=e.name,r=N(e.values,1),n=r[0];return o(t,n)?function(){}:void 0}},tlsCAFile:{type:"string"},tlsCRLFile:{type:"string"},tlsCertificateKeyFile:{type:"string"},tlsCertificateKeyFilePassword:{target:"passphrase",type:"any"},tlsInsecure:{transform:function e(e){var t=e.name,r=e.options,n=N(e.values,1),u=n[0];var i=o(t,u);return i?(r.checkServerIdentity=function(){},r.rejectUnauthorized=!1):(r.checkServerIdentity=r.tlsAllowInvalidHostnames?function(){}:void 0,r.rejectUnauthorized=!r.tlsAllowInvalidCertificates),i}},w:{target:"writeConcern",transform:function e(e){var t=N(e.values,1),r=t[0],n=e.options;return x.WriteConcern.fromOptions({writeConcern:F(B({},n.writeConcern),{w:r})})}},waitQueueTimeoutMS:{default:0,type:"uint"},writeConcern:{target:"writeConcern",transform:function e(e){var t=N(e.values,1),r=t[0],n=e.options;if((0,P.isRecord)(r)||C(r,x.WriteConcern))return x.WriteConcern.fromOptions({writeConcern:B({},n.writeConcern,r)});if(r==="majority"||typeof r=="number")return x.WriteConcern.fromOptions({writeConcern:F(B({},n.writeConcern),{w:r})});throw new D.MongoParseError("Invalid WriteConcern cannot parse: ".concat(JSON.stringify(r)))}},wtimeout:{deprecated:"Please use wtimeoutMS instead",target:"writeConcern",transform:function e(e){var t=N(e.values,1),r=t[0],n=e.options;var o=x.WriteConcern.fromOptions({writeConcern:F(B({},n.writeConcern),{wtimeout:i("wtimeout",r)})});if(o)return o;throw new D.MongoParseError("Cannot make WriteConcern from wtimeout")}},wtimeoutMS:{target:"writeConcern",transform:function e(e){var t=N(e.values,1),r=t[0],n=e.options;var o=x.WriteConcern.fromOptions({writeConcern:F(B({},n.writeConcern),{wtimeoutMS:i("wtimeoutMS",r)})});if(o)return o;throw new D.MongoParseError("Cannot make WriteConcern from wtimeout")}},zlibCompressionLevel:{default:0,type:"int"},mongodbLogPath:{transform:function e(e){var t=N(e.values,1),r=t[0];if(!(typeof r=="string"&&["stderr","stdout"].includes(r)||r&&(typeof r==="undefined"?"undefined":j(r))=="object"&&"write"in r&&typeof r.write=="function"))throw new D.MongoAPIError("Option 'mongodbLogPath' must be of type 'stderr' | 'stdout' | MongoDBLogWritable");return r}},mongodbLogComponentSeverities:{transform:function e(e){var t=N(e.values,1),r=t[0];if((typeof r==="undefined"?"undefined":j(r))!="object"||!r)throw new D.MongoAPIError("Option 'mongodbLogComponentSeverities' must be a non-null object");var n=true,o=false,u=undefined;try{var i=function(){var e=N(a.value,2),t=e[0],r=e[1];if(typeof r!="string"||typeof t!="string")throw new D.MongoAPIError("User input for option 'mongodbLogComponentSeverities' object cannot include a non-string key or value");if(!Object.values(M.MongoLoggableComponent).some(function(e){return e===t})&&t!=="default")throw new D.MongoAPIError("User input for option 'mongodbLogComponentSeverities' contains invalid key: ".concat(t));if(!Object.values(M.SeverityLevel).some(function(e){return e===r}))throw new D.MongoAPIError("Option 'mongodbLogComponentSeverities' does not support ".concat(r," as a value for ").concat(t))};for(var s=Object.entries(r)[Symbol.iterator](),a;!(n=(a=s.next()).done);n=true)i()}catch(e){o=true;u=e}finally{try{if(!n&&s.return!=null){s.return()}}finally{if(o){throw u}}}return r}},mongodbLogMaxDocumentLength:{type:"uint"},connectionType:{type:"any"},srvPoller:{type:"any"},allowPartialTrustChain:{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"},__skipPingOnConnect:{type:"boolean"}};e.DEFAULT_OPTIONS=new J(Object.entries(e.OPTIONS).filter(function(e){var t=N(e,2),r=t[1];return r.default!=null}).map(function(e){var t=N(e,2),r=t[0],n=t[1];return[r,n.default]}))});var rS=et(function(e){"use strict";var t=function e(e,t){return y.apply(this,arguments)};var r=function e(e){var t=e.split(".");return t.length===1||t[1]==="amazonaws"?"us-east-1":t[1]};ei();Object.defineProperty(e,"__esModule",{value:!0});e.MongoDBAWS=void 0;var n=ea(),o=tn(),u=ec(),i=eg(),s=to(),c=t6(),l=ts(),h=ti(),v=110,m={useBigInt64:!1,promoteLongs:!0,promoteValues:!0,promoteBuffers:!1,bsonRegExp:!1},E=/*#__PURE__*/function(e){A(s,e);function s(e){f(this,s);var t;t=d(this,s),t.credentialProvider=e,t.credentialFetcher=c.AWSTemporaryCredentialProvider.isAWSSDKInstalled?new c.AWSSDKCredentialProvider(e):new c.LegacyAWSTemporaryCredentialProvider;return t}p(s,[{key:"auth",value:function e(e){var s=this;return a(function(){var a,c,l,d,f,h,p,E,y,g,A,C,S,b,O,w,_,D,B,T;return H(this,function(F){switch(F.label){case 0:a=e.connection;if(!e.credentials)throw new u.MongoMissingCredentialsError("AuthContext must provide credentials.");if("kModuleError"in o.aws4)throw o.aws4.kModuleError;c=o.aws4,l=c.sign;if((0,i.maxWireVersion)(a)<9)throw new u.MongoCompatibilityError("MONGODB-AWS authentication requires MongoDB version 4.4 or later");d=e.credentials.username;if(d)return[3,2];return[4,t(e.credentials,s.credentialFetcher)];case 1:d=e.credentials=F.sent();F.label=2;case 2:d;f=e.credentials,h=f.username,p=f.password,E=f.mechanismProperties.AWS_SESSION_TOKEN,y=h&&p&&E?{accessKeyId:h,secretAccessKey:p,sessionToken:E}:h&&p?{accessKeyId:h,secretAccessKey:p}:void 0,g=f.source;return[4,(0,i.randomBytes)(32)];case 3:A=F.sent(),C={saslStart:1,mechanism:"MONGODB-AWS",payload:n.serialize({r:A,p:v},m)};return[4,a.command((0,i.ns)("".concat(g,".$cmd")),C,void 0)];case 4:S=F.sent(),b=n.deserialize(S.payload.buffer,m),O=b.h,w=b.s.buffer;if(w.length!==64)throw new u.MongoRuntimeError("Invalid server nonce length ".concat(w.length,", expected 64"));if(!i.ByteUtils.equals(w.subarray(0,A.byteLength),A))throw new u.MongoRuntimeError("Server nonce does not begin with client nonce");if(O.length<1||O.length>255||O.indexOf("..")!==-1)throw new u.MongoRuntimeError('Server returned an invalid host: "'.concat(O,'"'));_="Action=GetCallerIdentity&Version=2011-06-15",D=l({method:"POST",host:O,region:r(b.h),service:"sts",headers:{"Content-Type":"application/x-www-form-urlencoded","Content-Length":_.length,"X-MongoDB-Server-Nonce":i.ByteUtils.toBase64(w),"X-MongoDB-GS2-CB-Flag":"n"},path:"/",body:_},y),B={a:D.headers.Authorization,d:D.headers["X-Amz-Date"]};E&&(B.t=E);T={saslContinue:1,conversationId:S.conversationId,payload:n.serialize(B,m)};return[4,a.command((0,i.ns)("".concat(g,".$cmd")),T,void 0)];case 5:F.sent();return[2]}})})()}}]);return s}(s.AuthProvider);e.MongoDBAWS=E;function y(){y=a(function(e,t){var r;function n(t){if(!t.AccessKeyId||!t.SecretAccessKey)throw new u.MongoMissingCredentialsError("Could not obtain temporary MONGODB-AWS credentials");return new l.MongoCredentials({username:t.AccessKeyId,password:t.SecretAccessKey,source:e.source,mechanism:h.AuthMechanism.MONGODB_AWS,mechanismProperties:{AWS_SESSION_TOKEN:t.Token}})}return H(this,function(e){switch(e.label){case 0:return[4,t.getCredentials()];case 1:r=e.sent();return[2,n(r)]}})});return y.apply(this,arguments)}});var rb=et(function(e){"use strict";var t=function e(e,t){return t!=null?{saslContinue:1,conversationId:t,payload:new n.Binary(n.BSON.serialize({jwt:e}))}:{saslStart:1,mechanism:o.AuthMechanism.MONGODB_OIDC,payload:new n.Binary(n.BSON.serialize({jwt:e}))}};var r=function e(e){var t={};return e.username&&(t.n=e.username),{saslStart:1,autoAuthorize:1,mechanism:o.AuthMechanism.MONGODB_OIDC,payload:new n.Binary(n.BSON.serialize(t))}};ei();Object.defineProperty(e,"__esModule",{value:!0});e.finishCommandDocument=t;e.startCommandDocument=r;var n=ea(),o=ti()});var rO=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.MachineWorkflow=void 0;var t=Z("timers/promises"),r=eg(),n=rb(),o=100,u=/*#__PURE__*/function(){function e(t){f(this,e);this.cache=t,this.callback=this.withLock(this.getToken.bind(this)),this.lastExecutionTime=Date.now()-o}p(e,[{key:"execute",value:function e(e,t){var o=this;return a(function(){var u,i;return H(this,function(s){switch(s.label){case 0:return[4,o.getTokenFromCacheOrEnv(e,t)];case 1:u=s.sent(),i=(0,n.finishCommandDocument)(u);return[4,e.command((0,r.ns)(t.source),i,void 0)];case 2:s.sent();return[2]}})})()}},{key:"reauthenticate",value:function e(e,t){var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:r.cache.hasAccessToken&&(e.accessToken===r.cache.getAccessToken()?(r.cache.removeAccessToken(),delete e.accessToken):e.accessToken=r.cache.getAccessToken());return[4,r.execute(e,t)];case 1:n.sent();return[2]}})})()}},{key:"speculativeAuth",value:function e(e,t){var r=this;return a(function(){var o,u;return H(this,function(i){switch(i.label){case 0:if(!r.cache.hasAccessToken)return[2,{}];return[4,r.getTokenFromCacheOrEnv(e,t)];case 1:o=i.sent(),u=(0,n.finishCommandDocument)(o);return[2,(u.db=t.source,{speculativeAuthenticate:u})]}})})()}},{key:"getTokenFromCacheOrEnv",value:function e(e,t){var r=this;return a(function(){var n,o;return H(this,function(u){switch(u.label){case 0:if(!r.cache.hasAccessToken)return[3,1];n=r.cache.getAccessToken();return[2,(e.accessToken||(e.accessToken=n),n)];case 1:return[4,r.callback(t)];case 2:o=u.sent();return[2,(r.cache.put({accessToken:o.access_token,expiresInSeconds:o.expires_in}),e.accessToken=o.access_token,o.access_token)];case 3:return[2]}})})()}},{key:"withLock",value:function e(e){var r=Promise.resolve();var n=this;return /*#__PURE__*/function(){var u=a(function(u){return H(this,function(i){switch(i.label){case 0:return[4,r];case 1:i.sent(),r=r.catch(function(){return null}).then(/*#__PURE__*/a(function(){var r,i;return H(this,function(s){switch(s.label){case 0:r=Date.now()-n.lastExecutionTime;i=r<=o;if(!i)return[3,2];return[4,(0,t.setTimeout)(o-r)];case 1:i=s.sent();s.label=2;case 2:i,n.lastExecutionTime=Date.now();return[4,e(u)];case 3:return[2,s.sent()]}})}));return[4,r];case 2:return[2,i.sent()]}})});return function(e){return u.apply(this,arguments)}}()}}]);return e}();e.MachineWorkflow=u});var rw=et(function(e){"use strict";var t=function e(e,t){return v.apply(this,arguments)};var r=function e(e){return e==null||(typeof e==="undefined"?"undefined":j(e))!="object"?!1:"access_token"in e&&typeof e.access_token=="string"&&"expires_in"in e&&typeof e.expires_in=="number"};ei();Object.defineProperty(e,"__esModule",{value:!0});e.AzureMachineWorkflow=void 0;var n=t9(),o=ec(),u=eg(),i=rO(),s=Object.freeze({Metadata:"true",Accept:"application/json"}),c="Azure endpoint did not return a value with only access_token and expires_in properties",l="TOKEN_RESOURCE must be set in the auth mechanism properties when ENVIRONMENT is azure.",h=/*#__PURE__*/function(e){A(n,e);function n(e){f(this,n);return d(this,n,[e])}p(n,[{key:"getToken",value:function e(e){return a(function(){var n,u,i;return H(this,function(s){switch(s.label){case 0:n=e===null||e===void 0?void 0:e.mechanismProperties.TOKEN_RESOURCE,u=e===null||e===void 0?void 0:e.username;if(!n)throw new o.MongoAzureError(l);return[4,t(n,u)];case 1:i=s.sent();if(!r(i))throw new o.MongoAzureError(c);return[2,i]}})})()}}]);return n}(i.MachineWorkflow);e.AzureMachineWorkflow=h;function v(){v=a(function(e,t){var r,i,a;return H(this,function(c){switch(c.label){case 0:r=new URL(n.AZURE_BASE_URL);(0,n.addAzureParams)(r,e,t);return[4,(0,u.get)(r,{headers:s})];case 1:i=c.sent();if(i.status!==200)throw new o.MongoAzureError("Status code ".concat(i.status," returned from the Azure endpoint. Response body: ").concat(i.body));a=JSON.parse(i.body);return[2,{access_token:a.access_token,expires_in:Number(a.expires_in)}]}})});return v.apply(this,arguments)}});var r_=et(function(e){"use strict";var t=function e(e){return l.apply(this,arguments)};ei();Object.defineProperty(e,"__esModule",{value:!0});e.GCPMachineWorkflow=void 0;var r=ec(),n=eg(),o=rO(),u="http://metadata/computeMetadata/v1/instance/service-accounts/default/identity",i=Object.freeze({"Metadata-Flavor":"Google"}),s="TOKEN_RESOURCE must be set in the auth mechanism properties when ENVIRONMENT is gcp.",c=/*#__PURE__*/function(e){A(n,e);function n(e){f(this,n);return d(this,n,[e])}p(n,[{key:"getToken",value:function e(e){return a(function(){var n;return H(this,function(o){switch(o.label){case 0:n=e===null||e===void 0?void 0:e.mechanismProperties.TOKEN_RESOURCE;if(!n)throw new r.MongoGCPError(s);return[4,t(n)];case 1:return[2,o.sent()]}})})()}}]);return n}(o.MachineWorkflow);e.GCPMachineWorkflow=c;function l(){l=a(function(e){var t,o;return H(this,function(s){switch(s.label){case 0:t=new URL(u);t.searchParams.append("audience",e);return[4,(0,n.get)(t,{headers:i})];case 1:o=s.sent();if(o.status!==200)throw new r.MongoGCPError("Status code ".concat(o.status," returned from the GCP endpoint. Response body: ").concat(o.body));return[2,{access_token:o.body}]}})});return l.apply(this,arguments)}});var rD=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.K8SMachineWorkflow=void 0;var t=Z("fs/promises"),r=rO(),n="/var/run/secrets/kubernetes.io/serviceaccount/token",o="AZURE_FEDERATED_TOKEN_FILE",u="AWS_WEB_IDENTITY_TOKEN_FILE",i=/*#__PURE__*/function(e){A(r,e);function r(e){f(this,r);return d(this,r,[e])}p(r,[{key:"getToken",value:function e(){return a(function(){var e,r;return H(this,function(i){switch(i.label){case 0:process.env[o]?e=process.env[o]:process.env[u]?e=process.env[u]:e=n;r={};return[4,(0,t.readFile)(e,"utf8")];case 1:return[2,(r.access_token=i.sent(),r)]}})})()}}]);return r}(r.MachineWorkflow);e.K8SMachineWorkflow=i});var rB=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.TokenCache=void 0;var t=ec(),r=/*#__PURE__*/function(e){A(t,e);function t(){f(this,t);return d(this,t,arguments)}return t}(t.MongoDriverError),n=/*#__PURE__*/function(){function e(){f(this,e)}p(e,[{key:"hasAccessToken",get:function e(){return!!this.accessToken}},{key:"hasRefreshToken",get:function e(){return!!this.refreshToken}},{key:"hasIdpInfo",get:function e(){return!!this.idpInfo}},{key:"getAccessToken",value:function e(){if(!this.accessToken)throw new r("Attempted to get an access token when none exists.");return this.accessToken}},{key:"getRefreshToken",value:function e(){if(!this.refreshToken)throw new r("Attempted to get a refresh token when none exists.");return this.refreshToken}},{key:"getIdpInfo",value:function e(){if(!this.idpInfo)throw new r("Attempted to get IDP information when none exists.");return this.idpInfo}},{key:"put",value:function e(e,t){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expiresInSeconds=e.expiresInSeconds,t&&(this.idpInfo=t)}},{key:"removeAccessToken",value:function e(){this.accessToken=void 0}},{key:"removeRefreshToken",value:function e(){this.refreshToken=void 0}}]);return e}();e.TokenCache=n});var rT=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.TokenMachineWorkflow=void 0;var t=Z("fs"),r=ec(),n=rO(),o="OIDC_TOKEN_FILE must be set in the environment.",u=/*#__PURE__*/function(e){A(n,e);function n(e){f(this,n);return d(this,n,[e])}p(n,[{key:"getToken",value:function e(){return a(function(){var e,n;return H(this,function(u){switch(u.label){case 0:e=process.env.OIDC_TOKEN_FILE;if(!e)throw new r.MongoAWSError(o);n={};return[4,t.promises.readFile(e,"utf8")];case 1:return[2,(n.access_token=u.sent(),n)]}})})()}}]);return n}(n.MachineWorkflow);e.TokenMachineWorkflow=u});var rF=et(function(e){"use strict";var t=function e(e){var t=e.credentials;if(!t)throw new r.MongoMissingCredentialsError(l);return t};ei();Object.defineProperty(e,"__esModule",{value:!0});e.MongoDBOIDC=e.OIDC_WORKFLOWS=e.OIDC_VERSION=void 0;var r=ec(),n=to(),o=rw(),u=r_(),i=rD(),s=rB(),c=rT(),l="AuthContext must provide credentials.";e.OIDC_VERSION=1;e.OIDC_WORKFLOWS=new Map;e.OIDC_WORKFLOWS.set("test",function(){return new c.TokenMachineWorkflow(new s.TokenCache)});e.OIDC_WORKFLOWS.set("azure",function(){return new o.AzureMachineWorkflow(new s.TokenCache)});e.OIDC_WORKFLOWS.set("gcp",function(){return new u.GCPMachineWorkflow(new s.TokenCache)});e.OIDC_WORKFLOWS.set("k8s",function(){return new i.K8SMachineWorkflow(new s.TokenCache)});var h=/*#__PURE__*/function(e){A(n,e);function n(e){f(this,n);var t;if(t=d(this,n),!e)throw new r.MongoInvalidArgumentError("No workflow provided to the OIDC auth provider.");t.workflow=e;return t}p(n,[{key:"auth",value:function e(e){var r=this;return a(function(){var n,o,u,i,s,a;return H(this,function(c){switch(c.label){case 0:o=e.connection,u=e.reauthenticating,i=e.response;if((i===null||i===void 0?void 0:(n=i.speculativeAuthenticate)===null||n===void 0?void 0:n.done)&&!u)return[2];s=t(e);if(!u)return[3,2];return[4,r.workflow.reauthenticate(o,s)];case 1:a=c.sent();return[3,4];case 2:return[4,r.workflow.execute(o,s,i)];case 3:a=c.sent();c.label=4;case 4:a;return[2]}})})()}},{key:"prepare",value:function e(e,r){var n=this;return a(function(){var o,u,i;return H(this,function(s){switch(s.label){case 0:o=r.connection,u=t(r);return[4,n.workflow.speculativeAuth(o,u)];case 1:i=s.sent();return[2,B({},e,i)]}})})()}}]);return n}(n.AuthProvider);e.MongoDBOIDC=h});var rM=et(function(e){"use strict";var t=function e(e){return e==null||(typeof e==="undefined"?"undefined":j(e))!="object"||!("accessToken"in e)?!0:!Object.getOwnPropertyNames(e).every(function(e){return i.includes(e)})};ei();Object.defineProperty(e,"__esModule",{value:!0});e.CallbackWorkflow=e.AUTOMATED_TIMEOUT_MS=e.HUMAN_TIMEOUT_MS=void 0;var r=Z("timers/promises"),n=ec(),o=eg(),u=rb();e.HUMAN_TIMEOUT_MS=3e5;e.AUTOMATED_TIMEOUT_MS=6e4;var i=["accessToken","expiresInSeconds","refreshToken"],s="User provided OIDC callbacks must return a valid object with an accessToken.",c=100,l=/*#__PURE__*/function(){function e(t,r){f(this,e);this.cache=t,this.callback=this.withLock(r),this.lastExecutionTime=Date.now()-c}p(e,[{key:"speculativeAuth",value:function e(e,t){var r=this;return a(function(){var n,o;return H(this,function(i){if(r.cache.hasAccessToken){n=r.cache.getAccessToken();e.accessToken=n;o=(0,u.finishCommandDocument)(n);return[2,(o.db=t.source,{speculativeAuthenticate:o})]}return[2,{}]})})()}},{key:"reauthenticate",value:function e(e,t){var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:r.cache.hasAccessToken&&(e.accessToken===r.cache.getAccessToken()?(r.cache.removeAccessToken(),delete e.accessToken):e.accessToken=r.cache.getAccessToken());return[4,r.execute(e,t)];case 1:n.sent();return[2]}})})()}},{key:"startAuthentication",value:function e(e,t,r){return a(function(){var n,i;return H(this,function(s){switch(s.label){case 0:if(!(r===null||r===void 0?void 0:r.speculativeAuthenticate))return[3,1];i=n=r.speculativeAuthenticate;return[3,3];case 1:return[4,e.command((0,o.ns)(t.source),(0,u.startCommandDocument)(t),void 0)];case 2:i=n=s.sent();s.label=3;case 3:return[2,(i,n)]}})})()}},{key:"finishAuthentication",value:function e(e,t,r,n){return a(function(){return H(this,function(i){switch(i.label){case 0:return[4,e.command((0,o.ns)(t.source),(0,u.finishCommandDocument)(r,n),void 0)];case 1:i.sent();return[2]}})})()}},{key:"executeAndValidateCallback",value:function e(e){var r=this;return a(function(){var o;return H(this,function(u){switch(u.label){case 0:return[4,r.callback(e)];case 1:o=u.sent();if(t(o))throw new n.MongoMissingCredentialsError(s);return[2,o]}})})()}},{key:"withLock",value:function e(e){var t=Promise.resolve();var n=this;return /*#__PURE__*/function(){var o=a(function(o){return H(this,function(u){switch(u.label){case 0:return[4,t];case 1:u.sent(),t=t.catch(function(){return null}).then(/*#__PURE__*/a(function(){var t,u;return H(this,function(i){switch(i.label){case 0:t=Date.now()-n.lastExecutionTime;u=t<=c;if(!u)return[3,2];return[4,(0,r.setTimeout)(c-t,{signal:o.timeoutContext})];case 1:u=i.sent();i.label=2;case 2:u,n.lastExecutionTime=Date.now();return[4,e(o)];case 3:return[2,i.sent()]}})}));return[4,t];case 2:return[2,u.sent()]}})});return function(e){return o.apply(this,arguments)}}()}}]);return e}();e.CallbackWorkflow=l});var rR=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.AutomatedCallbackWorkflow=void 0;var t=ec(),r=eA(),n=rF(),o=rM(),u=/*#__PURE__*/function(e){A(u,e);function u(e,t){f(this,u);return d(this,u,[e,t])}p(u,[{key:"execute",value:function e(e,r){var n=this;return a(function(){var o,u,i;return H(this,function(s){switch(s.label){case 0:if(!n.cache.hasAccessToken)return[3,6];o=n.cache.getAccessToken();s.label=1;case 1:s.trys.push([1,3,,6]);return[4,n.finishAuthentication(e,r,o)];case 2:return[2,s.sent()];case 3:u=s.sent();if(!(C(u,t.MongoError)&&u.code===t.MONGODB_ERROR_CODES.AuthenticationFailed))return[3,5];n.cache.removeAccessToken();return[4,n.execute(e,r)];case 4:return[2,s.sent()];case 5:throw u;case 6:return[4,n.fetchAccessToken(r)];case 7:i=s.sent();n.cache.put(i),e.accessToken=i.accessToken;return[4,n.finishAuthentication(e,r,i.accessToken)];case 8:s.sent();return[2]}})})()}},{key:"fetchAccessToken",value:function e(e){var u=this;return a(function(){var i,s,a,c;return H(this,function(l){switch(l.label){case 0:i=new AbortController,s={timeoutContext:i.signal,version:n.OIDC_VERSION};e.username&&(s.username=e.username);a=r.Timeout.expires(o.AUTOMATED_TIMEOUT_MS);l.label=1;case 1:l.trys.push([1,3,4,5]);return[4,Promise.race([u.executeAndValidateCallback(s),a])];case 2:return[2,l.sent()];case 3:c=l.sent();throw r.TimeoutError.is(c)?(i.abort(),new t.MongoOIDCError("OIDC callback timed out after ".concat(o.AUTOMATED_TIMEOUT_MS,"ms."))):c;case 4:a.clear();return[7];case 5:return[2]}})})()}}]);return u}(o.CallbackWorkflow);e.AutomatedCallbackWorkflow=u});var rk=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.HumanCallbackWorkflow=void 0;var t=ea(),r=ec(),n=eA(),o=rF(),u=rM(),i=/*#__PURE__*/function(e){A(i,e);function i(e,t){f(this,i);return d(this,i,[e,t])}p(i,[{key:"execute",value:function e(e,n){var o=this;return a(function(){var u,i,s,a,c,l,d,f,h;return H(this,function(v){switch(v.label){case 0:if(!o.cache.hasAccessToken)return[3,6];u=o.cache.getAccessToken();e.accessToken=u;v.label=1;case 1:v.trys.push([1,3,,6]);return[4,o.finishAuthentication(e,n,u)];case 2:return[2,v.sent()];case 3:i=v.sent();if(!(C(i,r.MongoError)&&i.code===r.MONGODB_ERROR_CODES.AuthenticationFailed))return[3,5];o.cache.removeAccessToken(),delete e.accessToken;return[4,o.execute(e,n)];case 4:return[2,v.sent()];case 5:throw i;case 6:if(!o.cache.hasRefreshToken)return[3,13];s=o.cache.getRefreshToken();return[4,o.fetchAccessToken(o.cache.getIdpInfo(),n,s)];case 7:a=v.sent();o.cache.put(a),e.accessToken=a.accessToken;v.label=8;case 8:v.trys.push([8,10,,13]);return[4,o.finishAuthentication(e,n,a.accessToken)];case 9:return[2,v.sent()];case 10:c=v.sent();if(!(C(c,r.MongoError)&&c.code===r.MONGODB_ERROR_CODES.AuthenticationFailed))return[3,12];o.cache.removeRefreshToken(),delete e.accessToken;return[4,o.execute(e,n)];case 11:return[2,v.sent()];case 12:throw c;case 13:return[4,o.startAuthentication(e,n)];case 14:l=v.sent(),d=l.conversationId,f=t.BSON.deserialize(l.payload.buffer);return[4,o.fetchAccessToken(f,n)];case 15:h=v.sent();o.cache.put(h,f),e.accessToken=h.accessToken;return[4,o.finishAuthentication(e,n,h.accessToken,d)];case 16:return[2,v.sent()]}})})()}},{key:"fetchAccessToken",value:function e(e,t,i){var s=this;return a(function(){var a,c,l,d;return H(this,function(f){switch(f.label){case 0:a=new AbortController,c={timeoutContext:a.signal,version:o.OIDC_VERSION,idpInfo:e};t.username&&(c.username=t.username),i&&(c.refreshToken=i);l=n.Timeout.expires(u.HUMAN_TIMEOUT_MS);f.label=1;case 1:f.trys.push([1,3,4,5]);return[4,Promise.race([s.executeAndValidateCallback(c),l])];case 2:return[2,f.sent()];case 3:d=f.sent();throw n.TimeoutError.is(d)?(a.abort(),new r.MongoOIDCError("OIDC callback timed out after ".concat(u.HUMAN_TIMEOUT_MS,"ms."))):d;case 4:l.clear();return[7];case 5:return[2]}})})()}}]);return i}(u.CallbackWorkflow);e.HumanCallbackWorkflow=i});var rI=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.Plain=void 0;var t=ea(),r=ec(),n=eg(),o=to(),u=/*#__PURE__*/function(e){A(o,e);function o(){f(this,o);return d(this,o,arguments)}p(o,[{key:"auth",value:function e(e){return a(function(){var o,u,i,s,a;return H(this,function(c){switch(c.label){case 0:o=e.connection,u=e.credentials;if(!u)throw new r.MongoMissingCredentialsError("AuthContext must provide credentials.");i=u.username,s=u.password,a={saslStart:1,mechanism:"PLAIN",payload:new t.Binary(Buffer.from("\0".concat(i,"\0").concat(s))),autoAuthorize:1};return[4,o.command((0,n.ns)("$external.$cmd"),a,void 0)];case 1:c.sent();return[2]}})})()}}]);return o}(o.AuthProvider);e.Plain=u});var rN=et(function(e,t){"use strict";var r=function e(e){var t=[],r=e.length;for(var n=0;n<r;n+=1){var o=e.charCodeAt(n);if(o>=55296&&o<=56319&&r>n+1){var u=e.charCodeAt(n+1);if(u>=56320&&u<=57343){t.push((o-55296)*1024+u-56320+65536),n+=1;continue}}t.push(o)}return t};var n=function e(e,t){var n=e.unassigned_code_points,s=e.commonly_mapped_to_nothing,a=e.non_ASCII_space_characters,c=e.prohibited_characters,l=e.bidirectional_r_al,d=e.bidirectional_l,f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var h=a,v=s;if(typeof t!="string")throw new TypeError("Expected string.");if(t.length===0)return"";var p=r(t).map(function(e){return h.get(e)?32:e}).filter(function(e){return!v.get(e)}),m=String.fromCodePoint.apply(null,p).normalize("NFKC"),E=r(m);if(E.some(function(e){return c.get(e)}))throw new Error("Prohibited character, see https://tools.ietf.org/html/rfc4013#section-2.3");if(f.allowUnassigned!==!0&&E.some(function(e){return n.get(e)}))throw new Error("Unassigned code point, see https://tools.ietf.org/html/rfc4013#section-2.5");var y=E.some(function(e){return l.get(e)}),g=E.some(function(e){return d.get(e)});if(y&&g)throw new Error("String must not contain RandALCat and LCat at the same time, see https://tools.ietf.org/html/rfc3454#section-6");var A=l.get(o(u(m))),C=l.get(o(i(m)));if(y&&!(A&&C))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 m};ei();var o=function(e){return e.codePointAt(0)},u=function(e){return e[0]},i=function(e){return e[e.length-1]};n.saslprep=n;n.default=n;t.exports=n});var rP=et(function(e,t){"use strict";var r=function e(e,t){for(;e.maxPages<t;){var r=e.pages;e.pages=new Array(32768),e.pages[0]=r,e.level++,e.maxPages*=32768}};var n=function e(e,t){if(e.length===t)return e;if(e.length>t)return e.slice(0,t);var r=o(t);return e.copy(r),r};var o=function e(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t};var u=function e(e){var t=Buffer.allocUnsafe?Buffer.allocUnsafe(e.length):new Buffer(e.length);return e.copy(t),t};var i=function e(e,t){this.offset=e*t.length,this.buffer=t,this.updated=!1,this.deduplicate=0};var s=function e(e,t){e=(e-(t[0]=e&32767))/32768,e=(e-(t[1]=e&32767))/32768,t[3]=(e-(t[2]=e&32767))/32768&32767};ei();t.exports=a;function a(e,t){if(!C(this,a))return new a(e,t);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=e||1024,this.deduplicate=t?t.deduplicate:null,this.zeros=this.deduplicate?o(this.deduplicate.length):null}a.prototype.updated=function(e){for(;this.deduplicate&&e.buffer[e.deduplicate]===this.deduplicate[e.deduplicate];)if(e.deduplicate++,e.deduplicate===this.deduplicate.length){e.deduplicate=0,e.buffer.equals&&e.buffer.equals(this.deduplicate)&&(e.buffer=this.deduplicate);break}e.updated||!this.updates||(e.updated=!0,this.updates.push(e))};a.prototype.lastUpdate=function(){if(!this.updates||!this.updates.length)return null;var e=this.updates.pop();return e.updated=!1,e};a.prototype._array=function(e,t){if(e>=this.maxPages){if(t)return;r(this,e)}s(e,this.path);for(var n=this.pages,o=this.level;o>0;o--){var u=this.path[o],i=n[u];if(!i){if(t)return;i=n[u]=new Array(32768)}n=i}return n};a.prototype.get=function(e,t){var r=this._array(e,t),n=this.path[0],s=r&&r[n];return!s&&!t&&(s=r[n]=new i(e,o(this.pageSize)),e>=this.length&&(this.length=e+1)),s&&s.buffer===this.deduplicate&&this.deduplicate&&!t&&(s.buffer=u(s.buffer),s.deduplicate=0),s};a.prototype.set=function(e,t){var r=this._array(e,!1),o=this.path[0];if(e>=this.length&&(this.length=e+1),!t||this.zeros&&t.equals&&t.equals(this.zeros)){r[o]=void 0;return}this.deduplicate&&t.equals&&t.equals(this.deduplicate)&&(t=this.deduplicate);var u=r[o],s=n(t,this.pageSize);u?u.buffer=s:r[o]=new i(e,s)};a.prototype.toBuffer=function(){for(var e=new Array(this.length),t=o(this.pageSize),r=0;r<e.length;)for(var n=this._array(r,!0),u=0;u<32768&&r<e.length;u++)e[r++]=n&&n[u]?n[u].buffer:t;return Buffer.concat(e)}});var rx=et(function(e,t){"use strict";var r=function e(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t};var n=function e(e){return!(e&e-1)};ei();var o=rP();t.exports=u;function u(e){if(!C(this,u))return new u(e);if(e||(e={}),Buffer.isBuffer(e)&&(e={buffer:e}),this.pageOffset=e.pageOffset||0,this.pageSize=e.pageSize||1024,this.pages=e.pages||o(this.pageSize),this.byteLength=this.pages.length*this.pageSize,this.length=8*this.byteLength,!n(this.pageSize))throw new Error("The page size should be a power of two");if(this._trackUpdates=!!e.trackUpdates,this._pageMask=this.pageSize-1,e.buffer){for(var t=0;t<e.buffer.length;t+=this.pageSize)this.pages.set(t/this.pageSize,e.buffer.slice(t,t+this.pageSize));this.byteLength=e.buffer.length,this.length=8*this.byteLength}}u.prototype.get=function(e){var t=e&7,r=(e-t)/8;return!!(this.getByte(r)&128>>t)};u.prototype.getByte=function(e){var t=e&this._pageMask,r=(e-t)/this.pageSize,n=this.pages.get(r,!0);return n?n.buffer[t+this.pageOffset]:0};u.prototype.set=function(e,t){var r=e&7,n=(e-r)/8,o=this.getByte(n);return this.setByte(n,t?o|128>>r:o&(255^128>>r))};u.prototype.toBuffer=function(){for(var e=r(this.pages.length*this.pageSize),t=0;t<this.pages.length;t++){var n=this.pages.get(t,!0),o=t*this.pageSize;n&&n.buffer.copy(e,o,this.pageOffset,this.pageOffset+this.pageSize)}return e};u.prototype.setByte=function(e,t){var r=e&this._pageMask,n=(e-r)/this.pageSize,o=this.pages.get(n,!1);return r+=this.pageOffset,o.buffer[r]===t?!1:(o.buffer[r]=t,e>=this.byteLength&&(this.byteLength=e+1,this.length=this.byteLength*8),this._trackUpdates&&this.pages.updated(o),!0)}});var rL=et(function(e){"use strict";var t=function e(e){var t=0;function r(){var r=e.readUInt32BE(t);t+=4;var o=e.slice(t,t+r);return t+=r,(0,n.default)({buffer:o})}var o=r(),u=r(),i=r(),s=r(),a=r(),c=r();return{unassigned_code_points:o,commonly_mapped_to_nothing:u,non_ASCII_space_characters:i,prohibited_characters:s,bidirectional_r_al:a,bidirectional_l:c}};ei();var r=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0});e.createMemoryCodePoints=void 0;var n=r(rx());e.createMemoryCodePoints=t});var rU=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});var t=Z("zlib");e.default=(0,t.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"))});var rj=et(function(e,t){"use strict";var r=function e(e,t){return(0,o.default)(s,e,t)};ei();var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},o=n(rN()),u=rL(),i=n(rU()),s=(0,u.createMemoryCodePoints)(i.default);r.saslprep=r;r.default=r;t.exports=r});var rz=et(function(e){"use strict";var t=function e(e){return e.replace("=","=3D").replace(",","=2C")};var r=function e(e,t){return Buffer.concat([Buffer.from("n=","utf8"),Buffer.from(e,"utf8"),Buffer.from(",r=","utf8"),Buffer.from(t.toString("base64"),"utf8")])};var n=function e(e,n,o){var u=t(n.username);return{saslStart:1,mechanism:e==="sha1"?w.AuthMechanism.MONGODB_SCRAM_SHA1:w.AuthMechanism.MONGODB_SCRAM_SHA256,payload:new C.Binary(Buffer.concat([Buffer.from("n,,","utf8"),r(u,o)])),autoAuthorize:1,options:{skipEmptyExchange:!0}}};var o=function e(e,t){return D.apply(this,arguments)};var u=function e(e,t,r){return T.apply(this,arguments)};var i=function e(e){var t=e.toString("utf8"),r={},n=t.split(",");for(var o=0;o<n.length;o++){var u;var i=((u=n[o].match(/^([^=]*)=(.*)$/))!==null&&u!==void 0?u:[]).slice(1);r[i[0]]=i[1]}return r};var s=function e(e,t){if(typeof e!="string")throw new S.MongoInvalidArgumentError("Username must be a string");if(typeof t!="string")throw new S.MongoInvalidArgumentError("Password must be a string");if(t.length===0)throw new S.MongoInvalidArgumentError("Password cannot be empty");var r;try{r=g.createHash("md5")}catch(e){throw g.getFips()?new Error("Auth mechanism SCRAM-SHA-1 is not supported in FIPS mode"):e}return r.update("".concat(e,":mongo:").concat(t),"utf8"),r.digest("hex")};var c=function e(e,t){Buffer.isBuffer(e)||(e=Buffer.from(e)),Buffer.isBuffer(t)||(t=Buffer.from(t));var r=Math.max(e.length,t.length),n=[];for(var o=0;o<r;o+=1)n.push(e[o]^t[o]);return Buffer.from(n).toString("base64")};var l=function e(e,t){return g.createHash(e).update(t).digest()};var h=function e(e,t,r){return g.createHmac(e,t).update(r).digest()};var v=function e(){M={},R=0};var m=function e(e,t,r,n){var o=[e,t.toString("base64"),r].join("_");if(M[o]!=null)return M[o];var u=g.pbkdf2Sync(e,t,r,k[n],n);return R>=200&&v(),M[o]=u,R+=1,u};var E=function e(e,t){if(e.length!==t.length)return!1;if(typeof g.timingSafeEqual=="function")return g.timingSafeEqual(e,t);var r=0;for(var n=0;n<e.length;n++)r|=e[n]^t[n];return r===0};ei();Object.defineProperty(e,"__esModule",{value:!0});e.ScramSHA256=e.ScramSHA1=void 0;var y=rj(),g=Z("crypto"),C=ea(),S=ec(),b=eg(),O=to(),w=ti(),_=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);var r;r=d(this,t),r.cryptoMethod=e||"sha1";return r}p(t,[{key:"prepare",value:function e(e,t){var r=this;return a(function(){var o,u,i;return H(this,function(s){switch(s.label){case 0:o=r.cryptoMethod,u=t.credentials;if(!u)throw new S.MongoMissingCredentialsError("AuthContext must provide credentials.");return[4,(0,b.randomBytes)(24)];case 1:i=s.sent();return[2,(t.nonce=i,F(B({},e),{speculativeAuthenticate:F(B({},n(o,u,i)),{db:u.source})}))]}})})()}},{key:"auth",value:function e(e){var t=this;return a(function(){var r,n,i;return H(this,function(s){switch(s.label){case 0:r=e.reauthenticating,n=e.response;if(!((n===null||n===void 0?void 0:n.speculativeAuthenticate)&&!r))return[3,2];return[4,u(t.cryptoMethod,n.speculativeAuthenticate,e)];case 1:i=s.sent();return[3,4];case 2:return[4,o(t.cryptoMethod,e)];case 3:i=s.sent();s.label=4;case 4:return[2,i]}})})()}}]);return t}(O.AuthProvider);function D(){D=a(function(e,t){var r,o,i,s,a,c;return H(this,function(l){switch(l.label){case 0:r=t.connection,o=t.credentials;if(!o)throw new S.MongoMissingCredentialsError("AuthContext must provide credentials.");if(!t.nonce)throw new S.MongoInvalidArgumentError("AuthContext must contain a valid nonce property");i=t.nonce,s=o.source,a=n(e,o,i);return[4,r.command((0,b.ns)("".concat(s,".$cmd")),a,void 0)];case 1:c=l.sent();return[4,u(e,c,t)];case 2:l.sent();return[2]}})});return D.apply(this,arguments)}function T(){T=a(function(e,n,o){var u,a,d,f,v,p,g,A,O,w,_,D,B,T,F,M,R,k,I,N,P,x,L,U,j,z;return H(this,function(W){switch(W.label){case 0:u=o.connection,a=o.credentials;if(!a)throw new S.MongoMissingCredentialsError("AuthContext must provide credentials.");if(!o.nonce)throw new S.MongoInvalidArgumentError("Unable to continue SCRAM without valid nonce");d=o.nonce,f=a.source,v=t(a.username),p=a.password,g=e==="sha256"?(0,y.saslprep)(p):s(v,p),A=Buffer.isBuffer(n.payload)?new C.Binary(n.payload):n.payload,O=i(A),w=parseInt(O.i,10);if(w&&w<4096)throw new S.MongoRuntimeError("Server returned an invalid iteration count ".concat(w));_=O.s,D=O.r;if(D.startsWith("nonce"))throw new S.MongoRuntimeError("Server returned an invalid nonce: ".concat(D));B="c=biws,r=".concat(D),T=m(g,Buffer.from(_,"base64"),w,e),F=h(e,T,"Client Key"),M=h(e,T,"Server Key"),R=l(e,F),k=[r(v,d),A.toString("utf8"),B].join(","),I=h(e,R,k),N="p=".concat(c(F,I)),P=[B,N].join(","),x=h(e,M,k),L={saslContinue:1,conversationId:n.conversationId,payload:new C.Binary(Buffer.from(P))};return[4,u.command((0,b.ns)("".concat(f,".$cmd")),L,void 0)];case 1:U=W.sent(),j=i(U.payload);if(!E(Buffer.from(j.v,"base64"),x))throw new S.MongoRuntimeError("Server returned an invalid signature");if(U.done!==!1)return[2];z={saslContinue:1,conversationId:U.conversationId,payload:Buffer.alloc(0)};return[4,u.command((0,b.ns)("".concat(f,".$cmd")),z,void 0)];case 2:W.sent();return[2]}})});return T.apply(this,arguments)}var M={},R=0;var k={sha256:32,sha1:20};var I=/*#__PURE__*/function(e){A(t,e);function t(){f(this,t);return d(this,t,["sha1"])}return t}(_);e.ScramSHA1=I;var N=/*#__PURE__*/function(e){A(t,e);function t(){f(this,t);return d(this,t,["sha256"])}return t}(_);e.ScramSHA256=N});var rW=et(function(e){"use strict";var t=function e(e){var t={authenticate:1,mechanism:"MONGODB-X509"};return e.username&&(t.user=e.username),t};ei();Object.defineProperty(e,"__esModule",{value:!0});e.X509=void 0;var r=ec(),n=eg(),o=to(),u=/*#__PURE__*/function(e){A(o,e);function o(){f(this,o);return d(this,o,arguments)}p(o,[{key:"prepare",value:function e(e,n){return a(function(){var o;return H(this,function(u){o=n.credentials;if(!o)throw new r.MongoMissingCredentialsError("AuthContext must provide credentials.");return[2,F(B({},e),{speculativeAuthenticate:t(o)})]})})()}},{key:"auth",value:function e(e){return a(function(){var o,u,i,s;return H(this,function(a){switch(a.label){case 0:u=e.connection,i=e.credentials;if(!i)throw new r.MongoMissingCredentialsError("AuthContext must provide credentials.");s=(o=e.response)===null||o===void 0?void 0:o.speculativeAuthenticate;if(s)return[3,2];return[4,u.command((0,n.ns)("$external.$cmd"),t(i),void 0)];case 1:s=a.sent();a.label=2;case 2:s;return[2]}})})()}}]);return o}(o.AuthProvider);e.X509=u});var rV=et(function(e){"use strict";var t=function e(e){if(e.OIDC_HUMAN_CALLBACK)return new i.HumanCallbackWorkflow(new s.TokenCache,e.OIDC_HUMAN_CALLBACK);if(e.OIDC_CALLBACK)return new u.AutomatedCallbackWorkflow(new s.TokenCache,e.OIDC_CALLBACK);{var t;var r=e.ENVIRONMENT,n=(t=o.OIDC_WORKFLOWS.get(r))===null||t===void 0?void 0:t();if(!n)throw new h.MongoInvalidArgumentError("Could not load workflow for environment ".concat(e.ENVIRONMENT));return n}};ei();Object.defineProperty(e,"__esModule",{value:!0});e.MongoClientAuthProviders=void 0;var r=tu(),n=rS(),o=rF(),u=rR(),i=rk(),s=rB(),a=rI(),c=ti(),l=rz(),d=rW(),h=ec(),v=new Map([[c.AuthMechanism.MONGODB_AWS,function(e){var t=e.AWS_CREDENTIAL_PROVIDER;return new n.MongoDBAWS(t)}],[c.AuthMechanism.MONGODB_CR,function(){throw new h.MongoInvalidArgumentError("MONGODB-CR is no longer a supported auth mechanism in MongoDB 4.0+")}],[c.AuthMechanism.MONGODB_GSSAPI,function(){return new r.GSSAPI}],[c.AuthMechanism.MONGODB_OIDC,function(e){return new o.MongoDBOIDC(t(e))}],[c.AuthMechanism.MONGODB_PLAIN,function(){return new a.Plain}],[c.AuthMechanism.MONGODB_SCRAM_SHA1,function(){return new l.ScramSHA1}],[c.AuthMechanism.MONGODB_SCRAM_SHA256,function(){return new l.ScramSHA256}],[c.AuthMechanism.MONGODB_X509,function(){return new d.X509}]]),m=/*#__PURE__*/function(){function e(){f(this,e);this.existingProviders=new Map}p(e,[{key:"getOrCreateProvider",value:function e(e,t){var r=this.existingProviders.get(e);if(r)return r;var n=v.get(e);if(!n)throw new h.MongoInvalidArgumentError("authMechanism ".concat(e," not supported"));var o=n(t);return this.existingProviders.set(e,o),o}}]);return e}();e.MongoClientAuthProviders=m});var rG=et(function(e){"use strict";var t=function t(t){var r=true,n=false,o=undefined;try{var u=function(){var r=s.value;Object.defineProperty(e,r,{enumerable:!0,get:function e(){return t[r]}})};for(var i=Object.keys(t)[Symbol.iterator](),s;!(r=(s=i.next()).done);r=true)u()}catch(e){n=true;o=e}finally{try{if(!r&&i.return!=null){i.return()}}finally{if(n){throw o}}}};ei();Object.defineProperty(e,"__esModule",{value:!0});t(ne(),e)});var rH=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.ClientBulkWriteOperation=void 0;var t=rG(),r=eE(),n=eg(),o=r3(),u=eC(),i=/*#__PURE__*/function(e){A(o,e);function o(e,t){f(this,o);var r;r=d(this,o,[void 0,t]),r.commandBuilder=e,r.options=t,r.ns=new n.MongoDBNamespace("admin","$cmd");return r}p(o,[{key:"commandName",get:function e(){return"bulkWrite"}},{key:"resetBatch",value:function e(){return this.commandBuilder.resetBatch()}},{key:"canRetryWrite",get:function e(){return this.commandBuilder.isBatchRetryable}},{key:"execute",value:function e(e,n,u){var i=this;var s=this,c=function(){return y(g(o.prototype),"executeCommand",i)};return a(function(){var o,i,a,l,d,f;return H(this,function(h){switch(h.label){case 0:if(!(e.description.type===t.ServerType.LoadBalancer))return[3,6];if(!n)return[3,4];if(!n.pinnedConnection)return[3,1];f=d=n.pinnedConnection;return[3,3];case 1:return[4,e.pool.checkOut({timeoutContext:u})];case 2:f=(d=h.sent(),n.pin(d));h.label=3;case 3:f,o=s.commandBuilder.buildBatch((i=d.hello)===null||i===void 0?void 0:i.maxMessageSizeBytes,(a=d.hello)===null||a===void 0?void 0:a.maxWriteBatchSize,(l=d.hello)===null||l===void 0?void 0:l.maxBsonObjectSize);return[3,5];case 4:throw new t.MongoClientBulkWriteExecutionError("Session provided to the client bulk write operation must be present.");case 5:return[3,7];case 6:if(!e.description.maxWriteBatchSize||!e.description.maxMessageSizeBytes||!e.description.maxBsonObjectSize)throw new t.MongoClientBulkWriteExecutionError("In order to execute a client bulk write, both maxWriteBatchSize, maxMessageSizeBytes and maxBsonObjectSize must be provided by the servers hello response.");o=s.commandBuilder.buildBatch(e.description.maxMessageSizeBytes,e.description.maxWriteBatchSize,e.description.maxBsonObjectSize);h.label=7;case 7:s.canRetryWrite||(s.options.willRetryWrite=!1);return[4,c().call(s,e,n,o,u,r.ClientBulkWriteCursorResponse)];case 8:return[2,h.sent()]}})})()}}]);return o}(o.CommandOperation);e.ClientBulkWriteOperation=i;(0,u.defineAspects)(i,[u.Aspect.WRITE_OPERATION,u.Aspect.SKIP_COLLATION,u.Aspect.CURSOR_CREATING,u.Aspect.RETRYABLE,u.Aspect.COMMAND_BATCHING])});var rq=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.ClientBulkWriteCursor=void 0;var t=rH(),r=eS(),n=eg(),o=r0(),u=/*#__PURE__*/function(e){A(o,e);function o(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};f(this,o);var u;u=d(this,o,[e,new n.MongoDBNamespace("admin","$cmd"),r]),u.commandBuilder=t,u.clientBulkWriteOptions=r;return u}p(o,[{key:"response",get:function e(){return this.cursorResponse?this.cursorResponse:null}},{key:"operations",get:function e(){return this.commandBuilder.lastOperations}},{key:"clone",value:function e(){var e=(0,n.mergeOptions)({},this.clientBulkWriteOptions);return delete e.session,new o(this.client,this.commandBuilder,B({},e))}},{key:"_initialize",value:function e(e){var n=this;return a(function(){var o,u;return H(this,function(i){switch(i.label){case 0:o=new t.ClientBulkWriteOperation(n.commandBuilder,F(B({},n.clientBulkWriteOptions,n.cursorOptions),{session:e}));return[4,(0,r.executeOperation)(n.client,o,n.timeoutContext)];case 1:u=i.sent();return[2,(n.cursorResponse=u,{server:o.server,session:e,response:u})]}})})()}}]);return o}(o.AbstractCursor);e.ClientBulkWriteCursor=u});var rK=et(function(e){"use strict";var t=function e(e,t,r){if(t.length>r)throw new a.MongoInvalidArgumentError("Client bulk write operation ".concat(e," of length ").concat(t.length," exceeds the max bson object size of ").concat(r))};var r=function e(e,t,r){var n={delete:t,multi:r,filter:e.filter};return e.hint&&(n.hint=e.hint),e.collation&&(n.collation=e.collation),n};var n=function e(e){if(!(0,c.hasAtomicOperators)(e))throw new a.MongoAPIError("Client bulk write update models must only contain atomic modifiers (start with $) and must not be empty.")};var o=function e(e,t,r){n(e.update);var o={update:t,multi:r,filter:e.filter,updateMods:e.update};return e.hint&&(o.hint=e.hint),e.upsert&&(o.upsert=e.upsert),e.arrayFilters&&(o.arrayFilters=e.arrayFilters),e.collation&&(o.collation=e.collation),o};var u=function t(t,r,n){switch(t.name){case"insertOne":return(0,e.buildInsertOneOperation)(t,r,n);case"deleteOne":return(0,e.buildDeleteOneOperation)(t,r);case"deleteMany":return(0,e.buildDeleteManyOperation)(t,r);case"updateOne":return(0,e.buildUpdateOneOperation)(t,r);case"updateMany":return(0,e.buildUpdateManyOperation)(t,r);case"replaceOne":return(0,e.buildReplaceOneOperation)(t,r)}};ei();Object.defineProperty(e,"__esModule",{value:!0});e.buildReplaceOneOperation=e.buildUpdateManyOperation=e.buildUpdateOneOperation=e.buildDeleteManyOperation=e.buildDeleteOneOperation=e.buildInsertOneOperation=e.ClientBulkWriteCommandBuilder=void 0;e.buildOperation=u;var i=ea(),s=t1(),a=ec(),c=eg(),l=1e3,d=/*#__PURE__*/function(){function e(t,r,n){f(this,e);this.models=t,this.options=r,this.pkFactory=n!==null&&n!==void 0?n:c.DEFAULT_PK_FACTORY,this.currentModelIndex=0,this.previousModelIndex=0,this.lastOperations=[],this.isBatchRetryable=!0}p(e,[{key:"errorsOnly",get:function e(){return"verboseResults"in this.options?!this.options.verboseResults:!0}},{key:"hasNextBatch",value:function e(){return this.currentModelIndex<this.models.length}},{key:"resetBatch",value:function e(){return this.currentModelIndex=this.previousModelIndex,!0}},{key:"buildBatch",value:function e(e,r,n){this.isBatchRetryable=!0;var o=0,s=0,c=this.baseCommand(),d=new Map;for(this.previousModelIndex=this.currentModelIndex;this.currentModelIndex<this.models.length;){var f=this.models[this.currentModelIndex],h=f.namespace,v=d.get(h);if((f.name==="deleteMany"||f.name==="updateMany")&&(this.isBatchRetryable=!1),v!=null){var p=u(f,v,this.pkFactory),m=void 0;try{m=i.BSON.serialize(p)}catch(e){throw new a.MongoInvalidArgumentError("Could not serialize operation to BSON",{cause:e})}if(t("ops",m,n),o+m.length<e&&c.ops.documents.length<r)o=l+c.ops.push(p,m),this.currentModelIndex++;else break}else{d.set(h,s);var E={ns:h},y=u(f,s,this.pkFactory),g=void 0,A=void 0;try{g=i.BSON.serialize(E),A=i.BSON.serialize(y)}catch(e){throw new a.MongoInvalidArgumentError("Could not serialize ns info to BSON",{cause:e})}if(t("nsInfo",g,n),t("ops",A,n),o+g.length+A.length<e&&c.ops.documents.length<r)o=l+c.nsInfo.push(E,g)+c.ops.push(y,A),s++,this.currentModelIndex++;else break}}return this.lastOperations=c.ops.documents,c}},{key:"baseCommand",value:function e(){var e;var t={bulkWrite:1,errorsOnly:this.errorsOnly,ordered:(e=this.options.ordered)!==null&&e!==void 0?e:!0,ops:new s.DocumentSequence("ops"),nsInfo:new s.DocumentSequence("nsInfo")};return this.options.bypassDocumentValidation!=null&&(t.bypassDocumentValidation=this.options.bypassDocumentValidation),this.options.let&&(t.let=this.options.let),this.options.comment!==void 0&&(t.comment=this.options.comment),t}}]);return e}();e.ClientBulkWriteCommandBuilder=d;var h=function(e,t,r){var n={insert:t,document:e.document};var o;return n.document._id=(o=e.document._id)!==null&&o!==void 0?o:r.createPk(),n};e.buildInsertOneOperation=h;var v=function(e,t){return r(e,t,!1)};e.buildDeleteOneOperation=v;var m=function(e,t){return r(e,t,!0)};e.buildDeleteManyOperation=m;var E=function(e,t){return o(e,t,!1)};e.buildUpdateOneOperation=E;var y=function(e,t){return o(e,t,!0)};e.buildUpdateManyOperation=y;var g=function(e,t){if((0,c.hasAtomicOperators)(e.replacement))throw new a.MongoAPIError("Client bulk write replace models must not contain atomic modifiers (start with $) and must not be empty.");var r={update:t,multi:!1,filter:e.filter,updateMods:e.replacement};return e.hint&&(r.hint=e.hint),e.upsert&&(r.upsert=e.upsert),e.collation&&(r.collation=e.collation),r};e.buildReplaceOneOperation=g});var rY=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.ClientBulkWriteResultsMerger=void 0;var t=ne(),r=ec(),n={acknowledged:!1,insertedCount:0,upsertedCount:0,matchedCount:0,modifiedCount:0,deletedCount:0,insertResults:void 0,updateResults:void 0,deleteResults:void 0},o=/*#__PURE__*/function(){function e(t){f(this,e);this.options=t,this.currentBatchOffset=0,this.writeConcernErrors=[],this.writeErrors=new Map,this.result={acknowledged:!0,insertedCount:0,upsertedCount:0,matchedCount:0,modifiedCount:0,deletedCount:0,insertResults:void 0,updateResults:void 0,deleteResults:void 0},t.verboseResults&&(this.result.insertResults=new Map,this.result.updateResults=new Map,this.result.deleteResults=new Map)}p(e,[{key:"bulkWriteResult",get:function e(){return{acknowledged:this.result.acknowledged,insertedCount:this.result.insertedCount,upsertedCount:this.result.upsertedCount,matchedCount:this.result.matchedCount,modifiedCount:this.result.modifiedCount,deletedCount:this.result.deletedCount,insertResults:this.result.insertResults,updateResults:this.result.updateResults,deleteResults:this.result.deleteResults}}},{key:"merge",value:function e(e){var n=this;return a(function(){var o,i,s,a,c,l,d,f,h,v,p,m,E,y,g,A,S,b,O,w;return H(this,function(_){switch(_.label){case 0:_.trys.push([0,13,14,15]);i=false,s=false;_.label=1;case 1:_.trys.push([1,6,7,12]);c=u(e);_.label=2;case 2:return[4,c.next()];case 3:if(!(i=!(l=_.sent()).done))return[3,5];d=l.value;f=d;if(f.ok===1)n.options.verboseResults&&n.processDocument(e,f);else if(n.options.ordered){h=new r.MongoClientBulkWriteError({message:"Mongo client ordered bulk write encountered a write error."});throw h.writeErrors.set(f.idx+n.currentBatchOffset,{code:f.code,message:f.errmsg}),h.partialResult=n.result,h}else n.writeErrors.set(f.idx+n.currentBatchOffset,{code:f.code,message:f.errmsg});_.label=4;case 4:i=false;return[3,2];case 5:return[3,12];case 6:v=_.sent();s=true;a=v;return[3,12];case 7:_.trys.push([7,,10,11]);if(!(i&&c.return!=null))return[3,9];return[4,c.return()];case 8:_.sent();_.label=9;case 9:return[3,11];case 10:if(s){throw a}return[7];case 11:return[7];case 12:return[3,15];case 13:p=_.sent();if(C(p,t.MongoWriteConcernError)){m=p.result;E=true,y=false,g=undefined;if(o={insertedCount:m.nInserted,upsertedCount:m.nUpserted,matchedCount:m.nMatched,modifiedCount:m.nModified,deletedCount:m.nDeleted,writeConcernError:m.writeConcernError},n.options.verboseResults&&m.cursor.firstBatch)try{for(A=m.cursor.firstBatch[Symbol.iterator]();!(E=(S=A.next()).done);E=true){b=S.value;b.ok===1&&n.processDocument(e,b)}}catch(e){y=true;g=e}finally{try{if(!E&&A.return!=null){A.return()}}finally{if(y){throw g}}}}else throw p;return[3,15];case 14:if(e.response){O=e.response;n.incrementCounts(O)}n.currentBatchOffset+=e.operations.length;return[7];case 15:if(o){w=o.writeConcernError;n.incrementCounts(o),n.writeConcernErrors.push({code:w.code,message:w.errmsg})}return[2,n.result]}})})()}},{key:"processDocument",value:function e(e,t){var r,n;var o=e.operations[t.idx];if("insert"in o&&((r=this.result.insertResults)===null||r===void 0?void 0:r.set(t.idx+this.currentBatchOffset,{insertedId:o.document._id})),"update"in o){var u;var i;var s={matchedCount:t.n,modifiedCount:(i=t.nModified)!==null&&i!==void 0?i:0,didUpsert:t.upserted!=null};t.upserted&&(s.upsertedId=t.upserted._id),(u=this.result.updateResults)===null||u===void 0?void 0:u.set(t.idx+this.currentBatchOffset,s)}"delete"in o&&((n=this.result.deleteResults)===null||n===void 0?void 0:n.set(t.idx+this.currentBatchOffset,{deletedCount:t.n}))}},{key:"incrementCounts",value:function e(e){this.result.insertedCount+=e.insertedCount,this.result.upsertedCount+=e.upsertedCount,this.result.matchedCount+=e.matchedCount,this.result.modifiedCount+=e.modifiedCount,this.result.deletedCount+=e.deletedCount}}],[{key:"unacknowledged",value:function e(){return n}}]);return e}();e.ClientBulkWriteResultsMerger=o});var r$=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.ClientBulkWriteExecutor=void 0;var t=r0(),r=rq(),n=ec(),o=eA(),u=eg(),i=ey(),s=eS(),c=rH(),l=rK(),d=rY(),h=/*#__PURE__*/function(){function e(t,r,o){f(this,e);var u;if(r.length===0)throw new n.MongoClientBulkWriteExecutionError("No client bulk write models were provided.");if(this.client=t,this.operations=r,this.options=B({ordered:!0,bypassDocumentValidation:!1,verboseResults:!1},o),this.options.writeConcern||(this.options.writeConcern=i.WriteConcern.fromOptions(this.client.s.options)),((u=this.options.writeConcern)===null||u===void 0?void 0:u.w)===0){if(this.options.verboseResults)throw new n.MongoInvalidArgumentError("Cannot request unacknowledged write concern and verbose results");if(this.options.ordered)throw new n.MongoInvalidArgumentError("Cannot request unacknowledged write concern and ordered writes")}}p(e,[{key:"execute",value:function e(){var e=this;return a(function(){var i,a,f,h,v,p,m,E,y,g,A,S,b;return H(this,function(O){switch(O.label){case 0:a=e.client.s.options.pkFactory,f=new l.ClientBulkWriteCommandBuilder(e.operations,e.options,a),h=(0,u.resolveTimeoutOptions)(e.client,e.options),v=o.TimeoutContext.create(h);if(!(((i=e.options.writeConcern)===null||i===void 0?void 0:i.w)===0))return[3,5];O.label=1;case 1:if(!f.hasNextBatch())return[3,4];p=new c.ClientBulkWriteOperation(f,e.options);return[4,(0,s.executeOperation)(e.client,p,v)];case 2:O.sent();O.label=3;case 3:return[3,1];case 4:return[2,d.ClientBulkWriteResultsMerger.unacknowledged()];case 5:m=new d.ClientBulkWriteResultsMerger(e.options);O.label=6;case 6:if(!f.hasNextBatch())return[3,11];E=new t.CursorTimeoutContext(v,Symbol()),y=B(F(B({},e.options),{timeoutContext:E}),h.timeoutMS!=null&&{timeoutMode:t.CursorTimeoutMode.LIFETIME}),g=new r.ClientBulkWriteCursor(e.client,f,y);O.label=7;case 7:O.trys.push([7,9,,10]);return[4,m.merge(g)];case 8:O.sent();return[3,10];case 9:A=O.sent();if(C(A,n.MongoServerError)&&!C(A,n.MongoClientBulkWriteError)){S=new n.MongoClientBulkWriteError({message:"Mongo client bulk write encountered an error during execution"});throw S.cause=A,S.partialResult=m.bulkWriteResult,S}else throw A;return[3,10];case 10:return[3,6];case 11:if(m.writeConcernErrors.length>0||m.writeErrors.size>0){b=new n.MongoClientBulkWriteError({message:"Mongo client bulk write encountered errors during execution."});throw b.writeConcernErrors=m.writeConcernErrors,b.writeErrors=m.writeErrors,b.partialResult=m.bulkWriteResult,b}return[2,m.bulkWriteResult];case 12:return[2]}})})()}}]);return e}();e.ClientBulkWriteExecutor=h});var rJ=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.WaitingForSuitableServerEvent=e.ServerSelectionSucceededEvent=e.ServerSelectionFailedEvent=e.ServerSelectionStartedEvent=e.ServerSelectionEvent=void 0;var t=eg(),r=ev(),n=function e(t,r,n){f(this,e);this.selector=t,this.operation=n,this.topologyDescription=r};e.ServerSelectionEvent=n;var o=/*#__PURE__*/function(e){A(t,e);function t(e,n,o){f(this,t);var u;u=d(this,t,[e,n,o]),u.name=r.SERVER_SELECTION_STARTED,u.message="Server selection started";return u}return t}(n);e.ServerSelectionStartedEvent=o;var u=/*#__PURE__*/function(e){A(t,e);function t(e,n,o,u){f(this,t);var i;i=d(this,t,[e,n,u]),i.name=r.SERVER_SELECTION_FAILED,i.message="Server selection failed",i.failure=o;return i}return t}(n);e.ServerSelectionFailedEvent=u;var i=/*#__PURE__*/function(e){A(n,e);function n(e,o,u,i){f(this,n);var s;s=d(this,n,[e,o,i]),s.name=r.SERVER_SELECTION_SUCCEEDED,s.message="Server selection succeeded";var a=t.HostAddress.fromString(u).toHostPort(),c=a.host,l=a.port;s.serverHost=c,s.serverPort=l;return s}return n}(n);e.ServerSelectionSucceededEvent=i;var s=/*#__PURE__*/function(e){A(t,e);function t(e,n,o,u){f(this,t);var i;i=d(this,t,[e,n,u]),i.name=r.WAITING_FOR_SUITABLE_SERVER,i.message="Waiting for suitable server to become available",i.remainingTimeMS=o;return i}return t}(n);e.WaitingForSuitableServerEvent=s});var rX=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.SrvPoller=e.SrvPollingEvent=void 0;var t=Z("dns"),r=Z("timers"),n=ec(),o=eO(),u=eg(),i=/*#__PURE__*/function(){function e(t){f(this,e);this.srvRecords=t}p(e,[{key:"hostnames",value:function e(){return new Set(this.srvRecords.map(function(e){return u.HostAddress.fromSrvRecord(e).toString()}))}}]);return e}();e.SrvPollingEvent=i;var s=/*#__PURE__*/function(e){A(o,e);function o(e){f(this,o);var t;if(t=d(this,o),t.on("error",u.noop),!e||!e.srvHost)throw new n.MongoRuntimeError("Options for SrvPoller must exist and include srvHost");var r,i,s;t.srvHost=e.srvHost,t.srvMaxHosts=(r=e.srvMaxHosts)!==null&&r!==void 0?r:0,t.srvServiceName=(i=e.srvServiceName)!==null&&i!==void 0?i:"mongodb",t.rescanSrvIntervalMS=6e4,t.heartbeatFrequencyMS=(s=e.heartbeatFrequencyMS)!==null&&s!==void 0?s:1e4,t.haMode=!1,t.generation=0,t._timeout=void 0;return t}p(o,[{key:"srvAddress",get:function e(){return"_".concat(this.srvServiceName,"._tcp.").concat(this.srvHost)}},{key:"intervalMS",get:function e(){return this.haMode?this.heartbeatFrequencyMS:this.rescanSrvIntervalMS}},{key:"start",value:function e(){this._timeout||this.schedule()}},{key:"stop",value:function e(){this._timeout&&((0,r.clearTimeout)(this._timeout),this.generation+=1,this._timeout=void 0)}},{key:"schedule",value:function e(){var e=this;this._timeout&&(0,r.clearTimeout)(this._timeout),this._timeout=(0,r.setTimeout)(function(){e._poll().then(void 0,u.squashError)},this.intervalMS)}},{key:"success",value:function e(e){this.haMode=!1,this.schedule(),this.emit(o.SRV_RECORD_DISCOVERY,new i(e))}},{key:"failure",value:function e(){this.haMode=!0,this.schedule()}},{key:"_poll",value:function e(){var e=this;return a(function(){var r,n,o,i,s,a,c,l,d,f;return H(this,function(h){switch(h.label){case 0:r=e.generation;h.label=1;case 1:h.trys.push([1,3,,4]);return[4,t.promises.resolveSrv(e.srvAddress)];case 2:n=h.sent();return[3,4];case 3:o=h.sent();e.failure();return[2];case 4:if(r!==e.generation)return[2];i=[];s=true,a=false,c=undefined;try{for(l=n[Symbol.iterator]();!(s=(d=l.next()).done);s=true){f=d.value;try{(0,u.checkParentDomainMatch)(f.name,e.srvHost),i.push(f)}catch(e){(0,u.squashError)(e)}}}catch(e){a=true;c=e}finally{try{if(!s&&l.return!=null){l.return()}}finally{if(a){throw c}}}if(!i.length){e.failure();return[2]}e.success(i);return[2]}})})()}}]);return o}(o.TypedEventEmitter);e.SrvPoller=s;s.SRV_RECORD_DISCOVERY="srvRecordDiscovery"});var rQ=et(function(e){"use strict";var t=function e(e,t){var r=true,n=false,o=undefined;try{for(var u=h.LOCAL_SERVER_EVENTS[Symbol.iterator](),i;!(r=(i=u.next()).done);r=true){var s=i.value;e.removeAllListeners(s)}}catch(e){n=true;o=e}finally{try{if(!r&&u.return!=null){u.return()}}finally{if(n){throw o}}}e.destroy(),t.emitAndLog(x.SERVER_CLOSED,new w.ServerClosedEvent(t.s.id,e.description.address));var a=true,c=false,l=undefined;try{for(var d=h.SERVER_RELAY_EVENTS[Symbol.iterator](),f;!(a=(f=d.next()).done);a=true){var v=f.value;e.removeAllListeners(v)}}catch(e){c=true;l=e}finally{try{if(!a&&d.return!=null){d.return()}}finally{if(c){throw l}}}};var r=function e(e){return(e===null||e===void 0?void 0:e.directConnection)?O.TopologyType.Single:(e===null||e===void 0?void 0:e.replicaSet)?O.TopologyType.ReplicaSetNoPrimary:(e===null||e===void 0?void 0:e.loadBalanced)?O.TopologyType.LoadBalanced:O.TopologyType.Unknown};var n=function e(e,t){e.emitAndLog(x.SERVER_OPENING,new w.ServerOpeningEvent(e.s.id,t.address));var r=new _.Server(e,t,e.s.options);var n=true,o=false,u=undefined;try{var i=function(){var t=a.value;r.on(t,function(r){return e.emit(t,r)})};for(var s=h.SERVER_RELAY_EVENTS[Symbol.iterator](),a;!(n=(a=s.next()).done);n=true)i()}catch(e){o=true;u=e}finally{try{if(!n&&s.return!=null){s.return()}}finally{if(o){throw u}}}return r.on(_.Server.DESCRIPTION_RECEIVED,function(t){return e.serverUpdateHandler(t)}),r.connect(),r};var o=function e(e,r){if(r&&e.s.servers.has(r.address)){var o=e.s.servers.get(r.address);if(o){if(o.s.description=r,C(r.error,v.MongoError)&&r.error.hasErrorLabel(v.MongoErrorLabel.ResetPool)){var u=r.error.hasErrorLabel(v.MongoErrorLabel.InterruptInUseConnections);o.pool.clear({interruptInUseConnections:u})}else if(r.error==null){var i=e.s.description.type;(r.isDataBearing||r.type!==O.ServerType.Unknown&&i===O.TopologyType.Single)&&o.pool.ready()}}}var s=true,a=false,c=undefined;try{for(var l=e.description.servers.values()[Symbol.iterator](),d;!(s=(d=l.next()).done);s=true){var f=d.value;if(!e.s.servers.has(f.address)){var h=n(e,f);e.s.servers.set(f.address,h)}}}catch(e){a=true;c=e}finally{try{if(!s&&l.return!=null){l.return()}}finally{if(a){throw c}}}var p=true,m=false,E=undefined;try{for(var y=e.s.servers[Symbol.iterator](),g;!(p=(g=y.next()).done);p=true){var A=g.value;var S=A[0];if(e.description.hasServer(S)||!e.s.servers.has(S))continue;var b=e.s.servers.get(S);e.s.servers.delete(S),b&&t(b,e)}}catch(e){m=true;E=e}finally{try{if(!p&&y.return!=null){y.return()}}finally{if(m){throw E}}}};var u=function e(e,t){for(;e.length;){var r,n;var o=e.shift();o&&(o.cancelled||(((r=o.mongoLogger)===null||r===void 0?void 0:r.willLog(E.MongoLoggableComponent.SERVER_SELECTION,E.SeverityLevel.DEBUG))&&((n=o.mongoLogger)===null||n===void 0?void 0:n.debug(E.MongoLoggableComponent.SERVER_SELECTION,new M.ServerSelectionFailedEvent(o.serverSelector,o.topologyDescription,t,o.operationName))),o.reject(t)))}};var i=function e(e){if(e.s.state===O.STATE_CLOSED){u(e.waitQueue,new v.MongoTopologyClosedError);return}var t=e.description.type===O.TopologyType.Sharded,r=Array.from(e.description.servers.values()),n=e.waitQueue.length;for(var o=0;o<n;++o){var i,s;var a=e.waitQueue.shift();if(!a||a.cancelled)continue;var c=void 0;try{var l=a.serverSelector,d=a.previousServer;c=l?l(e.description,r,d?[d]:[]):r}catch(t){var f,h;((f=e.client.mongoLogger)===null||f===void 0?void 0:f.willLog(E.MongoLoggableComponent.SERVER_SELECTION,E.SeverityLevel.DEBUG))&&((h=e.client.mongoLogger)===null||h===void 0?void 0:h.debug(E.MongoLoggableComponent.SERVER_SELECTION,new M.ServerSelectionFailedEvent(a.serverSelector,e.description,t,a.operationName))),a.reject(t);continue}var p=void 0;if(c.length===0){var m,y;a.waitingLogged||(((m=e.client.mongoLogger)===null||m===void 0?void 0:m.willLog(E.MongoLoggableComponent.SERVER_SELECTION,E.SeverityLevel.INFORMATIONAL))&&((y=e.client.mongoLogger)===null||y===void 0?void 0:y.info(E.MongoLoggableComponent.SERVER_SELECTION,new M.WaitingForSuitableServerEvent(a.serverSelector,e.description,e.s.serverSelectionTimeoutMS!==0?e.s.serverSelectionTimeoutMS-((0,b.now)()-a.startTime):-1,a.operationName))),a.waitingLogged=!0),e.waitQueue.push(a);continue}else if(c.length===1)p=e.s.servers.get(c[0].address);else{var g=(0,b.shuffle)(c,2),A=e.s.servers.get(g[0].address),C=e.s.servers.get(g[1].address);p=A&&C&&A.s.operationCount<C.s.operationCount?A:C}if(!p){var S,w;var _=new v.MongoServerSelectionError("server selection returned a server description but the server was not found in the topology",e.description);((S=e.client.mongoLogger)===null||S===void 0?void 0:S.willLog(E.MongoLoggableComponent.SERVER_SELECTION,E.SeverityLevel.DEBUG))&&((w=e.client.mongoLogger)===null||w===void 0?void 0:w.debug(E.MongoLoggableComponent.SERVER_SELECTION,new M.ServerSelectionFailedEvent(a.serverSelector,e.description,_,a.operationName))),a.reject(_);return}var D=a.transaction;t&&D&&D.isActive&&p&&D.pinServer(p),((i=e.client.mongoLogger)===null||i===void 0?void 0:i.willLog(E.MongoLoggableComponent.SERVER_SELECTION,E.SeverityLevel.DEBUG))&&((s=e.client.mongoLogger)===null||s===void 0?void 0:s.debug(E.MongoLoggableComponent.SERVER_SELECTION,new M.ServerSelectionSucceededEvent(a.serverSelector,a.topologyDescription,p.pool.address,a.operationName))),a.resolve(p)}var B=true,T=false,F=undefined;if(e.waitQueue.length>0)try{var R=function(){var e=N(I.value,2),t=e[1];process.nextTick(function(){return t.requestCheck()})};for(var k=e.s.servers[Symbol.iterator](),I;!(B=(I=k.next()).done);B=true)R()}catch(e){T=true;F=e}finally{try{if(!B&&k.return!=null){k.return()}}finally{if(T){throw F}}}};var s=function e(e,t){var r;var n=(r=e.servers.get(t.address))===null||r===void 0?void 0:r.topologyVersion;return(0,D.compareTopologyVersion)(n,t.topologyVersion)>0};ei();Object.defineProperty(e,"__esModule",{value:!0});e.ServerCapabilities=e.Topology=void 0;var c;var l=rC(),h=ev(),v=ec(),E=eb(),y=eO(),g=el(),S=eA(),b=eg(),O=ed(),w=rp(),_=rg(),D=ru(),T=ef(),M=rJ(),R=rX(),k=ri(),I=0,P=(0,b.makeStateMachine)((c={},m(c,O.STATE_CLOSED,[O.STATE_CLOSED,O.STATE_CONNECTING]),m(c,O.STATE_CONNECTING,[O.STATE_CONNECTING,O.STATE_CLOSING,O.STATE_CONNECTED,O.STATE_CLOSED]),m(c,O.STATE_CONNECTED,[O.STATE_CONNECTED,O.STATE_CLOSING,O.STATE_CLOSED]),m(c,O.STATE_CLOSING,[O.STATE_CLOSING,O.STATE_CLOSED]),c)),x=/*#__PURE__*/function(e){A(c,e);function c(e,t,n){f(this,c);var o;o=d(this,c),o.on("error",b.noop),o.client=e,n=n!==null&&n!==void 0?n:B({hosts:[b.HostAddress.fromString("localhost:27017")]},Object.fromEntries(l.DEFAULT_OPTIONS.entries())),typeof t=="string"?t=[b.HostAddress.fromString(t)]:Array.isArray(t)||(t=[t]);var u=[];var i=true,s=false,a=undefined;try{for(var h=t[Symbol.iterator](),p;!(i=(p=h.next()).done);i=true){var m=p.value;if(typeof m=="string")u.push(b.HostAddress.fromString(m));else if(C(m,b.HostAddress))u.push(m);else throw new v.MongoRuntimeError("Topology cannot be constructed from ".concat(JSON.stringify(m)))}}catch(e){s=true;a=e}finally{try{if(!i&&h.return!=null){h.return()}}finally{if(s){throw a}}}var E=r(n),y=I++,g=n.srvMaxHosts==null||n.srvMaxHosts===0||n.srvMaxHosts>=u.length?u:(0,b.shuffle)(u,n.srvMaxHosts),A=new Map;var S=true,w=false,_=undefined;try{for(var T=g[Symbol.iterator](),F;!(S=(F=T.next()).done);S=true){var M=F.value;A.set(M.toString(),new D.ServerDescription(M))}}catch(e){w=true;_=e}finally{try{if(!S&&T.return!=null){T.return()}}finally{if(w){throw _}}}var N;o.waitQueue=new b.List,o.s={id:y,options:n,seedlist:u,state:O.STATE_CLOSED,description:new k.TopologyDescription(E,A,n.replicaSet,void 0,void 0,void 0,n),serverSelectionTimeoutMS:n.serverSelectionTimeoutMS,heartbeatFrequencyMS:n.heartbeatFrequencyMS,minHeartbeatFrequencyMS:n.minHeartbeatFrequencyMS,servers:new Map,credentials:n===null||n===void 0?void 0:n.credentials,clusterTime:void 0,detectShardedTopology:function(e){return o.detectShardedTopology(e)},detectSrvRecords:function(e){return o.detectSrvRecords(e)}},o.mongoLogger=e.mongoLogger,o.component="topology",n.srvHost&&!n.loadBalanced&&(o.s.srvPoller=(N=n.srvPoller)!==null&&N!==void 0?N:new R.SrvPoller({heartbeatFrequencyMS:o.s.heartbeatFrequencyMS,srvHost:n.srvHost,srvMaxHosts:n.srvMaxHosts,srvServiceName:n.srvServiceName}),o.on(c.TOPOLOGY_DESCRIPTION_CHANGED,o.s.detectShardedTopology)),o.connectionLock=void 0;return o}p(c,[{key:"detectShardedTopology",value:function e(e){var t,r,n,o;var u=e.previousDescription.type,i=e.newDescription.type,s=u!==O.TopologyType.Sharded&&i===O.TopologyType.Sharded,a=!!((r=this.s.srvPoller)===null||r===void 0?void 0:(t=r.listeners(R.SrvPoller.SRV_RECORD_DISCOVERY))===null||t===void 0?void 0:t.includes(this.s.detectSrvRecords));s&&!a&&((n=this.s.srvPoller)===null||n===void 0?void 0:n.on(R.SrvPoller.SRV_RECORD_DISCOVERY,this.s.detectSrvRecords),(o=this.s.srvPoller)===null||o===void 0?void 0:o.start())}},{key:"detectSrvRecords",value:function e(e){var t=this.s.description;this.s.description=this.s.description.updateFromSrvPollingEvent(e,this.s.options.srvMaxHosts),this.s.description!==t&&(o(this),this.emitAndLog(c.TOPOLOGY_DESCRIPTION_CHANGED,new w.TopologyDescriptionChangedEvent(this.s.id,t,this.s.description)))}},{key:"description",get:function e(){return this.s.description}},{key:"loadBalanced",get:function e(){return this.s.options.loadBalanced}},{key:"serverApi",get:function e(){return this.s.options.serverApi}},{key:"capabilities",get:function e(){return new L(this.lastHello())}},{key:"connect",value:function e(e){var t=this;return a(function(){var r;return H(this,function(n){switch(n.label){case 0:(r=t.connectionLock)!==null&&r!==void 0?r:t.connectionLock=t._connect(e);n.label=1;case 1:n.trys.push([1,,3,4]);return[4,t.connectionLock];case 2:return[2,(n.sent(),t)];case 3:t.connectionLock=void 0;return[7];case 4:return[2]}})})()}},{key:"_connect",value:function e(e){var t=this;return a(function(){var r,o,u,i,s,a,l,d,f,h,v,p,m,E,y,A;return H(this,function(C){switch(C.label){case 0:if(e=e!==null&&e!==void 0?e:{},t.s.state===O.STATE_CONNECTED)return[2,t];P(t,O.STATE_CONNECTING),t.emitAndLog(c.TOPOLOGY_OPENING,new w.TopologyOpeningEvent(t.s.id)),t.emitAndLog(c.TOPOLOGY_DESCRIPTION_CHANGED,new w.TopologyDescriptionChangedEvent(t.s.id,new k.TopologyDescription(O.TopologyType.Unknown),t.s.description));r=Array.from(t.s.description.servers.values());o=true,u=false,i=undefined;if(t.s.servers=new Map(r.map(function(e){return[e.address,n(t,e)]})),t.s.options.loadBalanced)try{for(s=r[Symbol.iterator]();!(o=(a=s.next()).done);o=true){l=a.value;d=new D.ServerDescription(l.hostAddress,void 0,{loadBalanced:t.s.options.loadBalanced});t.serverUpdateHandler(d)}}catch(e){u=true;i=e}finally{try{if(!o&&s.return!=null){s.return()}}finally{if(u){throw i}}}h=t.client.s.options.serverSelectionTimeoutMS,v=(f=e.readPreference)!==null&&f!==void 0?f:g.ReadPreference.primary,p=S.TimeoutContext.create({timeoutMS:void 0,serverSelectionTimeoutMS:h,waitQueueTimeoutMS:t.client.s.options.waitQueueTimeoutMS}),m=F(B({operationName:"ping"},e),{timeoutContext:p});C.label=1;case 1:C.trys.push([1,6,,7]);return[4,t.selectServer((0,T.readPreferenceServerSelector)(v),m)];case 2:E=C.sent();if(!(!(t.s.options.__skipPingOnConnect===!0)&&t.s.credentials))return[3,4];return[4,E.command((0,b.ns)("admin.$cmd"),{ping:1},{timeoutContext:p})];case 3:y=(C.sent(),P(t,O.STATE_CONNECTED),t.emit(c.OPEN,t),t.emit(c.CONNECT,t),t);return[3,5];case 4:y=(P(t,O.STATE_CONNECTED),t.emit(c.OPEN,t),t.emit(c.CONNECT,t),t);C.label=5;case 5:return[2,y];case 6:A=C.sent();throw t.close(),A;case 7:return[2]}})})()}},{key:"close",value:function e(){if(!(this.s.state===O.STATE_CLOSED||this.s.state===O.STATE_CLOSING)){var e=true,r=false,n=undefined;try{for(var o=this.s.servers.values()[Symbol.iterator](),i;!(e=(i=o.next()).done);e=true){var s=i.value;t(s,this)}}catch(e){r=true;n=e}finally{try{if(!e&&o.return!=null){o.return()}}finally{if(r){throw n}}}this.s.servers.clear(),P(this,O.STATE_CLOSING),u(this.waitQueue,new v.MongoTopologyClosedError),this.s.srvPoller&&(this.s.srvPoller.stop(),this.s.srvPoller.removeListener(R.SrvPoller.SRV_RECORD_DISCOVERY,this.s.detectSrvRecords)),this.removeListener(c.TOPOLOGY_DESCRIPTION_CHANGED,this.s.detectShardedTopology),P(this,O.STATE_CLOSED),this.emitAndLog(c.TOPOLOGY_CLOSED,new w.TopologyClosedEvent(this.s.id))}}},{key:"selectServer",value:function e(e,t){var r=this;return a(function(){var n,o,u,s,a,c,l,d,f,h,p,m,y,A,w,_,D,F,R,k,I,N,P,x,L,U;return H(this,function(j){switch(j.label){case 0:if(typeof e!="function")if(typeof e=="string")c=(0,T.readPreferenceServerSelector)(g.ReadPreference.fromString(e));else{;C(e,g.ReadPreference)?l=e:(g.ReadPreference.translate(t),l=t.readPreference||g.ReadPreference.primary),c=(0,T.readPreferenceServerSelector)(l)}else c=e;t=B({serverSelectionTimeoutMS:r.s.serverSelectionTimeoutMS},t),((n=r.client.mongoLogger)===null||n===void 0?void 0:n.willLog(E.MongoLoggableComponent.SERVER_SELECTION,E.SeverityLevel.DEBUG))&&((o=r.client.mongoLogger)===null||o===void 0?void 0:o.debug(E.MongoLoggableComponent.SERVER_SELECTION,new M.ServerSelectionStartedEvent(e,r.description,t.operationName)));t.timeoutContext?d=t.timeoutContext.serverSelectionTimeout:d=S.Timeout.expires((f=t.serverSelectionTimeoutMS)!==null&&f!==void 0?f:0);h=r.description.type===O.TopologyType.Sharded,p=t.session,m=p&&p.transaction;if(h&&m&&m.server)return[2,(((u=r.client.mongoLogger)===null||u===void 0?void 0:u.willLog(E.MongoLoggableComponent.SERVER_SELECTION,E.SeverityLevel.DEBUG))&&((s=r.client.mongoLogger)===null||s===void 0?void 0:s.debug(E.MongoLoggableComponent.SERVER_SELECTION,new M.ServerSelectionSucceededEvent(e,r.description,m.server.pool.address,t.operationName))),((a=t.timeoutContext)===null||a===void 0?void 0:a.clearServerSelectionTimeout)&&(d===null||d===void 0?void 0:d.clear()),m.server)];y=(0,b.promiseWithResolvers)(),A=y.promise,w=y.resolve,_=y.reject,D={serverSelector:c,topologyDescription:r.description,mongoLogger:r.client.mongoLogger,transaction:m,resolve:w,reject:_,cancelled:!1,startTime:(0,b.now)(),operationName:t.operationName,waitingLogged:!1,previousServer:t.previousServer},F=(0,b.addAbortListener)(t.signal,function(){D.cancelled=!0,_(this.reason)});r.waitQueue.push(D),i(r);j.label=1;case 1:j.trys.push([1,3,4,5]);d===null||d===void 0?void 0:d.throwIfExpired();return[4,d?Promise.race([A,d]):A];case 2:k=j.sent();return[2,(((R=t.timeoutContext)===null||R===void 0?void 0:R.csotEnabled())&&k.description.minRoundTripTime!==0&&(t.timeoutContext.minRoundTripTime=k.description.minRoundTripTime),k)];case 3:I=j.sent();if(S.TimeoutError.is(I)){;D.cancelled=!0;L=new v.MongoServerSelectionError("Server selection timed out after ".concat(d===null||d===void 0?void 0:d.duration," ms"),r.description);throw((N=r.client.mongoLogger)===null||N===void 0?void 0:N.willLog(E.MongoLoggableComponent.SERVER_SELECTION,E.SeverityLevel.DEBUG))&&((P=r.client.mongoLogger)===null||P===void 0?void 0:P.debug(E.MongoLoggableComponent.SERVER_SELECTION,new M.ServerSelectionFailedEvent(e,r.description,L,t.operationName))),((x=t.timeoutContext)===null||x===void 0?void 0:x.csotEnabled())?new v.MongoOperationTimeoutError("Timed out during server selection",{cause:L}):L}throw I;case 4:F===null||F===void 0?void 0:F[b.kDispose](),((U=t.timeoutContext)===null||U===void 0?void 0:U.clearServerSelectionTimeout)&&(d===null||d===void 0?void 0:d.clear());return[7];case 5:return[2]}})})()}},{key:"serverUpdateHandler",value:function e(e){if(!this.s.description.hasServer(e.address)||s(this.s.description,e))return;var t=this.s.description,r=this.s.description.servers.get(e.address);if(!r)return;var n=e.$clusterTime;n&&(0,O._advanceClusterTime)(this,n);var u=r&&r.equals(e);if(this.s.description=this.s.description.update(e),this.s.description.compatibilityError){this.emit(c.ERROR,new v.MongoCompatibilityError(this.s.description.compatibilityError));return}if(!u){var a=this.s.description.servers.get(e.address);a&&this.emit(c.SERVER_DESCRIPTION_CHANGED,new w.ServerDescriptionChangedEvent(this.s.id,e.address,r,a))}o(this,e),this.waitQueue.length>0&&i(this),u||this.emitAndLog(c.TOPOLOGY_DESCRIPTION_CHANGED,new w.TopologyDescriptionChangedEvent(this.s.id,t,this.s.description))}},{key:"auth",value:function e(e,t){typeof e=="function"&&(t=e,e=void 0),typeof t=="function"&&t(void 0,!0)}},{key:"clientMetadata",get:function e(){return this.s.options.metadata}},{key:"isConnected",value:function e(){return this.s.state===O.STATE_CONNECTED}},{key:"isDestroyed",value:function e(){return this.s.state===O.STATE_CLOSED}},{key:"lastHello",value:function e(){var e=Array.from(this.description.servers.values());return e.length===0?{}:e.filter(function(e){return e.type!==O.ServerType.Unknown})[0]||{maxWireVersion:this.description.commonWireVersion}}},{key:"commonWireVersion",get:function e(){return this.description.commonWireVersion}},{key:"logicalSessionTimeoutMinutes",get:function e(){return this.description.logicalSessionTimeoutMinutes}},{key:"clusterTime",get:function e(){return this.s.clusterTime},set:function e(e){this.s.clusterTime=e}}]);return c}(y.TypedEventEmitter);e.Topology=x;x.SERVER_OPENING=h.SERVER_OPENING;x.SERVER_CLOSED=h.SERVER_CLOSED;x.SERVER_DESCRIPTION_CHANGED=h.SERVER_DESCRIPTION_CHANGED;x.TOPOLOGY_OPENING=h.TOPOLOGY_OPENING;x.TOPOLOGY_CLOSED=h.TOPOLOGY_CLOSED;x.TOPOLOGY_DESCRIPTION_CHANGED=h.TOPOLOGY_DESCRIPTION_CHANGED;x.ERROR=h.ERROR;x.OPEN=h.OPEN;x.CONNECT=h.CONNECT;x.CLOSE=h.CLOSE;x.TIMEOUT=h.TIMEOUT;var L=/*#__PURE__*/function(){function e(t){f(this,e);this.minWireVersion=t.minWireVersion||0,this.maxWireVersion=t.maxWireVersion||0}p(e,[{key:"hasAggregationCursor",get:function e(){return this.maxWireVersion>=1}},{key:"hasWriteCommands",get:function e(){return this.maxWireVersion>=2}},{key:"hasTextSearch",get:function e(){return this.minWireVersion>=0}},{key:"hasAuthCommands",get:function e(){return this.maxWireVersion>=1}},{key:"hasListCollectionsCommand",get:function e(){return this.maxWireVersion>=3}},{key:"hasListIndexesCommand",get:function e(){return this.maxWireVersion>=3}},{key:"supportsSnapshotReads",get:function e(){return this.maxWireVersion>=13}},{key:"commandsTakeWriteConcern",get:function e(){return this.maxWireVersion>=5}},{key:"commandsTakeCollation",get:function e(){return this.maxWireVersion>=5}}]);return e}();e.ServerCapabilities=L});var rZ=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.MongoClient=e.ServerApiVersion=void 0;var t=Z("fs"),r=ea(),n=tr(),o=ts(),u=ti(),i=rC(),s=ev(),c=tt(),l=ec(),h=rV(),v=eb(),m=eO(),E=r$(),y=eS(),g=e3(),C=el(),S=r1(),b=ef(),O=rQ(),w=rc(),_=eg();e.ServerApiVersion=Object.freeze({v1:"1"});var D=/*#__PURE__*/function(e){A(m,e);function m(e,t){f(this,m);var n;n=d(this,m),n.on("error",_.noop),n.options=(0,i.parseOptions)(e,n,t);var o=Object.values(n.options.mongoLoggerOptions.componentSeverities).some(function(e){return e!==v.SeverityLevel.OFF});n.mongoLogger=o?new v.MongoLogger(n.options.mongoLoggerOptions):void 0;var u=n;n.s={url:e,bsonOptions:(0,r.resolveBSONOptions)(n.options),namespace:(0,_.ns)("admin"),hasBeenClosed:!1,sessionPool:new w.ServerSessionPool(n),activeSessions:new Set,activeCursors:new Set,authProviders:new h.MongoClientAuthProviders,get options(){return u.options},get readConcern(){return u.options.readConcern},get writeConcern(){return u.options.writeConcern},get readPreference(){return u.options.readPreference},get isMongoClient(){return!0}},n.checkForNonGenuineHosts();return n}p(m,[{key:"asyncDispose",value:function e(){var e=this;return a(function(){return H(this,function(t){switch(t.label){case 0:return[4,e.close()];case 1:t.sent();return[2]}})})()}},{key:"checkForNonGenuineHosts",value:function e(){var e,t;var r=this.options.hosts.filter(function(e){return(0,_.isHostMatch)(_.DOCUMENT_DB_CHECK,e.host)}),n=(0,_.isHostMatch)(_.DOCUMENT_DB_CHECK,this.options.srvHost),o=this.options.hosts.filter(function(e){return(0,_.isHostMatch)(_.COSMOS_DB_CHECK,e.host)}),u=(0,_.isHostMatch)(_.COSMOS_DB_CHECK,this.options.srvHost);r.length!==0||n?(e=this.mongoLogger)===null||e===void 0?void 0:e.info("client",_.DOCUMENT_DB_MSG):(o.length!==0||u)&&((t=this.mongoLogger)===null||t===void 0?void 0:t.info("client",_.COSMOS_DB_MSG))}},{key:"serverApi",get:function e(){return this.options.serverApi&&Object.freeze(B({},this.options.serverApi))}},{key:"monitorCommands",get:function e(){return this.options.monitorCommands},set:function e(e){this.options.monitorCommands=e}},{key:"autoEncrypter",get:function e(){return this.options.autoEncrypter}},{key:"readConcern",get:function e(){return this.s.readConcern}},{key:"writeConcern",get:function e(){return this.s.writeConcern}},{key:"readPreference",get:function e(){return this.s.readPreference}},{key:"bsonOptions",get:function e(){return this.s.bsonOptions}},{key:"timeoutMS",get:function e(){return this.s.options.timeoutMS}},{key:"bulkWrite",value:function e(e,t){var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:if(r.autoEncrypter)throw new l.MongoInvalidArgumentError("MongoClient bulkWrite does not currently support automatic encryption.");return[4,new E.ClientBulkWriteExecutor(r,e,(0,_.resolveOptions)(r,t)).execute()];case 1:return[2,n.sent()]}})})()}},{key:"connect",value:function e(){var e=this;return a(function(){return H(this,function(t){switch(t.label){case 0:if(!e.connectionLock)return[3,2];return[4,e.connectionLock];case 1:return[2,t.sent()];case 2:t.trys.push([2,,4,5]);e.connectionLock=e._connect();return[4,e.connectionLock];case 3:t.sent();return[3,5];case 4:e.connectionLock=void 0;return[7];case 5:return[2,e]}})})()}},{key:"_connect",value:function e(){var e=this;return a(function(){var r,n,c,d,f,h,v,p,m,E,y,g,A,C,S,b,w,D,B,T,F,M,R,k,I,P,x,L,j,z,W,V,G,q,K,Y,$,J,X,Q,Z;return H(this,function(ee){switch(ee.label){case 0:if(e.topology&&e.topology.isConnected())return[2,e];c=e.options;h=c.tls;if(!h)return[3,9];v=typeof c.tlsCAFile=="string";if(!v)return[3,4];if(!((d=c.ca)!==null&&d!==void 0))return[3,1];p=d;return[3,3];case 1:return[4,t.promises.readFile(c.tlsCAFile)];case 2:p=c.ca=ee.sent();ee.label=3;case 3:v=p;ee.label=4;case 4:v;m=typeof c.tlsCRLFile=="string";if(!m)return[3,8];if(!((f=c.crl)!==null&&f!==void 0))return[3,5];E=f;return[3,7];case 5:return[4,t.promises.readFile(c.tlsCRLFile)];case 6:E=c.crl=ee.sent();ee.label=7;case 7:m=E;ee.label=8;case 8:h=(m,typeof c.tlsCertificateKeyFile=="string"&&(!c.key||!c.cert));ee.label=9;case 9:if(!h)return[3,11];return[4,t.promises.readFile(c.tlsCertificateKeyFile)];case 10:y=ee.sent();(g=c.key)!==null&&g!==void 0?g:c.key=y,(A=c.cert)!==null&&A!==void 0?A:c.cert=y;ee.label=11;case 11:if(!(typeof c.srvHost=="string"))return[3,13];return[4,(0,i.resolveSRVRecord)(c)];case 12:C=ee.sent();S=true,b=false,w=undefined;try{for(D=C.entries()[Symbol.iterator]();!(S=(B=D.next()).done);S=true){T=N(B.value,2),F=T[0],M=T[1];c.hosts[F]=M}}catch(e){b=true;w=e}finally{try{if(!S&&D.return!=null){D.return()}}finally{if(b){throw w}}}ee.label=13;case 13:if(((r=c.credentials)===null||r===void 0?void 0:r.mechanism)===u.AuthMechanism.MONGODB_OIDC){;x=((k=c.credentials)===null||k===void 0?void 0:(R=k.mechanismProperties)===null||R===void 0?void 0:R.ALLOWED_HOSTS)||o.DEFAULT_ALLOWED_HOSTS;if(!!!((P=c.credentials)===null||P===void 0?void 0:(I=P.mechanismProperties)===null||I===void 0?void 0:I.ENVIRONMENT)){L=true,j=false,z=undefined;try{for(W=c.hosts[Symbol.iterator]();!(L=(V=W.next()).done);L=true){G=V.value;if(!(0,_.hostMatchesWildcards)(G.toHostPort().host,x))throw new l.MongoInvalidArgumentError("Host '".concat(G,"' is not valid for OIDC authentication with ALLOWED_HOSTS of '").concat(x.join(","),"'"))}}catch(e){j=true;z=e}finally{try{if(!L&&W.return!=null){W.return()}}finally{if(j){throw z}}}}}e.topology=new O.Topology(e,c.hosts,c),e.topology.once(O.Topology.OPEN,function(){return e.emit("open",e)});q=true,K=false,Y=undefined;try{$=function(){var t=X.value;e.topology.on(t,function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++){n[o]=arguments[o]}return e.emit.apply(e,[t].concat(U(n)))})};for(J=s.MONGO_CLIENT_EVENTS[Symbol.iterator]();!(q=(X=J.next()).done);q=true)$()}catch(e){K=true;Y=e}finally{try{if(!q&&J.return!=null){J.return()}}finally{if(K){throw Y}}}Q=/*#__PURE__*/function(){var t=a(function(){var t,r,n;return H(this,function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);return[4,(t=e.topology)===null||t===void 0?void 0:t.connect(c)];case 1:o.sent();return[3,3];case 2:r=o.sent();throw(n=e.topology)===null||n===void 0?void 0:n.close(),r;case 3:return[2]}})});return function e(){return t.apply(this,arguments)}}();if(!e.autoEncrypter)return[3,17];return[4,(n=e.autoEncrypter)===null||n===void 0?void 0:n.init()];case 14:ee.sent();return[4,Q()];case 15:ee.sent();return[4,c.encrypter.connectInternalClient()];case 16:Z=ee.sent();return[3,19];case 17:return[4,Q()];case 18:Z=ee.sent();ee.label=19;case 19:return[2,(Z,e)]}})})()}},{key:"close",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;var t=this;return a(function(){return H(this,function(r){switch(r.label){case 0:if(!t.closeLock)return[3,2];return[4,t.closeLock];case 1:return[2,r.sent()];case 2:r.trys.push([2,,4,5]);t.closeLock=t._close(e);return[4,t.closeLock];case 3:r.sent();return[3,5];case 4:t.closeLock=void 0;return[7];case 5:return[2]}})})()}},{key:"_close",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;var t=this;return a(function(){var r,n,o,u,i,s,a,c,l,d,f;return H(this,function(h){switch(h.label){case 0:Object.defineProperty(t.s,"hasBeenClosed",{value:!0,enumerable:!0,configurable:!1,writable:!1});r=Array.from(t.s.activeCursors,function(e){return e.close()});t.s.activeCursors.clear();return[4,Promise.all(r)];case 1:h.sent();n=Array.from(t.s.activeSessions,function(e){return e.endSession()});t.s.activeSessions.clear();return[4,Promise.all(n)];case 2:if(h.sent(),t.topology==null)return[2];o=(0,b.readPreferenceServerSelector)(C.ReadPreference.primaryPreferred),u=t.topology.description,i=Array.from(u.servers.values());if(!(o(u,i).length!==0))return[3,6];s=Array.from(t.s.sessionPool.sessions,function(e){var t=e.id;return t});if(!(s.length!==0))return[3,6];h.label=3;case 3:h.trys.push([3,5,,6]);return[4,(0,y.executeOperation)(t,new g.RunAdminCommandOperation({endSessions:s},{readPreference:C.ReadPreference.primaryPreferred,noResponse:!0}))];case 4:h.sent();return[3,6];case 5:a=h.sent();(0,_.squashError)(a);return[3,6];case 6:c=t.topology;t.topology=void 0,c.close();l=t.options,d=l.encrypter;f=d;if(!f)return[3,8];return[4,d.close(t,e)];case 7:f=h.sent();h.label=8;case 8:f;return[2]}})})()}},{key:"db",value:function e(e,t){t=t!==null&&t!==void 0?t:{},e||(e=this.s.options.dbName);var r=Object.assign({},this.options,t);return new c.Db(this,e,r)}},{key:"startSession",value:function e(e){var t=this;var r=new w.ClientSession(this,this.s.sessionPool,B({explicit:!0},e),this.options);return this.s.activeSessions.add(r),r.once("ended",function(){t.s.activeSessions.delete(r)}),r}},{key:"withSession",value:function e(e,t){var r=this;return a(function(){var n,o,u,i;return H(this,function(s){switch(s.label){case 0:n=B({owner:Symbol()},(typeof e==="undefined"?"undefined":j(e))=="object"?e:{}),o=typeof e=="function"?e:t;if(o==null)throw new l.MongoInvalidArgumentError("Missing required callback parameter");u=r.startSession(n);s.label=1;case 1:s.trys.push([1,,3,7]);return[4,o(u)];case 2:return[2,s.sent()];case 3:s.trys.push([3,5,,6]);return[4,u.endSession()];case 4:s.sent();return[3,6];case 5:i=s.sent();(0,_.squashError)(i);return[3,6];case 6:return[7];case 7:return[2]}})})()}},{key:"watch",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Array.isArray(e)||(t=e,e=[]),new n.ChangeStream(this,e,(0,_.resolveOptions)(this,t))}}],[{key:"connect",value:function e(e,t){var r=this;return a(function(){return H(this,function(n){switch(n.label){case 0:return[4,new r(e,t).connect()];case 1:return[2,n.sent()]}})})()}}]);return m}(m.TypedEventEmitter);e.MongoClient=D;(0,S.configureResourceManagement)(D.prototype)});var r1=et(function(e){"use strict";var t=function e(e){Symbol.asyncDispose&&Object.defineProperty(e,Symbol.asyncDispose,{value:/*#__PURE__*/a(function(){return H(this,function(e){switch(e.label){case 0:return[4,this.asyncDispose()];case 1:e.sent();return[2]}})}),enumerable:!1,configurable:!0,writable:!0})};var r=function e(){var e=rZ(),r=e.MongoClient,n=rc(),o=n.ClientSession,u=r0(),i=u.AbstractCursor,s=tr(),a=s.ChangeStream;t(r.prototype),t(o.prototype),t(i.prototype),t(a.prototype)};ei();Object.defineProperty(e,"__esModule",{value:!0});e.configureResourceManagement=t;e.configureExplicitResourceManagement=r});var r0=et(function(e){"use strict";var t=function e(){this.client.s.activeCursors.delete(this)};ei();Object.defineProperty(e,"__esModule",{value:!0});e.CursorTimeoutContext=e.AbstractCursor=e.CursorTimeoutMode=e.CURSOR_FLAGS=void 0;var r=Z("stream"),n=ea(),o=ec(),i=eO(),s=eS(),l=ew(),h=e_(),v=ep(),m=el(),E=r1(),y=rc(),g=eA(),S=eg();e.CURSOR_FLAGS=["tailable","oplogReplay","noCursorTimeout","awaitData","exhaust","partial"];e.CursorTimeoutMode=Object.freeze({ITERATION:"iteration",LIFETIME:"cursorLifetime"});var b=/*#__PURE__*/function(i){A(E,i);function E(t,r){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};f(this,E);var i;var s;if(i=d(this,E),i.documents=null,i.hasEmittedClose=!1,i.on("error",S.noop),!t.s.isMongoClient)throw new o.MongoRuntimeError("Cursor must be constructed with MongoClient");if(i.cursorClient=t,i.cursorNamespace=r,i.cursorId=null,i.initialized=!1,i.isClosed=!1,i.isKilled=!1,i.cursorOptions=F(B({readPreference:u.readPreference&&C(u.readPreference,m.ReadPreference)?u.readPreference:m.ReadPreference.primary},(0,n.pluckBSONSerializeOptions)(u)),{timeoutMS:(u===null||u===void 0?void 0:(s=u.timeoutContext)===null||s===void 0?void 0:s.csotEnabled())?u.timeoutContext.timeoutMS:u.timeoutMS,tailable:u.tailable,awaitData:u.awaitData}),i.cursorOptions.timeoutMS!=null)if(u.timeoutMode==null)if(u.tailable){if(u.awaitData&&u.maxAwaitTimeMS!=null&&u.maxAwaitTimeMS>=i.cursorOptions.timeoutMS)throw new o.MongoInvalidArgumentError("Cannot specify maxAwaitTimeMS >= timeoutMS for a tailable awaitData cursor");i.cursorOptions.timeoutMode=e.CursorTimeoutMode.ITERATION}else i.cursorOptions.timeoutMode=e.CursorTimeoutMode.LIFETIME;else{if(u.tailable&&u.timeoutMode===e.CursorTimeoutMode.LIFETIME)throw new o.MongoInvalidArgumentError("Cannot set tailable cursor's timeoutMode to LIFETIME");i.cursorOptions.timeoutMode=u.timeoutMode}else if(u.timeoutMode!=null)throw new o.MongoInvalidArgumentError("Cannot set timeoutMode without setting timeoutMS");i.cursorOptions.omitMaxTimeMS=i.cursorOptions.timeoutMS!=null&&(i.cursorOptions.timeoutMode===e.CursorTimeoutMode.ITERATION&&!i.cursorOptions.tailable||i.cursorOptions.tailable&&!i.cursorOptions.awaitData);var a=v.ReadConcern.fromOptions(u);a&&(i.cursorOptions.readConcern=a),typeof u.batchSize=="number"&&(i.cursorOptions.batchSize=u.batchSize),u.comment!==void 0&&(i.cursorOptions.comment=u.comment),typeof u.maxTimeMS=="number"&&(i.cursorOptions.maxTimeMS=u.maxTimeMS),typeof u.maxAwaitTimeMS=="number"&&(i.cursorOptions.maxAwaitTimeMS=u.maxAwaitTimeMS),C(u.session,y.ClientSession)?i.cursorSession=u.session:i.cursorSession=i.cursorClient.startSession({owner:i,explicit:!1}),i.deserializationOptions=F(B({},i.cursorOptions),{validation:{utf8:(u===null||u===void 0?void 0:u.enableUtf8Validation)!==!1}}),i.timeoutContext=u.timeoutContext,i.signal=u.signal,i.abortListener=(0,S.addAbortListener)(i.signal,function(){return void i.close().then(void 0,S.squashError)}),i.trackCursor();return i}p(E,[{key:"id",get:function e(){var e;return(e=this.cursorId)!==null&&e!==void 0?e:void 0}},{key:"isDead",get:function e(){var e;var t;return((t=(e=this.cursorId)===null||e===void 0?void 0:e.isZero())!==null&&t!==void 0?t:!1)||this.isClosed||this.isKilled}},{key:"client",get:function e(){return this.cursorClient}},{key:"server",get:function e(){return this.selectedServer}},{key:"namespace",get:function e(){return this.cursorNamespace}},{key:"readPreference",get:function e(){return this.cursorOptions.readPreference}},{key:"readConcern",get:function e(){return this.cursorOptions.readConcern}},{key:"session",get:function e(){return this.cursorSession},set:function e(e){this.cursorSession=e}},{key:"closed",get:function e(){var e;var t;return this.isClosed&&((t=(e=this.documents)===null||e===void 0?void 0:e.length)!==null&&t!==void 0?t:0)===0}},{key:"killed",get:function e(){return this.isKilled}},{key:"loadBalanced",get:function e(){var e;return!!((e=this.cursorClient.topology)===null||e===void 0?void 0:e.loadBalanced)}},{key:"asyncDispose",value:function e(){var e=this;return a(function(){return H(this,function(t){switch(t.label){case 0:return[4,e.close()];case 1:t.sent();return[2]}})})()}},{key:"trackCursor",value:function e(){this.cursorClient.s.activeCursors.add(this),this.listeners("close").includes(t)||this.once("close",t)}},{key:"bufferedCount",value:function e(){var e;var t;return(t=(e=this.documents)===null||e===void 0?void 0:e.length)!==null&&t!==void 0?t:0}},{key:"readBufferedDocuments",value:function e(e){var t,r;var n,o;var u=[],i=Math.min((n=e!==null&&e!==void 0?e:(t=this.documents)===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0,(o=(r=this.documents)===null||r===void 0?void 0:r.length)!==null&&o!==void 0?o:0);for(var s=0;s<i;s++){var a;var c=(a=this.documents)===null||a===void 0?void 0:a.shift(this.deserializationOptions);c!=null&&u.push(c)}return u}},{key:Symbol.asyncIterator,value:function e(){var e=this;return W(function(){var t,r,n,o,u,i;return H(this,function(s){switch(s.label){case 0:if(!((t=e.signal)===null||t===void 0?void 0:t.throwIfAborted(),!e.closed))return[3,12];s.label=1;case 1:s.trys.push([1,,7,12]);s.label=2;case 2:if(e.isKilled||e.closed||e.cursorId!=null&&e.isDead&&((o=(r=e.documents)===null||r===void 0?void 0:r.length)!==null&&o!==void 0?o:0)===0)return[2];return[4,c(e.next())];case 3:u=s.sent();if(u===null)return[2];return[4,u];case 4:s.sent(),(n=e.signal)===null||n===void 0?void 0:n.throwIfAborted();s.label=5;case 5:return[3,2];case 6:return[3,12];case 7:if(!!e.isClosed)return[3,11];s.label=8;case 8:s.trys.push([8,10,,11]);return[4,c(e.close())];case 9:s.sent();return[3,11];case 10:i=s.sent();(0,S.squashError)(i);return[3,11];case 11:return[7];case 12:return[2]}})})()}},{key:"stream",value:function e(e){var t=new O(this),n=(0,S.addAbortListener)(this.signal,function(){t.destroy(this.reason)});if(t.once("end",function(){n===null||n===void 0?void 0:n[S.kDispose]()}),e===null||e===void 0?void 0:e.transform){var o=e.transform,u=t.pipe(new r.Transform({objectMode:!0,highWaterMark:1,transform:function e(e,t,r){try{var n=o(e);r(void 0,n)}catch(e){r(e)}}}));return t.on("error",function(e){return u.emit("error",e)}),u}return t}},{key:"hasNext",value:function t(){var t=this;return a(function(){var r,o,u,i,s,a,c;return H(this,function(l){switch(l.label){case 0:if((r=t.signal)===null||r===void 0?void 0:r.throwIfAborted(),t.cursorId===n.Long.ZERO)return[2,!1];t.cursorOptions.timeoutMode===e.CursorTimeoutMode.ITERATION&&t.cursorId!=null&&((o=t.timeoutContext)===null||o===void 0?void 0:o.refresh());l.label=1;case 1:l.trys.push([1,,6,7]);l.label=2;case 2:if(((a=(s=t.documents)===null||s===void 0?void 0:s.length)!==null&&a!==void 0?a:0)!==0)return[2,!0];return[4,t.fetchBatch()];case 3:l.sent();l.label=4;case 4:if(!t.isDead||((i=(u=t.documents)===null||u===void 0?void 0:u.length)!==null&&i!==void 0?i:0)!==0)return[3,2];l.label=5;case 5:return[3,7];case 6:t.cursorOptions.timeoutMode===e.CursorTimeoutMode.ITERATION&&((c=t.timeoutContext)===null||c===void 0?void 0:c.clear());return[7];case 7:return[2,!1]}})})()}},{key:"next",value:function t(){var t=this;return a(function(){var r,u,i,s,a,c,l,d;return H(this,function(f){switch(f.label){case 0:if((r=t.signal)===null||r===void 0?void 0:r.throwIfAborted(),t.cursorId===n.Long.ZERO)throw new o.MongoCursorExhaustedError;t.cursorOptions.timeoutMode===e.CursorTimeoutMode.ITERATION&&t.cursorId!=null&&((u=t.timeoutContext)===null||u===void 0?void 0:u.refresh());f.label=1;case 1:f.trys.push([1,,10,11]);f.label=2;case 2:c=(a=t.documents)===null||a===void 0?void 0:a.shift(t.deserializationOptions);if(!(c!=null))return[3,6];if(!(t.transform!=null))return[3,4];return[4,t.transformDocument(c)];case 3:l=f.sent();return[3,5];case 4:l=c;f.label=5;case 5:return[2,l];case 6:return[4,t.fetchBatch()];case 7:f.sent();f.label=8;case 8:if(!t.isDead||((s=(i=t.documents)===null||i===void 0?void 0:i.length)!==null&&s!==void 0?s:0)!==0)return[3,2];f.label=9;case 9:return[3,11];case 10:t.cursorOptions.timeoutMode===e.CursorTimeoutMode.ITERATION&&((d=t.timeoutContext)===null||d===void 0?void 0:d.clear());return[7];case 11:return[2,null]}})})()}},{key:"tryNext",value:function t(){var t=this;return a(function(){var r,u,i,s,a,c,l,d;return H(this,function(f){switch(f.label){case 0:if((r=t.signal)===null||r===void 0?void 0:r.throwIfAborted(),t.cursorId===n.Long.ZERO)throw new o.MongoCursorExhaustedError;t.cursorOptions.timeoutMode===e.CursorTimeoutMode.ITERATION&&t.cursorId!=null&&((u=t.timeoutContext)===null||u===void 0?void 0:u.refresh());f.label=1;case 1:f.trys.push([1,,11,12]);a=(i=t.documents)===null||i===void 0?void 0:i.shift(t.deserializationOptions);if(!(a!=null))return[3,5];if(!(t.transform!=null))return[3,3];return[4,t.transformDocument(a)];case 2:c=f.sent();return[3,4];case 3:c=a;f.label=4;case 4:return[2,c];case 5:return[4,t.fetchBatch()];case 6:if(!(f.sent(),a=(s=t.documents)===null||s===void 0?void 0:s.shift(t.deserializationOptions),a!=null))return[3,10];if(!(t.transform!=null))return[3,8];return[4,t.transformDocument(a)];case 7:l=f.sent();return[3,9];case 8:l=a;f.label=9;case 9:return[2,l];case 10:return[3,12];case 11:t.cursorOptions.timeoutMode===e.CursorTimeoutMode.ITERATION&&((d=t.timeoutContext)===null||d===void 0?void 0:d.clear());return[7];case 12:return[2,null]}})})()}},{key:"forEach",value:function e(e){var t=this;return a(function(){var r,n,i,s,a,c,l,d,f;return H(this,function(h){switch(h.label){case 0:if((r=t.signal)===null||r===void 0?void 0:r.throwIfAborted(),typeof e!="function")throw new o.MongoInvalidArgumentError('Argument "iterator" must be a function');n=false,i=false;h.label=1;case 1:h.trys.push([1,6,7,12]);a=u(t);h.label=2;case 2:return[4,a.next()];case 3:if(!(n=!(c=h.sent()).done))return[3,5];l=c.value;d=l;if(e(d)===!1)return[3,5];h.label=4;case 4:n=false;return[3,2];case 5:return[3,12];case 6:f=h.sent();i=true;s=f;return[3,12];case 7:h.trys.push([7,,10,11]);if(!(n&&a.return!=null))return[3,9];return[4,a.return()];case 8:h.sent();h.label=9;case 9:return[3,11];case 10:if(i){throw s}return[7];case 11:return[7];case 12:return[2]}})})()}},{key:"close",value:function e(e){var t=this;return a(function(){return H(this,function(r){switch(r.label){case 0:return[4,t.cleanup(e===null||e===void 0?void 0:e.timeoutMS)];case 1:r.sent();return[2]}})})()}},{key:"toArray",value:function e(){var e=this;return a(function(){var t,r,n,o,i,s,a,c,l,d,f,h,v,p,m,E,y,g,A,C;return H(this,function(S){switch(S.label){case 0:(t=e.signal)===null||t===void 0?void 0:t.throwIfAborted();r=[];n=false,o=false;S.label=1;case 1:S.trys.push([1,15,16,21]);s=u(e);S.label=2;case 2:return[4,s.next()];case 3:if(!(n=!(a=S.sent()).done))return[3,14];l=a.value;d=l;r.push(d);f=e.readBufferedDocuments();h=true,v=false,p=undefined;if(!(e.transform!=null))return[3,12];S.label=4;case 4:S.trys.push([4,9,10,11]);m=f[Symbol.iterator]();S.label=5;case 5:if(!!(h=(E=m.next()).done))return[3,8];y=E.value;g=r.push;return[4,e.transformDocument(y)];case 6:g.apply(r,[S.sent()]);S.label=7;case 7:h=true;return[3,5];case 8:return[3,11];case 9:A=S.sent();v=true;p=A;return[3,11];case 10:try{if(!h&&m.return!=null){m.return()}}finally{if(v){throw p}}return[7];case 11:return[3,13];case 12:(c=r).push.apply(c,U(f));S.label=13;case 13:n=false;return[3,2];case 14:return[3,21];case 15:C=S.sent();o=true;i=C;return[3,21];case 16:S.trys.push([16,,19,20]);if(!(n&&s.return!=null))return[3,18];return[4,s.return()];case 17:S.sent();S.label=18;case 18:return[3,20];case 19:if(o){throw i}return[7];case 20:return[7];case 21:return[2,r]}})})()}},{key:"addCursorFlag",value:function t(t,r){if(this.throwIfInitialized(),!e.CURSOR_FLAGS.includes(t))throw new o.MongoInvalidArgumentError("Flag ".concat(t," is not one of ").concat(e.CURSOR_FLAGS));if(typeof r!="boolean")throw new o.MongoInvalidArgumentError("Flag ".concat(t," must be a boolean value"));return this.cursorOptions[t]=r,this}},{key:"map",value:function e(e){this.throwIfInitialized();var t=this.transform;return t?this.transform=function(r){return e(t(r))}:this.transform=e,this}},{key:"withReadPreference",value:function e(e){if(this.throwIfInitialized(),C(e,m.ReadPreference))this.cursorOptions.readPreference=e;else if(typeof e=="string")this.cursorOptions.readPreference=m.ReadPreference.fromString(e);else throw new o.MongoInvalidArgumentError("Invalid read preference: ".concat(e));return this}},{key:"withReadConcern",value:function e(e){this.throwIfInitialized();var t=v.ReadConcern.fromOptions({readConcern:e});return t&&(this.cursorOptions.readConcern=t),this}},{key:"maxTimeMS",value:function e(e){if(this.throwIfInitialized(),typeof e!="number")throw new o.MongoInvalidArgumentError("Argument for maxTimeMS must be a number");return this.cursorOptions.maxTimeMS=e,this}},{key:"batchSize",value:function e(e){if(this.throwIfInitialized(),this.cursorOptions.tailable)throw new o.MongoTailableCursorError("Tailable cursor does not support batchSize");if(typeof e!="number")throw new o.MongoInvalidArgumentError('Operation "batchSize" requires an integer');return this.cursorOptions.batchSize=e,this}},{key:"rewind",value:function e(){var e,t;if(this.timeoutContext&&this.timeoutContext.owner!==this)throw new o.MongoAPIError("Cannot rewind cursor that does not own its timeout context.");this.initialized&&(this.cursorId=null,(e=this.documents)===null||e===void 0?void 0:e.clear(),(t=this.timeoutContext)===null||t===void 0?void 0:t.clear(),this.timeoutContext=void 0,this.isClosed=!1,this.isKilled=!1,this.initialized=!1,this.hasEmittedClose=!1,this.trackCursor(),this.cursorSession.explicit===!1&&(this.cursorSession.hasEnded||this.cursorSession.endSession().then(void 0,S.squashError),this.cursorSession=this.cursorClient.startSession({owner:this,explicit:!1})))}},{key:"getMore",value:function e(e){var t=this;return a(function(){var r,n;return H(this,function(u){switch(u.label){case 0:if(t.cursorId==null)throw new o.MongoRuntimeError("Unexpected null cursor id. A cursor creating command should have set this");if(t.selectedServer==null)throw new o.MongoRuntimeError("Unexpected null selectedServer. A cursor creating command should have set this");r=F(B({},t.cursorOptions),{session:t.cursorSession,batchSize:e}),n=new l.GetMoreOperation(t.cursorNamespace,t.cursorId,t.selectedServer,r);return[4,(0,s.executeOperation)(t.cursorClient,n,t.timeoutContext)];case 1:return[2,u.sent()]}})})()}},{key:"cursorInit",value:function e(){var e=this;return a(function(){var t,r,n,o,u,i;return H(this,function(s){switch(s.label){case 0:e.cursorOptions.timeoutMS!=null&&((t=e.timeoutContext)!==null&&t!==void 0?t:e.timeoutContext=new w(g.TimeoutContext.create({serverSelectionTimeoutMS:e.client.s.options.serverSelectionTimeoutMS,timeoutMS:e.cursorOptions.timeoutMS}),e));s.label=1;case 1:s.trys.push([1,3,,5]);return[4,e._initialize(e.cursorSession)];case 2:r=s.sent();e.cursorOptions.omitMaxTimeMS=e.cursorOptions.timeoutMS!=null;n=r.response;e.selectedServer=r.server,e.cursorId=n.id,e.cursorNamespace=(o=n.ns)!==null&&o!==void 0?o:e.namespace,e.documents=n,e.initialized=!0;return[3,5];case 3:u=s.sent();e.initialized=!0;return[4,e.cleanup(void 0,u)];case 4:throw s.sent(),u;case 5:i=e.isDead;if(!i)return[3,7];return[4,e.cleanup()];case 6:i=s.sent();s.label=7;case 7:i;return[2]}})})()}},{key:"fetchBatch",value:function e(){var e=this;return a(function(){var t,r,n,o,u,i,s,a;return H(this,function(c){switch(c.label){case 0:if(e.isClosed)return[2];if(!e.isDead)return[3,2];return[4,e.cleanup()];case 1:c.sent();return[2];case 2:n=e.cursorId==null;if(!n)return[3,4];return[4,e.cursorInit()];case 3:n=(c.sent(),((r=(t=e.documents)===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0)!==0||e.isDead);c.label=4;case 4:if(n)return[2];o=e.cursorOptions.batchSize||1e3;c.label=5;case 5:c.trys.push([5,7,,12]);return[4,e.getMore(o)];case 6:u=c.sent();e.cursorId=u.id,e.documents=u;return[3,12];case 7:i=c.sent();c.label=8;case 8:c.trys.push([8,10,,11]);return[4,e.cleanup(void 0,i)];case 9:c.sent();return[3,11];case 10:s=c.sent();(0,S.squashError)(s);return[3,11];case 11:throw i;case 12:a=e.isDead;if(!a)return[3,14];return[4,e.cleanup()];case 13:a=c.sent();c.label=14;case 14:a;return[2]}})})()}},{key:"cleanup",value:function e(e,t){var r=this;return a(function(){var o,u,i,a,c,l,d;return H(this,function(f){switch(f.label){case 0:(o=r.abortListener)===null||o===void 0?void 0:o[S.kDispose](),r.isClosed=!0;u=function(){var t,n;return e!=null?((t=r.timeoutContext)===null||t===void 0?void 0:t.clear(),new w(g.TimeoutContext.create({serverSelectionTimeoutMS:r.client.s.options.serverSelectionTimeoutMS,timeoutMS:e}),r)):(n=r.timeoutContext)===null||n===void 0?void 0:n.refreshed()};f.label=1;case 1:f.trys.push([1,4,5,10]);if(!(!r.isKilled&&r.cursorId&&!r.cursorId.isZero()&&r.cursorNamespace&&r.selectedServer&&!r.cursorSession.hasEnded))return[3,3];r.isKilled=!0;i=r.cursorId;r.cursorId=n.Long.ZERO;return[4,(0,s.executeOperation)(r.cursorClient,new h.KillCursorsOperation(i,r.cursorNamespace,r.selectedServer,{session:r.cursorSession}),u())];case 2:f.sent();f.label=3;case 3:return[3,10];case 4:a=f.sent();(0,S.squashError)(a);return[3,10];case 5:f.trys.push([5,,8,9]);d=((c=r.cursorSession)===null||c===void 0?void 0:c.owner)===r;if(!d)return[3,7];return[4,r.cursorSession.endSession({error:t})];case 6:d=f.sent();f.label=7;case 7:d,((l=r.cursorSession)===null||l===void 0?void 0:l.inTransaction())||(0,y.maybeClearPinnedConnection)(r.cursorSession,{error:t});return[3,9];case 8:r.emitClose();return[7];case 9:return[7];case 10:return[2]}})})()}},{key:"emitClose",value:function e(){try{var e;var t;!this.hasEmittedClose&&(((t=(e=this.documents)===null||e===void 0?void 0:e.length)!==null&&t!==void 0?t:0)===0||this.isClosed)&&this.emit("close")}finally{this.hasEmittedClose=!0}}},{key:"transformDocument",value:function e(e){var t=this;return a(function(){var r,n,u,i;return H(this,function(s){switch(s.label){case 0:if(t.transform==null)return[2,e];s.label=1;case 1:s.trys.push([1,2,,7]);r=t.transform(e);if(r===null){n="Cursor returned a `null` document, but the cursor is not exhausted. Mapping documents to `null` is not supported in the cursor transform.";throw new o.MongoAPIError(n)}return[2,r];case 2:u=s.sent();s.label=3;case 3:s.trys.push([3,5,,6]);return[4,t.close()];case 4:s.sent();return[3,6];case 5:i=s.sent();(0,S.squashError)(i);return[3,6];case 6:throw u;case 7:return[2]}})})()}},{key:"throwIfInitialized",value:function e(){if(this.initialized)throw new o.MongoCursorInUseError}}]);return E}(i.TypedEventEmitter);e.AbstractCursor=b;b.CLOSE="close";var O=/*#__PURE__*/function(e){A(t,e);function t(e){f(this,t);var r;r=d(this,t,[{objectMode:!0,autoDestroy:!1,highWaterMark:1}]),r._readInProgress=!1,r._cursor=e;return r}p(t,[{key:"_read",value:function e(e){this._readInProgress||(this._readInProgress=!0,this._readNext())}},{key:"_destroy",value:function e(e,t){this._cursor.close().then(function(){return t(e)},function(e){return t(e)})}},{key:"_readNext",value:function e(){var e=this;if(this._cursor.id===n.Long.ZERO){this.push(null);return}this._cursor.next().then(function(t){if(t==null)e.push(null);else if(e.destroyed)e._cursor.close().then(void 0,S.squashError);else{if(e.push(t))return e._readNext();e._readInProgress=!1}},function(t){return t.message.match(/server is closed/)?(e._cursor.close().then(void 0,S.squashError),e.push(null)):t.message.match(/operation was interrupted/)?e.push(null):e.destroy(t)}).catch(function(t){e._readInProgress=!1,e.destroy(t)})}}]);return t}(r.Readable);(0,E.configureResourceManagement)(b.prototype);var w=/*#__PURE__*/function(e){A(t,e);function t(e,r){f(this,t);var n;n=d(this,t),n.timeoutContext=e,n.owner=r;return n}p(t,[{key:"serverSelectionTimeout",get:function e(){return this.timeoutContext.serverSelectionTimeout}},{key:"connectionCheckoutTimeout",get:function e(){return this.timeoutContext.connectionCheckoutTimeout}},{key:"clearServerSelectionTimeout",get:function e(){return this.timeoutContext.clearServerSelectionTimeout}},{key:"timeoutForSocketWrite",get:function e(){return this.timeoutContext.timeoutForSocketWrite}},{key:"timeoutForSocketRead",get:function e(){return this.timeoutContext.timeoutForSocketRead}},{key:"csotEnabled",value:function e(){return this.timeoutContext.csotEnabled()}},{key:"refresh",value:function e(){if(j(this.owner)!="symbol")return this.timeoutContext.refresh()}},{key:"clear",value:function e(){if(j(this.owner)!="symbol")return this.timeoutContext.clear()}},{key:"maxTimeMS",get:function e(){return this.timeoutContext.maxTimeMS}},{key:"timeoutMS",get:function e(){return this.timeoutContext.csotEnabled()?this.timeoutContext.timeoutMS:null}},{key:"refreshed",value:function e(){return new t(this.timeoutContext.refreshed(),this.owner)}},{key:"addMaxTimeMSToCommand",value:function e(e,t){this.timeoutContext.addMaxTimeMSToCommand(e,t)}},{key:"getSocketTimeoutMS",value:function e(){return this.timeoutContext.getSocketTimeoutMS()}}]);return t}(g.TimeoutContext);e.CursorTimeoutContext=w});var r2=et(function(e){"use strict";var t=function e(e,t){var r=e.maxTimeMS,n=e.timeoutMS;if(n!=null&&(r!=null||(t===null||t===void 0?void 0:t.maxTimeMS)!=null))throw new o.MongoAPIError("Cannot use maxTimeMS with timeoutMS for explain commands.")};var r=function e(e,t){var r=t.verbosity,n=t.maxTimeMS,o={explain:e,verbosity:r};return typeof n=="number"&&(o.maxTimeMS=n),o};ei();Object.defineProperty(e,"__esModule",{value:!0});e.ExplainableCursor=e.Explain=e.ExplainVerbosity=void 0;e.validateExplainTimeoutOptions=t;e.decorateWithExplain=r;var n=r0(),o=ec();e.ExplainVerbosity=Object.freeze({queryPlanner:"queryPlanner",queryPlannerExtended:"queryPlannerExtended",executionStats:"executionStats",allPlansExecution:"allPlansExecution"});var u=/*#__PURE__*/function(){function t(r,n){f(this,t);typeof r=="boolean"?this.verbosity=r?e.ExplainVerbosity.allPlansExecution:e.ExplainVerbosity.queryPlanner:this.verbosity=r,this.maxTimeMS=n}p(t,null,[{key:"fromOptions",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.explain;if(r==null)return;if(typeof r=="boolean"||typeof r=="string")return new t(r);var n=r.verbosity,o=r.maxTimeMS;return new t(n,o)}}]);return t}();e.Explain=u;var i=/*#__PURE__*/function(e){A(t,e);function t(){f(this,t);return d(this,t,arguments)}p(t,[{key:"resolveExplainTimeoutOptions",value:function e(e,t){var r,n;return e==null&&t==null?(r=void 0,n=void 0):e!=null&&t==null?(r=(typeof e==="undefined"?"undefined":j(e))!="object"||"verbosity"in e?e:void 0,n=(typeof e==="undefined"?"undefined":j(e))=="object"&&"timeoutMS"in e?e:void 0):(r=e,n=t),{timeout:n,explain:r}}}]);return t}(n.AbstractCursor);e.ExplainableCursor=i});var r3=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.CommandOperation=void 0;var t=ec(),r=r2(),n=ep(),o=ef(),u=eg(),i=ey(),s=eC(),c=/*#__PURE__*/function(e){A(c,e);function c(e,o){f(this,c);var a;a=d(this,c,[o]),a.options=o!==null&&o!==void 0?o:{};var l=(o===null||o===void 0?void 0:o.dbName)||(o===null||o===void 0?void 0:o.authdb);if(l?a.ns=new u.MongoDBNamespace(l,"$cmd"):a.ns=e?e.s.namespace.withCollection("$cmd"):new u.MongoDBNamespace("admin","$cmd"),a.readConcern=n.ReadConcern.fromOptions(o),a.writeConcern=i.WriteConcern.fromOptions(o),a.hasAspect(s.Aspect.EXPLAINABLE))a.explain=r.Explain.fromOptions(o),a.explain&&(0,r.validateExplainTimeoutOptions)(a.options,a.explain);else if((o===null||o===void 0?void 0:o.explain)!=null)throw new t.MongoInvalidArgumentError('Option "explain" is not supported on this command');return a}p(c,[{key:"canRetryWrite",get:function e(){return this.hasAspect(s.Aspect.EXPLAINABLE)?this.explain==null:y(g(c.prototype),"canRetryWrite",this)}},{key:"executeCommand",value:function e(e,t,n,c,l){var d=this;return a(function(){var a,f,h;return H(this,function(v){switch(v.label){case 0:d.server=e;a=F(B({},d.options,d.bsonOptions),{timeoutContext:c,readPreference:d.readPreference,session:t}),f=(0,u.maxWireVersion)(e),h=d.session&&d.session.inTransaction();d.readConcern&&(0,u.commandSupportsReadConcern)(n)&&!h&&Object.assign(n,{readConcern:d.readConcern}),d.trySecondaryWrite&&f<o.MIN_SECONDARY_WRITE_WIRE_VERSION&&(a.omitReadPreference=!0),d.writeConcern&&d.hasAspect(s.Aspect.WRITE_OPERATION)&&!h&&i.WriteConcern.apply(n,d.writeConcern),a.collation&&j(a.collation)=="object"&&!d.hasAspect(s.Aspect.SKIP_COLLATION)&&Object.assign(n,{collation:a.collation}),typeof a.maxTimeMS=="number"&&(n.maxTimeMS=a.maxTimeMS),d.hasAspect(s.Aspect.EXPLAINABLE)&&d.explain&&(n=(0,r.decorateWithExplain)(n,d.explain));return[4,e.command(d.ns,n,a,l)];case 1:return[2,v.sent()]}})})()}}]);return c}(s.AbstractOperation);e.CommandOperation=c});var r6=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.ListDatabasesOperation=void 0;var t=eg(),r=r3(),n=eC(),o=/*#__PURE__*/function(e){A(r,e);function r(e,n){f(this,r);var o;o=d(this,r,[e,n]),o.options=n!==null&&n!==void 0?n:{},o.ns=new t.MongoDBNamespace("admin","$cmd");return o}p(r,[{key:"commandName",get:function e(){return"listDatabases"}},{key:"execute",value:function e(e,n,o){var u=this;var i=this,s=function(){return y(g(r.prototype),"executeCommand",u)};return a(function(){var r;return H(this,function(u){switch(u.label){case 0:r={listDatabases:1};typeof i.options.nameOnly=="boolean"&&(r.nameOnly=i.options.nameOnly),i.options.filter&&(r.filter=i.options.filter),typeof i.options.authorizedDatabases=="boolean"&&(r.authorizedDatabases=i.options.authorizedDatabases),(0,t.maxWireVersion)(e)>=9&&i.options.comment!==void 0&&(r.comment=i.options.comment);return[4,s().call(i,e,n,r,o)];case 1:return[2,u.sent()]}})})()}}]);return r}(r.CommandOperation);e.ListDatabasesOperation=o;(0,n.defineAspects)(o,[n.Aspect.READ_OPERATION,n.Aspect.RETRYABLE])});var r4=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.ValidateCollectionOperation=void 0;var t=ec(),r=r3(),n=/*#__PURE__*/function(e){A(r,e);function r(e,t,n){f(this,r);var o;var u={validate:t},i=Object.keys(n);for(var s=0;s<i.length;s++)Object.prototype.hasOwnProperty.call(n,i[s])&&i[s]!=="session"&&(u[i[s]]=n[i[s]]);o=d(this,r,[e.s.db,n]),o.options=n,o.command=u,o.collectionName=t;return o}p(r,[{key:"commandName",get:function e(){return"validate"}},{key:"execute",value:function e(e,n,o){var u=this;var i=this,s=function(){return y(g(r.prototype),"executeCommand",u)};return a(function(){var r,u;return H(this,function(a){switch(a.label){case 0:r=i.collectionName;return[4,s().call(i,e,n,i.command,o)];case 1:u=a.sent();if(u.result!=null&&typeof u.result!="string")throw new t.MongoUnexpectedServerResponseError("Error with validation data");if(u.result!=null&&u.result.match(/exception|corrupt/)!=null)throw new t.MongoUnexpectedServerResponseError("Invalid collection ".concat(r));if(u.valid!=null&&!u.valid)throw new t.MongoUnexpectedServerResponseError("Invalid collection ".concat(r));return[2,u]}})})()}}]);return r}(r.CommandOperation);e.ValidateCollectionOperation=n});var r9=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.Admin=void 0;var t=ea(),r=eS(),n=r6(),o=e8(),u=e3(),i=r4(),s=/*#__PURE__*/function(){function e(t){f(this,e);this.s={db:t}}p(e,[{key:"command",value:function e(e,n){var o=this;return a(function(){var i;return H(this,function(s){switch(s.label){case 0:return[4,(0,r.executeOperation)(o.s.db.client,new u.RunAdminCommandOperation(e,F(B({},(0,t.resolveBSONOptions)(n)),{session:n===null||n===void 0?void 0:n.session,readPreference:n===null||n===void 0?void 0:n.readPreference,timeoutMS:(i=n===null||n===void 0?void 0:n.timeoutMS)!==null&&i!==void 0?i:o.s.db.timeoutMS})))];case 1:return[2,s.sent()]}})})()}},{key:"buildInfo",value:function e(e){var t=this;return a(function(){return H(this,function(r){switch(r.label){case 0:return[4,t.command({buildinfo:1},e)];case 1:return[2,r.sent()]}})})()}},{key:"serverInfo",value:function e(e){var t=this;return a(function(){return H(this,function(r){switch(r.label){case 0:return[4,t.command({buildinfo:1},e)];case 1:return[2,r.sent()]}})})()}},{key:"serverStatus",value:function e(e){var t=this;return a(function(){return H(this,function(r){switch(r.label){case 0:return[4,t.command({serverStatus:1},e)];case 1:return[2,r.sent()]}})})()}},{key:"ping",value:function e(e){var t=this;return a(function(){return H(this,function(r){switch(r.label){case 0:return[4,t.command({ping:1},e)];case 1:return[2,r.sent()]}})})()}},{key:"removeUser",value:function e(e,t){var n=this;return a(function(){return H(this,function(u){switch(u.label){case 0:return[4,(0,r.executeOperation)(n.s.db.client,new o.RemoveUserOperation(n.s.db,e,B({dbName:"admin"},t)))];case 1:return[2,u.sent()]}})})()}},{key:"validateCollection",value:function e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var n=this;return a(function(){return H(this,function(o){switch(o.label){case 0:return[4,(0,r.executeOperation)(n.s.db.client,new i.ValidateCollectionOperation(n,e,t))];case 1:return[2,o.sent()]}})})()}},{key:"listDatabases",value:function e(e){var t=this;return a(function(){return H(this,function(o){switch(o.label){case 0:return[4,(0,r.executeOperation)(t.s.db.client,new n.ListDatabasesOperation(t.s.db,B({timeoutMS:t.s.db.timeoutMS},e)))];case 1:return[2,o.sent()]}})})()}},{key:"replSetGetStatus",value:function e(e){var t=this;return a(function(){return H(this,function(r){switch(r.label){case 0:return[4,t.command({replSetGetStatus:1},e)];case 1:return[2,r.sent()]}})})()}}]);return e}();e.Admin=s});var r7=et(function(e){"use strict";var t=function e(e){if(e.s.init)throw new l.MongoGridFSStreamError("Options cannot be changed after the stream is initialized")};var r=function e(e){if(e.destroyed||!e.s.cursor||!e.s.file)return;var t=function(t){if(e.destroyed)return;if(!t){var r;e.push(null),(r=e.s.cursor)===null||r===void 0?void 0:r.close().then(void 0,function(t){return e.destroy(t)});return}if(!e.s.file)return;var n=e.s.file.length-e.s.bytesRead,o=e.s.expected++,u=Math.min(e.s.file.chunkSize,n);if(t.n>o)return e.destroy(new l.MongoGridFSChunkError("ChunkIsMissing: Got unexpected n: ".concat(t.n,", expected: ").concat(o)));if(t.n<o)return e.destroy(new l.MongoGridFSChunkError("ExtraChunk: Got unexpected n: ".concat(t.n,", expected: ").concat(o)));var i=Buffer.isBuffer(t.data)?t.data:t.data.buffer;if(i.byteLength!==u)return n<=0?e.destroy(new l.MongoGridFSChunkError("ExtraChunk: Got unexpected n: ".concat(t.n,", expected file length ").concat(e.s.file.length," bytes but already read ").concat(e.s.bytesRead," bytes"))):e.destroy(new l.MongoGridFSChunkError("ChunkIsWrongSize: Got unexpected length: ".concat(i.byteLength,", expected: ").concat(u)));if(e.s.bytesRead+=i.byteLength,i.byteLength===0)return e.push(null);var s=null,a=null;e.s.bytesToSkip!=null&&(s=e.s.bytesToSkip,e.s.bytesToSkip=0);var c=o===e.s.expectedEnd-1,d=e.s.options.end-e.s.bytesToSkip;c&&e.s.bytesToTrim!=null?a=e.s.file.chunkSize-e.s.bytesToTrim:e.s.options.end&&d<t.data.byteLength&&(a=d),(s!=null||a!=null)&&(i=i.slice(s||0,a||i.byteLength)),e.push(i)};e.s.cursor.next().then(t,function(t){e.destroyed||e.destroy(t)})};var n=function e(e){var t={};e.s.readPreference&&(t.readPreference=e.s.readPreference),e.s.options&&e.s.options.sort&&(t.sort=e.s.options.sort),e.s.options&&e.s.options.skip&&(t.skip=e.s.options.skip);var r=function(t){if(e.destroyed)return;if(!t){var r="FileNotFound: file ".concat(e.s.filter._id?e.s.filter._id.toString():e.s.filter.filename," was not found"),n=new l.MongoRuntimeError(r);return n.code="ENOENT",e.destroy(n)}if(t.length<=0){e.push(null);return}if(e.destroyed){e.destroy();return}try{e.s.bytesToSkip=u(e,t,e.s.options)}catch(t){return e.destroy(t)}var o={files_id:t._id};if(e.s.options&&e.s.options.start!=null){var s=Math.floor(e.s.options.start/t.chunkSize);s>0&&(o.n={$gte:s})}var a;try{var d,f;a=(f=e.s.timeoutContext)===null||f===void 0?void 0:f.getRemainingTimeMSOrThrow("Download timed out after ".concat((d=e.s.timeoutContext)===null||d===void 0?void 0:d.timeoutMS,"ms"))}catch(t){return e.destroy(t)}e.s.cursor=e.s.chunks.find(o,{timeoutMode:e.s.options.timeoutMS!=null?c.CursorTimeoutMode.LIFETIME:void 0,timeoutMS:a}).sort({n:1}),e.s.readPreference&&e.s.cursor.withReadPreference(e.s.readPreference),e.s.expectedEnd=Math.ceil(t.length/t.chunkSize),e.s.file=t;try{e.s.bytesToTrim=i(e,t,e.s.cursor,e.s.options)}catch(t){return e.destroy(t)}e.emit(v.FILE,t)},n;try{var o,s;n=(s=e.s.timeoutContext)===null||s===void 0?void 0:s.getRemainingTimeMSOrThrow("Download timed out after ".concat((o=e.s.timeoutContext)===null||o===void 0?void 0:o.timeoutMS,"ms"))}catch(t){e.destroyed||e.destroy(t);return}t.timeoutMS=n,e.s.files.findOne(e.s.filter,t).then(r,function(t){e.destroyed||e.destroy(t)})};var o=function e(e,t){if(e.s.file)return t();e.s.init||(n(e),e.s.init=!0),e.once("file",function(){t()})};var u=function e(e,t,r){if(r&&r.start!=null){if(r.start>t.length)throw new l.MongoInvalidArgumentError("Stream start (".concat(r.start,") must not be more than the length of the file (").concat(t.length,")"));if(r.start<0)throw new l.MongoInvalidArgumentError("Stream start (".concat(r.start,") must not be negative"));if(r.end!=null&&r.end<r.start)throw new l.MongoInvalidArgumentError("Stream start (".concat(r.start,") must not be greater than stream end (").concat(r.end,")"));return e.s.bytesRead=Math.floor(r.start/t.chunkSize)*t.chunkSize,e.s.expected=Math.floor(r.start/t.chunkSize),r.start-e.s.bytesRead}throw new l.MongoInvalidArgumentError("Start option must be defined")};var i=function e(e,t,r,n){if(n&&n.end!=null){if(n.end>t.length)throw new l.MongoInvalidArgumentError("Stream end (".concat(n.end,") must not be more than the length of the file (").concat(t.length,")"));if(n.start==null||n.start<0)throw new l.MongoInvalidArgumentError("Stream end (".concat(n.end,") must not be negative"));var o=n.start!=null?Math.floor(n.start/t.chunkSize):0;return r.limit(Math.ceil(n.end/t.chunkSize)-o),e.s.expectedEnd=Math.ceil(n.end/t.chunkSize),Math.ceil(n.end/t.chunkSize)*t.chunkSize-n.end}throw new l.MongoInvalidArgumentError("End option must be defined")};ei();Object.defineProperty(e,"__esModule",{value:!0});e.GridFSBucketReadStream=void 0;var s=Z("stream"),c=r0(),l=ec(),h=eA(),v=/*#__PURE__*/function(e){A(n,e);function n(e,t,r,o,u){f(this,n);var i;i=d(this,n,[{emitClose:!0}]),i.s={bytesToTrim:0,bytesToSkip:0,bytesRead:0,chunks:e,expected:0,files:t,filter:o,init:!1,expectedEnd:0,options:B({start:0,end:0},u),readPreference:r,timeoutContext:(u===null||u===void 0?void 0:u.timeoutMS)!=null?new h.CSOTTimeoutContext({timeoutMS:u.timeoutMS,serverSelectionTimeoutMS:0}):void 0};return i}p(n,[{key:"_read",value:function e(){var e=this;this.destroyed||o(this,function(){return r(e)})}},{key:"start",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return t(this),this.s.options.start=e,this}},{key:"end",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return t(this),this.s.options.end=e,this}},{key:"abort",value:function e(){var e=this;return a(function(){var t,r,n;return H(this,function(o){switch(o.label){case 0:e.push(null),e.destroy();n=(t=e.s.timeoutContext)===null||t===void 0?void 0:t.getRemainingTimeMSOrThrow();return[4,(r=e.s.cursor)===null||r===void 0?void 0:r.close({timeoutMS:n})];case 1:o.sent();return[2]}})})()}}]);return n}(s.Readable);e.GridFSBucketReadStream=v;v.FILE="file"});var r8=et(function(e){"use strict";var t=function e(e,t,r){if(e.state.errored){process.nextTick(r);return}e.state.errored=!0,process.nextTick(r,t)};var r=function e(e,t,r){return{_id:new v.ObjectId,files_id:e,n:t,data:r}};var n=function e(e){return O.apply(this,arguments)};var o=function e(e,r){if(e.done)return process.nextTick(r);if(e.state.streamEnd&&e.state.outstandingRequests===0&&!e.state.errored){var n,o;e.done=!0;var u=i(e.id,e.length,e.chunkSizeBytes,e.filename,e.options.contentType,e.options.aliases,e.options.metadata);if(l(e,r))return;var s=(n=e.timeoutContext)===null||n===void 0?void 0:n.remainingTimeMS;if(s!=null&&s<=0)return t(e,new E.MongoOperationTimeoutError("Upload timed out after ".concat((o=e.timeoutContext)===null||o===void 0?void 0:o.timeoutMS,"ms")),r);e.files.insertOne(u,{writeConcern:e.writeConcern,timeoutMS:s}).then(function(){e.gridFSFile=u,r()},function(n){return t(e,n,r)});return}process.nextTick(r)};var u=function e(e){return w.apply(this,arguments)};var i=function e(e,t,r,n,o,u,i){var s={_id:e,length:t,chunkSize:r,uploadDate:new Date,filename:n};return o&&(s.contentType=o),u&&(s.aliases=u),i&&(s.metadata=i),s};var s=function e(e,n,u,i){if(l(e,i))return;var s=Buffer.isBuffer(n)?n:Buffer.from(n,u);if(e.length+=s.length,e.pos+s.length<e.chunkSizeBytes){s.copy(e.bufToStore,e.pos),e.pos+=s.length,process.nextTick(i);return}var a=s.length,c=e.chunkSizeBytes-e.pos,d=Math.min(c,s.length),f=0;for(;a>0;){var h=s.length-a;s.copy(e.bufToStore,e.pos,h,h+d),e.pos+=d,c-=d;var v=void 0;if(c===0){var p,m;v=r(e.id,e.n,Buffer.from(e.bufToStore));var y=(p=e.timeoutContext)===null||p===void 0?void 0:p.remainingTimeMS;if(y!=null&&y<=0)return t(e,new E.MongoOperationTimeoutError("Upload timed out after ".concat((m=e.timeoutContext)===null||m===void 0?void 0:m.timeoutMS,"ms")),i);if(++e.state.outstandingRequests,++f,l(e,i))return;e.chunks.insertOne(v,{writeConcern:e.writeConcern,timeoutMS:y}).then(function(){--e.state.outstandingRequests,--f,f||o(e,i)},function(r){return t(e,r,i)}),c=e.chunkSizeBytes,e.pos=0,++e.n}a-=d,d=Math.min(c,a)}};var c=function e(e,n){var u,i;if(e.pos===0)return o(e,n);var s=Buffer.alloc(e.pos);e.bufToStore.copy(s,0,0,e.pos);var a=r(e.id,e.n,s);if(l(e,n))return;var c=(u=e.timeoutContext)===null||u===void 0?void 0:u.remainingTimeMS;if(c!=null&&c<=0)return t(e,new E.MongoOperationTimeoutError("Upload timed out after ".concat((i=e.timeoutContext)===null||i===void 0?void 0:i.timeoutMS,"ms")),n);++e.state.outstandingRequests,e.chunks.insertOne(a,{writeConcern:e.writeConcern,timeoutMS:c}).then(function(){--e.state.outstandingRequests,o(e,n)},function(r){return t(e,r,n)})};var l=function e(e,t){return e.state.aborted?(process.nextTick(t,new E.MongoAPIError("Stream has been aborted")),!0):!1};ei();Object.defineProperty(e,"__esModule",{value:!0});e.GridFSBucketWriteStream=void 0;var h=Z("stream"),v=ea(),m=r0(),E=ec(),y=eA(),g=eg(),S=ey(),b=/*#__PURE__*/function(e){A(r,e);function r(e,t,n){f(this,r);var o;o=d(this,r),o.gridFSFile=null,n=n!==null&&n!==void 0?n:{},o.bucket=e,o.chunks=e.s._chunksCollection,o.filename=t,o.files=e.s._filesCollection,o.options=n,o.writeConcern=S.WriteConcern.fromOptions(n)||e.s.options.writeConcern,o.done=!1,o.id=n.id?n.id:new v.ObjectId,o.chunkSizeBytes=n.chunkSizeBytes||o.bucket.s.options.chunkSizeBytes,o.bufToStore=Buffer.alloc(o.chunkSizeBytes),o.length=0,o.n=0,o.pos=0,o.state={streamEnd:!1,outstandingRequests:0,errored:!1,aborted:!1},n.timeoutMS!=null&&(o.timeoutContext=new y.CSOTTimeoutContext({timeoutMS:n.timeoutMS,serverSelectionTimeoutMS:(0,g.resolveTimeoutOptions)(o.bucket.s.db.client,{}).serverSelectionTimeoutMS}));return o}p(r,[{key:"_construct",value:function e(e){var r=this;if(!this.bucket.s.calledOpenUploadStream)this.bucket.s.calledOpenUploadStream=!0,u(this).then(function(){r.bucket.s.checkedIndexes=!0,r.bucket.emit("index"),e()},function(n){if(C(n,E.MongoOperationTimeoutError))return t(r,n,e);(0,g.squashError)(n),e()});else return process.nextTick(e)}},{key:"_write",value:function e(e,t,r){s(this,e,t,r)}},{key:"_final",value:function e(e){if(this.state.streamEnd)return process.nextTick(e);this.state.streamEnd=!0,c(this,e)}},{key:"abort",value:function e(){var e=this;return a(function(){var t,r,n;return H(this,function(o){switch(o.label){case 0:if(e.state.streamEnd)throw new E.MongoAPIError("Cannot abort a stream that has already completed");if(e.state.aborted)throw new E.MongoAPIError("Cannot call abort() on a stream twice");e.state.aborted=!0;n=(r=e.timeoutContext)===null||r===void 0?void 0:r.getRemainingTimeMSOrThrow("Upload timed out after ".concat((t=e.timeoutContext)===null||t===void 0?void 0:t.timeoutMS,"ms"));return[4,e.chunks.deleteMany({files_id:e.id},{timeoutMS:n})];case 1:o.sent();return[2]}})})()}}]);return r}(h.Writable);e.GridFSBucketWriteStream=b;function O(){O=a(function(e){var t,r,n,o,u,i,s,a,c;return H(this,function(l){switch(l.label){case 0:u={files_id:1,n:1};i=(r=e.timeoutContext)===null||r===void 0?void 0:r.getRemainingTimeMSOrThrow("Upload timed out after ".concat((t=e.timeoutContext)===null||t===void 0?void 0:t.timeoutMS,"ms"));l.label=1;case 1:l.trys.push([1,3,,4]);return[4,e.chunks.listIndexes({timeoutMode:i!=null?m.CursorTimeoutMode.LIFETIME:void 0,timeoutMS:i}).toArray()];case 2:s=l.sent();return[3,4];case 3:a=l.sent();if(C(a,E.MongoError)&&a.code===E.MONGODB_ERROR_CODES.NamespaceNotFound)s=[];else throw a;return[3,4];case 4:c=!!s.find(function(e){return Object.keys(e.key).length===2&&e.key.files_id===1&&e.key.n===1});if(c)return[3,6];i=(o=e.timeoutContext)===null||o===void 0?void 0:o.getRemainingTimeMSOrThrow("Upload timed out after ".concat((n=e.timeoutContext)===null||n===void 0?void 0:n.timeoutMS,"ms"));return[4,e.chunks.createIndex(u,F(B({},e.writeConcern),{background:!0,unique:!0,timeoutMS:i}))];case 5:c=l.sent();l.label=6;case 6:c;return[2]}})});return O.apply(this,arguments)}function w(){w=a(function(e){var t,r,o,u,i,s,a,c,l,d,f,h;return H(this,function(v){switch(v.label){case 0:a=(r=e.timeoutContext)===null||r===void 0?void 0:r.getRemainingTimeMSOrThrow("Upload timed out after ".concat((t=e.timeoutContext)===null||t===void 0?void 0:t.timeoutMS,"ms"));return[4,e.files.findOne({},{projection:{_id:1},timeoutMS:a})];case 1:if(v.sent()!=null)return[2];c={filename:1,uploadDate:1};a=(u=e.timeoutContext)===null||u===void 0?void 0:u.getRemainingTimeMSOrThrow("Upload timed out after ".concat((o=e.timeoutContext)===null||o===void 0?void 0:o.timeoutMS,"ms"));d={timeoutMode:a!=null?m.CursorTimeoutMode.LIFETIME:void 0,timeoutMS:a};v.label=2;case 2:v.trys.push([2,4,,5]);return[4,e.files.listIndexes(d).toArray()];case 3:l=v.sent();return[3,5];case 4:f=v.sent();if(C(f,E.MongoError)&&f.code===E.MONGODB_ERROR_CODES.NamespaceNotFound)l=[];else throw f;return[3,5];case 5:h=!!l.find(function(e){return Object.keys(e.key).length===2&&e.key.filename===1&&e.key.uploadDate===1});if(h)return[3,7];a=(s=e.timeoutContext)===null||s===void 0?void 0:s.getRemainingTimeMSOrThrow("Upload timed out after ".concat((i=e.timeoutContext)===null||i===void 0?void 0:i.timeoutMS,"ms"));return[4,e.files.createIndex(c,{background:!1,timeoutMS:a})];case 6:h=v.sent();v.label=7;case 7:h;return[4,n(e)];case 8:v.sent();return[2]}})});return w.apply(this,arguments)}});var r5=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.GridFSBucket=void 0;var t=ec(),r=eO(),n=eA(),o=eg(),u=ey(),i=r7(),s=r8(),c={bucketName:"fs",chunkSizeBytes:255*1024},l=/*#__PURE__*/function(e){A(r,e);function r(e,t){f(this,r);var n;n=d(this,r),n.on("error",o.noop),n.setMaxListeners(0);var i=(0,o.resolveOptions)(e,F(B({},c,t),{writeConcern:u.WriteConcern.fromOptions(t)}));n.s={db:e,options:i,_chunksCollection:e.collection(i.bucketName+".chunks"),_filesCollection:e.collection(i.bucketName+".files"),checkedIndexes:!1,calledOpenUploadStream:!1};return n}p(r,[{key:"openUploadStream",value:function e(e,t){return new s.GridFSBucketWriteStream(this,e,B({timeoutMS:this.s.options.timeoutMS},t))}},{key:"openUploadStreamWithId",value:function e(e,t,r){return new s.GridFSBucketWriteStream(this,t,F(B({timeoutMS:this.s.options.timeoutMS},r),{id:e}))}},{key:"openDownloadStream",value:function e(e,t){return new i.GridFSBucketReadStream(this.s._chunksCollection,this.s._filesCollection,this.s.options.readPreference,{_id:e},B({timeoutMS:this.s.options.timeoutMS},t))}},{key:"delete",value:function e(e,r){var u=this;return a(function(){var i,s,a,c,l,d;return H(this,function(f){switch(f.label){case 0:i=(0,o.resolveOptions)(u.s.db,r),s=i.timeoutMS;s&&(a=new n.CSOTTimeoutContext({timeoutMS:s,serverSelectionTimeoutMS:u.s.db.client.s.options.serverSelectionTimeoutMS}));return[4,u.s._filesCollection.deleteOne({_id:e},{timeoutMS:a===null||a===void 0?void 0:a.remainingTimeMS})];case 1:c=f.sent(),l=c.deletedCount,d=a===null||a===void 0?void 0:a.remainingTimeMS;if(d!=null&&d<=0)throw new t.MongoOperationTimeoutError("Timed out after ".concat(s,"ms"));return[4,u.s._chunksCollection.deleteMany({files_id:e},{timeoutMS:d})];case 2:if(f.sent(),l===0)throw new t.MongoRuntimeError("File not found for id ".concat(e));return[2]}})})()}},{key:"find",value:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.s._filesCollection.find(e,t)}},{key:"openDownloadStreamByName",value:function e(e,t){var r={uploadDate:-1},n;return t&&t.revision!=null&&(t.revision>=0?(r={uploadDate:1},n=t.revision):n=-t.revision-1),new i.GridFSBucketReadStream(this.s._chunksCollection,this.s._filesCollection,this.s.options.readPreference,{filename:e},F(B({timeoutMS:this.s.options.timeoutMS},t),{sort:r,skip:n}))}},{key:"rename",value:function e(e,r,n){var o=this;return a(function(){var u,i,s,a;return H(this,function(c){switch(c.label){case 0:u={_id:e},i={$set:{filename:r}};return[4,o.s._filesCollection.updateOne(u,i,n)];case 1:s=c.sent(),a=s.matchedCount;if(a===0)throw new t.MongoRuntimeError("File with id ".concat(e," not found"));return[2]}})})()}},{key:"drop",value:function e(e){var t=this;return a(function(){var r,u,i,s;return H(this,function(a){switch(a.label){case 0:r=(0,o.resolveOptions)(t.s.db,e),u=r.timeoutMS;if(!(u&&(i=new n.CSOTTimeoutContext({timeoutMS:u,serverSelectionTimeoutMS:t.s.db.client.s.options.serverSelectionTimeoutMS})),i))return[3,3];return[4,t.s._filesCollection.drop({timeoutMS:i.remainingTimeMS})];case 1:a.sent();s=i.getRemainingTimeMSOrThrow("Timed out after ".concat(u,"ms"));return[4,t.s._chunksCollection.drop({timeoutMS:s})];case 2:a.sent();return[3,6];case 3:return[4,t.s._filesCollection.drop()];case 4:a.sent();return[4,t.s._chunksCollection.drop()];case 5:a.sent();a.label=6;case 6:return[2]}})})()}}]);return r}(r.TypedEventEmitter);e.GridFSBucket=l;l.INDEX="index"});var ne=et(function(e){"use strict";ei();Object.defineProperty(e,"__esModule",{value:!0});e.MongoServerError=e.MongoServerClosedError=e.MongoRuntimeError=e.MongoParseError=e.MongoOperationTimeoutError=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.MongoClientBulkWriteExecutionError=e.MongoClientBulkWriteError=e.MongoClientBulkWriteCursorError=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.CommandStartedEvent=e.CommandFailedEvent=e.WriteConcern=e.ReadPreference=e.ReadConcern=e.TopologyType=e.ServerType=e.ReadPreferenceMode=e.ReadConcernLevel=e.ProfilingLevel=e.ReturnDocument=e.SeverityLevel=e.MongoLoggableComponent=e.ServerApiVersion=e.ExplainVerbosity=e.MongoErrorLabel=e.CursorTimeoutMode=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.ExplainableCursor=e.Db=e.Collection=e.ClientSession=e.ChangeStream=e.CancellationToken=e.AggregationCursor=e.Admin=e.AbstractCursor=e.configureExplicitResourceManagement=e.MongoWriteConcernError=e.MongoUnexpectedServerResponseError=e.MongoTransactionError=e.MongoTopologyClosedError=e.MongoTailableCursorError=e.MongoSystemError=e.MongoStalePrimaryError=e.MongoServerSelectionError=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=e.ConnectionPoolCreatedEvent=e.ConnectionPoolClosedEvent=e.ConnectionPoolClearedEvent=e.ConnectionCreatedEvent=e.ConnectionClosedEvent=e.ConnectionCheckOutStartedEvent=e.ConnectionCheckOutFailedEvent=e.ConnectionCheckedOutEvent=e.ConnectionCheckedInEvent=e.CommandSucceededEvent=void 0;var t=r9();Object.defineProperty(e,"Admin",{enumerable:!0,get:function e(){return t.Admin}});var r=eR();Object.defineProperty(e,"OrderedBulkOperation",{enumerable:!0,get:function e(){return r.OrderedBulkOperation}});var n=ek();Object.defineProperty(e,"UnorderedBulkOperation",{enumerable:!0,get:function e(){return n.UnorderedBulkOperation}});var o=tr();Object.defineProperty(e,"ChangeStream",{enumerable:!0,get:function e(){return o.ChangeStream}});var u=eZ();Object.defineProperty(e,"Collection",{enumerable:!0,get:function e(){return u.Collection}});var i=r0();Object.defineProperty(e,"AbstractCursor",{enumerable:!0,get:function e(){return i.AbstractCursor}});var s=eN();Object.defineProperty(e,"AggregationCursor",{enumerable:!0,get:function e(){return s.AggregationCursor}});var a=eU();Object.defineProperty(e,"FindCursor",{enumerable:!0,get:function e(){return a.FindCursor}});var c=e2();Object.defineProperty(e,"ListCollectionsCursor",{enumerable:!0,get:function e(){return c.ListCollectionsCursor}});var l=ez();Object.defineProperty(e,"ListIndexesCursor",{enumerable:!0,get:function e(){return l.ListIndexesCursor}});var d=tt();Object.defineProperty(e,"Db",{enumerable:!0,get:function e(){return d.Db}});var f=r2();Object.defineProperty(e,"ExplainableCursor",{enumerable:!0,get:function e(){return f.ExplainableCursor}});var h=r5();Object.defineProperty(e,"GridFSBucket",{enumerable:!0,get:function e(){return h.GridFSBucket}});var v=r7();Object.defineProperty(e,"GridFSBucketReadStream",{enumerable:!0,get:function e(){return v.GridFSBucketReadStream}});var p=r8();Object.defineProperty(e,"GridFSBucketWriteStream",{enumerable:!0,get:function e(){return p.GridFSBucketWriteStream}});var m=rZ();Object.defineProperty(e,"MongoClient",{enumerable:!0,get:function e(){return m.MongoClient}});var E=eO();Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:function e(){return E.CancellationToken}});var y=rc();Object.defineProperty(e,"ClientSession",{enumerable:!0,get:function e(){return y.ClientSession}});var g=ea();Object.defineProperty(e,"BSON",{enumerable:!0,get:function e(){return g.BSON}});var A=ea();Object.defineProperty(e,"Binary",{enumerable:!0,get:function e(){return A.Binary}});Object.defineProperty(e,"BSONRegExp",{enumerable:!0,get:function e(){return A.BSONRegExp}});Object.defineProperty(e,"BSONSymbol",{enumerable:!0,get:function e(){return A.BSONSymbol}});Object.defineProperty(e,"BSONType",{enumerable:!0,get:function e(){return A.BSONType}});Object.defineProperty(e,"Code",{enumerable:!0,get:function e(){return A.Code}});Object.defineProperty(e,"DBRef",{enumerable:!0,get:function e(){return A.DBRef}});Object.defineProperty(e,"Decimal128",{enumerable:!0,get:function e(){return A.Decimal128}});Object.defineProperty(e,"Double",{enumerable:!0,get:function e(){return A.Double}});Object.defineProperty(e,"Int32",{enumerable:!0,get:function e(){return A.Int32}});Object.defineProperty(e,"Long",{enumerable:!0,get:function e(){return A.Long}});Object.defineProperty(e,"MaxKey",{enumerable:!0,get:function e(){return A.MaxKey}});Object.defineProperty(e,"MinKey",{enumerable:!0,get:function e(){return A.MinKey}});Object.defineProperty(e,"ObjectId",{enumerable:!0,get:function e(){return A.ObjectId}});Object.defineProperty(e,"Timestamp",{enumerable:!0,get:function e(){return A.Timestamp}});Object.defineProperty(e,"UUID",{enumerable:!0,get:function e(){return A.UUID}});var C=eM();Object.defineProperty(e,"MongoBulkWriteError",{enumerable:!0,get:function e(){return C.MongoBulkWriteError}});var S=re();Object.defineProperty(e,"ClientEncryption",{enumerable:!0,get:function e(){return S.ClientEncryption}});var b=e1();Object.defineProperty(e,"ChangeStreamCursor",{enumerable:!0,get:function e(){return b.ChangeStreamCursor}});var O=ec();Object.defineProperty(e,"MongoAPIError",{enumerable:!0,get:function e(){return O.MongoAPIError}});Object.defineProperty(e,"MongoAWSError",{enumerable:!0,get:function e(){return O.MongoAWSError}});Object.defineProperty(e,"MongoAzureError",{enumerable:!0,get:function e(){return O.MongoAzureError}});Object.defineProperty(e,"MongoBatchReExecutionError",{enumerable:!0,get:function e(){return O.MongoBatchReExecutionError}});Object.defineProperty(e,"MongoChangeStreamError",{enumerable:!0,get:function e(){return O.MongoChangeStreamError}});Object.defineProperty(e,"MongoClientBulkWriteCursorError",{enumerable:!0,get:function e(){return O.MongoClientBulkWriteCursorError}});Object.defineProperty(e,"MongoClientBulkWriteError",{enumerable:!0,get:function e(){return O.MongoClientBulkWriteError}});Object.defineProperty(e,"MongoClientBulkWriteExecutionError",{enumerable:!0,get:function e(){return O.MongoClientBulkWriteExecutionError}});Object.defineProperty(e,"MongoCompatibilityError",{enumerable:!0,get:function e(){return O.MongoCompatibilityError}});Object.defineProperty(e,"MongoCursorExhaustedError",{enumerable:!0,get:function e(){return O.MongoCursorExhaustedError}});Object.defineProperty(e,"MongoCursorInUseError",{enumerable:!0,get:function e(){return O.MongoCursorInUseError}});Object.defineProperty(e,"MongoDecompressionError",{enumerable:!0,get:function e(){return O.MongoDecompressionError}});Object.defineProperty(e,"MongoDriverError",{enumerable:!0,get:function e(){return O.MongoDriverError}});Object.defineProperty(e,"MongoError",{enumerable:!0,get:function e(){return O.MongoError}});Object.defineProperty(e,"MongoExpiredSessionError",{enumerable:!0,get:function e(){return O.MongoExpiredSessionError}});Object.defineProperty(e,"MongoGCPError",{enumerable:!0,get:function e(){return O.MongoGCPError}});Object.defineProperty(e,"MongoGridFSChunkError",{enumerable:!0,get:function e(){return O.MongoGridFSChunkError}});Object.defineProperty(e,"MongoGridFSStreamError",{enumerable:!0,get:function e(){return O.MongoGridFSStreamError}});Object.defineProperty(e,"MongoInvalidArgumentError",{enumerable:!0,get:function e(){return O.MongoInvalidArgumentError}});Object.defineProperty(e,"MongoKerberosError",{enumerable:!0,get:function e(){return O.MongoKerberosError}});Object.defineProperty(e,"MongoMissingCredentialsError",{enumerable:!0,get:function e(){return O.MongoMissingCredentialsError}});Object.defineProperty(e,"MongoMissingDependencyError",{enumerable:!0,get:function e(){return O.MongoMissingDependencyError}});Object.defineProperty(e,"MongoNetworkError",{enumerable:!0,get:function e(){return O.MongoNetworkError}});Object.defineProperty(e,"MongoNetworkTimeoutError",{enumerable:!0,get:function e(){return O.MongoNetworkTimeoutError}});Object.defineProperty(e,"MongoNotConnectedError",{enumerable:!0,get:function e(){return O.MongoNotConnectedError}});Object.defineProperty(e,"MongoOIDCError",{enumerable:!0,get:function e(){return O.MongoOIDCError}});Object.defineProperty(e,"MongoOperationTimeoutError",{enumerable:!0,get:function e(){return O.MongoOperationTimeoutError}});Object.defineProperty(e,"MongoParseError",{enumerable:!0,get:function e(){return O.MongoParseError}});Object.defineProperty(e,"MongoRuntimeError",{enumerable:!0,get:function e(){return O.MongoRuntimeError}});Object.defineProperty(e,"MongoServerClosedError",{enumerable:!0,get:function e(){return O.MongoServerClosedError}});Object.defineProperty(e,"MongoServerError",{enumerable:!0,get:function e(){return O.MongoServerError}});Object.defineProperty(e,"MongoServerSelectionError",{enumerable:!0,get:function e(){return O.MongoServerSelectionError}});Object.defineProperty(e,"MongoStalePrimaryError",{enumerable:!0,get:function e(){return O.MongoStalePrimaryError}});Object.defineProperty(e,"MongoSystemError",{enumerable:!0,get:function e(){return O.MongoSystemError}});Object.defineProperty(e,"MongoTailableCursorError",{enumerable:!0,get:function e(){return O.MongoTailableCursorError}});Object.defineProperty(e,"MongoTopologyClosedError",{enumerable:!0,get:function e(){return O.MongoTopologyClosedError}});Object.defineProperty(e,"MongoTransactionError",{enumerable:!0,get:function e(){return O.MongoTransactionError}});Object.defineProperty(e,"MongoUnexpectedServerResponseError",{enumerable:!0,get:function e(){return O.MongoUnexpectedServerResponseError}});Object.defineProperty(e,"MongoWriteConcernError",{enumerable:!0,get:function e(){return O.MongoWriteConcernError}});var w=r1();Object.defineProperty(e,"configureExplicitResourceManagement",{enumerable:!0,get:function e(){return w.configureExplicitResourceManagement}});var _=eM();Object.defineProperty(e,"BatchType",{enumerable:!0,get:function e(){return _.BatchType}});var D=rr();Object.defineProperty(e,"AutoEncryptionLoggerLevel",{enumerable:!0,get:function e(){return D.AutoEncryptionLoggerLevel}});var B=tu();Object.defineProperty(e,"GSSAPICanonicalizationValue",{enumerable:!0,get:function e(){return B.GSSAPICanonicalizationValue}});var T=ti();Object.defineProperty(e,"AuthMechanism",{enumerable:!0,get:function e(){return T.AuthMechanism}});var F=t0();Object.defineProperty(e,"Compressor",{enumerable:!0,get:function e(){return F.Compressor}});var M=r0();Object.defineProperty(e,"CURSOR_FLAGS",{enumerable:!0,get:function e(){return M.CURSOR_FLAGS}});Object.defineProperty(e,"CursorTimeoutMode",{enumerable:!0,get:function e(){return M.CursorTimeoutMode}});var R=ec();Object.defineProperty(e,"MongoErrorLabel",{enumerable:!0,get:function e(){return R.MongoErrorLabel}});var k=r2();Object.defineProperty(e,"ExplainVerbosity",{enumerable:!0,get:function e(){return k.ExplainVerbosity}});var I=rZ();Object.defineProperty(e,"ServerApiVersion",{enumerable:!0,get:function e(){return I.ServerApiVersion}});var N=eb();Object.defineProperty(e,"MongoLoggableComponent",{enumerable:!0,get:function e(){return N.MongoLoggableComponent}});Object.defineProperty(e,"SeverityLevel",{enumerable:!0,get:function e(){return N.SeverityLevel}});var P=eq();Object.defineProperty(e,"ReturnDocument",{enumerable:!0,get:function e(){return P.ReturnDocument}});var x=e5();Object.defineProperty(e,"ProfilingLevel",{enumerable:!0,get:function e(){return x.ProfilingLevel}});var L=ep();Object.defineProperty(e,"ReadConcernLevel",{enumerable:!0,get:function e(){return L.ReadConcernLevel}});var U=el();Object.defineProperty(e,"ReadPreferenceMode",{enumerable:!0,get:function e(){return U.ReadPreferenceMode}});var j=ed();Object.defineProperty(e,"ServerType",{enumerable:!0,get:function e(){return j.ServerType}});Object.defineProperty(e,"TopologyType",{enumerable:!0,get:function e(){return j.TopologyType}});var z=ep();Object.defineProperty(e,"ReadConcern",{enumerable:!0,get:function e(){return z.ReadConcern}});var W=el();Object.defineProperty(e,"ReadPreference",{enumerable:!0,get:function e(){return W.ReadPreference}});var V=ey();Object.defineProperty(e,"WriteConcern",{enumerable:!0,get:function e(){return V.WriteConcern}});var G=rl();Object.defineProperty(e,"CommandFailedEvent",{enumerable:!0,get:function e(){return G.CommandFailedEvent}});Object.defineProperty(e,"CommandStartedEvent",{enumerable:!0,get:function e(){return G.CommandStartedEvent}});Object.defineProperty(e,"CommandSucceededEvent",{enumerable:!0,get:function e(){return G.CommandSucceededEvent}});var H=rm();Object.defineProperty(e,"ConnectionCheckedInEvent",{enumerable:!0,get:function e(){return H.ConnectionCheckedInEvent}});Object.defineProperty(e,"ConnectionCheckedOutEvent",{enumerable:!0,get:function e(){return H.ConnectionCheckedOutEvent}});Object.defineProperty(e,"ConnectionCheckOutFailedEvent",{enumerable:!0,get:function e(){return H.ConnectionCheckOutFailedEvent}});Object.defineProperty(e,"ConnectionCheckOutStartedEvent",{enumerable:!0,get:function e(){return H.ConnectionCheckOutStartedEvent}});Object.defineProperty(e,"ConnectionClosedEvent",{enumerable:!0,get:function e(){return H.ConnectionClosedEvent}});Object.defineProperty(e,"ConnectionCreatedEvent",{enumerable:!0,get:function e(){return H.ConnectionCreatedEvent}});Object.defineProperty(e,"ConnectionPoolClearedEvent",{enumerable:!0,get:function e(){return H.ConnectionPoolClearedEvent}});Object.defineProperty(e,"ConnectionPoolClosedEvent",{enumerable:!0,get:function e(){return H.ConnectionPoolClosedEvent}});Object.defineProperty(e,"ConnectionPoolCreatedEvent",{enumerable:!0,get:function e(){return H.ConnectionPoolCreatedEvent}});Object.defineProperty(e,"ConnectionPoolMonitoringEvent",{enumerable:!0,get:function e(){return H.ConnectionPoolMonitoringEvent}});Object.defineProperty(e,"ConnectionPoolReadyEvent",{enumerable:!0,get:function e(){return H.ConnectionPoolReadyEvent}});Object.defineProperty(e,"ConnectionReadyEvent",{enumerable:!0,get:function e(){return H.ConnectionReadyEvent}});var q=rp();Object.defineProperty(e,"ServerClosedEvent",{enumerable:!0,get:function e(){return q.ServerClosedEvent}});Object.defineProperty(e,"ServerDescriptionChangedEvent",{enumerable:!0,get:function e(){return q.ServerDescriptionChangedEvent}});Object.defineProperty(e,"ServerHeartbeatFailedEvent",{enumerable:!0,get:function e(){return q.ServerHeartbeatFailedEvent}});Object.defineProperty(e,"ServerHeartbeatStartedEvent",{enumerable:!0,get:function e(){return q.ServerHeartbeatStartedEvent}});Object.defineProperty(e,"ServerHeartbeatSucceededEvent",{enumerable:!0,get:function e(){return q.ServerHeartbeatSucceededEvent}});Object.defineProperty(e,"ServerOpeningEvent",{enumerable:!0,get:function e(){return q.ServerOpeningEvent}});Object.defineProperty(e,"TopologyClosedEvent",{enumerable:!0,get:function e(){return q.TopologyClosedEvent}});Object.defineProperty(e,"TopologyDescriptionChangedEvent",{enumerable:!0,get:function e(){return q.TopologyDescriptionChangedEvent}});Object.defineProperty(e,"TopologyOpeningEvent",{enumerable:!0,get:function e(){return q.TopologyOpeningEvent}});var K=rJ();Object.defineProperty(e,"ServerSelectionEvent",{enumerable:!0,get:function e(){return K.ServerSelectionEvent}});Object.defineProperty(e,"ServerSelectionFailedEvent",{enumerable:!0,get:function e(){return K.ServerSelectionFailedEvent}});Object.defineProperty(e,"ServerSelectionStartedEvent",{enumerable:!0,get:function e(){return K.ServerSelectionStartedEvent}});Object.defineProperty(e,"ServerSelectionSucceededEvent",{enumerable:!0,get:function e(){return K.ServerSelectionSucceededEvent}});Object.defineProperty(e,"WaitingForSuitableServerEvent",{enumerable:!0,get:function e(){return K.WaitingForSuitableServerEvent}});var Y=rX();Object.defineProperty(e,"SrvPollingEvent",{enumerable:!0,get:function e(){return Y.SrvPollingEvent}});var $=t3();Object.defineProperty(e,"MongoCryptAzureKMSRequestError",{enumerable:!0,get:function e(){return $.MongoCryptAzureKMSRequestError}});Object.defineProperty(e,"MongoCryptCreateDataKeyError",{enumerable:!0,get:function e(){return $.MongoCryptCreateDataKeyError}});Object.defineProperty(e,"MongoCryptCreateEncryptedCollectionError",{enumerable:!0,get:function e(){return $.MongoCryptCreateEncryptedCollectionError}});Object.defineProperty(e,"MongoCryptError",{enumerable:!0,get:function e(){return $.MongoCryptError}});Object.defineProperty(e,"MongoCryptInvalidArgumentError",{enumerable:!0,get:function e(){return $.MongoCryptInvalidArgumentError}});Object.defineProperty(e,"MongoCryptKMSRequestNetworkTimeoutError",{enumerable:!0,get:function e(){return $.MongoCryptKMSRequestNetworkTimeoutError}});var J=rV();Object.defineProperty(e,"MongoClientAuthProviders",{enumerable:!0,get:function e(){return J.MongoClientAuthProviders}})});ei();ei();ei();ei();var nt=function(e){return e.Error="error",e.Warning="warning",e}(nt||{});ei();ei();ei();ei();ei();var nr=eo(ne(),1);import{Document as nn,Model as no}from"mongoose";var nu=/*#__PURE__*/function(e){"use strict";A(t,e);function t(){f(this,t);return d(this,t,arguments)}return t}(nr.Db),ni=/*#__PURE__*/function(e){"use strict";A(t,e);function t(){f(this,t);return d(this,t,arguments)}return t}(nn),ns=/*#__PURE__*/function(e){"use strict";A(t,e);function t(){f(this,t);return d(this,t,arguments)}return t}(no),na=/*#__PURE__*/function(e){"use strict";A(t,e);function t(){f(this,t);return d(this,t,arguments)}return t}(nr.Collection);ei();ei();ei();ei();export{na as C_Collection,nu as C_Db,ni as C_Document,ns as C_Model,nt as E_ErrorType};
|
|
1
|
+
// src/typescript/command.ts
|
|
2
|
+
function _assert_this_initialized(self) {
|
|
3
|
+
if (self === void 0) {
|
|
4
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
5
|
+
}
|
|
6
|
+
return self;
|
|
7
|
+
}
|
|
8
|
+
function _call_super(_this, derived, args) {
|
|
9
|
+
derived = _get_prototype_of(derived);
|
|
10
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
11
|
+
}
|
|
12
|
+
function _class_call_check(instance, Constructor) {
|
|
13
|
+
if (!(instance instanceof Constructor)) {
|
|
14
|
+
throw new TypeError("Cannot call a class as a function");
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function _construct(Parent, args, Class) {
|
|
18
|
+
if (_is_native_reflect_construct()) {
|
|
19
|
+
_construct = Reflect.construct;
|
|
20
|
+
} else {
|
|
21
|
+
_construct = function construct(Parent, args, Class) {
|
|
22
|
+
var a = [
|
|
23
|
+
null
|
|
24
|
+
];
|
|
25
|
+
a.push.apply(a, args);
|
|
26
|
+
var Constructor = Function.bind.apply(Parent, a);
|
|
27
|
+
var instance = new Constructor();
|
|
28
|
+
if (Class) _set_prototype_of(instance, Class.prototype);
|
|
29
|
+
return instance;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
return _construct.apply(null, arguments);
|
|
33
|
+
}
|
|
34
|
+
function _get_prototype_of(o) {
|
|
35
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
36
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
37
|
+
};
|
|
38
|
+
return _get_prototype_of(o);
|
|
39
|
+
}
|
|
40
|
+
function _inherits(subClass, superClass) {
|
|
41
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
42
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
43
|
+
}
|
|
44
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
45
|
+
constructor: {
|
|
46
|
+
value: subClass,
|
|
47
|
+
writable: true,
|
|
48
|
+
configurable: true
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
52
|
+
}
|
|
53
|
+
function _is_native_function(fn) {
|
|
54
|
+
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
55
|
+
}
|
|
56
|
+
function _possible_constructor_return(self, call) {
|
|
57
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
58
|
+
return call;
|
|
59
|
+
}
|
|
60
|
+
return _assert_this_initialized(self);
|
|
61
|
+
}
|
|
62
|
+
function _set_prototype_of(o, p) {
|
|
63
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
64
|
+
o.__proto__ = p;
|
|
65
|
+
return o;
|
|
66
|
+
};
|
|
67
|
+
return _set_prototype_of(o, p);
|
|
68
|
+
}
|
|
69
|
+
function _type_of(obj) {
|
|
70
|
+
"@swc/helpers - typeof";
|
|
71
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
72
|
+
}
|
|
73
|
+
function _wrap_native_super(Class) {
|
|
74
|
+
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
75
|
+
_wrap_native_super = function wrapNativeSuper(Class) {
|
|
76
|
+
if (Class === null || !_is_native_function(Class)) return Class;
|
|
77
|
+
if (typeof Class !== "function") {
|
|
78
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
79
|
+
}
|
|
80
|
+
if (typeof _cache !== "undefined") {
|
|
81
|
+
if (_cache.has(Class)) return _cache.get(Class);
|
|
82
|
+
_cache.set(Class, Wrapper);
|
|
83
|
+
}
|
|
84
|
+
function Wrapper() {
|
|
85
|
+
return _construct(Class, arguments, _get_prototype_of(this).constructor);
|
|
86
|
+
}
|
|
87
|
+
Wrapper.prototype = Object.create(Class.prototype, {
|
|
88
|
+
constructor: {
|
|
89
|
+
value: Wrapper,
|
|
90
|
+
enumerable: false,
|
|
91
|
+
writable: true,
|
|
92
|
+
configurable: true
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
return _set_prototype_of(Wrapper, Class);
|
|
96
|
+
};
|
|
97
|
+
return _wrap_native_super(Class);
|
|
98
|
+
}
|
|
99
|
+
function _is_native_reflect_construct() {
|
|
100
|
+
try {
|
|
101
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
102
|
+
} catch (_) {}
|
|
103
|
+
return (_is_native_reflect_construct = function() {
|
|
104
|
+
return !!result;
|
|
105
|
+
})();
|
|
106
|
+
}
|
|
107
|
+
var E_ErrorType = /* @__PURE__ */ function(E_ErrorType2) {
|
|
108
|
+
E_ErrorType2["Error"] = "error";
|
|
109
|
+
E_ErrorType2["Warning"] = "warning";
|
|
110
|
+
return E_ErrorType2;
|
|
111
|
+
}(E_ErrorType || {});
|
|
112
|
+
// src/typescript/mongo.ts
|
|
113
|
+
import { Collection, Db } from "mongodb";
|
|
114
|
+
import { Document, Model } from "mongoose";
|
|
115
|
+
var C_Db = /*#__PURE__*/ function(Db) {
|
|
116
|
+
"use strict";
|
|
117
|
+
_inherits(C_Db, Db);
|
|
118
|
+
function C_Db() {
|
|
119
|
+
_class_call_check(this, C_Db);
|
|
120
|
+
return _call_super(this, C_Db, arguments);
|
|
121
|
+
}
|
|
122
|
+
return C_Db;
|
|
123
|
+
}(Db);
|
|
124
|
+
var C_Document = /*#__PURE__*/ function(Document) {
|
|
125
|
+
"use strict";
|
|
126
|
+
_inherits(C_Document, Document);
|
|
127
|
+
function C_Document() {
|
|
128
|
+
_class_call_check(this, C_Document);
|
|
129
|
+
return _call_super(this, C_Document, arguments);
|
|
130
|
+
}
|
|
131
|
+
return C_Document;
|
|
132
|
+
}(_wrap_native_super(Document));
|
|
133
|
+
var C_Model = /*#__PURE__*/ function(Model) {
|
|
134
|
+
"use strict";
|
|
135
|
+
_inherits(C_Model, Model);
|
|
136
|
+
function C_Model() {
|
|
137
|
+
_class_call_check(this, C_Model);
|
|
138
|
+
return _call_super(this, C_Model, arguments);
|
|
139
|
+
}
|
|
140
|
+
return C_Model;
|
|
141
|
+
}(Model);
|
|
142
|
+
var C_Collection = /*#__PURE__*/ function(Collection) {
|
|
143
|
+
"use strict";
|
|
144
|
+
_inherits(C_Collection, Collection);
|
|
145
|
+
function C_Collection() {
|
|
146
|
+
_class_call_check(this, C_Collection);
|
|
147
|
+
return _call_super(this, C_Collection, arguments);
|
|
148
|
+
}
|
|
149
|
+
return C_Collection;
|
|
150
|
+
}(Collection);
|
|
151
|
+
export { C_Collection, C_Db, C_Document, C_Model, E_ErrorType };
|