PageSourceSearch

https://app.transactency.com/assets/browser.umd-YwivngSI.js

js transactency.com collected 2026-10-04 03:55:00 UTC 934,650 bytes, 17,224 lines download raw bytes

1const transactencyInfo = {
2  supportEmail: "[email protected]"
3};
4const contractTypes = {
5  keys: {
6    NDA: "NDA",
7    SAFE: "SAFE",
8    SAAS: "SAAS",
9    CONSULTING: "CONSULTING"
10  },
11  values: {
12    NDA: "NDA",
13    SAFE: "SAFE",
14    SAAS: "SaaS",
15    CONSULTING: "Consulting"
16  }
17};
18const contractTypeTitles = {
19  NDA: "Confidentiality and Non-Disclosure Agreement",
20  SAFE: "Simple Agreement for Future Equity",
21  SAAS: "Software as a Service Agreement",
22  CONSULTING: "Consulting Services Agreement",
23  MSA: "Master Services Agreement",
24  "consulting-agreement": "Consulting Services Agreement",
25  "service-agreement": "Service Agreement"
26};
27const contractPartyRoles = {
28  values: {
29    INITIATOR: "INITIATOR",
30    RECEIVER: "RECEIVER"
31  }
32};
33const contractStatuses = {
34  values: {
35    DRAFTING: "DRAFTING",
36    RECEIVER_REVIEW: "RECEIVER_REVIEW",
37    INITIATOR_REVIEW: "INITIATOR_REVIEW",
38    RECEIVER_CANCELLED: "RECEIVER_CANCELLED",
39    INITIATOR_CANCELLED: "INITIATOR_CANCELLED",
40    SIGNATURE_REQUESTED: "SIGNATURE_REQUESTED",
41    PENDING_SIGNATURES: "PENDING_SIGNATURES",
42    RECEIVER_SIGNED: "RECEIVER_SIGNED",
43    INITIATOR_SIGNED: "INITIATOR_SIGNED",
44    EXECUTED: "EXECUTED",
45    EXPIRED: "EXPIRED"
46  }
47};
48const POST_SIGNATURE_CONTRACT_STATUSES = /* @__PURE__ */ new Set([
49  contractStatuses.values.PENDING_SIGNATURES,
50  contractStatuses.values.RECEIVER_SIGNED,
51  contractStatuses.values.INITIATOR_SIGNED,
52  contractStatuses.values.EXECUTED
53]);
54function isPostSignatureContractStatus(status) {
55  return !!status && POST_SIGNATURE_CONTRACT_STATUSES.has(status);
56}
57function formatContractStatusLabel(status) {
58  const statuses = contractStatuses.values;
59  if (status === statuses.RECEIVER_CANCELLED) {
60    return "Cancelled (Receiver)";
61  }
62  if (status === statuses.INITIATOR_CANCELLED) {
63    return "Cancelled (Initiator)";
64  }
65  return status.toLowerCase().replace(/_/g, " ").split(" ").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
66}
67const platformEventTypes = {
68  values: {
69    API_REQUEST: "API_REQUEST",
70    ERROR_OCCURRED: "ERROR_OCCURRED",
71    JOB_SESSION_CLEANUP: "JOB_SESSION_CLEANUP",
72    PASSWORD_CHANGED: "PASSWORD_CHANGED",
73    PASSWORD_RESET_REQUESTED: "PASSWORD_RESET_REQUESTED",
74    PERMISSION_DENIED: "PERMISSION_DENIED",
75    RATE_LIMIT_EXCEEDED: "RATE_LIMIT_EXCEEDED",
76    SESSION_EXPIRED: "SESSION_EXPIRED",
77    SESSION_TERMINATED: "SESSION_TERMINATED",
78    USER_DELETED: "USER_DELETED",
79    USER_SIGNED_IN: "USER_SIGNED_IN",
80    USER_SIGNED_OUT: "USER_SIGNED_OUT",
81    USER_SIGNED_UP: "USER_SIGNED_UP",
82    USER_UPDATED: "USER_UPDATED",
83    PLAYBOOK_TOUR_STARTED: "PLAYBOOK_TOUR_STARTED",
84    PLAYBOOK_TOUR_COMPLETED: "PLAYBOOK_TOUR_COMPLETED",
85    PLAYBOOK_TOUR_SKIPPED: "PLAYBOOK_TOUR_SKIPPED"
86  }
87};
88const contractPartyTypes = {
89  values: {
90    INDIVIDUAL: "INDIVIDUAL",
91    BUSINESS: "BUSINESS"
92  }
93};
94const businessEntities = {
95  values: {
96    corporation: "Corporation",
97    llc: "LLC",
98    partnership: "Partnership",
99    soleProprietor: "Sole Proprietor"
100  }
101};
102const countries = {
103  values: {
104    US: "United States",
105    CA: "Canada",
106    GB: "United Kingdom",
107    AU: "Australia",
108    DE: "Germany",
109    FR: "France",
110    IE: "Ireland",
111    NL: "Netherlands",
112    CH: "Switzerland",
113    SE: "Sweden",
114    NO: "Norway",
115    DK: "Denmark",
116    FI: "Finland",
117    ES: "Spain",
118    IT: "Italy",
119    BE: "Belgium",
120    AT: "Austria",
121    NZ: "New Zealand",
122    SG: "Singapore",
123    HK: "Hong Kong",
124    JP: "Japan",
125    IN: "India",
126    MX: "Mexico",
127    BR: "Brazil",
128    IL: "Israel",
129    AE: "United Arab Emirates",
130    OTHER: "Other"
131  }
132};
133const businessStates = {
134  values: {
135    alabama: "Alabama",
136    alaska: "Alaska",
137    arizona: "Arizona",
138    arkansas: "Arkansas",
139    california: "California",
140    colorado: "Colorado",
141    connecticut: "Connecticut",
142    delaware: "Delaware",
143    florida: "Florida",
144    georgia: "Georgia",
145    hawaii: "Hawaii",
146    idaho: "Idaho",
147    illinois: "Illinois",
148    indiana: "Indiana",
149    iowa: "Iowa",
150    kansas: "Kansas",
151    kentucky: "Kentucky",
152    louisiana: "Louisiana",
153    maine: "Maine",
154    maryland: "Maryland",
155    massachusetts: "Massachusetts",
156    michigan: "Michigan",
157    minnesota: "Minnesota",
158    mississippi: "Mississippi",
159    missouri: "Missouri",
160    montana: "Montana",
161    nebraska: "Nebraska",
162    nevada: "Nevada",
163    newHampshire: "New Hampshire",
164    newJersey: "New Jersey",
165    newMexico: "New Mexico",
166    newYork: "New York",
167    northCarolina: "North Carolina",
168    northDakota: "North Dakota",
169    ohio: "Ohio",
170    oklahoma: "Oklahoma",
171    oregon: "Oregon",
172    pennsylvania: "Pennsylvania",
173    rhodeIsland: "Rhode Island",
174    southCarolina: "South Carolina",
175    southDakota: "South Dakota",
176    tennessee: "Tennessee",
177    texas: "Texas",
178    utah: "Utah",
179    vermont: "Vermont",
180    virginia: "Virginia",
181    washington: "Washington",
182    westVirginia: "West Virginia",
183    wisconsin: "Wisconsin",
184    wyoming: "Wyoming"
185  }
186};
187function getAvailableVarsMembers() {
188  return [
189    {
190      name: "contractTypes",
191      label: "Contract Types",
192      values: contractTypes.values
193    },
194    {
195      name: "contractPartyRoles",
196      label: "Contract Party Roles",
197      values: contractPartyRoles.values
198    },
199    {
200      name: "contractStatuses",
201      label: "Contract Statuses",
202      values: contractStatuses.values
203    },
204    {
205      name: "platformEventTypes",
206      label: "Platform Event Types",
207      values: platformEventTypes.values
208    },
209    {
210      name: "contractPartyTypes",
211      label: "Contract Party Types",
212      values: contractPartyTypes.values
213    },
214    {
215      name: "businessEntities",
216      label: "Business Entities",
217      values: businessEntities.values
218    },
219    {
220      name: "businessStates",
221      label: "Business States",
222      values: businessStates.values
223    },
224    {
225      name: "countries",
226      label: "Countries",
227      values: countries.values
228    }
229  ];
230}
231function getVarsMemberValues(memberName) {
232  const members = getAvailableVarsMembers();
233  const member = members.find((m) => m.name === memberName);
234  return member ? member.values : null;
235}
236function getDefaultExportFromCjs(x) {
237  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
238}
239var browser_umd$1 = { exports: {} };
240/*! For license information please see browser.umd.js.LICENSE.txt */
241var browser_umd = browser_umd$1.exports;
242var hasRequiredBrowser_umd;
243function requireBrowser_umd() {
244  if (hasRequiredBrowser_umd) return browser_umd$1.exports;
245  hasRequiredBrowser_umd = 1;
246  (function(module, exports) {
247    !(function(t, e) {
248      module.exports = e();
249    })("undefined" != typeof self ? self : browser_umd, () => (() => {
250      var t = { 118: (t2) => {
251        t2.exports = function(t3) {
252          return t3 != t3;
253        };
254      }, 170: (t2, e2, r2) => {
255        function n(t3) {
256          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
257            return typeof t4;
258          } : function(t4) {
259            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
260          }, n(t3);
261        }
262        var o = r2(3609), i = r2(8995), s = r2(7768), a = r2(7236), u = /* @__PURE__ */ new Set(["$and", "$or"]), c = /* @__PURE__ */ new Set(["$cmp", "$eq", "$lt", "$lte", "$gt", "$gte"]), l = /* @__PURE__ */ new Set(["$multiply", "$divide", "$log", "$mod", "$trunc", "$avg", "$max", "$min", "$stdDevPop", "$stdDevSamp", "$sum"]), f = /* @__PURE__ */ new Set(["$abs", "$exp", "$ceil", "$floor", "$ln", "$log10", "$sqrt", "$sin", "$cos", "$tan", "$asin", "$acos", "$atan", "$atan2", "$asinh", "$acosh", "$atanh", "$sinh", "$cosh", "$tanh", "$degreesToRadians", "$radiansToDegrees"]), p = /* @__PURE__ */ new Set(["$arrayElemAt", "$first", "$last"]), h = /* @__PURE__ */ new Set(["$year", "$month", "$week", "$dayOfMonth", "$dayOfYear", "$hour", "$minute", "$second", "$isoDayOfWeek", "$isoWeekYear", "$isoWeek", "$millisecond"]), y = /* @__PURE__ */ new Set(["$not"]);
263        function d(t3, e3, r3) {
264          if (g(t3) || null === t3) return t3;
265          null != t3.$cond ? Array.isArray(t3.$cond) ? t3.$cond = t3.$cond.map(function(t4) {
266            return d(t4, e3, r3);
267          }) : (t3.$cond.if = d(t3.$cond.if, e3, r3), t3.$cond.then = d(t3.$cond.then, e3, r3), t3.$cond.else = d(t3.$cond.else, e3, r3)) : null != t3.$ifNull ? t3.$ifNull.map(function(t4) {
268            return d(t4, e3, r3);
269          }) : null != t3.$switch && (Array.isArray(t3.$switch.branches) && (t3.$switch.branches = t3.$switch.branches.map(function(t4) {
270            return d(t4, e3, r3);
271          })), "default" in t3.$switch && (t3.$switch.default = d(t3.$switch.default, e3, r3)));
272          for (var n2 = 0, s2 = Object.keys(t3); n2 < s2.length; n2++) {
273            var p2 = s2[n2];
274            u.has(p2) ? t3[p2] = t3[p2].map(function(t4) {
275              return d(t4, e3, r3);
276            }) : c.has(p2) ? t3[p2] = v(t3[p2], e3, r3) : l.has(p2) ? t3[p2] = m(t3[p2]) : f.has(p2) ? t3[p2] = b(t3[p2]) : y.has(p2) && (t3[p2] = d(t3[p2], e3, r3));
277          }
278          if (t3.$in && (t3.$in = (function(t4, e4, r4) {
279            var n3 = t4[1];
280            if (!g(n3)) return t4;
281            var o2 = t4[0], s3 = e4.path(n3.slice(1));
282            if (null !== s3) {
283              if (!s3.$isMongooseArray) throw new Error("Path must be an array for $in");
284              return [s3.$isMongooseDocumentArray ? s3.$embeddedSchemaType.cast(o2) : s3.caster.cast(o2), n3];
285            }
286            if (false === r4) return t4;
287            if ("throw" === r4) throw new i("$in");
288          })(t3.$in, e3, r3)), t3.$size && (t3.$size = b(t3.$size)), t3.$round) {
289            var h2 = t3.$round;
290            if (!Array.isArray(h2) || h2.length < 1 || h2.length > 2) throw new o("Array", h2, "$round");
291            t3.$round = h2.map(function(t4) {
292              return b(t4);
293            });
294          }
295          return a(t3), t3;
296        }
297        function b(t3) {
298          if (!_(t3)) return t3;
299          try {
300            return s(t3);
301          } catch (e3) {
302            throw new o("Number", t3);
303          }
304        }
305        function m(t3) {
306          if (!Array.isArray(t3)) {
307            if (!_(t3)) return t3;
308            try {
309              return s(t3);
310            } catch (e3) {
311              throw new o("Number", t3);
312            }
313          }
314          return t3.map(function(t4) {
315            if (!_(t4)) return t4;
316            try {
317              return s(t4);
318            } catch (e3) {
319              throw new o("Number", t4);
320            }
321          });
322        }
323        function v(t3, e3, r3) {
324          if (!Array.isArray(t3) || 2 !== t3.length) throw new Error("Comparison operator must be an array of length 2");
325          t3[0] = d(t3[0], e3, r3);
326          var a2 = t3[0];
327          if (_(t3[1])) {
328            var u2 = null, c2 = null, l2 = null;
329            if (g(a2)) u2 = a2.slice(1), c2 = e3.path(u2);
330            else if ("object" === n(a2) && null != a2) for (var f2 = 0, y2 = Object.keys(a2); f2 < y2.length; f2++) {
331              var b2 = y2[f2];
332              h.has(b2) && g(a2[b2]) ? (u2 = a2[b2].slice(1) + "." + b2, l2 = s) : p.has(b2) && g(a2[b2]) && (u2 = a2[b2].slice(1) + "." + b2, null != (c2 = e3.path(a2[b2].slice(1))) && (c2.$isMongooseDocumentArray ? c2 = c2.$embeddedSchemaType : c2.$isMongooseArray && (c2 = c2.caster)));
333            }
334            var m2 = "object" === n(t3[1]) && null != t3[1] && null != t3[1].$literal;
335            if (null != c2) t3[1] = m2 ? { $literal: c2.cast(t3[1].$literal) } : c2.cast(t3[1]);
336            else if (null != l2) if (m2) try {
337              t3[1] = { $literal: l2(t3[1].$literal) };
338            } catch (e4) {
339              throw new o(l2.name.replace(/^cast/, ""), t3[1], u2 + ".$literal");
340            }
341            else try {
342              t3[1] = l2(t3[1]);
343            } catch (e4) {
344              throw new o(l2.name.replace(/^cast/, ""), t3[1], u2);
345            }
346            else {
347              if (null != u2 && true === r3) return;
348              if (null != u2 && "throw" === r3) throw new i(u2);
349            }
350          } else t3[1] = d(t3[1]);
351          return t3;
352        }
353        function g(t3) {
354          return "string" == typeof t3 && "$" === t3[0];
355        }
356        function _(t3) {
357          return !("string" == typeof t3 && "$" === t3[0] || "object" === n(t3) && null !== t3 && Ob
357ject.keys(t3).find(function(t4) {
358            return "$" === t4[0];
359          }) && null == t3.$literal);
360        }
361        t2.exports = function(t3, e3, r3) {
362          if ("boolean" == typeof t3) return t3;
363          if ("object" !== n(t3) || null === t3) throw new Error("`$expr` must be an object or boolean literal");
364          return d(t3, e3, r3);
365        };
366      }, 209: (t2, e2, r2) => {
367        function n(t3) {
368          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
369            return typeof t4;
370          } : function(t4) {
371            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
372          }, n(t3);
373        }
374        var o = r2(2403), i = r2(5825), s = r2(6583);
375        t2.exports = o ? function(t3) {
376          return o(t3);
377        } : i ? function(t3) {
378          if (!t3 || "object" !== n(t3) && "function" != typeof t3) throw new TypeError("getProto: not an object");
379          return i(t3);
380        } : s ? function(t3) {
381          return s(t3);
382        } : null;
383      }, 241: (t2, e2, r2) => {
384        function n(t3) {
385          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
386            return typeof t4;
387          } : function(t4) {
388            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
389          }, n(t3);
390        }
391        function o() {
392          try {
393            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
394            }));
395          } catch (t4) {
396          }
397          return (o = function() {
398            return !!t3;
399          })();
400        }
401        function i(t3) {
402          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
403            return t4.__proto__ || Object.getPrototypeOf(t4);
404          }, i(t3);
405        }
406        function s(t3, e3) {
407          return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
408            return t4.__proto__ = e4, t4;
409          }, s(t3, e3);
410        }
411        var a = (function(t3) {
412          function e3() {
413            return (function(t4, e4) {
414              if (!(t4 instanceof e4)) throw new TypeError("Cannot call a class as a function");
415            })(this, e3), (function(t4, e4, r4) {
416              return e4 = i(e4), (function(t5, e5) {
417                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
418                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
419                return (function(t6) {
420                  if (void 0 === t6) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
421                  return t6;
422                })(t5);
423              })(t4, o() ? Reflect.construct(e4, r4 || [], i(t4).constructor) : e4.apply(t4, r4));
424            })(this, e3, arguments);
425          }
426          return (function(t4, e4) {
427            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
428            t4.prototype = Object.create(e4 && e4.prototype, { constructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && s(t4, e4);
429          })(e3, t3), r3 = e3, Object.defineProperty(r3, "prototype", { writable: false }), r3;
430          var r3;
431        })(r2(8879)), u = r2(5761);
432        Object.defineProperty(a.prototype, "of", u), t2.exports = a;
433      }, 354: (t2) => {
434        function e2(t3) {
435          return e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
436            return typeof t4;
437          } : function(t4) {
438            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
439          }, e2(t3);
440        }
441        var r2 = 1e3, n = 60 * r2, o = 60 * n, i = 24 * o, s = 7 * i;
442        function a(t3, e3, r3, n2) {
443          var o2 = e3 >= 1.5 * r3;
444          return Math.round(t3 / r3) + " " + n2 + (o2 ? "s" : "");
445        }
446        t2.exports = function(t3, u) {
447          u = u || {};
448          var c, l, f = e2(t3);
449          if ("string" === f && t3.length > 0) return (function(t4) {
450            if (!((t4 = String(t4)).length > 100)) {
451              var e3 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t4);
452              if (e3) {
453                var a2 = parseFloat(e3[1]);
454                switch ((e3[2] || "ms").toLowerCase()) {
455                  case "years":
456                  case "year":
457                  case "yrs":
458                  case "yr":
459                  case "y":
460                    return 315576e5 * a2;
461                  case "weeks":
462                  case "week":
463                  case "w":
464                    return a2 * s;
465                  case "days":
466                  case "day":
467                  case "d":
468                    return a2 * i;
469                  case "hours":
470                  case "hour":
471                  case "hrs":
472                  case "hr":
473                  case "h":
474                    return a2 * o;
475                  case "minutes":
476                  case "minute":
477                  case "mins":
478                  case "min":
479                  case "m":
480                    return a2 * n;
481                  case "seconds":
482                  case "second":
483                  case "secs":
484                  case "sec":
485                  case "s":
486                    return a2 * r2;
487                  case "milliseconds":
488                  case "millisecond":
489                  case "msecs":
490                  case "msec":
491                  case "ms":
492                    return a2;
493                  default:
494                    return;
495                }
496              }
497            }
498          })(t3);
499          if ("number" === f && isFinite(t3)) return u.long ? (c = t3, (l = Math.abs(c)) >= i ? a(c, l, i, "day") : l >= o ? a(c, l, o, "hour") : l >= n ? a(c, l, n, "minute") : l >= r2 ? a(c, l, r2, "second") : c + " ms") : (function(t4) {
500            var e3 = Math.abs(t4);
501            return e3 >= i ? Math.round(t4 / i) + "d" : e3 >= o ? Math.round(t4 / o) + "h" : e3 >= n ? Math.round(t4 / n) + "m" : e3 >= r2 ? Math.round(t4 / r2) + "s" : t4 + "ms";
502          })(t3);
503          throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(t3));
504        };
505      }, 433: (t2, e2, r2) => {
506        function n(t3) {
507          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
508            return typeof t4;
509          } : function(t4) {
510            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
511          }, n(t3);
512        }
513        function o(t3, e3) {
514          var r3 = Object.keys(t3);
515          if (Object.getOwnPropertySymbols) {
516            var n2 = Object.getOwnPropertySymbols(t3);
517            e3 && (n2 = n2.filter(function(e4) {
518              return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
519            })), r3.push.apply(r3, n2);
520          }
521          return r3;
522        }
523        function i(t3) {
524          for (var e3 = 1; e3 < arguments.length; e3++) {
525            var r3 = null != arguments[e3] ? arguments[e3] : {};
526            e3 % 2 ? o(Object(r3), true).forEach(function(e4) {
527              s(t3, e4, r3[e4]);
528            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t3, Object.getOwnPropertyDescriptors(r3)) : o(Object(r3)).forEach(function(e4) {
529              Object.defineProperty(t3, e4, Object.getOwnPropertyDescriptor(r3, e4));
530            });
531          }
532          return t3;
533        }
534        function s(t3, e3, r3) {
535          return (e3 = (function(t4) {
536            var e4 = (function(t5) {
537              if ("object" != n(t5) || !t5) return t5;
538              var e5 = t5[Symbol.toPrimitive];
539              if (void 0 !== e5) {
540                var r4 = e5.call(t5, "string");
541                if ("object" != n(r4)) return r4;
542                throw new TypeError("@@toPrimitive must return a primitive value.");
543              }
544              return String(t5);
545            })(t4);
546            return "symbol" == n(e4) ? e4 : e4 + "";
547          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
548        }
549        var a = r2(3609), u = r2(6426), c = r2(5413), l = r2(4327), f = r2(9460);
550        function p(t3, e3) {
551          u.call(this, t3, e3, "Int32");
552        }
553        p.schemaName = "Int32", p.defaultOptions = {}, p.prototype = Object.create(u.prototype), p.prototype.constructor = p, p._cast = c, p.set = u.set, p.setters = [], p.get = u.get, p._defaultCaster = function(t3) {
554          if (null != t3 && ("number" != typeof t3 || t3 !== (0 | t3) || t3 < -2147483648 || t3 > 2147483647)) throw new Error();
555          return t3;
556        }, p.cast = function(t3) {
557          return 0 === arguments.length || (false === t3 && (t3 = this._defaultCaster), this._cast = t3), this._cast;
558        }, p._checkRequired = function(t3) {
559          return null != t3;
560        }, p.checkRequired = u.checkRequired, p.prototype.checkRequired = function(t3) {
561          return this.constructor._checkRequired(t3);
562        }, p.prototype.cast = function(t3) {
563          var e3;
564          e3 = "function" == typeof this._castFunction ? this._castFunction : "function" == typeof this.constructor.cast ? this.constructor.cast() : p.cast();
565          try {
566            return e3(t3);
567          } catch (e4) {
568            throw new a("Int32", t3, this.path, e4, this);
569          }
570        };
571        var h = i(i({}, u.prototype.$conditionalHandlers), {}, { $gt: y, $gte: y, $lt: y, $lte: y, $bitsAllClear: f, $bitsAnyClear: f, $bitsAllSet: f, $bitsAnySet: f });
572        function y(t3, e3) {
573          return this.castForQuery(null, t3, e3);
574        }
575        Object.defineProperty(p.prototype, "$conditionalHandlers", { enumerable: false, value: h }), p.prototype.castForQuery = function(t3, e3, r3) {
576          var n2;
577          if (null != t3) return (n2 = this.$conditionalHandlers[t3]) ? n2.call(this, e3) : this.applySetters(e3, r3);
578          try {
579            return this.applySetters(e3, r3);
580          } catch (t4) {
581            throw t4 instanceof a && t4.path === this.path && null != this.$fullPath && (t4.path = this.$fullPath), t4;
582          }
583        }, p.prototype.toJSONSchema = function(t3) {
584          var e3 = this.options.required && "function" != typeof this.options.required;
585          return l("number", "int", null == t3 ? void 0 : t3.useBsonType, e3);
586        }, p.prototype.autoEncryptionType = function() {
587          return "int";
588        }, t2.exports = p;
589      }, 486: (t2) => {
590        t2.exports = function(t3) {
591          var e2 = { _id: { auto: true } };
592          e2._id[t3.options.typeKey] = "ObjectId", t3.add(e2);
593        };
594      }, 533: (t2, e2, r2) => {
595        var n = r2(8213), o = r2(7352);
596        t2.exports = function(t3, e3) {
597          if ("string" != typeof t3 && "function" != typeof t3) throw new n('Invalid ref at path "' + e3 + '". Got ' + o.inspect(t3, { depth: 0 }));
598        };
599      }, 542: (t2) => {
600        function e2(t3) {
601          return e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
602            return typeof t4;
603          } : function(t4) {
604            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
605          }, e2(t3);
606        }
607        t2.exports = function(t3) {
608          return !!t3 && ("object" === e2(t3) || "function" == typeof t3) && "function" == typeof t3.then;
609        };
610      }, 608: (t2, e2, r2) => {
611        var n = r2(5832).hp;
612        t2.exports = function(t3) {
613          return n.isBuffer(t3) || "[object Object]" === Object.prototype.toString.call(t3);
614        };
615      }, 622: (t2, e2, r2) => {
616        function n(t3, e3) {
617          var r3 = "undefined" != typeof Symbol && t3[Symbol.iterator] || t3["@@iterator"];
618          if (!r3) {
619            if (Array.isArray(t3) || (r3 = (function(t4, e4) {
620              if (t4) {
621                if ("string" == typeof t4) return o(t4, e4);
622                var r4 = {}.toString.call(t4).slice(8, -1);
623                return "Object" === r4 && t4.constructor && (r4 = t4.constructor.name), "Map" === r4 || "Set" === r4 ? Array.from(t4) : "Arguments" === r4 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r4) ? o(t4, e4) : void 0;
624              }
625            })(t3)) || e3) {
626              r3 && (t3 = r3);
627              var n2 = 0, i2 = function() {
628              };
629              return { s: i2, n: function() {
630                return n2 >= t3.length ? { done: true } : { done: false, value: t3[n2++] };
631              }, e: function(t4) {
632                throw t4;
633              }, f: i2 };
634            }
635            throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
636          }
637          var s2, a2 = true, u2 = false;
638          return { s: function() {
639            r3 = r3.call(t3);
640          }, n: function() {
641            var t4 = r3.next();
642            return a2 = t4.done, t4;
643          }, e: function(t4) {
644            u2 = true, s2 = t4;
645          }, f: function() {
646            try {
647              a2 || null == r3.return || r3.return();
648            } finally {
649              if (u2) throw s2;
650            }
651          } };
652        }
653        function o(t3, e3) {
654          (null == e3 || e3 > t3.length) && (e3 = t3.length);
655          for (var r3 = 0, n2 = Array(e3); r3 < e3; r3++) n2[r3] = t3[r3];
656          return n2;
657        }
658        var i = r2(4009), s = r2(8768), a = r2(7930).modelSymbol;
659        function u(t3, e3) {
660          this.path = e3, this.getters = [], this.setters = [], this.options = Object.assign({}, t3);
661        }
662        u.prototype._applyDefaultGetters = function() {
663          if (!(this.getters.length > 0 || this.setters.length > 0)) {
664            var t3 = "$" + this.path;
665            this.getters.push(function() {
666              return this.$locals[t3];
667            }), this.setters.push(function(e3) {
668              this.$locals[t3] = e3;
669            });
670          }
671        }, u.prototype.clone = function() {
672          var t3 = new u(this.options, this.path);
673          return t3.getters = [].concat(this.getters), t3.setters = [].concat(this.setters), t3;
674        }, u.prototype.get = function(t3) {
675          return this.getters.push(t3), this;
676        }, u.prototype.set = function(t3) {
677          return this.setters.push(t3), this;
678        }, u.prototype.applyGetters = function(t3, e3) {
679          s.hasUserDefinedProperty(this.options, ["ref", "refPath"]) && e3.$$populatedVirtuals && e3.$$populatedVirtuals.hasOwnProperty(this.path) && (t3 = e3.$$populatedVirtuals[this.path]);
680          var r3, o2 = t3, i2 = n(this.getters);
681          try {
682            for (i2.s(); !(r3 = i2.n()).done; ) o2 = r3.value.call(e3, o2, this, e3);
683          } catch (t4) {
684            i2.e(t4);
685          } finally {
686            i2.f();
687          }
688          return o2;
689        }, u.prototype.applySetters = function(t3, e3) {
690          var r3, o2 = t3, i2 = n(this.setters);
691          try {
692            for (i2.s(); !(r3 = i2.n()).done; ) o2 = r3.value.call(e3, o2, this, e3);
693          } catch (t4) {
694            i2.e(t4);
695          } finally {
696            i2.f();
697          }
698          return o2;
699        }, u.prototype._getModelNamesForPopulate = function(t3) {
700          if (this.options.refPath) return i(this.options.refPath, t3, this.path);
701          var e3;
702          return null == (e3 = "function" != typeof this.options.ref || this.options.ref[a] ? this.options.ref : this.options.ref.call(t3, t3)) || Array.isArray(e3) ? e3 : [e3];
703        }, t2.exports = u;
704      }, 668: (t2, e2, r2) => {
705        var n = Array.prototype.slice, o = r2(6312), i = Object.keys, s = i ? function(t3) {
706          return i(t3);
707        } : r2(6544), a = Object.keys;
708        s.shim = function() {
709          if (Object.keys) {
710            var t3 = (function() {
711              var t4 = Object.keys(arguments);
712              return t4 && t4.length === arguments.length;
713            })(1, 2);
714            t3 || (Object.keys = function(t4) {
715              return o(t4) ? a(n.call(t4)) : a(t4);
716            });
717          } else Object.keys = s;
718          return Object.keys || s;
719        }, t2.exports = s;
720      }, 674: (t2, e2, r2) => {
721        var n = r2(3414);
722        t2.exports = function(t3) {
723          return n(t3) || 0 === t3 ? t3 : t3 < 0 ? -1 : 1;
724        };
725      }, 766: (t2, e2) => {
726        var r2 = t2.exports = {};
727        r2.DocumentNotFoundError = null, r2.general = {}, r2.general.default = "Validator failed for path `{PATH}` with value `{VALUE}`", r2.general.required = "Path `{PATH}` is required.", r2.Number = {}, r2.Number.min = "Path `{PATH}` ({VALUE}) is less than minimum allowed value ({MIN}).", r2.Number.max = "Path `{PATH}` ({VALUE}) is more than maximum allowed value ({MAX}).", r2.Number.enum = "`{VALUE}` is not a valid enum value for path `{PATH}`.", r2.Date = {}, r2.Date.min = "Path `{PATH}` ({VALUE}) is before minimum allowed value ({MIN}).", r2.Date.max = "Path `{PATH}` ({VALUE}) is after maximum allowed value ({MAX}).", r2.String = {}, r2.String.enum = "`{VALUE}` is not a valid enum value for path `{PATH}`.", r2.String.match = "Path `{PATH}
727` is invalid ({VALUE}).", r2.String.minlength = "Path `{PATH}` (`{VALUE}`, length {LENGTH}) is shorter than the minimum allowed length ({MINLENGTH}).", r2.String.maxlength = "Path `{PATH}` (`{VALUE}`, length {LENGTH}) is longer than the maximum allowed length ({MAXLENGTH}).";
728      }, 783: (t2) => {
729        t2.exports = ReferenceError;
730      }, 791: (t2, e2, r2) => {
731        function n(t3, e3) {
732          var r3 = "undefined" != typeof Symbol && t3[Symbol.iterator] || t3["@@iterator"];
733          if (!r3) {
734            if (Array.isArray(t3) || (r3 = (function(t4, e4) {
735              if (t4) {
736                if ("string" == typeof t4) return o(t4, e4);
737                var r4 = {}.toString.call(t4).slice(8, -1);
738                return "Object" === r4 && t4.constructor && (r4 = t4.constructor.name), "Map" === r4 || "Set" === r4 ? Array.from(t4) : "Arguments" === r4 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r4) ? o(t4, e4) : void 0;
739              }
740            })(t3)) || e3) {
741              r3 && (t3 = r3);
742              var n2 = 0, i2 = function() {
743              };
744              return { s: i2, n: function() {
745                return n2 >= t3.length ? { done: true } : { done: false, value: t3[n2++] };
746              }, e: function(t4) {
747                throw t4;
748              }, f: i2 };
749            }
750            throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
751          }
752          var s, a = true, u = false;
753          return { s: function() {
754            r3 = r3.call(t3);
755          }, n: function() {
756            var t4 = r3.next();
757            return a = t4.done, t4;
758          }, e: function(t4) {
759            u = true, s = t4;
760          }, f: function() {
761            try {
762              a || null == r3.return || r3.return();
763            } finally {
764              if (u) throw s;
765            }
766          } };
767        }
768        function o(t3, e3) {
769          (null == e3 || e3 > t3.length) && (e3 = t3.length);
770          for (var r3 = 0, n2 = Array(e3); r3 < e3; r3++) n2[r3] = t3[r3];
771          return n2;
772        }
773        var i = r2(3703);
774        t2.exports = function(t3, e3, r3) {
775          var o2, s = null != r3 ? Object.keys(i(t3.tree, r3, {})) : Object.keys(t3.tree), a = new Set(Object.keys(e3));
776          if (a.size > 1) {
777            o2 = /* @__PURE__ */ new Set();
778            var u, c = n(s);
779            try {
780              for (c.s(); !(u = c.n()).done; ) {
781                var l = u.value;
782                a.has(l) && o2.add(l);
783              }
784            } catch (t4) {
785              c.e(t4);
786            } finally {
787              c.f();
788            }
789            var f, p = n(a);
790            try {
791              for (p.s(); !(f = p.n()).done; ) {
792                var h = f.value;
793                o2.has(h) || o2.add(h);
794              }
795            } catch (t4) {
796              p.e(t4);
797            } finally {
798              p.f();
799            }
800            o2 = Array.from(o2);
801          } else o2 = Array.from(a);
802          return o2;
803        };
804      }, 863: (t2, e2, r2) => {
805        var n = r2(3305), o = r2(5549);
806        t2.exports = function(t3) {
807          if (null == t3) return t3;
808          if (n(t3, "ObjectId")) return t3;
809          if (t3._id) {
810            if (n(t3._id, "ObjectId")) return t3._id;
811            if (t3._id.toString instanceof Function) return new o(t3._id.toString());
812          }
813          return t3.toString instanceof Function ? new o(t3.toString()) : new o(t3);
814        };
815      }, 953: (t2, e2, r2) => {
816        var n = r2(5484);
817        t2.exports = function() {
818          return n() && !!Symbol.toStringTag;
819        };
820      }, 988: (t2) => {
821        var e2 = Object.defineProperty || false;
822        if (e2) try {
823          e2({}, "a", { value: 1 });
824        } catch (t3) {
825          e2 = false;
826        }
827        t2.exports = e2;
828      }, 1007: (t2, e2, r2) => {
829        function n(t3) {
830          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
831            return typeof t4;
832          } : function(t4) {
833            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
834          }, n(t3);
835        }
836        function o() {
837          try {
838            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
839            }));
840          } catch (t4) {
841          }
842          return (o = function() {
843            return !!t3;
844          })();
845        }
846        function i(t3) {
847          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
848            return t4.__proto__ || Object.getPrototypeOf(t4);
849          }, i(t3);
850        }
851        function s(t3, e3) {
852          return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
853            return t4.__proto__ = e4, t4;
854          }, s(t3, e3);
855        }
856        var a = (function(t3) {
857          function e3() {
858            return (function(t4, e4) {
859              if (!(t4 instanceof e4)) throw new TypeError("Cannot call a class as a function");
860            })(this, e3), (function(t4, e4, r4) {
861              return e4 = i(e4), (function(t5, e5) {
862                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
863                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
864                return (function(t6) {
865                  if (void 0 === t6) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
866                  return t6;
867                })(t5);
868              })(t4, o() ? Reflect.construct(e4, r4 || [], i(t4).constructor) : e4.apply(t4, r4));
869            })(this, e3, arguments);
870          }
871          return (function(t4, e4) {
872            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
873            t4.prototype = Object.create(e4 && e4.prototype, { c
873onstructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && s(t4, e4);
874          })(e3, t3), r3 = e3, Object.defineProperty(r3, "prototype", { writable: false }), r3;
875          var r3;
876        })(r2(8879)), u = r2(5761);
877        Object.defineProperty(a.prototype, "min", u), Object.defineProperty(a.prototype, "max", u), Object.defineProperty(a.prototype, "enum", u), Object.defineProperty(a.prototype, "populate", u), t2.exports = a;
878      }, 1058: (t2, e2, r2) => {
879        var n = r2(2696);
880        t2.exports = function(t3, e3) {
881          if (null == t3) return null;
882          for (var r3 = 0, o = Object.keys(t3); r3 < o.length; r3++) {
883            var i = t3[o[r3]];
884            if (i.schema && i.schema.discriminatorMapping && n(i.schema.discriminatorMapping.value, e3)) return i;
885          }
886          return null;
887        };
888      }, 1091: (t2) => {
889        function e2(t3) {
890          return e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
891            return typeof t4;
892          } : function(t4) {
893            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
894          }, e2(t3);
895        }
896        t2.exports = function(t3) {
897          return null != t3 && "object" === e2(t3) && null == t3.$slice && null == t3.$elemMatch && null == t3.$meta && null == t3.$;
898        };
899      }, 1129: (t2, e2, r2) => {
900        function n(t3) {
901          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
902            return typeof t4;
903          } : function(t4) {
904            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
905          }, n(t3);
906        }
907        function o() {
908          try {
909            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
910            }));
911          } catch (t4) {
912          }
913          return (o = function() {
914            return !!t3;
915          })();
916        }
917        function i(t3) {
918          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
919            return t4.__proto__ || Object.getPrototypeOf(t4);
920          }, i(t3);
921        }
922        function s(t3, e3) {
923          return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
924            return t4.__proto__ = e4, t4;
925          }, s(t3, e3);
926        }
927        var a = r2(8213), u = r2(7352), c = (function(t3) {
928          function e3(t4, r4, s2, c2) {
929            var l;
930            !(function(t5, e4) {
931              if (!(t5 instanceof e4)) throw new TypeError("Cannot call a class as a function");
932            })(this, e3);
933            var f = a.messages;
934            return (l = (function(t5, e4, r5) {
935              return e4 = i(e4), (function(t6, e5) {
936                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
937                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
938                return (function(t7) {
939                  if (void 0 === t7) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
940                  return t7;
941                })(t6);
942              })(t5, o() ? Reflect.construct(e4, r5 || [], i(t5).constructor) : e4.apply(t5, r5));
943            })(this, e3, [null != f.DocumentNotFoundError ? "function" == typeof f.DocumentNotFoundError ? f.DocumentNotFoundError(t4, r4) : f.DocumentNotFoundError : 'No document found for query "' + u.inspect(t4) + '" on model "' + r4 + '"'])).result = c2, l.numAffected = s2, l.filter = t4, l.query = t4, l;
944          }
945          return (function(t4, e4) {
946            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
947            t4.prototype = Object.create(e4 && e4.prototype, { constructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && s(t4, e4);
948          })(e3, t3), r3 = e3, Object.defineProperty(r3, "prototype", { writable: false }), r3;
949          var r3;
950        })(a);
951        Object.defineProperty(c.prototype, "name", { value: "DocumentNotFoundError" }), t2.exports = c;
952      }, 1199: (t2) => {
953        t2.exports = function(t3, e2) {
954          var r2 = Object.keys(t3), n = Object.keys(e2);
955          if (r2.length !== n.length) return false;
956          for (var o = 0; o < r2.length; o++) {
957            var i = r2[o];
958            if (i !== n[o] || t3[i] !== e2[i]) return false;
959          }
960          return true;
961        };
962      }, 1226: (t2) => {
963        t2.exports = function(t3) {
964          return null == t3 ? null : Object.keys(t3)[0];
965        };
966      }, 1243: (t2, e2) => {
967        e2.isMongooseArray = function(t3) {
968          return Array.isArray(t3) && t3.isMongooseArray;
969        };
970      }, 1244: (t2, e2, r2) => {
971        var n = r2(3609);
972        t2.exports = function(t3, e3) {
973          if (null == t3) return t3;
974          if (t3._id && "string" == typeof t3._id) return t3._id;
975          if (t3.toString && t3.toString !== Object.prototype.toString && !Array.isArray(t3)) return t3.toString();
976          throw new n("string", t3, e3);
977        };
978      }, 1260: (t2, e2) => {
979        var r2 = Object.freeze(["countDocuments", "distinct", "estimatedDocumentCount", "find", "findOne", "findOneAndReplace", "findOneAndUpdate", "replaceOne", "updateMany", "updateOne", "deleteMany", "deleteOne", "findOneAndDelete"]).concat(["validate"]);
980        e2.Ut = r2;
981      }, 1313: (t2, e2, r2) => {
982        var n = r2(486);
983        t2.exports = function(t3, e3) {
984          return null == e3 || null == e3._id || (t3 = t3.clone(), e3._id ? t3.paths._id || (n(t3), t3.options._id = true) : (t3.remove("_id"), t3.options._id = false)), t3;
985        };
986      }, 1344: (t2, e2, r2) => {
987        t2.exports = r2(6353).UUID;
988      }, 1347: (t2, e2) => {
989        e2.isMongooseDocumentArray = function(t3) {
990          return Array.isArray(t3) && t3.isMongooseDocumentArray;
991        };
992      }, 1350: (t2, e2, r2) => {
993        function n(t3) {
994          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
995            return typeof t4;
996          } : function(t4) {
997            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
998          }, n(t3);
999        }
1000        function o() {
1001          try {
1002            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1003            }));
1004          } catch (t4) {
1005          }
1006          return (o = function() {
1007            return !!t3;
1008          })();
1009        }
1010        function i(t3) {
1011          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
1012            return t4.__proto__ || Object.getPrototypeOf(t4);
1013          }, i(t3);
1014        }
1015        function s(t3, e3) {
1016          return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
1017            return t4.__proto__ = e4, t4;
1018          }, s(t3, e3);
1019        }
1020        var a = (function(t3) {
1021          function e3(t4, r4, s2) {
1022            return (function(t5, e4) {
1023              if (!(t5 instanceof e4)) throw new TypeError("Cannot call a class as a function");
1024            })(this, e3), (function(t5, e4, r5) {
1025              return e4 = i(e4), (function(t6, e5) {
1026                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
1027                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
1028                return (function(t7) {
1029                  if (void 0 === t7) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1030                  return t7;
1031                })(t6);
1032              })(t5, o() ? Reflect.construct(e4, r5 || [], i(t5).constructor) : e4.apply(t5, r5));
1033            })(this, e3, ['Parameter "' + r4 + '" to ' + s2 + '() must be an object, got "' + t4.toString() + '" (type ' + n(t4) + ")"]);
1034          }
1035          return (function(t4, e4) {
1036            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
1037            t4.prototype = Object.create(e4 && e4.prototype, { constructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && s(t4, e4);
1038          })(e3, t3), r3 = e3, Object.defineProperty(r3, "prototype", { writable: false }), r3;
1039          var r3;
1040        })(r2(8213));
1041        Object.defineProperty(a.prototype, "name", { value: "ObjectParameterError" }), t2.exports = a;
1042      }, 1417: (t2, e2, r2) => {
1043        function n(t3) {
1044          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
1045            return typeof t4;
1046          } : function(t4) {
1047            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
1048          }, n(t3);
1049        }
1050        function o() {
1051          try {
1052            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1053            }));
1054          } catch (t4) {
1055          }
1056          return (o = function() {
1057            return !!t3;
1058          })();
1059        }
1060        function i(t3) {
1061          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
1062            return t4.__proto__ || Object.getPrototypeOf(t4);
1063          }, i(t3);
1064        }
1065        function s(t3, e3) {
1066          return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
1067            return t4.__proto__ = e4, t4;
1068          }, s(t3, e3);
1069        }
1070        var a = (function(t3) {
1071          function e3(t4) {
1072            return (function(t5, e4) {
1073              if (!(t5 instanceof e4)) throw new TypeError("Cannot call a class as a function");
1074            })(this, e3), (function(t5, e4, r4) {
1075              return e4 = i(e4), (function(t6, e5) {
1076                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
1077                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
1078                return (function(t7) {
1079                  if (void 0 === t7) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1080                  return t7;
1081                })(t6);
1082              })(t5, o() ? Reflect.construct(e4, r4 || [], i(t5).constructor) : e4.apply(t5, r4));
1083            })(this, e3, ["For your own good, using `document.save()` to update an array which was selected using an $elemMatch projection OR populated using skip, limit, query conditions, or exclusion of the _id field when the operation results in a $pop or $set of the entire array is not supported. The following path(s) would have been modified unsafely:\n  " + t4.join("\n  ") + "\nUse Model.updateOne() to update these arrays instead."]);
1084          }
1085          return (function(t4, e4) {
1086            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
1087            t4.prototype = Object.create(e4 && e4.prototype, { c
1087onstructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && s(t4, e4);
1088          })(e3, t3), r3 = e3, Object.defineProperty(r3, "prototype", { writable: false }), r3;
1089          var r3;
1090        })(r2(8213));
1091        Object.defineProperty(a.prototype, "name", { value: "DivergentArrayError" }), t2.exports = a;
1092      }, 1464: (t2, e2, r2) => {
1093        var n = r2(5807);
1094        if (n) try {
1095          n([], "length");
1096        } catch (t3) {
1097          n = null;
1098        }
1099        t2.exports = n;
1100      }, 1469: (t2, e2, r2) => {
1101        function n(t3) {
1102          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
1103            return typeof t4;
1104          } : function(t4) {
1105            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
1106          }, n(t3);
1107        }
1108        function o(t3, e3) {
1109          var r3 = Object.keys(t3);
1110          if (Object.getOwnPropertySymbols) {
1111            var n2 = Object.getOwnPropertySymbols(t3);
1112            e3 && (n2 = n2.filter(function(e4) {
1113              return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
1114            })), r3.push.apply(r3, n2);
1115          }
1116          return r3;
1117        }
1118        function i(t3, e3, r3) {
1119          return (e3 = (function(t4) {
1120            var e4 = (function(t5) {
1121              if ("object" != n(t5) || !t5) return t5;
1122              var e5 = t5[Symbol.toPrimitive];
1123              if (void 0 !== e5) {
1124                var r4 = e5.call(t5, "string");
1125                if ("object" != n(r4)) return r4;
1126                throw new TypeError("@@toPrimitive must return a primitive value.");
1127              }
1128              return String(t5);
1129            })(t4);
1130            return "symbol" == n(e4) ? e4 : e4 + "";
1131          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
1132        }
1133        function s() {
1134          var t3, e3, r3 = "function" == typeof Symbol ? Symbol : {}, n2 = r3.iterator || "@@iterator", o2 = r3.toStringTag || "@@toStringTag";
1135          function i2(r4, n3, o3, i3) {
1136            var s2 = n3 && n3.prototype instanceof c2 ? n3 : c2, l3 = Object.create(s2.prototype);
1137            return a(l3, "_invoke", (function(r5, n4, o4) {
1138              var i4, s3, a2, c3 = 0, l4 = o4 || [], f3 = false, p3 = { p: 0, n: 0, v: t3, a: h3, f: h3.bind(t3, 4), d: function(e4, r6) {
1139                return i4 = e4, s3 = 0, a2 = t3, p3.n = r6, u2;
1140              } };
1141              function h3(r6, n5) {
1142                for (s3 = r6, a2 = n5, e3 = 0; !f3 && c3 && !o5 && e3 < l4.length; e3++) {
1143                  var o5, i5 = l4[e3], h4 = p3.p, y3 = i5[2];
1144                  r6 > 3 ? (o5 = y3 === n5) && (a2 = i5[(s3 = i5[4]) ? 5 : (s3 = 3, 3)], i5[4] = i5[5] = t3) : i5[0] <= h4 && ((o5 = r6 < 2 && h4 < i5[1]) ? (s3 = 0, p3.v = n5, p3.n = i5[1]) : h4 < y3 && (o5 = r6 < 3 || i5[0] > n5 || n5 > y3) && (i5[4] = r6, i5[5] = n5, p3.n = y3, s3 = 0));
1145                }
1146                if (o5 || r6 > 1) return u2;
1147                throw f3 = true, n5;
1148              }
1149              return function(o5, l5, y3) {
1150                if (c3 > 1) throw TypeError("Generator is already running");
1151                for (f3 && 1 === l5 && h3(l5, y3), s3 = l5, a2 = y3; (e3 = s3 < 2 ? t3 : a2) || !f3; ) {
1152                  i4 || (s3 ? s3 < 3 ? (s3 > 1 && (p3.n = -1), h3(s3, a2)) : p3.n = a2 : p3.v = a2);
1153                  try {
1154                    if (c3 = 2, i4) {
1155                      if (s3 || (o5 = "next"), e3 = i4[o5]) {
1156                        if (!(e3 = e3.call(i4, a2))) throw TypeError("iterator result is not an object");
1157                        if (!e3.done) return e3;
1158                        a2 = e3.value, s3 < 2 && (s3 = 0);
1159                      } else 1 === s3 && (e3 = i4.return) && e3.call(i4), s3 < 2 && (a2 = TypeError("The iterator does not provide a '" + o5 + "' method"), s3 = 1);
1160                      i4 = t3;
1161                    } else if ((e3 = (f3 = p3.n < 0) ? a2 : r5.call(n4, p3)) !== u2) break;
1162                  } catch (e4) {
1163                    i4 = t3, s3 = 1, a2 = e4;
1164                  } finally {
1165                    c3 = 1;
1166                  }
1167                }
1168                return { value: e3, done: f3 };
1169              };
1170            })(r4, o3, i3), true), l3;
1171          }
1172          var u2 = {};
1173          function c2() {
1174          }
1175          function l2() {
1176          }
1177          function f2() {
1178          }
1179          e3 = Object.getPrototypeOf;
1180          var p2 = [][n2] ? e3(e3([][n2]())) : (a(e3 = {}, n2, function() {
1181            return this;
1182          }), e3), h2 = f2.prototype = c2.prototype = Object.create(p2);
1183          function y2(t4) {
1184            return Object.setPrototypeOf ? Object.setPrototypeOf(t4, f2) : (t4.__proto__ = f2, a(t4, o2, "GeneratorFunction")), t4.prototype = Object.create(h2), t4;
1185          }
1186          return l2.prototype = f2, a(h2, "constructor", f2), a(f2, "constructor", l2), l2.dis
1186playName = "GeneratorFunction", a(f2, o2, "GeneratorFunction"), a(h2), a(h2, o2, "Generator"), a(h2, n2, function() {
1187            return this;
1188          }), a(h2, "toString", function() {
1189            return "[object Generator]";
1190          }), (s = function() {
1191            return { w: i2, m: y2 };
1192          })();
1193        }
1194        function a(t3, e3, r3, n2) {
1195          var o2 = Object.defineProperty;
1196          try {
1197            o2({}, "", {});
1198          } catch (t4) {
1199            o2 = 0;
1200          }
1201          a = function(t4, e4, r4, n3) {
1202            function i2(e5, r5) {
1203              a(t4, e5, function(t5) {
1204                return this._invoke(e5, r5, t5);
1205              });
1206            }
1207            e4 ? o2 ? o2(t4, e4, { value: r4, enumerable: !n3, configurable: !n3, writable: !n3 }) : t4[e4] = r4 : (i2("next", 0), i2("throw", 1), i2("return", 2));
1208          }, a(t3, e3, r3, n2);
1209        }
1210        function u(t3) {
1211          return (function(t4) {
1212            if (Array.isArray(t4)) return f(t4);
1213          })(t3) || (function(t4) {
1214            if ("undefined" != typeof Symbol && null != t4[Symbol.iterator] || null != t4["@@iterator"]) return Array.from(t4);
1215          })(t3) || l(t3) || (function() {
1216            throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1217          })();
1218        }
1219        function c(t3, e3) {
1220          var r3 = "undefined" != typeof Symbol && t3[Symbol.iterator] || t3["@@iterator"];
1221          if (!r3) {
1222            if (Array.isArray(t3) || (r3 = l(t3)) || e3) {
1223              r3 && (t3 = r3);
1224              var n2 = 0, o2 = function() {
1225              };
1226              return { s: o2, n: function() {
1227                return n2 >= t3.length ? { done: true } : { done: false, value: t3[n2++] };
1228              }, e: function(t4) {
1229                throw t4;
1230              }, f: o2 };
1231            }
1232            throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1233          }
1234          var i2, s2 = true, a2 = false;
1235          return { s: function() {
1236            r3 = r3.call(t3);
1237          }, n: function() {
1238            var t4 = r3.next();
1239            return s2 = t4.done, t4;
1240          }, e: function(t4) {
1241            a2 = true, i2 = t4;
1242          }, f: function() {
1243            try {
1244              s2 || null == r3.return || r3.return();
1245            } finally {
1246              if (a2) throw i2;
1247            }
1248          } };
1249        }
1250        function l(t3, e3) {
1251          if (t3) {
1252            if ("string" == typeof t3) return f(t3, e3);
1253            var r3 = {}.toString.call(t3).slice(8, -1);
1254            return "Object" === r3 && t3.constructor && (r3 = t3.constructor.name), "Map" === r3 || "Set" === r3 ? Array.from(t3) : "Arguments" === r3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r3) ? f(t3, e3) : void 0;
1255          }
1256        }
1257        function f(t3, e3) {
1258          (null == e3 || e3 > t3.length) && (e3 = t3.length);
1259          for (var r3 = 0, n2 = Array(e3); r3 < e3; r3++) n2[r3] = t3[r3];
1260          return n2;
1261        }
1262        var p = r2(5022), h = r2(8442), y = r2(4450), d = r2(2068).X, b = r2(3703), m = r2(8768), v = r2(4301), g = { toJSON: true, toObject: true, _id: true, id: true, virtuals: true, methods: true, statics: true };
1263        t2.exports = function(t3, e3, r3, n2, a2, l2, f2) {
1264          if (!r3 || !r3.instanceOfSchema) throw new Error("You must pass a valid discriminator Schema");
1265          if (l2 = null == l2 || l2, t3.schema.discriminatorMapping && !t3.schema.discriminatorMapping.isRoot) throw new Error('Discriminator "' + e3 + '" can only be a discriminator of the root model');
1266          if (a2) {
1267            var _ = b(t3.base, "options.applyPluginsToDiscriminators", false) || !l2;
1268            t3.base._applyPlugins(r3, { skipTopLevel: !_ });
1269          } else l2 || h(r3);
1270          var w = t3.schema.options.discriminatorKey, O = t3.schema.path(w);
1271          if (null != O) m.hasUserDefinedProperty(O.options, "select") || (O.options.select = true), O.options.$skipDiscriminatorCheck = true;
1272          else {
1273            var S = {};
1274            S[w] = { default: void 0, select: true, $skipDiscriminatorCheck: true }, S[w][t3.schema.options.typeKey] = String, t3.schema.add(S), d({ prop: w, prototype: t3.prototype, options: t3.schema.options });
1275          }
1276          if (r3.path(w) && true !== r3.path(w).options.$skipDiscriminatorCheck) throw new Error('Discriminator "' + e3 + '" cannot have field with name "' + w + '"');
1277          var $ = e3;
1278          if (("string" == typeof n2 && n2.length || null != n2) && ($ = n2), (function(t4, e4) {
1279            var r4 = s().m(l3);
1280            if (null != t4.encryptionType() || null != e4.encryptionType()) {
1281              var n3, o2 = c(l3(a3(t4), a3(e4)));
1282              try {
1283                for (o2.s(); !(n3 = o2.n()).done; ) {
1284                  var i2 = n3.value;
1285                  if (t4._hasEncryptedField(i2) && e4._hasEncryptedField(i2)) throw new Error("encrypted fields cannot be declared on both the base schema and the child schema in a discriminator. path=".concat(i2));
1286                  if (t4._hasEncryptedField(i2) || e4._hasEncryptedField(i2)) throw new Error("encrypted fields cannot have the same path as a non-encrypted field for discriminators. path=".concat(i2));
1287                }
1288              } catch (t5) {
1289                o2.e(t5);
1290              } finally {
1291                o2.f();
1292              }
1293            }
1294            function a3(t5) {
1295              return [].concat(u(Object.keys(t5.paths)), u(Object.keys(t5.singleNestedPaths)));
1296            }
1297            function l3(t5, e5) {
1298              var n4, o3, i3, a4, u2;
1299              return s().w(function(r5) {
1300                for (; ; ) switch (r5.p = r5.n) {
1301                  case 0:
1302                    n4 = new Set(t5), o3 = c(e5), r5.p = 1, o3.s();
1303                  case 2:
1304                    if ((i3 = o3.n()).done) {
1305                      r5.n = 4;
1306                      break;
1307                    }
1308                    if (a4 = i3.value, !n4.has(a4)) {
1309                      r5.n = 3;
1310                      break;
1311                    }
1312                    return r5.n = 3, a4;
1313                  case 3:
1314                    r5.n = 2;
1315                    break;
1316                  case 4:
1317                    r5.n = 6;
1318                    break;
1319                  case 5:
1320                    r5.p = 5, u2 = r5.v, o3.e(u2);
1321                  case 6:
1322                    return r5.p = 6, o3.f(), r5.f(6);
1323                  case 7:
1324                    return r5.a(2);
1325                }
1326              }, r4, null, [[1, 5, 6, 7]]);
1327            }
1328          })(t3.schema, r3), (function(e4, r4) {
1329            e4._baseSchema = r4, r4.paths._id && r4.paths._id.options && !r4.paths._id.options.auto && e4.remove("_id");
1330            for (var n3 = [], s2 = 0, u2 = Object.keys(r4.paths); s2 < u2.length; s2++) {
1331              var f3 = u2[s2];
1332              if (e4.nested[f3]) n3.push(f3);
1333              else if (-1 !== f3.indexOf(".")) {
1334                var h2, d2 = "", b2 = c(f3.split(".").slice(0, -1));
1335                try {
1336                  for (b2.s(); !(h2 = b2.n()).done; ) {
1337                    var _2 = h2.value;
1338                    d2 += (d2.length ? "." : "") + _2, (e4.paths[d2] instanceof p || e4.singleNestedPaths[d2] instanceof p) && n3.push(f3);
1339                  }
1340                } catch (t4) {
1341                  b2.e(t4);
1342                } finally {
1343                  b2.f();
1344                }
1345              }
1346            }
1347            e4.obj = (function(t4) {
1348              for (var e5 = 1; e5 < arguments.length; e5++) {
1349                var r5 = null != arguments[e5] ? arguments[e5] : {};
1350                e5 % 2 ? o(Object(r5), true).forEach(function(e6) {
1351                  i(t4, e6, r5[e6]);
1352                }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t4, Object.getOwnPropertyDescriptors(r5)) : o(Object(r5)).forEach(function(e6) {
1353                  Object.defineProperty(t4, e6, Object.getOwnPropertyDescriptor(r5, e6));
1354                });
1355              }
1356              return t4;
1357            })({}, e4.obj), v(e4, r4), e4._gatherChildSchemas();
1358            for (var S2 = 0, j = n3; S2 < j.length; S2++) {
1359              var P = j[S2];
1360              delete e4.paths[P];
1361            }
1362            e4.childSchemas.forEach(function(t4) {
1363              t4.model.prototype.$__setSchema(t4.schema);
1364            });
1365            var A = {};
1366            A[w] = { default: $, select: true, set: function(t4) {
1367              if (t4 === $ || Array.isArray($) && m.deepEqual(t4, $)) return $;
1368              throw new Error(`Can't set discriminator key "` + w + '"');
1369            }, $skipDiscriminatorCheck: true }, A[w][e4.options.typeKey] = O ? O.options[e4.options.typeKey] : String, e4.add(A), e4.discriminatorMapping = { key: w, value: $, isRoot: false }, r4.options.collection && (e4.options.collection = r4.options.collection);
1370            var E = e4.options.toJSON, x = e4.options.toObject, T = e4.options._id, k = e4.options.id, N = Object.keys(e4.options);
1371            e4.options.discriminatorKey = r4.options.discriminatorKey;
1372            for (var I = e4._userProvidedOptions, B = 0, M = N; B < M.length; B++) {
1373              var D = M[B];
1374              if (!g[D] && D in I && !m.deepEqual(e4.options[D], r4.options[D])) throw new Error("Can't customize discriminator option " + D + " (can only modify " + Object.keys(g).join(", ") + ")");
1375            }
1376            e4.options = y(r4.options);
1377            for (var R = 0, U = Object.keys(I); R < U.length; R++) {
1378              var C = U[R];
1379              e4.options[C] = I[C];
1380            }
1381            E && (e4.options.toJSON = E), x && (e4.options.toObject = x), void 0 !== T && (e4.options._id = T), e4.options.id = k, l2 && (e4.s.hooks = t3.schema.s.hooks.merge
1381(e4.s.hooks)), a2 && (e4.plugins = Array.prototype.slice.call(r4.plugins)), e4.callQueue = r4.callQueue.concat(e4.callQueue), delete e4._requiredpaths;
1382          })(r3, t3.schema), t3.discriminators || (t3.discriminators = {}), t3.schema.discriminatorMapping || (t3.schema.discriminatorMapping = { key: w, value: null, isRoot: true }), t3.schema.discriminators || (t3.schema.discriminators = {}), t3.schema.discriminators[e3] = r3, t3.discriminators[e3] && !r3.options.overwriteModels && !f2) throw new Error('Discriminator with name "' + e3 + '" already exists');
1383          return r3;
1384        };
1385      }, 1505: (t2) => {
1386        t2.exports = function(t3, e2, r2, n, o) {
1387          var i = null != e2 && false === e2.updatedAt, s = null != e2 && false === e2.createdAt, a = null != r2 ? r2() : t3.ownerDocument().constructor.base.now();
1388          if (!s && (t3.isNew || t3.$isSubdocument) && n && !t3.$__getValue(n) && t3.$__isSelected(n) && t3.$set(n, a, void 0, { overwriteImmutable: true }), !i && o && (t3.isNew || t3.$isModified())) {
1389            var u = a;
1390            t3.isNew && null != n && (u = t3.$__getValue(n)), t3.$set(o, u);
1391          }
1392        };
1393      }, 1635: (t2, e2, r2) => {
1394        function n(t3) {
1395          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
1396            return typeof t4;
1397          } : function(t4) {
1398            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
1399          }, n(t3);
1400        }
1401        function o() {
1402          try {
1403            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1404            }));
1405          } catch (t4) {
1406          }
1407          return (o = function() {
1408            return !!t3;
1409          })();
1410        }
1411        function i(t3) {
1412          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
1413            return t4.__proto__ || Object.getPrototypeOf(t4);
1414          }, i(t3);
1415        }
1416        function s(t3, e3) {
1417          return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
1418            return t4.__proto__ = e4, t4;
1419          }, s(t3, e3);
1420        }
1421        var a = (function(t3) {
1422          function e3(t4) {
1423            return (function(t5, e4) {
1424              if (!(t5 instanceof e4)) throw new TypeError("Cannot call a class as a function");
1425            })(this, e3), (function(t5, e4, r4) {
1426              return e4 = i(e4), (function(t6, e5) {
1427                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
1428                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
1429                return (function(t7) {
1430                  if (void 0 === t7) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1431                  return t7;
1432                })(t6);
1433              })(t5, o() ? Reflect.construct(e4, r4 || [], i(t5).constructor) : e4.apply(t5, r4));
1434            })(this, e3, ["Can't validate() the same doc multiple times in parallel. Document: " + t4._doc._id]);
1435          }
1436          return (function(t4, e4) {
1437            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
1438            t4.prototype = Object.create(e4 && e4.prototype, { constructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && s(t4, e4);
1439          })(e3, t3), r3 = e3, Object.defineProperty(r3, "prototype", { writable: false }), r3;
1440          var r3;
1441        })(r2(8213));
1442        Object.defineProperty(a.prototype, "name", { value: "ParallelValidateError" }), t2.exports = a;
1443      }, 1679: (t2) => {
1444        "function" == typeof Object.create ? t2.exports = function(t3, e2) {
1445          e2 && (t3.super_ = e2, t3.prototype = Object.create(e2.prototype, { constructor: { value: t3, enumerable: false, writable: true, configurable: true } }));
1446        } : t2.exports = function(t3, e2) {
1447          if (e2) {
1448            t3.super_ = e2;
1449            var r2 = function() {
1450            };
1451            r2.prototype = e2.prototype, t3.prototype = new r2(), t3.prototype.constructor = t3;
1452          }
1453        };
1454      }, 1697: (t2) => {
1455        t2.exports = Math.max;
1456      }, 1732: (t2, e2, r2) => {
1457        function n(t3) {
1458          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
1459            return typeof t4;
1460          } : function(t4) {
1461            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
1462          }, n(t3);
1463        }
1464        function o(t3, e3) {
1465          var r3 = Object.keys(t3);
1466          if (Object.getOwnPropertySymbols) {
1467            var n2 = Object.getOwnPropertySymbols(t3);
1468            e3 && (n2 = n2.filter(function(e4) {
1469              return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
1470            })), r3.push.apply(r3, n2);
1471          }
1472          return r3;
1473        }
1474        function i(t3) {
1475          for (var e3 = 1; e3 < arguments.length; e3++) {
1476            var r3 = null != arguments[e3] ? arguments[e3] : {};
1477            e3 % 2 ? o(Object(r3), true).forEach(function(e4) {
1478              s(t3, e4, r3[e4]);
1479            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t3, Object.getOwnPropertyDescriptors(r3)) : o(Object(r3)).forEac
1479h(function(e4) {
1480              Object.defineProperty(t3, e4, Object.getOwnPropertyDescriptor(r3, e4));
1481            });
1482          }
1483          return t3;
1484        }
1485        function s(t3, e3, r3) {
1486          return (e3 = (function(t4) {
1487            var e4 = (function(t5) {
1488              if ("object" != n(t5) || !t5) return t5;
1489              var e5 = t5[Symbol.toPrimitive];
1490              if (void 0 !== e5) {
1491                var r4 = e5.call(t5, "string");
1492                if ("object" != n(r4)) return r4;
1493                throw new TypeError("@@toPrimitive must return a primitive value.");
1494              }
1495              return String(t5);
1496            })(t4);
1497            return "symbol" == n(e4) ? e4 : e4 + "";
1498          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
1499        }
1500        var a = r2(3609), u = r2(6426), c = r2(3704), l = r2(4327);
1501        function f(t3, e3) {
1502          u.call(this, t3, e3, "Double");
1503        }
1504        function p(t3) {
1505          return this.cast(t3);
1506        }
1507        f.schemaName = "Double", f.defaultOptions = {}, f.prototype = Object.create(u.prototype), f.prototype.constructor = f, f._cast = c, f.set = u.set, f.setters = [], f.get = u.get, f._defaultCaster = function(t3) {
1508          if (null != t3 && "Double" !== t3._bsontype) throw new Error();
1509          return t3;
1510        }, f.cast = function(t3) {
1511          return 0 === arguments.length || (false === t3 && (t3 = this._defaultCaster), this._cast = t3), this._cast;
1512        }, f._checkRequired = function(t3) {
1513          return null != t3;
1514        }, f.checkRequired = u.checkRequired, f.prototype.checkRequired = function(t3) {
1515          return this.constructor._checkRequired(t3);
1516        }, f.prototype.cast = function(t3) {
1517          var e3;
1518          e3 = "function" == typeof this._castFunction ? this._castFunction : "function" == typeof this.constructor.cast ? this.constructor.cast() : f.cast();
1519          try {
1520            return e3(t3);
1521          } catch (e4) {
1522            throw new a("Double", t3, this.path, e4, this);
1523          }
1524        };
1525        var h = i(i({}, u.prototype.$conditionalHandlers), {}, { $gt: p, $gte: p, $lt: p, $lte: p });
1526        Object.defineProperty(f.prototype, "$conditionalHandlers", { enumerable: false, value: h }), f.prototype.toJSONSchema = function(t3) {
1527          var e3 = this.options.required && "function" != typeof this.options.required;
1528          return l("number", "double", null == t3 ? void 0 : t3.useBsonType, e3);
1529        }, f.prototype.autoEncryptionType = function() {
1530          return "double";
1531        }, t2.exports = f;
1532      }, 1793: (t2, e2, r2) => {
1533        var n = r2(7300), o = r2(2789);
1534        t2.exports = function t3(e3) {
1535          if (null == e3) return null;
1536          var r3 = Object.keys(e3), i = null;
1537          if (1 === r3.length && "_id" === r3[0]) i = !e3._id;
1538          else for (var s = 0; s < r3.length; ++s) {
1539            var a, u = r3[s];
1540            if ("_id" !== u && n(e3[u]) && null != (i = o(e3[u]) ? null !== (a = t3(e3[u])) && void 0 !== a ? a : i : !e3[u])) break;
1541          }
1542          return i;
1543        };
1544      }, 1824: (t2, e2, r2) => {
1545        function n(t3) {
1546          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
1547            return typeof t4;
1548          } : function(t4) {
1549            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
1550          }, n(t3);
1551        }
1552        var o = r2(3703);
1553        t2.exports = function(t3, e3, r3, i, s, a) {
1554          var u = i, c = u, l = o(s, "timestamps", true);
1555          if (!l || null == u) return i;
1556          var f, p, h, y = null != l && false === l.createdAt, d = null != l && false === l.updatedAt;
1557          if (a) return i && i.$set && (i = i.$set, u.$set = {}, c = u.$set), d || !r3 || i[r3] || (c[r3] = t3), y || !e3 || i[e3] || (c[e3] = t3), u;
1558          if (i = i || {}, Array.isArray(u)) return null == r3 || u.push({ $set: (f = {}, p = r3, h = t3, (p = (function(t4) {
1559            var e4 = (function(t5) {
1560              if ("object" != n(t5) || !t5) return t5;
1561              var e5 = t5[Symbol.toPrimitive];
1562              if (void 0 !== e5) {
1563                var r4 = e5.call(t5, "string");
1564                if ("object" != n(r4)) return r4;
1565                throw new TypeError("@@toPrimitive must return a primitive value.");
1566              }
1567              return String(t5);
1568            })(t4);
1569            return "symbol" == n(e4) ? e4 : e4 + "";
1570          })(p)) in f ? Object.defineProperty(f, p, { value: h, enumerable: true, configurable: true, writable: true }) : f[p] = h, f) }), u;
1571          if (u.$set = u.$set || {}, !d && r3 && (!i.$currentDate || !i.$currentDate[r3])) {
1572            var b = false;
1573            if (-1 !== r3.indexOf(".")) for (var m = r3.split("."), v = 1; v < m.length; ++v) {
1574              var g = m.slice(-v).join("."), _ = m.slice(0, -v).join(".");
1575              if (null != i[_]) {
1576                i[_][g] = t3, b = true;
1577                break;
1578              }
1579              if (i.$set && i.$set[_]) {
1580                i.$set[_][g] = t3, b = true;
1581                break;
1582              }
1583            }
1584            b || (u.$set[r3] = t3), u.hasOwnProperty(r3) && delete u[r3];
1585          }
1586          if (!y && e3) {
1587            i[e3] && delete i[e3], i.$set && i.$set[e3] && delete i.$set[e3];
1588            var w = false;
1589            if (-1 !== e3.indexOf(".")) for (var O = e3.split("."), S = 1; S < O.length; ++S) {
1590              var $ = O.slice(-S).join("."), j = O.slice(0, -S).join(".");
1591              if (null != i[j]) {
1592                i[j][$] = t3, w = true;
1593                break;
1594              }
1595              if (i.$set && i.$set[j]) {
1596                i.$set[j][$] = t3, w = true;
1597                break;
1598              }
1599            }
1600            w || (u.$setOnInsert = u.$setOnInsert || {}, u.$setOnInsert[e3] = t3);
1601          }
1602          return 0 === Object.keys(u.$set).length && delete u.$set, u;
1603        };
1604      }, 1849: (t2, e2, r2) => {
1605        function n(t3, e3) {
1606          (null == e3 || e3 > t3.length) && (e3 = t3.length);
1607          for (var r3 = 0, n2 = Array(e3); r3 < e3; r3++) n2[r3] = t3[r3];
1608          return n2;
1609        }
1610        var o = r2(8768);
1611        t2.exports = function(t3, e3) {
1612          if (null != t3._doc._id && null != e3 && 0 !== e3.length) {
1613            var r3, i = String(t3._doc._id), s = (function(t4, e4) {
1614              var r4 = "undefined" != typeof Symbol && t4[Symbol.iterator] || t4["@@iterator"];
1615              if (!r4) {
1616                if (Array.isArray(t4) || (r4 = (function(t5, e5) {
1617                  if (t5) {
1618                    if ("string" == typeof t5) return n(t5, e5);
1619                    var r5 = {}.toString.call(t5).slice(8, -1);
1620                    return "Object" === r5 && t5.constructor && (r5 = t5.constructor.name), "Map" === r5 || "Set" === r5 ? Array.from(t5) : "Arguments" === r5 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r5) ? n(t5, e5) : void 0;
1621                  }
1622                })(t4)) || e4) {
1623                  r4 && (t4 = r4);
1624                  var o2 = 0, i2 = function() {
1625                  };
1626                  return { s: i2, n: function() {
1627                    return o2 >= t4.length ? { done: true } : { done: false, value: t4[o2++] };
1628                  }, e: function(t5) {
1629                    throw t5;
1630                  }, f: i2 };
1631                }
1632                throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1633              }
1634              var s2, a2 = true, u2 = false;
1635              return { s: function() {
1636                r4 = r4.call(t4);
1637              }, n: function() {
1638                var t5 = r4.next();
1639                return a2 = t5.done, t5;
1640              }, e: function(t5) {
1641                u2 = true, s2 = t5;
1642              }, f: function() {
1643                try {
1644                  a2 || null == r4.return || r4.return();
1645                } finally {
1646                  if (u2) throw s2;
1647                }
1648              } };
1649            })(e3);
1650            try {
1651              for (s.s(); !(r3 = s.n()).done; ) {
1652                var a = r3.value;
1653                if (!a.isVirtual) for (var u = a.path.split("."), c = 0; c < u.length - 1; ++c) {
1654                  var l = u.slice(0, c + 1).join("."), f = u.slice(c + 1).join("."), p = t3.get(l);
1655                  if (null != p && o.isMongooseDocumentArray(p)) {
1656                    for (var h = 0; h < p.length; ++h) p[h] && p[h].populated(f, null == a._docs[i] ? void 0 : a._docs[i][h], a);
1657                    break;
1658                  }
1659                }
1660              }
1661            } catch (t4) {
1662              s.e(t4);
1663            } finally {
1664              s.f();
1665            }
1666          }
1667        };
1668      }, 1875: (t2) => {
1669        t2.exports = function(t3) {
1670          for (var e2, r2 = Object.keys(t3.errors || {}), n = r2.length, o = [], i = 0; i < n; ++i) e2 = r2[i], t3 !== t3.errors[e2] && o.push(e2 + ": " + t3.errors[e2].message);
1671          return o.join(", ");
1672        };
1673      }, 1898: (t2, e2, r2) => {
1674        e2.saveSubdocs = r2(4432), e2.sharding = r2(2824), e2.trackTransaction = r2(5889), e2.validateBeforeSave = r2(9848);
1675      }, 1905: (t2, e2, r2) => {
1676        var n, o = r2(3071), i = r2(2724)(/^\s*(?:function)?\*/), s = r2(953)(), a = r2(209), u = o("Object.prototype.toString"), c = o("Function.prototype.toString");
1677        t2.exports = function(t3) {
1678          if ("function" != typeof t3) return false;
1679          if (i(c(t3))) return true;
1680          if (!s) return "[object GeneratorFunction]" === u(t3);
1681          if (!a) return false;
1682          if (void 0 === n) {
1683            var e3 = (function() {
1684              if (!s) return false;
1685              try {
1686                return Function("return function*() {}")();
1687              } catch (t4) {
1688              }
1689            })();
1690            n = !!e3 && a(e3);
1691          }
1692          return a(t3) === n;
1693        };
1694      }, 2003: (t2, e2, r2) => {
1695        var n = r2(3703), o = r2(608), i = r2(2423);
1696        t2.exports = function(t3) {
1697          var e3 = [], r3 = /* @__PURE__ */ new WeakMap(), s = t3.constructor.indexTypes, a = /* @__PURE__ */ new Map();
1698          return (function t4(u, c, l) {
1699            if (!r3.has(u)) {
1700              r3.set(u, true), c = c || "";
1701              for (var f = 0, p = Object.keys(u.paths); f < p.length; f++) {
1702                var h = p[f], y = u.paths[h];
1703                if (null == l || !l.paths[h]) {
1704                  if (null != y._duplicateKeyErrorMessage && (u._duplicateKeyErrorMessagesByPath = u._duplicateKeyErrorMessagesByPath || {}, u._duplicateKeyErrorMessagesByPath[h] = y._duplicateKeyErrorMessage), y.$isMongooseDocumentArray || y.$isSingleNested) {
1705                    if (true !== n(y, "options.excludeIndexes") && true !== n(y, "schemaOptions.excludeIndexes") && true !== n(y, "schema.options.excludeIndexes") && t4(y.schema, c + h + "."), null != y.schema.discriminators) for (var d = y.schema.discriminators, b = 0, m = Object.keys(d); b < m.length; b++) {
1706                      t4(d[m[b]], c + h + ".", y.schema);
1707                    }
1708                    if (y.$isMongooseDocumentArray) continue;
1709                  }
1710                  var v = y._index || y.caster && y.caster._index;
1711                  if (false !== v && null != v) {
1712                    var g = {}, _ = o(v), w = _ ? v : {}, O = "string" == typeof v ? v : !!_ && v.type;
1713                    if (O && -1 !== s.indexOf(O)) g[c + h] = O;
1714                    else if (w.text) g[c + h] = "text", delete w.text;
1715                    else {
1716                      var S;
1717                      S = "descending" === v || "desc" === v || "ascending" !== v && "asc" !== v && -1 === Number(v), g[c + h] = S ? -1 : 1;
1718                    }
1719                    delete w.type, "background" in w || (w.background = true), null != u.options.autoIndex && (w._autoIndex = u.options.autoIndex);
1720                    var $ = w && w.name;
1721                    "string" == typeof $ && a.has($) ? Object.assign(a.get($), g) : (e3.push([g, w]), a.set($, g));
1722                  }
1723                }
1724              }
1725              r3.delete(u), c ? (function(t5, r4) {
1726                for (var n2 = t5._indexes, o2 = n2.length, i2 = 0; i2 < o2; ++i2) {
1727                  for (var s2 = n2[i2][0], a2 = n2[i2][1], u2 = Object.keys(s2), c2 = u2.length, l2 = {}, f2 = 0; f2 < c2; ++f2) {
1728                    var p2 = u2[f2];
1729                    l2[r4 + p2] = s2[p2];
1730                  }
1731                  var h2 = Object.assign({}, a2);
1732                  if (null != a2 && null != a2.partialFilterExpression) {
1733                    h2.partialFilterExpression = {};
1734                    for (var y2 = a2.partialFilterExpression, d2 = 0, b2 = Object.keys(y2); d2 < b2.length; d2++) {
1735                      var m2 = b2[d2];
1736                      h2.partialFilterExpression[r4 + m2] = y2[m2];
1737                    }
1738                  }
1739                  e3.push([l2, h2]);
1740                }
1741              })(u, c) : (u._indexes.forEach(function(t5) {
1742                var e4 = t5[1];
1743                "background" in e4 || (e4.background = true), i(u, e4);
1744              }), e3 = e3.concat(u._indexes));
1745            }
1746          })(t3), e3;
1747        };
1748      }, 2064: (t2, e2, r2) => {
1749        var n = r2(2273), o = r2(9122), i = r2(4756), s = r2(2481), a = r2(9247), u = o(s(), Object);
1750        n(u, { getPolyfill: s, implementation: i, shim: a }), t2.exports = u;
1751      }, 2068: (t2, e2, r2) => {
1752        var n, o = r2(4450), i = r2(7930).documentSchemaSymbol, s = r2(3303)._, a = r2(8768), u = r2(7930).getSymbol, c = r2(7930).scopeSymbol, l = a.isPOJO;
1753        e2.w = h, e2.X = y;
1754        var f = Object.freeze({ minimize: true, virtuals: false, getters: false, transform: false }), p = Object.freeze({ noDottedPath: true });
1755        function h(t3, e3, o2, i2) {
1756          n = n || r2(2400);
1757          for (var s2 = i2.typeKey, a2 = 0, u2 = Object.keys(t3); a2 < u2.length; a2++) {
1758            var c2 = u2[a2], f2 = t3[c2];
1759            y({ prop: c2, subprops: l(f2) && Object.keys(f2).length > 0 && (!f2[s2] || "type" === s2 && l(f2.type) && f2.type.type) ? f2 : null, prototype: e3, prefix: o2, options: i2 });
1760          }
1761        }
1762        function y(t3) {
1763          var e3 = t3.prop, a2 = t3.subprops, l2 = t3.prototype, y2 = t3.prefix, d = t3.options;
1764          n = n || r2(2400);
1765          var b = (y2 ? y2 + "." : "") + e3, m = (y2 = y2 || "") ? Object.freeze({}) : p;
1766          a2 ? Object.defineProperty(l2, e3, { enumerable: true, configurable: true, get: function() {
1767            var t4, e4, r3 = this;
1768            if (this.$__.getters || (this.$__.getters = {}), !this.$__.getters[b]) {
1769              var s2 = Object.create(n.prototype, (t4 = this, e4 = {}, Object.getOwnPropertyNames(t4).forEach(function(r4) {
1770                -1 === ["isNew", "$__", "$errors", "errors", "_doc", "$locals", "$op", "__parentArray", "__index", "$isDocumentArrayElement"].indexOf(r4) || (e4[r4] = Object.getOwnPropertyDescriptor(t4, r4), e4[r4].enumerable = false);
1771              }), e4));
1772              y2 || (s2.$__[c] = this), s2.$__.nestedPath = b, Object.defineProperty(s2, "schema", { enumerable: false, configurable: true, writable: false, value: l2.schema }), Object.defineProperty(s2, "$__schema", { enumerable: false, configurable: true, writable: false, value: l2.schema }), Object.defineProperty(s2, i, { enumerable: false, configurable: true, writable: false, value: l2.schema }), Object.defineProperty(s2, "toObject", { enumerable: false, configurable: true, writable: false, value: function() {
1773                return o(r3.get(b, null, { virtuals: this && this.schema && this.schema.options && this.schema.options.toObject && this.schema.options.toObject.virtuals || null }));
1774              } }), Object.defineProperty(s2, "$__get", { enumerable: false, configurable: true, writable: false, value: function() {
1775                return r3.get(b, null, { virtuals: this && this.schema && this.schema.options && this.schema.options.toObject && this.schema.options.toObject.virtuals || null });
1776              } }), Object.defineProperty(s2, "toJSON", { enumerable: false, configurable: true, writable: false, value: function() {
1777                return r3.get(b, null, { virtuals: this && this.schema && this.schema.options && this.schema.options.toJSON && this.schema.options.toJSON.virtuals || null });
1778              } }), Object.defineProperty(s2, "$__isNested", { enumerable: false, configurable: true, writable: false, value: true }), Object.defineProperty(s2, "$isEmpty", { enumerable: false, configurable: true, writable: false, value: function() {
1779                return 0 === Object.keys(this.get(b, null, f) || {}).length;
1780              } }), Object.defineProperty(s2, "$__parent", { enumerable: false, configurable: true, writable: false, value: this }), h(a2, s2, b, d), this.$__.getters[b] = s2;
1781            }
1782            return this.$__.getters[b];
1783          }, set: function(t4) {
1784            null != t4 && t4.$__isNested ? t4 = t4.$__get() : t4 instanceof n && !t4.$__isNested && (t4 = t4.$toObject(s)), (this.$__[c] || this).$set(b, t4);
1785          } }) : Object.defineProperty(l2, e3, { enumerable: true, configurable: true, get: function() {
1786            return this[u].call(this.$__[c] || this, b, null, m);
1787          }, set: function(t4) {
1788            this.$set.call(this.$__[c] || this, b, t4);
1789          } });
1790        }
1791      }, 2069: (t2, e2, r2) => {
1792        function i(t3, e3, r3) {
1793          return Object.defineProperty(t3, "prototype", { writable: false }), t3;
1794        }
1795        var a = r2(5761), u = i(function t3(e3) {
1796          !(function(t4, e4) {
1797            if (!(t4 instanceof e4)) throw new TypeError("Cannot call a class as a function");
1798          })(this, t3), Object.assign(this, e3), null != e3 && null != e3.options && (this.options = Object.assign({}, e3.options));
1799        });
1800        Object.defineProperty(u.prototype, "ref", a), Object.defineProperty(u.prototype, "refPath", a), Object.defineProperty(u.prototype, "localField", a), Object.defineProperty(u.prototype, "foreignField", a), Object.defineProperty(u.prototype, "justOne", a), Object.defineProperty(u.prototype, "count", a), Object.defineProperty(u.prototype, "match", a), Object.defineProperty(u.prototype, "options", a), Object.defineProperty(u.prototype, "skip", a), Object.defineProperty(u.prototype, "limit", a), Object.defineProperty(u.prototype, "perDocumentLimit", a), t2.exports = u;
1801      }, 2073: (t2) => {
1802        t2.exports = function t3(e2) {
1803          if (!Array.isArray(e2)) return { min: 0, max: 0, containsNonArrayItem: true };
1804          if (0 === e2.length) return { min: 1, max: 1, containsNonArrayItem: false };
1805          if (1 === e2.length && !Array.isArray(e2[0])) return { min: 1, max: 1, containsNonArrayItem: false };
1806          for (var r2 = t3(e2[0]), n = 1; n < e2.length; ++n) {
1807            var o = t3(e2[n]);
1808            o.min < r2.min && (r2.min = o.min), o.max > r2.max && (r2.max = o.max), r2.containsNonArrayItem = r2.containsNonArrayItem || o.containsNonArrayItem;
1809          }
1810          return r2.min = r2.min + 1, r2.max = r2.max + 1, r2;
1811        };
1812      }, 2081: (t2, e2, r2) => {
1813        function n(t3) {
1814          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
1815            return typeof t4;
1816          } : function(t4) {
1817            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
1818          }, n(t3);
1819        }
1820        function o(t3, e3) {
1821          var r3 = "undefined" != typeof Symbol && t3[Symbol.iterator] || t3["@@iterator"];
1822          if (!r3) {
1823            if (Array.isArray(t3) || (r3 = (function(t4, e4) {
1824              if (t4) {
1825                if ("string" == typeof t4) return i(t4, e4);
1826                var r4 = {}.toString.call(t4).slice(8, -1);
1827                return "Object" === r4 && t4.constructor && (r4 = t4.constructor.name), "Map" === r4 || "Set" === r4 ? Array.from(t4) : "Arguments" === r4 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r4) ? i(t4, e4) : void 0;
1828              }
1829            })(t3)) || e3) {
1830              r3 && (t3 = r3);
1831              var n2 = 0, o2 = function() {
1832              };
1833              return { s: o2, n: function() {
1834                return n2 >= t3.length ? { done: true } : { done: false, value: t3[n2++] };
1835              }, e: function(t4) {
1836                throw t4;
1837              }, f: o2 };
1838            }
1839            throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1840          }
1841          var s2, a2 = true, u2 = false;
1842          return { s: function() {
1843            r3 = r3.call(t3);
1844          }, n: function() {
1845            var t4 = r3.next();
1846            return a2 = t4.done, t4;
1847          }, e: function(t4) {
1848            u2 = true, s2 = t4;
1849          }, f: function() {
1850            try {
1851              a2 || null == r3.return || r3.return();
1852            } finally {
1853              if (u2) throw s2;
1854            }
1855          } };
1856        }
1857        function i(t3, e3) {
1858          (null == e3 || e3 > t3.length) && (e3 = t3.length);
1859          for (var r3 = 0, n2 = Array(e3); r3 < e3; r3++) n2[r3] = t3[r3];
1860          return n2;
1861        }
1862        function s(t3, e3) {
1863          for (var r3 = 0; r3 < e3.length; r3++) {
1864            var n2 = e3[r3];
1865            n2.enumerable = n2.enumerable || false, n2.configurable = true, "value" in n2 && (n2.writable = true), Object.defineProperty(t3, a(n2.key), n2);
1866          }
1867        }
1868        function a(t3) {
1869          var e3 = (function(t4) {
1870            if ("object" != n(t4) || !t4) return t4;
1871            var e4 = t4[Symbol.toPrimitive];
1872            if (void 0 !== e4) {
1873              var r3 = e4.call(t4, "string");
1874              if ("object" != n(r3)) return r3;
1875              throw new TypeError("@@toPrimitive must return a primitive value.");
1876            }
1877            return String(t4);
1878          })(t3);
1879          return "symbol" == n(e3) ? e3 : e3 + "";
1880        }
1881        function u(t3, e3, r3, n2) {
1882          var o2 = c(h(t3.prototype), e3, r3);
1883          return 2 & n2 && "function" == typeof o2 ? function(t4) {
1884            return o2.apply(r3, t4);
1885          } : o2;
1886        }
1887        function c() {
1888          return c = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function(t3, e3, r3) {
1889            var n2 = (function(t4, e4) {
1890              for (; !{}.hasOwnProperty.call(t4, e4) && null !== (t4 = h(t4)); ) ;
1891              return t4;
1892            })(t3, e3);
1893            if (n2) {
1894              var o2 = Object.getOwnPropertyDescriptor(n2, e3);
1895              return o2.get ? o2.get.call(arguments.length < 3 ? t3 : r3) : o2.value;
1896            }
1897          }, c.apply(null, arguments);
1898        }
1899        function l(t3) {
1900          var e3 = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0;
1901          return l = function(t4) {
1902            if (null === t4 || !(function(t5) {
1903              try {
1904                return -1 !== Function.toString.call(t5).indexOf("[native code]");
1905              } catch (e4) {
1906                return "function" == typeof t5;
1907              }
1908            })(t4)) return t4;
1909            if ("function" != typeof t4) throw new TypeError("Super expression must either be null or a function");
1910            if (void 0 !== e3) {
1911              if (e3.has(t4)) return e3.get(t4);
1912              e3.set(t4, r3);
1913            }
1914            function r3() {
1915              return (function(t5, e4, r4) {
1916                if (f()) return Reflect.construct.apply(null, arguments);
1917                var n2 = [null];
1918                n2.push.apply(n2, e4);
1919                var o2 = new (t5.bind.apply(t5, n2))();
1920                return r4 && p(o2, r4.prototype), o2;
1921              })(t4, arguments, h(this).constructor);
1922            }
1923            return r3.prototype = Object.create(t4.prototype, { constructor: { value: r3, enumerable: false, writable: true, configurable: true } }), p(r3, t4);
1924          }, l(t3);
1925        }
1926        function f() {
1927          try {
1928            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1929            }));
1930          } catch (t4) {
1931          }
1932          return (f = function() {
1933            return !!t3;
1934          })();
1935        }
1936        function p(t3, e3) {
1937          return p = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
1938            return t4.__proto__ = e4, t4;
1939          }, p(t3, e3);
1940        }
1941        function h(t3) {
1942          return h = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
1943            return t4.__proto__ || Object.getPrototypeOf(t4);
1944          }, h(t3);
1945        }
1946        var y = r2(5022), d = r2(8213), b = r2(4450), m = r2(8768).deepEqual, v = r2(8260), g = r2(3216), _ = r2(7352), w = r2(2793), O = r2(3305), S = r2(4473), $ = r2(7930).populateModelSymbol, j = (function(t3) {
1947          function e3(t4, r4, o2, i3) {
1948            var s2;
1949            return (function(t5, e4) {
1950              if (!(t5 instanceof e4)) throw new TypeError("Cannot call a class as a function");
1951            })(this, e3), "Object" === v(t4) && (t4 = Object.keys(t4).reduce(function(e4, r5) {
1952              return e4.concat([[r5, t4[r5]]]);
1953            }, [])), (s2 = (function(t5, e4, r5) {
1954              return e4 = h(e4), (function(t6, e5) {
1955                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
1956                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
1957                return (function(t7) {
1958                  if (void 0 === t7) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1959                  return t7;
1960                })(t6);
1961              })(t5, f() ? Reflect.construct(e4, r5 || [], h(t5).constructor) : e4.apply(t5, r5));
1962            })(this, e3, [t4])).$__parent = null != o2 && null != o2.$__ ? o2 : null, s2.$__path = r4, s2.$__schemaType = null == i3 ? new y(r4) : i3, s2.$__runDeferred(), s2;
1963          }
1964          return (function(t4, e4) {
1965            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
1966            t4.prototype = Object.create(e4 && e4.prototype, { constructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && p(t4, e4);
1967          })(e3, t3), r3 = e3, i2 = [{ key: "$init", value: function(t4, r4) {
1968            P(t4), u(e3, "set", this, 3)([t4, r4]), null != r4 && r4.$isSingleNested && (r4.$basePath = this.$__path + "." + t4);
1969          } }, { key: "$__set", value: function(t4, r4) {
1970            u(e3, "set", this, 3)([t4, r4]);
1971          } }, { key: "get", value: function(t4, r4) {
1972            return O(t4, "ObjectId") && (t4 = t4.toString()), false === (r4 = r4 || {}).getters ? u(e3, "get", this, 3)([t4]) : this.$__schemaType.applyGetters(u(e3, "get", this, 3)([t4]), this.$__parent);
1973          } }, { key: "set", value: function(t4, r4) {
1974            if (O(t4, "ObjectId") && (t4 = t4.toString()), P(t4), r4 = g(r4), null == this.$__schemaType) return this.$__deferred = this.$__deferred || [], void this.$__deferred.push({ key: t4, value: r4 });
1975            var n2, o2 = this.$__parent, i3 = null != o2 && o2.$__ && o2.$__.populated ? o2.$populated(l2.call(this), true) || o2.$populated(this.$__path, true) : null, s2 = this.get(t4);
1976            if (null != i3) {
1977              if (this.$__schemaType.$isSingleNested) throw new d("Cannot manually populate single nested subdoc underneath Map " + 'at path "'.concat(this.$__path, '". Try using an array instead of a Map.'));
1978              Array.isArray(r4) && this.$__schemaType.$isMongooseArray ? r4 = r4.map(function(t5) {
1979                return null == t5.$__ && (t5 = new i3.options[$](t5)), t5.$__.wasPopulated = { value: t5._doc._id }, t5;
1980              }) : null != r4 && (null == r4.$__ && (r4 = new i3.options[$](r4)), r4.$__.wasPopulated = { value: r4._doc._id });
1981            } else try {
1982              var a2 = this.$__schemaType.$isMongooseDocumentArray || this.$__schemaType.$isSingleNested || this.$__schemaType.$isMongooseArray || this.$__schemaType.$isSchemaMap ? { path: l2.call(this) } : null;
1983              r4 = this.$__schemaType.applySetters(r4, this.$__parent, false, this.get(t4), a2);
1984            } catch (t5) {
1985              if (null != this.$__parent && null != this.$__parent.$__) return void this.$__parent.invali
1985date(l2.call(this), t5);
1986              throw t5;
1987            }
1988            if (u(e3, "set", this, 3)([t4, r4]), null != o2 && null != o2.$__ && !m(r4, s2)) {
1989              var c2 = l2.call(this);
1990              o2.markModified(c2), (this.$__schemaType.$isMongooseDocumentArray || this.$__schemaType.$isSingleNested) && S(o2, c2);
1991            }
1992            function l2() {
1993              return n2 || (n2 = this.$__path + "." + t4);
1994            }
1995          } }, { key: "clear", value: function() {
1996            u(e3, "clear", this, 3)([]);
1997            var t4 = this.$__parent;
1998            null != t4 && t4.markModified(this.$__path);
1999          } }, { key: "delete", value: function(t4) {
2000            return O(t4, "ObjectId") && (t4 = t4.toString()), this.set(t4, void 0), u(e3, "delete", this, 3)([t4]);
2001          } }, { key: "toBSON", value: function() {
2002            return new Map(this);
2003          } }, { key: "toObject", value: function(t4) {
2004            if (t4 && t4.flattenMaps) {
2005              var e4, r4 = {}, n2 = o(this.keys());
2006              try {
2007                for (n2.s(); !(e4 = n2.n()).done; ) {
2008                  var i3 = e4.value;
2009                  r4[i3] = b(this.get(i3), t4);
2010                }
2011              } catch (t5) {
2012                n2.e(t5);
2013              } finally {
2014                n2.f();
2015              }
2016              return r4;
2017            }
2018            return new Map(this);
2019          } }, { key: "$toObject", value: function() {
2020            return this.constructor.prototype.toObject.apply(this, arguments);
2021          } }, { key: "toJSON", value: function(t4) {
2022            if ("boolean" != typeof (t4 && t4.flattenMaps) || t4.flattenMaps) {
2023              var e4, r4 = {}, n2 = o(this.keys());
2024              try {
2025                for (n2.s(); !(e4 = n2.n()).done; ) {
2026                  var i3 = e4.value;
2027                  r4[i3] = b(this.get(i3), t4);
2028                }
2029              } catch (t5) {
2030                n2.e(t5);
2031              } finally {
2032                n2.f();
2033              }
2034              return r4;
2035            }
2036            return new Map(this);
2037          } }, { key: "inspect", value: function() {
2038            return new Map(this);
2039          } }, { key: "$__runDeferred", value: function() {
2040            if (this.$__deferred) {
2041              var t4, e4 = o(this.$__deferred);
2042              try {
2043                for (e4.s(); !(t4 = e4.n()).done; ) {
2044                  var r4 = t4.value;
2045                  this.set(r4.key, r4.value);
2046                }
2047              } catch (t5) {
2048                e4.e(t5);
2049              } finally {
2050                e4.f();
2051              }
2052              this.$__deferred = null;
2053            }
2054          } }], i2 && s(r3.prototype, i2), Object.defineProperty(r3, "prototype", { writable: false }), r3;
2055          var r3, i2;
2056        })(l(Map));
2057        function P(t3) {
2058          var e3 = n(t3);
2059          if ("string" !== e3) throw new TypeError("Mongoose maps only support string keys, got ".concat(e3));
2060          if (t3.startsWith("$")) throw new Error('Mongoose maps do not support keys that start with "$", got "'.concat(t3, '"'));
2061          if (t3.includes(".")) throw new Error('Mongoose maps do not support keys that contain ".", got "'.concat(t3, '"'));
2062          if (w.has(t3)) throw new Error('Mongoose maps do not support reserved key name "'.concat(t3, '"'));
2063        }
2064        _.inspect.custom && Object.defineProperty(j.prototype, _.inspect.custom, { enumerable: false, writable: false, configurable: false, value: j.prototype.inspect }), Object.defineProperty(j.prototype, "$__set", { enumerable: false, writable: true, configurable: false }), Object.defineProperty(j.prototype, "$__parent", { enumerable: false, writable: true, configurable: false }), Object.defineProperty(j.prototype, "$__path", { enumerable: false, writable: true, configurable: false }), Object.defineProperty(j.prototype, "$__schemaType", { enumerable: false, writable: true, configurable: false }), Object.defineProperty(j.prototype, "$isMongooseMap", { enumerable: false, writable: false, configurable: false, value: true }), Object.defineProperty(j.prototype, "$__deferredCalls", { enumerable: false, writable: false, configurable: false, value: true }), t2.exports = j;
2065      }, 2097: (t2, e2, r2) => {
2066        function n(t3) {
2067          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
2068            return typeof t4;
2069          } : function(t4) {
2070            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
2071          }, n(t3);
2072        }
2073        function o(t3, e3) {
2074          (null == e3 || e3 > t3.length) && (e3 = t3.length);
2075          for (var r3 = 0, n2 = Array(e3); r3 < e3; r3++) n2[r3] = t3[r3];
2076          return n2;
2077        }
2078        function i(t3, e3, r3) {
2079          return (e3 = (function(t4) {
2080            var e4 = (function(t5) {
2081              if ("object" != n(t5) || !t5) return t5;
2082              var e5 = t5[Symbol.toPrimitive];
2083              if (void 0 !== e5) {
2084                var r4 = e5.call(t5, "string");
2085                if ("object" != n(r4)) return r4;
2086                throw new TypeError("@@toPrimitive must return a primitive value.");
2087              }
2088              return String(t5);
2089            })(t4);
2090            return "symbol" == n(e4) ? e4 : e4 + "";
2091          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
2092        }
2093        var s = r2(9166), a = r2(1824), u = r2(3703), c = r2(3696), l = r2(1505), f = r2(7160), p = /* @__PURE__ */ new Set(["replaceOne", "findOneAndReplace"]);
2094        t2.exports = function(t3, e3) {
2095          var r3 = t3.childSchemas.find(function(t4) {
2096            return !!t4.schema.options.timestamps;
2097          });
2098          if (e3 || r3) {
2099            var n2 = c(e3, "createdAt"), h = c(e3, "updatedAt"), y = null != e3 && e3.hasOwnProperty("currentTime") ? e3.currentTime : null, d = {};
2100            if (t3.$timestamps = { createdAt: n2, updatedAt: h }, n2 && !t3.paths[n2]) {
2101              var b = null != t3.base ? t3.base.get("timestamps.createdAt.immutable") : null, m = null == b || b;
2102              d[n2] = i(i({}, t3.options.typeKey || "type", Date), "immutable", m);
2103            }
2104            h && !t3.paths[h] && (d[h] = Date), t3.add(d), t3.pre("save", function(t4) {
2105              var e4 = u(this, "$__.saveOptions.timestamps");
2106              if (false === e4) return t4();
2107              l(this, e4, y, n2, h), t4();
2108            }), t3.methods.initializeTimestamps = function() {
2109              var t4 = null != y ? y() : this.constructor.base.now();
2110              if (n2 && !this.get(n2) && this.$set(n2, t4), h && !this.get(h) && this.$set(h, t4), this.$isSubdocument) return this;
2111              var e4, r4 = (function(t5, e5) {
2112                var r5 = "undefined" != typeof Symbol && t5[Symbol.iterator] || t5["@@iterator"];
2113                if (!r5) {
2114                  if (Array.isArray(t5) || (r5 = (function(t6, e6) {
2115                    if (t6) {
2116                      if ("string" == typeof t6) return o(t6, e6);
2117                      var r6 = {}.toString.call(t6).slice(8, -1);
2118                      return "Object" === r6 && t6.constructor && (r6 = t6.constructor.name), "Map" === r6 || "Set" === r6 ? Array.from(t6) : "Arguments" === r6 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r6) ? o(t6, e6) : void 0;
2119                    }
2120                  })(t5)) || e5) {
2121                    r5 && (t5 = r5);
2122                    var n3 = 0, i3 = function() {
2123                    };
2124                    return { s: i3, n: function() {
2125                      return n3 >= t5.length ? { done: true } : { done: false, value: t5[n3++] };
2126                    }, e: function(t6) {
2127                      throw t6;
2128                    }, f: i3 };
2129                  }
2130                  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2131                }
2132                var s2, a2 = true, u2 = false;
2133                return { s: function() {
2134                  r5 = r5.call(t5);
2135                }, n: function() {
2136                  var t6 = r5.next();
2137                  return a2 = t6.done, t6;
2138                }, e: function(t6) {
2139                  u2 = true, s2 = t6;
2140                }, f: function() {
2141                  try {
2142                    a2 || null == r5.return || r5.return();
2143                  } finally {
2144                    if (u2) throw s2;
2145                  }
2146                } };
2147              })(this.$getAllSubdocs());
2148              try {
2149                for (r4.s(); !(e4 = r4.n()).done; ) {
2150                  var i2 = e4.value;
2151                  i2.initializeTimestamps && i2.initializeTimestamps();
2152                }
2153              } catch (t5) {
2154                r4.e(t5);
2155              } finally {
2156                r4.f();
2157              }
2158              return this;
2159            }, g[f.builtInMiddleware] = true;
2160            var v = { query: true, model: false };
2161            t3.pre("findOneAndReplace", v, g), t3.pre("findOneAndUpdate", v, g), t3.pre("replaceOne", v, g), t3.pre("update", v, g), t3.pre("updateOne", v, g), t3.pre("updateMany", v, g);
2162          }
2163          function g(t4) {
2164            var e4 = null != y ? y() : this.model.base.now();
2165            p.has(this.op) && null == this.getUpdate() && this.setUpdate({}), a(e4, n2, h, this.getUpdate(), this._mongooseOptions, p.has(this.op)), s(e4, this.getUpdate(), this.model.schema), t4();
2166          }
2167        };
2168      }, 2134: (t2, e2, r2) => {
2169        var n = r2(5832).hp;
2170        function o(t3) {
2171          return o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
2172            return typeof t4;
2173          } : function(t4) {
2174            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
2175          }, o(t3);
2176        }
2177        function i(t3, e3) {
2178          var r3 = Object.keys(t3);
2179          if (Object.getOwnPropertySymbols) {
2180            var n2 = Object.getOwnPropertySymbols(t3);
2181            e3 && (n2 = n2.filter(function(e4) {
2182              return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
2183            })), r3.push.apply(r3, n2);
2184          }
2185          return r3;
2186        }
2187        function s(t3) {
2188          for (var e3 = 1; e3 < arguments.length; e3++) {
2189            var r3 = null != arguments[e3] ? arguments[e3] : {};
2190            e3 % 2 ? i(Object(r3), true).forEach(function(e4) {
2191              a(t3, e4, r3[e4]);
2192            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t3, Object.getOwnPropertyDescriptors(r3)) : i(Object(r3)).forEac
2192h(function(e4) {
2193              Object.defineProperty(t3, e4, Object.getOwnPropertyDescriptor(r3, e4));
2194            });
2195          }
2196          return t3;
2197        }
2198        function a(t3, e3, r3) {
2199          return (e3 = (function(t4) {
2200            var e4 = (function(t5) {
2201              if ("object" != o(t5) || !t5) return t5;
2202              var e5 = t5[Symbol.toPrimitive];
2203              if (void 0 !== e5) {
2204                var r4 = e5.call(t5, "string");
2205                if ("object" != o(r4)) return r4;
2206                throw new TypeError("@@toPrimitive must return a primitive value.");
2207              }
2208              return String(t5);
2209            })(t4);
2210            return "symbol" == o(e4) ? e4 : e4 + "";
2211          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
2212        }
2213        var u = r2(6365), c = r2(6426), l = c.CastError, f = r2(8250), p = r2(4327), h = r2(8768), y = r2(9460), d = f.UUID_FORMAT, b = u.Binary;
2214        function m(t3) {
2215          var e3;
2216          return "string" != typeof t3 && null != t3 ? (e3 = t3.toString("hex")).substring(0, 8) + "-" + e3.substring(8, 12) + "-" + e3.substring(12, 16) + "-" + e3.substring(16, 20) + "-" + e3.substring(20, 32) : t3;
2217        }
2218        function v(t3, e3) {
2219          c.call(this, t3, e3, "UUID"), this.getters.push(function(t4) {
2220            return null != t4 && null != t4.$__ ? t4 : n.isBuffer(t4) ? m(t4) : t4 instanceof b ? m(t4.buffer) : h.isPOJO(t4) && "Buffer" === t4.type && Array.isArray(t4.data) ? m(n.from(t4.data)) : t4;
2221          });
2222        }
2223        function g(t3) {
2224          return this.cast(t3);
2225        }
2226        function _(t3) {
2227          var e3 = this;
2228          return t3.map(function(t4) {
2229            return e3.cast(t4);
2230          });
2231        }
2232        v.schemaName = "UUID", v.defaultOptions = {}, v.prototype = Object.create(c.prototype), v.prototype.constructor = v, v._cast = f, v.get = c.get, v.set = c.set, v.setters = [], v.cast = function(t3) {
2233          return 0 === arguments.length || (false === t3 && (t3 = this._defaultCaster), this._cast = t3), this._cast;
2234        }, v._checkRequired = function(t3) {
2235          return null != t3;
2236        }, v.checkRequired = c.checkRequired, v.prototype.checkRequired = function(t3) {
2237          return n.isBuffer(t3) && (t3 = m(t3)), null != t3 && d.test(t3);
2238        }, v.prototype.cast = function(t3, e3, r3, n2, o2) {
2239          if (h.isNonBuiltinObject(t3) && c._isRef(this, t3, e3, r3)) return this._castRef(t3, e3, r3, o2);
2240          var i2;
2241          i2 = "function" == typeof this._castFunction ? this._castFunction : "function" == typeof this.constructor.cast ? this.constructor.cast() : v.cast();
2242          try {
2243            return i2(t3);
2244          } catch (e4) {
2245            throw new l(v.schemaName, t3, this.path, e4, this);
2246          }
2247        };
2248        var w = s(s({}, c.prototype.$conditionalHandlers), {}, { $bitsAllClear: y, $bitsAnyClear: y, $bitsAllSet: y, $bitsAnySet: y, $all: _, $gt: g, $gte: g, $in: _, $lt: g, $lte: g, $ne: g, $nin: _ });
2249        Object.defineProperty(v.prototype, "$conditionalHandlers", { enumerable: false, value: w }), v.prototype.castForQuery = function(t3, e3, r3) {
2250          var n2;
2251          if (null != t3) {
2252            if (!(n2 = this.$conditionalHandlers[t3])) throw new Error("Can't use " + t3 + " with UUID.");
2253            return n2.call(this, e3, r3);
2254          }
2255          try {
2256            return this.applySetters(e3, r3);
2257          } catch (t4) {
2258            throw t4 instanceof l && t4.path === this.path && null != this.$fullPath && (t4.path = this.$fullPath), t4;
2259          }
2260        }, v.prototype.toJSONSchema = function(t3) {
2261          var e3 = this.options.required && "function" != typeof this.options.required;
2262          return p("string", "binData", null == t3 ? void 0 : t3.useBsonType, e3);
2263        }, v.prototype.autoEncryptionType = function() {
2264          return "binData";
2265        }, t2.exports = v;
2266      }, 2151: (t2) => {
2267        t2.exports = Math.round;
2268      }, 2268: (t2) => {
2269        t2.exports = TypeError;
2270      }, 2273: (t2, e2, r2) => {
2271        function n(t3) {
2272          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
2273            return typeof t4;
2274          } : function(t4) {
2275            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
2276          }, n(t3);
2277        }
2278        var o = r2(668), i = "function" == typeof Symbol && "symbol" === n(Symbol("foo")), s = Object.prototype.toString, a = Array.prototype.concat, u = r2(6750), c = r2(3191)(), l = function(t3, e3, r3, n2) {
2279          if (e3 in t3) {
2280            if (true === n2) {
2281              if (t3[e3] === r3) return;
2282            } else if ("function" != typeof (o2 = n2) || "[object Function]" !== s.call(o2) || !n2()) return;
2283          }
2284          var o2;
2285          c ? u(t3, e3, r3, true) : u(t3, e3, r3);
2286        }, f = function(t3, e3) {
2287          var r3 = arguments.length > 2 ? arguments[2] : {}, n2 = o(e3);
2288          i && (n2 = a.call(n2, Object.getOwnPropertySymbols(e3)));
2289          for (var s2 = 0; s2 < n2.length; s2 += 1) l(t3, n2[s2], e3[n2[s2]], r3[n2[s2]]);
2290        };
2291        f.supportsDescriptors = !!c, t2.exports = f;
2292      }, 2307: (t2, e2, r2) => {
2293        var n = r2(5832).hp;
2294        function o(t3, e3) {
2295          var r3 = Object.keys(t3);
2296          if (Object.getOwnPropertySymbols) {
2297            var n2 = Object.getOwnPropertySymbols(t3);
2298            e3 && (n2 = n2.filter(function(e4) {
2299              return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
2300            })), r3.push.apply(r3, n2);
2301          }
2302          return r3;
2303        }
2304        function i(t3) {
2305          for (var e3 = 1; e3 < arguments.length; e3++) {
2306            var r3 = null != arguments[e3] ? arguments[e3] : {};
2307            e3 % 2 ? o(Object(r3), true).forEach(function(e4) {
2308              s(t3, e4, r3[e4]);
2309            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t3, Object.getOwnPropertyDescriptors(r3)) : o(Object(r3)).forEac
2309h(function(e4) {
2310              Object.defineProperty(t3, e4, Object.getOwnPropertyDescriptor(r3, e4));
2311            });
2312          }
2313          return t3;
2314        }
2315        function s(t3, e3, r3) {
2316          return (e3 = (function(t4) {
2317            var e4 = (function(t5) {
2318              if ("object" != a(t5) || !t5) return t5;
2319              var e5 = t5[Symbol.toPrimitive];
2320              if (void 0 !== e5) {
2321                var r4 = e5.call(t5, "string");
2322                if ("object" != a(r4)) return r4;
2323                throw new TypeError("@@toPrimitive must return a primitive value.");
2324              }
2325              return String(t5);
2326            })(t4);
2327            return "symbol" == a(e4) ? e4 : e4 + "";
2328          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
2329        }
2330        function a(t3) {
2331          return a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
2332            return typeof t4;
2333          } : function(t4) {
2334            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
2335          }, a(t3);
2336        }
2337        var u = r2(6365), c = r2(2945), l = r2(6426), f = r2(4327), p = r2(9460), h = r2(8768), y = u.Binary, d = l.CastError;
2338        function b(t3, e3) {
2339          l.call(this, t3, e3, "Buffer");
2340        }
2341        function m(t3, e3) {
2342          return this.castForQuery(null, t3, e3);
2343        }
2344        b.schemaName = "Buffer", b.defaultOptions = {}, b.prototype = Object.create(l.prototype), b.prototype.constructor = b, b.prototype.OptionsConstructor = c, b._checkRequired = function(t3) {
2345          return !(!t3 || !t3.length);
2346        }, b.set = l.set, b.setters = [], b.get = l.get, b.checkRequired = l.checkRequired, b.prototype.checkRequired = function(t3, e3) {
2347          return l._isRef(this, t3, e3, true) ? !!t3 : this.constructor._checkRequired(t3);
2348        }, b.prototype.cast = function(t3, e3, r3, o2, i2) {
2349          var s2;
2350          if (l._isRef(this, t3, e3, r3)) {
2351            if (t3 && t3.isMongooseBuffer) return t3;
2352            if (n.isBuffer(t3)) return t3 && t3.isMongooseBuffer || (t3 = new u(t3, [this.path, e3]), null != this.options.subtype && (t3._subtype = this.options.subtype)), t3;
2353            if (t3 instanceof y) {
2354              if (s2 = new u(t3.value(true), [this.path, e3]), "number" != typeof t3.sub_type) throw new d("Buffer", t3, this.path, null, this);
2355              return s2._subtype = t3.sub_type, s2;
2356            }
2357            if (null == t3 || h.isNonBuiltinObject(t3)) return this._castRef(t3, e3, r3, i2);
2358          }
2359          if (t3 && t3._id && (t3 = t3._id), t3 && t3.isMongooseBuffer) return t3;
2360          if (n.isBuffer(t3)) return t3 && t3.isMongooseBuffer || (t3 = new u(t3, [this.path, e3]), null != this.options.subtype && (t3._subtype = this.options.subtype)), t3;
2361          if (t3 instanceof y) {
2362            if (s2 = new u(t3.value(true), [this.path, e3]), "number" != typeof t3.sub_type) throw new d("Buffer", t3, this.path, null, this);
2363            return s2._subtype = t3.sub_type, s2;
2364          }
2365          if (null === t3) return t3;
2366          var c2 = a(t3);
2367          if ("string" === c2 || "number" === c2 || Array.isArray(t3) || "object" === c2 && "Buffer" === t3.type && Array.isArray(t3.data)) return "number" === c2 && (t3 = [t3]), s2 = new u(t3, [this.path, e3]), null != this.options.subtype && (s2._subtype = this.options.subtype), s2;
2368          if (h.isPOJO(t3) && (t3.$binary instanceof y || "string" == typeof t3.$binary)) {
2369            var f2 = this.cast(n.from(t3.$binary, "base64"));
2370            if (null != t3.$type) return f2._subtype = t3.$type, f2;
2371          }
2372          throw new d("Buffer", t3, this.path, null, this);
2373        }, b.prototype.subtype = function(t3) {
2374          return this.options.subtype = t3, this;
2375        };
2376        var v = i(i({}, l.prototype.$conditionalHandlers), {}, { $bitsAllClear: p, $bitsAnyClear: p, $bitsAllSet: p, $bitsAnySet: p, $gt: m, $gte: m, $lt: m, $lte: m });
2377        Object.defineProperty(b.prototype, "$conditionalHandlers", { enumerable: false, value: v }), b.prototype.castForQuery = function(t3, e3, r3) {
2378          var n2, o2;
2379          if (null != t3) {
2380            if (!(n2 = this.$conditionalHandlers[t3])) throw new Error("Can't use " + t3 + " with Buffer.");
2381            return n2.call(this, e3);
2382          }
2383          try {
2384            o2 = this.applySetters(e3, r3);
2385          } catch (t4) {
2386            throw t4 instanceof d && t4.path === this.path && null != this.$fullPath && (t4.path = this.$fullPath), t4;
2387          }
2388          return o2 ? o2.toObject({ transform: false, virtuals: false }) : o2;
2389        }, b.prototype.toJSONSchema = function(t3) {
2390          var e3 = this.options.required && "function" != typeof this.options.required;
2391          return f("string", "binData", null == t3 ? void 0 : t3.useBsonType, e3);
2392        }, b.prototype.autoEncryptionType = function() {
2393          return "binData";
2394        }, t2.exports = b;
2395      }, 2345: (t2, e2, r2) => {
2396        function n(t3, e3) {
2397          var r3 = Object.keys(t3);
2398          if (Object.getOwnPropertySymbols) {
2399            var n2 = Object.getOwnPropertySymbols(t3);
2400            e3 && (n2 = n2.filter(function(e4) {
2401              return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
2402            })), r3.push.apply(r3, n2);
2403          }
2404          return r3;
2405        }
2406        function o(t3) {
2407          for (var e3 = 1; e3 < arguments.length; e3++) {
2408            var r3 = null != arguments[e3] ? arguments[e3] : {};
2409            e3 % 2 ? n(Object(r3), true).forEach(function(e4) {
2410              i(t3, e4, r3[e4]);
2411            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t3, Object.getOwnPropertyDescriptors(r3)) : n(Object(r3)).forEac
2411h(function(e4) {
2412              Object.defineProperty(t3, e4, Object.getOwnPropertyDescriptor(r3, e4));
2413            });
2414          }
2415          return t3;
2416        }
2417        function i(t3, e3, r3) {
2418          return (e3 = (function(t4) {
2419            var e4 = (function(t5) {
2420              if ("object" != s(t5) || !t5) return t5;
2421              var e5 = t5[Symbol.toPrimitive];
2422              if (void 0 !== e5) {
2423                var r4 = e5.call(t5, "string");
2424                if ("object" != s(r4)) return r4;
2425                throw new TypeError("@@toPrimitive must return a primitive value.");
2426              }
2427              return String(t5);
2428            })(t4);
2429            return "symbol" == s(e4) ? e4 : e4 + "";
2430          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
2431        }
2432        function s(t3) {
2433          return s = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
2434            return typeof t4;
2435          } : function(t4) {
2436            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
2437          }, s(t3);
2438        }
2439        var a = r2(3672), u = r2(3731), c = r2(6426), l = r2(2477), f = r2(4327), p = r2(8260), h = r2(8768), y = c.CastError;
2440        function d(t3, e3) {
2441          c.call(this, t3, e3, "Date");
2442        }
2443        function b(t3) {
2444          return this.cast(t3);
2445        }
2446        d.schemaName = "Date", d.defaultOptions = {}, d.prototype = Object.create(c.prototype), d.prototype.constructor = d, d.prototype.OptionsConstructor = u, d._cast = l, d.set = c.set, d.setters = [], d.get = c.get, d.cast = function(t3) {
2447          return 0 === arguments.length || (false === t3 && (t3 = this._defaultCaster), this._cast = t3), this._cast;
2448        }, d._defaultCaster = function(t3) {
2449          if (null != t3 && !(t3 instanceof Date)) throw new Error();
2450          return t3;
2451        }, d.prototype.expires = function(t3) {
2452          return "Object" !== p(this._index) && (this._index = {}), this._index.expires = t3, h.expires(this._index), this;
2453        }, d._checkRequired = function(t3) {
2454          return t3 instanceof Date;
2455        }, d.checkRequired = c.checkRequired, d.prototype.checkRequired = function(t3, e3) {
2456          return "object" === s(t3) && c._isRef(this, t3, e3, true) ? null != t3 : ("function" == typeof this.constructor.checkRequired ? this.constructor.checkRequired() : d.checkRequired())(t3);
2457        }, d.prototype.min = function(t3, e3) {
2458          if (this.minValidator && (this.validators = this.validators.filter(function(t4) {
2459            return t4.validator !== this.minValidator;
2460          }, this)), t3) {
2461            var r3 = e3 || a.messages.Date.min;
2462            "string" == typeof r3 && (r3 = r3.replace(/{MIN}/, t3 === Date.now ? "Date.now()" : t3.toString()));
2463            var n2 = this;
2464            this.validators.push({ validator: this.minValidator = function(e4) {
2465              var r4 = t3;
2466              "function" == typeof t3 && t3 !== Date.now && (r4 = r4.call(this));
2467              var o2 = r4 === Date.now ? r4() : n2.cast(r4);
2468              return null === e4 || e4.valueOf() >= o2.valueOf();
2469            }, message: r3, type: "min", min: t3 });
2470          }
2471          return this;
2472        }, d.prototype.max = function(t3, e3) {
2473          if (this.maxValidator && (this.validators = this.validators.filter(function(t4) {
2474            return t4.validator !== this.maxValidator;
2475          }, this)), t3) {
2476            var r3 = e3 || a.messages.Date.max;
2477            "string" == typeof r3 && (r3 = r3.replace(/{MAX}/, t3 === Date.now ? "Date.now()" : t3.toString()));
2478            var n2 = this;
2479            this.validators.push({ validator: this.maxValidator = function(e4) {
2480              var r4 = t3;
2481              "function" == typeof r4 && r4 !== Date.now && (r4 = r4.call(this));
2482              var o2 = r4 === Date.now ? r4() : n2.cast(r4);
2483              return null === e4 || e4.valueOf() <= o2.valueOf();
2484            }, message: r3, type: "max", max: t3 });
2485          }
2486          return this;
2487        }, d.prototype.cast = function(t3) {
2488          var e3;
2489          e3 = "function" == typeof this._castFunction ? this._castFunction : "function" == typeof this.constructor.cast ? this.constructor.cast() : d.cast();
2490          try {
2491            return e3(t3);
2492          } catch (e4) {
2493            throw new y("date", t3, this.path, e4, this);
2494          }
2495        };
2496        var m = o(o({}, c.prototype.$conditionalHandlers), {}, { $gt: b, $gte: b, $lt: b, $lte: b });
2497        Object.defineProperty(d.prototype, "$conditionalHandlers", { enumerable: false, value: m }), d.prototype.castForQuery = function(t3, e3, r3) {
2498          if (null == t3) try {
2499            return this.applySetters(e3, r3);
2500          } catch (t4) {
2501            throw t4 instanceof y && t4.path === this.path && null != this.$fullPath && (t4.path = this.$fullPath), t4;
2502          }
2503          var n2 = this.$conditionalHandlers[t3];
2504          if (!n2) throw new Error("Can't use " + t3 + " with Date.");
2505          return n2.call(this, e3);
2506        }, d.prototype.toJSONSchema = function(t3) {
2507          var e3 = this.options.required && "function" != typeof this.options.required;
2508          return f("string", "date", null == t3 ? void 0 : t3.useBsonType, e3);
2509        }, d.prototype.autoEncryptionType = function() {
2510          return "date";
2511        }, t2.exports = d;
2512      }, 2354: (t2, e2, r2) => {
2513        var n = r2(6730);
2514        t2.exports = Function.prototype.bind || n;
2515      }, 2400: (t2, e2, r2) => {
2516        var n = r2(5832).hp;
2517        function o(t3) {
2518          return (function(t4) {
2519            if (Array.isArray(t4)) return y(t4);
2520          })(t3) || (function(t4) {
2521            if ("undefined" != typeof Symbol && null != t4[Symbol.iterator] || null != t4["@@iterator"]) return Array.from(t4);
2522          })(t3) || h(t3) || (function() {
2523            throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2524          })();
2525        }
2526        function i() {
2527          var t3, e3, r3 = "function" == typeof Symbol ? Symbol : {}, n2 = r3.iterator || "@@iterator", o2 = r3.toStringTag || "@@toStringTag";
2528          function a2(r4, n3, o3, i2) {
2529            var a3 = n3 && n3.prototype instanceof c2 ? n3 : c2, l3 = Object.create(a3.prototype);
2530            return s(l3, "_invoke", (function(r5, n4, o4) {
2531              var i3, s2, a4, c3 = 0, l4 = o4 || [], f3 = false, p3 = { p: 0, n: 0, v: t3, a: h3, f: h3.bind(t3, 4), d: function(e4, r6) {
2532                return i3 = e4, s2 = 0, a4 = t3, p3.n = r6, u2;
2533              } };
2534              function h3(r6, n5) {
2535                for (s2 = r6, a4 = n5, e3 = 0;
vendor: 4,778 bytes, lines 2535-2641
2535 !f3 && c3 && !o5 && e3 < l4.length; e3++) {
2536                  var o5, i4 = l4[e3], h4 = p3.p, y3 = i4[2];
2537                  r6 > 3 ? (o5 = y3 === n5) && (a4 = i4[(s2 = i4[4]) ? 5 : (s2 = 3, 3)], i4[4] = i4[5] = t3) : i4[0] <= h4 && ((o5 = r6 < 2 && h4 < i4[1]) ? (s2 = 0, p3.v = n5, p3.n = i4[1]) : h4 < y3 && (o5 = r6 < 3 || i4[0] > n5 || n5 > y3) && (i4[4] = r6, i4[5] = n5, p3.n = y3, s2 = 0));
2538                }
2539                if (o5 || r6 > 1) return u2;
2540                throw f3 = true, n5;
2541              }
2542              return function(o5, l5, y3) {
2543                if (c3 > 1) throw TypeError("Generator is already running");
2544                for (f3 && 1 === l5 && h3(l5, y3), s2 = l5, a4 = y3; (e3 = s2 < 2 ? t3 : a4) || !f3; ) {
2545                  i3 || (s2 ? s2 < 3 ? (s2 > 1 && (p3.n = -1), h3(s2, a4)) : p3.n = a4 : p3.v = a4);
2546                  try {
2547                    if (c3 = 2, i3) {
2548                      if (s2 || (o5 = "next"), e3 = i3[o5]) {
2549                        if (!(e3 = e3.call(i3, a4))) throw TypeError("iterator result is not an object");
2550                        if (!e3.done) return e3;
2551                        a4 = e3.value, s2 < 2 && (s2 = 0);
2552                      } else 1 === s2 && (e3 = i3.return) && e3.call(i3), s2 < 2 && (a4 = TypeError("The iterator does not provide a '" + o5 + "' method"), s2 = 1);
2553                      i3 = t3;
2554                    } else if ((e3 = (f3 = p3.n < 0) ? a4 : r5.call(n4, p3)) !== u2) break;
2555                  } catch (e4) {
2556                    i3 = t3, s2 = 1, a4 = e4;
2557                  } finally {
2558                    c3 = 1;
2559                  }
2560                }
2561                return { value: e3, done: f3 };
2562              };
2563            })(r4, o3, i2), true), l3;
2564          }
2565          var u2 = {};
2566          function c2() {
2567          }
2568          function l2() {
2569          }
2570          function f2() {
2571          }
2572          e3 = Object.getPrototypeOf;
2573          var p2 = [][n2] ? e3(e3([][n2]())) : (s(e3 = {}, n2, function() {
2574            return this;
2575          }), e3), h2 = f2.prototype = c2.prototype = Object.create(p2);
2576          function y2(t4) {
2577            return Object.setPrototypeOf ? Object.setPrototypeOf(t4, f2) : (t4.__proto__ = f2, s(t4, o2, "GeneratorFunction")), t4.prototype = Object.create(h2), t4;
2578          }
2579          return l2.prototype = f2, s(h2, "constructor", f2), s(f2, "constructor", l2), l2.displayName = "GeneratorFunction", s(f2, o2, "GeneratorFunction"), s(h2), s(h2, o2, "Generator"), s(h2, n2, function() {
2580            return this;
2581          }), s(h2, "toString", function() {
2582            return "[object Generator]";
2583          }), (i = function() {
2584            return { w: a2, m: y2 };
2585          })();
2586        }
2587        function s(t3, e3, r3, n2) {
2588          var o2 = Object.defineProperty;
2589          try {
2590            o2({}, "", {});
2591          } catch (t4) {
2592            o2 = 0;
2593          }
2594          s = function(t4, e4, r4, n3) {
2595            function i2(e5, r5) {
2596              s(t4, e5, function(t5) {
2597                return this._invoke(e5, r5, t5);
2598              });
2599            }
2600            e4 ? o2 ? o2(t4, e4, { value: r4, enumerable: !n3, configurable: !n3, writable: !n3 }) : t4[e4] = r4 : (i2("next", 0), i2("throw", 1), i2("return", 2));
2601          }, s(t3, e3, r3, n2);
2602        }
2603        function a(t3, e3, r3, n2, o2, i2, s2) {
2604          try {
2605            var a2 = t3[i2](s2), u2 = a2.value;
2606          } catch (t4) {
2607            return void r3(t4);
2608          }
2609          a2.done ? e3(u2) : Promise.resolve(u2).then(n2, o2);
2610        }
2611        function u(t3) {
2612          return function() {
2613            var e3 = this, r3 = arguments;
2614            return new Promise(function(n2, o2) {
2615              var i2 = t3.apply(e3, r3);
2616              function s2(t4) {
2617                a(i2, n2, o2, s2, u2, "next", t4);
2618              }
2619              function u2(t4) {
2620                a(i2, n2, o2, s2, u2, "throw", t4);
2621              }
2622              s2(void 0);
2623            });
2624          };
2625        }
2626        function c(t3, e3) {
2627          var r3 = Object.keys(t3);
2628          if (Object.getOwnPropertySymbols) {
2629            var n2 = Object.getOwnPropertySymbols(t3);
2630            e3 && (n2 = n2.filter(function(e4) {
2631              return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
2632            })), r3.push.apply(r3, n2);
2633          }
2634          return r3;
2635        }
2636        function l(t3) {
2637          for (var e3 = 1; e3 < arguments.length; e3++) {
2638            var r3 = null != arguments[e3] ? arguments[e3] : {};
2639            e3 % 2 ? c(Object(r3), true).forEach(function(e4) {
2640              f(t3, e4, r3[e4]);
2641            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t3, Object.getOwnPropertyDescriptors(r3)) : c(Object(r3)).forEac
2641h(function(e4) {
2642              Object.defineProperty(t3, e4, Object.getOwnPropertyDescriptor(r3, e4));
2643            });
2644          }
2645          return t3;
2646        }
2647        function f(t3, e3, r3) {
2648          return (e3 = (function(t4) {
2649            var e4 = (function(t5) {
2650              if ("object" != d(t5) || !t5) return t5;
2651              var e5 = t5[Symbol.toPrimitive];
2652              if (void 0 !== e5) {
2653                var r4 = e5.call(t5, "string");
2654                if ("object" != d(r4)) return r4;
2655                throw new TypeError("@@toPrimitive must return a primitive value.");
2656              }
2657              return String(t5);
2658            })(t4);
2659            return "symbol" == d(e4) ? e4 : e4 + "";
2660          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
2661        }
2662        function p(t3, e3) {
2663          var r3 = "undefined" != typeof Symbol && t3[Symbol.iterator] || t3["@@iterator"];
2664          if (!r3) {
2665            if (Array.isArray(t3) || (r3 = h(t3)) || e3) {
2666              r3 && (t3 = r3);
2667              var n2 = 0, o2 = function() {
2668              };
2669              return { s: o2, n: function() {
2670                return n2 >= t3.length ? { done: true } : { done: false, value: t3[n2++] };
2671              }, e: function(t4) {
2672                throw t4;
2673              }, f: o2 };
2674            }
2675            throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2676          }
2677          var i2, s2 = true, a2 = false;
2678          return { s: function() {
2679            r3 = r3.call(t3);
2680          }, n: function() {
2681            var t4 = r3.next();
2682            return s2 = t4.done, t4;
2683          }, e: function(t4) {
2684            a2 = true, i2 = t4;
2685          }, f: function() {
2686            try {
2687              s2 || null == r3.return || r3.return();
2688            } finally {
2689              if (a2) throw i2;
2690            }
2691          } };
2692        }
2693        function h(t3, e3) {
2694          if (t3) {
2695            if ("string" == typeof t3) return y(t3, e3);
2696            var r3 = {}.toString.call(t3).slice(8, -1);
2697            return "Object" === r3 && t3.constructor && (r3 = t3.constructor.name), "Map" === r3 || "Set" === r3 ? Array.from(t3) : "Arguments" === r3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r3) ? y(t3, e3) : void 0;
2698          }
2699        }
2700        function y(t3, e3) {
2701          (null == e3 || e3 > t3.length) && (e3 = t3.length);
2702          for (var r3 = 0, n2 = Array(e3); r3 < e3; r3++) n2[r3] = t3[r3];
2703          return n2;
2704        }
2705        function d(t3) {
2706          return d = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
2707            return typeof t4;
2708          } : function(t4) {
2709            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
2710          }, d(t3);
2711        }
2712        var b, m, v, g = r2(1417), _ = r2(3550).EventEmitter, w = r2(4224), O = r2(6365), S = r2(3672), $ = r2(5022), j = r2(6140), P = r2(3441), A = r2(1350), E = r2(1635), x = r2(7058), T = r2(8995), k = r2(6949), N = r2(9538), I = r2(6814), B = r2(5335), M = r2(4473), D = r2(4450), R = r2(2068).w, U = r2(2068).X, C = r2(1226), F = r2(7430).B, L = r2(5152), V = r2(791), q = r2(2692), J = r2(3216), z = r2(2746), K = r2(3305), H = r2(7300), W = r2(1793), G = r2(5188), Q = r2(7352).inspect, Y = r2(3303)._, Z = r2(1849), X = r2(6451), tt = r2(5678), et = r2(6223), rt = r2(3892), nt = r2(8768), ot = r2(542), it = nt.deepEqual, st = nt.isMongooseObject, at = r2(7930).arrayAtomicsBackupSymbol, ut = r2(7930).arrayAtomicsSymbol, ct = r2(7930).documentArrayParent, lt = r2(7930).documentIsModified, ft = r2(7930).documentModifiedPaths, pt = r2(7930).documentSchemaSymbol, ht = r2(7930).getSymbol, yt = r2(7930).modelSymbol, dt = r2(7930).populateModelSymbol, bt = r2(7930).scopeSymbol, mt = r2(7160).schemaMixedSymbol, vt = r2(5346), gt = r2(7930).sessionNewDocuments, _t = nt.specialProperties;
2713        function wt(t3, e3, r3, n2) {
2714          if ("object" === d(r3) && null != r3 && (r3 = (n2 = r3).skipId), n2 = Object.assign({}, n2), null == this.$__schema) {
2715            var o2 = nt.isObject(e3) && !e3.instanceOfSchema ? new x(e3) : e3;
2716            this.$__setSchema(o2), e3 = r3, r3 = n2, n2 = arguments[4] || {};
2717          }
2718          if (this.$__ = new w(), null != n2.isNew && true !== n2.isNew && (this.$isNew = n2.isNew), null != n2.priorDoc && (this.$__.priorDoc = n2.priorDoc), r3 && (this.$__.skipId = r3), null != t3 && "object" !== d(t3)) throw new A(t3, "obj", "Document");
2719          var i2 = true;
2720          void 0 !== n2.defaults && (this.$__.defaults = n2.defaults, i2 = n2.defaults);
2721          var s2 = this.$__schema;
2722          "boolean" == typeof e3 || "throw" === e3 ? (true !== e3 && (this.$__.strictMode = e3), e3 = void 0) : true !== s2.options.strict && (this.$__.strictMode = s2.options.strict);
2723          var a2, u2 = p(s2.requiredPaths(true));
2724          try {
2725            for (u2.s(); !(a2 = u2.n()).done; ) {
2726              var c2 = a2.value;
2727              this.$__.activePaths.require(c2);
2728            }
2729          } catch (t4) {
2730            u2.e(t4);
2731          } finally {
2732            u2.f();
2733          }
2734          var l2 = null;
2735          nt.isPOJO(e3) && Object.keys(e3).length > 0 && (l2 = W(e3), this.$__.selected = e3, this.$__.exclude = l2);
2736          var f2 = false === l2 && e3 ? I(e3) : null;
2737          if (null == this._doc && (this.$__buildDoc(t3, e3, r3, l2, f2, false), i2 && B(this, e3, l2, f2, true, null, { skipParentChangeTracking: true })), t3 && (this.$__original_set ? this.$__original_set(t3, void 0, true, n2) : this.$set(t3, void 0, true, n2), t3 instanceof wt && (this.$isNew = t3.$isNew)), n2.willInit && i2 ? n2.skipDefaults && (this.$__.skipDefaults = n2.skipDefaults) : i2 && B(this, e3, l2, f2, false, n2.skipDefaults), !this.$__.strictMode && t3) {
2738            var h2 = this;
2739            Object.keys(this._doc).forEach(function(t4) {
2740              t4 in s2.tree || t4 in s2.methods || t4 in s2.virtuals || t4.startsWith("$") || U({ prop: t4, subprops: null, prototype: h2 });
2741            });
2742          }
2743          !(function(t4) {
2744            var e4 = t4.$__schema && t4.$__schema.callQueue;
2745            if (e4.length) {
2746              var r4, n3 = p(e4);
2747              try {
2748                for (n3.s(); !(r4 = n3.n()).done; ) {
2749                  var o3 = r4.value;
2750                  "pre" !== o3[0] && "post" !== o3[0] && "on" !== o3[0] && t4[o3[0]].apply(t4, o3[1]);
2751                }
2752              } catch (t5) {
2753                n3.e(t5);
2754              } finally {
2755                n3.f();
2756              }
2757            }
2758          })(this);
2759        }
2760        for (var Ot in wt.prototype.$isMongooseDocumentPrototype = true, Object.defineProperty(wt.prototype, "isNew", { get: function() {
2761          return this.$isNew;
2762        }, set: function(t3) {
2763          this.$isNew = t3;
2764        } }), Object.defineProperty(wt.prototype, "errors", { get: function() {
2765          return this.$errors;
2766        }, set: function(t3) {
2767          this.$errors = t3;
2768        } }), wt.prototype.$isNew = true, nt.each(["on", "once", "emit", "listeners", "removeListener", "setMaxListeners", "removeAllListeners", "addListener"], function(t3) {
2769          wt.prototype[t3] = function() {
2770            if (!this.$__.emitter) {
2771              if ("emit" === t3) return;
2772              this.$__.emitter = new _(), this.$__.emitter.setMaxListeners(0);
2773            }
2774            return this.$__.emitter[t3].apply(this.$__.emitter, arguments);
2775          }, wt.prototype["$".concat(t3)] = wt.prototype[t3];
2776        }), wt.prototype.constructor = wt, _.prototype) wt[Ot] = _.prototype[Ot];
2777        function St(t3, e3, r3) {
2778          if (null != t3) for (var n2 = Object.keys(r3.$__schema.paths), o2 = n2.length, i2 = -1 === e3.indexOf(".") ? [e3] : e3.split("."), s2 = 0; s2 < o2; ++s2) {
2779            var a2 = "", u2 = n2[s2];
2780            if (u2.startsWith(e3 + ".")) {
2781              var c2 = r3.$__schema.paths[u2], l2 = c2.splitPath().slice(i2.length), f2 = l2.length;
2782              if (void 0 !== c2.defaultValue) for (var p2 = t3, h2 = 0; h2 < f2 && null != p2; ++h2) {
2783                var y2 = l2[h2];
2784                if (h2 === f2 - 1) {
2785                  if (void 0 !== p2[y2]) break;
2786                  try {
2787                    var d2 = c2.getDefault(r3, false);
2788                    void 0 !== d2 && (p2[y2] = d2);
2789                  } catch (t4) {
2790                    r3.invalidate(e3 + "." + a2, t4);
2791                    break;
2792                  }
2793                  break;
2794                }
2795                a2 += (a2.length ? "." : "") + y2, p2[y2] = p2[y2] || {}, p2 = p2[y2];
2796              }
2797            }
2798          }
2799        }
2800        function $t(t3, e3, r3, n2, o2) {
2801          o2 = o2 || "", null != e3.$__ && (e3 = e3._doc);
2802          for (var i2, s2, a2, u2 = Object.keys(e3), c2 = u2.length, l2 = t3.$__.strictMode, f2 = t3.$__schema, p2 = 0; p2 < c2; ++p2) if (a2 = u2[p2], !_t.has(a2) && (s2 = o2 ? o2 + a2 : a2, i2 = f2.path(s2), !f2.$isRootDiscriminator || t3.$__isSelected(s2))) {
2803            var h2 = e3[a2];
2804            if (!i2 && nt.isPOJO(h2)) r3[a2] || (r3[a2] = {}, l2 || a2 in f2.tree || a2 in f2.methods || a2 in f2.virtuals || (t3[a2] = r3[a2])), $t(t3, h2, r3[a2], n2, s2 + ".");
2805            else if (i2) {
2806              if (r3.hasOwnProperty(a2) && void 0 !== h2 && !n2.hydratedPopulatedDocs && delete r3[a2], null === h2) r3[a2] = i2._castNullish(null);
2807              else if (void 0 !== h2) {
2808                var y2 = null == h2.$__ ? null : h2.$__.wasPopulated;
2809                if (!i2 || y2 || n2.hydratedPopulatedDocs) if (i2 && n2.hydratedPopulatedDocs) {
2810                  var d2;
2811                  r3[a2] = i2.cast(h2, t3, true, void 0, { hydratedPopulatedDocs: true }), r3[a2] && r3[a2].$__ && r3[a2].$__.wasPopulated ? t3.$populated(s2, r3[a2].$__.wasPopulated.value, r3[a2].$__.wasPopulated.options) : Array.isArray(r3[a2]) && r3[a2].length && null !== (d2 = r3[a2][0]) && void 0 !== d2 && null !== (d2 = d2.$__) && void 0 !== d2 && d2.wasPopulated && t3.$populated(s2, r3[a2].map(function(t4) {
2812                    var e4;
2813                    return null == t4 || null === (e4 = t4.$__) || void 0 === e4 || null === (e4 = e4.wasPopulated) || void 0 === e4 ? void 0 : e4.value;
2814                  }).filter(function(t4) {
2815                    return null != t4;
2816                  }), r3[a2][0].$__.wasPopulated.options);
2817                } else r3[a2] = h2;
2818                else try {
2819                  n2 && n2.setters ? r3[a2] = i2.applySetters(h2, t3, false) : r3[a2] = i2.cast(h2, t3, true);
2820                } catch (e4) {
2821                  t3.invalidate(e4.path, new N({ path: e4.path, message: e4.message, type: "cast", value: e4.value, reason: e4 }));
2822                }
2823              }
2824              t3.$isModified(s2) || t3.$__.activePaths.init(s2);
2825            } else r3[a2] = h2, l2 || o2 || (t3[a2] = h2);
2826          }
2827        }
2828        function jt(t3) {
2829          if (null == t3) return true;
2830          if ("object" !== d(t3) || Array.isArray(t3)) return false;
2831          for (var e3 = 0, r3 = Object.keys(t3); e3 < r3.length; e3++) if (!jt(t3[r3[e3]])) return false;
2832          return true;
2833        }
2834        function Pt(t3, e3, r3, n2) {
2835          var o2 = {};
2836          !(function(t4) {
2837            var e4 = Object.keys(t4.$__.activePaths.getStatePaths("require")), r4 = 0, n3 = e4.length;
2838            for (r4 = 0; r4 < n3; ++r4) {
2839              var o3 = e4[r4], i3 = t4.$__schema.path(o3);
2840              if (null != i3 && "function" == typeof i3.originalRequiredValue) {
2841                t4.$__.cachedRequired = t4.$__.cachedRequired || {};
2842                try {
2843                  t4.$__.cachedRequired[o3] = i3.originalRequiredValue.call(t4, t4);
2844                } catch (e5) {
2845                  t4.invalidate(o3, e5);
2846                }
2847              }
2848            }
2849          })(t3);
2850          var i2 = new Set(Object.keys(t3.$__.activePaths.getStatePaths("require")).filter(function(e4) {
2851            return !(!t3.$__isSelected(e4) && !t3.$isModified(e4)) && !e4.endsWith(".$*") && (null == t3.$__.cachedRequired || !(e4 in t3.$__.cachedRequired) || t3.$__.cachedRequired[e4]);
2852          }));
2853          function s2(t4) {
2854            t4.endsWith(".$*") || i2.add(t4);
2855          }
2856          if (Object.keys(t3.$__.activePaths.getStatePaths("init")).forEach(s2), Object.keys(t3.$__.activePaths.getStatePaths("modify")).forEach(s2), Object.keys(t3.$__.activePaths.getStatePaths("default")).forEach(s2), !n2) {
2857            for (var a2 = [], u2 = 0, c2 = Object.keys(t3.$__schema.paths); u2 < c2.length; u2++) {
2858              var l2 = c2[u2], f2 = t3.$__schema.path(l2);
2859              if (f2.$isSingleNested) {
2860                var h2 = t3.$get(l2);
2861                h2 && a2.push(h2);
2862              } else if (f2.$isMongooseDocumentArray) {
2863                var y2 = t3.$get(l2);
2864                if (y2 && y2.length) {
2865                  var d2, b2 = p(y2);
2866                  try {
2867                    for (b2.s(); !(d2 = b2.n()).done; ) {
2868                      var m2 = d2.value;
2869                      m2 && a2.push(m2);
2870                    }
2871                  } catch (t4) {
2872                    b2.e(t4);
2873                  } finally {
2874                    b2.f();
2875                  }
2876                }
2877              }
2878            }
2879            for (var v2 = t3.modifiedPaths(), g2 = 0, _2 = a2; g2 < _2.length; g2++) {
2880              var w2 = _2[g2];
2881              if (w2.$basePath) {
2882                var O2, S2 = w2.$__pathRelativeToParent(), $2 = p(w2.modifiedPaths());
2883                try {
2884                  for ($2.s(); !(O2 = $2.n()).done; ) {
2885                    var j2 = O2.value;
2886                    i2.delete(S2 + "." + j2);
2887                  }
2888                } catch (t4) {
2889                  $2.e(t4);
2890                } finally {
2891                  $2.f();
2892                }
2893                var P2 = w2.$parent();
2894                if (null == P2) throw new Error("Cannot validate subdocument that does not have a parent");
2895                !t3.$isModified(S2, null, v2) || P2.$__.activePaths.getStatePaths("modify").hasOwnProperty(S2) || P2.$isDefault(S2) || (i2.add(S2), null == t3.$__.pathsToScopes && (t3.$__.pathsToScopes = {}), t3.$__.pathsToScopes[S2] = w2.$isDocumentArrayElement ? w2.__parentArray : w2.$parent(), o2[S2] = { skipSchemaValidators: true }, w2.$isDocumentArrayElement && null != w2.__index && (o2[S2].index = w2.__index));
2896              }
2897            }
2898          }
2899          var A2, E2 = p(i2);
2900          try {
2901            for (E2.s(); !(A2 = E2.n()).done; ) {
2902              var x2 = A2.value, T2 = t3.$__schema.path(x2);
2903              if (T2) {
2904                if (T2.$isMongooseDocumentArray) {
2905                  var k2, N2 = p(i2);
2906                  try {
2907                    for (N2.s(); !(k2 = N2.n()).done; ) {
2908                      var I2 = k2.value;
2909                      (null == I2 || I2.startsWith(T2.path + ".")) && i2.delete(I2);
2910                    }
2911                  } catch (t4) {
2912                    N2.e(t4);
2913                  } finally {
2914                    N2.f();
2915                  }
2916                }
2917                (T2.caster || 0 !== T2.validators.length || T2.$parentSchemaDocArray) && (!T2.$isMongooseArray || T2.$isMongooseDocumentArray || T2.$embeddedSchemaType.$isMongooseArray || 0 !== T2.validators.length || 0 !== T2.$embeddedSchemaType.validators.length) || i2.delete(x2);
2918              }
2919            }
2920          } catch (t4) {
2921            E2.e(t4);
2922          } finally {
2923            E2.f();
2924          }
2925          Array.isArray(e3) ? i2 = (function(t4, e4) {
2926            var r4, n3 = new Set(e4), o3 = /* @__PURE__ */ new Map([]), i3 = p(e4);
2927            try {
2928              for (i3.s(); !(r4 = i3.n()).done; ) {
2929                var s3 = r4.value;
2930                if (-1 !== s3.indexOf(".")) for (var a3 = s3.split("."), u3 = a3[0], c3 = 1; c3 < a3.length; ++c3) o3.set(u3, s3), u3 = u3 + "." + a3[c3];
2931              }
2932            } catch (t5) {
2933              i3.e(t5);
2934            } finally {
2935              i3.f();
2936            }
2937            var l3, f3 = /* @__PURE__ */ new Set(), h3 = p(t4);
2938            try {
2939              for (h3.s(); !(l3 = h3.n()).done; ) {
2940                var y3 = l3.value;
2941                n3.has(y3) ? f3.add(y3) : o3.has(y3) && f3.add(o3.get(y3));
2942              }
2943            } catch (t5) {
2944              h3.e(t5);
2945            } finally {
2946              h3.f();
2947            }
2948            return f3;
2949          })(i2, e3) : Array.isArray(r3) && (i2 = (function(t4, e4) {
2950            return e4 = new Set(e4), t4 = Array.from(t4).filter(function(t5) {
2951              return !e4.has(t5);
2952            }), new Set(t4);
2953          })(i2, r3)), (function(t4, e4) {
2954            var r4, n3 = p(e4);
2955            try {
2956              for (n3.s(); !(r4 = n3.n()).done; ) {
2957                var o3 = r4.value, i3 = t4.$__schema.path(o3);
2958                i3 && i3.$isMongooseArray && (Array.isArray(i3) || !i3.$isMongooseDocumentArray || i3 && i3.schemaOptions && i3.schemaOptions.required) && (!i3.$isMongooseArray || i3.$isMongooseDocumentArray || i3.$embeddedSchemaType.$isMongooseArray || 0 !== i3.$embeddedSchemaType.validators.length) && At(t4.$__getValue(o3), e4, o3);
2959              }
2960            } catch (t5) {
2961              n3.e(t5);
2962            } finally {
2963              n3.f();
2964            }
2965          })(t3, i2);
2966          var B2, M2 = { skipArrays: true }, D2 = p(i2);
2967          try {
2968            for (D2.s(); !(B2 = D2.n()).done; ) {
2969              var R2 = B2.value;
2970              if (t3.$__schema.nested[R2]) {
2971                var U2 = t3.$__getValue(R2);
2972                st(U2) && (U2 = U2.toObject({ transform: false }));
2973                var C2 = F(U2, R2, M2, t3.$__schema);
2974                Object.keys(C2).filter(function(e4) {
2975                  return !t3.$__schema.singleNestedPaths.hasOwnProperty(e4);
2976                }
2976).forEach(s2);
2977              }
2978            }
2979          } catch (t4) {
2980            D2.e(t4);
2981          } finally {
2982            D2.f();
2983          }
2984          var L2, V2 = p(i2);
2985          try {
2986            for (V2.s(); !(L2 = V2.n()).done; ) {
2987              var q2 = L2.value, J2 = t3.$__schema.path(q2);
2988              if (J2 && (J2.$parentSchemaDocArray && "string" == typeof J2.$parentSchemaDocArray.path && i2.add(J2.$parentSchemaDocArray.path), J2.$isSchemaMap)) {
2989                var z2 = t3.$__getValue(q2);
2990                if (null != z2) {
2991                  var K2, H2 = p(z2.keys());
2992                  try {
2993                    for (H2.s(); !(K2 = H2.n()).done; ) {
2994                      var W2 = K2.value;
2995                      i2.add(q2 + "." + W2);
2996                    }
2997                  } catch (t4) {
2998                    H2.e(t4);
2999                  } finally {
3000                    H2.f();
3001                  }
3002                }
3003              }
3004            }
3005          } catch (t4) {
3006            V2.e(t4);
3007          } finally {
3008            V2.f();
3009          }
3010          return [i2 = Array.from(i2), o2];
3011        }
3012        function At(t3, e3, r3) {
3013          if (null != t3) for (var n2 = t3.length, o2 = 0; o2 < n2; ++o2) Array.isArray(t3[o2]) ? At(t3[o2], e3, r3 + "." + o2) : e3.add(r3 + "." + o2);
3014        }
3015        function Et(t3, e3, r3, n2) {
3016          var o2, i2, s2, a2 = t3.$__schema, u2 = a2.virtuals, c2 = Object.keys(u2), l2 = c2.length, f2 = l2, p2 = t3._doc, h2 = "boolean" != typeof (n2 && n2.aliases) || n2.aliases;
3017          r3 = r3 || {};
3018          var y2 = null;
3019          if (Array.isArray(r3.virtuals)) y2 = new Set(r3.virtuals);
3020          else if (r3.virtuals && r3.virtuals.pathsToSkip) {
3021            y2 = new Set(c2);
3022            for (var d2 = 0; d2 < r3.virtuals.pathsToSkip.length; d2++) y2.has(r3.virtuals.pathsToSkip[d2]) && y2.delete(r3.virtuals.pathsToSkip[d2]);
3023          }
3024          if (!p2) return e3;
3025          for (l2 = 0; l2 < f2; ++l2) if (o2 = c2[l2], (null == y2 || y2.has(o2)) && (h2 || !a2.aliases.hasOwnProperty(o2))) {
3026            if (i2 = o2, null != r3.path) {
3027              if (!o2.startsWith(r3.path + ".")) continue;
3028              i2 = o2.substring(r3.path.length + 1);
3029            }
3030            if (-1 !== i2.indexOf(".") || i2 !== o2) {
3031              var b2 = i2.split(".");
3032              if (void 0 !== (s2 = D(t3.get(o2), r3))) {
3033                var m2 = b2.length;
3034                p2 = e3;
3035                for (var v2 = 0; v2 < m2 - 1; ++v2) p2[b2[v2]] = p2[b2[v2]] || {}, p2 = p2[b2[v2]];
3036                p2[b2[m2 - 1]] = s2;
3037              }
3038            } else {
3039              if (void 0 === (s2 = u2[o2].applyGetters(void 0, t3))) continue;
3040              s2 = D(s2, r3), e3[i2] = s2;
3041            }
3042          }
3043          return e3;
3044        }
3045        function xt(t3, e3) {
3046          if (ot(e3)) throw new Error("`transform` function must be synchronous, but the transform on path `" + t3 + "` returned a promise.");
3047        }
3048        function Tt(t3, e3, r3) {
3049          var n2 = t3.$populated(e3, true);
3050          if (!n2 && t3.$__.selected) {
3051            var o2 = e3.split(".")[0];
3052            if (t3.$__.selected[o2 + ".$"]) return o2;
3053          }
3054          if (n2 && nt.isMongooseArray(r3) && (n2.options.match || n2.options.options && nt.object.hasOwnProperty(n2.options.options, "limit") || n2.options.options && n2.options.options.skip || n2.options.select && (0 === n2.options.select._id || /\s?-_id\s?/.test(n2.options.select)))) {
3055            var i2 = r3[ut];
3056            if (0 === Object.keys(i2).length || i2.$set || i2.$pop) return e3;
3057          }
3058        }
3059        function kt(t3, e3, r3, n2, o2, i2) {
3060          if (i2 || (i2 = "$set"), r3[i2] || (r3[i2] = {}), r3[i2][n2.path] = o2, false !== t3.$__schema.options.versionKey && !(function(t4, e4) {
3061            var r4 = t4.$__schema.options.skipVersioning;
3062            return !!r4 && r4[e4 = e4.replace(/\.\d+\./, ".")];
3063          })(t3, n2.path) && 3 & ~t3.$__.version && !t3.$__schema.options.optimisticConcurrency) {
3064            switch (i2) {
3065              case "$set":
3066              case "$unset":
3067              case "$pop":
3068              case "$pull":
3069              case "$pullAll":
3070              case "$push":
3071              case "$addToSet":
3072              case "$inc":
3073                break;
3074              default:
3075                return;
3076            }
3077            "$push" === i2 || "$addToSet" === i2 || "$pullAll" === i2 || "$pull" === i2 ? /\.\d+\.|\.\d+$/.test(n2.path) ? t3.$__.version = 3 : t3.$__.version = 2 : /^\$p/.test(i2) || Array.isArray(o2) ? t3.$__.version = 3 : /\.\d+\.|\.\d+$/.test(n2.path) && (t3.$__.version = 1);
3078          }
3079        }
3080        function Nt(t3, e3, r3, n2, o2) {
3081          if (!r3.$set || !r3.$set[n2.path]) if ("function" != typeof o2.$__getAtomics) {
3082            var i2, s2, a2 = o2[ut], u2 = Object.keys(a2), c2 = u2.length;
3083            if (0 === c2) return nt.isMongooseObject(o2) ? o2 = o2.toObject({ depopulate: 1, _isNested: true }) : o2.valueOf && (o2 = o2.valueOf()), kt(t3, 0, r3, n2, o2);
3084            for (; c2--; ) i2 = a2[s2 = u2[c2]], nt.isMongooseObject(i2) ? i2 = i2.toObject({ depopulate: true, transform: false, _isNested: true }) : Array.isArray(i2) ? i2 = i2.map(l2) : i2.valueOf && (i2 = i2.valueOf()), "$addToSet" === s2 && (i2 = { $each: i2 }), kt(t3, 0, r3, n2, i2, s2);
3085          }
3085 else o2.$__getAtomics().forEach(function(e4) {
3086            var o3 = e4[0], i3 = e4[1];
3087            kt(t3, 0, r3, n2, i3, o3);
3088          });
3089          function l2(t4) {
3090            return nt.isMongooseObject(t4) ? t4.toObject({ depopulate: 1, _isNested: true }) : t4;
3091          }
3092        }
3093        wt.prototype.$__schema, wt.prototype.schema, Object.defineProperty(wt.prototype, "$locals", { configurable: false, enumerable: false, get: function() {
3094          return null == this.$__.locals && (this.$__.locals = {}), this.$__.locals;
3095        }, set: function(t3) {
3096          this.$__.locals = t3;
3097        } }), wt.prototype.isNew, Object.defineProperty(wt.prototype, "$where", { configurable: false, enumerable: false, writable: true }), wt.prototype.id, wt.prototype.$errors, Object.defineProperty(wt.prototype, "$op", { get: function() {
3098          return this.$__.op || null;
3099        }, set: function(t3) {
3100          this.$__.op = t3;
3101        } }), wt.prototype.$__buildDoc = function(t3, e3, r3, n2, o2) {
3102          for (var i2 = {}, s2 = Object.keys(this.$__schema.paths).filter(function(t4) {
3103            return !t4.includes("$*");
3104          }), a2 = s2.length, u2 = 0; u2 < a2; ++u2) {
3105            var c2 = s2[u2];
3106            if ("_id" === c2) {
3107              if (r3) continue;
3108              if (t3 && "_id" in t3) continue;
3109            }
3110            for (var l2 = this.$__schema.paths[c2].splitPath(), f2 = l2.length, p2 = f2 - 1, h2 = "", y2 = i2, d2 = false, b2 = 0; b2 < f2; ++b2) {
3111              var m2 = l2[b2];
3112              if (h2.length ? h2 += "." + m2 : h2 = m2, true === n2) {
3113                if (h2 in e3) break;
3114              } else if (false === n2 && e3 && !d2) {
3115                if (h2 in e3) d2 = true;
3116                else if (!o2[h2]) break;
3117              }
3118              b2 < p2 && (y2 = y2[m2] || (y2[m2] = {}));
3119            }
3120          }
3121          this._doc = i2;
3122        }, wt.prototype.toBSON = function() {
3123          return this.toObject(Y);
3124        }, wt.prototype.init = function(t3, e3, r3) {
3125          return "function" == typeof e3 && (r3 = e3, e3 = null), this.$__init(t3, e3), r3 && r3(null, this), this;
3126        }, wt.prototype.$init = function() {
3127          return this.constructor.prototype.init.apply(this, arguments);
3128        }, wt.prototype.$__init = function(t3, e3) {
3129          if (this.$isNew = false, e3 = e3 || {}, null != t3._id && e3.populated && e3.populated.length) {
3130            var r3, n2 = String(t3._id), o2 = p(e3.populated);
3131            try {
3132              for (o2.s(); !(r3 = o2.n()).done; ) {
3133                var i2 = r3.value;
3134                if (i2.isVirtual ? this.$populated(i2.path, nt.getValue(i2.path, t3), i2) : this.$populated(i2.path, i2._docs[n2], i2), null != i2._childDocs) {
3135                  var s2, a2 = p(i2._childDocs);
3136                  try {
3137                    for (a2.s(); !(s2 = a2.n()).done; ) {
3138                      var u2 = s2.value;
3139                      null != u2 && null != u2.$__ && (u2.$__.parent = this);
3140                    }
3141                  } catch (t4) {
3142                    a2.e(t4);
3143                  } finally {
3144                    a2.f();
3145                  }
3146                  i2._childDocs = [];
3147                }
3148              }
3149            } catch (t4) {
3150              o2.e(t4);
3151            } finally {
3152              o2.f();
3153            }
3154          }
3155          $t(this, t3, this._doc, e3), Z(this, e3.populated), this.$emit("init", this), this.constructor.emit("init", this);
3156          var c2 = false === this.$__.exclude && this.$__.selected ? I(this.$__.selected) : null;
3157          return B(this, this.$__.selected, this.$__.exclude, c2, false, this.$__.skipDefaults), this;
3158        }, wt.prototype.updateOne = function(t3, e3, r3) {
3159          var n2 = this.constructor.updateOne({ _id: this._doc._id }, t3, e3), o2 = this;
3160          return n2.pre(function(t4) {
3161            o2.constructor._middleware.execPre("updateOne", o2, [o2], t4);
3162          }), n2.post(function(t4) {
3163            o2.constructor._middleware.execPost("updateOne", o2, [o2], {}, t4);
3164          }), null != this.$session() && ("session" in n2.options || (n2.options.session = this.$session())), null != r3 ? n2.exec(r3) : n2;
3165        }, wt.prototype.replaceOne = function() {
3166          var t3 = Array.prototype.slice.call(arguments);
3167          return t3.unshift({ _id: this._doc._id }), this.constructor.replaceOne.apply(this.constructor, t3);
3168        }, wt.prototype.$session = function(t3) {
3169          if (0 === arguments.length) return null != this.$__.session && this.$__.session.hasEnded ? (this.$__.session = null, null) : this.$__.session;
3170          if (null != t3 && t3.hasEnded) throw new S("Cannot set a document's session to a session that has ended. Make sure you haven't called `endSession()` on the session you are passing to `$session()`.");
3171          if (null != t3 || null != this.$__.session) {
3172            if (this.$__.session = t3, !this.$isSubdocument) {
3173              var e3, r3 = p(this.$getAllSubdocs());
3174              try {
3175                for (r3.s(); !(e3 = r3.n()).done; ) e3.value.$session(t3);
3176              } catch (t4) {
3177                r3.e(t4);
3178              } finally {
3179                r3.f();
3180              }
3181            }
3182            return t3;
3183          }
3184        }, wt.prototype.$timestamps = function(t3) {
3185          return 0 === arguments.length ? null != this.$__.timestamps ? this.$__.timestamps : this.$__schema ? this.$__schema.options.timestamps : void 0 : (t3 !== this.$timestamps() && (this.$__.timestamps = t3), this);
3186        }, wt.prototype.overwrite = function(t3) {
3187          for (var e3 = 0, r3 = Array.from(new Set(Object.keys(this._doc).concat(Object.keys(t3)))); e3 < r3.length; e3++) {
3188            var n2 = r3[e3];
3189            "_id" !== n2 && (this.$__schema.options.versionKey && n2 === this.$__schema.options.versionKey || this.$__schema.options.discriminatorKey && n2 === this.$__schema.options.discriminatorKey || this.$set(n2, t3[n2]));
3190          }
3191          return this;
3192        }, wt.prototype.$set = function(t3, e3, r3, n2) {
3193          var o2 = this;
3194          nt.isPOJO(r3) && (n2 = r3, r3 = void 0);
3195          var i2, s2, a2, u2, c2 = n2 && n2.merge, h2 = r3 && true !== r3, y2 = true === r3, b2 = 0, m2 = n2 && "strict" in n2, v2 = m2 ? n2.strict : this.$__.strictMode;
3196          if (h2 && ((this.$__.adhocPaths || (this.$__.adhocPaths = {}))[t3] = this.$__schema.interpretAsType(t3, r3, this.$__schema.options)), null == t3) {
3197            var g2 = [e3, t3];
3198            t3 = g2[0], e3 = g2[1];
3199          } else if ("string" != typeof t3) {
3200            if (t3 instanceof wt && (t3 = t3.$__isNested ? t3.toObject() : t3.$__schema === this.$__schema ? Et(t3, l({}, t3._doc)) : t3._doc), null == t3) {
3201              var _2 = [e3, t3];
3202              t3 = _2[0], e3 = _2[1];
3203            }
3204            u2 = e3 ? e3 + "." : "";
3205            var w2 = (i2 = V(this.$__schema, t3)).length, O2 = n2 && n2._skipMinimizeTopLevel || false;
3206            if (0 === w2 && O2) return delete n2._skipMinimizeTopLevel, e3 && this.$set(e3, {}), this;
3207            n2 = Object.assign({}, n2, { _skipMinimizeTopLevel: false });
3208            for (var j2 = 0; j2 < w2; ++j2) {
3209              a2 = i2[j2];
3210              var A2 = u2 ? u2 + a2 : a2;
3211              s2 = this.$__schema.pathType(A2);
3212              var E2 = t3[a2];
3213              if (true !== r3 || u2 || null == E2 || "nested" !== s2 || null == this._doc[a2] || delete this._doc[a2], nt.isNonBuiltinObject(E2) && "nested" === s2) this.$set(A2, E2, y2, n2), St(this.$get(A2), A2, this);
3214              else if (v2) {
3215                if (y2 && void 0 === E2 && void 0 !== this.$get(A2)) continue;
3216                if ("adhocOrUndefined" === s2 && (s2 = L(this, A2, { typeOnly: true })), "real" === s2 || "virtual" === s2) this.$set(A2, E2, y2, n2);
3217                else if ("nested" === s2 && E2 instanceof wt) this.$set(A2, E2.toObject({ transform: false }), y2, n2);
3218                else {
3219                  if ("throw" === v2) throw "nested" === s2 ? new P(a2, E2) : new T(a2);
3220                  "nested" === s2 && null == E2 && this.$set(A2, E2, y2, n2);
3221                }
3222              } else this.$set(A2, E2, y2, n2);
3223            }
3224            for (var x2 = {}, k2 = Object.keys(this.$__schema.tree), N2 = 0, I2 = k2.length; N2 < I2; ++N2) (a2 = k2[N2]) && this._doc.hasOwnProperty(a2) && (x2[a2] = void 0);
3225            return this._doc = Object.assign(x2, this._doc), this;
3226          }
3227          var B2 = this.$__schema.pathType(t3), D2 = null;
3228          if ("adhocOrUndefined" === B2 && (D2 = -1 === t3.indexOf(".") ? [t3] : t3.split("."), B2 = L(this, D2, { typeOnly: true })), "adhocOrUndefined" === B2 && !m2) {
3229            null == D2 && (D2 = -1 === t3.indexOf(".") ? [t3] : t3.split("."));
3230            var R2 = q(this.$__schema, D2);
3231            void 0 !== R2 && (v2 = R2);
3232          }
3233          e3 = J(e3, true);
3234          var U2, C2 = null != o2.$__.priorDoc ? o2.$__.priorDoc.$__getValue(t3) : y2 ? void 0 : o2.$__getValue(t3);
3235          if ("nested" === B2 && e3) {
3236            if ("object" === d(e3) && null != e3) {
3237              if (null != e3.$__ && (e3 = e3.toObject(Y)), null == e3) return this.invalidate(t3, new S.CastError("Object", e3, t3)), this;
3238              var F2 = this.$isModified(t3), z2 = null != this.$__.savedState && this.$__.savedState.hasOwnProperty(t3);
3239              if (null != this.$__.savedState && !this.$isNew && !this.$__.savedState.hasOwnProperty(t3)) {
3240                var K2 = this.$__getValue(t3);
3241                this.$__.savedState[t3] = K2;
3242                for (var H2 = 0, W2 = Object.keys(K2 || {}); H2 < W2.length; H2++) {
3243                  var G2 = W2[H2];
3244                  this.$__.savedState[t3 + "." + G2] = K2[G2];
3245                }
3246              }
3247              if (c2) return this.$set(e3, t3, y2, n2);
3248              this.$__setValue(t3, null), M(this, t3);
3249              var Q2 = V(this.$__schema, e3, t3);
3250              this.$__setValue(t3, {});
3251              var Z2, X2 = p(Q2);
3252              try {
3253                for (X2.s(); !(Z2 = X2.n()).done; ) {
3254                  var et2 = Z2.value;
3255                  this.$set(t3 + "." + et2, e3[et2], y2, l(l({}, n2), {}, { _skipMarkModified: true }));
3256                }
3257              } catch (t4) {
3258                X2.e(t4);
3259              } finally {
3260                X2.f();
3261              }
3262              return null == C2 || F2 && !z2 || !nt.deepEqual(z2 ? this.$__.savedState[t3] : C2, e3) ? this.markModified(t3) : this.unmarkModified(t3), this;
3263            }
3264            return this.invalidate(t3, new S.CastError("Object", e3, t3)), this;
3265          }
3266          if (null == D2 && (D2 = -1 === t3.indexOf(".") ? [t3] : t3.split(".")), "string" == typeof this.$__schema.aliases[D2[0]] && (D2[0] = this.$__schema.aliases[D2[0]]), "adhocOrUndefined" === B2 && v2) {
3267            var rt2;
3268            for (b2 = 0; b2 < D2.length; ++b2) {
3269              var ot2 = D2.slice(0, b2 + 1).join(".");
3270              if (b2 + 1 < D2.length && "virtual" === this.$__schema.pathType(ot2)) return tt.set(t3, e3, this), this;
3271              if (null != (U2 = this.$__schema.path(ot2))) {
3272                if (U2 instanceof $) {
3273                  rt2 = true;
3274                  break;
3275                }
3276                if (U2.$isSchemaMap && U2.$__schemaType instanceof $ && b2 < D2.length - 1) {
3277                  rt2 = true, U2 = U2.$__schemaType;
3278                  break;
3279                }
3280              }
3281            }
3282            if (null == U2 && (U2 = L(this, t3)), !rt2 && !U2) {
3283              if ("throw" === v2) throw new T(t3);
3284              return this;
3285            }
3286          } else {
3287            if ("virtual" === B2) return (U2 = this.$__schema.virtualpath(t3)).applySetters(e3, this), this;
3288            U2 = this.$__path(t3);
3289          }
3290          var it2, st2 = this._doc, at2 = "";
3291          for (b2 = 0; b2 < D2.length - 1; ++b2) st2 = st2 instanceof Map ? st2.get(D2[b2]) : st2[D2[b2]], at2 += (0 !== at2.length ? "." : "") + D2[b2], st2 || (this.$set(at2, {}), this.$__isSelected(at2) || this.unmarkModified(at2), st2 = this.$__getValue(at2));
3292          if (D2.length <= 1) it2 = t3;
3293          else {
3294            var ut2 = D2.length;
3295            for (b2 = 0; b2 < ut2; ++b2) {
3296              var ct2 = D2.slice(0, b2 + 1).join(".");
3297              if (null === this.$get(ct2, null, { getters: false })) {
3298                it2 = ct2;
3299                break;
3300              }
3301            }
3302            it2 || (it2 = t3);
3303          }
3304          if (!U2) return this.$__set(it2, t3, n2, y2, D2, U2, e3, C2), "nested" === B2 && null == e3 && M(this, t3), this;
3305          if ((U2.$isSingleNested || U2.$isMongooseArray) && (function(t4, e4) {
3306            if (t4.$__.validationError) {
3307              for (var r4 = 0, n3 = Object.keys(t4.$__.validationError.errors); r4 < n3.length; r4++) {
3308                var o3 = n3[r4];
3309                o3.startsWith(e4 + ".") && delete t4.$__.validationError.errors[o3];
3310              }
3311              0 === Object.keys(t4.$__.validationError.errors).length && (t4.$__.validationError = null);
3312            }
3313          })(this, t3), null != e3 && c2 && U2.$isSingleNested) {
3314            e3 instanceof wt && (e3 = e3.toObject({ virtuals: false, transform: false }));
3315            for (var lt2 = 0, ft2 = Object.keys(e3); lt2 < ft2.length; lt2++) {
3316              var pt2 = ft2[lt2];
3317              this.$set(t3 + "." + pt2, e3[pt2], y2, n2);
3318            }
3319            return this;
3320          }
3321          var ht2 = true;
3322          try {
3323            var bt2, mt2 = (function() {
3324              if (null == U2.options) return false;
3325              if (!(e3 instanceof wt)) return false;
3326              var t4 = e3.constructor, r4 = "function" != typeof U2.options.ref || U2.options.ref[yt] ? U2.options.ref : U2.options.ref.call(o2, o2), n3 = (null == r4 ? void 0 : r4.modelName) || r4;
3327              if (null != n3 && (n3 === t4.modelName || n3 === t4.baseModelName)) return true;
3328              var i3 = U2.options.refPath;
3329              if (null == i3) return false;
3330              var s3 = e3.get(i3);
3331              return s3 === t4.modelName || s3 === t4.baseModelName;
3332            })(), _t2 = false;
3333            if (mt2 && e3 instanceof wt && (!e3.$__.wasPopulated || nt.deepEqual(e3.$__.wasPopulated.value, e3._doc._id))) {
3334              var Ot2 = U2 && U2.$isSingleNested ? U2.cast(e3, this) : e3._doc._id;
3335              this.$populated(t3, Ot2, f({}, dt, e3.constructor)), e3.$__.wasPopulated = { value: Ot2 }, _t2 = true;
3336            }
3337            var $t2 = this.$__schema.options.typeKey;
3338            if (U2.options && Array.isArray(U2.options[$t2]) && U2.options[$t2].length && U2.options[$t2][0] && U2.options[$t2][0].ref && (function(t4, e4) {
3339              if (!Array.isArray(t4)) return false;
3340              if (0 === t4.length) return false;
3341              var r4, n3 = p(t4);
3342              try {
3343                for (n3.s(); !(r4 = n3.n()).done; ) {
3344                  var o3 = r4.value;
3345                  if (!(o3 instanceof wt)) return false;
3346                  if (null == o3.constructor.modelName) return false;
3347                  if (o3.constructor.modelName != e4 && o3.constructor.baseModelName != e4) return false;
3348                }
3349              } catch (t5) {
3350                n3.e(t5);
3351              } finally {
3352                n3.f();
3353              }
3354              return true;
3355            })(e3, U2.options[$t2][0].ref)) {
3356              bt2 = f({}, dt, e3[0].constructor), this.$populated(t3, e3.map(function(t4) {
3357                return t4._doc._id;
3358              }), bt2);
3359              var jt2, Pt2 = p(e3);
3360              try {
3361                for (Pt2.s(); !(jt2 = Pt2.n()).done; ) {
3362                  var At2 = jt2.value;
3363                  At2.$__.wasPopulated = { value: At2._doc._id };
3364                }
3365              } catch (t4) {
3366                Pt2.e(t4);
3367              } finally {
3368                Pt2.f();
3369              }
3370              _t2 = true;
3371            }
3372            if (!mt2 || !U2.$isSingleNested || !e3.$__) {
3373              var xt2 = this;
3374              null != this.$__schema.singleNestedPaths[t3] && D2.length > 1 && (xt2 = vt(this, D2, this.schema)), e3 = null != n2 && n2.overwriteImmutable ? U2.applySetters(e3, xt2, false, C2, { path: t3, overwriteImmutable: true }) : U2.applySetters(e3, xt2, false, C2, { path: t3 });
3375            }
3376            if (Array.isArray(e3) && !Array.isArray(U2) && U2.$isMongooseDocumentArray && 0 !== e3.length && null != e3[0] && null != e3[0].$__ && null != e3[0].$__.populated) {
3377              for (var Tt2 = Object.keys(e3[0].$__.populated), kt2 = function() {
3378                var r4 = It[Nt2];
3379                o2.$populated(t3 + "." + r4, e3.map(function(t4) {
3380                  return t4.$populated(r4);
3381                }), e3[0].$__.populated[r4].options);
3382              }, Nt2 = 0, It = Tt2; Nt2 < It.length; Nt2++) kt2();
3383              _t2 = true;
3384            }
3385            if (!_t2 && this.$__.populated) {
3386              if (Array.isArray(e3) && this.$__.populated[t3]) for (var Bt = 0; Bt < e3.length; ++Bt) e3[Bt] instanceof wt && e3.set(Bt, e3[Bt]._doc._id, true);
3387              delete this.$__.populated[t3];
3388            }
3389            null != e3 && U2.$isSingleNested && (function(t4, e4, r4) {
3390              var n3 = e4.schema;
3391              if (null != n3) for (var o3 = 0, i3 = Object.keys(n3.paths); o3 < i3.length; o3++) {
3392                var s3 = i3[o3], a3 = n3.paths[s3];
3393                if (null != a3.$immutableSetter) {
3394                  var u3 = null == r4 ? void 0 : r4.$__getValue(s3);
3395                  a3.$immutableSetter.call(t4, u3);
3396                }
3397              }
3398            })(e3, U2, C2), this.$markValid(t3);
3399          } catch (r4) {
3400            r4 instanceof S.StrictModeError && r4.isImmutableError ? this.invalidate(t3, r4) : r4 instanceof S.CastError ? (this.invalidate(r4.path, r4), r4.$originalErrorPath && this.invalidate(t3, new S.CastError(U2.instance, e3, t3, r4.$originalErrorPath))) : this.invalidate(t3, new S.CastError(U2.instance, e3, t3, r4)), ht2 = false;
3401          }
3402          if (ht2) {
3403            var Mt, Dt = null, Rt = null;
3404            if (!y2) {
3405              var Ut = this.$isSubdocument ? this.ownerDocument() : this;
3406              Dt = Ut.$__.savedState, Rt = this.$isSubdocument ? this.$__.fullPath + "." + t3 : t3, Ut.$__saveInitialState(Rt);
3407            }
3408            this.$__set(it2, t3, n2, y2, D2, U2, e3, C2);
3409            var Ct = !(null === (Mt = this.$__.session) || void 0 === Mt || !Mt.transaction), Ft = this.$__.session && this.$__.session[gt] && this.$__.session[gt].has(this) && this.$__.session[gt].get(this).modifiedPaths && !this.$__.session[gt].get(this).modifiedPaths.has(Rt);
3410            null != Dt && Dt.hasOwnProperty(Rt) && (!Ct || Ft) && nt.deepEqual(e3, Dt[Rt]) && this.unmarkModified(t3);
3411          }
3412          return (U2.$isSingleNested && (this.isDirectModified(t3) || null == e3) || U2.$isSchemaMap && null == e3) && M(this, t3), this;
3413        }, wt.prototype.set = wt.prototype.$set, wt.prototype.$__shouldModify = function(t3, e3, r3, n2, o2, i2, s2, a2) {
3414          return !(r3 && r3._skipMarkModified || !this.$isNew && !(e3 in this.$__.activePaths.getStatePaths("modify")) && (void 0 !== s2 || this.$__isSelected(e3)) && (void 0 === s2 && e3 in this.$__.activePaths.getStatePaths("default") || this.$populated(e3) && s2 instanceof wt && it(s2._doc._id, a2) || it(s2, void 0 !== a2 ? a2 : nt.getValue(e3, this)) && (n2 || null == s2 || !(e3 in this.$__.activePaths.getStatePaths("default")) || !it(s2, i2.getDefault(this, n2)))));
3415        }, wt.prototype.$__set = function(t3, e3, n2, o2, i2, s2, a2, u2) {
3416          v = v || r2(6547);
3417          var c2 = this.$__shouldModify(t3, e3, n2, o2, i2, s2, a2, u2);
3418          c2 ? (this.$__.primitiveAtomics && this.$__.primitiveAtomics[e3] && (delete this.$__.primitiveAtomics[e3], 0 === Object.keys(this.$__.primitiveAtomics).length && delete this.$__.primitiveAtomics), this.markModified(t3), m || (m = r2(7557)), a2 && nt.isMongooseArray(a2) && (a2._registerAtomic("$set", a2), nt.isMongooseDocumentArray(a2) && a2.forEach(function(t4) {
3419            t4 && t4.__parentArray && (t4.__parentArray = a2);
3420          }))) : Array.isArray(a2) && Array.isArray(u2) && nt.isMongooseArray(a2) && nt.isMongooseArray(u2) && (a2[ut] = u2[ut], a2[at] = u2[at], nt.isMongooseDocumentArray(a2) && a2.forEach(function(t4) {
3421            null != t4 && (t4.$isNew = false);
3422          }));
3423          for (var l2 = this._doc, f2 = 0, p2 = i2.length, h2 = ""; f2 < p2; f2++) {
3424            var y2 = f2 + 1 === p2;
3425            if (h2 += h2 ? "." + i2[f2] : i2[f2], !_t.has(i2[f2])) if (y2) l2 instanceof Map ? l2.set(i2[f2], a2) : l2.$isSingleNested ? (i2[f2] in l2 || (l2[i2[f2]] = a2), l2._doc[i2[f2]] = a2, c2 && l2.markModified(i2[f2])) : l2[i2[f2]] = a2;
3426            else {
3427              var d2 = l2 instanceof Map, b2 = d2 ? l2.get(i2[f2]) : l2[i2[f2]];
3428              nt.isPOJO(b2) || b2 && b2 instanceof v || b2 && !Array.isArray(b2) && b2.$isSingleNested || b2 && Array.isArray(b2) ? l2 = b2 : null == b2 ? (b2 = {}, d2 ? l2.set(i2[f2], b2) : l2[i2[f2]] = b2, l2 = b2) : l2 = b2;
3429            }
3430          }
3431        }, wt.prototype.$__getValue = function(t3) {
3432          if ("string" != typeof t3 && !Array.isArray(t3)) throw new TypeError('Invalid `path`. Must be either string or array. Got "'.concat(t3, '" (type ').concat(d(t3), ")"));
3433          return nt.getValue(t3, this._doc);
3434        }, wt.prototype.$inc = function(t3, e3) {
3435          var r3 = this;
3436          if (null == e3 && (e3 = 1), Array.isArray(t3)) return t3.forEach(function(t4) {
3437            return r3.$inc(t4, e3);
3438          }), this;
3439          var n2 = this.$__path(t3);
3440          if (null == n2) {
3441            if ("throw" === this.$__.strictMode) throw new T(t3);
3442            if (true === this.$__.strictMode) return this;
3443          } else if ("Number" !== n2.instance) return this.invalidate(t3, new S.CastError(n2.instance, e3, t3)), this;
3444          var o2 = this.$__getValue(t3) || 0, i2 = false, s2 = null, a2 = e3;
3445          try {
3446            e3 = n2.cast(e3), a2 = (s2 = n2.applySetters(o2 + e3, this)) - o2, i2 = true;
3447          } catch (r4) {
3448            this.invalidate(t3, new S.CastError("number", e3, t3, r4));
3449          }
3450          return i2 && (this.$__.primitiveAtomics = this.$__.primitiveAtomics || {}, null == this.$__.primitiveAtomics[t3] ? this.$__.primitiveAtomics[t3] = { $inc: a2 } : this.$__.primitiveAtomics[t3].$inc += a2, this.markModified(t3), this.$__setValue(t3, s2)), this;
3451        }, wt.prototype.$__setValue = function(t3, e3) {
3452          return nt.setValue(t3, e3, this._doc), this;
3453        }, wt.prototype.get = function(t3, e3, r3) {
3454          var n2;
3455          null == r3 && (r3 = {}), e3 && (n2 = this.$__schema.interpretAsType(t3, e3, this.$__schema.options));
3456          var o2 = r3.noDottedPath, i2 = o2 ? this.$__schema.paths[t3] : this.$__path(t3);
3457          if (null == i2 && null != (i2 = this.$__schema.virtualpath(t3))) return i2.applyGetters(void 0, this);
3458          if (o2) {
3459            var s2 = this._doc[t3];
3460            return n2 && (s2 = n2.cast(s2)), null != i2 && false !== r3.getters ? i2.applyGetters(s2, this) : s2;
3461          }
3462          if (null != i2 && "Mixed" === i2.instance) {
3463            var a2 = this.$__schema.virtualpath(t3);
3464            null != a2 && (i2 = a2);
3465          }
3466          var u2 = -1 !== t3.indexOf("."), c2 = this._doc, l2 = u2 ? t3.split(".") : [t3];
3467          "string" == typeof this.$__schema.aliases[l2[0]] && (l2[0] = this.$__schema.aliases[l2[0]]);
3468          for (var f2 = 0, p2 = l2.length; f2 < p2; f2++) c2 && c2._doc && (c2 = c2._doc), c2 = null == c2 ? void 0 : c2 instanceof Map ? c2.get(l2[f2], { getters: false }) : f2 === p2 - 1 ? nt.getValue(l2[f2], c2) : c2[l2[f2]];
3469          if (n2 && (c2 = n2.cast(c2)), null != i2 && false !== r3.getters) c2 = i2.applyGetters(c2, this);
3470          else if (this.$__schema.nested[t3] && r3.virtuals) return Et(this, D(c2) || {}, { path: t3 });
3471          return c2;
3472        }
3472, wt.prototype[ht] = wt.prototype.get, wt.prototype.$get = wt.prototype.get, wt.prototype.$__path = function(t3) {
3473          var e3 = this.$__.adhocPaths;
3474          return (e3 && e3.hasOwnProperty(t3) ? e3[t3] : null) || this.$__schema.path(t3);
3475        }, wt.prototype.markModified = function(t3, e3) {
3476          this.$__saveInitialState(t3), this.$__.activePaths.modify(t3), null == e3 || this.$isSubdocument || (this.$__.pathsToScopes = this.$__pathsToScopes || {}, this.$__.pathsToScopes[t3] = e3);
3477        }, wt.prototype.$__saveInitialState = function(t3) {
3478          var e3 = this.$__.savedState, r3 = t3;
3479          if (null != e3) {
3480            var n2 = r3.indexOf("."), o2 = -1 === n2 ? r3 : r3.slice(0, n2);
3481            e3.hasOwnProperty(o2) || (e3[o2] = D(this.$__getValue(o2)));
3482          }
3483        }, wt.prototype.unmarkModified = function(t3) {
3484          this.$__.activePaths.init(t3), null != this.$__.pathsToScopes && delete this.$__.pathsToScopes[t3];
3485        }, wt.prototype.$ignore = function(t3) {
3486          this.$__.activePaths.ignore(t3);
3487        }, wt.prototype.directModifiedPaths = function() {
3488          return Object.keys(this.$__.activePaths.getStatePaths("modify"));
3489        }, wt.prototype.$isEmpty = function(t3) {
3490          var e3 = { minimize: true, virtuals: false, getters: false, transform: false };
3491          if (0 !== arguments.length) {
3492            var r3 = this.$get(t3);
3493            return null == r3 || "object" === d(r3) && (nt.isPOJO(r3) ? jt(r3) : 0 === Object.keys(r3.toObject(e3)).length);
3494          }
3495          return 0 === Object.keys(this.toObject(e3)).length;
3496        }, wt.prototype.modifiedPaths = function(t3) {
3497          t3 = t3 || {};
3498          var e3 = Object.keys(this.$__.activePaths.getStatePaths("modify")), r3 = /* @__PURE__ */ new Set(), n2 = 0, o2 = 0, i2 = e3.length;
3499          for (n2 = 0; n2 < i2; ++n2) {
3500            var s2 = e3[n2], a2 = et(s2), u2 = a2.length;
3501            for (o2 = 0; o2 < u2; ++o2) r3.add(a2[o2]);
3502            if (t3.includeChildren) {
3503              var c2 = 0, l2 = this.$get(s2);
3504              if ("object" === d(l2) && null !== l2) {
3505                l2._doc && (l2 = l2._doc);
3506                var f2 = l2.length;
3507                if (Array.isArray(l2)) for (c2 = 0; c2 < f2; ++c2) {
3508                  var p2 = s2 + "." + c2;
3509                  if (!r3.has(p2) && (r3.add(p2), null != l2[c2] && l2[c2].$__)) {
3510                    var h2 = l2[c2].modifiedPaths(), y2 = 0, b2 = h2.length;
3511                    for (y2 = 0; y2 < b2; ++y2) r3.add(p2 + "." + h2[y2]);
3512                  }
3513                }
3514                else {
3515                  var m2 = Object.keys(l2), v2 = 0, g2 = m2.length;
3516                  for (v2 = 0; v2 < g2; ++v2) r3.add(s2 + "." + m2[v2]);
3517                }
3518              }
3519            }
3520          }
3521          return Array.from(r3);
3522        }, wt.prototype[ft] = wt.prototype.modifiedPaths, wt.prototype.isModified = function(t3, e3, r3) {
3523          var n2 = this;
3524          if (t3) {
3525            var o2 = e3 && e3.ignoreAtomics, i2 = this.$__.activePaths.states.modify;
3526            if (null == i2) return false;
3527            "string" == typeof t3 && (t3 = -1 === t3.indexOf(" ") ? [t3] : t3.split(" "));
3528            var s2, a2 = p(t3);
3529            try {
3530              for (a2.s(); !(s2 = a2.n()).done; ) if (null != i2[s2.value]) return true;
3531            } catch (t4) {
3532              a2.e(t4);
3533            } finally {
3534              a2.f();
3535            }
3536            var u2 = r3 || this[ft](), c2 = t3.some(function(t4) {
3537              return !!~u2.indexOf(t4);
3538            }), l2 = Object.keys(i2);
3539            return o2 && (l2 = l2.filter(function(t4) {
3540              var e4 = n2.$__getValue(t4);
3541              return null == e4 || null == e4[ut] || void 0 !== e4[ut].$set;
3542            })), c2 || t3.some(function(t4) {
3543              return l2.some(function(e4) {
3544                return e4 === t4 || t4.startsWith(e4 + ".");
3545              });
3546            });
3547          }
3548          return this.$__.activePaths.some("modify");
3549        }, wt.prototype.$isModified = wt.prototype.isModified, wt.prototype[lt] = wt.prototype.isModified, wt.prototype.$isDefault = function(t3) {
3550          var e3 = this;
3551          if (null == t3) return this.$__.activePaths.some("default");
3552          if ("string" == typeof t3 && -1 === t3.indexOf(" ")) return this.$__.activePaths.getStatePaths("default").hasOwnProperty(t3);
3553          var r3 = t3;
3554          return Array.isArray(r3) || (r3 = r3.split(" ")), r3.some(function(t4) {
3555            return e3.$__.activePaths.getStatePaths("default").hasOwnProperty(t4);
3556          });
3557        }, wt.prototype.$isDeleted = function(t3) {
3558          return 0 === arguments.length ? !!this.$__.isDeleted : (this.$__.isDeleted = !!t3, this);
3559        }, wt.prototype.isDirectModified = function(t3) {
3560          var e3 = this;
3561          if (null == t3) return this.$__.activePaths.some("modify");
3562          if ("string" == typeof t3 && -1 === t3.indexOf(" ")) {
3563            var r3 = this.$__.activePaths.getStatePaths("modify").hasOwnProperty(t3);
3564            if (r3 || -1 === t3.indexOf(".")) return r3;
3565            for (var n2 = t3.split("."), o2 = 0; o2 < n2.length - 1; ++o2) {
3566              var i2 = n2.slice(0, o2 + 1).join("."), s2 = this.$get(i2);
3567              if (null != s2 && null != s2.$__ && s2.isDirectModified(n2.slice(o2 + 1).join("."))) return true;
3568            }
3569            return false;
3570          }
3571          var a2 = t3;
3572          return "string" == typeof a2 && (a2 = a2.split(" ")), a2.some(function(t4) {
3573            return e3.isDirectModified(t4);
3574          });
3575        }, wt.prototype.isInit = function(t3) {
3576          var e3 = this;
3577          if (null == t3) return this.$__.activePaths.some("init");
3578          if ("string" == typeof t3 && -1 === t3.indexOf(" ")) return this.$__.activePaths.getStatePaths("init").hasOwnProperty(t3);
3579          var r3 = t3;
3580          return Array.isArray(r3) || (r3 = r3.split(" ")), r3.some(function(t4) {
3581            return e3.$__.activePaths.getStatePaths("init").hasOwnProperty(t4);
3582          });
3583        }, wt.prototype.isSelected = function(t3) {
3584          var e3 = this;
3585          if (null == this.$__.selected) return true;
3586          if (!t3) return false;
3587          if ("_id" === t3) return 0 !== this.$__.selected._id;
3588          if (-1 !== t3.indexOf(" ") && (t3 = t3.split(" ")), Array.isArray(t3)) return t3.some(function(t4) {
3589            return e3.$__isSelected(t4);
3590          });
3591          var r3 = Object.keys(this.$__.selected), n2 = null;
3592          if (1 === r3.length && "_id" === r3[0]) return 0 === this.$__.selected._id;
3593          for (var o2 = 0, i2 = r3; o2 < i2.length; o2++) {
3594            var s2 = i2[o2];
3595            if ("_id" !== s2 && H(this.$__.selected[s2])) {
3596              n2 = !!this.$__.selected[s2];
3597              break;
3598            }
3599          }
3600          if (null === n2) return true;
3601          if (t3 in this.$__.selected) return n2;
3602          for (var a2 = t3 + ".", u2 = 0, c2 = r3; u2 < c2.length; u2++) {
3603            var l2 = c2[u2];
3604            if ("_id" !== l2) {
3605              if (l2.startsWith(a2)) return n2 || l2 !== a2;
3606              if (a2.startsWith(l2 + ".")) return n2;
3607            }
3608          }
3609          return !n2;
3610        }, wt.prototype.$__isSelected = wt.prototype.isSelected, wt.prototype.isDirectSelected = function(t3) {
3611          var e3 = this;
3612          if (null == this.$__.selected) return true;
3613          if ("_id" === t3) return 0 !== this.$__.selected._id;
3614          if (-1 !== t3.indexOf(" ") && (t3 = t3.split(" ")), Array.isArray(t3)) return t3.some(function(t4) {
3615            return e3.isDirectSelected(t4);
3616          });
3617          var r3 = Object.keys(this.$__.selected), n2 = null;
3618          if (1 === r3.length && "_id" === r3[0]) return 0 === this.$__.selected._id;
3619          for (var o2 = 0, i2 = r3; o2 < i2.length; o2++) {
3620            var s2 = i2[o2];
3621            if ("_id" !== s2 && H(this.$__.selected[s2])) {
3622              n2 = !!this.$__.selected[s2];
3623              break;
3624            }
3625          }
3626          return null === n2 || (this.$__.selected.hasOwnProperty(t3) ? n2 : !n2);
3627        }, wt.prototype.validate = (function() {
3628          var t3 = u(i().m(function t4(e3, r3) {
3629            var n2, o2, s2 = this, a2 = arguments;
3630            return i().w(function(t5) {
3631              for (; ; ) switch (t5.n) {
3632                case 0:
3633                  if ("function" != typeof e3 && "function" != typeof r3 && "function" != typeof a2[2]) {
3634                    t5.n = 1;
3635                    break;
3636                  }
3637                  throw new S("Document.prototype.validate() no longer accepts a callback");
3638                case 1:
3639                  if (this.$op = "validate", 1 === a2.length && ("object" !== d(a2[0]) || Array.isArray(a2[0]) || (r3 = a2[0], e3 = null)), r3 && "string" == typeof r3.pathsToSkip && (n2 = -1 === r3.pathsToSkip.indexOf(" "), r3.pathsToSkip = n2 ? [r3.pathsToSkip] : r3.pathsToSkip.split(" ")), o2 = r3 && r3._skipParallelValidateCheck, null == this.$isSubdocument) {
3640                    t5.n = 2;
3641                    break;
3642                  }
3643                  t5.n = 4;
3644                  break;
3645                case 2:
3646                  if (!this.$__.validating || o2) {
3647                    t5.n = 3;
3648                    break;
3649                  }
3650                  throw new E(this);
3651                case 3:
3652                  o2 || (this.$__.validating = true);
3653                case 4:
3654                  return t5.a(2, new Promise(function(t6, n3) {
3655                    s2.$__validate(e3, r3, function(e4) {
3656                      if (s2.$op = null, s2.$__.validating = null, null != e4) return n3(e4);
3657                      t6();
3658                    });
3659                  }));
3660              }
3661            }, t4, this);
3662          }));
3663          return function(e3, r3) {
3664            return t3.apply(this, arguments);
3665          };
3666        })(), wt.prototype.$validate = wt.prototype.validate, wt.prototype.$__validate = function(t3, e3, r3) {
3667          var n2, i2 = this;
3668          this.$__.saveOptions && this.$__.saveOptions.pathsToSave && !t3 ? t3 = o(this.$__.saveOptions.pathsToSave) : "function" == typeof t3 ? (r3 = t3, e3 = null, t3 = null) : "function" == typeof e3 && (r3 = e3, e3 = null);
3669          var s2, a2 = e3 && "object" === d(e3) && "validateModifiedOnly" in e3, u2 = e3 && e3.pathsToSkip || null;
3670          s2 = a2 ? !!e3.validateModifiedOnly : this.$__schema.options.validateModifiedOnly;
3671          var c2 = e3 && e3.validateAllPaths;
3672          if (c2) {
3673            if (u2) throw new TypeError("Cannot set both `validateAllPaths` and `pathsToSkip`");
3674            if (t3) throw new TypeError("Cannot set both `validateAllPaths` and `pathsToValidate`");
3675            if (a2 && s2) throw new TypeError("Cannot set both `validateAllPaths` and `validateModifiedOnly`");
3676          }
3677          var f2, h2, y2 = this, b2 = function() {
3678            var t4 = i2.$__.validationError;
3679            if (i2.$__.validationError = null, i2.$__.validating = null, s2 && null != t4) {
3680              for (var e4 = 0, r4 = Object.keys(t4.errors); e4 < r4.length; e4++) {
3681                var n3 = r4[e4];
3682                i2.$isModified(n3) || delete t4.errors[n3];
3683              }
3684              0 === Object.keys(t4.errors).length && (t4 = void 0);
3685            }
3686            if (i2.$__.cachedRequired = {}, i2.$emit("validate", y2), i2.constructor.emit("validate", y2), t4) {
3687              for (var o2 in t4.errors) !i2[ct] && t4.errors[o2] instanceof S.CastError && i2.invali
3687date(o2, t4.errors[o2]);
3688              return t4;
3689            }
3690          };
3691          if (c2) {
3692            var m2, v2 = p(f2 = new Set(Object.keys(this.$__schema.paths)));
3693            try {
3694              for (v2.s(); !(m2 = v2.n()).done; ) {
3695                var g2 = m2.value, _2 = this.$__schema.path(g2);
3696                if (_2 && _2.$isMongooseArray) {
3697                  var w2 = this.$__getValue(g2);
3698                  w2 && At(w2, f2, g2);
3699                }
3700              }
3701            } catch (t4) {
3702              v2.e(t4);
3703            } finally {
3704              v2.f();
3705            }
3706            f2 = o(f2), h2 = {};
3707          } else {
3708            var O2 = Pt(this, t3, u2, e3 && e3._nestedValidate);
3709            f2 = s2 ? O2[0].filter(function(t4) {
3710              return i2.$isModified(t4);
3711            }) : O2[0], h2 = O2[1];
3712          }
3713          if ("string" == typeof t3 && (t3 = t3.split(" ")), 0 === f2.length) return z(function() {
3714            var t4 = b2();
3715            if (t4) return y2.$__schema.s.hooks.execPost("validate:error", y2, [y2], { error: t4 }, function(t5) {
3716              r3(t5);
3717            });
3718            r3(null, y2);
3719          });
3720          var $2 = {}, j2 = 0, P2 = null === (n2 = this.$__.saveOptions) || void 0 === n2 ? void 0 : n2.pathsToSave;
3721          if (Array.isArray(P2)) {
3722            P2 = new Set(P2);
3723            var A2, E2 = p(f2);
3724            try {
3725              for (E2.s(); !(A2 = E2.n()).done; ) {
3726                var x2 = A2.value;
3727                P2.has(x2) && I2(x2);
3728              }
3729            } catch (t4) {
3730              E2.e(t4);
3731            } finally {
3732              E2.f();
3733            }
3734          } else {
3735            var T2, N2 = p(f2);
3736            try {
3737              for (N2.s(); !(T2 = N2.n()).done; ) I2(T2.value);
3738            } catch (t4) {
3739              N2.e(t4);
3740            } finally {
3741              N2.f();
3742            }
3743          }
3744          function I2(t4) {
3745            null == t4 || $2[t4] || ($2[t4] = true, j2++, z(function() {
3746              var e4 = y2.$__schema.path(t4);
3747              if (!e4) return --j2 || B2();
3748              if (y2.$isValid(t4)) {
3749                if (null != e4[mt] && t4 !== e4.path) return --j2 || B2();
3750                var r4, n3 = y2.$__getValue(t4);
3751                (r4 = y2.$populated(t4)) ? n3 = r4 : null != n3 && null != n3.$__ && n3.$__.wasPopulated && (n3 = n3._doc._id);
3752                var o2 = null != y2.$__.pathsToScopes && t4 in y2.$__.pathsToScopes ? y2.$__.pathsToScopes[t4] : y2, i3 = l(l({}, h2[t4]), {}, { path: t4, validateAllPaths: c2, _nestedValidate: true });
3753                e4.doValidate(n3, function(r5) {
3754                  if (r5) {
3755                    if ((e4.$isSingleNested || e4.$isArraySubdocument || e4.$isMongooseDocumentArray) && r5 instanceof k) return --j2 || B2();
3756                    y2.invalidate(t4, r5, void 0, true);
3757                  }
3758                  --j2 || B2();
3759                }, o2, i3);
3760              } else --j2 || B2();
3761            }));
3762          }
3763          function B2() {
3764            var t4 = b2();
3765            if (t4) return y2.$__schema.s.hooks.execPost("validate:error", y2, [y2], { error: t4 }, function(t5) {
3766              r3(t5);
3767            });
3768            r3(null, y2);
3769          }
3770        }, wt.prototype.validateSync = function(t3, e3) {
3771          var r3, n2 = this, i2 = this;
3772          1 !== arguments.length || "object" !== d(arguments[0]) || Array.isArray(arguments[0]) || (e3 = arguments[0], t3 = null), r3 = e3 && "object" === d(e3) && "validateModifiedOnly" in e3 ? !!e3.validateModifiedOnly : this.$__schema.options.validateModifiedOnly;
3773          var s2, a2, u2 = e3 && e3.pathsToSkip, c2 = e3 && e3.validateAllPaths;
3774          if (c2) {
3775            if (u2) throw new TypeError("Cannot set both `validateAllPaths` and `pathsToSkip`");
3776            if (t3) throw new TypeError("Cannot set both `validateAllPaths` and `pathsToValidate`");
3777          }
3778          if ("string" == typeof t3) {
3779            var l2 = -1 === t3.indexOf(" ");
3780            t3 = l2 ? [t3] : t3.split(" ");
3781          } else "string" == typeof u2 && -1 !== u2.indexOf(" ") && (u2 = u2.split(" "));
3782          if (c2) {
3783            var f2, h2 = p(s2 = new Set(Object.keys(this.$__schema.paths)));
3784            try {
3785              for (h2.s(); !(f2 = h2.n()).done; ) {
3786                var y2 = f2.value, b2 = this.$__schema.path(y2);
3787                if (b2 && b2.$isMongooseArray) {
3788                  var m2 = this.$__getValue(y2);
3789                  m2 && At(m2, s2, y2);
3790                }
3791              }
3792            } catch (A3) {
3793              h2.e(A3);
3794            } finally {
3795              h2.f();
3796            }
3797            s2 = o(s2), a2 = {};
3798          } else {
3799            var v2 = Pt(this, t3, u2);
3800            s2 = r3 ? v2[0].filter(function(t4) {
3801              return n2.$isModified(t4);
3802            }) : v2[0], a2 = v2[1];
3803          }
3804          for (var g2 = {}, _2 = 0, w2 = s2.length; _2 < w2; ++_2) {
3805            var O2 = s2[_2];
3806            if (!g2[O2]) {
3807              g2[O2] = true;
3808              var $2 = i2.$__schema.path(O2);
3809              if ($2 && i2.$isValid(O2)) {
3810                var j2 = i2.$__getValue(O2), P2 = $2.doValidateSync(j2, i2, { skipSchemaValidators: a2[O2], path: O2, validateModifiedOnly: r3, validateAllPaths: c2 });
3811                if (P2) {
3812                  if (($2.$isSingleNested || $2.$isArraySubdocument || $2.$isMongooseDocumentArray) && P2 instanceof k) continue;
3813                  i2.invalidate(O2, P2, void 0, true);
3814                }
3815              }
3816            }
3817          }
3818          var A2 = i2.$__.validationError;
3819          if (i2.$__.validationError = void 0, i2.$emit("validate", i2), i2.constructor.emit("validate", i2), A2) for (var E2 in A2.errors) A2.errors[E2] instanceof S.CastError && i2.invalidate(E2, A2.errors[E2]);
3820          return A2;
3821        }, wt.prototype.invalidate = function(t3, e3, r3, n2) {
3822          if (this.$__.validationError || (this.$__.validationError = new k(this)), !this.$__.validationError.errors[t3]) return e3 && "string" != typeof e3 || (e3 = new N({ path: t3, message: e3, type: n2 || "user defined", value: r3 })), this.$__.validationError === e3 || this.$__.validationError.addError(t3, e3), this.$__.validationError;
3823        }, wt.prototype.$markValid = function(t3) {
3824          this.$__.validationError && this.$__.validationError.errors[t3] && (delete this.$__.validationError.errors[t3], 0 === Object.keys(this.$__.validationError.errors).length && (this.$__.validationError = null));
3825        }, wt.prototype.$isValid = function(t3) {
3826          var e3 = this;
3827          return null == this.$__.validationError || 0 === Object.keys(this.$__.validationError.errors).length || null != t3 && (-1 !== t3.indexOf(" ") && (t3 = t3.split(" ")), Array.isArray(t3) ? t3.some(function(t4) {
3828            return null == e3.$__.validationError.errors[t4];
3829          }) : null == this.$__.validationError.errors[t3]);
3830        }, wt.prototype.$__reset = function() {
3831          var t3, e3 = this.$isSubdocument ? null : this.$getAllSubdocs({ useCache: true });
3832          if (e3 && e3.length > 0) {
3833            var r3, n2 = p(e3);
3834            try {
3835              for (n2.s(); !(r3 = n2.n()).done; ) r3.value.$__reset();
3836            } catch (t4) {
3837              n2.e(t4);
3838            } finally {
3839              n2.f();
3840            }
3841          }
3842          return this.$__dirty().forEach(function(t4) {
3843            var e4 = t4.value;
3844            e4 && e4[ut] && (e4[at] = e4[ut], e4[ut] = {});
3845          }), this.$__.backup = {}, this.$__.backup.activePaths = { modify: Object.assign({}, this.$__.activePaths.getStatePaths("modify")), default: Object.assign({}, this.$__.activePaths.getStatePaths("default")) }, this.$__.backup.validationError = this.$__.validationError, this.$__.backup.errors = this.$errors, this.$__.activePaths.clear("modify"), this.$__.activePaths.clear("default"), this.$__.validationError = void 0, this.$errors = void 0, t3 = this, this.$__schema.requiredPaths().forEach(function(e4) {
3846            t3.$__.activePaths.require(e4);
3847          }), this;
3848        }, wt.prototype.$__undoReset = function() {
3849          if (null != this.$__.backup && null != this.$__.backup.activePaths) {
3850            this.$__.activePaths.states.modify = this.$__.backup.activePaths.modify, this.$__.activePaths.states.default = this.$__.backup.activePaths.default, this.$__.validationError = this.$__.backup.validationError, this.$errors = this.$__.backup.errors;
3851            var t3, e3 = p(this.$__dirty());
3852            try {
3853              for (e3.s(); !(t3 = e3.n()).done; ) {
3854                var r3 = t3.value.value;
3855                r3 && r3[ut] && r3[at] && (r3[ut] = r3[at]);
3856              }
3857            } catch (t4) {
3858              e3.e(t4);
3859            } finally {
3860              e3.f();
3861            }
3862            if (!this.$isSubdocument) {
3863              var n2, o2 = p(this.$getAllSubdocs());
3864              try {
3865                for (o2.s(); !(n2 = o2.n()).done; ) n2.value.$__undoReset();
3866              } catch (t4) {
3867                o2.e(t4);
3868              } finally {
3869                o2.f();
3870              }
3871            }
3872          }
3873        }, wt.prototype.$__dirty = function() {
3874          var t3 = this, e3 = this.$__.activePaths.map("modify", function(e4) {
3875            return { path: e4, value: t3.$__getValue(e4), schema: t3.$__path(e4) };
3876          });
3877          e3 = e3.concat(this.$__.activePaths.map("default", function(e4) {
3878            if ("_id" !== e4 && null != t3.$__getValue(e4)) return { path: e4, value: t3.$__getValue(e4), schema: t3.$__path(e4) };
3879          }));
3880          var r3 = new Map(e3.filter(function(t4) {
3881            return null != t4;
3882          }).map(function(t4) {
3883            return [t4.path, t4.value];
3884          })), n2 = [];
3885          return e3.forEach(function(t4) {
3886            if (t4) {
3887              for (var e4 = null, o2 = et(t4.path), i2 = 0; i2 < o2.length - 1; i2++) if (r3.has(o2[i2])) {
3888                e4 = r3.get(o2[i2]);
3889                break;
3890              }
3891              null == e4 ? n2.push(t4) : null != e4 && null != e4[ut] && e4.hasAtomics() && (e4[ut] = {}, e4[ut].$set = e4);
3892            }
3893          }), n2;
3894        }, wt.prototype.$__setSchema = function(t3) {
3895          R(t3.tree, this, void 0, t3.options);
3896          for (var e3 = 0, r3 = Object.keys(t3.virtuals); e3 < r3.length; e3++) {
3897            var n2 = r3[e3];
3898            t3.virtuals[n2]._applyDefaultGetters();
3899          }
3900          null == t3.path("schema") && (this.schema = t3), this.$__schema = t3, this[pt] = t3;
3901        }, wt.prototype.$__getArrayPathsToValidate = function() {
3902          return b || (b = r2(4878)), this.$__.activePaths.map("init", "modify", (function(t3) {
3903            return this.$__getValue(t3);
3904          }).bind(this)).filter(function(t3) {
3905            return t3 && Array.isArray(t3) && nt.isMongooseDocumentArray(t3) && t3.length;
3906          }).reduce(function(t3, e3) {
3907            return t3.concat(e3);
3908          }, []).filter(function(t3) {
3909            return t3;
3910          });
3911        }, wt.prototype.$getAllSubdocs = function(t3) {
3912          var e3;
3913          if (null != t3 && t3.useCache && null !== (e3 = this.$__.saveOptions) && void 0 !== e3 && e3.__subdocs) return this.$__.saveOptions.__subdocs;
3914          b || (b = r2(4878)), v = v || r2(6547);
3915          var n2 = [];
3916          return (function t4(e4) {
3917            var r3, o2 = [], i2 = p(e4.$__schema.childSchemas);
3918            try {
3919              for (i2.s(); !(r3 = i2.n()).done; ) {
3920                var s2 = r3.value.model, a2 = e4.$__getValue(s2.path);
3921                if (null != a2) {
3922                  if (a2.$__ && o2.push(a2), Array.isArray(a2)) {
3923                    var u2, c2 = p(a2);
3924                    try {
3925                      for (c2.s(); !(u2 = c2.n()).done; ) {
3926                        var l2 = u2.value;
3927                        null != l2 && l2.$__ && o2.push(l2);
3928                      }
3929                    } catch (t5) {
3930                      c2.e(t5);
3931                    } finally {
3932                      c2.f();
3933                    }
3934                  }
3935                  if (a2 instanceof Map) {
3936                    var f2, h2 = p(a2.values());
3937                    try {
3938                      for (h2.s(); !(f2 = h2.n()).done; ) {
3939                        var y2 = f2.value;
3940                        null != y2 && y2.$__ && o2.push(y2);
3941                      }
3942                    } catch (t5) {
3943                      h2.e(t5);
3944                    } finally {
3945                      h2.f();
3946                    }
3947                  }
3948                }
3949              }
3950            } catch (t5) {
3951              i2.e(t5);
3952            } finally {
3953              i2.f();
3954            }
3955            for (var d2 = 0, b2 = o2; d2 < b2.length; d2++) t4(b2[d2]);
3956            n2.push.apply(n2, o2);
3957          })(this), this.$__.saveOptions && (this.$__.saveOptions.__subdocs = n2), n2;
3958        }, wt.prototype.$__handleReject = function(t3) {
3959          this.$listeners("error").length ? this.$emit("error", t3) : this.constructor.listeners && this.constructor.listeners("error").length && this.constructor.emit("error", t3);
3960        }, wt.prototype.$toObject = function(t3, e3) {
3961          var r3, n2, o2, i2, s2, a2, u2, c2, f2, p2, h2, y2, b2, m2, v2, g2 = this.$__schema._defaultToObjectOptions(e3), _2 = this.$__hasOnlyPrimitiveValues();
3962          (t3 = nt.isPOJO(t3) ? l({}, t3) : {})._calledWithOptions = t3._calledWithOptions || l({}, t3), v2 = null != t3._calledWithOptions.minimize ? t3.minimize : null != (null === (r3 = this.$__schemaTypeOptions) || void 0 === r3 ? void 0 : r3.minimize) ? this.$__schemaTypeOptions.minimize : null != g2 && null != g2.minimize ? g2.minimize : this.$__schema.options.minimize, t3.minimize = v2, _2 || (t3._seen = t3._seen || /* @__P
3962URE__ */ new Map());
3963          var w2 = null !== (n2 = null !== (o2 = null !== (i2 = t3._calledWithOptions.depopulate) && void 0 !== i2 ? i2 : null == g2 ? void 0 : g2.depopulate) && void 0 !== o2 ? o2 : t3.depopulate) && void 0 !== n2 && n2;
3964          if (w2 && t3._isNested && this.$__.wasPopulated) return D(this.$__.wasPopulated.value || this._doc._id, t3);
3965          if (w2 && (t3.depopulate = true), null != g2) for (var O2 = 0, S2 = Object.keys(g2); O2 < S2.length; O2++) {
3966            var $2 = S2[O2];
3967            null == t3[$2] && (t3[$2] = g2[$2]);
3968          }
3969          t3._isNested = true, t3.json = e3, t3.minimize = v2;
3970          var j2 = t3._parentOptions;
3971          t3._parentOptions = this.$isSubdocument ? t3 : null;
3972          var P2, A2 = null !== (s2 = null !== (a2 = null !== (u2 = t3._calledWithOptions.schemaFieldsOnly) && void 0 !== u2 ? u2 : t3.schemaFieldsOnly) && void 0 !== a2 ? a2 : g2.schemaFieldsOnly) && void 0 !== s2 && s2;
3973          if (_2 && !t3.flattenObjectIds) P2 = this.$__toObjectShallow(A2);
3974          else if (A2) {
3975            P2 = {};
3976            for (var E2 = 0, x2 = Object.keys(this.$__schema.paths); E2 < x2.length; E2++) {
3977              var T2 = x2[E2], k2 = this.$__getValue(T2);
3978              if (void 0 !== k2) {
3979                var N2 = T2, I2 = P2;
3980                if (-1 !== T2.indexOf(".")) {
3981                  var B2 = T2.split(".");
3982                  N2 = B2[B2.length - 1];
3983                  for (var M2 = 0; M2 < B2.length - 1; ++M2) {
3984                    var R2;
3985                    I2[B2[M2]] = null !== (R2 = I2[B2[M2]]) && void 0 !== R2 ? R2 : {}, I2 = I2[B2[M2]];
3986                  }
3987                }
3988                I2[N2] = null !== k2 ? D(k2, t3) : null;
3989              }
3990            }
3991          } else P2 = D(this._doc, t3) || {};
3992          var U2 = null !== (c2 = null !== (f2 = null !== (p2 = t3._calledWithOptions.getters) && void 0 !== p2 ? p2 : t3.getters) && void 0 !== f2 ? f2 : g2.getters) && void 0 !== c2 && c2;
3993          U2 && ((function(t4, e4) {
3994            var r4, n3, o3 = t4.$__schema, i3 = Object.keys(o3.paths), s3 = i3.length, a3 = t4._doc;
3995            if (!a3) return e4;
3996            for (; s3--; ) {
3997              var u3 = (r4 = i3[s3]).split("."), c3 = u3.length, l2 = c3 - 1, f3 = e4, p3 = void 0;
3998              if (a3 = t4._doc, t4.$__isSelected(r4)) for (var h3 = 0; h3 < c3 && (n3 = a3[p3 = u3[h3]], null == f3 || "object" === d(f3)); ++h3) {
3999                if (h3 === l2) {
4000                  if (f3[p3] = o3.paths[r4].applyGetters(f3[p3], t4), Array.isArray(f3[p3]) && o3.paths[r4].$embeddedSchemaType) for (var y3 = 0; y3 < f3[p3].length; ++y3) f3[p3][y3] = o3.paths[r4].$embeddedSchemaType.applyGetters(f3[p3][y3], t4);
4001                } else {
4002                  if (null == n3) {
4003                    p3 in a3 && (f3[p3] = n3);
4004                    break;
4005                  }
4006                  f3 = f3[p3] || (f3[p3] = {});
4007                }
4008                a3 = n3;
4009              }
4010            }
4011          })(this, P2), t3.minimize && (P2 = X(P2) || {}));
4012          var C2 = null !== (h2 = null !== (y2 = null !== (b2 = t3._calledWithOptions.virtuals) && void 0 !== b2 ? b2 : g2.virtuals) && void 0 !== y2 ? y2 : null == j2 ? void 0 : j2.virtuals) && void 0 !== h2 ? h2 : void 0;
4013          (C2 || U2 && false !== C2) && Et(this, P2, t3, t3), false === t3.versionKey && this.$__schema.options.versionKey && delete P2[this.$__schema.options.versionKey];
4014          var F2 = null === (m2 = t3._calledWithOptions.transform) || void 0 === m2 || m2, L2 = void 0;
4015          if (true === F2 ? L2 = g2.transform : "function" == typeof F2 && (L2 = F2), F2 && (function(t4, e4) {
4016            var r4 = t4.$__schema, n3 = Object.keys(r4.paths || {});
4017            if (!t4._doc) return e4;
4018            for (var o3 = 0, i3 = n3; o3 < i3.length; o3++) {
4019              var s3, a3, u3, c3, l2, f3 = i3[o3], p3 = r4.paths[f3], h3 = null !== (s3 = p3.options.transform) && void 0 !== s3 ? s3 : null === (a3 = p3.constructor) || void 0 === a3 || null === (a3 = a3.defaultOptions) || void 0 === a3 ? void 0 : a3.transform, y3 = null !== (u3 = null === (c3 = p3.$embeddedSchemaType) || void 0 === c3 || null === (c3 = c3.options) || void 0 === c3 ? void 0 : c3.transform) && void 0 !== u3 ? u3 : null === (l2 = p3.$embeddedSchemaType) || void 0 === l2 || null === (l2 = l2.constructor) || void 0 === l2 || null === (l2 = l2.defaultOptions) || void 0 === l2 ? void 0 : l2.transform;
4020              if ("function" == typeof h3) {
4021                var d2 = t4.$get(f3);
4022                if (void 0 === d2) continue;
4023                var b3 = h3.call(t4, d2);
4024                xt(f3, b3), nt.setValue(f3, b3, e4);
4025              } else if ("function" == typeof y3) {
4026                var m3 = t4.$get(f3);
4027                if (void 0 === m3) continue;
4028                for (var v3 = [].concat(m3), g3 = 0; g3 < v3.length; ++g3) {
4029                  var _3 = y3.call(t4, v3[g3]);
4030                  v3[g3] = _3, xt(f3, _3);
4031                }
4032                e4[f3] = v3;
4033              }
4034            }
4035          })(this, P2), t3.useProjection && (function(t4, e4) {
4036            var r4 = t4.$__schema, n3 = Object.keys(r4.paths || {});
4037            if (!t4._doc) return e4;
4038            var o3 = t4.$__.selected;
4039            if (void 0 === o3 && (o3 = {}, rt.applyPaths(o3, r4)), null == o3 || 0 === Object.keys(o3).length) return e4;
4040            for (var i3 = 0, s3 = n3; i3 < s3.length; i3++) {
4041              var a3 = s3[i3];
4042              null == o3[a3] || o3[a3] || delete e4[a3];
4043            }
4044          })(this, P2), "function" == typeof L2) {
4045            var V2 = L2(this, P2, t3);
4046            void 0 !== V2 && (P2 = V2);
4047          }
4048          return P2;
4049        }, wt.prototype.$__toObjectShallow = function(t3) {
4050          var e3 = {};
4051          if (null != this._doc) {
4052            var r3, n2 = p(t3 ? Object.keys(this.$__schema.paths) : Object.keys(this._doc));
4053            try {
4054              for (n2.s(); !(r3 = n2.n()).done; ) {
4055                var o2 = r3.value, i2 = this._doc[o2];
4056                i2 instanceof Date ? e3[o2] = new Date(i2) : void 0 !== i2 && (e3[o2] = i2);
4057              }
4058            } catch (t4) {
4059              n2.e(t4);
4060            } finally {
4061              n2.f();
4062            }
4063          }
4064          return e3;
4065        }, wt.prototype.toObject = function(t3) {
4066          return this.$toObject(t3);
4067        }, wt.prototype.toJSON = function(t3) {
4068          return this.$toObject(t3, true);
4069        }, wt.prototype.ownerDocument = function() {
4070          return this;
4071        }, wt.prototype.parent = function() {
4072          return this.$isSubdocument || this.$__.wasPopulated ? this.$__.parent : this;
4073        }, wt.prototype.$parent = wt.prototype.parent, wt.prototype.inspect = function(t3) {
4074          var e3;
4075          nt.isPOJO(t3) && ((e3 = t3).minimize = false);
4076          var r3 = arguments.length > 0 ? this.toObject(e3) : this.toObject();
4077          return null == r3 ? "MongooseDocument { " + r3 + " }" : r3;
4078        }, Q.custom && (wt.prototype[Q.custom] = wt.prototype.inspect), wt.prototype.toString = function() {
4079          var t3 = this.inspect();
4080          return "string" == typeof t3 ? t3 : Q(t3);
4081        }, wt.prototype.equals = function(t3) {
4082          if (!t3) return false;
4083          var e3 = this.$__getValue("_id"), r3 = null != t3.$__ ? t3.$__getValue("_id") : t3;
4084          return e3 || r3 ? e3 && e3.equals ? e3.equals(r3) : e3 === r3 : it(this, t3);
4085        }, wt.prototype.populate = (function() {
4086          var t3 = u(i().m(function t4() {
4087            var e3, r3, n2, o2, s2, a2, u2, c2, l2, f2, h2 = arguments;
4088            return i().w(function(t5) {
4089              for (; ; ) switch (t5.n) {
4090                case 0:
4091                  if (e3 = {}, "function" != typeof (r3 = Array.prototype.slice.call(h2))[r3.length - 1]) {
4092                    t5.n = 1;
4093                    break;
4094                  }
4095                  throw new S("Document.prototype.populate() no longer accepts a callback");
4096                case 1:
4097                  if (0 !== r3.length) {
4098                    n2 = nt.populate.apply(null, r3), o2 = p(n2);
4099                    try {
4100                      for (o2.s(); !(s2 = o2.n()).done; ) a2 = s2.value, e3[a2.path] = a2;
4101                    } catch (t6) {
4102                      o2.e(t6);
4103                    } finally {
4104                      o2.f();
4105                    }
4106                  }
4107                  return u2 = nt.object.vals(e3), c2 = this.constructor, this.$__isNested && (c2 = this.$__[bt].constructor, l2 = this.$__.nestedPath, u2.forEach(function(t6) {
4108                    t6.path = l2 + "." + t6.path;
4109                  })), null != this.$session() && (f2 = this.$session(), u2.forEach(function(t6) {
4110                    null != t6.options ? "session" in t6.options || (t6.options.session = f2) : t6.options = { session: f2 };
4111                  })), u2.forEach(function(t6) {
4112                    t6._localModel = c2;
4113                  }), t5.a(2, c2.populate(this, u2));
4114              }
4115            }, t4, this);
4116          }));
4117          return function() {
4118            return t3.apply(this, arguments);
4119          };
4120        })(), wt.prototype.$getPopulatedDocs = function() {
4121          var t3 = [];
4122          null != this.$__.populated && (t3 = t3.concat(Object.keys(this.$__.populated)));
4123          var e3, r3 = [], n2 = p(t3);
4124          try {
4125            for (n2.s(); !(e3 = n2.n()).done; ) {
4126              var o2 = e3.value, i2 = this.$get(o2);
4127              Array.isArray(i2) ? r3 = r3.concat(i2) : i2 instanceof wt && r3.push(i2);
4128            }
4129          } catch (t4) {
4130            n2.e(t4);
4131          } finally {
4132            n2.f();
4133          }
4134          return r3;
4135        }, wt.prototype.populated = function(t3, e3, r3) {
4136          if (null == e3 || true === e3) {
4137            if (!this.$__.populated) return;
4138            if ("string" != typeof t3) return;
4139            var n2 = t3.endsWith(".$*") ? t3.replace(/\.\$\*$/, "") : t3, o2 = this.$__.populated[n2];
4140            return o2 ? true === e3 ? o2 : o2.value : void 0;
4141          }
4142          this.$__.populated || (this.$__.populated = {}), this.$__.populated[t3] = { value: e3, options: r3 };
4143          for (var i2 = t3.split("."), s2 = 0; s2 < i2.length - 1; ++s2) {
4144            var a2 = i2.slice(0, s2 + 1).join("."), u2 = this.$get(a2);
4145            if (null != u2 && null != u2.$__ && this.$populated(a2)) {
4146              var c2 = i2.slice(s2 + 1).join(".");
4147              u2.$populated(c2, e3, r3);
4148              break;
4149            }
4150          }
4151          return e3;
4152        }, wt.prototype.$populated = wt.prototype.populated, wt.prototype.$assertPopulated = function(t3, e3) {
4153          var r3 = this;
4154          if (Array.isArray(t3)) return t3.forEach(function(t4) {
4155            return r3.$assertPopulated(t4, e3);
4156          }), this;
4157          if (arguments.length > 1 && this.$set(e3), !this.$populated(t3)) throw new S('Expected path "'.concat(t3, '" to be populated'));
4158          return this;
4159        }, wt.prototype.depopulate = function(t3) {
4160          var e3;
4161          "string" == typeof t3 && (t3 = -1 === t3.indexOf(" ") ? [t3] : t3.split(" "));
4162          var r3 = this.$$populatedVirtuals ? Object.keys(this.$$populatedVirtuals) : [], n2 = this.$__ && this.$__.populated || {};
4163          if (0 === arguments.length) {
4164            var o2, i2 = p(r3);
4165            try {
4166              for (i2.s(); !(o2 = i2.n()).done; ) {
4167                var s2 = o2.value;
4168                delete this.$$populatedVirtuals[s2], delete this._doc[s2], delete n2[s2];
4169              }
4170            } catch (t4) {
4171              i2.e(t4);
4172            } finally {
4173              i2.f();
4174            }
4175            for (var a2 = 0, u2 = Object.keys(n2); a2 < u2.length; a2++) {
4176              var c2 = u2[a2];
4177              if (e3 = this.$populated(c2)) if (delete n2[c2], Array.isArray(e3)) {
4178                var l2 = nt.getValue(c2, this._doc);
4179                if (l2.isMongooseArray) for (var f2 = l2.__array, h2 = 0; h2 < f2.length; ++h2) {
4180                  var y2 = f2[h2];
4181                  null != y2 && (f2[h2] = y2 instanceof wt ? y2._doc._id : y2._id);
4182                }
4183                else nt.setValue(c2, e3, this._doc);
4184              } else nt.setValue(c2, e3, this._doc);
4185            }
4186            return this;
4187          }
4188          var d2, b2 = p(t3);
4189          try {
4190            for (b2.s(); !(d2 = b2.n()).done; ) {
4191              var m2 = d2.value;
4192              if (e3 = this.$populated(m2), delete n2[m2], -1 !== r3.indexOf(m2)) delete this.$$populatedVirtuals[m2], delete this._doc[m2];
4193              else if (e3) if (Array.isArray(e3)) {
4194                var v2 = nt.getValue(m2, this._doc);
4195                if (v2.isMongooseArray) for (var g2 = v2.__array, _2 = 0; _2 < g2.length; ++_2) {
4196                  var w2 = g2[_2];
4197                  null != w2 && (g2[_2] = w2 instanceof wt ? w2._doc._id : w2._id);
4198                }
4199                else nt.setValue(m2, e3, this._doc);
4200              } else nt.setValue(m2, e3, this._doc);
4201            }
4202          } catch (t4) {
4203            b2.e(t4);
4204          } finally {
4205            b2.f();
4206          }
4207          return this;
4208        }, wt.prototype.$__fullPath = function(t3) {
4209          return t3 || "";
4210        }, wt.prototype.getChanges = function() {
4211          var t3 = this.$__delta();
4212          return t3 ? t3[1] : {};
4213        }, wt.prototype.$__delta = function() {
4214          var t3 = this, e3 = this.$__dirty(), r3 = this.$__schema.options.optimisticConcurrency;
4215          if (r3) if (Array.isArray(r3)) {
4216            var o2 = new Set(r3);
4217            this.modifiedPaths().find(function(t4) {
4218              return o2.has(t4);
4219            }) && (this.$__.version = e3.length ? 3 : 1);
4220          } else this.$__.version = e3.length ? 3 : 1;
4221          if (e3.length || 3 === this.$__.version) {
4222            var i2 = {}, s2 = {}, a2 = e3.length, u2 = [], c2 = 0;
4223            for (i2._id = this._doc._id, null != (i2 && i2._id && i2._id.$__ || null) && (i2._id = i2._id.toObject({ transform: false, depopulate: true })); c2 < a2; ++c2) {
4224              var l2 = e3[c2], f2 = l2.value, p2 = Tt(this, l2.path, f2);
4225              if (p2) u2.push(p2);
4226              else {
4227                if (!this.$populated(l2.path, true) && this.$__.selected) {
4228                  var h2 = l2.path.split("."), y2 = h2[0];
4229                  if (this.$__.selected[y2] && this.$__.selected[y2].$elemMatch) {
4230                    if (!(h2.length > 1 && 0 == h2[1] && void 0 === i2[y2])) {
4231                      u2.push(l2.path);
4232                      continue;
4233                    }
4234                    i2[y2] = this.$__.selected[y2], h2[1] = "$", l2.path = h2.join(".");
4235                  }
4236                }
4237                if (this.$isDefault(l2.path) && this.$__.selected) {
4238                  if (-1 === l2.path.indexOf(".") && G(this.$__.selected, l2.path)) continue;
4239                  if (et(l2.path).find(function(e4) {
4240                    return G(t3.$__.isSelected, e4);
4241                  })) continue;
4242                }
4243                if (!u2.length) if (void 0 === f2) kt(this, 0, s2, l2, 1, "$unset");
4244                else if (null === f2) kt(this, 0, s2, l2, null);
4245                else if (nt.isMongooseArray(f2) && f2.$path() && f2[ut]) Nt(this, 0, s2, l2, f2);
4246                else if (f2[O.pathSymbol] && n.isBuffer(f2)) kt(this, 0, s2, l2, f2 = f2.toObject());
4247                else if (this.$__.primitiveAtomics && null != this.$__.primitiveAtomics[l2.path]) {
4248                  var d2 = this.$__.primitiveAtomics[l2.path], b2 = C(d2);
4249                  kt(this, 0, s2, l2, d2[b2], b2);
4250                } else kt(this, 0, s2, l2, f2 = D(f2, { depopulate: true, transform: false, virtuals: false, getters: false, omitUndefined: true, _isNested: true }));
4251              }
4252            }
4253            return u2.length ? new g(u2) : (this.$__.version && this.$__version(i2, s2), 0 === Object.keys(s2).length ? [i2, null] : [i2, s2]);
4254          }
4255        }, wt.prototype.$clone = function() {
4256          var t3 = new this.constructor();
4257          if (t3.$isNew = this.$isNew, this._doc && (t3._doc = D(this._doc, { retainDocuments: true })), this.$__) {
4258            var e3, r3 = new this.$__.constructor(), n2 = p(Object.getOwnPropertyNames(this.$__));
4259            try {
4260              for (n2.s(); !(e3 = n2.n()).done; ) {
4261                var o2 = e3.value;
4262                "activePaths" !== o2 && (r3[o2] = D(this.$__[o2]));
4263              }
4264            } catch (t4) {
4265              n2.e(t4);
4266            } finally {
4267              n2.f();
4268            }
4269            Object.assign(r3.activePaths, D(l({}, this.$__.activePaths))), t3.$__ = r3;
4270          }
4271          return t3;
4272        }, wt.prototype.$createModifiedPathsSnapshot = function() {
4273          var t3 = /* @__PURE__ */ new WeakMap();
4274          if (!this.$isSubdocument) {
4275            var e3, r3 = p(this.$getAllSubdocs());
4276            try {
4277              for (r3.s(); !(e3 = r3.n()).done; ) {
4278                var n2 = e3.value;
4279                t3.set(n2, n2.$__.activePaths.clone());
4280              }
4281            } catch (t4) {
4282              r3.e(t4);
4283            } finally {
4284              r3.f();
4285            }
4286          }
4287          return new j(t3, this.$__.activePaths.clone(), this.$__.version);
4288        }, wt.prototype.$restoreModifiedPathsSnapshot = function(t3) {
4289          if (this.$__.activePaths = t3.activePaths.clone(), this.$__.version = t3.version, !this.$isSubdocument) {
4290            var e3, r3 = p(this.$getAllSubdocs());
4291            try {
4292              for (r3.s(); !(e3 = r3.n()).done; ) {
4293                var n2 = e3.value;
4294                t3.subdocSnapshot.has(n2) && (n2.$__.activePaths = t3.subdocSnapshot.get(n2));
4295              }
4296            } catch (t4) {
4297              r3.e(t4);
4298            } finally {
4299              r3.f();
4300            }
4301          }
4302          return this;
4303        }, wt.prototype.$clearModifiedPaths = function() {
4304          if (this.$__.activePaths.clear("modify"), this.$__.activePaths.clear("init"), this.$__.version = 0, !this.$isSubdocument) {
4305            var t3, e3 = p(this.$getAllSubdocs());
4306            try {
4307              for (e3.s(); !(t3 = e3.n()).done; ) t3.value.$clearModifiedPaths();
4308            } catch (t4) {
4309              e3.e(t4);
4310            } finally {
4311              e3.f();
4312            }
4313          }
4314          return this;
4315        }, wt.prototype.$__hasOnlyPrimitiveValues = function() {
4316          return !this.$__.populated && !this.$__.wasPopulated && (null == this._doc || Object.values(this._doc).every(function(t3) {
4317            return null == t3 || "object" !== d(t3) || nt.isNativeObject(t3) && !Array.isArray(t3) || K(t3, "ObjectId") || K(t3, "Decimal128");
4318          }));
4319        }, wt.VERSION_WHERE = 1, wt.VERSION_INC = 2, wt.VERSION_ALL = 3, wt.ValidationError = k, t2.exports = wt;
4320      }, 2401: (t2) => {
4321        t2.exports = Math.floor;
4322      }, 2402: (t2, e2, r2) => {
4323        function n(t3) {
4324          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
4325            return typeof t4;
4326          } : function(t4) {
4327            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
4328          }, n(t3);
4329        }
4330        function o(t3) {
4331          return o = "function" == typeof Symbol && "symbol" === n(Symbol.iterator) ? function(t4) {
4332            return n(t4);
4333          } : function(t4) {
4334            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : n(t4);
4335          }, o(t3);
4336        }
4337        var i, s, a = r2(3743).codes, u = a.ERR_AMBIGUOUS_ARGUMENT, c = a.ERR_INVALID_ARG_TYPE, l = a.ERR_INVALID_ARG_VALUE, f = a.ERR_INVALID_RETURN_VALUE, p = a.ERR_MISSING_ARGS, h = r2(9068), y = r2(7352).inspect, d = r2(7352).types, b = d.isPromise, m = d.isRegExp, v = Object.assign ? Object.assign : r2(6182).assign, g = Object.is ? Object.is : r2(2064);
4338        function _() {
4339          var t3 = r2(6193);
4340          i = t3.isDeepEqual, s = t3.isDeepStrictEqual;
4341        }
4342        var w = false, O = t2.exports = P, S = {};
4343        function $(t3) {
4344          if (t3.message instanceof Error) throw t3.message;
4345          throw new h(t3);
4346        }
4347        function j(t3, e3, r3, n2) {
4348          if (!r3) {
4349            var o2 = false;
4350            if (0 === e3) o2 = true, n2 = "No value argument passed to `assert.ok()`";
4351            else if (n2 instanceof Error) throw n2;
4352            var i2 = new h({ actual: r3, expected: true, message: n2, operator: "==", stackStartFn: t3 });
4353            throw i2.generatedMessage = o2, i2;
4354          }
4355        }
4356        function P() {
4357          for (var t3 = arguments.length, e3 = new Array(t3), r3 = 0; r3 < t3; r3++) e3[r3] = arguments[r3];
4358          j.apply(void 0, [P, e3.length].concat(e3));
4359        }
4360        O.fail = function t3(e3, r3, n2, o2, i2) {
4361          var s2, a2 = arguments.length;
4362          if (0 === a2 ? s2 = "Failed" : 1 === a2 ? (n2 = e3, e3 = void 0) : (false === w && (w = true, ({}.emitWarning ? {}.emitWarning : console.warn.bind(console))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.", "DeprecationWarning", "DEP0094")), 2 === a2 && (o2 = "!=")), n2 instanceof Error) throw n2;
4363          var u2 = { actual: e3, expected: r3, operator: void 0 === o2 ? "fail" : o2, stackStartFn: i2 || t3 };
4364          void 0 !== n2 && (u2.message = n2);
4365          var c2 = new h(u2);
4366          throw s2 && (c2.message = s2, c2.generatedMessage = true), c2;
4367        }, O.AssertionError = h, O.ok = P, O.equal = function t3(e3, r3, n2) {
4368          if (arguments.length < 2) throw new p("actual", "expected");
4369          e3 != r3 && $({ actual: e3, expected: r3, message: n2, operator: "==", stackStartFn: t3 });
4370        }, O.notEqual = function t3(e3, r3, n2) {
4371          if (arguments.length < 2) throw new p("actual", "expected");
4372          e3 == r3 && $({ actual: e3, expected: r3, message: n2, operator: "!=", stackStartFn: t3 });
4373        }, O.deepEqual = function t3(e3, r3, n2) {
4374          if (arguments.length < 2) throw new p("actual", "expected");
4375          void 0 === i && _(), i(e3, r3) || $({ actual: e3, expected: r3, message: n2, operator: "deepEqual", stackStartFn: t3 });
4376        }, O.notDeepEqual = function t3(e3, r3, n2) {
4377          if (arguments.length < 2) throw new p("actual", "expected");
4378          void 0 === i && _(), i(e3, r3) && $({ actual: e3, expected: r3, message: n2, operator: "notDeepEqual", stackStartFn: t3 });
4379        }, O.deepStrictEqual = function t3(e3, r3, n2) {
4380          if (arguments.length < 2) throw new p("actual", "expected");
4381          void 0 === i && _(), s(e3, r3) || $({ actual: e3, expected: r3, message: n2, operator: "deepStrictEqual", stackStartFn: t3 });
4382        }, O.notDeepStrictEqual = function t3(e3, r3, n2) {
4383          if (arguments.length < 2) throw new p("actual", "expected");
4384          void 0 === i && _(), s(e3, r3) && $({ actual: e3, expected: r3, message: n2, operator: "notDeepStrictEqual", stackStartFn: t3 });
4385        }, O.strictEqual = function t3(e3, r3, n2) {
4386          if (arguments.length < 2) throw new p("actual", "expected");
4387          g(e3, r3) || $({ actual: e3, expected: r3, message: n2, operator: "strictEqual", stackStartFn: t3 });
4388        }, O.notStrictEqual = function t3(e3, r3, n2) {
4389          if (arguments.length < 2) throw new p("actual", "expected");
4390          g(e3, r3) && $({ actual: e3, expected: r3, message: n2, operator: "notStrictEqual", stackStartFn: t3 });
4391        };
4392        var A = function t3(e3, r3, n2) {
4393          var o2 = this;
4394          !(function(t4, e4) {
4395            if (!(t4 instanceof e4)) throw new TypeError("Cannot call a class as a function");
4396          })(this, t3), r3.forEach(function(t4) {
4397            t4 in e3 && (void 0 !== n2 && "string" == typeof n2[t4] && m(e3[t4]) && e3[t4].test(n2[t4]) ? o2[t4] = n2[t4] : o2[t4] = e3[t4]);
4398          });
4399        };
4400        function E(t3, e3, r3, n2) {
4401          if ("function" != typeof e3) {
4402            if (m(e3)) return e3.test(t3);
4403            if (2 === arguments.length) throw new c("expected", ["Function", "RegExp"], e3);
4404            if ("object" !== o(t3) || null === t3) {
4405              var a2 = new h({ actual: t3, expected: e3, message: r3, operator: "deepStrictEqual", stackStartFn: n2 });
4406              throw a2.operator = n2.name, a2;
4407            }
4408            var u2 = Object.keys(e3);
4409            if (e3 instanceof Error) u2.push("name", "message");
4410            else if (0 === u2.length) throw new l("error", e3, "may not be an empty object");
4411            return void 0 === i && _(), u2.forEach(function(o2) {
4412              "string" == typeof t3[o2] && m(e3[o2]) && e3[o2].test(t3[o2]) || (function(t4, e4, r4, n3, o3, i2) {
4413                if (!(r4 in t4) || !s(t4[r4], e4[r4])) {
4414                  if (!n3) {
4415                    var a3 = new A(t4, o3), u3 = new A(e4, o3, t4), c2 = new h({ actual: a3, expected: u3, operator: "deepStrictEqual", stackStartFn: i2 });
4416                    throw c2.actual = t4, c2.expected = e4, c2.operator = i2.name, c2;
4417                  }
4418                  $({ actual: t4, expected: e4, message: n3, operator: i2.name, stackStartFn: i2 });
4419                }
4420              })(t3, e3, o2, r3, u2, n2);
4421            }), true;
4422          }
4423          return void 0 !== e3.prototype && t3 instanceof e3 || !Error.isPrototypeOf(e3) && true === e3.call({}, t3);
4424        }
4425        function x(t3) {
4426          if ("function" != typeof t3) throw new c("fn", "Function", t3);
4427          try {
4428            t3();
4429          } catch (t4) {
4430            return t4;
4431          }
4432          return S;
4433        }
4434        function T(t3) {
4435          return b(t3) || null !== t3 && "object" === o(t3) && "function" == typeof t3.then && "function" == typeof t3.catch;
4436        }
4437        function k(t3) {
4438          return Promise.resolve().then(function() {
4439            var e3;
4440            if ("function" == typeof t3) {
4441              if (!T(e3 = t3())) throw new f("instance of Promise", "promiseFn", e3);
4442            } else {
4443              if (!T(t3)) throw new c("promiseFn", ["Function", "Promise"], t3);
4444              e3 = t3;
4445            }
4446            return Promise.resolve().then(function() {
4447              return e3;
4448            }).then(function() {
4449              return S;
4450            }).catch(function(t4) {
4451              return t4;
4452            });
4453          });
4454        }
4455        function N(t3, e3, r3, n2) {
4456          if ("string" == typeof r3) {
4457            if (4 === arguments.length) throw new c("error", ["Object", "Error", "Function", "RegExp"], r3);
4458            if ("object" === o(e3) && null !== e3) {
4459              if (e3.message === r3) throw new u("error/message", 'The error message "'.concat(e3.message, '" is identical to the message.'));
4460            } else if (e3 === r3) throw new u("error/message", 'The error "'.concat(e3, '" is identical to the message.'));
4461            n2 = r3, r3 = void 0;
4462          } else if (null != r3 && "object" !== o(r3) && "function" != typeof r3) throw new c("error", ["Object", "Error", "Function", "RegExp"], r3);
4463          if (e3 === S) {
4464            var i2 = "";
4465            r3 && r3.name && (i2 += " (".concat(r3.name, ")")), i2 += n2 ? ": ".concat(n2) : ".";
4466            var s2 = "rejects" === t3.name ? "rejection" : "exception";
4467            $({ actual: void 0, expected: r3, operator: t3.name, message: "Missing expected ".concat(s2).concat(i2), stackStartFn: t3 });
4468          }
4469          if (r3 && !E(e3, r3, n2, t3)) throw e3;
4470        }
4471        function I(t3, e3, r3, n2) {
4472          if (e3 !== S) {
4473            if ("string" == typeof r3 && (n2 = r3, r3 = void 0), !r3 || E(e3, r3)) {
4474              var o2 = n2 ? ": ".concat(n2) : ".", i2 = "doesNotReject" === t3.name ? "rejection" : "exception";
4475              $({ actual: e3, expected: r3, operator: t3.name, message: "Got unwanted ".concat(i2).concat(o2, "\n") + 'Actual message: "'.concat(e3 && e3.message, '"'), stackStartFn: t3 });
4476            }
4477            throw e3;
4478          }
4479        }
4480        function B() {
4481          for (var t3 = arguments.length, e3 = new Array(t3), r3 = 0; r3 < t3; r3++) e3[r3] = arguments[r3];
4482          j.apply(void 0, [B, e3.length].concat(e3));
4483        }
4484        O.throws = function t3(e3) {
4485          for (var r3 = arguments.length, n2 = new Array(r3 > 1 ? r3 - 1 : 0), o2 = 1; o2 < r3; o2++) n2[o2 - 1] = arguments[o2];
4486          N.apply(void 0, [t3, x(e3)].concat(n2));
4487        }, O.rejects = function t3(e3) {
4488          for (var r3 = arguments.length, n2 = new Array(r3 > 1 ? r3 - 1 : 0), o2 = 1; o2 < r3; o2++) n2[o2 - 1] = arguments[o2];
4489          return k(e3).then(function(e4) {
4490            return N.apply(void 0, [t3, e4].concat(n2));
4491          });
4492        }, O.doesNotThrow = function t3(e3) {
4493          for (var r3 = arguments.length, n2 = new Array(r3 > 1 ? r3 - 1 : 0), o2 = 1; o2 < r3; o2++) n2[o2 - 1] = arguments[o2];
4494          I.apply(void 0, [t3, x(e3)].concat(n2));
4495        }, O.doesNotReject = function t3(e3) {
4496          for (var r3 = arguments.length, n2 = new Array(r3 > 1 ? r3 - 1 : 0), o2 = 1; o2 < r3; o2++) n2[o2 - 1] = arguments[o2];
4497          return k(e3).then(function(e4) {
4498            return I.apply(void 0, [t3, e4].concat(n2));
4499          });
4500        }, O.ifError = function t3(e3) {
4501          if (null != e3) {
4502            var r3 = "ifError got unwanted exception: ";
4503            "object" === o(e3) && "string" == typeof e3.message ? 0 === e3.message.length && e3.constructor ? r3 += e3.constructor.name : r3 += e3.message : r3 += y(e3);
4504            var n2 = new h({ actual: e3, expected: null, operator: "ifError", message: r3, stackStartFn: t3 }), i2 = e3.stack;
4505            if ("string" == typeof i2) {
4506              var s2 = i2.split("\n");
4507              s2.shift();
4508              for (var a2 = n2.stack.split("\n"), u2 = 0; u2 < s2.length; u2++) {
4509                var c2 = a2.indexOf(s2[u2]);
4510                if (-1 !== c2) {
4511                  a2 = a2.slice(0, c2);
4512                  break;
4513                }
4514              }
4515              n2.stack = "".concat(a2.join("\n"), "\n").concat(s2.join("\n"));
4516            }
4517            throw n2;
4518          }
4519        }, O.strict = v(B, O, { equal: O.strictEqual, deepEqual: O.deepStrictEqual, notEqual: O.notStrictEqual, notDeepEqual: O.notDeepStrictEqual }), O.strict.strict = O.strict;
4520      }, 2403: (t2) => {
4521        t2.exports = "undefined" != typeof Reflect && Reflect.getPrototypeOf || null;
4522      }, 2423: (t2) => {
4523        t2.exports = function(t3, e2) {
4524          var r2 = t3.discriminatorMapping && t3.discriminatorMapping.value;
4525          if (r2 && !("sparse" in e2)) {
4526            var n = t3.options.discriminatorKey;
4527            e2.partialFilterExpression = e2.partialFilterExpression || {}, e2.partialFilterExpression[n] = r2;
4528          }
4529          return e2;
4530        };
4531      }, 2477: (t2, e2, r2) => {
4532        var n = r2(2402);
4533        t2.exports = function(t3) {
4534          return null == t3 || "" === t3 ? null : t3 instanceof Date ? (n.ok(!isNaN(t3.valueOf())), t3) : (n.ok("boolean" != typeof t3), e3 = t3 instanceof Number || "number" == typeof t3 ? new Date(t3) : "string" == typeof t3 && !isNaN(Number(t3)) && (Number(t3) >= 275761 || Number(t3) < -271820) ? new Date(Number(t3)) : "function" == typeof t3.valueOf ? new Date(t3.valueOf()) : new Date(t3), isNaN(e3.valueOf()) ? void n.ok(false) : e3);
4535          var e3;
4536        };
4537      }, 2481: (t2, e2, r2) => {
4538        var n = r2(4756);
4539        t2.exports = function() {
4540          return "function" == typeof Object.is ? Object.is : n;
4541        };
4542      }, 2486: (t2, e2) => {
4543        e2.read = function(t3, e3, r2, n, o) {
4544          var i, s, a = 8 * o - n - 1, u = (1 << a) - 1, c = u >> 1, l = -7, f = r2 ? o - 1 : 0, p = r2 ? -1 : 1, h = t3[e3 + f];
4545          for (f += p, i = h & (1 << -l) - 1, h >>= -l, l += a; l > 0; i = 256 * i + t3[e3 + f], f += p, l -= 8) ;
4546          for (s = i & (1 << -l) - 1, i >>= -l, l += n; l > 0; s = 256 * s + t3[e3 + f], f += p, l -= 8) ;
4547          if (0 === i) i = 1 - c;
4548          else {
4549            if (i === u) return s ? NaN : 1 / 0 * (h ? -1 : 1);
4550            s += Math.pow(2, n), i -= c;
4551          }
4552          return (h ? -1 : 1) * s * Math.pow(2, i - n);
4553        }, e2.write = function(t3, e3, r2, n, o, i) {
4554          var s, a, u, c = 8 * i - o - 1, l = (1 << c) - 1, f = l >> 1, p = 23 === o ? Math.pow(2, -24) - Math.pow(2, -77) : 0, h = n ? 0 : i - 1, y = n ? 1 : -1, d = e3 < 0 || 0 === e3 && 1 / e3 < 0 ? 1 : 0;
4555          for (e3 = Math.abs(e3), isNaN(e3) || e3 === 1 / 0 ? (a = isNaN(e3) ? 1 : 0, s = l) : (s = Math.floor(Math.log(e3) / Math.LN2), e3 * (u = Math.pow(2, -s)) < 1 && (s--, u *= 2), (e3 += s + f >= 1 ? p / u : p * Math.pow(2, 1 - f)) * u >= 2 && (s++, u /= 2), s + f >= l ? (a = 0, s = l) : s + f >= 1 ? (a = (e3 * u - 1) * Math.pow(2, o), s += f) : (a = e3 * Math.pow(2, f - 1) * Math.pow(2, o), s = 0)); o >= 8; t3[r2 + h] = 255 & a, h += y, a /= 256, o -= 8) ;
4556          for (s = s << o | a, c += o; c > 0; t3[r2 + h] = 255 & s, h += y, s /= 256, c -= 8) ;
4557          t3[r2 + h - y] |= 128 * d;
4558        };
4559      }, 2497: (t2, e2, r2) => {
4560        var n = r2(1243).isMongooseArray;
4561        t2.exports = function(t3) {
4562          return null != t3 && (n(t3) || null != t3.$__ || t3.isMongooseBuffer || t3.$isMongooseMap);
4563        };
4564      }, 2555: (t2) => {
4565        t2.exports = function(t3) {
4566          if (Array.isArray(t3)) {
4567            if (!t3.every(function(t4) {
4568              return "number" == typeof t4 || "string" == typeof t4;
4569            })) throw new Error("$type array values must be strings or numbers");
4570            return t3;
4571          }
4572          if ("number" != typeof t3 && "string" != typeof t3) throw new Error("$type parameter must be number, string, or array of numbers and strings");
4573          return t3;
4574        };
4575      }, 2580: (t2, e2, r2) => {
4576        var n = r2(2400), o = r2(3550).EventEmitter, i = r2(3672), s = r2(7058), a = r2(5549), u = i.ValidationError, c = r2(4957), l = r2(608);
4577        function f(t3, e3, r3, o2, u2) {
4578          if (!(this instanceof f)) return new f(t3, e3, r3, o2, u2);
4579          if (l(e3) && !e3.instanceOfSchema && (e3 = new s(e3)), e3 = this.schema || e3, !this.schema && e3.o
4579ptions._id && void 0 === (t3 = t3 || {})._id && (t3._id = new a()), !e3) throw new i.MissingSchemaError();
4580          for (var p in this.$__setSchema(e3), n.call(this, t3, r3, o2, u2), c(this, e3, { decorateDoc: true }), e3.methods) this[p] = e3.methods[p];
4581          for (var h in e3.statics) this[h] = e3.statics[h];
4582        }
4583        f.prototype = Object.create(n.prototype), f.prototype.constructor = f, f.events = new o(), f.$emitter = new o(), ["on", "once", "emit", "listeners", "removeListener", "setMaxListeners", "removeAllListeners", "addListener"].forEach(function(t3) {
4584          f[t3] = function() {
4585            return f.$emitter[t3].apply(f.$emitter, arguments);
4586          };
4587        }), f.ValidationError = u, t2.exports = f;
4588      }, 2653: (t2) => {
4589        t2.exports = ["Float16Array", "Float32Array", "Float64Array", "Int8Array", "Int16Array", "Int32Array", "Uint8Array", "Uint8ClampedArray", "Uint16Array", "Uint32Array", "BigInt64Array", "BigUint64Array"];
4590      }, 2692: (t2) => {
4591        t2.exports = function(t3, e2) {
4592          if (1 !== e2.length) {
4593            for (var r2 = e2[0], n = void 0, o = 0; o < e2.length - 1; ++o) {
4594              var i = t3.path(r2);
4595              i && i.schema ? (n = i.schema.options.strict, t3 = i.schema, r2 = i.$isMongooseDocumentArray && !isNaN(e2[o + 1]) ? "" : e2[o + 1]) : r2 += r2.length ? "." + e2[o + 1] : e2[o + 1];
4596            }
4597            return n;
4598          }
4599        };
4600      }, 2696: (t2, e2, r2) => {
4601        var n = r2(3305);
4602        t2.exports = function(t3, e3) {
4603          return "string" == typeof t3 && "string" == typeof e3 || "number" == typeof t3 && "number" == typeof e3 ? t3 === e3 : !(!n(t3, "ObjectId") || !n(e3, "ObjectId")) && t3.toString() === e3.toString();
4604        };
4605      }, 2724: (t2, e2, r2) => {
4606        var n = r2(3071), o = r2(9344), i = n("RegExp.prototype.exec"), s = r2(2268);
4607        t2.exports = function(t3) {
4608          if (!o(t3)) throw new s("`regex` must be a RegExp");
4609          return function(e3) {
4610            return null !== i(t3, e3);
4611          };
4612        };
4613      }, 2746: (t2) => {
4614        var e2 = "function" == typeof {}.nextTick ? {}.nextTick.bind({ env: {} }) : function(t3) {
4615          return setTimeout(t3, 0);
4616        };
4617        t2.exports = function(t3) {
4618          return e2(t3);
4619        };
4620      }, 2789: (t2) => {
4621        function e2(t3) {
4622          return e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
4623            return typeof t4;
4624          } : function(t4) {
4625            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
4626          }, e2(t3);
4627        }
4628        t2.exports = function(t3) {
4629          if (null == t3 || "object" !== e2(t3)) return false;
4630          var r2 = Object.getPrototypeOf(t3);
4631          return !r2 || "Object" === r2.constructor.name;
4632        };
4633      }, 2793: (t2) => {
4634        t2.exports = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
4635      }, 2822: (t2, e2, r2) => {
4636        t2.exports = r2(6353).Double;
4637      }, 2824: (t2, e2, r2) => {
4638        var n = r2(7930).objectIdSymbol, o = r2(8768);
4639        function i() {
4640          var t3, e3;
4641          if (this.$__.shardval) {
4642            e3 = (t3 = Object.keys(this.$__.shardval)).length, this.$where = this.$where || {};
4643            for (var r3 = 0; r3 < e3; ++r3) this.$where[t3[r3]] = this.$__.shardval[t3[r3]];
4644          }
4645        }
4646        function s() {
4647          var t3 = this.$__schema.options.shardKey || this.$__schema.options.shardkey;
4648          if (o.isPOJO(t3)) for (var e3, r3 = this.$__.shardval = {}, i2 = Object.keys(t3), s2 = i2.length, a = 0; a < s2; ++a) null == (e3 = this.$__getValue(i2[a])) ? r3[i2[a]] = e3 : o.isMongooseObject(e3) ? r3[i2[a]] = e3.toObject({ depopulate: true, _isNested: true }) : e3 instanceof Date || e3[n] ? r3[i2[a]] = e3 : "function" == typeof e3.valueOf ? r3[i2[a]] = e3.valueOf() : r3[i2[a]] = e3;
4649        }
4650        t2.exports = function(t3) {
4651          t3.post("init", function() {
4652            return s.call(this), this;
4653          }), t3.pre("save", function(t4) {
4654            i.call(this), t4();
4655          }), t3.pre("remove", function(t4) {
4656            i.call(this), t4();
4657          }), t3.post("save", function() {
4658            s.call(this);
4659          });
4660        }, t2.exports.storeShard = s;
4661      }, 2900: (t2, e2, r2) => {
4662        var n = r2(8260);
4663        t2.exports = function(t3) {
4664          if ("TopologyDescription" !== n(t3)) return false;
4665          var e3 = Array.from(t3.servers.values());
4666          return e3.length > 0 && e3.every(function(t4) {
4667            return "Unknown" === t4.type;
4668          });
4669        };
4670      }, 2914: (t2, e2, r2) => {
4671        function n(t3) {
4672          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
4673            return typeof t4;
4674          } : function(t4) {
4675            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
4676          }, n(t3);
4677        }
4678        var o = r2(7860), i = ["__proto__", "constructor", "prototype"];
4679        function s(t3, e3, r3, n2, o2, i2) {
4680          for (var a2, u = 0; u < t3.length && u < e3.length; ++u) a2 = t3[u], Array.isArray(a2) && Array.isArray(e3[u]) ? s(a2, e3[u], r3, n2, o2, i2) : a2 && (n2 ? n2(a2, r3, i2(e3[u])) : (a2[o2] && (a2 = a2[o2]), a2[r3] = i2(e3[u])));
4681        }
4682        function a(t3) {
4683          return t3;
4684        }
4685        e2.get = function(t3, r3, i2, s2) {
4686          var u;
4687          "function" == typeof i2 && (i2.length < 2 ? (s2 = i2, i2 = void 0) : (u = i2, i2 = void 0)), s2 || (s2 = a);
4688          var c = "string" == typeof t3 ? o(t3) : t3;
4689          if (!Array.isArray(c)) throw new TypeError("Invalid `path`. Must be either string or array");
4690          for (var l, f = r3, p = 0; p < c.length; ++p) {
4691            if (l = c[p], "string" != typeof c[p] && "number" != typeof c[p]) throw new TypeError("Each segment of path to `get()` must be a string or number, got " + n(c[p]));
4692            if (Array.isArray(f) && !/^\d+$/.test(l)) {
4693              var h = c.slice(p);
4694              return [].concat(f).map(function(t4) {
4695                return t4 ? e2.get(h, t4, i2 || u, s2) : s2(void 0);
4696              });
4697            }
4698            if (u) f = u(f, l);
4699            else {
4700              var y = i2 && f[i2] ? f[i2] : f;
4701              f = y instanceof Map ? y.get(l) : y[l];
4702            }
4703            if (!f) return s2(f);
4704          }
4705          return s2(f);
4706        }, e2.has = function(t3, e3) {
4707          var r3 = "string" == typeof t3 ? o(t3) : t3;
4708          if (!Array.isArray(r3)) throw new TypeError("Invalid `path`. Must be either string or array");
4709          for (var i2 = r3.length, s2 = e3, a2 = 0; a2 < i2; ++a2) {
4710            if ("string" != typeof r3[a2] && "number" != typeof r3[a2]) throw new TypeError("Each segment of path to `has()` must be a string or number, got " + n(r3[a2]));
4711            if (null == s2 || "object" !== n(s2) || !(r3[a2] in s2)) return false;
4712            s2 = s2[r3[a2]];
4713          }
4714          return true;
4715        }, e2.unset = function(t3, e3) {
4716          var r3 = "string" == typeof t3 ? o(t3) : t3;
4717          if (!Array.isArray(r3)) throw new TypeError("Invalid `path`. Must be either string or array");
4718          for (var s2 = r3.length, a2 = e3, u = 0; u < s2; ++u) {
4719            if (null == a2 || "object" !== n(a2) || !(r3[u] in a2)) return false;
4720            if ("string" != typeof r3[u] && "number" != typeof r3[u]) throw new TypeError("Each segment of path to `unset()` must be a string or number, got " + n(r3[u]));
4721            if (-1 !== i.indexOf(r3[u])) return false;
4722            if (u === s2 - 1) return delete a2[r3[u]], true;
4723            a2 = a2 instanceof Map ? a2.get(r3[u]) : a2[r3[u]];
4724          }
4725          return true;
4726        }, e2.set = function(t3, r3, u, c, l, f) {
4727          var p;
4728          "function" == typeof c && (c.length < 2 ? (l = c, c = void 0) : (p = c, c = void 0)), l || (l = a);
4729          var h = "string" == typeof t3 ? o(t3) : t3;
4730          if (!Array.isArray(h)) throw new TypeError("Invalid `path`. Must be either string or array");
4731          if (null != u) {
4732            for (var y = 0; y < h.length; ++y) {
4733              if ("string" != typeof h[y] && "number" != typeof h[y]) throw new TypeError("Each segment of path to `set()` must be a string or number, got " + n(h[y]));
4734              if (-1 !== i.indexOf(h[y])) return;
4735            }
4736            for (var d, b = f || /\$/.test(t3) && false !== f, m = u, v = (y = 0, h.length - 1); y < v;
4736 ++y) if ("$" != (d = h[y])) {
4737              if (Array.isArray(m) && !/^\d+$/.test(d)) {
4738                var g = h.slice(y);
4739                if (!b && Array.isArray(r3)) for (var _ = 0; _ < m.length && _ < r3.length; ++_) e2.set(g, r3[_], m[_], c || p, l, b);
4740                else for (_ = 0; _ < m.length; ++_) e2.set(g, r3, m[_], c || p, l, b);
4741                return;
4742              }
4743              if (p) m = p(m, d);
4744              else {
4745                var w = c && m[c] ? m[c] : m;
4746                m = w instanceof Map ? w.get(d) : w[d];
4747              }
4748              if (!m) return;
4749            } else if (y == v - 1) break;
4750            if (d = h[v], c && m[c] && (m = m[c]), Array.isArray(m) && !/^\d+$/.test(d)) if (!b && Array.isArray(r3)) s(m, r3, d, p, c, l);
4751            else for (_ = 0; _ < m.length; ++_) {
4752              var O = m[_];
4753              O && (p ? p(O, d, l(r3)) : (O[c] && (O = O[c]), O[d] = l(r3)));
4754            }
4755            else p ? p(m, d, l(r3)) : m instanceof Map ? m.set(d, l(r3)) : m[d] = l(r3);
4756          }
4757        }, e2.stringToParts = o;
4758      }, 2945: (t2, e2, r2) => {
4759        function n(t3) {
4760          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
4761            return typeof t4;
4762          } : function(t4) {
4763            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
4764          }, n(t3);
4765        }
4766        function o() {
4767          try {
4768            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
4769            }));
4770          } catch (t4) {
4771          }
4772          return (o = function() {
4773            return !!t3;
4774          })();
4775        }
4776        function i(t3) {
4777          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
4778            return t4.__proto__ || Object.getPrototypeOf(t4);
4779          }, i(t3);
4780        }
4781        function s(t3, e3) {
4782          return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
4783            return t4.__proto__ = e4, t4;
4784          }, s(t3, e3);
4785        }
4786        var a = (function(t3) {
4787          function e3() {
4788            return (function(t4, e4) {
4789              if (!(t4 instanceof e4)) throw new TypeError("Cannot call a class as a function");
4790            })(this, e3), (function(t4, e4, r4) {
4791              return e4 = i(e4), (function(t5, e5) {
4792                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
4793                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
4794                return (function(t6) {
4795                  if (void 0 === t6) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4796                  return t6;
4797                })(t5);
4798              })(t4, o() ? Reflect.construct(e4, r4 || [], i(t4).constructor) : e4.apply(t4, r4));
4799            })(this, e3, arguments);
4800          }
4801          return (function(t4, e4) {
4802            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
4803            t4.prototype = Object.create(e4 && e4.prototype, { constructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && s(t4, e4);
4804          })(e3, t3), r3 = e3, Object.defineProperty(r3, "prototype", { writable: false }), r3;
4805          var r3;
4806        })(r2(8879)), u = r2(5761);
4807        Object.defineProperty(a.prototype, "subtype", u), t2.exports = a;
4808      }, 3071: (t2, e2, r2) => {
4809        var n = r2(6400), o = r2(8863), i = o([n("%String.prototype.indexOf%")]);
4810        t2.exports = function(t3, e3) {
4811          var r3 = n(t3, !!e3);
4812          return "function" == typeof r3 && i(t3, ".prototype.") > -1 ? o([r3]) : r3;
4813        };
4814      }, 3091: (t2, e2, r2) => {
4815        function n(t3) {
4816          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
4817            return typeof t4;
4818          } : function(t4) {
4819            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
4820          }, n(t3);
4821        }
4822        function o(t3, e3) {
4823          var r3 = Object.keys(t3);
4824          if (Object.getOwnPropertySymbols) {
4825            var n2 = Object.getOwnPropertySymbols(t3);
4826            e3 && (n2 = n2.filter(function(e4) {
4827              return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
4828            })), r3.push.apply(r3, n2);
4829          }
4830          return r3;
4831        }
4832        function i(t3) {
4833          for (var e3 = 1; e3 < arguments.length; e3++) {
4834            var r3 = null != arguments[e3] ? arguments[e3] : {};
4835            e3 % 2 ? o(Object(r3), true).forEach(function(e4) {
4836              s(t3, e4, r3[e4]);
4837            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t3, Object.getOwnPropertyDescriptors(r3)) : o(Object(r3)).forEac
4837h(function(e4) {
4838              Object.defineProperty(t3, e4, Object.getOwnPropertyDescriptor(r3, e4));
4839            });
4840          }
4841          return t3;
4842        }
4843        function s(t3, e3, r3) {
4844          return (e3 = (function(t4) {
4845            var e4 = (function(t5) {
4846              if ("object" != n(t5) || !t5) return t5;
4847              var e5 = t5[Symbol.toPrimitive];
4848              if (void 0 !== e5) {
4849                var r4 = e5.call(t5, "string");
4850                if ("object" != n(r4)) return r4;
4851                throw new TypeError("@@toPrimitive must return a primitive value.");
4852              }
4853              return String(t5);
4854            })(t4);
4855            return "symbol" == n(e4) ? e4 : e4 + "";
4856          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
4857        }
4858        var a, u = r2(4625), c = r2(6426), l = r2(863), f = r2(4327), p = r2(8260), h = r2(5549), y = r2(3305), d = r2(8768), b = c.CastError;
4859        function m(t3, e3) {
4860          var r3 = "string" == typeof t3 && 24 === t3.length && /^[a-f0-9]+$/i.test(t3), n2 = e3 && e3.suppressWarning;
4861          !r3 && void 0 !== t3 || n2 || d.warn("mongoose: To create a new ObjectId please try `Mongoose.Types.ObjectId` instead of using `Mongoose.Schema.ObjectId`. Set the `suppressWarning` option if you're trying to create a hex char path in your schema."), c.call(this, t3, e3, "ObjectId");
4862        }
4863        function v(t3) {
4864          return this.cast(t3);
4865        }
4866        m.schemaName = "ObjectId", m.defaultOptions = {}, m.prototype = Object.create(c.prototype), m.prototype.constructor = m, m.prototype.OptionsConstructor = u, m.get = c.get, m.set = c.set, m.setters = [], m.prototype.auto = function(t3) {
4867          return t3 && (this.default(_), this.set(w)), this;
4868        }, m._checkRequired = function(t3) {
4869          return y(t3, "ObjectId");
4870        }, m._cast = l, m.cast = function(t3) {
4871          return 0 === arguments.length || (false === t3 && (t3 = this._defaultCaster), this._cast = t3), this._cast;
4872        }, m._defaultCaster = function(t3) {
4873          if (!y(t3, "ObjectId")) throw new Error(t3 + " is not an instance of ObjectId");
4874          return t3;
4875        }, m.checkRequired = c.checkRequired, m.prototype.checkRequired = function(t3, e3) {
4876          return c._isRef(this, t3, e3, true) ? !!t3 : ("function" == typeof this.constructor.checkRequired ? this.constructor.checkRequired() : m.checkRequired())(t3);
4877        }, m.prototype.cast = function(t3, e3, r3, n2, o2) {
4878          if (!y(t3, "ObjectId") && c._isRef(this, t3, e3, r3)) {
4879            if ("objectid" === (p(t3) || "").toLowerCase()) return new h(t3.toHexString());
4880            if (null == t3 || d.isNonBuiltinObject(t3)) return this._castRef(t3, e3, r3, o2);
4881          }
4882          var i2;
4883          i2 = "function" == typeof this._castFunction ? this._castFunction : "function" == typeof this.constructor.cast ? this.constructor.cast() : m.cast();
4884          try {
4885            return i2(t3);
4886          } catch (e4) {
4887            throw new b("ObjectId", t3, this.path, e4, this);
4888          }
4889        };
4890        var g = i(i({}, c.prototype.$conditionalHandlers), {}, { $gt: v, $gte: v, $lt: v, $lte: v });
4891        function _() {
4892          return new h();
4893        }
4894        function w(t3) {
4895          return a || (a = r2(2400)), this instanceof a && void 0 === t3 ? new h() : t3;
4896        }
4897        Object.defineProperty(m.prototype, "$conditionalHandlers", { enumerable: false, value: g }), _.$runBeforeSetters = true, m.prototype.toJSONSchema = function(t3) {
4898          var e3 = this.options.required && "function" != typeof this.options.required || "_id" === this.path;
4899          return f("string", "objectId", null == t3 ? void 0 : t3.useBsonType, e3);
4900        }, m.prototype.autoEncryptionType = function() {
4901          return "objectId";
4902        }, t2.exports = m;
4903      }, 3123: (t2) => {
4904        t2.exports = Function.prototype.call;
4905      }, 3191: (t2, e2, r2) => {
4906        var n = r2(988), o = function() {
4907          return !!n;
4908        };
4909        o.hasArrayLengthDefineBug = function() {
4910          if (!n) return null;
4911          try {
4912            return 1 !== n([], "length", { value: 1 }).length;
4913          } catch (t3) {
4914            return true;
4915          }
4916        }, t2.exports = o;
4917      }, 3216: (t2, e2, r2) => {
4918        function n(t3, e3) {
4919          var r3 = Object.keys(t3);
4920          if (Object.getOwnPropertySymbols) {
4921            var n2 = Object.getOwnPropertySymbols(t3);
4922            e3 && (n2 = n2.filter(function(e4) {
4923              return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
4924            })), r3.push.apply(r3, n2);
4925          }
4926          return r3;
4927        }
4928        function o(t3) {
4929          for (var e3 = 1; e3 < arguments.length; e3++) {
4930            var r3 = null != arguments[e3] ? arguments[e3] : {};
4931            e3 % 2 ? n(Object(r3), true).forEach(function(e4) {
4932              i(t3, e4, r3[e4]);
4933            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t3, Object.getOwnPropertyDescriptors(r3)) : n(Object(r3)).forEac
4933h(function(e4) {
4934              Object.defineProperty(t3, e4, Object.getOwnPropertyDescriptor(r3, e4));
4935            });
4936          }
4937          return t3;
4938        }
4939        function i(t3, e3, r3) {
4940          return (e3 = (function(t4) {
4941            var e4 = (function(t5) {
4942              if ("object" != s(t5) || !t5) return t5;
4943              var e5 = t5[Symbol.toPrimitive];
4944              if (void 0 !== e5) {
4945                var r4 = e5.call(t5, "string");
4946                if ("object" != s(r4)) return r4;
4947                throw new TypeError("@@toPrimitive must return a primitive value.");
4948              }
4949              return String(t5);
4950            })(t4);
4951            return "symbol" == s(e4) ? e4 : e4 + "";
4952          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
4953        }
4954        function s(t3) {
4955          return s = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
4956            return typeof t4;
4957          } : function(t4) {
4958            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
4959          }, s(t3);
4960        }
4961        var a = r2(8768), u = /* @__PURE__ */ new Set(["__index", "__parentArray", "_doc"]);
4962        t2.exports = function(t3, e3) {
4963          if (a.isPOJO(t3) && null != t3.$__ && null != t3._doc) {
4964            if (e3) {
4965              for (var r3 = {}, n2 = 0, i2 = Object.keys(t3); n2 < i2.length; n2++) {
4966                var c = i2[n2];
4967                "symbol" !== s(c) && "$" !== c[0] && (u.has(c) || (r3[c] = t3[c]));
4968              }
4969              return o(o({}, t3._doc), r3);
4970            }
4971            return t3._doc;
4972          }
4973          return t3;
4974        };
4975      }, 3279: (t2) => {
4976        t2.exports = Function.prototype.apply;
4977      }, 3303: (t2, e2) => {
4978        e2._ = { transform: false, virtuals: false, getters: false, _skipDepopulateTopLevel: true, depopulate: true, flattenDecimals: false, useProjection: false, versionKey: true, flattenObjectIds: false };
4979      }, 3305: (t2) => {
4980        t2.exports = function(t3, e2) {
4981          return null != t3 && t3._bsontype === e2;
4982        };
4983      }, 3318: (t2, e2, r2) => {
4984        function n(t3) {
4985          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
4986            return typeof t4;
4987          } : function(t4) {
4988            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
4989          }, n(t3);
4990        }
4991        function o(t3, e3) {
4992          var r3 = Object.keys(t3);
4993          if (Object.getOwnPropertySymbols) {
4994            var n2 = Object.getOwnPropertySymbols(t3);
4995            e3 && (n2 = n2.filter(function(e4) {
4996              return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
4997            })), r3.push.apply(r3, n2);
4998          }
4999          return r3;
5000        }
5001        function i(t3) {
5002          for (var e3 = 1; e3 < arguments.length; e3++) {
5003            var r3 = null != arguments[e3] ? arguments[e3] : {};
5004            e3 % 2 ? o(Object(r3), true).forEach(function(e4) {
5005              s(t3, e4, r3[e4]);
5006            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t3, Object.getOwnPropertyDescriptors(r3)) : o(Object(r3)).forEach(function(e4) {
5007              Object.defineProperty(t3, e4, Object.getOwnPropertyDescriptor(r3, e4));
5008            });
5009          }
5010          return t3;
5011        }
5012        function s(t3, e3, r3) {
5013          return (e3 = (function(t4) {
5014            var e4 = (function(t5) {
5015              if ("object" != n(t5) || !t5) return t5;
5016              var e5 = t5[Symbol.toPrimitive];
5017              if (void 0 !== e5) {
5018                var r4 = e5.call(t5, "string");
5019                if ("object" != n(r4)) return r4;
5020                throw new TypeError("@@toPrimitive must return a primitive value.");
5021              }
5022              return String(t5);
5023            })(t4);
5024            return "symbol" == n(e4) ? e4 : e4 + "";
5025          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
5026        }
5027        var a = r2(3609), u = r2(6426), c = r2(4058), l = r2(4327);
5028        function f(t3, e3) {
5029          u.call(this, t3, e3, "BigInt");
5030        }
5031        f.schemaName = "BigInt", f.defaultOptions = {}, f.prototype = Object.create(u.prototype), f.prototype.constructor = f, f._cast = c, f.set = u.set, f.setters = [], f.get = u.get, f.cast = function(t3) {
5032          return 0 === arguments.length || (false === t3 && (t3 = this._defaultCaster), this._cast = t3), this._cast;
5033        }
5033, f._checkRequired = function(t3) {
5034          return null != t3;
5035        }, f.checkRequired = u.checkRequired, f.prototype.checkRequired = function(t3) {
5036          return this.constructor._checkRequired(t3);
5037        }, f.prototype.cast = function(t3) {
5038          var e3;
5039          e3 = "function" == typeof this._castFunction ? this._castFunction : "function" == typeof this.constructor.cast ? this.constructor.cast() : f.cast();
5040          try {
5041            return e3(t3);
5042          } catch (e4) {
5043            throw new a("BigInt", t3, this.path, e4, this);
5044          }
5045        };
5046        var p = i(i({}, u.prototype.$conditionalHandlers), {}, { $gt: h, $gte: h, $lt: h, $lte: h });
5047        function h(t3, e3) {
5048          return this.castForQuery(null, t3, e3);
5049        }
5050        Object.defineProperty(f.prototype, "$conditionalHandlers", { enumerable: false, value: p }), f.prototype.castForQuery = function(t3, e3, r3) {
5051          var n2;
5052          if (null != t3) return (n2 = this.$conditionalHandlers[t3]) ? n2.call(this, e3) : this.applySetters(e3, r3);
5053          try {
5054            return this.applySetters(e3, r3);
5055          } catch (t4) {
5056            throw t4 instanceof a && t4.path === this.path && null != this.$fullPath && (t4.path = this.$fullPath), t4;
5057          }
5058        }, f.prototype._castNullish = function(t3) {
5059          return void 0 === t3 || ("function" == typeof this.constructor.cast ? this.constructor.cast() : f.cast()), t3;
5060        }, f.prototype.toJSONSchema = function(t3) {
5061          var e3 = this.options.required && "function" != typeof this.options.required;
5062          return l("string", "long", null == t3 ? void 0 : t3.useBsonType, e3);
5063        }, f.prototype.autoEncryptionType = function() {
5064          return "long";
5065        }, t2.exports = f;
5066      }, 3381: (t2) => {
5067        function e2() {
5068          return null != this._id ? this._id.toString() : null;
5069        }
5070        t2.exports = function(t3) {
5071          return !t3.paths.id && t3.paths._id && t3.options.id ? (t3.aliases && t3.aliases.id || t3.virtual("id").get(e2), t3) : t3;
5072        };
5073      }, 3388: (t2) => {
5074        t2.exports = "undefined" != typeof Reflect && Reflect && Reflect.apply;
5075      }, 3414: (t2) => {
5076        t2.exports = Number.isNaN || function(t3) {
5077          return t3 != t3;
5078        };
5079      }, 3426: (t2, e2, r2) => {
5080        var n = r2(2653), o = "undefined" == typeof globalThis ? r2.g : globalThis;
5081        t2.exports = function() {
5082          for (var t3 = [], e3 = 0; e3 < n.length; e3++) "function" == typeof o[n[e3]] && (t3[t3.length] = n[e3]);
5083          return t3;
5084        };
5085      }, 3441: (t2, e2, r2) => {
5086        function n(t3) {
5087          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
5088            return typeof t4;
5089          } : function(t4) {
5090            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
5091          }, n(t3);
5092        }
5093        function o() {
5094          try {
5095            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
5096            }));
5097          } catch (t4) {
5098          }
5099          return (o = function() {
5100            return !!t3;
5101          })();
5102        }
5103        function i(t3) {
5104          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
5105            return t4.__proto__ || Object.getPrototypeOf(t4);
5106          }, i(t3);
5107        }
5108        function s(t3, e3) {
5109          return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
5110            return t4.__proto__ = e4, t4;
5111          }, s(t3, e3);
5112        }
5113        var a = (function(t3) {
5114          function e3(t4, r4) {
5115            var s2;
5116            !(function(t5, e4) {
5117              if (!(t5 instanceof e4)) throw new TypeError("Cannot call a class as a function");
5118            })(this, e3);
5119            var a2 = Array.isArray(r4) ? "array" : "primitive value";
5120            return (s2 = (function(t5, e4, r5) {
5121              return e4 = i(e4), (function(t6, e5) {
5122                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
5123                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
5124                return (function(t7) {
5125                  if (void 0 === t7) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
5126                  return t7;
5127                })(t6);
5128              })(t5, o() ? Reflect.construct(e4, r5 || [], i(t5).constructor) : e4.apply(t5, r5));
5129            })(this, e3, ["Tried to set nested object field `" + t4 + "` to ".concat(a2, " `") + r4 + "`"])).path = t4, s2;
5130          }
5131          return (function(t4, e4) {
5132            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
5133            t4.prototype = Object.create(e4 && e4.prototype, { c
5133onstructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && s(t4, e4);
5134          })(e3, t3), r3 = e3, Object.defineProperty(r3, "prototype", { writable: false }), r3;
5135          var r3;
5136        })(r2(8213));
5137        Object.defineProperty(a.prototype, "name", { value: "ObjectExpectedError" }), t2.exports = a;
5138      }, 3550: (t2) => {
5139        function e2(t3) {
5140          return e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
5141            return typeof t4;
5142          } : function(t4) {
5143            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
5144          }, e2(t3);
5145        }
5146        var r2, n = "object" === ("undefined" == typeof Reflect ? "undefined" : e2(Reflect)) ? Reflect : null, o = n && "function" == typeof n.apply ? n.apply : function(t3, e3, r3) {
5147          return Function.prototype.apply.call(t3, e3, r3);
5148        };
5149        r2 = n && "function" == typeof n.ownKeys ? n.ownKeys : Object.getOwnPropertySymbols ? function(t3) {
5150          return Object.getOwnPropertyNames(t3).concat(Object.getOwnPropertySymbols(t3));
5151        } : function(t3) {
5152          return Object.getOwnPropertyNames(t3);
5153        };
5154        var i = Number.isNaN || function(t3) {
5155          return t3 != t3;
5156        };
5157        function s() {
5158          s.init.call(this);
5159        }
5160        t2.exports = s, t2.exports.once = function(t3, e3) {
5161          return new Promise(function(r3, n2) {
5162            function o2(r4) {
5163              t3.removeListener(e3, i2), n2(r4);
5164            }
5165            function i2() {
5166              "function" == typeof t3.removeListener && t3.removeListener("error", o2), r3([].slice.call(arguments));
5167            }
5168            b(t3, e3, i2, { once: true }), "error" !== e3 && (function(t4, e4) {
5169              "function" == typeof t4.on && b(t4, "error", e4, { once: true });
5170            })(t3, o2);
5171          });
5172        }, s.EventEmitter = s, s.prototype._events = void 0, s.prototype._eventsCount = 0, s.prototype._maxListeners = void 0;
5173        var a = 10;
5174        function u(t3) {
5175          if ("function" != typeof t3) throw new TypeError('The "listener" argument must be of type Function. Received type ' + e2(t3));
5176        }
5177        function c(t3) {
5178          return void 0 === t3._maxListeners ? s.defaultMaxListeners : t3._maxListeners;
5179        }
5180        function l(t3, e3, r3, n2) {
5181          var o2, i2, s2, a2;
5182          if (u(r3), void 0 === (i2 = t3._events) ? (i2 = t3._events = /* @__PURE__ */ Object.create(null), t3._eventsCount = 0) : (void 0 !== i2.newListener && (t3.emit("newListener", e3, r3.listener ? r3.listener : r3), i2 = t3._events), s2 = i2[e3]), void 0 === s2) s2 = i2[e3] = r3, ++t3._eventsCount;
5183          else if ("function" == typeof s2 ? s2 = i2[e3] = n2 ? [r3, s2] : [s2, r3] : n2 ? s2.unshift(r3) : s2.push(r3), (o2 = c(t3)) > 0 && s2.length > o2 && !s2.warned) {
5184            s2.warned = true;
5185            var l2 = new Error("Possible EventEmitter memory leak detected. " + s2.length + " " + String(e3) + " listeners added. Use emitter.setMaxListeners() to increase limit");
5186            l2.name = "MaxListenersExceededWarning", l2.emitter = t3, l2.type = e3, l2.count = s2.length, a2 = l2, console && console.warn && console.warn(a2);
5187          }
5188          return t3;
5189        }
5190        function f() {
5191          if (!this.fired) return this.target.removeListener(this.type, this.wrapFn), this.fired = true, 0 === arguments.length ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
5192        }
5193        function p(t3, e3, r3) {
5194          var n2 = { fired: false, wrapFn: void 0, target: t3, type: e3, listener: r3 }, o2 = f.bind(n2);
5195          return o2.listener = r3, n2.wrapFn = o2, o2;
5196        }
5197        function h(t3, e3, r3) {
5198          var n2 = t3._events;
5199          if (void 0 === n2) return [];
5200          var o2 = n2[e3];
5201          return void 0 === o2 ? [] : "function" == typeof o2 ? r3 ? [o2.listener || o2] : [o2] : r3 ? (function(t4) {
5202            for (var e4 = new Array(t4.length), r4 = 0; r4 < e4.length; ++r4) e4[r4] = t4[r4].listener || t4[r4];
5203            return e4;
5204          })(o2) : d(o2, o2.length);
5205        }
5206        function y(t3) {
5207          var e3 = this._events;
5208          if (void 0 !== e3) {
5209            var r3 = e3[t3];
5210            if ("function" == typeof r3) return 1;
5211            if (void 0 !== r3) return r3.length;
5212          }
5213          return 0;
5214        }
5215        function d(t3, e3) {
5216          for (var r3 = new Array(e3), n2 = 0; n2 < e3; ++n2) r3[n2] = t3[n2];
5217          return r3;
5218        }
5219        function b(t3, r3, n2, o2) {
5220          if ("function" == typeof t3.on) o2.once ? t3.once(r3, n2) : t3.on(r3, n2);
5221          else {
5222            if ("function" != typeof t3.addEventListener) throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + e2(t3));
5223            t3.addEventListener(r3, function e3(i2) {
5224              o2.once && t3.removeEventListener(r3, e3), n2(i2);
5225            });
5226          }
5227        }
5228        Object.defineProperty(s, "defaultMaxListeners", { enumerable: true, get: function() {
5229          return a;
5230        }, set: function(t3) {
5231          if ("number" != typeof t3 || t3 < 0 || i(t3)) throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t3 + ".");
5232          a = t3;
5233        } }), s.init = function() {
5234          void 0 !== this._events && this._events !== Object.getPrototypeOf(this)._events || (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
5235        }, s.prototype.setMaxListeners = function(t3) {
5236          if ("number" != typeof t3 || t3 < 0 || i(t3)) throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + t3 + ".");
5237          return this._maxListeners = t3, this;
5238        }, s.prototype.getMaxListeners = function() {
5239          return c(this);
5240        }, s.prototype.emit = function(t3) {
5241          for (var e3 = [], r3 = 1; r3 < arguments.length; r3++) e3.push(arguments[r3]);
5242          var n2 = "error" === t3, i2 = this._events;
5243          if (void 0 !== i2) n2 = n2 && void 0 === i2.error;
5244          else if (!n2) return false;
5245          if (n2) {
5246            var s2;
5247            if (e3.length > 0 && (s2 = e3[0]), s2 instanceof Error) throw s2;
5248            var a2 = new Error("Unhandled error." + (s2 ? " (" + s2.message + ")" : ""));
5249            throw a2.context = s2, a2;
5250          }
5251          var u2 = i2[t3];
5252          if (void 0 === u2) return false;
5253          if ("function" == typeof u2) o(u2, this, e3);
5254          else {
5255            var c2 = u2.length, l2 = d(u2, c2);
5256            for (r3 = 0; r3 < c2; ++r3) o(l2[r3], this, e3);
5257          }
5258          return true;
5259        }, s.prototype.addListener = function(t3, e3) {
5260          return l(this, t3, e3, false);
5261        }, s.prototype.on = s.prototype.addListener, s.prototype.prependListener = function(t3, e3) {
5262          return l(this, t3, e3, true);
5263        }, s.prototype.once = function(t3, e3) {
5264          return u(e3), this.on(t3, p(this, t3, e3)), this;
5265        }, s.prototype.prependOnceListener = function(t3, e3) {
5266          return u(e3), this.prependListener(t3, p(this, t3, e3)), this;
5267        }, s.prototype.removeListener = function(t3, e3) {
5268          var r3, n2, o2, i2, s2;
5269          if (u(e3), void 0 === (n2 = this._events)) return this;
5270          if (void 0 === (r3 = n2[t3])) return this;
5271          if (r3 === e3 || r3.listener === e3) 0 === --this._eventsCount ? this._events = /* @__PURE__ */ Object.create(null) : (delete n2[t3], n2.removeListener && this.emit("removeListener", t3, r3.listener || e3));
5272          else if ("function" != typeof r3) {
5273            for (o2 = -1, i2 = r3.length - 1; i2 >= 0; i2--) if (r3[i2] === e3 || r3[i2].listener === e3) {
5274              s2 = r3[i2].listener, o2 = i2;
5275              break;
5276            }
5277            if (o2 < 0) return this;
5278            0 === o2 ? r3.shift() : (function(t4, e4) {
5279              for (; e4 + 1 < t4.length; e4++) t4[e4] = t4[e4 + 1];
5280              t4.pop();
5281            })(r3, o2), 1 === r3.length && (n2[t3] = r3[0]), void 0 !== n2.removeListener && this.emit("removeListener", t3, s2 || e3);
5282          }
5283          return this;
5284        }, s.prototype.off = s.prototype.removeListener, s.prototype.removeAllListeners = function(t3) {
5285          var e3, r3, n2;
5286          if (void 0 === (r3 = this._events)) return this;
5287          if (void 0 === r3.removeListener) return 0 === arguments.length ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : void 0 !== r3[t3] && (0 === --this._eventsCount ? this._events = /* @__PURE__ */ Object.create(null) : delete r3[t3]), this;
5288          if (0 === arguments.length) {
5289            var o2, i2 = Object.keys(r3);
5290            for (n2 = 0; n2 < i2.length; ++n2) "removeListener" !== (o2 = i2[n2]) && this.removeAllListeners(o2);
5291            return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
5292          }
5293          if ("function" == typeof (e3 = r3[t3])) this.removeListener(t3, e3);
5294          else if (void 0 !== e3) for (n2 = e3.length - 1; n2 >= 0; n2--) this.removeListener(t3, e3[n2]);
5295          return this;
5296        }, s.prototype.listeners = function(t3) {
5297          return h(this, t3, true);
5298        }, s.prototype.rawListeners = function(t3) {
5299          return h(this, t3, false);
5300        }, s.listenerCount = function(t3, e3) {
5301          return "function" == typeof t3.listenerCount ? t3.listenerCount(e3) : y.call(t3, e3);
5302        }, s.prototype.listenerCount = y, s.prototype.eventNames = function() {
5303          return this._eventsCount > 0 ? r2(this._events) : [];
5304        };
5305      }, 3609: (t2, e2, r2) => {
5306        function n(t3) {
5307          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
5308            return typeof t4;
5309          } : function(t4) {
5310            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
5311          }, n(t3);
5312        }
5313        function o(t3, e3) {
5314          for (var r3 = 0; r3 < e3.length; r3++) {
5315            var n2 = e3[r3];
5316            n2.enumerable = n2.enumerable || false, n2.configurable = true, "value" in n2 && (n2.
5316writable = true), Object.defineProperty(t3, i(n2.key), n2);
5317          }
5318        }
5319        function i(t3) {
5320          var e3 = (function(t4) {
5321            if ("object" != n(t4) || !t4) return t4;
5322            var e4 = t4[Symbol.toPrimitive];
5323            if (void 0 !== e4) {
5324              var r3 = e4.call(t4, "string");
5325              if ("object" != n(r3)) return r3;
5326              throw new TypeError("@@toPrimitive must return a primitive value.");
5327            }
5328            return String(t4);
5329          })(t3);
5330          return "symbol" == n(e3) ? e3 : e3 + "";
5331        }
5332        function s(t3, e3, r3) {
5333          return e3 = c(e3), (function(t4, e4) {
5334            if (e4 && ("object" == n(e4) || "function" == typeof e4)) return e4;
5335            if (void 0 !== e4) throw new TypeError("Derived constructors may only return object or undefined");
5336            return a(t4);
5337          })(t3, u() ? Reflect.construct(e3, r3 || [], c(t3).constructor) : e3.apply(t3, r3));
5338        }
5339        function a(t3) {
5340          if (void 0 === t3) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
5341          return t3;
5342        }
5343        function u() {
5344          try {
5345            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
5346            }));
5347          } catch (t4) {
5348          }
5349          return (u = function() {
5350            return !!t3;
5351          })();
5352        }
5353        function c(t3) {
5354          return c = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
5355            return t4.__proto__ || Object.getPrototypeOf(t4);
5356          }, c(t3);
5357        }
5358        function l(t3, e3) {
5359          return l = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
5360            return t4.__proto__ = e4, t4;
5361          }, l(t3, e3);
5362        }
5363        var f = r2(8213), p = r2(7352), h = (function(t3) {
5364          function e3(t4, r4, n3, o2, i2) {
5365            var u2;
5366            if ((function(t5, e4) {
5367              if (!(t5 instanceof e4)) throw new TypeError("Cannot call a class as a function");
5368            })(this, e3), arguments.length > 0) {
5369              var c2 = d(r4);
5370              (u2 = s(this, e3, [m(null, t4, r4, n3, b(i2), c2, o2)])).init(t4, r4, n3, o2, i2);
5371            } else u2 = s(this, e3, [m()]);
5372            return a(u2);
5373          }
5374          return (function(t4, e4) {
5375            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
5376            t4.prototype = Object.create(e4 && e4.prototype, { constructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && l(t4, e4);
5377          })(e3, t3), r3 = e3, (n2 = [{ key: "toJSON", value: function() {
5378            return { stringValue: this.stringValue, valueType: this.valueType, kind: this.kind, value: this.value, path: this.path, reason: this.reason, name: this.name, message: this.message };
5379          } }, { key: "init", value: function(t4, e4, r4, n3, o2) {
5380            this.stringValue = y(e4), this.messageFormat = b(o2), this.kind = t4, this.value = e4, this.path = r4, this.reason = n3, this.valueType = d(e4);
5381          } }, { key: "copy", value: function(t4) {
5382            this.messageFormat = t4.messageFormat, this.stringValue = t4.stringValue, this.kind = t4.kind, this.value = t4.value, this.path = t4.path, this.reason = t4.reason, this.message = t4.message, this.valueType = t4.valueType;
5383          } }, { key: "setModel", value: function(t4) {
5384            this.message = m(t4, this.kind, this.value, this.path, this.messageFormat, this.valueType);
5385          } }]) && o(r3.prototype, n2), Object.defineProperty(r3, "prototype", { writable: false }), r3;
5386          var r3, n2;
5387        })(f);
5388        function y(t3) {
5389          var e3 = p.inspect(t3);
5390          return (e3 = e3.replace(/^'|'$/g, '"')).startsWith('"') || (e3 = '"' + e3 + '"'), e3;
5391        }
5392        function d(t3) {
5393          if (null == t3) return "" + t3;
5394          var e3 = n(t3);
5395          return "object" !== e3 || "function" != typeof t3.constructor ? e3 : t3.constructor.name;
5396        }
5397        function b(t3) {
5398          var e3 = t3 && t3._castErrorMessage || null;
5399          if ("string" == typeof e3 || "function" == typeof e3) return e3;
5400        }
5401        function m(t3, e3, r3, n2, o2, i2, s2) {
5402          if ("string" == typeof o2) {
5403            var a2 = y(r3), u2 = o2.replace("{KIND}", e3).replace("{VALUE}", a2).replace("{PATH}", n2);
5404            return null != t3 && (u2 = u2.replace("{MODEL}", t3.modelName)), u2;
5405          }
5406          if ("function" == typeof o2) return o2(r3, n2, t3, e3);
5407          var c2 = "Cast to " + e3 + " failed for value " + y(r3) + (i2 ? " (type " + i2 + ")" : "") + ' at path "' + n2 + '"';
5408          return null != t3 && (c2 += ' for model "' + t3.modelName + '"'), null != s2 && "function" == typeof s2.constructor && "AssertionError" !== s2.constructor.name && "Error" !== s2.constructor.name && (c2 += ' because of "' + s2.constructor.name + '"'), c2;
5409        }
5410        Object.defineProperty(h.prototype, "name", { value: "CastError" }), t2.exports = h;
5411      }, 3622: (t2) => {
5412        function e2(t3) {
5413          return e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
5414            return typeof t4;
5415          } : function(t4) {
5416            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
5417          }, e2(t3);
5418        }
5419        t2.exports = function(t3, r2, n) {
5420          if (null == t3) return t3;
5421          if (null != t3._doc && (t3 = t3._doc), arguments.length >= 3) {
5422            if ("object" !== e2(t3)) return;
5423            if (void 0 === n) return;
5424            return t3 instanceof Map ? t3.set(r2, n) : t3[r2] = n, n;
5425          }
5426          return "$*" === r2 ? t3 instanceof Map ? Array.from(t3.values()) : Object.keys(t3).map(function(e3) {
5427            return t3[e3];
5428          }) : t3 instanceof Map ? t3.get(r2) : t3[r2];
5429        };
5430      }, 3644: (t2, e2, r2) => {
5431        function n(t3) {
5432          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
5433            return typeof t4;
5434          } : function(t4) {
5435            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
5436          }, n(t3);
5437        }
5438        function o() {
5439          try {
5440            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
5441            }));
5442          } catch (t4) {
5443          }
5444          return (o = function() {
5445            return !!t3;
5446          })();
5447        }
5448        function i(t3) {
5449          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
5450            return t4.__proto__ || Object.getPrototypeOf(t4);
5451          }, i(t3);
5452        }
5453        function s(t3, e3) {
5454          return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
5455            return t4.__proto__ = e4, t4;
5456          }, s(t3, e3);
5457        }
5458        var a = (function(t3) {
5459          function e3(t4) {
5460            return (function(t5, e4) {
5461              if (!(t5 instanceof e4)) throw new TypeError("Cannot call a class as a function");
5462            })(this, e3), (function(t5, e4, r4) {
5463              return e4 = i(e4), (function(t6, e5) {
5464                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
5465                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
5466                return (function(t7) {
5467                  if (void 0 === t7) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
5468                  return t7;
5469                })(t6);
5470              })(t5, o() ? Reflect.construct(e4, r4 || [], i(t5).constructor) : e4.apply(t5, r4));
5471            })(this, e3, ["Cannot overwrite `" + t4 + "` model once compiled."]);
5472          }
5473          return (function(t4, e4) {
5474            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
5475            t4.prototype = Object.create(e4 && e4.prototype, { constructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && s(t4, e4);
5476          })(e3, t3), r3 = e3, Object.defineProperty(r3, "prototype", { writable: false }), r3;
5477          var r3;
5478        })(r2(8213));
5479        Object.defineProperty(a.prototype, "name", { value: "OverwriteModelError" }), t2.exports = a;
5480      }, 3660: (t2, e2, r2) => {
5481        function n(t3, e3) {
5482          var r3 = Object.keys(t3);
5483          if (Object.getOwnPropertySymbols) {
5484            var n2 = Object.getOwnPropertySymbols(t3);
5485            e3 && (n2 = n2.filter(function(e4) {
5486              return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
5487            })), r3.push.apply(r3, n2);
5488          }
5489          return r3;
5490        }
5491        function o(t3) {
5492          for (var e3 = 1; e3 < arguments.length; e3++) {
5493            var r3 = null != arguments[e3] ? arguments[e3] : {};
5494            e3 % 2 ? n(Object(r3), true).forEach(function(e4) {
5495              i(t3, e4, r3[e4]);
5496            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t3, Object.getOwnPropertyDescriptors(r3)) : n(Object(r3)).forEac
5496h(function(e4) {
5497              Object.defineProperty(t3, e4, Object.getOwnPropertyDescriptor(r3, e4));
5498            });
5499          }
5500          return t3;
5501        }
5502        function i(t3, e3, r3) {
5503          return (e3 = (function(t4) {
5504            var e4 = (function(t5) {
5505              if ("object" != s(t5) || !t5) return t5;
5506              var e5 = t5[Symbol.toPrimitive];
5507              if (void 0 !== e5) {
5508                var r4 = e5.call(t5, "string");
5509                if ("object" != s(r4)) return r4;
5510                throw new TypeError("@@toPrimitive must return a primitive value.");
5511              }
5512              return String(t5);
5513            })(t4);
5514            return "symbol" == s(e4) ? e4 : e4 + "";
5515          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
5516        }
5517        function s(t3) {
5518          return s = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
5519            return typeof t4;
5520          } : function(t4) {
5521            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
5522          }, s(t3);
5523        }
5524        var a = r2(3672), u = r2(1007), c = r2(6426), l = r2(7768), f = r2(4327), p = r2(9460), h = r2(8768), y = c.CastError;
5525        function d(t3, e3) {
5526          c.call(this, t3, e3, "Number");
5527        }
5528        function b(t3) {
5529          return this.cast(t3);
5530        }
5531        d.get = c.get, d.set = c.set, d.setters = [], d._cast = l, d.cast = function(t3) {
5532          return 0 === arguments.length || (false === t3 && (t3 = this._defaultCaster), this._cast = t3), this._cast;
5533        }, d._defaultCaster = function(t3) {
5534          if ("number" != typeof t3) throw new Error();
5535          return t3;
5536        }, d.schemaName = "Number", d.defaultOptions = {}, d.prototype = Object.create(c.prototype), d.prototype.constructor = d, d.prototype.OptionsConstructor = u, d._checkRequired = function(t3) {
5537          return "number" == typeof t3 || t3 instanceof Number;
5538        }, d.checkRequired = c.checkRequired, d.prototype.checkRequired = function(t3, e3) {
5539          return "object" === s(t3) && c._isRef(this, t3, e3, true) ? null != t3 : ("function" == typeof this.constructor.checkRequired ? this.constructor.checkRequired() : d.checkRequired())(t3);
5540        }, d.prototype.min = function(t3, e3) {
5541          if (this.minValidator && (this.validators = this.validators.filter(function(t4) {
5542            return t4.validator !== this.minValidator;
5543          }, this)), null != t3) {
5544            var r3 = e3 || a.messages.Number.min;
5545            r3 = r3.replace(/{MIN}/, t3), this.validators.push({ validator: this.minValidator = function(e4) {
5546              return null == e4 || e4 >= t3;
5547            }, message: r3, type: "min", min: t3 });
5548          }
5549          return this;
5550        }, d.prototype.max = function(t3, e3) {
5551          if (this.maxValidator && (this.validators = this.validators.filter(function(t4) {
5552            return t4.validator !== this.maxValidator;
5553          }, this)), null != t3) {
5554            var r3 = e3 || a.messages.Number.max;
5555            r3 = r3.replace(/{MAX}/, t3), this.validators.push({ validator: this.maxValidator = function(e4) {
5556              return null == e4 || e4 <= t3;
5557            }, message: r3, type: "max", max: t3 });
5558          }
5559          return this;
5560        }, d.prototype.enum = function(t3, e3) {
5561          return this.enumValidator && (this.validators = this.validators.filter(function(t4) {
5562            return t4.validator !== this.enumValidator;
5563          }, this)), Array.isArray(t3) || (h.isPOJO(t3) && null != t3.values ? (e3 = t3.message, t3 = t3.values) : "number" == typeof t3 && (t3 = Array.prototype.slice.call(arguments), e3 = null), h.isPOJO(t3) && (t3 = Object.values(t3)), e3 = e3 || a.messages.Number.enum), e3 = null == e3 ? a.messages.Number.enum : e3, this.enumValidator = function(e4) {
5564            return null == e4 || -1 !== t3.indexOf(e4);
5565          }, this.validators.push({ validator: this.enumValidator, message: e3, type: "enum", enumValues: t3 }), this;
5566        }, d.prototype.cast = function(t3, e3, r3, n2, o2) {
5567          if ("number" != typeof t3 && c._isRef(this, t3, e3, r3) && (null == t3 || h.isNonBuiltinObject(t3))) return this._castRef(t3, e3, r3, o2);
5568          var i2, s2 = t3 && void 0 !== t3._id ? t3._id : t3;
5569          i2 = "function" == typeof this._castFunction ? this._castFunction : "function" == typeof this.constructor.cast ? this.constructor.cast() : d.cast();
5570          try {
5571            return i2(s2);
5572          } catch (t4) {
5573            throw new y("Number", s2, this.path, t4, this);
5574          }
5575        };
5576        var m = o(o({}, c.prototype.$conditionalHandlers), {}, { $bitsAllClear: p, $bitsAnyClear: p, $bitsAllSet: p, $bitsAnySet: p, $gt: b, $gte: b, $lt: b, $lte: b, $mod: function(t3) {
5577          var e3 = this;
5578          return Array.isArray(t3) ? t3.map(function(t4) {
5579            return e3.cast(t4);
5580          }) : [this.cast(t3)];
5581        } });
5582        Object.defineProperty(d.prototype, "$conditionalHandlers", { enumerable: false, value: m }), d.prototype.castForQuery = function(t3, e3, r3) {
5583          var n2;
5584          if (null != t3) {
5585            if (!(n2 = this.$conditionalHandlers[t3])) throw new y("number", e3, this.path, null, this);
5586            return n2.call(this, e3, r3);
5587          }
5588          try {
5589            e3 = this.applySetters(e3, r3);
5590          } catch (t4) {
5591            throw t4 instanceof y && t4.path === this.path && null != this.$fullPath && (t4.path = this.$fullPath), t4;
5592          }
5593          return e3;
5594        }, d.prototype.toJSONSchema = function(t3) {
5595          var e3 = this.options.required && "function" != typeof this.options.required || "_id" === this.path;
5596          return f("number", "number", null == t3 ? void 0 : t3.useBsonType, e3);
5597        }, t2.exports = d;
5598      }, 3672: (t2, e2, r2) => {
5599        var n = r2(8213);
5600        t2.exports = n, n.messages = r2(766), n.Messages = n.messages, n.CastError = r2(3609), n.DocumentNotFoundError = r2(1129), n.ValidationError = r2(6949), n.ValidatorError = r2(9538), n.VersionError = r2(6996), n.ParallelSaveError = r2(3940), n.OverwriteModelError = r2(3644), n.MissingSchemaError = r2(8063), n.MongooseBulkSaveIncompleteError = r2(8517), n.MongooseServerSelectionError = r2(7219), n.DivergentArrayError = r2(1417), n.StrictModeError = r2(8995), n.StrictPopulateError = r2(6801);
5601      }, 3696: (t2) => {
5602        t2.exports = function(t3, e2) {
5603          return null == t3 ? null : "boolean" == typeof t3 ? e2 : "boolean" == typeof t3[e2] ? t3[e2] ? e2 : null : e2 in t3 ? t3[e2] : e2;
5604        };
5605      }, 3703: (t2) => {
5606        function e2(t3, e3) {
5607          (null == e3 || e3 > t3.length) && (e3 = t3.length);
5608          for (var r3 = 0, n = Array(e3); r3 < e3; r3++) n[r3] = t3[r3];
5609          return n;
5610        }
5611        function r2(t3, e3) {
5612          return null == t3 ? t3 : t3 instanceof Map ? t3.get(e3) : t3[e3];
5613        }
5614        t2.exports = function(t3, n, o) {
5615          var i, s = false;
5616          if ("string" == typeof n) {
5617            if (-1 === n.indexOf(".")) {
5618              var a = r2(t3, n);
5619              return null == a ? o : a;
5620            }
5621            i = n.split(".");
5622          } else if (s = true, 1 === (i = n).length) {
5623            var u = r2(t3, i[0]);
5624            return null == u ? o : u;
5625          }
5626          var c, l = n, f = t3, p = (function(t4, r3) {
5627            var n2 = "undefined" != typeof Symbol && t4[Symbol.iterator] || t4["@@iterator"];
5628            if (!n2) {
5629              if (Array.isArray(t4) || (n2 = (function(t5, r4) {
5630                if (t5) {
5631                  if ("string" == typeof t5) return e2(t5, r4);
5632                  var n3 = {}.toString.call(t5).slice(8, -1);
5633                  return "Object" === n3 && t5.constructor && (n3 = t5.constructor.name), "Map" === n3 || "Set" === n3 ? Array.from(t5) : "Arguments" === n3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n3) ? e2(t5, r4) : void 0;
5634                }
5635              })(t4)) || r3) {
5636                n2 && (t4 = n2);
5637                var o2 = 0, i2 = function() {
5638                };
5639                return { s: i2, n: function() {
5640                  return o2 >= t4.length ? { done: true } : { done: false, value: t4[o2++] };
5641                }, e: function(t5) {
5642                  throw t5;
5643                }, f: i2 };
5644              }
5645              throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5646            }
5647            var s2, a2 = true, u2 = false;
5648            return { s: function() {
5649              n2 = n2.call(t4);
5650            }, n: function() {
5651              var t5 = n2.next();
5652              return a2 = t5.done, t5;
5653            }, e: function(t5) {
5654              u2 = true, s2 = t5;
5655            }, f: function() {
5656              try {
5657                a2 || null == n2.return || n2.return();
5658              } finally {
5659                if (u2) throw s2;
5660              }
5661            } };
5662          })(i);
5663          try {
5664            for (p.s(); !(c = p.n()).done; ) {
5665              var h = c.value;
5666              if (null == f) return o;
5667              if (!s && null != f[l]) return f[l];
5668              f = r2(f, h), s || (l = l.substr(h.length + 1));
5669            }
5670          } catch (t4) {
5671            p.e(t4);
5672          } finally {
5673            p.f();
5674          }
5675          return null == f ? o : f;
5676        };
5677      }, 3704: (t2, e2, r2) => {
5678        function n(t3) {
5679          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
5680            return typeof t4;
5681          } : function(t4) {
5682            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
5683          }, n(t3);
5684        }
5685        var o = r2(2402), i = r2(6353), s = r2(3305);
5686        t2.exports = function(t3) {
5687          if (null == t3 || "" === t3) return null;
5688          var e3;
5689          if (s(t3, "Long")) e3 = t3.toNumber();
5690          else if ("string" == typeof t3) try {
5691            return i.Double.fromString(t3);
5692          } catch (t4) {
5693            o.ok(false);
5694          }
5695          else if ("object" === n(t3)) {
5696            var r3, a = null !== (r3 = t3.valueOf()) && void 0 !== r3 ? r3 : t3.toString();
5697            if ("string" == typeof a) try {
5698              return i.Double.fromString(t3);
5699            } catch (t4) {
5700              o.ok(false);
5701            }
5702            else e3 = Number(a);
5703          } else e3 = Number(t3);
5704          return new i.Double(e3);
5705        };
5706      }, 3731: (t2, e2, r2) => {
5707        function n(t3) {
5708          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
5709            return typeof t4;
5710          } : function(t4) {
5711            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
5712          }, n(t3);
5713        }
5714        function o() {
5715          try {
5716            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
5717            }));
5718          } catch (t4) {
5719          }
5720          return (o = function() {
5721            return !!t3;
5722          })();
5723        }
5724        function i(t3) {
5725          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
5726            return t4.__proto__ || Object.getPrototypeOf(t4);
5727          }, i(t3);
5728        }
5729        function s(t3, e3) {
5730          return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
5731            return t4.__proto__ = e4, t4;
5732          }, s(t3, e3);
5733        }
5734        var a = (function(t3) {
5735          function e3() {
5736            return (function(t4, e4) {
5737              if (!(t4 instanceof e4)) throw new TypeError("Cannot call a class as a function");
5738            })(this, e3), (function(t4, e4, r4) {
5739              return e4 = i(e4), (function(t5, e5) {
5740                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
5741                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
5742                return (function(t6) {
5743                  if (void 0 === t6) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
5744                  return t6;
5745                })(t5);
5746              })(t4, o() ? Reflect.construct(e4, r4 || [], i(t4).constructor) : e4.apply(t4, r4));
5747            })(this, e3, arguments);
5748          }
5749          return (function(t4, e4) {
5750            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
5751            t4.prototype = Object.create(e4 && e4.prototype, { c
5751onstructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && s(t4, e4);
5752          })(e3, t3), r3 = e3, Object.defineProperty(r3, "prototype", { writable: false }), r3;
5753          var r3;
5754        })(r2(8879)), u = r2(5761);
5755        Object.defineProperty(a.prototype, "min", u), Object.defineProperty(a.prototype, "max", u), Object.defineProperty(a.prototype, "expires", u), t2.exports = a;
5756      }, 3743: (t2, e2, r2) => {
5757        function n(t3) {
5758          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
5759            return typeof t4;
5760          } : function(t4) {
5761            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
5762          }, n(t3);
5763        }
5764        function o(t3) {
5765          return o = "function" == typeof Symbol && "symbol" === n(Symbol.iterator) ? function(t4) {
5766            return n(t4);
5767          } : function(t4) {
5768            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : n(t4);
5769          }, o(t3);
5770        }
5771        function i(t3) {
5772          return i = Object.setPrototypeOf ? Object.getPrototypeOf : function(t4) {
5773            return t4.__proto__ || Object.getPrototypeOf(t4);
5774          }, i(t3);
5775        }
5776        function s(t3, e3) {
5777          return s = Object.setPrototypeOf || function(t4, e4) {
5778            return t4.__proto__ = e4, t4;
5779          }, s(t3, e3);
5780        }
5781        var a, u, c = {};
5782        function l(t3, e3, r3) {
5783          r3 || (r3 = Error);
5784          var n2 = (function(r4) {
5785            function n3(r5, s2, a2) {
5786              var u2;
5787              return (function(t4, e4) {
5788                if (!(t4 instanceof e4)) throw new TypeError("Cannot call a class as a function");
5789              })(this, n3), u2 = (function(t4, e4) {
5790                return !e4 || "object" !== o(e4) && "function" != typeof e4 ? (function(t5) {
5791                  if (void 0 === t5) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
5792                  return t5;
5793                })(t4) : e4;
5794              })(this, i(n3).call(this, (function(t4, r6, n4) {
5795                return "string" == typeof e3 ? e3 : e3(t4, r6, n4);
5796              })(r5, s2, a2))), u2.code = t3, u2;
5797            }
5798            return (function(t4, e4) {
5799              if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
5800              t4.prototype = Object.create(e4 && e4.prototype, { constructor: { value: t4, writable: true, configurable: true } }), e4 && s(t4, e4);
5801            })(n3, r4), n3;
5802          })(r3);
5803          c[t3] = n2;
5804        }
5805        function f(t3, e3) {
5806          if (Array.isArray(t3)) {
5807            var r3 = t3.length;
5808            return t3 = t3.map(function(t4) {
5809              return String(t4);
5810            }), r3 > 2 ? "one of ".concat(e3, " ").concat(t3.slice(0, r3 - 1).join(", "), ", or ") + t3[r3 - 1] : 2 === r3 ? "one of ".concat(e3, " ").concat(t3[0], " or ").concat(t3[1]) : "of ".concat(e3, " ").concat(t3[0]);
5811          }
5812          return "of ".concat(e3, " ").concat(String(t3));
5813        }
5814        l("ERR_AMBIGUOUS_ARGUMENT", 'The "%s" argument is ambiguous. %s', TypeError), l("ERR_INVALID_ARG_TYPE", function(t3, e3, n2) {
5815          var i2, s2, u2, c2, l2;
5816          if (void 0 === a && (a = r2(2402)), a("string" == typeof t3, "'name' must be a string"), "string" == typeof e3 && (s2 = "not ", e3.substr(0, 4) === s2) ? (i2 = "must not be", e3 = e3.replace(/^not /, "")) : i2 = "must be", (function(t4, e4, r3) {
5817            return (void 0 === r3 || r3 > t4.length) && (r3 = t4.length), t4.substring(r3 - 9, r3) === e4;
5818          })(t3, " argument")) u2 = "The ".concat(t3, " ").concat(i2, " ").concat(f(e3, "type"));
5819          else {
5820            var p = ("number" != typeof l2 && (l2 = 0), l2 + 1 > (c2 = t3).length || -1 === c2.indexOf(".", l2) ? "argument" : "property");
5821            u2 = 'The "'.concat(t3, '" ').concat(p, " ").concat(i2, " ").concat(f(e3, "type"));
5822          }
5823          return u2 + ". Received type ".concat(o(n2));
5824        }, TypeError), l("ERR_INVALID_ARG_VALUE", function(t3, e3) {
5825          var n2 = arguments.length >
5825 2 && void 0 !== arguments[2] ? arguments[2] : "is invalid";
5826          void 0 === u && (u = r2(7352));
5827          var o2 = u.inspect(e3);
5828          return o2.length > 128 && (o2 = "".concat(o2.slice(0, 128), "...")), "The argument '".concat(t3, "' ").concat(n2, ". Received ").concat(o2);
5829        }, TypeError), l("ERR_INVALID_RETURN_VALUE", function(t3, e3, r3) {
5830          var n2;
5831          return n2 = r3 && r3.constructor && r3.constructor.name ? "instance of ".concat(r3.constructor.name) : "type ".concat(o(r3)), "Expected ".concat(t3, ' to be returned from the "').concat(e3, '"') + " function but got ".concat(n2, ".");
5832        }, TypeError), l("ERR_MISSING_ARGS", function() {
5833          for (var t3 = arguments.length, e3 = new Array(t3), n2 = 0; n2 < t3; n2++) e3[n2] = arguments[n2];
5834          void 0 === a && (a = r2(2402)), a(e3.length > 0, "At least one arg needs to be specified");
5835          var o2 = "The ", i2 = e3.length;
5836          switch (e3 = e3.map(function(t4) {
5837            return '"'.concat(t4, '"');
5838          }), i2) {
5839            case 1:
5840              o2 += "".concat(e3[0], " argument");
5841              break;
5842            case 2:
5843              o2 += "".concat(e3[0], " and ").concat(e3[1], " arguments");
5844              break;
5845            default:
5846              o2 += e3.slice(0, i2 - 1).join(", "), o2 += ", and ".concat(e3[i2 - 1], " arguments");
5847          }
5848          return "".concat(o2, " must be specified");
5849        }, TypeError), t2.exports.codes = c;
5850      }, 3777: (t2, e2, r2) => {
5851        var n = r2(9809), o = Object.prototype.toString, i = Object.prototype.hasOwnProperty;
5852        t2.exports = function(t3, e3, r3) {
5853          if (!n(e3)) throw new TypeError("iterator must be a function");
5854          var s, a;
5855          arguments.length >= 3 && (s = r3), a = t3, "[object Array]" === o.call(a) ? (function(t4, e4, r4) {
5856            for (var n2 = 0, o2 = t4.length; n2 < o2; n2++) i.call(t4, n2) && (null == r4 ? e4(t4[n2], n2, t4) : e4.call(r4, t4[n2], n2, t4));
5857          })(t3, e3, s) : "string" == typeof t3 ? (function(t4, e4, r4) {
5858            for (var n2 = 0, o2 = t4.length; n2 < o2; n2++) null == r4 ? e4(t4.charAt(n2), n2, t4) : e4.call(r4, t4.charAt(n2), n2, t4);
5859          })(t3, e3, s) : (function(t4, e4, r4) {
5860            for (var n2 in t4) i.call(t4, n2) && (null == r4 ? e4(t4[n2], n2, t4) : e4.call(r4, t4[n2], n2, t4));
5861          })(t3, e3, s);
5862        };
5863      }, 3892: (t2, e2, r2) => {
5864        function n(t3) {
5865          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
5866            return typeof t4;
5867          } : function(t4) {
5868            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
5869          }, n(t3);
5870        }
5871        function o(t3, e3) {
5872          var r3 = "undefined" != typeof Symbol && t3[Symbol.iterator] || t3["@@iterator"];
5873          if (!r3) {
5874            if (Array.isArray(t3) || (r3 = (function(t4, e4) {
5875              if (t4) {
5876                if ("string" == typeof t4) return i(t4, e4);
5877                var r4 = {}.toString.call(t4).slice(8, -1);
5878                return "Object" === r4 && t4.constructor && (r4 = t4.constructor.name), "Map" === r4 || "Set" === r4 ? Array.from(t4) : "Arguments" === r4 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r4) ? i(t4, e4) : void 0;
5879              }
5880            })(t3)) || e3) {
5881              r3 && (t3 = r3);
5882              var n2 = 0, o2 = function() {
5883              };
5884              return { s: o2, n: function() {
5885                return n2 >= t3.length ? { done: true } : { done: false, value: t3[n2++] };
5886              }, e: function(t4) {
5887                throw t4;
5888              }, f: o2 };
5889            }
5890            throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5891          }
5892          var s2, a2 = true, u2 = false;
5893          return { s: function() {
5894            r3 = r3.call(t3);
5895          }, n: function() {
5896            var t4 = r3.next();
5897            return a2 = t4.done, t4;
5898          }, e: function(t4) {
5899            u2 = true, s2 = t4;
5900          }, f: function() {
5901            try {
5902              a2 || null == r3.return || r3.return();
5903            } finally {
5904              if (u2) throw s2;
5905            }
5906          } };
5907        }
5908        function i(t3, e3) {
5909          (null == e3 || e3 > t3.length) && (e3 = t3.length);
5910          for (var r3 = 0, n2 = Array(e3); r3 < e3; r3++) n2[r3] = t3[r3];
5911          return n2;
5912        }
5913        function s(t3, e3) {
5914          var r3 = Object.keys(t3);
5915          if (Object.getOwnPropertySymbols) {
5916            var n2 = Object.getOwnPropertySymbols(t3);
5917            e3 && (n2 = n2.filter(function(e4) {
5918              return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
5919            })), r3.push.apply(r3, n2);
5920          }
5921          return r3;
5922        }
5923        function a(t3) {
5924          for (var e3 = 1; e3 < arguments.length; e3++) {
5925            var r3 = null != arguments[e3] ? arguments[e3] : {};
5926            e3 % 2 ? s(Object(r3), true).forEach(function(e4) {
5927              u(t3, e4, r3[e4]);
5928            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t3, Object.getOwnPropertyDescriptors(r3)) : s(Object(r3)).forEac
5928h(function(e4) {
5929              Object.defineProperty(t3, e4, Object.getOwnPropertyDescriptor(r3, e4));
5930            });
5931          }
5932          return t3;
5933        }
5934        function u(t3, e3, r3) {
5935          return (e3 = (function(t4) {
5936            var e4 = (function(t5) {
5937              if ("object" != n(t5) || !t5) return t5;
5938              var e5 = t5[Symbol.toPrimitive];
5939              if (void 0 !== e5) {
5940                var r4 = e5.call(t5, "string");
5941                if ("object" != n(r4)) return r4;
5942                throw new TypeError("@@toPrimitive must return a primitive value.");
5943              }
5944              return String(t5);
5945            })(t4);
5946            return "symbol" == n(e4) ? e4 : e4 + "";
5947          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
5948        }
5949        var c = r2(6948), l = r2(3916), f = r2(3703), p = r2(1058), h = r2(7300), y = r2(4450), d = r2(6665);
5950        e2.preparePopulationOptionsMQ = function(t3, e3) {
5951          var r3, n2 = t3._mongooseOptions.populate, o2 = Object.keys(n2).reduce(function(t4, e4) {
5952            return t4.concat([n2[e4]]);
5953          }, []);
5954          null != e3.lean && o2.filter(function(t4) {
5955            return null == (t4 && t4.options && t4.options.lean);
5956          }
5956).forEach((r3 = e3.lean, function(t4) {
5957            t4.options || (t4.options = {}), null != r3 && Array.isArray(r3.virtuals) && ((r3 = Object.assign({}, r3)).virtuals = r3.virtuals.filter(function(e4) {
5958              return "string" == typeof e4 && e4.startsWith(t4.path + ".");
5959            }).map(function(e4) {
5960              return e4.slice(t4.path.length + 1);
5961            })), t4.options.lean = r3;
5962          }));
5963          var i2 = t3 && t3.options && t3.options.session || null;
5964          null != i2 && o2.forEach(function(t4) {
5965            null != t4.options ? "session" in t4.options || (t4.options.session = i2) : t4.options = { session: i2 };
5966          });
5967          for (var s2 = t3._fieldsForExec(), u2 = 0; u2 < o2.length; ++u2) o2[u2] instanceof c ? o2[u2] = new c(a(a({}, o2[u2]), {}, { _queryProjection: s2, _localModel: t3.model })) : (o2[u2]._queryProjection = s2, o2[u2]._localModel = t3.model);
5968          return o2;
5969        }, e2.createModel = function(t3, r3, n2, o2, i2) {
5970          t3.hooks.execPreSync("createModel", r3);
5971          var s2 = t3.schema ? t3.schema.discriminatorMapping : null, a2 = s2 && s2.isRoot ? s2.key : null, u2 = r3[a2];
5972          if (a2 && u2 && t3.discriminators) {
5973            var c2 = t3.discriminators[u2] || p(t3.discriminators, u2);
5974            if (c2) {
5975              var l2 = y(o2);
5976              return e2.applyPaths(l2, c2.schema), new c2(void 0, l2, true);
5977            }
5978          }
5979          var f2 = { skipId: true, isNew: false, willInit: true };
5980          return null != i2 && "defaults" in i2 && (f2.defaults = i2.defaults), new t3(void 0, n2, f2);
5981        }, e2.createModelAndInit = function(t3, r3, n2, o2, i2, s2, a2) {
5982          var u2 = s2 ? { populated: s2 } : void 0, c2 = e2.createModel(t3, r3, n2, o2, i2);
5983          try {
5984            c2.$init(r3, u2, a2);
5985          } catch (t4) {
5986            a2(t4, c2);
5987          }
5988        }, e2.applyPaths = function(t3, e3, r3) {
5989          var i2, s2, a2 = /* @__PURE__ */ new Set();
5990          if (t3) {
5991            s2 = Object.keys(t3);
5992            for (var u2 = [], c2 = 0; c2 < s2.length; ++c2) {
5993              var p2 = s2[c2];
5994              "-" === s2[c2][0] && (delete t3[p2], "-_id" === p2 ? t3._id = 0 : u2.push(p2.slice(1)));
5995            }
5996            s2 = Object.keys(t3);
5997            for (var y2 = 0; y2 < s2.length; ++y2) if ("+" !== s2[y2][0]) {
5998              var b = t3[s2[y2]];
5999              if (h(b) && !("_id" === s2[y2] && s2.length > 1) && (!(s2[y2] === e3.options.discriminatorKey && s2.length > 1 && null != b) || b)) {
6000                i2 = !b;
6001                break;
6002              }
6003            }
6004            for (var m = 0, v = u2; m < v.length; m++) {
6005              var g = v[m], _ = e3.path(g);
6006              _ && _.selected && false === i2 ? _ && _.selected && false === i2 && a2.add(g) : (t3[g] = 0, i2 = true);
6007            }
6008          }
6009          var w = [], O = [], S = [];
6010          switch ((function e4(r4, n2) {
6011            if (n2 || (n2 = ""), -1 !== S.indexOf(r4)) return [];
6012            S.push(r4);
6013            var o2 = [];
6014            return r4.eachPath(function(r5, s3) {
6015              if (n2 && (r5 = n2 + "." + r5), s3.$isSchemaMap || r5.endsWith(".$*")) {
6016                var a3 = t3 && "+" + r5 in t3;
6017                s3.options && false === s3.options.select && !a3 && O.push(r5);
6018              } else {
6019                var u3 = D(r5, s3);
6020                if (null != u3 || Array.isArray(s3) || !s3.$isMongooseArray || s3.$isMongooseDocumentArray || (u3 = D(r5, s3.caster)), null != u3 && o2.push(u3), s3.schema) {
6021                  var c3 = e4(s3.schema, r5);
6022                  false === i2 && l(t3, r5, s3.schema, w, c3);
6023                }
6024              }
6025            }), S.pop(), o2;
6026          })(e3), i2) {
6027            case true:
6028              var $, j = o(O);
6029              try {
6030                for (j.s(); !($ = j.n()).done; ) {
6031                  var P = $.value;
6032                  t3[P] = 0;
6033                }
6034              } catch (t4) {
6035                j.e(t4);
6036              } finally {
6037                j.f();
6038              }
6039              break;
6040            case false:
6041              e3 && e3.paths._id && e3.paths._id.options && false === e3.paths._id.options.select && (t3._id = 0);
6042              var A, E = o(w);
6043              try {
6044                for (E.s(); !(A = E.n()).done; ) {
6045                  var x = A.value;
6046                  a2.has(x) || d(t3, x) || (t3[x] = t3[x] || 1);
6047                }
6048              } catch (t4) {
6049                E.e(t4);
6050              } finally {
6051                E.f();
6052              }
6053              break;
6054            case void 0:
6055              if (null == t3) break;
6056              for (var T = 0, k = Object.keys(t3 || {}); T < k.length; T++) {
6057                var N = k[T];
6058                N.startsWith("+") && delete t3[N];
6059              }
6060              var I, B = o(O);
6061              try {
6062                for (B.s(); !(I = B.n()).done; ) {
6063                  var M = I.value;
6064                  null == t3[M] && (t3[M] = 0);
6065                }
6066              } catch (t4) {
6067                B.e(t4);
6068              } finally {
6069                B.f();
6070              }
6071          }
6072          function D(o2, a3) {
6073            if (null != t3 && "boolean" == typeof a3.selected) if (false === a3.selected && t3[o2]) r3 && (t3[o2] = 0);
6074            else if (i2 || !a3.selected || o2 !== e3.options.discriminatorKey || null == t3[o2] || t3[o2]) {
6075              if (false !== i2 || !a3.selected || null == t3[o2] || t3[o2]) {
6076                var u3 = "+" + o2;
6077                if (t3 && u3 in t3) return delete t3[u3], void (false === i2 && s2.length > 1 && !~s2.indexOf(o2) && !r3 ? t3[o2] = 1 : null == i2 && r3 && false === a3.selected && (t3[o2] = 0));
6078                for (var c3 = o2.split("."), l2 = "", p3 = 0; p3 < c3.length; ++p3) if (l2 += l2.length ? "." + c3[p3] : c3[p3], -1 !== O.indexOf(l2)) return;
6079                if (!i2 && a3 && a3.options && a3.options.$skipDiscriminatorCheck) for (var h2 = "", y3 = 0; y3 < c3.length; ++y3) {
6080                  h2 += (0 === h2.length ? "" : ".") + c3[y3];
6081                  var d2 = f(t3, h2, false) || f(t3, h2 + ".$", false);
6082                  if (d2 && "object" !== n(d2)) return;
6083                }
6084                return (a3.selected ? w : O).push(o2), o2;
6085              }
6086              delete t3[o2];
6087            } else delete t3[o2];
6088          }
6089        };
6090      }, 3900: (t2, e2, r2) => {
6091        var n = r2(6400), o = r2(6750), i = r2(3191)(), s = r2(1464), a = r2(2268), u = n("%Math.floor%");
6092        t2.exports = function(t3, e3) {
6093          if ("function" != typeof t3) throw new a("`fn` is not a function");
6094          if ("number" != typeof e3 || e3 < 0 || e3 > 4294967295 || u(e3) !== e3) throw new a("`length` must be a positive 32-bit integer");
6095          var r3 = arguments.length > 2 && !!arguments[2], n2 = true, c = true;
6096          if ("length" in t3 && s) {
6097            var l = s(t3, "length");
6098            l && !l.configurable && (n2 = false), l && !l.writable && (c = false);
6099          }
6100          return (n2 || c || !r3) && (i ? o(t3, "length", e3, true, true) : o(t3, "length", e3)), t3;
6101        };
6102      }, 3916: (t2) => {
6103        t2.exports = function(t3, e2, r2, n, o) {
6104          var i = Object.keys(t3).reduce(function(t4, r3) {
6105            return t4 || r3.startsWith(e2 + ".");
6106          }, false), s = e2 + "." + r2.options.discriminatorKey;
6107          i || 1 !== o.length || o[0] !== s || n.splice(n.indexOf(s), 1);
6108        };
6109      }, 3940: (t2, e2, r2) => {
6110        function n(t3) {
6111          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
6112            return typeof t4;
6113          } : function(t4) {
6114            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
6115          }, n(t3);
6116        }
6117        function o() {
6118          try {
6119            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
6120            }));
6121          } catch (t4) {
6122          }
6123          return (o = function() {
6124            return !!t3;
6125          })();
6126        }
6127        function i(t3) {
6128          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
6129            return t4.__proto__ || Object.getPrototypeOf(t4);
6130          }, i(t3);
6131        }
6132        function s(t3, e3) {
6133          return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
6134            return t4.__proto__ = e4, t4;
6135          }, s(t3, e3);
6136        }
6137        var a = (function(t3) {
6138          function e3(t4) {
6139            return (function(t5, e4) {
6140              if (!(t5 instanceof e4)) throw new TypeError("Cannot call a class as a function");
6141            })(this, e3), (function(t5, e4, r4) {
6142              return e4 = i(e4), (function(t6, e5) {
6143                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
6144                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
6145                return (function(t7) {
6146                  if (void 0 === t7) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
6147                  return t7;
6148                })(t6);
6149              })(t5, o() ? Reflect.construct(e4, r4 || [], i(t5).constructor) : e4.apply(t5, r4));
6150            })(this, e3, ["Can't save() the same doc multiple times in parallel. Document: " + t4._doc._id]);
6151          }
6152          return (function(t4, e4) {
6153            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
6154            t4.prototype = Object.create(e4 && e4.prototype, { c
6154onstructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && s(t4, e4);
6155          })(e3, t3), r3 = e3, Object.defineProperty(r3, "prototype", { writable: false }), r3;
6156          var r3;
6157        })(r2(8213));
6158        Object.defineProperty(a.prototype, "name", { value: "ParallelSaveError" }), t2.exports = a;
6159      }, 4009: (t2, e2, r2) => {
6160        var n = r2(8213), o = r2(5188), i = r2(3622), s = r2(5678), a = r2(7352), u = r2(8768), c = /(\.\d+$|\.\d+\.)/g;
6161        t2.exports = function(t3, e3, r3, l, f) {
6162          if (null == t3) return [];
6163          if ("string" == typeof t3 && null != f && o(f, t3)) throw new n("refPath `" + t3 + "` must not be excluded in projection, got " + a.inspect(f));
6164          if (c.test(r3)) {
6165            var p = r3.split(c);
6166            if ("" === p[p.length - 1]) throw new Error("Can't populate individual element in an array");
6167            for (var h = "", y = t3, d = 0; d < p.length; d += 2) {
6168              var b = p[d];
6169              if (!y.startsWith(b + ".")) {
6170                if (d === p.length - 1) {
6171                  h += y, y = "";
6172                  break;
6173                }
6174                throw new Error("Could not normalize ref path, chunk " + b + " not in populated path");
6175              }
6176              h += y.substring(0, b.length) + p[d + 1], y = y.substring(b.length + 1);
6177            }
6178            var m = s.get(h, e3, i), v = Array.isArray(m) ? m : [m];
6179            return u.array.flatten(v);
6180          }
6181          var g = s.get(t3, e3, i);
6182          return null != l && l.virtuals.hasOwnProperty(t3) ? [l.virtuals[t3].applyGetters(void 0, e3)] : Array.isArray(g) ? g : [g];
6183        };
6184      }, 4026: (t2, e2) => {
6185        e2.Collection = function() {
6186          throw new Error("Cannot create a collection from browser library");
6187        }, e2.Connection = function() {
6188          throw new Error("Cannot create a connection from browser library");
6189        }, e2.BulkWriteResult = function() {
6190        };
6191      }, 4058: (t2, e2, r2) => {
6192        var n = r2(6353).Long, o = 9223372036854775807n, i = -9223372036854775808n, s = "Mongoose only supports BigInts between ".concat(i, " and ").concat(o, " because MongoDB does not support arbitrary precision integers");
6193        t2.exports = function(t3) {
6194          if (null == t3) return t3;
6195          if ("" === t3) return null;
6196          if ("bigint" == typeof t3) {
6197            if (t3 > o || t3 < i) throw new Error(s);
6198            return t3;
6199          }
6200          if (t3 instanceof n) return t3.toBigInt();
6201          if ("string" == typeof t3 || "number" == typeof t3) {
6202            if ((t3 = BigInt(t3)) > o || t3 < i) throw new Error(s);
6203            return t3;
6204          }
6205          throw new Error('Cannot convert value to BigInt: "'.concat(t3, '"'));
6206        };
6207      }, 4070: (t2, e2, r2) => {
6208        function n(t3, e3) {
6209          (null == e3 || e3 > t3.length) && (e3 = t3.length);
6210          for (var r3 = 0, n2 = Array(e3); r3 < e3; r3++) n2[r3] = t3[r3];
6211          return n2;
6212        }
6213        var o = r2(8260);
6214        t2.exports = function(t3) {
6215          if ("TopologyDescription" !== o(t3)) return false;
6216          if (0 === t3.servers.size) return false;
6217          var e3, r3 = (function(t4, e4) {
6218            var r4 = "undefined" != typeof Symbol && t4[Symbol.iterator] || t4["@@iterator"];
6219            if (!r4) {
6220              if (Array.isArray(t4) || (r4 = (function(t5, e5) {
6221                if (t5) {
6222                  if ("string" == typeof t5) return n(t5, e5);
6223                  var r5 = {}.toString.call(t5).slice(8, -1);
6224                  return "Object" === r5 && t5.constructor && (r5 = t5.constructor.name), "Map" === r5 || "Set" === r5 ? Array.from(t5) : "Arguments" === r5 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r5) ? n(t5, e5) : void 0;
6225                }
6226              })(t4)) || e4) {
6227                r4 && (t4 = r4);
6228                var o2 = 0, i2 = function() {
6229                };
6230                return { s: i2, n: function() {
6231                  return o2 >= t4.length ? { done: true } : { done: false, value: t4[o2++] };
6232                }, e: function(t5) {
6233                  throw t5;
6234                }, f: i2 };
6235              }
6236              throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6237            }
6238            var s, a = true, u = false;
6239            return { s: function() {
6240              r4 = r4.call(t4);
6241            }, n: function() {
6242              var t5 = r4.next();
6243              return a = t5.done, t5;
6244            }, e: function(t5) {
6245              u = true, s = t5;
6246            }, f: function() {
6247              try {
6248                a || null == r4.return || r4.return();
6249              } finally {
6250                if (u) throw s;
6251              }
6252            } };
6253          })(t3.servers.values());
6254          try {
6255            for (r3.s(); !(e3 = r3.n()).done; ) {
6256              var i = e3.value;
6257              if (false === i.host.endsWith(".mongodb.net") || 27017 !== i.port) return false;
6258            }
6259          } catch (t4) {
6260            r3.e(t4);
6261          } finally {
6262            r3.f();
6263          }
6264          return true;
6265        };
6266      }, 4183: (t2, e2, r2) => {
6267        var n = r2(118);
6268        t2.exports = function() {
6269          return Number.isNaN && Number.isNaN(NaN) && !Number.isNaN("a") ? Number.isNaN : n;
6270        };
6271      }, 4224: (t2, e2, r2) => {
6272        var n = r2(6511).ctor("require", "modify", "init", "default", "ignore");
6273        function o() {
6274          this.activePaths = new n();
6275        }
6276        t2.exports = o, o.prototype.strictMode = true, o.prototype.fullPath = void 0, o.prototype.selected = void 0, o.prototype.shardval = void 0, o.prototype.saveError = void 0, o.prototype.validationError = void 0, o.prototype.adhocPaths = void 0, o.prototype.removing = void 0, o.prototype.inserting = void 0, o.prototype.saving = void 0, o.prototype.version = void 0, o.prototype._id = void 0, o.prototype.ownerDocument = void 0, o.prototype.populate = void 0, o.prototype.populated = void 0, o.prototype.primitiveAtomics = void 0, o.prototype.wasPopulated = false, o.prototype.scope = void 0, o.prototype.session = null, o.prototype.pathsToScopes = null, o.prototype.cachedRequired = null;
6277      }, 4301: (t2, e2, r2) => {
6278        var n = r2(9539), o = r2(2793), i = r2(3305), s = r2(5549), a = r2(608);
6279        t2.exports = function t3(e3, r3, u, c) {
6280          var l, f = Object.keys(r3), p = 0, h = f.length;
6281          if (u = u || "", !(c = c || /* @__PURE__ */ new WeakSet()).has(r3)) {
6282            for (c.add(r3); p < h; ) if (l = f[p++], (u || "discriminators" !== l && "base" !== l && "_applyDiscriminators" !== l && "_userProvidedOptions" !== l && "options" !== l && "tree" !== l) && !("tree" === u && null != r3 && r3.instanceOfSchema || o.has(l))) {
6283              if (null == e3[l]) e3[l] = r3[l];
6284              else if (a(r3[l])) {
6285                if (a(e3[l]) || (e3[l] = {}), null != r3[l]) {
6286                  if (r3[l].$isSingleNested && e3[l].$isMongooseDocumentArray || r3[l].$isMongooseDocumentArray && e3[l].$isSingleNested || r3[l].$isMongooseDocumentArrayElement && e3[l].$isMongooseDocumentArrayElement) continue;
6287                  if (r3[l].instanceOfSchema) {
6288                    e3[l].instanceOfSchema ? n(e3[l], r3[l].clone(), true) : e3[l] = r3[l].clone();
6289                    continue;
6290                  }
6291                  if (i(r3[l], "ObjectId")) {
6292                    e3[l] = new s(r3[l]);
6293                    continue;
6294                  }
6295                }
6296                t3(e3[l], r3[l], u ? u + "." + l : l, c);
6297              }
6298            }
6299            null != r3 && r3.instanceOfSchema && (e3.tree = Object.assign({}, r3.tree, e3.tree));
6300          }
6301        };
6302      }, 4327: (t2) => {
6303        t2.exports = function(t3, e2, r2, n) {
6304          return r2 ? n ? { bsonType: e2 } : { bsonType: [e2, "null"] } : n ? { type: t3 } : { type: [t3, "null"] };
6305        };
6306      }, 4432: (t2, e2, r2) => {
6307        function n(t3) {
6308          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
6309            return typeof t4;
6310          } : function(t4) {
6311            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
6312          }, n(t3);
6313        }
6314        function o(t3) {
6315          if (null != t3) {
6316            var e3 = t3["function" == typeof Symbol && Symbol.iterator || "@@iterator"], r3 = 0;
6317            if (e3) return e3.call(t3);
6318            if ("function" == typeof t3.next) return t3;
6319            if (!isNaN(t3.length)) return { next: function() {
6320              return t3 && r3 >= t3.length && (t3 = void 0), { value: t3 && t3[r3++], done: !t3 };
6321            } };
6322          }
6323          throw new TypeError(n(t3) + " is not iterable");
6324        }
6325        function i() {
6326          var t3, e3, r3 = "function" == typeof Symbol ? Symbol : {}, n2 = r3.iterator || "@@iterator", o2 = r3.toStringTag || "@@toStringTag";
6327          function a2(r4, n3, o3, i2) {
6328            var a3 = n3 && n3.prototype instanceof c2 ? n3 : c2, l3 = Object.create(a3.prototype);
6329            return s(l3, "_invoke", (function(r5, n4, o4) {
6330              var i3, s2, a4, c3 = 0, l4 = o4 || [], f3 = false, p2 = { p: 0, n: 0, v: t3, a: h2, f: h2.bind(t3, 4), d: function(e4, r6) {
6331                return i3 = e4, s2 = 0, a4 = t3, p2.n = r6, u2;
6332              } };
6333              function h2(r6, n5) {
6334                for (s2 = r6, a4 = n5, e3 = 0;
6334 !f3 && c3 && !o5 && e3 < l4.length; e3++) {
6335                  var o5, i4 = l4[e3], h3 = p2.p, y2 = i4[2];
6336                  r6 > 3 ? (o5 = y2 === n5) && (a4 = i4[(s2 = i4[4]) ? 5 : (s2 = 3, 3)], i4[4] = i4[5] = t3) : i4[0] <= h3 && ((o5 = r6 < 2 && h3 < i4[1]) ? (s2 = 0, p2.v = n5, p2.n = i4[1]) : h3 < y2 && (o5 = r6 < 3 || i4[0] > n5 || n5 > y2) && (i4[4] = r6, i4[5] = n5, p2.n = y2, s2 = 0));
6337                }
6338                if (o5 || r6 > 1) return u2;
6339                throw f3 = true, n5;
6340              }
6341              return function(o5, l5, y2) {
6342                if (c3 > 1) throw TypeError("Generator is already running");
6343                for (f3 && 1 === l5 && h2(l5, y2), s2 = l5, a4 = y2; (e3 = s2 < 2 ? t3 : a4) || !f3; ) {
6344                  i3 || (s2 ? s2 < 3 ? (s2 > 1 && (p2.n = -1), h2(s2, a4)) : p2.n = a4 : p2.v = a4);
6345                  try {
6346                    if (c3 = 2, i3) {
6347                      if (s2 || (o5 = "next"), e3 = i3[o5]) {
6348                        if (!(e3 = e3.call(i3, a4))) throw TypeError("iterator result is not an object");
6349                        if (!e3.done) return e3;
6350                        a4 = e3.value, s2 < 2 && (s2 = 0);
6351                      } else 1 === s2 && (e3 = i3.return) && e3.call(i3), s2 < 2 && (a4 = TypeError("The iterator does not provide a '" + o5 + "' method"), s2 = 1);
6352                      i3 = t3;
6353                    } else if ((e3 = (f3 = p2.n < 0) ? a4 : r5.call(n4, p2)) !== u2) break;
6354                  } catch (e4) {
6355                    i3 = t3, s2 = 1, a4 = e4;
6356                  } finally {
6357                    c3 = 1;
6358                  }
6359                }
6360                return { value: e3, done: f3 };
6361              };
6362            })(r4, o3, i2), true), l3;
6363          }
6364          var u2 = {};
6365          function c2() {
6366          }
6367          function l2() {
6368          }
6369          function f2() {
6370          }
6371          e3 = Object.getPrototypeOf;
6372          var p = [][n2] ? e3(e3([][n2]())) : (s(e3 = {}, n2, function() {
6373            return this;
6374          }), e3), h = f2.prototype = c2.prototype = Object.create(p);
6375          function y(t4) {
6376            return Object.setPrototypeOf ? Object.setPrototypeOf(t4, f2) : (t4.__proto__ = f2, s(t4, o2, "GeneratorFunction")), t4.prototype = Object.create(h), t4;
6377          }
6378          return l2.prototype = f2, s(h, "constructor", f2), s(f2, "constructor", l2), l2.displayName = "GeneratorFunction", s(f2, o2, "GeneratorFunction"), s(h), s(h, o2, "Generator"), s(h, n2, function() {
6379            return this;
6380          }), s(h, "toString", function() {
6381            return "[object Generator]";
6382          }), (i = function() {
6383            return { w: a2, m: y };
6384          })();
6385        }
6386        function s(t3, e3, r3, n2) {
6387          var o2 = Object.defineProperty;
6388          try {
6389            o2({}, "", {});
6390          } catch (t4) {
6391            o2 = 0;
6392          }
6393          s = function(t4, e4, r4, n3) {
6394            function i2(e5, r5) {
6395              s(t4, e5, function(t5) {
6396                return this._invoke(e5, r5, t5);
6397              });
6398            }
6399            e4 ? o2 ? o2(t4, e4, { value: r4, enumerable: !n3, configurable: !n3, writable: !n3 }) : t4[e4] = r4 : (i2("next", 0), i2("throw", 1), i2("return", 2));
6400          }, s(t3, e3, r3, n2);
6401        }
6402        function a(t3, e3) {
6403          var r3 = "undefined" != typeof Symbol && t3[Symbol.iterator] || t3["@@iterator"];
6404          if (!r3) {
6405            if (Array.isArray(t3) || (r3 = (function(t4, e4) {
6406              if (t4) {
6407                if ("string" == typeof t4) return u(t4, e4);
6408                var r4 = {}.toString.call(t4).slice(8, -1);
6409                return "Object" === r4 && t4.constructor && (r4 = t4.constructor.name), "Map" === r4 || "Set" === r4 ? Array.from(t4) : "Arguments" === r4 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r4) ? u(t4, e4) : void 0;
6410              }
6411            })(t3)) || e3) {
6412              r3 && (t3 = r3);
6413              var n2 = 0, o2 = function() {
6414              };
6415              return { s: o2, n: function() {
6416                return n2 >= t3.length ? { done: true } : { done: false, value: t3[n2++] };
6417              }, e: function(t4) {
6418                throw t4;
6419              }, f: o2 };
6420            }
6421            throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6422          }
6423          var i2, s2 = true, a2 = false;
6424          return { s: function() {
6425            r3 = r3.call(t3);
6426          }, n: function() {
6427            var t4 = r3.next();
6428            return s2 = t4.done, t4;
6429          }, e: function(t4) {
6430            a2 = true, i2 = t4;
6431          }, f: function() {
6432            try {
6433              s2 || null == r3.return || r3.return();
6434            } finally {
6435              if (a2) throw i2;
6436            }
6437          } };
6438        }
6439        function u(t3, e3) {
6440          (null == e3 || e3 > t3.length) && (e3 = t3.length);
6441          for (var r3 = 0, n2 = Array(e3); r3 < e3; r3++) n2[r3] = t3[r3];
6442          return n2;
6443        }
6444        function c(t3, e3, r3, n2, o2, i2, s2) {
6445          try {
6446            var a2 = t3[i2](s2), u2 = a2.value;
6447          } catch (t4) {
6448            return void r3(t4);
6449          }
6450          a2.done ? e3(u2) : Promise.resolve(u2).then(n2, o2);
6451        }
6452        function l(t3) {
6453          return function() {
6454            var e3 = this, r3 = arguments;
6455            return new Promise(function(n2, o2) {
6456              var i2 = t3.apply(e3, r3);
6457              function s2(t4) {
6458                c(i2, n2, o2, s2, a2, "next", t4);
6459              }
6460              function a2(t4) {
6461                c(i2, n2, o2, s2, a2, "throw", t4);
6462              }
6463              s2(void 0);
6464            });
6465          };
6466        }
6467        var f = r2(5782);
6468        t2.exports = function(t3) {
6469          var e3 = true;
6470          t3.s.hooks.pre("save", false, function(t4) {
6471            if (this.$isSubdocument) t4();
6472            else {
6473              var e4 = this, r3 = this.$getAllSubdocs({ useCache: true });
6474              r3.length ? f(r3, function(t5, e5) {
6475                t5.$__schema.s.hooks.execPre("save", t5, function(t6) {
6476                  e5(t6);
6477                });
6478              }, function(r4) {
6479                if (e4.$__.saveOptions && (e4.$__.saveOptions.__subdocs = null), r4) return e4.$__schema.s.hooks.execPost("save:error", e4, [e4], { error: r4 }, function(e5) {
6480                  t4(e5);
6481                });
6482                t4();
6483              }) : t4();
6484            }
6485          }, null, e3), t3.s.hooks.post("save", (function() {
6486            var t4 = l(i().m(function t5() {
6487              var e4, r3, n2, s2, u2, c2;
6488              return i().w(function(t6) {
6489                for (; ; ) switch (t6.p = t6.n) {
6490                  case 0:
6491                    if ((e4 = this.$__.removedSubdocs) && e4.length) {
6492                      t6.n = 1;
6493                      break;
6494                    }
6495                    return t6.a(2);
6496                  case 1:
6497                    r3 = [], n2 = a(e4), t6.p = 2, u2 = i().m(function t7() {
6498                      var e5;
6499                      return i().w(function(t8) {
6500                        for (; ; ) switch (t8.n) {
6501                          case 0:
6502                            e5 = s2.value, r3.push(new Promise(function(t9, r4) {
6503                              e5.$__schema.s.hooks.execPost("deleteOne", e5, [e5], function(e6) {
6504                                if (e6) return r4(e6);
6505                                t9();
6506                              });
6507                            }));
6508                          case 1:
6509                            return t8.a(2);
6510                        }
6511                      }, t7);
6512                    }), n2.s();
6513                  case 3:
6514                    if ((s2 = n2.n()).done) {
6515                      t6.n = 5;
6516                      break;
6517                    }
6518                    return t6.d(o(u2()), 4);
6519                  case 4:
6520                    t6.n = 3;
6521                    break;
6522                  case 5:
6523                    t6.n = 7;
6524                    break;
6525                  case 6:
6526                    t6.p = 6, c2 = t6.v, n2.e(c2);
6527                  case 7:
6528                    return t6.p = 7, n2.f(), t6.f(7);
6529                  case 8:
6530                    return this.$__.removedSubdocs = null, t6.n = 9, Promise.all(r3);
6531                  case 9:
6532                    return t6.a(2);
6533                }
6534              }, t5, this, [[2, 6, 7, 8]]);
6535            }));
6536            return function() {
6537              return t4.apply(this, arguments);
6538            };
6539          })()), t3.s.hooks.post("save", (function() {
6540            var t4 = l(i().m(function t5() {
6541              var e4, r3, n2, s2, u2, c2, l2, f2, p = this;
6542              return i().w(function(t6) {
6543                for (; ; ) switch (t6.p = t6.n) {
6544                  case 0:
6545                    if (!this.$isSubdocument) {
6546                      t6.n = 1;
6547                      break;
6548                    }
6549                    return t6.a(2);
6550                  case 1:
6551                    if (e4 = this, (r3 = this.$getAllSubdocs({ useCache: true })).length) {
6552                      t6.n = 2;
6553                      break;
6554                    }
6555                    return t6.a(2);
6556                  case 2:
6557                    n2 = [], s2 = a(r3), t6.p = 3, c2 = i().m(function t7() {
6558                      var e5;
6559                      return i().w(function(t8) {
6560                        for (; ; ) switch (t8.n) {
6561                          case 0:
6562                            e5 = u2.value, n2.push(new Promise(function(t9, r4) {
6563                              e5.$__schema.s.hooks.execPost("save", e5, [e5], function(e6) {
6564                                if (e6) return r4(e6);
6565                                t9();
6566                              });
6567                            }));
6568                          case 1:
6569                            return t8.a(2);
6570                        }
6571                      }, t7);
6572                    }), s2.s();
6573                  case 4:
6574                    if ((u2 = s2.n()).done) {
6575                      t6.n = 6;
6576                      break;
6577                    }
6578                    return t6.d(o(c2()), 5);
6579                  case 5:
6580                    t6.n = 4;
6581                    break;
6582                  case 6:
6583                    t6.n = 8;
6584                    break;
6585                  case 7:
6586                    t6.p = 7, l2 = t6.v, s2.e(l2);
6587                  case 8:
6588                    return t6.p = 8, s2.f(), t6.f(8);
6589                  case 9:
6590                    return t6.p = 9, t6.n = 10, Promise.all(n2);
6591                  case 10:
6592                    t6.n = 12;
6593                    break;
6594                  case 11:
6595                    return t6.p = 11, f2 = t6.v, t6.n = 12, new Promise(function(t7, r4) {
6596                      p.$__schema.s.hooks.execPost("save:error", e4, [e4], { error: f2 }, function(e5) {
6597                        if (e5) return r4(e5);
6598                        t7();
6599                      });
6600                    });
6601                  case 12:
6602                    return t6.a(2);
6603                }
6604              }, t5, this, [[9, 11], [3, 7, 8, 9]]);
6605            }));
6606            return function() {
6607              return t4.apply(this, arguments);
6608            };
6609          })(), null, e3);
6610        };
6611      }, 4450: (t2, e2, r2) => {
6612        function n(t3) {
6613          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
6614            return typeof t4;
6615          } : function(t4) {
6616            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
6617          }, n(t3);
6618        }
6619        var o = r2(9639), i = r2(5549), s = r2(2793), a = r2(2497), u = r2(9696), c = r2(3305), l = r2(1243).isMongooseArray, f = r2(608), p = r2(2789), h 
6619= r2(7930), y = r2(7291).trustedSymbol, d = r2(6353);
6620        function b(t3, e3, r3) {
6621          if (null == t3) return t3;
6622          if (c(t3, "Double")) return new d.Double(t3.value);
6623          if ("number" == typeof t3 || "string" == typeof t3 || "boolean" == typeof t3 || "bigint" == typeof t3) return t3;
6624          if (Array.isArray(t3)) return (function(t4, e4) {
6625            var r4 = 0, n2 = t4.length, o2 = new Array(n2);
6626            for (r4 = 0; r4 < n2; ++r4) o2[r4] = b(t4[r4], e4, true);
6627            return o2;
6628          })(l(t3) ? t3.__array : t3, e3);
6629          if (a(t3)) {
6630            if (e3 && e3.retainDocuments && null != t3.$__) {
6631              var s2 = t3.$clone();
6632              return null != t3.__index && (s2.__index = t3.__index), null != t3.__parentArray && (s2.__parentArray = t3.__parentArray), s2.$__parent = t3.$__parent, s2;
6633            }
6634            return p(t3) && null != t3.$__ && null != t3._doc ? t3._doc : e3 && e3.json && "function" == typeof t3.toJSON ? t3.toJSON(e3) : t3.toObject(e3);
6635          }
6636          var y2, v, g = t3.constructor;
6637          if (g) switch (u(g)) {
6638            case "Object":
6639              return m(t3, e3, r3);
6640            case "Date":
6641              return new g(+t3);
6642            case "RegExp":
6643              return y2 = t3, (v = new RegExp(y2.source, y2.flags)).lastIndex !== y2.lastIndex && (v.lastIndex = y2.lastIndex), v;
6644          }
6645          return c(t3, "ObjectId") ? e3 && e3.flattenObjectIds ? t3.toJSON() : new i(t3.id) : c(t3, "Decimal128") ? e3 && e3.flattenDecimals ? t3.toJSON() : o.fromString(t3.toString()) : !g && f(t3) ? m(t3, e3, r3) : "object" === n(t3) && t3[h.schemaTypeSymbol] ? t3.clone() : e3 && e3.bson && "function" == typeof t3.toBSON ? t3 : "function" == typeof t3.valueOf ? t3.valueOf() : m(t3, e3, r3);
6646        }
6647        function m(t3, e3, r3) {
6648          var n2, o2 = e3 && e3.minimize, i2 = e3 && e3.omitUndefined, a2 = e3 && e3._seen, u2 = {};
6649          if (a2 && a2.has(t3)) return a2.get(t3);
6650          a2 && a2.set(t3, u2), y in t3 && false !== (null == e3 ? void 0 : e3.copyTrustedSymbol) && (u2[y] = t3[y]);
6651          for (var c2 = Object.keys(t3), l2 = c2.length, f2 = 0; f2 < l2; ++f2) {
6652            var p2 = c2[f2];
6653            if (!s.has(p2)) {
6654              var h2 = b(t3[p2], e3, false);
6655              false !== o2 && !i2 || void 0 !== h2 ? true === o2 && void 0 === h2 || (n2 || (n2 = true), u2[p2] = h2) : delete u2[p2];
6656            }
6657          }
6658          return o2 && !r3 ? n2 && u2 : u2;
6659        }
6660        t2.exports = b;
6661      }, 4473: (t2) => {
6662        function e2(t3, r2) {
6663          var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : /* @__PURE__ */ new Set();
6664          if (n.has(t3)) throw new Error("Infinite subdocument loop: subdoc with _id " + t3._id + " is a parent of itself");
6665          var o = t3.$parent(), i = t3.$__pathRelativeToParent(void 0, false) + "." + r2;
6666          o.$__.activePaths.clearPath(i), o.$isSubdocument && e2(o, i, n);
6667        }
6668        t2.exports = function(t3, r2, n) {
6669          var o = (n = n || {}).skipDocArrays, i = 0;
6670          if (!t3) return i;
6671          for (var s = 0, a = Object.keys(t3.$__.activePaths.getStatePaths("modify")); s < a.length; s++) {
6672            var u = a[s];
6673            if (o) {
6674              var c = t3.$__schema.path(u);
6675              if (c && c.$isMongooseDocumentArray) continue;
6676            }
6677            u.startsWith(r2 + ".") && (t3.$__.activePaths.clearPath(u), ++i, t3.$isSubdocument && e2(t3, u));
6678          }
6679          return i;
6680        };
6681      }, 4561: (t2, e2, r2) => {
6682        function n(t3) {
6683          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
6684            return typeof t4;
6685          } : function(t4) {
6686            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
6687          }, n(t3);
6688        }
6689        function o() {
6690          try {
6691            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
6692            }));
6693          } catch (t4) {
6694          }
6695          return (o = function() {
6696            return !!t3;
6697          })();
6698        }
6699        function i(t3) {
6700          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
6701            return t4.__proto__ || Object.getPrototypeOf(t4);
6702          }, i(t3);
6703        }
6704        function s(t3, e3) {
6705          return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
6706            return t4.__proto__ = e4, t4;
6707          }, s(t3, e3);
6708        }
6709        var a = (function(t3) {
6710          function e3() {
6711            return (function(t4, e4) {
6712              if (!(t4 instanceof e4)) throw new TypeError("Cannot call a class as a function");
6713            })(this, e3), (function(t4, e4, r4) {
6714              return e4 = i(e4), (function(t5, e5) {
6715                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
6716                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
6717                return (function(t6) {
6718                  if (void 0 === t6) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
6719                  return t6;
6720                })(t5);
6721              })(t4, o() ? Reflect.construct(e4, r4 || [], i(t4).constructor) : e4.apply(t4, r4));
6722            })(this, e3, arguments);
6723          }
6724          return (function(t4, e4) {
6725            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
6726            t4.prototype = Object.create(e4 && e4.prototype, { c
6726onstructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && s(t4, e4);
6727          })(e3, t3), r3 = e3, Object.defineProperty(r3, "prototype", { writable: false }), r3;
6728          var r3;
6729        })(r2(8879)), u = r2(5761);
6730        Object.defineProperty(a.prototype, "excludeIndexes", u), Object.defineProperty(a.prototype, "_id", u), t2.exports = a;
6731      }, 4592: (t2, e2, r2) => {
6732        function n(t3) {
6733          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
6734            return typeof t4;
6735          } : function(t4) {
6736            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
6737          }, n(t3);
6738        }
6739        function o() {
6740          try {
6741            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
6742            }));
6743          } catch (t4) {
6744          }
6745          return (o = function() {
6746            return !!t3;
6747          })();
6748        }
6749        function i(t3) {
6750          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
6751            return t4.__proto__ || Object.getPrototypeOf(t4);
6752          }, i(t3);
6753        }
6754        function s(t3, e3) {
6755          return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
6756            return t4.__proto__ = e4, t4;
6757          }, s(t3, e3);
6758        }
6759        var a = (function(t3) {
6760          function e3() {
6761            return (function(t4, e4) {
6762              if (!(t4 instanceof e4)) throw new TypeError("Cannot call a class as a function");
6763            })(this, e3), (function(t4, e4, r4) {
6764              return e4 = i(e4), (function(t5, e5) {
6765                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
6766                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
6767                return (function(t6) {
6768                  if (void 0 === t6) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
6769                  return t6;
6770                })(t5);
6771              })(t4, o() ? Reflect.construct(e4, r4 || [], i(t4).constructor) : e4.apply(t4, r4));
6772            })(this, e3, arguments);
6773          }
6774          return (function(t4, e4) {
6775            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
6776            t4.prototype = Object.create(e4 && e4.prototype, { constructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && s(t4, e4);
6777          })(e3, t3), r3 = e3, Object.defineProperty(r3, "prototype", { writable: false }), r3;
6778          var r3;
6779        })(r2(8879)), u = r2(5761);
6780        Object.defineProperty(a.prototype, "enum", u), Object.defineProperty(a.prototype, "of", u), Object.defineProperty(a.prototype, "castNonArrays", u), t2.exports = a;
6781      }, 4625: (t2, e2, r2) => {
6782        function n(t3) {
6783          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
6784            return typeof t4;
6785          } : function(t4) {
6786            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
6787          }, n(t3);
6788        }
6789        function o() {
6790          try {
6791            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
6792            }));
6793          } catch (t4) {
6794          }
6795          return (o = function() {
6796            return !!t3;
6797          })();
6798        }
6799        function i(t3) {
6800          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
6801            return t4.__proto__ || Object.getPrototypeOf(t4);
6802          }, i(t3);
6803        }
6804        function s(t3, e3) {
6805          return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
6806            return t4.__proto__ = e4, t4;
6807          }, s(t3, e3);
6808        }
6809        var a = (function(t3) {
6810          function e3() {
6811            return (function(t4, e4) {
6812              if (!(t4 instanceof e4)) throw new TypeError("Cannot call a class as a function");
6813            })(this, e3), (function(t4, e4, r4) {
6814              return e4 = i(e4), (function(t5, e5) {
6815                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
6816                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
6817                return (function(t6) {
6818                  if (void 0 === t6) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
6819                  return t6;
6820                })(t5);
6821              })(t4, o() ? Reflect.construct(e4, r4 || [], i(t4).constructor) : e4.apply(t4, r4));
6822            })(this, e3, arguments);
6823          }
6824          return (function(t4, e4) {
6825            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
6826            t4.prototype = Object.create(e4 && e4.prototype, { c
6826onstructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && s(t4, e4);
6827          })(e3, t3), r3 = e3, Object.defineProperty(r3, "prototype", { writable: false }), r3;
6828          var r3;
6829        })(r2(8879)), u = r2(5761);
6830        Object.defineProperty(a.prototype, "auto", u), Object.defineProperty(a.prototype, "populate", u), t2.exports = a;
6831      }, 4756: (t2) => {
6832        var e2 = function(t3) {
6833          return t3 != t3;
6834        };
6835        t2.exports = function(t3, r2) {
6836          return 0 === t3 && 0 === r2 ? 1 / t3 == 1 / r2 : t3 === r2 || !(!e2(t3) || !e2(r2));
6837        };
6838      }, 4829: (t2, e2, r2) => {
6839        t2.exports = r2(8533);
6840      }, 4859: (t2, e2, r2) => {
6841        var n = r2(5832).hp;
6842        function o(t3, e3) {
6843          var r3 = "undefined" != typeof Symbol && t3[Symbol.iterator] || t3["@@iterator"];
6844          if (!r3) {
6845            if (Array.isArray(t3) || (r3 = (function(t4, e4) {
6846              if (t4) {
6847                if ("string" == typeof t4) return i(t4, e4);
6848                var r4 = {}.toString.call(t4).slice(8, -1);
6849                return "Object" === r4 && t4.constructor && (r4 = t4.constructor.name), "Map" === r4 || "Set" === r4 ? Array.from(t4) : "Arguments" === r4 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r4) ? i(t4, e4) : void 0;
6850              }
6851            })(t3)) || e3) {
6852              r3 && (t3 = r3);
6853              var n2 = 0, o2 = function() {
6854              };
6855              return { s: o2, n: function() {
6856                return n2 >= t3.length ? { done: true } : { done: false, value: t3[n2++] };
6857              }, e: function(t4) {
6858                throw t4;
6859              }, f: o2 };
6860            }
6861            throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6862          }
6863          var s2, a2 = true, u2 = false;
6864          return { s: function() {
6865            r3 = r3.call(t3);
6866          }, n: function() {
6867            var t4 = r3.next();
6868            return a2 = t4.done, t4;
6869          }, e: function(t4) {
6870            u2 = true, s2 = t4;
6871          }, f: function() {
6872            try {
6873              a2 || null == r3.return || r3.return();
6874            } finally {
6875              if (u2) throw s2;
6876            }
6877          } };
6878        }
6879        function i(t3, e3) {
6880          (null == e3 || e3 > t3.length) && (e3 = t3.length);
6881          for (var r3 = 0, n2 = Array(e3); r3 < e3; r3++) n2[r3] = t3[r3];
6882          return n2;
6883        }
6884        var s = r2(8920), a = r2(2400), u = r2(863), c = r2(1058), l = r2(3303)._, f = r2(8768), p = r2(3305), h = r2(7930).arrayParentSymbol, y = r2(7930).arrayPathSymbol, d = r2(7930).arraySchemaSymbol, b = r2(7930).documentArrayParent, m = Array.prototype.toString, v = { toBSON: function() {
6885          return this.toObject(l);
6886        }, toString: function() {
6887          return m.call(this.__array.map(function(t3) {
6888            return null != t3 && null != t3.$__ ? t3.toString() : t3;
6889          }));
6890        }, getArrayParent: function() {
6891          return this[h];
6892        }, _cast: function(t3, e3, r3) {
6893          if (null == this[d]) return t3;
6894          var o2 = this[d].casterConstructor;
6895          if ((o2.$isMongooseDocumentArray ? f.isMongooseDocumentArray(t3) : t3 instanceof o2) || t3 && t3.constructor && t3.constructor.baseCasterConstructor === o2) return t3[b] && t3.__parentArray || (t3[b] = this[h], t3.__parentArray = this), t3.$setIndex(e3), t3;
6896          if (null == t3) return null;
6897          if ((n.isBuffer(t3) || p(t3, "ObjectId") || !f.isObject(t3)) && (t3 = { _id: t3 }), t3 && o2.discriminators && o2.schema && o2.schema.options && o2.schema.options.discriminatorKey) if ("string" == typeof t3[o2.schema.options.discriminatorKey] && o2.discriminators[t3[o2.schema.options.discriminatorKey]]) o2 = o2.discriminators[t3[o2.schema.options.discriminatorKey]];
6898          else {
6899            var i2 = c(o2.discriminators, t3[o2.schema.options.discriminatorKey]);
6900            i2 && (o2 = i2);
6901          }
6902          if (o2.$isMongooseDocumentArray) return o2.cast(t3, this, void 0, void 0, e3);
6903          var s2 = new o2(t3, this, r3, void 0, e3);
6904          return s2.isNew = true, s2;
6905        }, id: function(t3) {
6906          var e3, r3, n2;
6907          try {
6908            e3 = u(t3).toString();
6909          } catch (t4) {
6910            e3 = null;
6911          }
6912          var i2, s2 = o(this);
6913          try {
6914            for (s2.s(); !(i2 = s2.n()).done; ) {
6915              var c2 = i2.value;
6916              if (c2 && null != (n2 = c2.get("_id"))) {
6917                if (n2 instanceof a) {
6918                  if (r3 || (r3 = String(t3)), r3 == n2._id) return c2;
6919                } else if (p(t3, "ObjectId") || p(n2, "ObjectId")) {
6920                  if (e3 == n2) return c2;
6921                } else if (t3 == n2 || f.deepEqual(t3, n2)) return c2;
6922              }
6923            }
6924          } catch (t4) {
6925            s2.e(t4);
6926          } finally {
6927            s2.f();
6928          }
6929          return null;
6930        }, toObject: function(t3) {
6931          return [].concat(this.map(function(e3) {
6932            return null == e3 ? null : "function" != typeof e3.toObject ? e3 : e3.toObject(t3);
6933          }));
6934        }, $toObject: function() {
6935          return this.constructor.prototype.toObject.apply(this, arguments);
6936        }, push: function() {
6937          var t3 = s.push.apply(this, arguments);
6938          return g(this), t3;
6939        }, pull: function() {
6940          var t3 = s.pull.apply(this, arguments);
6941          return g(this), t3;
6942        }, shift: function() {
6943          var t3 = s.shift.apply(this, arguments);
6944          return g(this), t3;
6945        }, splice: function() {
6946          var t3 = s.splice.apply(this, arguments);
6947          return g(this), t3;
6948        }, inspect: function() {
6949          return this.toObject();
6950        }, create: function(t3) {
6951          var e3 = this[d].casterConstructor;
6952          if (t3 && e3.discriminators && e3.schema && e3.schema.options && e3.schema.options.discriminatorKey) if ("string" == typeof t3[e3.schema.options.discriminatorKey] && e3.discriminators[t3[e3.schema.options.discriminatorKey]]) e3 = e3.discriminators[t3[e3.schema.options.discriminatorKey]];
6953          else {
6954            var r3 = c(e3.discriminators, t3[e3.schema.options.discriminatorKey]);
6955            r3 && (e3 = r3);
6956          }
6957          return new e3(t3, this);
6958        }, notify: function(t3) {
6959          var e3 = this;
6960          return function r3(n2, o2) {
6961            for (var i2 = (o2 = o2 || e3).length; i2--; ) null != o2[i2] && ("save" === t3 && (n2 = e3[i2]), f.isMongooseArray(o2[i2]) ? r3
6961(n2, o2[i2]) : o2[i2] && o2[i2].emit(t3, n2));
6962          };
6963        }, set: function(t3, e3, r3) {
6964          var n2 = this.__array;
6965          if (r3) return n2[t3] = e3, this;
6966          var o2 = v._cast.call(this, e3, t3);
6967          return v._markModified.call(this, t3), n2[t3] = o2, this;
6968        }, _markModified: function(t3, e3) {
6969          var r3, n2 = this[h];
6970          if (n2) {
6971            if (r3 = this[y], arguments.length && (r3 = null != e3 ? r3 + "." + t3.__index + "." + e3 : r3 + "." + t3), null != r3 && r3.endsWith(".$")) return this;
6972            n2.markModified(r3, 0 !== arguments.length ? t3 : n2);
6973          }
6974          return this;
6975        } };
6976        function g(t3) {
6977          var e3 = t3[h];
6978          if (e3 && null != e3.$__.populated) {
6979            var r3, n2 = o(Object.keys(e3.$__.populated).filter(function(e4) {
6980              return e4.startsWith(t3[y] + ".");
6981            }));
6982            try {
6983              var i2 = function() {
6984                var n3 = r3.value, o2 = n3.slice((t3[y] + ".").length);
6985                if (!Array.isArray(e3.$__.populated[n3].value)) return 1;
6986                e3.$__.populated[n3].value = t3.map(function(t4) {
6987                  return t4.$populated(o2);
6988                });
6989              };
6990              for (n2.s(); !(r3 = n2.n()).done; ) i2();
6991            } catch (t4) {
6992              n2.e(t4);
6993            } finally {
6994              n2.f();
6995            }
6996          }
6997        }
6998        t2.exports = v;
6999      }, 4878: (t2, e2, r2) => {
7000        function n(t3) {
7001          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
7002            return typeof t4;
7003          } : function(t4) {
7004            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
7005          }, n(t3);
7006        }
7007        function o(t3, e3, r3) {
7008          return (e3 = (function(t4) {
7009            var e4 = (function(t5) {
7010              if ("object" != n(t5) || !t5) return t5;
7011              var e5 = t5[Symbol.toPrimitive];
7012              if (void 0 !== e5) {
7013                var r4 = e5.call(t5, "string");
7014                if ("object" != n(r4)) return r4;
7015                throw new TypeError("@@toPrimitive must return a primitive value.");
7016              }
7017              return String(t5);
7018            })(t4);
7019            return "symbol" == n(e4) ? e4 : e4 + "";
7020          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
7021        }
7022        var i = r2(8920), s = r2(4859), a = r2(7930).arrayAtomicsSymbol, u = r2(7930).arrayAtomicsBackupSymbol, c = r2(7930).arrayParentSymbol, l = r2(7930).arrayPathSymbol, f = r2(7930).arraySchemaSymbol, p = Array.prototype.push, h = /^\d+$/;
7023        t2.exports = function(t3, e3, r3, n2) {
7024          var y = [], d = o(o(o(o(o({}, a, {}), u, void 0), l, e3), f, void 0), c, void 0);
7025          if (Array.isArray(t3) && (t3[l] === e3 && t3[c] === r3 && (d[a] = Object.assign({}, t3[a])), t3.forEach(function(t4) {
7026            p.call(y, t4);
7027          })), d[l] = e3, d.__array = y, r3 && r3.$__) for (d[c] = r3, d[f] = r3.$__schema.path(e3); null != d[f] && d[f].$isMongooseArray && !d[f].$isMongooseDocumentArray; ) d[f] = d[f].casterConstructor;
7028          var b = new Proxy(y, { get: function(t4, e4) {
7029            return "isMongooseArray" === e4 || "isMongooseArrayProxy" === e4 || "isMongooseDocumentArray" === e4 || "isMongooseDocumentArrayProxy" === e4 || (d.hasOwnProperty(e4) ? d[e4] : s.hasOwnProperty(e4) ? s[e4] : n2 && n2.virtuals && n2.virtuals.hasOwnProperty(e4) ? n2.virtuals[e4].applyGetters(void 0, t4) : i.hasOwnProperty(e4) ? i[e4] : y[e4]);
7030          }, set: function(t4, e4, r4) {
7031            return "string" == typeof e4 && h.test(e4) ? s.set.call(b, e4, r4, false) : d.hasOwnProperty(e4) ? d[e4] = r4 : n2 && n2.virtuals && n2.virtuals.hasOwnProperty(e4) ? n2.virtuals[e4].applySetters(r4, t4) : y[e4] = r4, true;
7032          } });
7033          return b;
7034        };
7035      }, 4957: (t2, e2, r2) => {
7036        function n(t3) {
7037          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
7038            return typeof t4;
7039          } : function(t4) {
7040            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
7041          }, n(t3);
7042        }
7043        function o(t3, e3) {
7044          var r3 = Object.keys(t3);
7045          if (Object.getOwnPropertySymbols) {
7046            var n2 = Object.getOwnPropertySymbols(t3);
7047            e3 && (n2 = n2.filter(function(e4) {
7048              return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
7049            })), r3.push.apply(r3, n2);
7050          }
7051          return r3;
7052        }
7053        function i(t3) {
7054          for (var e3 = 1; e3 < arguments.length; e3++) {
7055            var r3 = null != arguments[e3] ? arguments[e3] : {};
7056            e3 % 2 ? o(Object(r3), true).forEach(function(e4) {
7057              s(t3, e4, r3[e4]);
7058            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t3, Object.getOwnPropertyDescriptors(r3)) : o(Object(r3)).forEac
7058h(function(e4) {
7059              Object.defineProperty(t3, e4, Object.getOwnPropertyDescriptor(r3, e4));
7060            });
7061          }
7062          return t3;
7063        }
7064        function s(t3, e3, r3) {
7065          return (e3 = (function(t4) {
7066            var e4 = (function(t5) {
7067              if ("object" != n(t5) || !t5) return t5;
7068              var e5 = t5[Symbol.toPrimitive];
7069              if (void 0 !== e5) {
7070                var r4 = e5.call(t5, "string");
7071                if ("object" != n(r4)) return r4;
7072                throw new TypeError("@@toPrimitive must return a primitive value.");
7073              }
7074              return String(t5);
7075            })(t4);
7076            return "symbol" == n(e4) ? e4 : e4 + "";
7077          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
7078        }
7079        var a = r2(7160), u = r2(5268);
7080        t2.exports = l, l.middlewareFunctions = ["deleteOne", "save", "validate", "remove", "updateOne", "init"];
7081        var c = new Set(l.middlewareFunctions.flatMap(function(t3) {
7082          return [t3, "$__".concat(t3)];
7083        }));
7084        function l(t3, e3, r3) {
7085          var n2 = { useErrorHandlers: true, numCallbackParams: 1, nullResultByDefault: true, contextParameter: true }, o2 = (r3 = r3 || {}).decorateDoc ? t3 : t3.prototype;
7086          t3.$appliedHooks = true;
7087          for (var s2 = 0, f = Object.keys(e3.paths); s2 < f.length; s2++) {
7088            var p = f[s2], h = e3.paths[p], y = null;
7089            if (h.$isSingleNested) y = h.caster;
7090            else {
7091              if (!h.$isMongooseDocumentArray) continue;
7092              y = h.Constructor;
7093            }
7094            if (!y.$appliedHooks && (l(y, h.schema, i(i({}, r3), {}, { isChildSchema: true })), null != y.discriminators)) for (var d = 0, b = Object.keys(y.discriminators); d < b.length; d++) {
7095              var m = b[d];
7096              l(y.discriminators[m], y.discriminators[m].schema, r3);
7097            }
7098          }
7099          var v = e3.s.hooks.filter(function(t4) {
7100            return "updateOne" === t4.name || "deleteOne" === t4.name ? !!t4.document : "remove" === t4.name || "init" === t4.name ? null == t4.document || !!t4.document : null == t4.query && null == t4.document || false !== t4.document;
7101          }).filter(function(t4) {
7102            return !e3.methods[t4.name] || !t4.fn[a.builtInMiddleware];
7103          });
7104          t3._middleware = v, o2.$__originalValidate = o2.$__originalValidate || o2.$__validate;
7105          for (var g = 0, _ = r3 && r3.isChildSchema ? ["save", "validate", "deleteOne"] : ["save", "validate"]; g < _.length; g++) {
7106            var w = _[g], O = "validate" === w ? "$__originalValidate" : "$__".concat(w), S = v.createWrapper(w, o2[O], null, n2);
7107            o2["$__".concat(w)] = S;
7108          }
7109          o2.$__init = v.createWrapperSync("init", o2.$__init, null, n2);
7110          for (var $ = Object.keys(e3.methods), j = Object.assign({}, n2, { checkForPromise: true }), P = function() {
7111            var e4 = E[A];
7112            if (c.has(e4)) return 0;
7113            if (!v.hasHooks(e4)) return 0;
7114            var r4 = o2[e4];
7115            o2[e4] = function() {
7116              var r5 = this, n3 = Array.prototype.slice.call(arguments), o3 = n3.slice(-1).pop(), i2 = "function" == typeof o3 ? n3.slice(0, n3.length - 1) : n3;
7117              return u(o3, function(t4) {
7118                return r5["$__".concat(e4)].apply(r5, i2.concat([t4]));
7119              }, t3.events);
7120            }, o2["$__".concat(e4)] = v.createWrapper(e4, r4, null, j);
7121          }, A = 0, E = $; A < E.length; A++) P();
7122        }
7123      }, 5022: (t2, e2, r2) => {
7124        var n = r2(6426), o = r2(7160), i = r2(608), s = r2(8768);
7125        function a(t3, e3) {
7126          if (e3 && e3.default) {
7127            var r3 = e3.default;
7128            Array.isArray(r3) && 0 === r3.length ? e3.default = Array : !e3.shared && i(r3) && 0 === Object.keys(r3).length && (e3.default = function() {
7129              return {};
7130            });
7131          }
7132          n.call(this, t3, e3, "Mixed"), this[o.schemaMixedSymbol] = true;
7133        }
7134        a.schemaName = "Mixed", a.defaultOptions = {}, a.prototype = Object.create(n.prototype), a.prototype.constructor = a, a.get = n.get, a.set = n.set, a.setters = [], a.prototype.cast = function(t3) {
7135          return t3 instanceof Error ? s.errorToPOJO(t3) : t3;
7136        }, a.prototype.castForQuery = function(t3, e3) {
7137          return e3;
7138        }, a.prototype.toJSONSchema = function(t3) {
7139          return {};
7140        }, t2.exports = a;
7141      }, 5098: (t2, e2, r2) => {
7142        function n(t3) {
7143          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
7144            return typeof t4;
7145          } : function(t4) {
7146            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
7147          }, n(t3);
7148        }
7149        function o(t3, e3) {
7150          var r3 = Object.keys(t3);
7151          if (Object.getOwnPropertySymbols) {
7152            var n2 = Object.getOwnPropertySymbols(t3);
7153            e3 && (n2 = n2.filter(function(e4) {
7154              return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
7155            })), r3.push.apply(r3, n2);
7156          }
7157          return r3;
7158        }
7159        function i(t3) {
7160          for (var e3 = 1; e3 < arguments.length; e3++) {
7161            var r3 = null != arguments[e3] ? arguments[e3] : {};
7162            e3 % 2 ? o(Object(r3), true).forEach(function(e4) {
7163              s(t3, e4, r3[e4]);
7164            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t3, Object.getOwnPropertyDescriptors(r3)) : o(Object(r3)).forEac
7164h(function(e4) {
7165              Object.defineProperty(t3, e4, Object.getOwnPropertyDescriptor(r3, e4));
7166            });
7167          }
7168          return t3;
7169        }
7170        function s(t3, e3, r3) {
7171          return (e3 = (function(t4) {
7172            var e4 = (function(t5) {
7173              if ("object" != n(t5) || !t5) return t5;
7174              var e5 = t5[Symbol.toPrimitive];
7175              if (void 0 !== e5) {
7176                var r4 = e5.call(t5, "string");
7177                if ("object" != n(r4)) return r4;
7178                throw new TypeError("@@toPrimitive must return a primitive value.");
7179              }
7180              return String(t5);
7181            })(t4);
7182            return "symbol" == n(e4) ? e4 : e4 + "";
7183          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
7184        }
7185        var a, u = r2(3609), c = r2(3550).EventEmitter, l = r2(3441), f = r2(7494), p = r2(6426), h = r2(5335), y = r2(8499), d = r2(5558).G, b = r2(4327), m = r2(1469), v = r2(9604), g = r2(7910), _ = r2(1313), w = r2(3303)._, O = r2(1793), S = r2(8768), $ = r2(5537);
7186        function j(t3, e3, r3) {
7187          if (t3.options.timeseries) throw new $(e3, "timeseries");
7188          var n2 = j.defaultOptions && j.defaultOptions._id;
7189          null != n2 && ((r3 = r3 || {})._id = n2), t3 = _(t3, r3), this.caster = P(t3, null, r3), this.caster.path = e3, this.caster.prototype.$basePath = e3, this.schema = t3, this.$isSingleNested = true, this.base = t3.base, p.call(this, e3, r3, "Embedded");
7190        }
7191        function P(t3, e3, n2) {
7192          a || (a = r2(9380));
7193          var o2 = function(t4, e4, r3) {
7194            this.$__parent = r3, a.apply(this, arguments), null != r3 && this.$session(r3.$session());
7195          };
7196          t3._preCompile();
7197          var i2 = null != e3 ? e3.prototype : a.prototype;
7198          for (var s2 in (o2.prototype = Object.create(i2)).$__setSchema(t3), o2.prototype.constructor = o2, o2.prototype.$__schemaTypeOptions = n2, o2.$__required = null == n2 ? void 0 : n2.required, o2.base = t3.base, o2.schema = t3, o2.$isSingleNested = true, o2.events = new c(), o2.prototype.toBSON = function() {
7199            return this.toObject(w);
7200          }, t3.methods) o2.prototype[s2] = t3.methods[s2];
7201          for (var u2 in t3.statics) o2[u2] = t3.statics[u2];
7202          for (var l2 in c.prototype) o2[l2] = c.prototype[l2];
7203          return o2;
7204        }
7205        t2.exports = j, j.prototype = Object.create(p.prototype), j.prototype.constructor = j, j.prototype.OptionsConstructor = f;
7206        var A = i({}, p.prototype.$conditionalHandlers);
7207        A.$geoWithin = function(t3, e3) {
7208          return { $geometry: this.castForQuery(null, t3.$geometry, e3) };
7209        }, A.$near = A.$nearSphere = v.cast$near, A.$within = A.$geoWithin = v.cast$within, A.$geoIntersects = v.cast$geoIntersects, A.$minDistance = d, A.$maxDistance = d, A.$exists = y, Object.defineProperty(j.prototype, "$conditionalHandlers", { enumerable: false, value: A }), j.prototype.cast = function(t3, e3, r3, o2, i2) {
7210          if (t3 && t3.$isSingleNested && t3.parent === e3) return t3;
7211          if (null != t3 && ("object" !== n(t3) || Array.isArray(t3))) throw new l(this.path, t3);
7212          var s2, a2 = this.schema.path(this.schema.options.discriminatorKey), u2 = null == a2 ? null : a2.getDefault(e3), c2 = g(this.caster, t3, u2), f2 = e3 && e3.$__ && e3.$__.selected, p2 = this.path, y2 = null == f2 ? null : Object.keys(f2).reduce(function(t4, e4) {
7213            return e4.startsWith(p2 + ".") && ((t4 = t4 || {})[e4.substring(p2.length + 1)] = f2[e4]), t4;
7214          }, null);
7215          if (!r3) return i2 = Object.assign({}, i2, { priorDoc: o2 }), 0 === Object.keys(t3).length ? new c2({}, y2, e3, void 0, i2) : new c2(t3, y2, e3, void 0, i2);
7216          delete (s2 = new c2(void 0, y2, e3, false, { defaults: false })).$__.defaults, s2.$init(t3);
7217          var d2 = O(y2);
7218          return h(s2, y2, d2), s2;
7219        }, j.prototype.castForQuery = function(t3, e3, r3, n2) {
7220          var o2;
7221          if (null != t3) {
7222            if (!(o2 = this.$conditionalHandlers[t3])) throw new Error("Can't use " + t3);
7223            return o2.call(this, e3);
7224          }
7225          if (null == e3) return e3;
7226          var i2 = g(this.caster, e3);
7227          if (e3 instanceof i2) return e3;
7228          this.options.runSetters && (e3 = this._applySetters(e3, r3));
7229          var s2 = null != n2 && null != n2.strict ? n2.strict : void 0;
7230          try {
7231            e3 = new i2(e3, s2);
7232          } catch (t4) {
7233            if (!(t4 instanceof u)) throw new u("Embedded", e3, this.path, t4, this);
7234            throw t4;
7235          }
7236          return e3;
7237        }, j.prototype.doValidate = function(t3, e3, r3, n2) {
7238          var o2 = g(this.caster, t3);
7239          if (!t3 || t3 instanceof o2 || (t3 = new o2(t3, null, null != r3 && null != r3.$__ ? r3 : null)), n2 && n2.skipSchemaValidators) return t3 ? t3.validate().then(function() {
7240            return e3(null);
7241          }, function(t4) {
7242            return e3(t4);
7243          }) : e3(null);
7244          p.prototype.doValidate.call(this, t3, function(r4) {
7245            return r4 ? e3(r4) : t3 ? void t3.validate().then(function() {
7246              return e3(null);
7247            }, function(t4) {
7248              return e3(t4);
7249            }) : e3(null);
7250          }, r3, n2);
7251        }, j.prototype.doValidateSync = function(t3, e3, r3) {
7252          if (!r3 || !r3.skipSchemaValidators) {
7253            var n2 = p.prototype.doValidateSync.call(this, t3, e3);
7254            if (n2) return n2;
7255          }
7256          if (t3) return t3.validateSync();
7257        }, j.prototype.discriminator = function(t3, e3, r3) {
7258          r3 = r3 || {};
7259          var n2 = S.isPOJO(r3) ? r3.value : r3, o2 = "boolean" != typeof r3.clone || r3.clone;
7260          return e3.instanceOfSchema && o2 && (e3 = e3.clone()), e3 = m(this.caster, t3, e3, n2, null, null, r3.overwriteExisting), this.caster.discriminators[t3] = P(e3, this.caster), this.caster.discriminators[t3];
7261        }, j.defaultOptions = {}, j.set = p.set, j.setters = [], j.get = p.get, j.prototype.toJSON = function() {
7262          return { path: this.path, options: this.options };
7263        }, j.prototype.clone = function() {
7264          var t3 = new this.constructor(this.schema, this.path, i(i({}, this.options), {}, { _skipApplyDiscriminators: true }));
7265          return t3.validators = this.validators.slice(), void 0 !== this.requiredValidator && (t3.requiredValidator = this.requiredValidator), t3.caster.discriminators = Object.assign({}, this.caster.discriminators), t3._appliedDiscriminators = this._appliedDiscriminators, t3;
7266        }, j.prototype.toJSONSchema = function(t3) {
7267          var e3 = this.options.required && "function" != typeof this.options.required;
7268          return i(i({}, this.schema.toJSONSchema(t3)), b("object", "object", null == t3 ? void 0 : t3.useBsonType, e3));
7269        };
7270      }, 5110: (t2) => {
7271        var e2 = /* @__PURE__ */ new Set(["$ref", "$id", "$db"]);
7272        t2.exports = function(t3) {
7273          return "$" === t3[0] && !e2.has(t3);
7274        };
7275      }, 5152: (t2, e2, r2) => {
7276        var n = r2(3703), o = r2(7425);
7277        t2.exports = function t3(e3, r3, i) {
7278          for (var s = (i = i || {}).typeOnly, a = Array.isArray(r3) ? r3 : -1 === r3.indexOf(".") ? [r3] : r3.split("."), u = null, c = "adhocOrUndefined", l = o(e3.
7278schema, e3.get(e3.schema.options.discriminatorKey)) || e3.schema, f = 0; f < a.length; ++f) {
7279            var p = a.slice(0, f + 1).join(".");
7280            if (null != (u = l.path(p))) {
7281              if ("Mixed" === u.instance) return s ? "real" : u;
7282              if (c = l.pathType(p), (u.$isSingleNested || u.$isMongooseDocumentArrayElement) && null != u.schema.discriminators) {
7283                var h = u.schema.discriminators, y = e3.get(p + "." + n(u, "schema.options.discriminatorKey"));
7284                if (null == y || null == h[y]) continue;
7285                var d = a.slice(f + 1).join(".");
7286                return t3(e3.get(p), d, i);
7287              }
7288            } else c = "adhocOrUndefined";
7289          }
7290          return s ? c : u;
7291        };
7292      }, 5188: (t2, e2, r2) => {
7293        var n = r2(7300);
7294        t2.exports = function(t3, e3) {
7295          if (null == t3) return false;
7296          if ("_id" === e3) return 0 === t3._id;
7297          for (var r3 = null, o = 0, i = Object.keys(t3); o < i.length; o++) {
7298            var s = i[o];
7299            if (n(t3[s])) {
7300              r3 = 1 === t3[e3] ? "inclusive" : "exclusive";
7301              break;
7302            }
7303          }
7304          return "inclusive" === r3 ? 1 !== t3[e3] : "exclusive" === r3 && 0 === t3[e3];
7305        };
7306      }, 5268: (t2, e2, r2) => {
7307        var n = r2(2746), o = Symbol("mongoose#emitted");
7308        t2.exports = function(t3, e3, i, s) {
7309          if ("function" == typeof t3) try {
7310            return e3(function(e4) {
7311              if (null == e4) t3.apply(this, arguments);
7312              else {
7313                null != i && null != i.listeners && i.listeners("error").length > 0 && !e4[o] && (e4[o] = true, i.emit("error", e4));
7314                try {
7315                  t3(e4);
7316                } catch (e5) {
7317                  return n(function() {
7318                    throw e5;
7319                  });
7320                }
7321              }
7322            });
7323          } catch (e4) {
7324            return null != i && null != i.listeners && i.listeners("error").length > 0 && !e4[o] && (e4[o] = true, i.emit("error", e4)), t3(e4);
7325          }
7326          return new (s = s || r2.g.Promise)(function(t4, r3) {
7327            e3(function(e4, n2) {
7328              return null != e4 ? (null != i && null != i.listeners && i.listeners("error").length > 0 && !e4[o] && (e4[o] = true, i.emit("error", e4)), r3(e4)) : arguments.length > 2 ? t4(Array.prototype.slice.call(arguments, 1)) : void t4(n2);
7329            });
7330          });
7331        };
7332      }, 5289: (t2) => {
7333        t2.exports = function(t3) {
7334          switch (t3) {
7335            case "p":
7336              t3 = "primary";
7337              break;
7338            case "pp":
7339              t3 = "primaryPreferred";
7340              break;
7341            case "s":
7342              t3 = "secondary";
7343              break;
7344            case "sp":
7345              t3 = "secondaryPreferred";
7346              break;
7347            case "n":
7348              t3 = "nearest";
7349          }
7350          return t3;
7351        };
7352      }, 5335: (t2, e2, r2) => {
7353        var n = r2(1091);
7354        function o(t3, e3, r3) {
7355          t3.$__.activePaths.default(e3), !r3 && t3.$isSubdocument && t3.$isSingleNested && null != t3.$parent() && t3.$parent().$__.activePaths.default(t3.$__pathRelativeToParent(e3));
7356        }
7357        t2.exports = function(t3, e3, r3, i, s, a, u) {
7358          for (var c = Object.keys(t3.$__schema.paths), l = c.length, f = u && u.skipParentChangeTracking, p = 0; p < l; ++p) {
7359            var h = void 0, y = "", d = c[p];
7360            if ("_id" !== d || !t3.$__.skipId) {
7361              var b = t3.$__schema.paths[d], m = b.splitPath(), v = m.length;
7362              if ("$*" !== m[v - 1]) for (var g = false, _ = t3._doc, w = 0; w < v && null != _; ++w) {
7363                var O = m[w];
7364                if (y += (y.length ? "." : "") + O, true === r3) {
7365                  if (y in e3) break;
7366                } else if (false === r3 && e3 && !g) {
7367                  var S = b.$isSingleNested || b.$isMongooseDocumentArray;
7368                  if (y in e3 && !n(e3[y]) || w === v - 1 && S && null != i && i[y]) g = true;
7369                  else if (null != i && !i[y]) break;
7370                }
7371                if (w === v - 1) {
7372                  if (void 0 !== _[O]) break;
7373                  if (null != s) {
7374                    if ("function" == typeof b.defaultValue) {
7375                      if (!b.defaultValue.$runBeforeSetters && s) break;
7376                      if (b.defaultValue.$runBeforeSetters && !s) break;
7377                    } else if (!s) continue;
7378                  }
7379                  if (a && a[y]) break;
7380                  if (e3 && null !== r3) {
7381                    if (true === r3) {
7382                      if (d in e3) continue;
7383                      try {
7384                        h = b.getDefault(t3, false);
7385                      } catch (e4) {
7386                        t3.invalidate(d, e4);
7387                        break;
7388                      }
7389                      void 0 !== h && (_[O] = h, o(t3, d, f));
7390                    } else if (g) {
7391                      try {
7392                        h = b.getDefault(t3, false);
7393                      } catch (e4) {
7394                        t3.invalidate(d, e4);
7395                        break;
7396                      }
7397                      void 0 !== h && (_[O] = h, o(t3, d, f));
7398                    }
7399                  } else {
7400                    try {
7401                      h = b.getDefault(t3, false);
7402                    } catch (e4) {
7403                      t3.invalidate(d, e4);
7404                      break;
7405                    }
7406                    void 0 !== h && (_[O] = h, o(t3, d, f));
7407                  }
7408                } else _ = _[O];
7409              }
7410            }
7411          }
7412        };
7413      }, 5346: (t2) => {
7414        t2.exports = function(t3, e2, r2) {
7415          for (var n = e2[0], o = r2, i = t3, s = 0; s < e2.length - 1; ++s) {
7416            var a = o.path(n);
7417            if (a && a.schema) {
7418              var u = i.get(n);
7419              if (o = a.schema, n = e2[s + 1], Array.isArray(u) && !isNaN(n) && (u = u[n], n = ""), null == u) break;
7420              i = u;
7421            } else n += n.length ? "." + e2[s + 1] : e2[s + 1];
7422          }
7423          return i;
7424        };
7425      }, 5413: (t2, e2, r2) => {
7426        var n = r2(3305), o = r2(2402);
7427        t2.exports = function(t3) {
7428          if (null == t3) return t3;
7429          if ("" === t3) return null;
7430          var e3 = n(t3, "Long") ? t3.toNumber() : Number(t3);
7431          if (e3 === (0 | e3) && e3 >= -2147483648 && e3 <= 2147483647) return e3;
7432          o.ok(false);
7433        };
7434      }, 5477: (t2, e2, r2) => {
7435        var n = r2(2354), o = r2(3279), i = r2(3123), s = r2(3388);
7436        t2.exports = s || n.call(i, o);
7437      }, 5484: (t2) => {
7438        function e2(t3) {
7439          return e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
7440            return typeof t4;
7441          } : function(t4) {
7442            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
7443          }, e2(t3);
7444        }
7445        t2.exports = function() {
7446          if ("function" != typeof Symbol || "function" != typeof Object.getOwnPropertySymbols) return false;
7447          if ("symbol" === e2(Symbol.iterator)) return true;
7448          var t3 = {}, r2 = Symbol("test"), n = Object(r2);
7449          if ("string" == typeof r2) return false;
7450          if ("[object Symbol]" !== Object.prototype.toString.call(r2)) return false;
7451          if ("[object Symbol]" !== Object.prototype.toString.call(n)) return false;
7452          for (var o in t3[r2] = 42, t3) return false;
7453          if ("function" == typeof Object.keys && 0 !== Object.keys(t3).length) return false;
7454          if ("function" == typeof Object.getOwnPropertyNames && 0 !== Object.getOwnPropertyNames(t3).length) return false;
7455          var i = Object.getOwnPropertySymbols(t3);
7456          if (1 !== i.length || i[0] !== r2) return false;
7457          if (!Object.prototype.propertyIsEnumerable.call(t3, r2)) return false;
7458          if ("function" == typeof Object.getOwnPropertyDescriptor) {
7459            var s = Object.getOwnPropertyDescriptor(t3, r2);
7460            if (42 !== s.value || true !== s.enumerable) return false;
7461          }
7462          return true;
7463        };
7464      }, 5497: (t2, e2, r2) => {
7465        var n = r2(8260);
7466        t2.exports = function(t3) {
7467          if ("TopologyDescription" !== n(t3)) return false;
7468          var e3 = Array.from(t3.servers.values());
7469          return e3.length > 0 && e3.every(function(t4) {
7470            return t4.error && -1 !== t4.error.message.indexOf("Client network socket disconnected before secure TLS connection was established");
7471          });
7472        };
7473      }, 5510: (t2, e2, r2) => {
7474        function n(t3) {
7475          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
7476            return typeof t4;
7477          } : function(t4) {
7478            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
7479          }, n(t3);
7480        }
7481        var o = "undefined" != typeof Symbol && Symbol, i = r2(5484);
7482        t2.exports = function() {
7483          return "function" == typeof o && "function" == typeof Symbol && "symbol" === n(o("foo")) && "symbol" === n(Symbol("bar")) && i();
7484        };
7485      }, 5537: (t2, e2, r2) => {
7486        function n(t3) {
7487          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
7488            return typeof t4;
7489          } : function(t4) {
7490            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
7491          }, n(t3);
7492        }
7493        function o() {
7494          try {
7495            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
7496            }));
7497          } catch (t4) {
7498          }
7499          return (o = function() {
7500            return !!t3;
7501          })();
7502        }
7503        function i(t3) {
7504          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
7505            return t4.__proto__ || Object.getPrototypeOf(t4);
7506          }, i(t3);
7507        }
7508        function s(t3, e3) {
7509          return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
7510            return t4.__proto__ = e4, t4;
7511          }, s(t3, e3);
7512        }
7513        var a = (function(t3) {
7514          function e3(t4, r4) {
7515            return (function(t5, e4) {
7516              if (!(t5 instanceof e4)) throw new TypeError("Cannot call a class as a function");
7517            })(this, e3), (function(t5, e4, r5) {
7518              return e4 = i(e4), (function(t6, e5) {
7519                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
7520                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
7521                return (function(t7) {
7522                  if (void 0 === t7) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
7523                  return t7;
7524                })(t6);
7525              })(t5, o() ? Reflect.construct(e4, r5 || [], i(t5).constructor) : e4.apply(t5, r5));
7526            })(this, e3, ['Cannot create use schema for property "'.concat(t4, '" because the schema has the ').concat(r4, " option enabled.")]);
7527          }
7528          return (function(t4, e4) {
7529            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
7530            t4.prototype = Object.create(e4 && e4.prototype, { c
7530onstructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && s(t4, e4);
7531          })(e3, t3), r3 = e3, Object.defineProperty(r3, "prototype", { writable: false }), r3;
7532          var r3;
7533        })(r2(8213));
7534        Object.defineProperty(a.prototype, "name", { value: "InvalidSchemaOptionError" }), t2.exports = a;
7535      }, 5549: (t2, e2, r2) => {
7536        var n = r2(6353).ObjectId, o = r2(7930).objectIdSymbol;
7537        Object.defineProperty(n.prototype, "_id", { enumerable: false, configurable: true, get: function() {
7538          return this;
7539        } }), n.prototype.hasOwnProperty("valueOf") || (n.prototype.valueOf = function() {
7540          return this.toString();
7541        }), n.prototype[o] = true, t2.exports = n;
7542      }, 5558: (t2, e2, r2) => {
7543        var n = r2(3660);
7544        function o(t3) {
7545          return n.cast()(t3);
7546        }
7547        e2.G = o, e2.p = function t3(e3, r3) {
7548          e3.forEach(function(n2, i) {
7549            Array.isArray(n2) ? t3(n2, r3) : e3[i] = o.call(r3, n2);
7550          });
7551        };
7552      }, 5678: (t2, e2, r2) => {
7553        t2.exports = r2(2914);
7554      }, 5761: (t2) => {
7555        t2.exports = Object.freeze({ enumerable: true, configurable: true, writable: true, value: void 0 });
7556      }, 5782: (t2) => {
7557        function e2(t3, e3) {
7558          (null == e3 || e3 > t3.length) && (e3 = t3.length);
7559          for (var r2 = 0, n = Array(e3); r2 < e3; r2++) n[r2] = t3[r2];
7560          return n;
7561        }
7562        t2.exports = function(t3, r2, n) {
7563          if (0 === t3.length) return n();
7564          var o, i = t3.length, s = null, a = (function(t4, r3) {
7565            var n2 = "undefined" != typeof Symbol && t4[Symbol.iterator] || t4["@@iterator"];
7566            if (!n2) {
7567              if (Array.isArray(t4) || (n2 = (function(t5, r4) {
7568                if (t5) {
7569                  if ("string" == typeof t5) return e2(t5, r4);
7570                  var n3 = {}.toString.call(t5).slice(8, -1);
7571                  return "Object" === n3 && t5.constructor && (n3 = t5.constructor.name), "Map" === n3 || "Set" === n3 ? Array.from(t5) : "Arguments" === n3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n3) ? e2(t5, r4) : void 0;
7572                }
7573              })(t4)) || r3) {
7574                n2 && (t4 = n2);
7575                var o2 = 0, i2 = function() {
7576                };
7577                return { s: i2, n: function() {
7578                  return o2 >= t4.length ? { done: true } : { done: false, value: t4[o2++] };
7579                }, e: function(t5) {
7580                  throw t5;
7581                }, f: i2 };
7582              }
7583              throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
7584            }
7585            var s2, a2 = true, u = false;
7586            return { s: function() {
7587              n2 = n2.call(t4);
7588            }, n: function() {
7589              var t5 = n2.next();
7590              return a2 = t5.done, t5;
7591            }, e: function(t5) {
7592              u = true, s2 = t5;
7593            }, f: function() {
7594              try {
7595                a2 || null == n2.return || n2.return();
7596              } finally {
7597                if (u) throw s2;
7598              }
7599            } };
7600          })(t3);
7601          try {
7602            for (a.s(); !(o = a.n()).done; ) r2(o.value, function(t4) {
7603              if (null == s) return null != t4 ? n(s = t4) : --i <= 0 ? n() : void 0;
7604            });
7605          } catch (s2) {
7606            a.e(s2);
7607          } finally {
7608            a.f();
7609          }
7610        };
7611      }, 5804: (t2, e2, r2) => {
7612        var n = r2(2354), o = r2(3279), i = r2(5477);
7613        t2.exports = function() {
7614          return i(n, o, arguments);
7615        };
7616      }, 5807: (t2) => {
7617        t2.exports = Object.getOwnPropertyDescriptor;
7618      }, 5825: (t2, e2, r2) => {
7619        var n = r2(8093);
7620        t2.exports = n.getPrototypeOf || null;
7621      }, 5832: (t2, e2, r2) => {
7622        function n(t3) {
7623          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
7624            return typeof t4;
7625          } : function(t4) {
7626            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
7627          }, n(t3);
7628        }
7629        var o = r2(6775), i = r2(2486), s = "function" == typeof Symbol && "function" == typeof Symbol.for ? Symbol.for("nodejs.util.inspect.custom") : null;
7630        e2.hp = c, e2.IS = 50;
7631        var a = 2147483647;
7632        function u(t3) {
7633          if (t3 >
7633 a) throw new RangeError('The value "' + t3 + '" is invalid for option "size"');
7634          var e3 = new Uint8Array(t3);
7635          return Object.setPrototypeOf(e3, c.prototype), e3;
7636        }
7637        function c(t3, e3, r3) {
7638          if ("number" == typeof t3) {
7639            if ("string" == typeof e3) throw new TypeError('The "string" argument must be of type string. Received type number');
7640            return p(t3);
7641          }
7642          return l(t3, e3, r3);
7643        }
7644        function l(t3, e3, r3) {
7645          if ("string" == typeof t3) return (function(t4, e4) {
7646            if ("string" == typeof e4 && "" !== e4 || (e4 = "utf8"), !c.isEncoding(e4)) throw new TypeError("Unknown encoding: " + e4);
7647            var r4 = 0 | b(t4, e4), n2 = u(r4), o3 = n2.write(t4, e4);
7648            return o3 !== r4 && (n2 = n2.slice(0, o3)), n2;
7649          })(t3, e3);
7650          if (ArrayBuffer.isView(t3)) return (function(t4) {
7651            if (V(t4, Uint8Array)) {
7652              var e4 = new Uint8Array(t4);
7653              return y(e4.buffer, e4.byteOffset, e4.byteLength);
7654            }
7655            return h(t4);
7656          })(t3);
7657          if (null == t3) throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + n(t3));
7658          if (V(t3, ArrayBuffer) || t3 && V(t3.buffer, ArrayBuffer)) return y(t3, e3, r3);
7659          if ("undefined" != typeof SharedArrayBuffer && (V(t3, SharedArrayBuffer) || t3 && V(t3.buffer, SharedArrayBuffer))) return y(t3, e3, r3);
7660          if ("number" == typeof t3) throw new TypeError('The "value" argument must not be of type number. Received type number');
7661          var o2 = t3.valueOf && t3.valueOf();
7662          if (null != o2 && o2 !== t3) return c.from(o2, e3, r3);
7663          var i2 = (function(t4) {
7664            if (c.isBuffer(t4)) {
7665              var e4 = 0 | d(t4.length), r4 = u(e4);
7666              return 0 === r4.length || t4.copy(r4, 0, 0, e4), r4;
7667            }
7668            return void 0 !== t4.length ? "number" != typeof t4.length || q(t4.length) ? u(0) : h(t4) : "Buffer" === t4.type && Array.isArray(t4.data) ? h(t4.data) : void 0;
7669          })(t3);
7670          if (i2) return i2;
7671          if ("undefined" != typeof Symbol && null != Symbol.toPrimitive && "function" == typeof t3[Symbol.toPrimitive]) return c.from(t3[Symbol.toPrimitive]("string"), e3, r3);
7672          throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + n(t3));
7673        }
7674        function f(t3) {
7675          if ("number" != typeof t3) throw new TypeError('"size" argument must be of type number');
7676          if (t3 < 0) throw new RangeError('The value "' + t3 + '" is invalid for option "size"');
7677        }
7678        function p(t3) {
7679          return f(t3), u(t3 < 0 ? 0 : 0 | d(t3));
7680        }
7681        function h(t3) {
7682          for (var e3 = t3.length < 0 ? 0 : 0 | d(t3.length), r3 = u(e3), n2 = 0; n2 < e3; n2 += 1) r3[n2] = 255 & t3[n2];
7683          return r3;
7684        }
7685        function y(t3, e3, r3) {
7686          if (e3 < 0 || t3.byteLength < e3) throw new RangeError('"offset" is outside of buffer bounds');
7687          if (t3.byteLength < e3 + (r3 || 0)) throw new RangeError('"length" is outside of buffer bounds');
7688          var n2;
7689          return n2 = void 0 === e3 && void 0 === r3 ? new Uint8Array(t3) : void 0 === r3 ? new Uint8Array(t3, e3) : new Uint8Array(t3, e3, r3), Object.setPrototypeOf(n2, c.prototype), n2;
7690        }
7691        function d(t3) {
7692          if (t3 >= a) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + a.toString(16) + " bytes");
7693          return 0 | t3;
7694        }
7695        function b(t3, e3) {
7696          if (c.isBuffer(t3)) return t3.length;
7697          if (ArrayBuffer.isView(t3) || V(t3, ArrayBuffer)) return t3.byteLength;
7698          if ("string" != typeof t3) throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + n(t3));
7699          var r3 = t3.length, o2 = arguments.length > 2 && true === arguments[2];
7700          if (!o2 && 0 === r3) return 0;
7701          for (var i2 = false; ; ) switch (e3) {
7702            case "ascii":
7703            case "latin1":
7704            case "binary":
7705              return r3;
7706            case "utf8":
7707            case "utf-8":
7708              return C(t3).length;
7709            case "ucs2":
7710            case "ucs-2":
7711            case "utf16le":
7712            case "utf-16le":
7713              return 2 * r3;
7714            case "hex":
7715              return r3 >>> 1;
7716            case "base64":
7717              return F(t3).length;
7718            default:
7719              if (i2) return o2 ? -1 : C(t3).length;
7720              e3 = ("" + e3).toLowerCase(), i2 = true;
7721          }
7722        }
7723        function m(t3, e3, r3) {
7724          var n2 = false;
vendor: 6,211 bytes, lines 7725-7858
7725          if ((void 0 === e3 || e3 < 0) && (e3 = 0), e3 > this.length) return "";
7726          if ((void 0 === r3 || r3 > this.length) && (r3 = this.length), r3 <= 0) return "";
7727          if ((r3 >>>= 0) <= (e3 >>>= 0)) return "";
7728          for (t3 || (t3 = "utf8"); ; ) switch (t3) {
7729            case "hex":
7730              return k(this, e3, r3);
7731            case "utf8":
7732            case "utf-8":
7733              return A(this, e3, r3);
7734            case "ascii":
7735              return x(this, e3, r3);
7736            case "latin1":
7737            case "binary":
7738              return T(this, e3, r3);
7739            case "base64":
7740              return P(this, e3, r3);
7741            case "ucs2":
7742            case "ucs-2":
7743            case "utf16le":
7744            case "utf-16le":
7745              return N(this, e3, r3);
7746            default:
7747              if (n2) throw new TypeError("Unknown encoding: " + t3);
7748              t3 = (t3 + "").toLowerCase(), n2 = true;
7749          }
7750        }
7751        function v(t3, e3, r3) {
7752          var n2 = t3[e3];
7753          t3[e3] = t3[r3], t3[r3] = n2;
7754        }
7755        function g(t3, e3, r3, n2, o2) {
7756          if (0 === t3.length) return -1;
7757          if ("string" == typeof r3 ? (n2 = r3, r3 = 0) : r3 > 2147483647 ? r3 = 2147483647 : r3 < -2147483648 && (r3 = -2147483648), q(r3 = +r3) && (r3 = o2 ? 0 : t3.length - 1), r3 < 0 && (r3 = t3.length + r3), r3 >= t3.length) {
7758            if (o2) return -1;
7759            r3 = t3.length - 1;
7760          } else if (r3 < 0) {
7761            if (!o2) return -1;
7762            r3 = 0;
7763          }
7764          if ("string" == typeof e3 && (e3 = c.from(e3, n2)), c.isBuffer(e3)) return 0 === e3.length ? -1 : _(t3, e3, r3, n2, o2);
7765          if ("number" == typeof e3) return e3 &= 255, "function" == typeof Uint8Array.prototype.indexOf ? o2 ? Uint8Array.prototype.indexOf.call(t3, e3, r3) : Uint8Array.prototype.lastIndexOf.call(t3, e3, r3) : _(t3, [e3], r3, n2, o2);
7766          throw new TypeError("val must be string, number or Buffer");
7767        }
7768        function _(t3, e3, r3, n2, o2) {
7769          var i2, s2 = 1, a2 = t3.length, u2 = e3.length;
7770          if (void 0 !== n2 && ("ucs2" === (n2 = String(n2).toLowerCase()) || "ucs-2" === n2 || "utf16le" === n2 || "utf-16le" === n2)) {
7771            if (t3.length < 2 || e3.length < 2) return -1;
7772            s2 = 2, a2 /= 2, u2 /= 2, r3 /= 2;
7773          }
7774          function c2(t4, e4) {
7775            return 1 === s2 ? t4[e4] : t4.readUInt16BE(e4 * s2);
7776          }
7777          if (o2) {
7778            var l2 = -1;
7779            for (i2 = r3; i2 < a2; i2++) if (c2(t3, i2) === c2(e3, -1 === l2 ? 0 : i2 - l2)) {
7780              if (-1 === l2 && (l2 = i2), i2 - l2 + 1 === u2) return l2 * s2;
7781            } else -1 !== l2 && (i2 -= i2 - l2), l2 = -1;
7782          } else for (r3 + u2 > a2 && (r3 = a2 - u2), i2 = r3; i2 >= 0; i2--) {
7783            for (var f2 = true, p2 = 0; p2 < u2; p2++) if (c2(t3, i2 + p2) !== c2(e3, p2)) {
7784              f2 = false;
7785              break;
7786            }
7787            if (f2) return i2;
7788          }
7789          return -1;
7790        }
7791        function w(t3, e3, r3, n2) {
7792          r3 = Number(r3) || 0;
7793          var o2 = t3.length - r3;
7794          n2 ? (n2 = Number(n2)) > o2 && (n2 = o2) : n2 = o2;
7795          var i2 = e3.length;
7796          n2 > i2 / 2 && (n2 = i2 / 2);
7797          for (var s2 = 0; s2 < n2; ++s2) {
7798            var a2 = parseInt(e3.substr(2 * s2, 2), 16);
7799            if (q(a2)) return s2;
7800            t3[r3 + s2] = a2;
7801          }
7802          return s2;
7803        }
7804        function O(t3, e3, r3, n2) {
7805          return L(C(e3, t3.length - r3), t3, r3, n2);
7806        }
7807        function S(t3, e3, r3, n2) {
7808          return L((function(t4) {
7809            for (var e4 = [], r4 = 0; r4 < t4.length; ++r4) e4.push(255 & t4.charCodeAt(r4));
7810            return e4;
7811          })(e3), t3, r3, n2);
7812        }
7813        function $(t3, e3, r3, n2) {
7814          return L(F(e3), t3, r3, n2);
7815        }
7816        function j(t3, e3, r3, n2) {
7817          return L((function(t4, e4) {
7818            for (var r4, n3, o2, i2 = [], s2 = 0; s2 < t4.length && !((e4 -= 2) < 0); ++s2) n3 = (r4 = t4.charCodeAt(s2)) >> 8, o2 = r4 % 256, i2.push(o2), i2.push(n3);
7819            return i2;
7820          })(e3, t3.length - r3), t3, r3, n2);
7821        }
7822        function P(t3, e3, r3) {
7823          return 0 === e3 && r3 === t3.length ? o.fromByteArray(t3) : o.fromByteArray(t3.slice(e3, r3));
7824        }
7825        function A(t3, e3, r3) {
7826          r3 = Math.min(t3.length, r3);
7827          for (var n2 = [], o2 = e3; o2 < r3; ) {
7828            var i2, s2, a2, u2, c2 = t3[o2], l2 = null, f2 = c2 > 239 ? 4 : c2 > 223 ? 3 : c2 > 191 ? 2 : 1;
7829            if (o2 + f2 <= r3) switch (f2) {
7830              case 1:
7831                c2 < 128 && (l2 = c2);
7832                break;
7833              case 2:
7834                128 == (192 & (i2 = t3[o2 + 1])) && (u2 = (31 & c2) << 6 | 63 & i2) > 127 && (l2 = u2);
7835                break;
7836              case 3:
7837                i2 = t3[o2 + 1], s2 = t3[o2 + 2], 128 == (192 & i2) && 128 == (192 & s2) && (u2 = (15 & c2) << 12 | (63 & i2) << 6 | 63 & s2) > 2047 && (u2 < 55296 || u2 > 57343) && (l2 = u2);
7838                break;
7839              case 4:
7840                i2 = t3[o2 + 1], s2 = t3[o2 + 2], a2 = t3[o2 + 3], 128 == (192 & i2) && 128 == (192 & s2) && 128 == (192 & a2) && (u2 = (15 & c2) << 18 | (63 & i2) << 12 | (63 & s2) << 6 | 63 & a2) > 65535 && u2 < 1114112 && (l2 = u2);
7841            }
7842            null === l2 ? (l2 = 65533, f2 = 1) : l2 > 65535 && (l2 -= 65536, n2.push(l2 >>> 10 & 1023 | 55296), l2 = 56320 | 1023 & l2), n2.push(l2), o2 += f2;
7843          }
7844          return (function(t4) {
7845            var e4 = t4.length;
7846            if (e4 <= E) return String.fromCharCode.apply(String, t4);
7847            for (var r4 = "", n3 = 0; n3 < e4; ) r4 += String.fromCharCode.apply(String, t4.slice(n3, n3 += E));
7848            return r4;
7849          })(n2);
7850        }
7851        c.TYPED_ARRAY_SUPPORT = (function() {
7852          try {
7853            var t3 = new Uint8Array(1), e3 = { foo: function() {
7854              return 42;
7855            } };
7856            return Object.setPrototypeOf(e3, Uint8Array.prototype), Object.setPrototypeOf(t3, e3), 42 === t3.foo();
7857          } catch (t4) {
7858            return false;
7859          }
7860        })(), c.TYPED_ARRAY_SUPPORT || "undefined" == typeof console || "function" != typeof console.error || console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."), Object.defineProperty(c.prototype, "parent", { enumerable: true, get: function() {
7861          if (c.isBuffer(this)) return this.buffer;
7862        } }), Object.defineProperty(c.prototype, "offset", { enumerable: true, get: function() {
7863          if (c.isBuffer(this)) return this.byteOffset;
7864        } }), c.poolSize = 8192, c.from = function(t3, e3, r3) {
7865          return l(t3, e3, r3);
7866        }, Object.setPrototypeOf(c.prototype, Uint8Array.prototype), Object.setPrototypeOf(c, Uint8Array), c.alloc = function(t3, e3, r3) {
7867          return (function(t4, e4, r4) {
7868            return f(t4), t4 <= 0 ? u(t4) : void 0 !== e4 ? "string" == typeof r4 ? u(t4).fill(e4, r4) : u(t4).fill(e4) : u(t4);
7869          })(t3, e3, r3);
7870        }, c.allocUnsafe = function(t3) {
7871          return p(t3);
7872        }, c.allocUnsafeSlow = function(t3) {
7873          return p(t3);
7874        }, c.isBuffer = function(t3) {
7875          return null != t3 && true === t3._isBuffer && t3 !== c.prototype;
7876        }, c.compare = function(t3, e3) {
7877          if (V(t3, Uint8Array) && (t3 = c.from(t3, t3.offset, t3.byteLength)), V(e3, Uint8Array) && (e3 = c.from(e3, e3.offset, e3.byteLength)), !c.isBuffer(t3) || !c.isBuffer(e3)) throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
7878          if (t3 === e3) return 0;
7879          for (var r3 = t3.length, n2 = e3.length, o2 = 0, i2 = Math.min(r3, n2); o2 < i2; ++o2) if (t3[o2] !== e3[o2]) {
7880            r3 = t3[o2], n2 = e3[o2];
7881            break;
7882          }
7883          return r3 < n2 ? -1 : n2 < r3 ? 1 : 0;
7884        }, c.isEncoding = function(t3) {
7885          switch (String(t3).toLowerCase()) {
7886            case "hex":
7887            case "utf8":
7888            case "utf-8":
7889            case "ascii":
7890            case "latin1":
7891            case "binary":
7892            case "base64":
7893            case "ucs2":
7894            case "ucs-2":
7895            case "utf16le":
7896            case "utf-16le":
7897              return true;
7898            default:
7899              return false;
7900          }
7901        }, c.concat = function(t3, e3) {
7902          if (!Array.isArray(t3)) throw new TypeError('"list" argument must be an Array of Buffers');
7903          if (0 === t3.length) return c.alloc(0);
7904          var r3;
7905          if (void 0 === e3) for (e3 = 0, r3 = 0; r3 < t3.length; ++r3) e3 += t3[r3].length;
7906          var n2 = c.allocUnsafe(e3), o2 = 0;
7907          for (r3 = 0; r3 < t3.length; ++r3) {
7908            var i2 = t3[r3];
7909            if (V(i2, Uint8Array)) o2 + i2.length > n2.length ? c.from(i2).copy(n2, o2) : Uint8Array.prototype.set.call(n2, i2, o2);
7910            else {
7911              if (!c.isBuffer(i2)) throw new TypeError('"list" argument must be an Array of Buffers');
7912              i2.copy(n2, o2);
7913            }
7914            o2 += i2.length;
7915          }
7916          return n2;
7917        }, c.byteLength = b, c.prototype._isBuffer = true, c.prototype.swap16 = function() {
7918          var t3 = this.length;
7919          if (t3 % 2 != 0) throw new RangeError("Buffer size must be a multiple of 16-bits");
7920          for (var e3 = 0; e3 < t3; e3 += 2) v(this, e3, e3 + 1);
7921          return this;
7922        }, c.prototype.swap32 = function() {
7923          var t3 = this.length;
7924          if (t3 % 4 != 0) throw new RangeError("Buffer size must be a multiple of 32-bits");
7925          for (var e3 = 0; e3 < t3; e3 += 4) v(this, e3, e3 + 3), v(this, e3 + 1, e3 + 2);
7926          return this;
7927        }, c.prototype.swap64 = function() {
7928          var t3 = this.length;
7929          if (t3 % 8 != 0) throw new RangeError("Buffer size must be a multiple of 64-bits");
7930          for (var e3 = 0; e3 < t3; e3 += 8) v(this, e3, e3 + 7), v(this, e3 + 1, e3 + 6), v(this, e3 + 2, e3 + 5), v(this, e3 + 3, e3 + 4);
7931          return this;
7932        }, c.prototype.toString = function() {
7933          var t3 = this.length;
7934          return 0 === t3 ? "" : 0 === arguments.length ? A(this, 0, t3) : m.apply(this, arguments);
7935        }
7935, c.prototype.toLocaleString = c.prototype.toString, c.prototype.equals = function(t3) {
7936          if (!c.isBuffer(t3)) throw new TypeError("Argument must be a Buffer");
7937          return this === t3 || 0 === c.compare(this, t3);
7938        }, c.prototype.inspect = function() {
7939          var t3 = "", r3 = e2.IS;
7940          return t3 = this.toString("hex", 0, r3).replace(/(.{2})/g, "$1 ").trim(), this.length > r3 && (t3 += " ... "), "<Buffer " + t3 + ">";
7941        }, s && (c.prototype[s] = c.prototype.inspect), c.prototype.compare = function(t3, e3, r3, o2, i2) {
7942          if (V(t3, Uint8Array) && (t3 = c.from(t3, t3.offset, t3.byteLength)), !c.isBuffer(t3)) throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + n(t3));
7943          if (void 0 === e3 && (e3 = 0), void 0 === r3 && (r3 = t3 ? t3.length : 0), void 0 === o2 && (o2 = 0), void 0 === i2 && (i2 = this.length), e3 < 0 || r3 > t3.length || o2 < 0 || i2 > this.length) throw new RangeError("out of range index");
7944          if (o2 >= i2 && e3 >= r3) return 0;
7945          if (o2 >= i2) return -1;
7946          if (e3 >= r3) return 1;
7947          if (this === t3) return 0;
7948          for (var s2 = (i2 >>>= 0) - (o2 >>>= 0), a2 = (r3 >>>= 0) - (e3 >>>= 0), u2 = Math.min(s2, a2), l2 = this.slice(o2, i2), f2 = t3.slice(e3, r3), p2 = 0; p2 < u2; ++p2) if (l2[p2] !== f2[p2]) {
7949            s2 = l2[p2], a2 = f2[p2];
7950            break;
7951          }
7952          return s2 < a2 ? -1 : a2 < s2 ? 1 : 0;
7953        }, c.prototype.includes = function(t3, e3, r3) {
7954          return -1 !== this.indexOf(t3, e3, r3);
7955        }, c.prototype.indexOf = function(t3, e3, r3) {
7956          return g(this, t3, e3, r3, true);
7957        }, c.prototype.lastIndexOf = function(t3, e3, r3) {
7958          return g(this, t3, e3, r3, false);
7959        }, c.prototype.write = function(t3, e3, r3, n2) {
7960          if (void 0 === e3) n2 = "utf8", r3 = this.length, e3 = 0;
7961          else if (void 0 === r3 && "string" == typeof e3) n2 = e3, r3 = this.length, e3 = 0;
7962          else {
7963            if (!isFinite(e3)) throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
7964            e3 >>>= 0, isFinite(r3) ? (r3 >>>= 0, void 0 === n2 && (n2 = "utf8")) : (n2 = r3, r3 = void 0);
7965          }
7966          var o2 = this.length - e3;
7967          if ((void 0 === r3 || r3 > o2) && (r3 = o2), t3.length > 0 && (r3 < 0 || e3 < 0) || e3 > this.length) throw new RangeError("Attempt to write outside buffer bounds");
7968          n2 || (n2 = "utf8");
7969          for (var i2 = false; ; ) switch (n2) {
7970            case "hex":
7971              return w(this, t3, e3, r3);
7972            case "utf8":
7973            case "utf-8":
7974              return O(this, t3, e3, r3);
7975            case "ascii":
7976            case "latin1":
7977            case "binary":
7978              return S(this, t3, e3, r3);
7979            case "base64":
7980              return $(this, t3, e3, r3);
7981            case "ucs2":
7982            case "ucs-2":
7983            case "utf16le":
7984            case "utf-16le":
7985              return j(this, t3, e3, r3);
7986            default:
7987              if (i2) throw new TypeError("Unknown encoding: " + n2);
7988              n2 = ("" + n2).toLowerCase(), i2 = true;
7989          }
7990        }, c.prototype.toJSON = function() {
7991          return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) };
7992        };
7993        var E = 4096;
7994        function x(t3, e3, r3) {
7995          var n2 = "";
7996          r3 = Math.min(t3.length, r3);
7997          for (var o2 = e3; o2 < r3; ++o2) n2 += String.fromCharCode(127 & t3[o2]);
7998          return n2;
7999        }
8000        function T(t3, e3, r3) {
8001          var n2 = "";
8002          r3 = Math.min(t3.length, r3);
8003          for (var o2 = e3; o2 < r3; ++o2) n2 += String.fromCharCode(t3[o2]);
8004          return n2;
8005        }
8006        function k(t3, e3, r3) {
8007          var n2 = t3.length;
8008          (!e3 || e3 < 0) && (e3 = 0), (!r3 || r3 < 0 || r3 > n2) && (r3 = n2);
8009          for (var o2 = "", i2 = e3; i2 < r3; ++i2) o2 += J[t3[i2]];
8010          return o2;
8011        }
8012        function N(t3, e3, r3) {
8013          for (var n2 = t3.slice(e3, r3), o2 = "", i2 = 0; i2 < n2.length - 1; i2 += 2) o2 += String.fromCharCode(n2[i2] + 256 * n2[i2 + 1]);
8014          return o2;
8015        }
8016        function I(t3, e3, r3) {
8017          if (t3 % 1 != 0 || t3 < 0) throw new RangeError("offset is not uint");
8018          if (t3 + e3 > r3) throw new RangeError("Trying to access beyond buffer length");
8019        }
8020        function B(t3, e3, r3, n2, o2, i2) {
8021          if (!c.isBuffer(t3)) throw new TypeError('"buffer" argument must be a Buffer instance');
8022          if (e3 > o2 || e3 < i2) throw new RangeError('"value" argument is out of bounds');
8023          if (r3 + n2 > t3.length) throw new RangeError("Index out of range");
8024        }
8025        function M(t3, e3, r3, n2, o2, i2) {
8026          if (r3 + n2 > t3.length) throw new RangeError("Index out of range");
8027          if (r3 < 0) throw new RangeError("Index out of range");
8028        }
8029        function D(t3, e3, r3, n2, o2) {
8030          return e3 = +e3, r3 >>>= 0, o2 || M(t3, 0, r3, 4), i.write(t3, e3, r3, n2, 23, 4), r3 + 4;
8031        }
8032        function R(t3, e3, r3, n2, o2) {
8033          return e3 = +e3, r3 >>>= 0, o2 || M(t3, 0, r3, 8), i.write(t3, e3, r3, n2, 52, 8), r3 + 8;
8034        }
8035        c.prototype.slice = function(t3, e3) {
8036          var r3 = this.length;
8037          (t3 = ~~t3) < 0 ? (t3 += r3) < 0 && (t3 = 0) : t3 > r3 && (t3 = r3), (e3 = void 0 === e3 ? r3 : ~~e3) < 0 ? (e3 += r3) < 0 && (e3 = 0) : e3 > r3 && (e3 = r3), e3 < t3 && (e3 = t3);
8038          var n2 = this.subarray(t3, e3);
8039          return Object.setPrototypeOf(n2, c.prototype), n2;
8040        }, c.prototype.readUintLE = c.prototype.readUIntLE = function(t3, e3, r3) {
8041          t3 >>>= 0, e3 >>>= 0, r3 || I(t3, e3, this.length);
8042          for (var n2 = this[t3], o2 = 1, i2 = 0; ++i2 < e3 && (o2 *= 256); ) n2 += this[t3 + i2] * o2;
8043          return n2;
8044        }, c.prototype.readUintBE = c.prototype.readUIntBE = function(t3, e3, r3) {
8045          t3 >>>= 0, e3 >>>= 0, r3 || I(t3, e3, this.length);
8046          for (var n2 = this[t3 + --e3], o2 = 1; e3 > 0 && (o2 *= 256); ) n2 += this[t3 + --e3] * o2;
8047          return n2;
8048        }, c.prototype.readUint8 = c.prototype.readUInt8 = function(t3, e3) {
8049          return t3 >>>= 0, e3 || I(t3, 1, this.length), this[t3];
8050        }
8050, c.prototype.readUint16LE = c.prototype.readUInt16LE = function(t3, e3) {
8051          return t3 >>>= 0, e3 || I(t3, 2, this.length), this[t3] | this[t3 + 1] << 8;
8052        }, c.prototype.readUint16BE = c.prototype.readUInt16BE = function(t3, e3) {
8053          return t3 >>>= 0, e3 || I(t3, 2, this.length), this[t3] << 8 | this[t3 + 1];
8054        }, c.prototype.readUint32LE = c.prototype.readUInt32LE = function(t3, e3) {
8055          return t3 >>>= 0, e3 || I(t3, 4, this.length), (this[t3] | this[t3 + 1] << 8 | this[t3 + 2] << 16) + 16777216 * this[t3 + 3];
8056        }, c.prototype.readUint32BE = c.prototype.readUInt32BE = function(t3, e3) {
8057          return t3 >>>= 0, e3 || I(t3, 4, this.length), 16777216 * this[t3] + (this[t3 + 1] << 16 | this[t3 + 2] << 8 | this[t3 + 3]);
8058        }, c.prototype.readIntLE = function(t3, e3, r3) {
8059          t3 >>>= 0, e3 >>>= 0, r3 || I(t3, e3, this.length);
8060          for (var n2 = this[t3], o2 = 1, i2 = 0; ++i2 < e3 && (o2 *= 256); ) n2 += this[t3 + i2] * o2;
8061          return n2 >= (o2 *= 128) && (n2 -= Math.pow(2, 8 * e3)), n2;
8062        }, c.prototype.readIntBE = function(t3, e3, r3) {
8063          t3 >>>= 0, e3 >>>= 0, r3 || I(t3, e3, this.length);
8064          for (var n2 = e3, o2 = 1, i2 = this[t3 + --n2]; n2 > 0 && (o2 *= 256); ) i2 += this[t3 + --n2] * o2;
8065          return i2 >= (o2 *= 128) && (i2 -= Math.pow(2, 8 * e3)), i2;
8066        }, c.prototype.readInt8 = function(t3, e3) {
8067          return t3 >>>= 0, e3 || I(t3, 1, this.length), 128 & this[t3] ? -1 * (255 - this[t3] + 1) : this[t3];
8068        }, c.prototype.readInt16LE = function(t3, e3) {
8069          t3 >>>= 0, e3 || I(t3, 2, this.length);
8070          var r3 = this[t3] | this[t3 + 1] << 8;
8071          return 32768 & r3 ? 4294901760 | r3 : r3;
8072        }, c.prototype.readInt16BE = function(t3, e3) {
8073          t3 >>>= 0, e3 || I(t3, 2, this.length);
8074          var r3 = this[t3 + 1] | this[t3] << 8;
8075          return 32768 & r3 ? 4294901760 | r3 : r3;
8076        }, c.prototype.readInt32LE = function(t3, e3) {
8077          return t3 >>>= 0, e3 || I(t3, 4, this.length), this[t3] | this[t3 + 1] << 8 | this[t3 + 2] << 16 | this[t3 + 3] << 24;
8078        }, c.prototype.readInt32BE = function(t3, e3) {
8079          return t3 >>>= 0, e3 || I(t3, 4, this.length), this[t3] << 24 | this[t3 + 1] << 16 | this[t3 + 2] << 8 | this[t3 + 3];
8080        }, c.prototype.readFloatLE = function(t3, e3) {
8081          return t3 >>>= 0, e3 || I(t3, 4, this.length), i.read(this, t3, true, 23, 4);
8082        }, c.prototype.readFloatBE = function(t3, e3) {
8083          return t3 >>>= 0, e3 || I(t3, 4, this.length), i.read(this, t3, false, 23, 4);
8084        }, c.prototype.readDoubleLE = function(t3, e3) {
8085          return t3 >>>= 0, e3 || I(t3, 8, this.length), i.read(this, t3, true, 52, 8);
8086        }, c.prototype.readDoubleBE = function(t3, e3) {
8087          return t3 >>>= 0, e3 || I(t3, 8, this.length), i.read(this, t3, false, 52, 8);
8088        }, c.prototype.writeUintLE = c.prototype.writeUIntLE = function(t3, e3, r3, n2) {
8089          t3 = +t3, e3 >>>= 0, r3 >>>= 0, n2 || B(this, t3, e3, r3, Math.pow(2, 8 * r3) - 1, 0);
8090          var o2 = 1, i2 = 0;
8091          for (this[e3] = 255 & t3; ++i2 < r3 && (o2 *= 256); ) this[e3 + i2] = t3 / o2 & 255;
8092          return e3 + r3;
8093        }, c.prototype.writeUintBE = c.prototype.writeUIntBE = function(t3, e3, r3, n2) {
8094          t3 = +t3, e3 >>>= 0, r3 >>>= 0, n2 || B(this, t3, e3, r3, Math.pow(2, 8 * r3) - 1, 0);
8095          var o2 = r3 - 1, i2 = 1;
8096          for (this[e3 + o2] = 255 & t3; --o2 >= 0 && (i2 *= 256); ) this[e3 + o2] = t3 / i2 & 255;
8097          return e3 + r3;
8098        }, c.prototype.writeUint8 = c.prototype.writeUInt8 = function(t3, e3, r3) {
8099          return t3 = +t3, e3 >>>= 0, r3 || B(this, t3, e3, 1, 255, 0), this[e3] = 255 & t3, e3 + 1;
8100        }, c.prototype.writeUint16LE = c.prototype.writeUInt16LE = function(t3, e3, r3) {
8101          return t3 = +t3, e3 >>>= 0, r3 || B(this, t3, e3, 2, 65535, 0), this[e3] = 255 & t3, this[e3 + 1] = t3 >>> 8, e3 + 2;
8102        }, c.prototype.writeUint16BE = c.prototype.writeUInt16BE = function(t3, e3, r3) {
8103          return t3 = +t3, e3 >>>= 0, r3 || B(this, t3, e3, 2, 65535, 0), this[e3] = t3 >>> 8, this[e3 + 1] = 255 & t3, e3 + 2;
8104        }, c.prototype.writeUint32LE = c.prototype.writeUInt32LE = function(t3, e3, r3) {
8105          return t3 = +t3, e3 >>>= 0, r3 || B(this, t3, e3, 4, 4294967295, 0), this[e3 + 3] = t3 >>> 24, this[e3 + 2] = t3 >>> 16, this[e3 + 1] = t3 >>> 8, this[e3] = 255 & t3, e3 + 4;
8106        }, c.prototype.writeUint32BE = c.prototype.writeUInt32BE = function(t3, e3, r3) {
8107          return t3 = +t3, e3 >>>= 0, r3 || B(this, t3, e3, 4, 4294967295, 0), this[e3] = t3 >>> 24, this[e3 + 1] = t3 >>> 16, this[e3 + 2] = t3 >>> 8, this[e3 + 3] = 255 & t3, e3 + 4;
8108        }, c.prototype.writeIntLE = function(t3, e3, r3, n2) {
8109          if (t3 = +t3, e3 >>>= 0, !n2) {
8110            var o2 = Math.pow(2, 8 * r3 - 1);
8111            B(this, t3, e3, r3, o2 - 1, -o2);
8112          }
8113          var i2 = 0, s2 = 1, a2 = 0;
8114          for (this[e3] = 255 & t3; ++i2 < r3 && (s2 *= 256); ) t3 < 0 && 0 === a2 && 0 !== this[e3 + i2 - 1] && (a2 = 1), this[e3 + i2] = (t3 / s2 | 0) - a2 & 255;
8115          return e3 + r3;
8116        }, c.prototype.writeIntBE = function(t3, e3, r3, n2) {
8117          if (t3 = +t3, e3 >>>= 0, !n2) {
8118            var o2 = Math.pow(2, 8 * r3 - 1);
8119            B(this, t3, e3, r3, o2 - 1, -o2);
8120          }
8121          var i2 = r3 - 1, s2 = 1, a2 = 0;
8122          for (this[e3 + i2] = 255 & t3; --i2 >= 0 && (s2 *= 256); ) t3 < 0 && 0 === a2 && 0 !== this[e3 + i2 + 1] && (a2 = 1), this[e3 + i2] = (t3 / s2 | 0) - a2 & 255;
8123          return e3 + r3;
8124        }, c.prototype.writeInt8 = function(t3, e3, r3) {
8125          return t3 = +t3, e3 >>>= 0, r3 || B(this, t3, e3, 1, 127, -128), t3 < 0 && (t3 = 255 + t3 + 1), this[e3] = 255 & t3, e3 + 1;
8126        }
8126, c.prototype.writeInt16LE = function(t3, e3, r3) {
8127          return t3 = +t3, e3 >>>= 0, r3 || B(this, t3, e3, 2, 32767, -32768), this[e3] = 255 & t3, this[e3 + 1] = t3 >>> 8, e3 + 2;
8128        }, c.prototype.writeInt16BE = function(t3, e3, r3) {
8129          return t3 = +t3, e3 >>>= 0, r3 || B(this, t3, e3, 2, 32767, -32768), this[e3] = t3 >>> 8, this[e3 + 1] = 255 & t3, e3 + 2;
8130        }, c.prototype.writeInt32LE = function(t3, e3, r3) {
8131          return t3 = +t3, e3 >>>= 0, r3 || B(this, t3, e3, 4, 2147483647, -2147483648), this[e3] = 255 & t3, this[e3 + 1] = t3 >>> 8, this[e3 + 2] = t3 >>> 16, this[e3 + 3] = t3 >>> 24, e3 + 4;
8132        }, c.prototype.writeInt32BE = function(t3, e3, r3) {
8133          return t3 = +t3, e3 >>>= 0, r3 || B(this, t3, e3, 4, 2147483647, -2147483648), t3 < 0 && (t3 = 4294967295 + t3 + 1), this[e3] = t3 >>> 24, this[e3 + 1] = t3 >>> 16, this[e3 + 2] = t3 >>> 8, this[e3 + 3] = 255 & t3, e3 + 4;
8134        }, c.prototype.writeFloatLE = function(t3, e3, r3) {
8135          return D(this, t3, e3, true, r3);
8136        }, c.prototype.writeFloatBE = function(t3, e3, r3) {
8137          return D(this, t3, e3, false, r3);
8138        }, c.prototype.writeDoubleLE = function(t3, e3, r3) {
8139          return R(this, t3, e3, true, r3);
8140        }, c.prototype.writeDoubleBE = function(t3, e3, r3) {
8141          return R(this, t3, e3, false, r3);
8142        }, c.prototype.copy = function(t3, e3, r3, n2) {
8143          if (!c.isBuffer(t3)) throw new TypeError("argument should be a Buffer");
8144          if (r3 || (r3 = 0), n2 || 0 === n2 || (n2 = this.length), e3 >= t3.length && (e3 = t3.length), e3 || (e3 = 0), n2 > 0 && n2 < r3 && (n2 = r3), n2 === r3) return 0;
8145          if (0 === t3.length || 0 === this.length) return 0;
8146          if (e3 < 0) throw new RangeError("targetStart out of bounds");
8147          if (r3 < 0 || r3 >= this.length) throw new RangeError("Index out of range");
8148          if (n2 < 0) throw new RangeError("sourceEnd out of bounds");
8149          n2 > this.length && (n2 = this.length), t3.length - e3 < n2 - r3 && (n2 = t3.length - e3 + r3);
8150          var o2 = n2 - r3;
8151          return this === t3 && "function" == typeof Uint8Array.prototype.copyWithin ? this.copyWithin(e3, r3, n2) : Uint8Array.prototype.set.call(t3, this.subarray(r3, n2), e3), o2;
8152        }, c.prototype.fill = function(t3, e3, r3, n2) {
8153          if ("string" == typeof t3) {
8154            if ("string" == typeof e3 ? (n2 = e3, e3 = 0, r3 = this.length) : "string" == typeof r3 && (n2 = r3, r3 = this.length), void 0 !== n2 && "string" != typeof n2) throw new TypeError("encoding must be a string");
8155            if ("string" == typeof n2 && !c.isEncoding(n2)) throw new TypeError("Unknown encoding: " + n2);
8156            if (1 === t3.length) {
8157              var o2 = t3.charCodeAt(0);
8158              ("utf8" === n2 && o2 < 128 || "latin1" === n2) && (t3 = o2);
8159            }
8160          } else "number" == typeof t3 ? t3 &= 255 : "boolean" == typeof t3 && (t3 = Number(t3));
8161          if (e3 < 0 || this.length < e3 || this.length < r3) throw new RangeError("Out of range index");
8162          if (r3 <= e3) return this;
8163          var i2;
8164          if (e3 >>>= 0, r3 = void 0 === r3 ? this.length : r3 >>> 0, t3 || (t3 = 0), "number" == typeof t3) for (i2 = e3; i2 < r3; ++i2) this[i2] = t3;
8165          else {
8166            var s2 = c.isBuffer(t3) ? t3 : c.from(t3, n2), a2 = s2.length;
8167            if (0 === a2) throw new TypeError('The value "' + t3 + '" is invalid for argument "value"');
8168            for (i2 = 0; i2 < r3 - e3; ++i2) this[i2 + e3] = s2[i2 % a2];
8169          }
8170          return this;
8171        };
8172        var U = /[^+/0-9A-Za-z-_]/g;
8173        function C(t3, e3) {
8174          var r3;
8175          e3 = e3 || 1 / 0;
8176          for (var n2 = t3.length, o2 = null, i2 = [], s2 = 0; s2 < n2; ++s2) {
8177            if ((r3 = t3.charCodeAt(s2)) > 55295 && r3 < 57344) {
8178              if (!o2) {
8179                if (r3 > 56319) {
8180                  (e3 -= 3) > -1 && i2.push(239, 191, 189);
8181                  continue;
8182                }
8183                if (s2 + 1 === n2) {
8184                  (e3 -= 3) > -1 && i2.push(239, 191, 189);
8185                  continue;
8186                }
8187                o2 = r3;
8188                continue;
8189              }
8190              if (r3 < 56320) {
8191                (e3 -= 3) > -1 && i2.push(239, 191, 189), o2 = r3;
8192                continue;
8193              }
8194              r3 = 65536 + (o2 - 55296 << 10 | r3 - 56320);
8195            } else o2 && (e3 -= 3) > -1 && i2.push(239, 191, 189);
8196            if (o2 = null, r3 < 128) {
8197              if ((e3 -= 1) < 0) break;
8198              i2.push(r3);
8199            } else if (r3 < 2048) {
8200              if ((e3 -= 2) < 0) break;
8201              i2.push(r3 >>
8201 6 | 192, 63 & r3 | 128);
8202            } else if (r3 < 65536) {
8203              if ((e3 -= 3) < 0) break;
8204              i2.push(r3 >> 12 | 224, r3 >> 6 & 63 | 128, 63 & r3 | 128);
8205            } else {
8206              if (!(r3 < 1114112)) throw new Error("Invalid code point");
8207              if ((e3 -= 4) < 0) break;
8208              i2.push(r3 >> 18 | 240, r3 >> 12 & 63 | 128, r3 >> 6 & 63 | 128, 63 & r3 | 128);
8209            }
8210          }
8211          return i2;
8212        }
8213        function F(t3) {
8214          return o.toByteArray((function(t4) {
8215            if ((t4 = (t4 = t4.split("=")[0]).trim().replace(U, "")).length < 2) return "";
8216            for (; t4.length % 4 != 0; ) t4 += "=";
8217            return t4;
8218          })(t3));
8219        }
8220        function L(t3, e3, r3, n2) {
8221          for (var o2 = 0; o2 < n2 && !(o2 + r3 >= e3.length || o2 >= t3.length); ++o2) e3[o2 + r3] = t3[o2];
8222          return o2;
8223        }
8224        function V(t3, e3) {
8225          return t3 instanceof e3 || null != t3 && null != t3.constructor && null != t3.constructor.name && t3.constructor.name === e3.name;
8226        }
8227        function q(t3) {
8228          return t3 != t3;
8229        }
8230        var J = (function() {
8231          for (var t3 = "0123456789abcdef", e3 = new Array(256), r3 = 0; r3 < 16; ++r3) for (var n2 = 16 * r3, o2 = 0; o2 < 16; ++o2) e3[n2 + o2] = t3[r3] + t3[o2];
8232          return e3;
8233        })();
8234      }, 5889: (t2, e2, r2) => {
8235        function n(t3, e3) {
8236          var r3 = "undefined" != typeof Symbol && t3[Symbol.iterator] || t3["@@iterator"];
8237          if (!r3) {
8238            if (Array.isArray(t3) || (r3 = o(t3)) || e3) {
8239              r3 && (t3 = r3);
8240              var n2 = 0, i2 = function() {
8241              };
8242              return { s: i2, n: function() {
8243                return n2 >= t3.length ? { done: true } : { done: false, value: t3[n2++] };
8244              }, e: function(t4) {
8245                throw t4;
8246              }, f: i2 };
8247            }
8248            throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
8249          }
8250          var s2, a2 = true, u2 = false;
8251          return { s: function() {
8252            r3 = r3.call(t3);
8253          }, n: function() {
8254            var t4 = r3.next();
8255            return a2 = t4.done, t4;
8256          }, e: function(t4) {
8257            u2 = true, s2 = t4;
8258          }, f: function() {
8259            try {
8260              a2 || null == r3.return || r3.return();
8261            } finally {
8262              if (u2) throw s2;
8263            }
8264          } };
8265        }
8266        function o(t3, e3) {
8267          if (t3) {
8268            if ("string" == typeof t3) return i(t3, e3);
8269            var r3 = {}.toString.call(t3).slice(8, -1);
8270            return "Object" === r3 && t3.constructor && (r3 = t3.constructor.name), "Map" === r3 || "Set" === r3 ? Array.from(t3) : "Arguments" === r3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r3) ? i(t3, e3) : void 0;
8271          }
8272        }
8273        function i(t3, e3) {
8274          (null == e3 || e3 > t3.length) && (e3 = t3.length);
8275          for (var r3 = 0, n2 = Array(e3); r3 < e3; r3++) n2[r3] = t3[r3];
8276          return n2;
8277        }
8278        var s = r2(7930).arrayAtomicsSymbol, a = r2(7930).sessionNewDocuments, u = r2(8768);
8279        function c(t3, e3) {
8280          return t3 = t3 || {}, null != e3.$pullAll && (t3.$pullAll = (t3.$pullAll || []).concat(e3.$pullAll)), null != e3.$push && (t3.$push = t3.$push || {}, t3.$push.$each = (t3.$push.$each || []).concat(e3.$push.$each)), null != e3.$addToSet && (t3.$addToSet = (t3.$addToSet || []).concat(e3.$addToSet)), null != e3.$set && (t3.$set = Array.isArray(e3.$set) ? (function(t4) {
8281            if (Array.isArray(t4)) return i(t4);
8282          })(r3 = e3.$set) || (function(t4) {
8283            if ("undefined" != typeof Symbol && null != t4[Symbol.iterator] || null != t4["@@iterator"]) return Array.from(t4);
8284          })(r3) || o(r3) || (function() {
8285            throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
8286          })() : Object.assign({}, e3.$set)), t3;
8287          var r3;
8288        }
8289        t2.exports = function(t3) {
8290          t3.pre("save", function() {
8291            var t4 = this.$session();
8292            if (null != t4 && null != t4.transaction && null != t4[a] && !t4[a].has(this)) {
8293              var e3 = {};
8294              this.isNew && (e3.isNew = true), this.$__schema.options.versionKey && (e3.versionKey = this.get(this.$__schema.options.versionKey)), e3.modifiedPaths = new Set(Object.keys(this.$__.activePaths.getStatePaths("modify"))), e3.atomics = (function(t5, e4) {
8295                var r3 = /* @__PURE__ */ new Map();
8296                e4 = e4 || /* @__PURE__ */ new Map();
8297                var o2, i2 = n(Object.keys(t5.$__.activePaths.init).concat(Object.keys(t5.$__.activePaths.modify)));
8298                try {
8299                  for (i2.s(); !(o2 = i2.n()).done; ) {
8300                    var a2 = o2.value, l = t5.$__getValue(a2);
8301                    if (null != l && Array.isArray(l) && u.isMongooseDocumentArray(l) && l.length && null != l[s] && 0 !== Object.keys(l[s]).length) {
8302                      var f = e4.get(a2) || {};
8303                      r3.set(a2, c(f, l[s]));
8304                    }
8305                  }
8306                } catch (t6) {
8307                  i2.e(t6);
8308                } finally {
8309                  i2.f();
8310                }
8311                var p, h = n(t5.$__dirty());
8312                try {
8313                  for (h.s(); !(p = h.n()).done; ) {
8314                    var y = p.value, d = y.path, b = y.value;
8315                    if (null != b && null != b[s] && 0 !== Object.keys(b[s]).length) {
8316                      var m = e4.get(d) || {};
8317                      r3.set(d, c(m, b[s]));
8318                    }
8319                  }
8320                } catch (t6) {
8321                  h.e(t6);
8322                } finally {
8323                  h.f();
8324                }
8325                return r3;
8326              })(this), t4[a].set(this, e3);
8327            }
8328          });
8329        };
8330      }, 5899: (t2, e2, r2) => {
8331        function n(t3) {
8332          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
8333            return typeof t4;
8334          } : function(t4) {
8335            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
8336          }, n(t3);
8337        }
8338        var o = r2(953)(), i = r2(3071)("Object.prototype.toString"), s = function(t3) {
8339          return !(o && t3 && "object" === n(t3) && Symbol.toStringTag in t3) && "[object Arguments]" === i(t3);
8340        }, a = function(t3) {
8341          return !!s(t3) || null !== t3 && "object" === n(t3) && "length" in t3 && "number" == typeof t3.length && t3.length >= 0 && "[object Array]" !== i(t3) && "callee" in t3 && "[object Function]" === i(t3.callee);
8342        }, u = (function() {
8343          return s(arguments);
8344        })();
8345        s.isLegacyArguments = a, t2.exports = u ? s : a;
8346      }, 5994: (t2, e2, r2) => {
8347        var n = Function.prototype.call, o = Object.prototype.hasOwnProperty, i = r2(2354);
8348        t2.exports = i.call(n, o);
8349      }, 6062: (t2, e2, r2) => {
8350        var n = r2(9122), o = r2(2273), i = r2(118), s = r2(4183), a = r2(7878), u = n(s(), Number);
8351        o(u, { getPolyfill: s, implementation: i, shim: a }), t2.exports = u;
8352      }, 6140: (t2) => {
8353        function n(t3, e2, n2) {
8354          return Object.defineProperty(t3, "prototype", { writable: false }), t3;
8355        }
8356        t2.exports = n(function t3(e2, r2, n2) {
8357          !(function(t4, e3) {
8358            if (!(t4 instanceof e3)) throw new TypeError("Cannot call a class as a function");
8359          })(this, t3), this.subdocSnapshot = e2, this.activePaths = r2, this.version = n2;
8360        });
8361      }, 6155: (t2) => {
8362        function e2(t3) {
8363          return e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
8364            return typeof t4;
8365          } : function(t4) {
8366            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
8367          }, e2(t3);
8368        }
8369        t2.exports = function(t3) {
8370          for (var r2 = Object.keys(t3), n = true, o = 0, i = r2.length; o < i; ++o) if ("object" === e2(t3[r2[o]]) && null !== t3[r2[o]]) {
8371            n = false;
8372            break;
8373          }
8374          return n;
8375        };
8376      }, 6182: (t2) => {
8377        function e2(t3, e3) {
8378          if (null == t3) throw new TypeError("Cannot convert first argument to object");
8379          for (var r2 = Object(t3), n = 1; n < arguments.length; n++) {
8380            var o = arguments[n];
8381            if (null != o) for (var i = Object.keys(Object(o)), s = 0, a = i.length; s < a; s++) {
8382              var u = i[s], c = Object.getOwnPropertyDescriptor(o, u);
8383              void 0 !== c && c.enumerable && (r2[u] = o[u]);
8384            }
8385          }
8386          return r2;
8387        }
8388        t2.exports = { assign: e2, polyfill: function() {
8389          Object.assign || Object.defineProperty(Object, "assign", { enumerable: false, configurable: true, writable: true, value: e2 });
8390        } };
8391      }, 6193: (t2, e2, r2) => {
8392        function n(t3) {
8393          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
8394            return typeof t4;
8395          } : function(t4) {
8396            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
8397          }, n(t3);
8398        }
8399        function o(t3, e3) {
8400          return (function(t4) {
8401            if (Array.isArray(t4)) return t4;
8402          })(t3) || (function(t4, e4) {
8403            var r3 = [], n2 = true, o2 = false, i2 = void 0;
8404            try {
8405              for (var s2, a2 = t4[Symbol.iterator](); !(n2 = (s2 = a2.next()).done) && (r3.push(s2.value), !e4 || r3.length !== e4); n2 = true) ;
8406            } catch (t5) {
8407              o2 = true, i2 = t5;
8408            } finally {
8409              try {
8410                n2 || null == a2.return || a2.return();
8411              } finally {
8412                if (o2) throw i2;
8413              }
8414            }
8415            return r3;
8416          })(t3, e3) || (function() {
8417            throw new TypeError("Invalid attempt to destructure non-iterable instance");
8418          })();
8419        }
8420        function i(t3) {
8421          return i = "function" == typeof Symbol && "symbol" === n(Symbol.iterator) ? function(t4) {
8422            return n(t4);
8423          } : function(t4) {
8424            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : n(t4);
8425          }, i(t3);
8426        }
8427        var s = void 0 !== /a/g.flags, a = function(t3) {
8428          var e3 = [];
8429          return t3.forEach(function(t4) {
8430            return e3.push(t4);
8431          }), e3;
8432        }, u = function(t3) {
8433          var e3 = [];
8434          return t3.forEach(function(t4, r3) {
8435            return e3.push([r3, t4]);
8436          }), e3;
8437        }, c = Object.is ? Object.is : r2(2064), l = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols : function() {
8438          return [];
8439        }, f = Number.isNaN ? Number.isNaN : r2(6062);
8440        function p(t3) {
8441          return t3.call.bind(t3);
8442        }
8443        var h = p(Object.prototype.hasOwnProperty), y = p(Object.prototype.propertyIsEnumerable), d = p(Object.prototype.toString), b = r2(7352).types, m = b.isAnyArrayBuffer, v = b.isArrayBufferView, g = b.isDate, _ = b.isMap, w = b.isRegExp, O = b.isSet, S = b.isNativeError, $ = b.isBoxedPrimitive, j = b.isNumberObject, P = b.isStringObject, A = b.isBooleanObject, E = b.isBigIntObject, x = b.isSymbolObject, T = b.isFloat32Array, k = b.isFloat64Array;
8444        function N(t3) {
8445          if (0 === t3.length || t3.length > 10) return true;
8446          for (var e3 = 0; e3 < t3.length; e3++) {
8447            var r3 = t3.charCodeAt(e3);
8448            if (r3 < 48 || r3 > 57) return true;
8449          }
8450          return 10 === t3.length && t3 >= Math.pow(2, 32);
8451        }
8452        function I(t3) {
8453          return Object.keys(t3).filter(N).concat(l(t3).filter(Object.prototype.propertyIsEnumerable.bind(t3)));
8454        }
8455        function B(t3, e3) {
8456          if (t3 === e3) return 0;
8457          for (var r3 = t3.length, n2 = e3.length, o2 = 0, i2 = Math.min(r3, n2); o2 < i2; ++o2) if (t3[o2] !== e3[o2]) {
8458            r3 = t3[o2], n2 = e3[o2];
8459            break;
8460          }
8461          return r3 < n2 ? -1 : n2 < r3 ? 1 : 0;
8462        }
8463        function M(t3, e3, r3, n2) {
8464          if (t3 === e3) return 0 !== t3 || !r3 || c(t3, e3);
8465          if (r3) {
8466            if ("object" !== i(t3)) return "number" == typeof t3 && f(t3) && f(e3);
8467            if ("object" !== i(e3) || null === t3 || null === e3) return false;
8468            if (Object.getPrototypeOf(t3) !== Object.getPrototypeOf(e3)) return false;
8469          } else {
8470            if (null === t3 || "object" !== i(t3)) return (null === e3 || "object" !== i(e3)) && t3 == e3;
8471            if (null === e3 || "object" !== i(e3)) return false;
8472          }
8473          var o2, a2, u2, l2, p2 = d(t3);
8474          if (p2 !== d(e3)) return false;
8475          if (Array.isArray(t3)) {
8476            if (t3.length !== e3.length) return false;
8477            var h2 = I(t3), y2 = I(e3);
8478            return h2.length === y2.length && R(t3, e3, r3, n2, 1, h2);
8479          }
8480          if ("[object Object]" === p2 && (!_(t3) && _(e3) || !O(t3) && O(e3))) return false;
8481          if (g(t3)) {
8482            if (!g(e3) || Date.prototype.getTime.call(t3) !== Date.prototype.getTime.call(e3)) return false;
8483          } else if (w(t3)) {
8484            if (!w(e3) || (u2 = t3, l2 = e3, !(s ? u2.source === l2.source && u2.flags === l2.flags : RegExp.prototype.toString.call(u2) === RegExp.prototype.toString.call(l2)))) return false;
8485          } else if (S(t3) || t3 instanceof Error) {
8486            if (t3.message !== e3.message || t3.name !== e3.name) return false;
8487          } else {
8488            if (v(t3)) {
8489              if (r3 || !T(t3) && !k(t3)) {
8490                if (!(function(t4, e4) {
8491                  return t4.byteLength === e4.byteLength && 0 === B(new Uint8Array(t4.buffer, t4.byteOffset, t4.byteLength), new Uint8Array(e4.buffer, e4.byteOffset, e4.byteLength));
8492                })(t3, e3)) return false;
8493              } else if (!(function(t4, e4) {
8494                if (t4.byteLength !== e4.byteLength) return false;
8495                for (var r4 = 0; r4 < t4.byteLength; r4++) if (t4[r4] !== e4[r4]) return false;
8496                return true;
8497              })(t3, e3)) return false;
8498              var b2 = I(t3), N2 = I(e3);
8499              return b2.length === N2.length && R(t3, e3, r3, n2, 0, b2);
8500            }
8501            if (O(t3)) return !(!O(e3) || t3.size !== e3.size) && R(t3, e3, r3, n2, 2);
8502            if (_(t3)) return !(!_(e3) || t3.size !== e3.size) && R(t3, e3, r3, n2, 3);
8503            if (m(t3)) {
8504              if (a2 = e3, (o2 = t3).byteLength !== a2.byteLength || 0 !== B(new Uint8Array(o2), new Uint8Array(a2))) return false;
8505            } else if ($(t3) && !(function(t4, e4) {
8506              return j(t4) ? j(e4) && c(Number.prototype.valueOf.call(t4), Number.prototype.valueOf.call(e4)) : P(t4) ? P(e4) && String.prototype.valueOf.call(t4) === String.prototype.valueOf.call(e4) : A(t4) ? A(e4) && Boolean.prototype.valueOf.call(t4) === Boolean.prototype.valueOf.call(e4) : E(t4) ? E(e4) && BigInt.prototype.valueOf.call(t4) === BigInt.prototype.valueOf.call(e4) : x(e4) && Symbol.prototype.valueOf.call(t4) === Symbol.prototype.valueOf.call(e4);
8507            })(t3, e3)) return false;
8508          }
8509          return R(t3, e3, r3, n2, 0);
8510        }
8511        function D(t3, e3) {
8512          return e3.filter(function(e4) {
8513            return y(t3, e4);
8514          });
8515        }
8516        function R(t3, e3, r3, n2, s2, c2) {
8517          if (5 === arguments.length) {
8518            c2 = Object.keys(t3);
8519            var f2 = Object.keys(e3);
8520            if (c2.length !== f2.length) return false;
8521          }
8522          for (var p2 = 0; p2 < c2.length; p2++) if (!h(e3, c2[p2])) return false;
8523          if (r3 && 5 === arguments.length) {
8524            var d2 = l(t3);
8525            if (0 !== d2.length) {
8526              var b2 = 0;
8527              for (p2 = 0; p2 < d2.length; p2++) {
8528                var m2 = d2[p2];
8529                if (y(t3, m2)) {
8530                  if (!y(e3, m2)) return false;
8531                  c2.push(m2), b2++;
8532                } else if (y(e3, m2)) return false;
8533              }
8534              var v2 = l(e3);
8535              if (d2.length !== v2.length && D(e3, v2).length !== b2) return false;
8536            } else {
8537              var g2 = l(e3);
8538              if (0 !== g2.length && 0 !== D(e3, g2).length) return false;
8539            }
8540          }
8541          if (0 === c2.length && (0 === s2 || 1 === s2 && 0 === t3.length || 0 === t3.size)) return true;
8542          if (void 0 === n2) n2 = { val1: /* @__PURE__ */ new Map(), val2: /* @__PURE__ */ new Map(), position: 0 };
8543          else {
8544            var _2 = n2.val1.get(t3);
8545            if (void 0 !== _2) {
8546              var w2 = n2.val2.get(e3);
8547              if (void 0 !== w2) return _2 === w2;
8548            }
8549            n2.position++;
8550          }
8551          n2.val1.set(t3, n2.position), n2.val2.set(e3, n2.position);
8552          var O2 = (function(t4, e4, r4, n3, s3, c3) {
8553            var l2 = 0;
8554            if (2 === c3) {
8555              if (!(function(t5, e5, r5, n4) {
8556                for (var o2 = null, s4 = a(t5), u2 = 0; u2 < s4.length; u2++) {
8557                  var c4 = s4[u2];
8558                  if ("object" === i(c4) && null !== c4) null === o2 && (o2 = /* @__PURE__ */ new Set()), o2.add(c4);
8559                  else if (!e5.has(c4)) {
8560                    if (r5) return false;
8561                    if (!F(t5, e5, c4)) return false;
8562                    null === o2 && (o2 = /* @__PURE__ */ new Set()), o2.add(c4);
8563                  }
8564                }
8565                if (null !== o2) {
8566                  for (var l3 = a(e5), f4 = 0; f4 < l3.length; f4++) {
8567                    var p4 = l3[f4];
8568                    if ("object" === i(p4) && null !== p4) {
8569                      if (!U(o2, p4, r5, n4)) return false;
8570                    } else if (!r5 && !t5.has(p4) && !U(o2, p4, r5, n4)) return false;
8571                  }
8572                  return 0 === o2.size;
8573                }
8574                return true;
8575              })(t4, e4, r4, s3)) return false;
8576            } else if (3 === c3) {
8577              if (!(function(t5, e5, r5, n4) {
8578                for (var s4 = null, a2 = u(t5), c4 = 0; c4 < a2.length; c4++) {
8579                  var l3 = o(a2[c4], 2), f4 = l3[0], p4 = l3[1];
8580                  if ("object" === i(f4) && null !== f4) null === s4 && (s4 = /* @__PURE__ */ new Set()), s4.add(f4);
8581                  else {
8582                    var h2 = e5.get(f4);
8583                    if (void 0 === h2 && !e5.has(f4) || !M(p4, h2, r5, n4)) {
8584                      if (r5) return false;
8585                      if (!L(t5, e5, f4, p4, n4)) return false;
8586                      null === s4 && (s4 = /* @__PURE__ */ new Set()), s4.add(f4);
8587                    }
8588                  }
8589                }
8590                if (null !== s4) {
8591                  for (var y3 = u(e5), d3 = 0; d3 < y3.length; d3++) {
8592                    var b3 = o(y3[d3], 2), m3 = (f4 = b3[0], b3[1]);
8593                    if ("object" === i(f4) && null !== f4) {
8594                      if (!V(s4, t5, f4, m3, r5, n4)) return false;
8595                    } else if (!(r5 || t5.has(f4) && M(t5.get(f4), m3, false, n4) || V(s4, t5, f4, m3, false, n4))) return false;
8596                  }
8597                  return 0 === s4.size;
8598                }
8599                return true;
8600              })(t4, e4, r4, s3)) return false;
8601            } else if (1 === c3) for (; l2 < t4.length; l2++) {
8602              if (!h(t4, l2)) {
8603                if (h(e4, l2)) return false;
8604                for (var f3 = Object.keys(t4); l2 < f3.length; l2++) {
8605                  var p3 = f3[l2];
8606                  if (!h(e4, p3) || !M(t4[p3], e4[p3], r4, s3)) return false;
8607                }
8608                return f3.length === Object.keys(e4).length;
8609              }
8610              if (!h(e4, l2) || !M(t4[l2], e4[l2], r4, s3)) return false;
8611            }
8612            for (l2 = 0; l2 < n3.length; l2++) {
8613              var y2 = n3[l2];
8614              if (!M(t4[y2], e4[y2], r4, s3)) return false;
8615            }
8616            return true;
8617          })(t3, e3, r3, c2, n2, s2);
8618          return n2.val1.delete(t3), n2.val2.delete(e3), O2;
8619        }
8620        function U(t3, e3, r3, n2) {
8621          for (var o2 = a(t3), i2 = 0; i2 < o2.length; i2++) {
8622            var s2 = o2[i2];
8623            if (M(e3, s2, r3, n2)) return t3.delete(s2), true;
8624          }
8625          return false;
8626        }
8627        function C(t3) {
8628          switch (i(t3)) {
8629            case "undefined":
8630              return null;
8631            case "object":
8632              return;
8633            case "symbol":
8634              return false;
8635            case "string":
8636              t3 = +t3;
8637            case "number":
8638              if (f(t3)) return false;
8639          }
8640          return true;
8641        }
8642        function F(t3, e3, r3) {
8643          var n2 = C(r3);
8644          return null != n2 ? n2 : e3.has(n2) && !t3.has(n2);
8645        }
8646        function L(t3, e3, r3, n2, o2) {
8647          var i2 = C(r3);
8648          if (null != i2) return i2;
8649          var s2 = e3.get(i2);
8650          return !(void 0 === s2 && !e3.has(i2) || !M(n2, s2, false, o2)) && !t3.has(i2) && M(n2, s2, false, o2);
8651        }
8652        function V(t3, e3, r3, n2, o2, i2) {
8653          for (var s2 = a(t3), u2 = 0; u2 < s2.length; u2++) {
8654            var c2 = s2[u2];
8655            if (M(r3, c2, o2, i2) && M(n2, e3.get(c2), o2, i2)) return t3.delete(c2), true;
8656          }
8657          return false;
8658        }
8659        t2.exports = { isDeepEqual: function(t3, e3) {
8660          return M(t3, e3, false);
8661        }, isDeepStrictEqual: function(t3, e3) {
8662          return M(t3, e3, true);
8663        } };
8664      }, 6223: (t2) => {
8665        var e2 = /\./g;
8666        t2.exports = function(t3) {
8667          if (-1 === t3.indexOf(".")) return [t3];
8668          for (var r2 = t3.split(e2), n = r2.length, o = new Array(n), i = "", s = 0; s < n; ++s) i += 0 !== i.length ? "." + r2[s] : r2[s], o[s] = i;
8669          return o;
8670        };
8671      }, 6312: (t2) => {
8672        function e2(t3) {
8673          return e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
8674            return typeof t4;
8675          } : function(t4) {
8676            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
8677          }, e2(t3);
8678        }
8679        var r2 = Object.prototype.toString;
8680        t2.exports = function(t3) {
8681          var n = r2.call(t3), o = "[object Arguments]" === n;
8682          return o || (o = "[object Array]" !== n && null !== t3 && "object" === e2(t3) && "number" == typeof t3.length && t3.length >= 0 && "[object Function]" === r2.call(t3.callee)), o;
8683        };
8684      }, 6353: (t2, e2, r2) => {
8685        var _a;
8686        r2.r(e2), r2.d(e2, { BSON: () => ze, BSONError: () => q, BSONOffsetError: () => K, BSONRegExp: () => Ht, BSONRuntimeError: () => z, BSONSymbol: () => Wt, BSONType: () => V, BSONValue: () => nt, BSONVersionError: () => J, Binary: () => ut, Code: () => ht, DBRef: () => dt, Decimal128: () => Rt, Double: () => Ut, EJSON: () => Ie, Int32: () => Ct, Long: () => $t, MaxKey: () => Ft, MinKey: () => Lt, ObjectId: () => Jt, Timestamp: () => Qt, UUID: () => pt, calculateObjectSize: () => qe, deserialize: () => Ve, deserializeStream: () => Je, onDemand: () => De, serialize: () => Fe, serializeWithBufferAndIndex: () => Le, setInternalBufferSize: () => Ce });
8687        var n = r2(5832).hp;
8688        const o = (() => {
8689          const t3 = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype), Symbol.toStringTag).get;
8690          return (e3) => t3.call(e3);
8691        })();
8692        function i(t3) {
8693          return "Uint8Array" === o(t3);
8694        }
8695        function s(t3) {
8696          return "object" == typeof t3 && null != t3 && Symbol.toStringTag in t3 && ("ArrayBuffer" === t3[Symbol.toStringTag] || "SharedArrayBuffer" === t3[Symbol.toStringTag]);
8697        }
8698        function a(t3) {
8699          return t3 instanceof RegExp || "[object RegExp]" === Object.prototype.toString.call(t3);
8700        }
8701        function u(t3) {
8702          return "object" == typeof t3 && null != t3 && Symbol.toStringTag in t3 && "Map" === t3[Symbol.toStringTag];
8703        }
8704        function c(t3) {
8705          return t3 instanceof Date || "[object Date]" === Object.prototype.toString.call(t3);
8706        }
8707        function l(t3, e3) {
8708          return JSON.stringify(t3, (t4, e4) => "bigint" == typeof e4 ? { $numberLong: `${e4}` } : u(e4) ? Object.fromEntries(e4) : e4);
8709        }
8710        const f = 6, p = Symbol.for("@@mdb.bson.version"), h = 2147483647, y = -2147483648, d = Math.pow(2, 63) - 1, b = -Math.pow(2, 63), m = Math.pow(2, 53), v = -Math.pow(2, 53), g = 1, _ = 2, w = 3, O = 4, S = 5, $ = 6, j = 7, P = 8, A = 9, E = 10, x = 11, T = 12, k = 13, N = 14, I = 15, B = 16, M = 17, D = 18, R = 19, U = 255, C = 127, F = 0, L = 4, V = 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 });
8711        class q extends Error {
8712          get bsonError() {
8713            return true;
8714          }
8715          get name() {
8716            return "BSONError";
8717          }
8718          constructor(t3, e3) {
8719            super(t3, e3);
8720          }
8721          static isBSONError(t3) {
8722            return null != t3 && "object" == typeof t3 && "bsonError" in t3 && true === t3.bsonError && "name" in t3 && "message" in t3 && "stack" in t3;
8723          }
8724        }
8725        class J extends q {
8726          get name() {
8727            return "BSONVersionError";
8728          }
8729          constructor() {
8730            super(`Unsupported BSON version, bson types must be from bson ${f}.x.x`);
8731          }
8732        }
8733        class z extends q {
8734          get name() {
8735            return "BSONRuntimeError";
8736          }
8737          constructor(t3) {
8738            super(t3);
8739          }
8740        }
8741        class K extends q {
8742          get name() {
8743            return "BSONOffsetError";
8744          }
8745          constructor(t3, e3, r3) {
8746            super(`${t3}. offset: ${e3}`, r3), this.offset = e3;
8747          }
8748        }
8749        let H, W;
8750        function G(t3, e3, r3, n2) {
8751          if (n2) {
8752            H ?? (H = new TextDecoder("utf8", { fatal: true }));
8753            try {
8754              return H.decode(t3.subarray(e3, r3));
8755            } catch (t4) {
8756              throw new q("Invalid UTF-8 string in BSON document", { cause: t4 });
8757            }
8758          }
8759          return W ?? (W = new TextDecoder("utf8", { fatal: false })), W.decode(t3.subarray(e3, r3));
8760        }
8761        function Q(t3, e3, r3) {
8762          if (0 === t3.length) return "";
8763          const n2 = r3 - e3;
8764          if (0 === n2) return "";
8765          if (n2 > 20) return null;
8766          if (1 === n2 && t3[e3] < 128) return String.fromCharCode(t3[e3]);
8767          if (2 === n2 && t3[e3] < 128 && t3[e3 + 1] < 128) return String.fromCharCode(t3[e3]) + String.fromCharCode(t3[e3 + 1]);
8768          if (3 === n2 && t3[e3] < 128 && t3[e3 + 1] < 128 && t3[e3 + 2] < 128) return String.fromCharCode(t3[e3]) + String.fromCharCode(t3[e3 + 1]) + String.fromCharCode(t3[e3 + 2]);
8769          const o2 = [];
8770          for (let n3 = e3; n3 < r3; n3++) {
8771            const e4 = t3[n3];
8772            if (e4 > 127) return null;
8773            o2.push(e4);
8774          }
8775          return String.fromCharCode(...o2);
8776        }
8777        const Y = { toLocalBufferType(t3) {
8778          if (n.isBuffer(t3)) return t3;
8779          if (ArrayBuffer.isView(t3)) return n.from(t3.buffer, t3.byteOffset, t3.byteLength);
8780          const e3 = (t3 == null ? void 0 : t3[Symbol.toStringTag]) ?? Object.prototype.toString.call(t3);
8781          if ("ArrayBuffer" === e3 || "SharedArrayBuffer" === e3 || "[object ArrayBuffer]" === e3 || "[object SharedArrayBuffer]" === e3) return n.from(t3);
8782          throw new q("Cannot create Buffer from the passed potentialBuffer.");
8783        }, allocate: (t3) => n.alloc(t3), allocateUnsafe: (t3) => n.allocUnsafe(t3), equals: (t3, e3) => Y.toLocalBufferType(t3).equals(e3), fromNumberArray: (t3) => n.from(t3), fromBase64: (t3) => n.from(t3, "base64"), toBase64: (t3) => Y.toLocalBufferType(t3).toString("base64"), fromISO88591: (t3) => n.from(t3, "binary"), toISO88591: (t3) => Y.toLocalBufferType(t3).toString("binary"), fromHex: (t3) => n.from(t3, "hex"), toHex: (t3) => Y.toLocalBufferType(t3).toString("hex"), toUTF8(t3, e3, r3, n2) {
8784          const o2 = r3 - e3 <= 20 ? Q(t3, e3, r3) : null;
8785          if (null != o2) return o2;
8786          const i2 = Y.toLocalBufferType(t3).toString("utf8", e3, r3);
8787          if (n2) {
8788            for (let n3 = 0; n3 < i2.length; n3++) if (65533 === i2.charCodeAt(n3)) {
8789              G(t3, e3, r3, true);
8790              break;
8791            }
8792          }
8793          return i2;
8794        }, utf8ByteLength: (t3) => n.byteLength(t3, "utf8"), encodeUTF8Into(t3, e3, r3) {
8795          const n2 = (function(t4, e4, r4) {
8796            if (0 === e4.length) return 0;
8797            if (e4.length > 25) return null;
8798            if (t4.length - r4 < e4.length) return null;
8799            for (let n3 = 0, o2 = r4; n3 < e4.length; n3++, o2++) {
8800              const r5 = e4.charCodeAt(n3);
8801              if (r5 > 127) return null;
8802              t4[o2] = r5;
8803            }
8804            return e4.length;
8805          })(t3, e3, r3);
8806          return null != n2 ? n2 : Y.toLocalBufferType(t3).write(e3, r3, void 0, "utf8");
8807        }, randomBytes: function(t3) {
8808          return Y.fromNumberArray(Array.from({ length: t3 }, () => Math.floor(256 * Math.random())));
8809        }, swap32: (t3) => Y.toLocalBufferType(t3).swap32() };
8810        function Z(t3) {
8811          if (t3 < 0) throw new RangeError(`The argument 'byteLength' is invalid. Received ${t3}`);
8812          return et.fromNumberArray(Array.from({ length: t3 }, () => Math.floor(256 * Math.random())));
8813        }
8814        const X = (() => {
8815          var _a2;
8816          const { crypto: t3 } = globalThis;
8817          if (null != t3 && "function" == typeof t3.getRandomValues) return (e3) => t3.getRandomValues(et.allocate(e3));
8818          if ((function() {
8819            const { navigator: t4 } = globalThis;
8820            return "object" == typeof t4 && "ReactNative" === t4.product;
8821          })()) {
8822            const { console: t4 } = globalThis;
8823            (_a2 = t4 == null ? void 0 : t4.warn) == null ? void 0 : _a2.call(t4, "BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.");
8824          }
8825          return Z;
8826        })(), tt = /(\d|[a-f])/i, et = { toLocalBufferType(t3) {
8827          const e3 = (t3 == null ? void 0 : t3[Symbol.toStringTag]) ?? Object.prototype.toString.call(t3);
8828          if ("Uint8Array" === e3) return t3;
8829          if (ArrayBuffer.isView(t3)) return new Uint8Array(t3.buffer.slice(t3.byteOffset, t3.byteOffset + t3.byteLength));
8830          if ("ArrayBuffer" === e3 || "SharedArrayBuffer" === e3 || "[object ArrayBuffer]" === e3 || "[object SharedArrayBuffer]" === e3) return new Uint8Array(t3);
8831          throw new q("Cannot make a Uint8Array from passed potentialBuffer.");
8832        }, allocate(t3) {
8833          if ("number" != typeof t3) throw new TypeError(`The "size" argument must be of type number. Received ${String(t3)}`);
8834          return new Uint8Array(t3);
8835        }, allocateUnsafe: (t3) => et.allocate(t3), equals(t3, e3) {
8836          if (t3.byteLength !== e3.byteLength) return false;
8837          for (let r3 = 0; r3 < t3.byteLength; r3++) if (t3[r3] !== e3[r3]) return false;
8838          return true;
8839        }, fromNumberArray: (t3) => Uint8Array.from(t3), fromBase64: (t3) => Uint8Array.from(atob(t3), (t4) => t4.charCodeAt(0)), toBase64: (t3) => btoa(et.toISO88591(t3)), fromISO88591: (t3) => Uint8Array.from(t3, (t4) => 255 & t4.charCodeAt(0)), toISO88591: (t3) => Array.from(Uint16Array.from(t3), (t4) => String.fromCharCode(t4)).join(""), fromHex(t3) {
8840          const e3 = t3.length % 2 == 0 ? t3 : t3.slice(0, t3.length - 1), r3 = [];
8841          for (let t4 = 0; t4 < e3.length; t4 += 2) {
8842            const n2 = e3[t4], o2 = e3[t4 + 1];
8843            if (!tt.test(n2)) break;
8844            if (!tt.test(o2)) break;
8845            const i2 = Number.parseInt(`${n2}${o2}`, 16);
8846            r3.push(i2);
8847          }
8848          return Uint8Array.from(r3);
8849        }, toHex: (t3) => Array.from(t3, (t4) => t4.toString(16).padStart(2, "0")).join(""), toUTF8(t3, e3, r3, n2) {
8850          const o2 = r3 - e3 <= 20 ? Q(t3, e3, r3) : null;
8851          return null != o2 ? o2 : G(t3, e3, r3, n2);
8852        }, utf8ByteLength: (t3) => new TextEncoder().encode(t3).byteLength, encodeUTF8Into(t3, e3, r3) {
8853          const n2 = new TextEncoder().encode(e3);
8854          return t3.set(n2, r3), n2.byteLength;
8855        }, randomBytes: X, swap32(t3) {
8856          if (t3.length % 4 != 0) throw new RangeError("Buffer size must be a multiple of 32-bits");
8857          for (let e3 = 0; e3 < t3.length; e3 += 4) {
8858            const r3 = t3[e3], n2 = t3[e3 + 1], o2 = t3[e3 + 2], i2 = t3[e3 + 3];
8859            t3[e3] = i2, t3[e3 + 1] = o2, t3[e3 + 2] = n2, t3[e3 + 3] = r3;
8860          }
8861          return t3;
8862        } }, rt = "function" == typeof n && true !== ((_a = n.prototype) == null ? void 0 : _a._isBuffer) ? Y : et;
8863        class nt {
8864          get [p]() {
8865            return f;
8866          }
8867          [Symbol.for("nodejs.util.inspect.custom")](t3, e3, r3) {
8868            return this.inspect(t3, e3, r3);
8869          }
8870        }
8871        const ot = new Float64Array(1), it = new Uint8Array(ot.buffer, 0, 8);
8872        ot[0] = -1;
8873        const st = 0 === it[7], at = { isBigEndian: st, getNonnegativeInt32LE(t3, e3) {
8874          if (t3[e3 + 3] >
8874 127) throw new RangeError(`Size cannot be negative at offset: ${e3}`);
8875          return t3[e3] | t3[e3 + 1] << 8 | t3[e3 + 2] << 16 | t3[e3 + 3] << 24;
8876        }, getInt32LE: (t3, e3) => t3[e3] | t3[e3 + 1] << 8 | t3[e3 + 2] << 16 | t3[e3 + 3] << 24, getUint32LE: (t3, e3) => t3[e3] + 256 * t3[e3 + 1] + 65536 * t3[e3 + 2] + 16777216 * t3[e3 + 3], getUint32BE: (t3, e3) => t3[e3 + 3] + 256 * t3[e3 + 2] + 65536 * t3[e3 + 1] + 16777216 * t3[e3], getBigInt64LE(t3, e3) {
8877          const r3 = BigInt(t3[e3 + 4] + 256 * t3[e3 + 5] + 65536 * t3[e3 + 6] + (t3[e3 + 7] << 24)), n2 = BigInt(t3[e3] + 256 * t3[e3 + 1] + 65536 * t3[e3 + 2] + 16777216 * t3[e3 + 3]);
8878          return (r3 << BigInt(32)) + n2;
8879        }, getFloat64LE: st ? (t3, e3) => (it[7] = t3[e3], it[6] = t3[e3 + 1], it[5] = t3[e3 + 2], it[4] = t3[e3 + 3], it[3] = t3[e3 + 4], it[2] = t3[e3 + 5], it[1] = t3[e3 + 6], it[0] = t3[e3 + 7], ot[0]) : (t3, e3) => (it[0] = t3[e3], it[1] = t3[e3 + 1], it[2] = t3[e3 + 2], it[3] = t3[e3 + 3], it[4] = t3[e3 + 4], it[5] = t3[e3 + 5], it[6] = t3[e3 + 6], it[7] = t3[e3 + 7], ot[0]), setInt32BE: (t3, e3, r3) => (t3[e3 + 3] = r3, r3 >>>= 8, t3[e3 + 2] = r3, r3 >>>= 8, t3[e3 + 1] = r3, r3 >>>= 8, t3[e3] = r3, 4), setInt32LE: (t3, e3, r3) => (t3[e3] = r3, r3 >>>= 8, t3[e3 + 1] = r3, r3 >>>= 8, t3[e3 + 2] = r3, r3 >>>= 8, t3[e3 + 3] = r3, 4), setBigInt64LE(t3, e3, r3) {
8880          const n2 = BigInt(4294967295);
8881          let o2 = Number(r3 & n2);
8882          t3[e3] = o2, o2 >>= 8, t3[e3 + 1] = o2, o2 >>= 8, t3[e3 + 2] = o2, o2 >>= 8, t3[e3 + 3] = o2;
8883          let i2 = Number(r3 >> BigInt(32) & n2);
8884          return t3[e3 + 4] = i2, i2 >>= 8, t3[e3 + 5] = i2, i2 >>= 8, t3[e3 + 6] = i2, i2 >>= 8, t3[e3 + 7] = i2, 8;
8885        }, setFloat64LE: st ? (t3, e3, r3) => (ot[0] = r3, t3[e3] = it[7], t3[e3 + 1] = it[6], t3[e3 + 2] = it[5], t3[e3 + 3] = it[4], t3[e3 + 4] = it[3], t3[e3 + 5] = it[2], t3[e3 + 6] = it[1], t3[e3 + 7] = it[0], 8) : (t3, e3, r3) => (ot[0] = r3, t3[e3] = it[0], t3[e3 + 1] = it[1], t3[e3 + 2] = it[2], t3[e3 + 3] = it[3], t3[e3 + 4] = it[4], t3[e3 + 5] = it[5], t3[e3 + 6] = it[6], t3[e3 + 7] = it[7], 8) };
8886        class ut extends nt {
8887          get _bsontype() {
8888            return "Binary";
8889          }
8890          constructor(t3, e3) {
8891            if (super(), null != t3 && "string" == typeof t3 && !ArrayBuffer.isView(t3) && !s(t3) && !Array.isArray(t3)) throw new q("Binary can only be constructed from Uint8Array or number[]");
8892            this.sub_type = e3 ?? ut.BSON_BINARY_SUBTYPE_DEFAULT, null == t3 ? (this.buffer = rt.allocate(ut.BUFFER_SIZE), this.position = 0) : (this.buffer = Array.isArray(t3) ? rt.fromNumberArray(t3) : rt.toLocalBufferType(t3), this.position = this.buffer.byteLength);
8893          }
8894          put(t3) {
8895            if ("string" == typeof t3 && 1 !== t3.length) throw new q("only accepts single character String");
8896            if ("number" != typeof t3 && 1 !== t3.length) throw new q("only accepts single character Uint8Array or Array");
8897            let e3;
8898            if (e3 = "string" == typeof t3 ? t3.charCodeAt(0) : "number" == typeof t3 ? t3 : t3[0], e3 < 0 || e3 > 255) throw new q("only accepts number in a valid unsigned byte range 0-255");
8899            if (this.buffer.byteLength > this.position) this.buffer[this.position++] = e3;
8900            else {
8901              const t4 = rt.allocate(ut.BUFFER_SIZE + this.buffer.length);
8902              t4.set(this.buffer, 0), this.buffer = t4, this.buffer[this.position++] = e3;
8903            }
8904          }
8905          write(t3, e3) {
8906            if (e3 = "number" == typeof e3 ? e3 : this.position, this.buffer.byteLength < e3 + t3.length) {
8907              const e4 = rt.allocate(this.buffer.byteLength + t3.length);
8908              e4.set(this.buffer, 0), this.buffer = e4;
8909            }
8910            if (ArrayBuffer.isView(t3)) this.buffer.set(rt.toLocalBufferType(t3), e3), this.position = e3 + t3.byteLength > this.position ? e3 + t3.length : this.position;
8911            else if ("string" == typeof t3) throw new q("input cannot be string");
8912          }
8913          read(t3, e3) {
8914            const r3 = t3 + (e3 = e3 && e3 > 0 ? e3 : this.position);
8915            return this.buffer.subarray(t3, r3 > this.position ? this.position : r3);
8916          }
8917          value() {
8918            return this.buffer.length === this.position ? this.buffer : this.buffer.subarray(0, this.position);
8919          }
8920          length() {
8921            return this.position;
8922          }
8923          toJSON() {
8924            return rt.toBase64(this.buffer.subarray(0, this.position));
8925          }
8926          toString(t3) {
8927            return "hex" === t3 ? rt.toHex(this.buffer.subarray(0, this.position)) : "base64" === t3 ? rt.toBase64(this.buffer.subarray(0, this.position)) : rt.toUTF8(this.buffer, 0, this.position, false);
8928          }
8929          toExtendedJSON(t3) {
8930            t3 = t3 || {}, this.sub_type === ut.SUBTYPE_VECTOR && ct(this);
8931            const e3 = rt.toBase64(this.buffer), r3 = Number(this.sub_type).toString(16);
8932            return t3.legacy ? { $binary: e3, $type: 1 === r3.length ? "0" + r3 : r3 } : { $binary: { base64: e3, subType: 1 === r3.length ? "0" + r3 : r3 } };
8933          }
8934          toUUID() {
8935            if (this.sub_type === ut.SUBTYPE_UUID) return new pt(this.buffer.subarray(0, this.position));
8936            throw new q(`Binary sub_type "${this.sub_type}" is not supported for converting to UUID. Only "${ut.SUBTYPE_UUID}" is currently supported.`);
8937          }
8938          static createFromHexString(t3, e3) {
8939            return new ut(rt.fromHex(t3), e3);
8940          }
8941          static createFromBase64(t3, e3) {
8942            return new ut(rt.fromBase64(t3), e3);
8943          }
8944          static fromExtendedJSON(t3, e3) {
8945            let r3, n2;
8946            if (e3 = e3 || {}, "$binary" in t3 ? e3.legacy && "string" == typeof t3.$binary && "$type" in t3 ? (n2 = t3.$type ? parseInt(t3.$type, 16) : 0, r3 = rt.fromBase64(t3.$binary)) : "string" != typeof t3.$binary && (n2 = t3.$binary.subType ? parseInt(t3.$binary.subType, 16) : 0, r3 = rt.fromBase64(t3.$binary.base64)) : "$uuid" in t3 && (n2 = 4, r3 = pt.bytesFromString(t3.$uuid)), !r3) throw new q(`Unexpected Binary Extended JSON format ${JSON.stringify(t3)}`);
8947            return n2 === L ? new pt(r3) : new ut(r3, n2);
8948          }
8949          inspect(t3, e3, r3) {
8950            return r3 ?? (r3 = l), `Binary.createFromBase64(${r3(rt.toBase64(this.buffer.subarray(0, this.position)), e3)}, ${r3(this.sub_type, e3)})`;
8951          }
8952          toInt8Array() {
8953            if (this.sub_type !== ut.SUBTYPE_VECTOR) throw new q("Binary sub_type is not Vector");
8954            if (this.buffer[0] !== ut.VECTOR_TYPE.Int8) throw new q("Binary datatype field is not Int8");
8955            return ct(this), new Int8Array(this.buffer.buffer.slice(this.buffer.byteOffset + 2, this.buffer.byteOffset + this.position));
8956          }
8957          toFloat32Array() {
8958            if (this.sub_type !== ut.SUBTYPE_VECTOR) throw new q("Binary sub_type is not Vector");
8959            if (this.buffer[0] !== ut.VECTOR_TYPE.Float32) throw new q("Binary datatype field is not Float32");
8960            ct(this);
8961            const t3 = new Uint8Array(this.buffer.buffer.slice(this.buffer.byteOffset + 2, this.buffer.byteOffset + this.position));
8962            return at.isBigEndian && rt.swap32(t3), new Float32Array(t3.buffer);
8963          }
8964          toPackedBits() {
8965            if (this.sub_type !== ut.SUBTYPE_VECTOR) throw new q("Binary sub_type is not Vector");
8966            if (this.buffer[0] !== ut.VECTOR_TYPE.PackedBit) throw new q("Binary datatype field is not packed bit");
8967            return ct(this), new Uint8Array(this.buffer.buffer.slice(this.buffer.byteOffset + 2, this.buffer.byteOffset + this.position));
8968          }
8969          toBits() {
8970            if (this.sub_type !== ut.SUBTYPE_VECTOR) throw new q("Binary sub_type is not Vector");
8971            if (this.buffer[0] !== ut.VECTOR_TYPE.PackedBit) throw new q("Binary datatype field is not packed bit");
8972            ct(this);
8973            const t3 = 8 * (this.length() - 2) - this.buffer[1], e3 = new Int8Array(t3);
8974            for (let t4 = 0; t4 < e3.length; t4++) {
8975              const r3 = t4 / 8 | 0, n2 = this.buffer[r3 + 2] >> 7 - t4 % 8 & 1;
8976              e3[t4] = n2;
8977            }
8978            return e3;
8979          }
8980          static fromInt8Array(t3) {
8981            const e3 = rt.allocate(t3.byteLength + 2);
8982            e3[0] = ut.VECTOR_TYPE.Int8, e3[1] = 0;
8983            const r3 = new Uint8Array(t3.buffer, t3.byteOffset, t3.byteLength);
8984            e3.set(r3, 2);
8985            const n2 = new this(e3, this.SUBTYPE_VECTOR);
8986            return ct(n2), n2;
8987          }
8988          static fromFloat32Array(t3) {
8989            const e3 = rt.allocate(t3.byteLength + 2);
8990            e3[0] = ut.VECTOR_TYPE.Float32, e3[1] = 0;
8991            const r3 = new Uint8Array(t3.buffer, t3.byteOffset, t3.byteLength);
8992            e3.set(r3, 2), at.isBigEndian && rt.swap32(new Uint8Array(e3.buffer, 2));
8993            const n2 = new this(e3, this.SUBTYPE_VECTOR);
8994            return ct(n2), n2;
8995          }
8996          static fromPackedBits(t3, e3 = 0) {
8997            const r3 = rt.allocate(t3.byteLength + 2);
8998            r3[0] = ut.VECTOR_TYPE.PackedBit, r3[1] = e3, r3.set(t3, 2);
8999            const n2 = new this(r3, this.SUBTYPE_VECTOR);
9000            return ct(n2), n2;
9001          }
9002          static fromBits(t3) {
9003            const e3 = t3.length + 7 >>> 3, r3 = new Uint8Array(e3 + 2);
9004            r3[0] = ut.VECTOR_TYPE.PackedBit;
9005            const n2 = t3.length % 8;
9006            r3[1] = 0 === n2 ? 0 : 8 - n2;
9007            for (let e4 = 0; e4 < t3.length; e4++) {
9008              const n3 = e4 >>> 3, o2 = t3[e4];
9009              if (0 !== o2 && 1 !== o2) throw new q(`Invalid bit value at ${e4}: must be 0 or 1, found ${t3[e4]}`);
9010              if (0 === o2) continue;
9011              const i2 = 7 - e4 % 8;
9012              r3[n3 + 2] |= o2 << i2;
9013            }
9014            return new this(r3, ut.SUBTYPE_VECTOR);
9015          }
9016        }
9017        function ct(t3) {
9018          if (t3.sub_type !== ut.SUBTYPE_VECTOR) return;
9019          const e3 = t3.position, r3 = t3.buffer[0], n2 = t3.buffer[1];
9020          if ((r3 === ut.VECTOR_TYPE.Float32 || r3 === ut.VECTOR_TYPE.Int8) && 0 !== n2) throw new q("Invalid Vector: padding must be zero for int8 and float32 vectors");
9021          if (r3 === ut.VECTOR_TYPE.Float32 && 0 !== e3 && e3 - 2 != 0 && (e3 - 2) % 4 != 0) throw new q("Invalid Vector: Float32 vector must contain a multiple of 4 bytes");
9022          if (r3 === ut.VECTOR_TYPE.PackedBit && 0 !== n2 && 2 === e3) throw new q("Invalid Vector: padding must be zero for packed bit vectors that are empty");
9023          if (r3 === ut.VECTOR_TYPE.PackedBit && n2 > 7) throw new q(`Invalid Vector: padding must be a value between 0 and 7. found: ${n2}`);
9024        }
9025        ut.BSON_BINARY_SUBTYPE_DEFAULT = 0, ut.BUFFER_SIZE = 256, ut.SUBTYPE_DEFAULT = 0, ut.SUBTYPE_FUNCTION = 1, ut.SUBTYPE_BYTE_ARRAY = 2, ut.SUBTYPE_UUID_OLD = 3, ut.SUBTYPE_UUID = 4, ut.SUBTYPE_MD5 = 5, ut.SUBTYPE_ENCRYPTED = 6, ut.SUBTYPE_COLUMN = 7, ut.SUBTYPE_SENSITIVE = 8, ut.SUBTYPE_VECTOR = 9, ut.SUBTYPE_USER_DEFINED = 128, ut.VECTOR_TYPE = Object.freeze({ Int8: 3, Float32: 39, PackedBit: 16 });
9026        const lt = /^[0-9A-F]{32}$/i, ft = /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i;
9027        class pt extends ut {
9028          constructor(t3) {
9029            let e3;
9030            if (null == t3) e3 = pt.generate();
9031            else if (t3 instanceof pt) e3 = rt.toLocalBufferType(new Uint8Array(t3.buffer));
9032            else if (ArrayBuffer.isView(t3) && 16 === t3.byteLength) e3 = rt.toLocalBufferType(t3);
9033            else {
9034              if ("string" != typeof t3) throw new q("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).");
9035              e3 = pt.bytesFromString(t3);
9036            }
9037            super(e3, L);
9038          }
9039          get id() {
9040            return this.buffer;
9041          }
9042          set id(t3) {
9043            this.buffer = t3;
9044          }
9045          toHexString(t3 = true) {
9046            return t3 ? [rt.toHex(this.buffer.subarray(0, 4)), rt.toHex(this.buffer.subarray(4, 6)), rt.toHex(this.buffer.subarray(6, 8)), rt.toHex(this.buffer.subarray(8, 10)), rt.toHex(this.buffer.subarray(10, 16))].join("-") : rt.toHex(this.buffer);
9047          }
9048          toString(t3) {
9049            return "hex" === t3 ? rt.toHex(this.id) : "base64" === t3 ? rt.toBase64(this.id
9049) : this.toHexString();
9050          }
9051          toJSON() {
9052            return this.toHexString();
9053          }
9054          equals(t3) {
9055            if (!t3) return false;
9056            if (t3 instanceof pt) return rt.equals(t3.id, this.id);
9057            try {
9058              return rt.equals(new pt(t3).id, this.id);
9059            } catch {
9060              return false;
9061            }
9062          }
9063          toBinary() {
9064            return new ut(this.id, ut.SUBTYPE_UUID);
9065          }
9066          static generate() {
9067            const t3 = rt.randomBytes(16);
9068            return t3[6] = 15 & t3[6] | 64, t3[8] = 63 & t3[8] | 128, t3;
9069          }
9070          static isValid(t3) {
9071            return !!t3 && ("string" == typeof t3 ? pt.isValidUUIDString(t3) : i(t3) ? 16 === t3.byteLength : "Binary" === t3._bsontype && t3.sub_type === this.SUBTYPE_UUID && 16 === t3.buffer.byteLength);
9072          }
9073          static createFromHexString(t3) {
9074            const e3 = pt.bytesFromString(t3);
9075            return new pt(e3);
9076          }
9077          static createFromBase64(t3) {
9078            return new pt(rt.fromBase64(t3));
9079          }
9080          static bytesFromString(t3) {
9081            if (!pt.isValidUUIDString(t3)) throw new q("UUID string representation must be 32 hex digits or canonical hyphenated representation");
9082            return rt.fromHex(t3.replace(/-/g, ""));
9083          }
9084          static isValidUUIDString(t3) {
9085            return lt.test(t3) || ft.test(t3);
9086          }
9087          inspect(t3, e3, r3) {
9088            return r3 ?? (r3 = l), `new UUID(${r3(this.toHexString(), e3)})`;
9089          }
9090        }
9091        class ht extends nt {
9092          get _bsontype() {
9093            return "Code";
9094          }
9095          constructor(t3, e3) {
9096            super(), this.code = t3.toString(), this.scope = e3 ?? null;
9097          }
9098          toJSON() {
9099            return null != this.scope ? { code: this.code, scope: this.scope } : { code: this.code };
9100          }
9101          toExtendedJSON() {
9102            return this.scope ? { $code: this.code, $scope: this.scope } : { $code: this.code };
9103          }
9104          static fromExtendedJSON(t3) {
9105            return new ht(t3.$code, t3.$scope);
9106          }
9107          inspect(t3, e3, r3) {
9108            r3 ?? (r3 = l);
9109            let n2 = r3(this.code, e3);
9110            const o2 = n2.includes("\n");
9111            return null != this.scope && (n2 += `,${o2 ? "\n" : " "}${r3(this.scope, e3)}`), `new Code(${o2 ? "\n" : ""}${n2}${o2 && null === this.scope ? "\n" : ""})`;
9112          }
9113        }
9114        function yt(t3) {
9115          return null != t3 && "object" == typeof t3 && "$id" in t3 && null != t3.$id && "$ref" in t3 && "string" == typeof t3.$ref && (!("$db" in t3) || "$db" in t3 && "string" == typeof t3.$db);
9116        }
9117        class dt extends nt {
9118          get _bsontype() {
9119            return "DBRef";
9120          }
9121          constructor(t3, e3, r3, n2) {
9122            super();
9123            const o2 = t3.split(".");
9124            2 === o2.length && (r3 = o2.shift(), t3 = o2.shift()), this.collection = t3, this.oid = e3, this.db = r3, this.fields = n2 || {};
9125          }
9126          get namespace() {
9127            return this.collection;
9128          }
9129          set namespace(t3) {
9130            this.collection = t3;
9131          }
9132          toJSON() {
9133            const t3 = Object.assign({ $ref: this.collection, $id: this.oid }, this.fields);
9134            return null != this.db && (t3.$db = this.db), t3;
9135          }
9136          toExtendedJSON(t3) {
9137            t3 = t3 || {};
9138            let e3 = { $ref: this.collection, $id: this.oid };
9139            return t3.legacy || (this.db && (e3.$db = this.db), e3 = Object.assign(e3, this.fields)), e3;
9140          }
9141          static fromExtendedJSON(t3) {
9142            const e3 = Object.assign({}, t3);
9143            return delete e3.$ref, delete e3.$id, delete e3.$db, new dt(t3.$ref, t3.$id, t3.$db, e3);
9144          }
9145          inspect(t3, e3, r3) {
9146            r3 ?? (r3 = l);
9147            const n2 = [r3(this.namespace, e3), r3(this.oid, e3), ...this.db ? [r3(this.db, e3)] : [], ...Object.keys(this.fields).length > 0 ? [r3(this.fields, e3)] : []];
9148            return n2[1] = r3 === l ? `new ObjectId(${n2[1]})` : n2[1], `new DBRef(${n2.join(", ")})`;
9149          }
9150        }
9151        function bt(t3) {
9152          if ("" === t3) return t3;
9153          let e3 = 0;
9154          const r3 = "-" === t3[e3], n2 = "+" === t3[e3];
9155          (n2 || r3) && (e3 += 1);
9156          let o2 = false;
9157          for (; e3 < t3.length && "0" === t3[e3]; ++e3) o2 = true;
9158          return o2 ? `${r3 ? "-" : ""}${t3.length === e3 ? "0" : t3.slice(e3)}` : n2 ? t3.slice(1) : t3;
9159        }
9160        let mt;
9161        try {
9162          mt = 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;
9163        } catch {
9164        }
9165        const vt = 4294967296, gt = 18446744073709552e3, _t = gt / 2, wt = {}, Ot = {}, St = /^(\+?0|(\+|-)?[1-9][0-9]*)$/;
9166        class $t extends nt {
9167          get _bsontype() {
9168            return "Long";
9169          }
9170          get __isLong__() {
9171            return true;
9172          }
9173          constructor(t3 = 0, e3, r3) {
9174            super();
9175            const n2 = "boolean" == typeof e3 ? e3 : Boolean(r3), o2 = "number" == typeof e3 ? e3 : 0, i2 = "string" == typeof t3 ? $t.fromString(t3, n2) : "bigint" == typeof t3 ? $t.fromBigInt(t3, n2) : { low: 0 | t3, high: 0 | o2, unsigned: n2 };
9176            this.low = i2.low, this.high = i2.high, this.unsigned = i2.unsigned;
9177          }
9178          static fromBits(t3, e3, r3) {
9179            return new $t(t3, e3, r3);
9180          }
9181          static fromInt(t3, e3) {
9182            let r3, n2, o2;
9183            return e3 ? (o2 = 0 <= (t3 >>>= 0) && t3 < 256) && (n2 = Ot[t3], n2) ? n2 : (r3 = $t.fromBits(t3, (0 | t3) < 0 ? -1 : 0, true), o2 && (Ot[t3] = r3), r3) : (o2 = -128 <= (t3 |= 0) && t3 < 128) && (n2 = wt[t3], n2) ? n2 : (r3 = $t.fromBits(t3, t3 < 0 ? -1 : 0, false), o2 && (wt[t3] = r3), r3);
9184          }
9185          static fromNumber(t3, e3) {
9186            if (isNaN(t3)) return e3 ? $t.UZERO : $t.ZERO;
9187            if (e3) {
9188              if (t3 < 0) return $t.UZERO;
9189              if (t3 >= gt) return $t.MAX_UNSIGNED_VALUE;
9190            } else {
9191              if (t3 <= -9223372036854776e3) return $t.MIN_VALUE;
9192              if (t3 + 1 >= _t) return $t.MAX_VALUE;
9193            }
9194            return t3 < 0 ? $t.fromNumber(-t3, e3).neg() : $t.fromBits(t3 % vt | 0, t3 / vt | 0, e3);
9195          }
9196          static fromBigInt(t3, e3) {
9197            const r3 = BigInt(4294967295), n2 = BigInt(32);
9198            return new $t(Number(t3 & r3), Number(t3 >> n2 & r3), e3);
9199          }
9200          static _fromString(t3, e3, r3) {
9201            if (0 === t3.length) throw new q("empty string");
9202            if (r3 < 2 || 36 < r3) throw new q("radix");
9203            let n2;
9204            if ((n2 = t3.indexOf("-")) > 0) throw new q("interior hyphen");
9205            if (0 === n2) return $t._fromString(t3.substring(1), e3, r3).neg();
9206            const o2 = $t.fromNumber(Math.pow(r3, 8));
9207            let i2 = $t.ZERO;
9208            for (let e4 = 0; e4 < t3.length; e4 += 8) {
9209              const n3 = Math.min(8, t3.length - e4), s2 = parseInt(t3.substring(e4, e4 + n3), r3);
9210              if (n3 < 8) {
9211                const t4 = $t.fromNumber(Math.pow(r3, n3));
9212                i2 = i2.mul(t4).add($t.fromNumber(s2));
9213              } else i2 = i2.mul(o2), i2 = i2.add($t.fromNumber(s2));
9214            }
9215            return i2.unsigned = e3, i2;
9216          }
9217          static fromStringStrict(t3, e3, r3) {
9218            let n2 = false;
9219            if ("number" == typeof e3 ? (r3 = e3, e3 = false) : n2 = !!e3, r3 ?? (r3 = 10), t3.trim() !== t3) throw new q(`Input: '${t3}' contains leading and/or trailing whitespace`);
9220            if (!(function(t4, e4) {
9221              const r4 = "0123456789abcdefghijklmnopqrstuvwxyz".slice(0, e4 = e4 ?? 10);
9222              return !new RegExp(`[^-+${r4}]`, "i").test(t4) && t4;
9223            })(t3, r3)) throw new q(`Input: '${t3}' contains invalid characters for radix: ${r3}`);
9224            const o2 = bt(t3), i2 = $t._fromString(o2, n2, r3);
9225            if (i2.toString(r3).toLowerCase() !== o2.toLowerCase()) throw new q(`Input: ${t3} is not representable as ${i2.unsigned ? "an unsigned" : "a signed"} 64-bit Long ${null != r3 ? `with radix: ${r3}` : ""}`);
9226            return i2;
9227          }
9228          static fromString(t3, e3, r3) {
9229            let n2 = false;
9230            return "number" == typeof e3 ? (r3 = e3, e3 = false) : n2 = !!e3, r3 ?? (r3 = 10), "NaN" === t3 && r3 < 24 || ("Infinity" === t3 || "+Infinity" === t3 || "-Infinity" === t3) && r3 < 35 ? $t.ZERO : $t._fromString(t3, n2, r3);
9231          }
9232          static fromBytes(t3, e3, r3) {
9233            return r3 ? $t.fromBytesLE(t3, e3) : $t.fromBytesBE(t3, e3);
9234          }
9235          static fromBytesLE(t3, e3) {
9236            return new $t(t3[0] | t3[1] << 8 | t3[2] << 16 | t3[3] << 24, t3[4] | t3[5] << 8 | t3[6] << 16 | t3[7] << 24, e3);
9237          }
9238          static fromBytesBE(t3, e3) {
9239            return new $t(t3[4] << 24 | t3[5] << 16 | t3[6] << 8 | t3[7], t3[0] << 24 | t3[1] << 16 | t3[2] << 8 | t3[3], e3);
9240          }
9241          static isLong(t3) {
9242            return null != t3 && "object" == typeof t3 && "__isLong__" in t3 && true === t3.__isLong__;
9243          }
9244          static fromValue(t3, e3) {
9245            return "number" == typeof t3 ? $t.fromNumber(t3, e3) : "string" == typeof t3 ? $t.fromString(t3, e3) : $t.fromBits(t3.low, t3.high, "boolean" == typeof e3 ? e3 : t3.unsigned);
9246          }
9247          add(t3) {
9248            $t.isLong(t3) || (t3 = $t.fromValue(t3));
9249            const e3 = this.high >>> 16, r3 = 65535 & this.high, n2 = this.low >>> 16, o2 = 65535 & this.low, i2 = t3.high >>> 16, s2 = 65535 & t3.high, a2 = t3.low >>> 16;
9250            let u2 = 0, c2 = 0, l2 = 0, f2 = 0;
9251            return f2 += o2 + (65535 & t3.low), l2 += f2 >>> 16, f2 &= 65535, l2 += n2 + a2, c2 += l2 >>> 16, l2 &= 65535, c2 += r3 + s2, u2 += c2 >>> 16, c2 &= 65535, u2 += e3 + i2, u2 &= 65535, $t.fromBits(l2 << 16 | f2, u2 << 16 | c2, this.unsigned);
9252          }
9253          and(t3) {
9254            return $t.isLong(t3) || (t3 = $t.fromValue(t3)), $t.fromBits(this.low & t3.low, this.high & t3.high, this.unsigned);
9255          }
9256          compare(t3) {
9257            if ($t.isLong(t3) || (t3 = $t.fromValue(t3)), this.eq(t3)) return 0;
9258            const e3 = this.isNegative(), r3 = t3.isNegative();
9259            return e3 && !r3 ? -1 : !e3 && r3 ? 1 : this.unsigned ? t3.high >>> 0 > this.high >>> 0 || t3.high === this.high && t3.low >>> 0 > this.low >>> 0 ? -1 : 1 : this.sub(t3).isNegative() ? -1 : 1;
9260          }
9261          comp(t3) {
9262            return this.compare(t3);
9263          }
9264          divide(t3) {
9265            if ($t.isLong(t3) || (t3 = $t.fromValue(t3)), t3.isZero()) throw new q("division by zero");
9266            if (mt) {
9267              if (!this.unsigned && -2147483648 === this.high && -1 === t3.low && -1 === t3.high) return this;
9268              const e4 = (this.unsigned ? mt.div_u : mt.div_s)(this.low, this.high, t3.low, t3.high);
9269              return $t.fromBits(e4, mt.get_high(), this.unsigned);
9270            }
9271            if (this.isZero()) return this.unsigned ? $t.UZERO : $t.ZERO;
9272            let e3, r3, n2;
9273            if (this.unsigned) {
9274              if (t3.unsigned || (t3 = t3.toUnsigned()), t3.gt(this)) return $t.UZERO;
9275              if (t3.gt(this.shru(1))) return $t.UONE;
9276              n2 = $t.UZERO;
9277            } else {
9278              if (this.eq($t.MIN_VALUE)) return t3.eq($t.ONE) || t3.eq($t.NEG_ONE) ? $t.MIN_VALUE : t3.eq($t.MIN_VALUE) ? $t.ONE : (e3 = this.shr(1).div(t3).shl(1), e3.eq($t.ZERO) ? t3.isNegative() ? $t.ONE : $t.NEG_ONE : (r3 = this.sub(t3.mul(e3)), n2 = e3.add(r3.div(t3)), n2));
9279              if (t3.eq($t.MIN_VALUE)) return this.unsigned ? $t.UZERO : $t.ZERO;
9280              if (this.isNegative()) return t3.isNegative() ? this.neg().div(t3.neg()) : this.neg().div(t3).neg();
9281              if (t3.isNegative()) return this.div(t3.neg()).neg();
9282              n2 = $t.ZERO;
9283            }
9284            for (r3 = this; r3.gte(t3); ) {
9285              e3 = Math.max(1, Math.floor(r3.toNumber() / t3.toNumber()));
9286              const o2 = Math.ceil(Math.log(e3) / Math.LN2), i2 = o2 <= 48 ? 1 : Math.pow(2, o2 - 48);
9287              let s2 = $t.fromNumber(e3), a2 = s2.mul(t3);
9288              for (; a2.isNegative() || a2.gt(r3); ) e3 -= i2, s2 = $t.fromNumber(e3, this.unsigned), a2 = s2.mul(t3);
9289              s2.isZero() && (s2 = $t.ONE), n2 = n2.add(s2), r3 = r3.sub(a2);
9290            }
9291            return n2;
9292          }
9293          div(t3) {
9294            return this.divide(t3);
9295          }
9296          equals(t3) {
9297            return $t.isLong(t3) || (t3 = $t.fromValue(t3)), (this.unsigned === t3.unsigned || this.high >>> 31 != 1 || t3.high >>> 31 != 1) && this.high === t3.high && this.low === t3.low;
9298          }
9299          eq(t3) {
9300            return this.equals(t3);
9301          }
9302          getHighBits() {
9303            return this.high;
9304          }
9305          getHighBitsUnsigned() {
9306            return this.high >>> 0;
9307          }
9308          getLowBits() {
9309            return this.low;
9310          }
9311          getLowBitsUnsigned() {
9312            return this.low >>> 0;
9313          }
9314          getNumBitsAbs() {
9315            if (this.isNegative()) return this.eq($t.MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();
9316            const t3 = 0 !== this.high ? this.high : this.low;
9317            let e3;
9318            for (e3 = 31; e3 > 0 && !(t3 & 1 << e3); e3--) ;
9319            return 0 !== this.high ? e3 + 33 : e3 + 1;
9320          }
9321          greaterThan(t3) {
9322            return this.comp(t3) > 0;
9323          }
9324          gt(t3) {
9325            return this.greaterThan(t3);
9326          }
9327          greaterThanOrEqual(t3) {
9328            return this.comp(t3) >= 0;
9329          }
9330          gte(t3) {
9331            return this.greaterThanOrEqual(t3);
9332          }
9333          ge(t3) {
9334            return this.greaterThanOrEqual(t3);
9335          }
9336          isEven() {
9337            return !(1 & this.low);
9338          }
9339          isNegative() {
9340            return !this.unsigned && this.high < 0;
9341          }
9342          isOdd() {
9343            return !(1 & ~this.low);
9344          }
9345          isPositive() {
9346            return this.unsigned || this.high >= 0;
9347          }
9348          isZero() {
9349            return 0 === this.high && 0 === this.low;
9350          }
9351          lessThan(t3) {
9352            return this.comp(t3) < 0;
9353          }
9354          lt(t3) {
9355            return this.lessThan(t3);
9356          }
9357          lessThanOrEqual(t3) {
9358            return this.comp(t3) <= 0;
9359          }
9360          lte(t3) {
9361            return this.lessThanOrEqual(t3);
9362          }
9363          modulo(t3) {
9364            if ($t.isLong(t3) || (t3 = $t.fromValue(t3)), mt) {
9365              const e3 = (this.unsigned ? mt.rem_u : mt.rem_s)(this.low, this.high, t3.low, t3.high);
9366              return $t.fromBits(e3, mt.get_high(), this.unsigned);
9367            }
9368            return this.sub(this.div(t3).mul(t3));
9369          }
9370          mod(t3) {
9371            return this.modulo(t3);
9372          }
9373          rem(t3) {
9374            return this.modulo(t3);
9375          }
9376          multiply(t3) {
9377            if (this.isZero()) return $t.ZERO;
9378            if ($t.isLong(t3) || (t3 = $t.fromValue(t3)), mt) {
9379              const e4 = mt.mul(this.low, this.high, t3.low, t3.high);
9380              return $t.fromBits(e4, mt.get_high(), this.unsigned);
9381            }
9382            if (t3.isZero()) return $t.ZERO;
9383            if (this.eq($t.MIN_VALUE)) return t3.isOdd() ? $t.MIN_VALUE : $t.ZERO;
9384            if (t3.eq($t.MIN_VALUE)) return this.isOdd() ? $t.MIN_VALUE : $t.ZERO;
9385            if (this.isNegative()) return t3.isNegative() ? this.neg().mul(t3.neg()) : this.neg().mul(t3).neg();
9386            if (t3.isNegative()) return this.mul(t3.neg()).neg();
9387            if (this.lt($t.TWO_PWR_24) && t3.lt($t.TWO_PWR_24)) return $t.fromNumber(this.toNumber() * t3.toNumber(), this.unsigned);
9388            const e3 = this.high >>> 16, r3 = 65535 & this.high, n2 = this.low >>> 16, o2 = 65535 & this.low, i2 = t3.high >>> 16, s2 = 65535 & t3.high, a2 = t3.low >>> 16, u2 = 65535 & t3.low;
9389            let c2 = 0, l2 = 0, f2 = 0, p2 = 0;
9390            return p2 += o2 * u2, f2 += p2 >>> 16, p2 &= 65535, f2 += n2 * u2, l2 += f2 >>> 16, f2 &= 65535, f2 += o2 * a2, l2 += f2 >>> 16, f2 &= 65535, l2 += r3 * u2, c2 += l2 >>> 16, l2 &= 65535, l2 += n2 * a2, c2 += l2 >>> 16, l2 &= 65535, l2 += o2 * s2, c2 += l2 >>> 16, l2 &= 65535, c2 += e3 * u2 + r3 * a2 + n2 * s2 + o2 * i2, c2 &= 65535, $t.fromBits(f2 << 16 | p2, c2 << 16 | l2, this.unsigned);
9391          }
9392          mul(t3) {
9393            return this.multiply(t3);
9394          }
9395          negate() {
9396            return !this.unsigned && this.eq($t.MIN_VALUE) ? $t.MIN_VALUE : this.not().add($t.ONE);
9397          }
9398          neg() {
9399            return this.negate();
9400          }
9401          not() {
9402            return $t.fromBits(~this.low, ~this.high, this.unsigned);
9403          }
9404          notEquals(t3) {
9405            return !this.equals(t3);
9406          }
9407          neq(t3) {
9408            return this.notEquals(t3);
9409          }
9410          ne(t3) {
9411            return this.notEquals(t3);
9412          }
9413          or(t3) {
9414            return $t.isLong(t3) || (t3 = $t.fromValue(t3)), $t.fromBits(this.low | t3.low, this.high | t3.high, this.unsigned);
9415          }
9416          shiftLeft(t3) {
9417            return $t.isLong(t3) && (t3 = t3.toInt()), 0 == (t3 &= 63) ? this 
9417: t3 < 32 ? $t.fromBits(this.low << t3, this.high << t3 | this.low >>> 32 - t3, this.unsigned) : $t.fromBits(0, this.low << t3 - 32, this.unsigned);
9418          }
9419          shl(t3) {
9420            return this.shiftLeft(t3);
9421          }
9422          shiftRight(t3) {
9423            return $t.isLong(t3) && (t3 = t3.toInt()), 0 == (t3 &= 63) ? this : t3 < 32 ? $t.fromBits(this.low >>> t3 | this.high << 32 - t3, this.high >> t3, this.unsigned) : $t.fromBits(this.high >> t3 - 32, this.high >= 0 ? 0 : -1, this.unsigned);
9424          }
9425          shr(t3) {
9426            return this.shiftRight(t3);
9427          }
9428          shiftRightUnsigned(t3) {
9429            if ($t.isLong(t3) && (t3 = t3.toInt()), 0 == (t3 &= 63)) return this;
9430            {
9431              const e3 = this.high;
9432              if (t3 < 32) {
9433                const r3 = this.low;
9434                return $t.fromBits(r3 >>> t3 | e3 << 32 - t3, e3 >>> t3, this.unsigned);
9435              }
9436              return 32 === t3 ? $t.fromBits(e3, 0, this.unsigned) : $t.fromBits(e3 >>> t3 - 32, 0, this.unsigned);
9437            }
9438          }
9439          shr_u(t3) {
9440            return this.shiftRightUnsigned(t3);
9441          }
9442          shru(t3) {
9443            return this.shiftRightUnsigned(t3);
9444          }
9445          subtract(t3) {
9446            return $t.isLong(t3) || (t3 = $t.fromValue(t3)), this.add(t3.neg());
9447          }
9448          sub(t3) {
9449            return this.subtract(t3);
9450          }
9451          toInt() {
9452            return this.unsigned ? this.low >>> 0 : this.low;
9453          }
9454          toNumber() {
9455            return this.unsigned ? (this.high >>> 0) * vt + (this.low >>> 0) : this.high * vt + (this.low >>> 0);
9456          }
9457          toBigInt() {
9458            return BigInt(this.toString());
9459          }
9460          toBytes(t3) {
9461            return t3 ? this.toBytesLE() : this.toBytesBE();
9462          }
9463          toBytesLE() {
9464            const t3 = this.high, e3 = this.low;
9465            return [255 & e3, e3 >>> 8 & 255, e3 >>> 16 & 255, e3 >>> 24, 255 & t3, t3 >>> 8 & 255, t3 >>> 16 & 255, t3 >>> 24];
9466          }
9467          toBytesBE() {
9468            const t3 = this.high, e3 = this.low;
9469            return [t3 >>> 24, t3 >>> 16 & 255, t3 >>> 8 & 255, 255 & t3, e3 >>> 24, e3 >>> 16 & 255, e3 >>> 8 & 255, 255 & e3];
9470          }
9471          toSigned() {
9472            return this.unsigned ? $t.fromBits(this.low, this.high, false) : this;
9473          }
9474          toString(t3) {
9475            if ((t3 = t3 || 10) < 2 || 36 < t3) throw new q("radix");
9476            if (this.isZero()) return "0";
9477            if (this.isNegative()) {
9478              if (this.eq($t.MIN_VALUE)) {
9479                const e4 = $t.fromNumber(t3), r4 = this.div(e4), n3 = r4.mul(e4).sub(this);
9480                return r4.toString(t3) + n3.toInt().toString(t3);
9481              }
9482              return "-" + this.neg().toString(t3);
9483            }
9484            const e3 = $t.fromNumber(Math.pow(t3, 6), this.unsigned);
9485            let r3 = this, n2 = "";
9486            for (; ; ) {
9487              const o2 = r3.div(e3);
9488              let i2 = (r3.sub(o2.mul(e3)).toInt() >>> 0).toString(t3);
9489              if (r3 = o2, r3.isZero()) return i2 + n2;
9490              for (; i2.length < 6; ) i2 = "0" + i2;
9491              n2 = "" + i2 + n2;
9492            }
9493          }
9494          toUnsigned() {
9495            return this.unsigned ? this : $t.fromBits(this.low, this.high, true);
9496          }
9497          xor(t3) {
9498            return $t.isLong(t3) || (t3 = $t.fromValue(t3)), $t.fromBits(this.low ^ t3.low, this.high ^ t3.high, this.unsigned);
9499          }
9500          eqz() {
9501            return this.isZero();
9502          }
9503          le(t3) {
9504            return this.lessThanOrEqual(t3);
9505          }
9506          toExtendedJSON(t3) {
9507            return t3 && t3.relaxed ? this.toNumber() : { $numberLong: this.toString() };
9508          }
9509          static fromExtendedJSON(t3, e3) {
9510            const { useBigInt64: r3 = false, relaxed: n2 = true } = { ...e3 };
9511            if (t3.$numberLong.length > 20) throw new q("$numberLong string is too long");
9512            if (!St.test(t3.$numberLong)) throw new q(`$numberLong string "${t3.$numberLong}
9512" is in an invalid format`);
9513            if (r3) {
9514              const e4 = BigInt(t3.$numberLong);
9515              return BigInt.asIntN(64, e4);
9516            }
9517            const o2 = $t.fromString(t3.$numberLong);
9518            return n2 ? o2.toNumber() : o2;
9519          }
9520          inspect(t3, e3, r3) {
9521            return r3 ?? (r3 = l), `new Long(${r3(this.toString(), e3)}${this.unsigned ? `, ${r3(this.unsigned, e3)}` : ""})`;
9522          }
9523        }
9524        $t.TWO_PWR_24 = $t.fromInt(1 << 24), $t.MAX_UNSIGNED_VALUE = $t.fromBits(-1, -1, true), $t.ZERO = $t.fromInt(0), $t.UZERO = $t.fromInt(0, true), $t.ONE = $t.fromInt(1), $t.UONE = $t.fromInt(1, true), $t.NEG_ONE = $t.fromInt(-1), $t.MAX_VALUE = $t.fromBits(-1, 2147483647, false), $t.MIN_VALUE = $t.fromBits(0, -2147483648, false);
9525        const jt = /^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/, Pt = /^(\+|-)?(Infinity|inf)$/i, At = /^(\+|-)?NaN$/i, Et = 6111, xt = -6176, Tt = rt.fromNumberArray([124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0].reverse()), kt = rt.fromNumberArray([248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0].reverse()), Nt = rt.fromNumberArray([120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0].reverse()), It = /^([-+])?(\d+)?$/;
9526        function Bt(t3) {
9527          return !isNaN(parseInt(t3, 10));
9528        }
9529        function Mt(t3) {
9530          const e3 = $t.fromNumber(1e9);
9531          let r3 = $t.fromNumber(0);
9532          if (!(t3.parts[0] || t3.parts[1] || t3.parts[2] || t3.parts[3])) return { quotient: t3, rem: r3 };
9533          for (let n2 = 0; n2 <= 3; n2++) r3 = r3.shiftLeft(32), r3 = r3.add(new $t(t3.parts[n2], 0)), t3.parts[n2] = r3.div(e3).low, r3 = r3.modulo(e3);
9534          return { quotient: t3, rem: r3 };
9535        }
9536        function Dt(t3, e3) {
9537          throw new q(`"${t3}" is not a valid Decimal128 string - ${e3}`);
9538        }
9539        class Rt extends nt {
9540          get _bsontype() {
9541            return "Decimal128";
9542          }
9543          constructor(t3) {
9544            if (super(), "string" == typeof t3) this.bytes = Rt.fromString(t3).bytes;
9545            else {
9546              if (!(t3 instanceof Uint8Array || i(t3))) throw new q("Decimal128 must take a Buffer or string");
9547              if (16 !== t3.byteLength) throw new q("Decimal128 must take a Buffer of 16 bytes");
9548              this.bytes = t3;
9549            }
9550          }
9551          static fromString(t3) {
9552            return Rt._fromString(t3, { allowRounding: false });
9553          }
9554          static fromStringWithRounding(t3) {
9555            return Rt._fromString(t3, { allowRounding: true });
9556          }
9557          static _fromString(t3, e3) {
9558            let r3 = false, n2 = false, o2 = false, i2 = false, s2 = 0, a2 = 0, u2 = 0, c2 = 0, l2 = 0;
9559            const f2 = [0];
9560            let p2 = 0, h2 = 0, y2 = 0, d2 = 0, b2 = new $t(0, 0), m2 = new $t(0, 0), v2 = 0, g2 = 0;
9561            if (t3.length >= 7e3) throw new q(t3 + " not a valid Decimal128 string");
9562            const _2 = t3.match(jt), w2 = t3.match(Pt), O2 = t3.match(At);
9563            if (!_2 && !w2 && !O2 || 0 === t3.length) throw new q(t3 + " not a valid Decimal128 string");
9564            if (_2) {
9565              const e4 = _2[2], r4 = _2[4], n3 = _2[5], o3 = _2[6];
9566              r4 && void 0 === o3 && Dt(t3, "missing exponent power"), r4 && void 0 === e4 && Dt(t3, "missing exponent base"), void 0 === r4 && (n3 || o3) && Dt(t3, "missing e before exponent");
9567            }
9568            if ("+" !== t3[g2] && "-" !== t3[g2] || (n2 = true, r3 = "-" === t3[g2++]), !Bt(t3[g2]) && "." !== t3[g2]) {
9569              if ("i" === t3[g2] || "I" === t3[g2]) return new Rt(r3 ? kt : Nt);
9570              if ("N" === t3[g2]) return new Rt(Tt);
9571            }
9572            for (; Bt(t3[g2]) || "." === t3[g2]; ) "." !== t3[g2] ? (p2 < 34 && ("0" !== t3[g2] || i2) && (i2 || (l2 = a2), i2 = true, f2[h2++] = parseInt(t3[g2], 10), p2 += 1), i2 && (u2 += 1), o2 && (c2 += 1), a2 += 1, g2 += 1) : (o2 && Dt(t3, "contains multiple periods"), o2 = true, g2 += 1);
9573            if (o2 && !a2) throw new q(t3 + " not a valid Decimal128 string");
9574            if ("e" === t3[g2] || "E" === t3[g2]) {
9575              const e4 = t3.substr(++g2).match(It);
9576              if (!e4 || !e4[2]) return new Rt(Tt);
9577              d2 = parseInt(e4[0], 10), g2 += e4[0].length;
9578            }
9579            if (t3[g2]) return new Rt(Tt);
9580            if (p2) {
9581              if (y2 = p2 - 1, s2 = u2, 1 !== s2) for (; "0" === t3[l2 + s2 - 1 + Number(n2) + Number(o2)]; ) s2 -= 1;
9582            } else f2[0] = 0, u2 = 1, p2 = 1, s2 = 0;
9583            for (d2 <= c2 && c2 > d2 + 16384 ? d2 = xt : d2 -= c2; d2 > Et; ) {
9584              if (y2 += 1, y2 >= 34) {
9585                if (0 === s2) {
9586                  d2 = Et;
9587                  break;
9588                }
9589                Dt(t3, "overflow");
9590              }
9591              d2 -= 1;
9592            }
9593            if (e3.allowRounding) {
9594              for (; d2 < xt || p2 < u2; ) {
9595                if (0 === y2 && s2 < p2) {
9596                  d2 = xt, s2 = 0;
9597                  break;
9598                }
9599                if (p2 < u2 ? u2 -= 1 : y2 -= 1, d2 < Et) d2 += 1;
9600                else {
9601                  if (f2.join("").match(/^0+$/)) {
9602                    d2 = Et;
9603                    break;
9604                  }
9605                  Dt(t3, "overflow");
9606                }
9607              }
9608              if (y2 + 1 < s2) {
9609                let e4 = a2;
9610                o2 && (l2 += 1, e4 += 1), n2 && (l2 += 1, e4 += 1);
9611                const i3 = parseInt(t3[l2 + y2 + 1], 10);
9612                let s3 = 0;
9613                if (i3 >= 5 && (s3 = 1, 5 === i3)) {
9614                  s3 = f2[y2] % 2 == 1 ? 1 : 0;
9615                  for (let r4 = l2 + y2 + 2; r4 < e4; r4++) if (parseInt(t3[r4], 10)) {
9616                    s3 = 1;
9617                    break;
9618                  }
9619                }
9620                if (s3) {
9621                  let t4 = y2;
9622                  for (; t4 >= 0 && ++f2[t4] > 9; t4--) if (f2[t4] = 0, 0 === t4) {
9623                    if (!(d2 < Et)) return new Rt(r3 ? kt : Nt);
9624                    d2 += 1, f2[t4] = 1;
9625                  }
9626                }
9627              }
9628            } else {
9629              for (; d2 < xt || p2 < u2; ) {
9630                if (0 === y2) {
9631                  if (0 === s2) {
9632                    d2 = xt;
9633                    break;
9634                  }
9635                  Dt(t3, "exponent underflow");
9636                }
9637                p2 < u2 ? ("0" !== t3[u2 - 1 + Number(n2) + Number(o2)] && 0 !== s2 && Dt(t3, "inexact rounding"), u2 -= 1) : (0 !== f2[y2] && Dt(t3, "inexact rounding"), y2 -= 1), d2 < Et ? d2 += 1 : Dt(t3, "overflow");
9638              }
9639              y2 + 1 < s2 && (o2 && (l2 += 1), n2 && (l2 += 1), 0 !== parseInt(t3[l2 + y2 + 1], 10) && Dt(t3, "inexact rounding"));
9640            }
9641            if (b2 = $t.fromNumber(0), m2 = $t.fromNumber(0), 0 === s2) b2 = $t.fromNumber(0), m2 = $t.fromNumber(0);
9642            else if (y2 < 17) {
9643              let t4 = 0;
9644              for (m2 = $t.fromNumber(f2[t4++]), b2 = new $t(0, 0); t4 <= y2; t4++) m2 = m2.multiply($t.fromNumber(10)), m2 = m2.add($t.fromNumber(f2[t4]));
9645            } else {
9646              let t4 = 0;
9647              for (b2 = $t.fromNumber(f2[t4++]); t4 <= y2 - 17; t4++) b2 = b2.multiply($t.fromNumber(10)), b2 = b2.add($t.fromNumber(f2[t4]));
9648              for (m2 = $t.fromNumber(f2[t4++]); t4 <= y2; t4++) m2 = m2.multiply($t.fromNumber(10)), m2 = m2.add($t.fromNumber(f2[t4]));
9649            }
9650            const S2 = (function(t4, e4) {
9651              if (!t4 && !e4) return { high: $t.fromNumber(0), low: $t.fromNumber(0) };
9652              const r4 = t4.shiftRightUnsigned(32), n3 = new $t(t4.getLowBits(), 0), o3 = e4.shiftRightUnsigned(32), i3 = new $t(e4.getLowBits(), 0);
9653              let s3 = r4.multiply(o3), a3 = r4.multiply(i3);
9654              const u3 = n3.multiply(o3);
9655              let c3 = n3.multiply(i3);
9656              return s3 = s3.add(a3.shiftRightUnsigned(32)), a3 = new $t(a3.getLowBits(), 0).add(u3).add(c3.shiftRightUnsigned(32)), s3 = s3.add(a3.shiftRightUnsigned(32)), c3 = a3.shiftLeft(32).add(new $t(c3.getLowBits(), 0)), { high: s3, low: c3 };
9657            })(b2, $t.fromString("100000000000000000"));
9658            S2.low = S2.low.add(m2), (function(t4, e4) {
9659              const r4 = t4.high >>> 0, n3 = e4.high >>> 0;
9660              return r4 < n3 || r4 === n3 && t4.low >>> 0 < e4.low >>> 0;
9661            })(S2.low, m2) && (S2.high = S2.high.add($t.fromNumber(1))), v2 = d2 + 6176;
9662            const $2 = { low: $t.fromNumber(0), high: $t.fromNumber(0) };
9663            S2.high.shiftRightUnsigned(49).and($t.fromNumber(1)).equals($t.fromNumber(1)) ? ($2.high = $2.high.or($t.fromNumber(3).shiftLeft(61)), $2.high = $2.high.or($t.fromNumber(v2).and($t.fromNumber(16383).shiftLeft(47))), $2.high = $2.high.or(S2.high.and($t.fromNumber(140737488355327)))) : ($2.high = $2.high.or($t.fromNumber(16383 & v2).shiftLeft(49)), $2.high = $2.high.or(S2.high.and($t.fromNumber(562949953421311)))), $2.low = S2.low, r3 && ($2.high = $2.high.or($t.fromString("9223372036854775808")));
9664            const j2 = rt.allocateUnsafe(16);
9665            return g2 = 0, j2[g2++] = 255 & $2.low.low, j2[g2++] = $2.low.low >> 8 & 255, j2[g2++] = $2.low.low >> 16 & 255, j2[g2++] = $2.low.low >> 24 & 255, j2[g2++] = 255 & $2.low.high, j2[g2++] = $2.low.high >> 8 & 255, j2[g2++] = $2.low.high >> 16 & 255, j2[g2++] = $2.low.high >> 24 & 255, j2[g2++] = 255 & $2.high.low, j2[g2++] = $2.high.low >> 8 & 255, j2[g2++] = $2.high.low >> 16 & 255, j2[g2++] = $2.high.low >> 24 & 255, j2[g2++] = 255 & $2.high.high, j2[g2++] = $2.high.high >> 8 & 255, j2[g2++] = $2.high.high >> 16 & 255, j2[g2++] = $2.high.high >> 24 & 255, new Rt(j2);
9666          }
9667          toString() {
9668            let t3, e3 = 0;
9669            const r3 = new Array(36);
9670            for (let t4 = 0; t4 < r3.length; t4++) r3[t4] = 0;
9671            let n2, o2, i2, s2 = 0, a2 = false, u2 = { parts: [0, 0, 0, 0] };
9672            const c2 = [];
9673            s2 = 0;
9674            const l2 = this.bytes, f2 = l2[s2++] | l2[s2++] << 8 | l2[s2++] << 16 | l2[s2++] << 24, p2 = l2[s2++] | l2[s2++] << 8 | l2[s2++] << 16 | l2[s2++] << 24, h2 = l2[s2++] | l2[s2++] << 8 | l2[s2++] << 16 | l2[s2++] << 24, y2 = l2[s2++] | l2[s2++] << 8 | l2[s2++] << 16 | l2[s2++] << 24;
9675            s2 = 0, (new $t(f2, p2), new $t(h2, y2)).lessThan($t.ZERO) && c2.push("-");
9676            const d2 = y2 >> 26 & 31;
9677            if (d2 >> 3 == 3) {
9678              if (30 === d2) return c2.join("") + "Infinity";
9679              if (31 === d2) return "NaN";
9680              t3 = y2 >> 15 & 16383, n2 = 8 + (y2 >> 14 & 1);
9681            }
9681 else n2 = y2 >> 14 & 7, t3 = y2 >> 17 & 16383;
9682            const b2 = t3 - 6176;
9683            if (u2.parts[0] = (16383 & y2) + ((15 & n2) << 14), u2.parts[1] = h2, u2.parts[2] = p2, u2.parts[3] = f2, 0 === u2.parts[0] && 0 === u2.parts[1] && 0 === u2.parts[2] && 0 === u2.parts[3]) a2 = true;
9684            else for (i2 = 3; i2 >= 0; i2--) {
9685              let t4 = 0;
9686              const e4 = Mt(u2);
9687              if (u2 = e4.quotient, t4 = e4.rem.low, t4) for (o2 = 8; o2 >= 0; o2--) r3[9 * i2 + o2] = t4 % 10, t4 = Math.floor(t4 / 10);
9688            }
9689            if (a2) e3 = 1, r3[s2] = 0;
9690            else for (e3 = 36; !r3[s2]; ) e3 -= 1, s2 += 1;
9691            const m2 = e3 - 1 + b2;
9692            if (m2 >= 34 || m2 <= -7 || b2 > 0) {
9693              if (e3 > 34) return c2.push("0"), b2 > 0 ? c2.push(`E+${b2}`) : b2 < 0 && c2.push(`E${b2}`), c2.join("");
9694              c2.push(`${r3[s2++]}`), e3 -= 1, e3 && c2.push(".");
9695              for (let t4 = 0; t4 < e3; t4++) c2.push(`${r3[s2++]}`);
9696              c2.push("E"), m2 > 0 ? c2.push(`+${m2}`) : c2.push(`${m2}`);
9697            } else if (b2 >= 0) for (let t4 = 0; t4 < e3; t4++) c2.push(`${r3[s2++]}`);
9698            else {
9699              let t4 = e3 + b2;
9700              if (t4 > 0) for (let e4 = 0; e4 < t4; e4++) c2.push(`${r3[s2++]}`);
9701              else c2.push("0");
9702              for (c2.push("."); t4++ < 0; ) c2.push("0");
9703              for (let n3 = 0; n3 < e3 - Math.max(t4 - 1, 0); n3++) c2.push(`${r3[s2++]}`);
9704            }
9705            return c2.join("");
9706          }
9707          toJSON() {
9708            return { $numberDecimal: this.toString() };
9709          }
9710          toExtendedJSON() {
9711            return { $numberDecimal: this.toString() };
9712          }
9713          static fromExtendedJSON(t3) {
9714            return Rt.fromString(t3.$numberDecimal);
9715          }
9716          inspect(t3, e3, r3) {
9717            return r3 ?? (r3 = l), `new Decimal128(${r3(this.toString(), e3)})`;
9718          }
9719        }
9720        class Ut extends nt {
9721          get _bsontype() {
9722            return "Double";
9723          }
9724          constructor(t3) {
9725            super(), t3 instanceof Number && (t3 = t3.valueOf()), this.value = +t3;
9726          }
9727          static fromString(t3) {
9728            const e3 = Number(t3);
9729            if ("NaN" === t3) return new Ut(NaN);
9730            if ("Infinity" === t3) return new Ut(1 / 0);
9731            if ("-Infinity" === t3) return new Ut(-1 / 0);
9732            if (!Number.isFinite(e3)) throw new q(`Input: ${t3} is not representable as a Double`);
9733            if (t3.trim() !== t3) throw new q(`Input: '${t3}' contains whitespace`);
9734            if ("" === t3) throw new q("Input is an empty string");
9735            if (/[^-0-9.+eE]/.test(t3)) throw new q(`Input: '${t3}' is not in decimal or exponential notation`);
9736            return new Ut(e3);
9737          }
9738          valueOf() {
9739            return this.value;
9740          }
9741          toJSON() {
9742            return this.value;
9743          }
9744          toString(t3) {
9745            return this.value.toString(t3);
9746          }
9747          toExtendedJSON(t3) {
9748            return t3 && (t3.legacy || t3.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() };
9749          }
9750          static fromExtendedJSON(t3, e3) {
9751            const r3 = parseFloat(t3.$numberDouble);
9752            return e3 && e3.relaxed ? r3 : new Ut(r3);
9753          }
9754          inspect(t3, e3, r3) {
9755            return r3 ?? (r3 = l), `new Double(${r3(this.value, e3)})`;
9756          }
9757        }
9758        class Ct extends nt {
9759          get _bsontype() {
9760            return "Int32";
9761          }
9762          constructor(t3) {
9763            super(), t3 instanceof Number && (t3 = t3.valueOf()), this.value = 0 | +t3;
9764          }
9765          static fromString(t3) {
9766            const e3 = bt(t3), r3 = Number(t3);
9767            if (h < r3) throw new q(`Input: '${t3}' is larger than the maximum value for Int32`);
9768            if (y > r3) throw new q(`Input: '${t3}' is smaller than the minimum value for Int32`);
9769            if (!Number.isSafeInteger(r3)) throw new q(`Input: '${t3}' is not a safe integer`);
9770            if (r3.toString() !== e3) throw new q(`Input: '${t3}' is not a valid Int32 string`);
9771            return new Ct(r3);
9772          }
9773          valueOf() {
9774            return this.value;
9775          }
9776          toString(t3) {
9777            return this.value.toString(t3);
9778          }
9779          toJSON() {
9780            return this.value;
9781          }
9782          toExtendedJSON(t3) {
9783            return t3 && (t3.relaxed || t3.legacy) ? this.value : { $numberInt: this.value.toString() };
9784          }
9785          static fromExtendedJSON(t3, e3) {
9786            return e3 && e3.relaxed ? parseInt(t3.$numberInt, 10) : new Ct(t3.$numberInt);
9787          }
9788          inspect(t3, e3, r3) {
9789            return r3 ?? (r3 = l), `new Int32(${r3(this.value, e3)})`;
9790          }
9791        }
9792        class Ft extends nt {
9793          get _bsontype() {
9794            return "MaxKey";
9795          }
9796          toExtendedJSON() {
9797            return { $maxKey: 1 };
9798          }
9799          static fromExtendedJSON() {
9800            return new Ft();
9801          }
9802          inspect() {
9803            return "new MaxKey()";
9804          }
9805        }
9806        class Lt extends nt {
9807          get _bsontype() {
9808            return "MinKey";
9809          }
9810          toExtendedJSON() {
9811            return { $minKey: 1 };
9812          }
9813          static fromExtendedJSON() {
9814            return new Lt();
9815          }
9816          inspect() {
9817            return "new MinKey()";
9818          }
9819        }
9820        let Vt = null;
9821        const qt = /* @__PURE__ */ new WeakMap();
9822        class Jt extends nt {
9823          get _bsontype() {
9824            return "ObjectId";
9825          }
9826          constructor(t3) {
9827            let e3;
9828            if (super(), "object" == typeof t3 && t3 && "id" in t3) {
9829              if ("string" != typeof t3.id && !ArrayBuffer.isView(t3.id)) throw new q("Argument passed in must have an id that is of type string or Buffer");
9830              e3 = "toHexString" in t3 && "function" == typeof t3.toHexString ? rt.fromHex(t3.toHexString()) : t3.id;
9831            } else e3 = t3;
9832            if (null == e3 || "number" == typeof e3) this.buffer = Jt.generate("number" == typeof e3 ? e3 : void 0);
9833            else if (ArrayBuffer.isView(e3) && 12 === e3.byteLength) this.buffer = rt.toLocalBufferType(e3);
9834            else {
9835              if ("string" != typeof e3) throw new q("Argument passed in does not match the accepted types");
9836              if (!Jt.validateHexString(e3)) throw new q("input must be a 24 character hex string, 12 byte Uint8Array, or an integer");
9837              this.buffer = rt.fromHex(e3), Jt.cacheHexString && qt.set(this, e3);
9838            }
9839          }
9840          get id() {
9841            return this.buffer;
9842          }
9843          set id(t3) {
9844            this.buffer = t3, Jt.cacheHexString && qt.set(this, rt.toHex(t3));
9845          }
9846          static validateHexString(t3) {
9847            if (24 !== (t3 == null ? void 0 : t3.length)) return false;
9848            for (let e3 = 0; e3 < 24; e3++) {
9849              const r3 = t3.charCodeAt(e3);
9850              if (!(r3 >= 48 && r3 <= 57 || r3 >= 97 && r3 <= 102 || r3 >= 65 && r3 <= 70)) return false;
9851            }
9852            return true;
9853          }
9854          toHexString() {
9855            if (Jt.cacheHexString) {
9856              const t4 = qt.get(this);
9857              if (t4) return t4;
9858            }
9859            const t3 = rt.toHex(this.id);
9860            return Jt.cacheHexString && qt.set(this, t3), t3;
9861          }
9862          static getInc() {
9863            return Jt.index = (Jt.index + 1) % 16777215;
9864          }
9865          static generate(t3) {
9866            "number" != typeof t3 && (t3 = Math.floor(Date.now() / 1e3));
9867            const e3 = Jt.getInc(), r3 = rt.allocateUnsafe(12);
9868            return at.setInt32BE(r3, 0, t3), null === Vt && (Vt = rt.randomBytes(5)), r3[4] = Vt[0], r3[5] = Vt[1], r3[6] = Vt[2], r3[7] = Vt[3], r3[8] = Vt[4], r3[11] = 255 & e3, r3[10] = e3 >> 8 & 255, r3[9] = e3 >> 16 & 255, r3;
9869          }
9870          toString(t3) {
9871            return "base64" === t3 ? rt.toBase64(this.id) : this.toHexString();
9872          }
9873          toJSON() {
9874            return this.toHexString();
9875          }
9876          static is(t3) {
9877            return null != t3 && "object" == typeof t3 && "_bsontype" in t3 && "ObjectId" === t3._bsontype;
9878          }
9879          equals(t3) {
9880            if (null == t3) return false;
9881            if (Jt.is(t3)) return this.buffer[11] === t3.buffer[11] && rt.equals(this.buffer, t3.buffer);
9882            if ("string" == typeof t3) return t3.toLowerCase() === this.toHexString();
9883            if ("object" == typeof t3 && "function" == typeof t3.toHexString) {
9884              const e3 = t3.toHexString(), r3 = this.toHexString();
9885              return "string" == typeof e3 && e3.toLowerCase() === r3;
9886            }
9887            return false;
9888          }
9889          getTimestamp() {
9890            const t3 = /* @__PURE__ */ new Date(), e3 = at.getUint32BE(this.buffer, 0);
9891            return t3.setTime(1e3 * Math.floor(e3)), t3;
9892          }
9893          static createPk() {
9894            return new Jt();
9895          }
9896          serializeInto(t3, e3) {
9897            return t3[e3] = this.buffer[0], t3[e3 + 1] = this.buffer[1], t3[e3 + 2] = this.buffer[2], t3[e3 + 3] = this.buffer[3], t3[e3 + 4] = this.buffer[4], t3[e3 + 5] = this.buffer[5], t3[e3 + 6] = this.buffer[6], t3[e3 + 7] = this.buffer[7], t3[e3 + 8] = this.buffer[8], t3[e3 + 9] = this.buffer[9], t3[e3 + 10] = this.buffer[10], t3[e3 + 11] = this.buffer[11], 12;
9898          }
9899          static createFromTime(t3) {
9900            const e3 = rt.allocate(12);
9901            for (let t4 = 11; t4 >= 4; t4--) e3[t4] = 0;
9902            return at.setInt32BE(e3, 0, t3), new Jt(e3);
9903          }
9904          static createFromHexString(t3) {
9905            if (24 !== (t3 == null ? void 0 : t3.length)) throw new q("hex string must be 24 characters");
9906            return new Jt(rt.fromHex(t3));
9907          }
9908          static createFromBase64(t3) {
9909            if (16 !== (t3 == null ? void 0 : t3.length)) throw new q("base64 string must be 16 characters");
9910            return new Jt(rt.fromBase64(t3));
9911          }
9912          static isValid(t3) {
9913            if (null == t3) return false;
9914            if ("string" == typeof t3) return Jt.validateHexString(t3);
9915            try {
9916              return new Jt(t3), true;
9917            } catch {
9918              return false;
9919            }
9920          }
9921          toExtendedJSON() {
9922            return this.toHexString ? { $oid: this.toHexString() } : { $oid: this.toString("hex") };
9923          }
9924          static fromExtendedJSON(t3) {
9925            return new Jt(t3.$oid);
9926          }
9927          isCached() {
9928            return Jt.cacheHexString && qt.has(this);
9929          }
9930          inspect(t3, e3, r3) {
9931            return r3 ?? (r3 = l), `new ObjectId(${r3(this.toHexString(), e3)})`;
9932          }
9933        }
9934        function zt(t3, e3, r3) {
9935          let n2 = 5;
9936          if (Array.isArray(t3)) for (let o2 = 0; o2 < t3.length; o2++) n2 += Kt(o2.toString(), t3[o2], e3, true, r3);
9937          else {
9938            "function" == typeof (t3 == null ? void 0 : t3.toBSON) && (t3 = t3.toBSON());
9939            for (const o2 of Object.keys(t3)) n2 += Kt(o2, t3[o2], e3, false, r3);
9940          }
9941          return n2;
9942        }
9943        function Kt(t3, e3, r3 = false, n2 = false, o2 = false) {
9944          switch ("function" == typeof (e3 == null ? void 0 : e3.toBSON) && (e3 = e3.toBSON()), typeof e3) {
9945            case "string":
9946              return 1 + rt.utf8ByteLength(t3) + 1 + 4 + rt.utf8ByteLength(e3) + 1;
9947            case "number":
9948              return Math.floor(e3) === e3 && e3 >= v && e3 <= m && e3 >= y && e3 <= h ? (null != t3 ? rt.utf8ByteLength(t3) + 1 : 0) + 5 : (null != t3 ? rt.utf8ByteLength(t3) + 1 : 0) + 9;
9949            case "undefined":
9950              return n2 || !o2 ? (null != t3 ? rt.utf8ByteLength(t3) + 1 : 0) + 1 : 0;
9951            case "boolean":
9952              return (null != t3 ? rt.utf8ByteLength(t3) + 1 : 0) + 2;
9953            case "object":
9954              if (null != e3 && "string" == typeof e3._bsontype && e3[p] !== f) throw new J();
9955              if (null == e3 || "MinKey" === e3._bsontype || "MaxKey" === e3._bsontype) return (null != t3 ? rt.utf8ByteLength(t3) + 1 : 0) + 1;
9956              if ("ObjectId" === e3._bsontype) return (null != t3 ? rt.utf8ByteLength(t3) + 1 : 0) + 13;
9957              if (e3 instanceof Date || c(e3)) return (null != t3 ? rt.utf8ByteLength(t3) + 1 : 0) + 9;
9958              if (ArrayBuffer.isView(e3) || e3 instanceof ArrayBuffer || s(e3)) return (null != t3 ? rt.utf8ByteLength(t3) + 1 : 0) + 6 + e3.byteLength;
9959              if ("Long" === e3._bsontype || "Double" === e3._bsontype || "Timestamp" === e3._bsontype) return (null != t3 ? rt.utf8ByteLength(t3) + 1 : 0) + 9;
9960              if ("Decimal128" === e3._bsontype) return (null != t3 ? rt.utf8ByteLength(t3) + 1 : 0) + 17;
9961              if ("Code" === e3._bsontype) return null != e3.scope && Object.keys(e3.scope).length > 0 ? (null != t3 ? rt.utf8ByteLength(t3) + 1 : 0) + 1 + 4 + 4 + rt.utf8ByteLength(e3.code.toString()) + 1 + zt(e3.scope, r3, o2) : (null != t3 ? rt.utf8ByteLength(t3) + 1 : 0) + 1 + 4 + rt.utf8ByteLength(e3.code.toString()) + 1;
9962              if ("Binary" === e3._bsontype) {
9963                const r4 = e3;
9964                return r4.sub_type === ut.SUBTYPE_BYTE_ARRAY ? (null != t3 ? rt.utf8ByteLength(t3) + 1 : 0) + (r4.position + 1 + 4 + 1 + 4) : (null != t3 ? rt.utf8ByteLength(t3) + 1 : 0) + (r4.position + 1 + 4 + 1);
9965              }
9966              if ("Symbol" === e3._bsontype) return (null != t3 ? rt.utf8ByteLength(t3) + 1 : 0) + rt.utf8ByteLength(e3.value) + 4 + 1 + 1;
9967              if ("DBRef" === e3._bsontype) {
9968                const n3 = Object.assign({ $ref: e3.collection, $id: e3.oid }, e3.fields);
9969                return null != e3.db && (n3.$db = e3.db), (null != t3 ? rt.utf8ByteLength(t3) + 1 : 0) + 1 + zt(n3, r3, o2);
9970              }
9971              return e3 instanceof RegExp || a(e3) ? (null != t3 ? rt.utf8ByteLength(t3) + 1 : 0) + 1 + rt.utf8ByteLength(e3.source) + 1 + (e3.global ? 1 : 0) + (e3.ignoreCase ? 1 : 0) + (e3.multiline ? 1 : 0) + 1 : "BSONRegExp" === e3._bsontype ? (null != t3 ? rt.utf8ByteLength(t3) + 1 : 0) + 1 + rt.utf8ByteLength(e3.pattern) + 1 + rt.utf8ByteLength(e3.options) + 1 : (null != t3 ? rt.utf8ByteLength(t3) + 1 : 0) + zt(e3, r3, o2) + 1;
9972            case "function":
9973              return r3 ? (null != t3 ? rt.utf8ByteLength(t3) + 1 : 0) + 1 + 4 + rt.utf8ByteLength(e3.toString()) + 1 : 0;
9974            case "bigint":
9975              return (null != t3 ? rt.utf8ByteLength(t3) + 1 : 0) + 9;
9976            case "symbol":
9977              return 0;
9978            default:
9979              throw new q("Unrecognized JS type: " + typeof e3);
9980          }
9981        }
9982        Jt.index = Math.floor(16777215 * Math.random());
9983        class Ht extends nt {
9984          get _bsontype() {
9985            return "BSONRegExp";
9986          }
9987          constructor(t3, e3) {
9988            if (super(), this.pattern = t3, this.options = (e3 ?? "").split("").sort().join(""), -1 !== this.pattern.indexOf("\0")) throw new q(`BSON Regex patterns cannot contain null bytes, found: ${JSON.stringify(this.pattern)}`);
9989            if (-1 !== this.options.indexOf("\0")) throw new q(`BSON Regex options cannot contain null bytes, found: ${JSON.stringify(this.options)}`);
9990            for (let t4 = 0; t4 < this.options.length; t4++) if ("i" !== this.options[t4] && "m" !== this.options[t4] && "x" !== this.options[t4] && "l" !== this.options[t4] && "s" !== this.options[t4] && "u" !== this.options[t4]) throw new q(`The regular expression o
9990ption [${this.options[t4]}] is not supported`);
9991          }
9992          static parseOptions(t3) {
9993            return t3 ? t3.split("").sort().join("") : "";
9994          }
9995          toExtendedJSON(t3) {
9996            return (t3 = t3 || {}).legacy ? { $regex: this.pattern, $options: this.options } : { $regularExpression: { pattern: this.pattern, options: this.options } };
9997          }
9998          static fromExtendedJSON(t3) {
9999            if ("$regex" in t3) {
10000              if ("string" == typeof t3.$regex) return new Ht(t3.$regex, Ht.parseOptions(t3.$options));
10001              if ("BSONRegExp" === t3.$regex._bsontype) return t3;
10002            }
10003            if ("$regularExpression" in t3) return new Ht(t3.$regularExpression.pattern, Ht.parseOptions(t3.$regularExpression.options));
10004            throw new q(`Unexpected BSONRegExp EJSON object form: ${JSON.stringify(t3)}`);
10005          }
10006          inspect(t3, e3, r3) {
10007            const n2 = (function(t4) {
10008              if (null != t4 && "object" == typeof t4 && "stylize" in t4 && "function" == typeof t4.stylize) return t4.stylize;
10009            })(e3) ?? ((t4) => t4);
10010            return r3 ?? (r3 = l), `new BSONRegExp(${n2(r3(this.pattern), "regexp")}, ${n2(r3(this.options), "regexp")})`;
10011          }
10012        }
10013        class Wt extends nt {
10014          get _bsontype() {
10015            return "BSONSymbol";
10016          }
10017          constructor(t3) {
10018            super(), this.value = t3;
10019          }
10020          valueOf() {
10021            return this.value;
10022          }
10023          toString() {
10024            return this.value;
10025          }
10026          toJSON() {
10027            return this.value;
10028          }
10029          toExtendedJSON() {
10030            return { $symbol: this.value };
10031          }
10032          static fromExtendedJSON(t3) {
10033            return new Wt(t3.$symbol);
10034          }
10035          inspect(t3, e3, r3) {
10036            return r3 ?? (r3 = l), `new BSONSymbol(${r3(this.value, e3)})`;
10037          }
10038        }
10039        const Gt = $t;
10040        class Qt extends Gt {
10041          get _bsontype() {
10042            return "Timestamp";
10043          }
10044          get i() {
10045            return this.low >>> 0;
10046          }
10047          get t() {
10048            return this.high >>> 0;
10049          }
10050          constructor(t3) {
10051            if (null == t3) super(0, 0, true);
10052            else if ("bigint" == typeof t3) super(t3, true);
10053            else if ($t.isLong(t3)) super(t3.low, t3.high, true);
10054            else {
10055              if ("object" != typeof t3 || !("t" in t3) || !("i" in t3)) throw new q("A Timestamp can only be constructed with: bigint, Long, or { t: number; i: number }");
10056              {
10057                if ("number" != typeof t3.t && ("object" != typeof t3.t || "Int32" !== t3.t._bsontype)) throw new q("Timestamp constructed from { t, i } must provide t as a number");
10058                if ("number" != typeof t3.i && ("object" != typeof t3.i || "Int32" !== t3.i._bsontype)) throw new q("Timestamp constructed from { t, i } must provide i as a number");
10059                const e3 = Number(t3.t), r3 = Number(t3.i);
10060                if (e3 < 0 || Number.isNaN(e3)) throw new q("Timestamp constructed from { t, i } must provide a positive t");
10061                if (r3 < 0 || Number.isNaN(r3)) throw new q("Timestamp constructed from { t, i } must provide a positive i");
10062                if (e3 > 4294967295) throw new q("Timestamp constructed from { t, i } must provide t equal or less than uint32 max");
10063                if (r3 > 4294967295) throw new q("Timestamp constructed from { t, i } must provide i equal or less than uint32 max");
10064                super(r3, e3, true);
10065              }
10066            }
10067          }
10068          toJSON() {
10069            return { $timestamp: this.toString() };
10070          }
10071          static fromInt(t3) {
10072            return new Qt($t.fromInt(t3, true));
10073          }
10074          static fromNumber(t3) {
10075            return new Qt($t.fromNumber(t3, true));
10076          }
10077          static fromBits(t3, e3) {
10078            return new Qt({ i: t3, t: e3 });
10079          }
10080          static fromString(t3, e3) {
10081            return new Qt($t.fromString(t3, true, e3));
10082          }
10083          toExtendedJSON() {
10084            return { $timestamp: { t: this.t, i: this.i } };
10085          }
10086          static fromExtendedJSON(t3) {
10087            const e3 = $t.isLong(t3.$timestamp.i) ? t3.$timestamp.i.getLowBitsUnsigned() : t3.$timestamp.i, r3 = $t.isLong(t3.$timestamp.t) ? t3.$timestamp.t.getLowBitsUnsigned() : t3.$timestamp.t;
10088            return new Qt({ t: r3, i: e3 });
10089          }
10090          inspect(t3, e3, r3) {
10091            return r3 ?? (r3 = l), `new Timestamp({ t: ${r3(this.t, e3)}, i: ${r3(this.i, e3)} })`;
10092          }
10093        }
10094        Qt.MAX_VALUE = $t.MAX_UNSIGNED_VALUE;
10095        const Yt = $t.fromNumber(m), Zt = $t.fromNumber(v);
10096        function Xt(t3, e3, r3) {
10097          const n2 = (e3 = null == e3 ? {} : e3) && e3.index ? e3.index : 0, o2 = at.getInt32LE(t3, n2);
10098          if (o2 < 5) throw new q(`bson size must be >= 5, is ${o2}`);
10099          if (e3.allowObjectSmallerThanBufferSize && t3.length < o2) throw new q(`buffer length ${t3.length} must be >= bson size ${o2}`);
10100          if (!e3.allowObjectSmallerThanBufferSize && t3.length !== o2) throw new q(`buffer length ${t3.length} must === bson size ${o2}`);
10101          if (o2 + n2 > t3.byteLength) throw new q(`(bson size ${o2} + options.index ${n2} must be <= buffer length ${t3.byteLength})`);
10102          if (0 !== t3[n2 + o2 - 1]) throw new q("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");
10103          return ee(t3, n2, e3, r3);
10104        }
10105        const te = /^\$ref$|^\$id$|^\$db$/;
10106        function ee(t3, e3, r3, n2 = false) {
10107          const o2 = null == r3.fieldsAsRaw ? null : r3.fieldsAsRaw, i2 = null != r3.raw && r3.raw, s2 = "boolean" == typeof r3.bsonRegExp && r3.bsonRegExp, a2 = r3.promoteBuffers ?? false, u2 = r3.promoteLongs ?? true, c2 = r3.promoteValues ?? true, l2 = r3.useBigInt64 ?? false;
10108          if (l2 && !c2) throw new q("Must either request bigint or Long for int64 deserialization");
10109          if (l2 && !u2) throw new q("Must either request bigint or Long for int64 deserialization");
10110          let f2, p2, h2 = true;
10111          const y2 = (null == r3.validation ? { utf8: true } : r3.validation).utf8;
10112          if ("boolean" == typeof y2) f2 = y2;
10113          else {
10114            h2 = false;
10115            const t4 = Object.keys(y2).map(function(t5) {
10116              return y2[t5];
10117            });
10118            if (0 === t4.length) throw new q("UTF-8 validation setting cannot be empty");
10119            if ("boolean" != typeof t4[0]) throw new q("Invalid UTF-8 validation option, must specify boolean values");
10120            if (f2 = t4[0], !t4.every((t5) => t5 === f2)) throw new q("Invalid UTF-8 validation option - keys must be all true or all false");
10121          }
10122          if (!h2) {
10123            p2 = /* @__PURE__ */ new Set();
10124            for (const t4 of Object.keys(y2)) p2.add(t4);
10125          }
10126          const d2 = e3;
10127          if (t3.length < 5) throw new q("corrupt bson message < 5 bytes long");
10128          const b2 = at.getInt32LE(t3, e3);
10129          if (e3 += 4, b2 < 5 || b2 > t3.length) throw new q("corrupt bson message");
10130          const m2 = n2 ? [] : {};
10131          let v2 = 0, F2 = !n2 && null;
10132          for (; ; ) {
10133            const y3 = t3[e3++];
10134            if (0 === y3) break;
10135            let d3 = e3;
10136            for (; 0 !== t3[d3] && d3 < t3.length; ) d3++;
10137            if (d3 >= t3.byteLength) throw new q("Bad BSON Document: illegal CString");
10138            const b3 = n2 ? v2++ : rt.toUTF8(t3, e3, d3, false);
10139            let V2, J2 = true;
10140            if (J2 = h2 || (p2 == null ? void 0 : p2.has(b3)) ? f2 : !f2, false !== F2 && "$" === b3[0] && (F2 = te.test(b3)), e3 = d3 + 1, y3 === _) {
10141              const r4 = at.getInt32LE(t3, e3);
10142              if (e3 += 4, r4 <= 0 || r4 > t3.length - e3 || 0 !== t3[e3 + r4 - 1]) throw new q("bad string length in bson");
10143              V2 = rt.toUTF8(t3, e3, e3 + r4 - 1, J2), e3 += r4;
10144            } else if (y3 === j) {
10145              const r4 = rt.allocateUnsafe(12);
10146              for (let n3 = 0; n3 < 12; n3++) r4[n3] = t3[e3 + n3];
10147              V2 = new Jt(r4), e3 += 12;
10148            } else if (y3 === B && false === c2) V2 = new Ct(at.getInt32LE(t3, e3)), e3 += 4;
10149            else if (y3 === B) V2 = at.getInt32LE(t3, e3), e3 += 4;
10150            else if (y3 === g) V2 = at.getFloat64LE(t3, e3), e3 += 8, false === c2 && (V2 = new Ut(V2));
10151            else if (y3 === A) {
10152              const r4 = at.getInt32LE(t3, e3), n3 = at.getInt32LE(t3, e3 + 4);
10153              e3 += 8, V2 = new Date(new $t(r4, n3).toNumber());
10154            } else if (y3 === P) {
10155              if (0 !== t3[e3] && 1 !== t3[e3]) throw new q("illegal boolean type value");
10156              V2 = 1 === t3[e3++];
10157            } else if (y3 === w) {
10158              const n3 = e3, o3 = at.getInt32LE(t3, e3);
10159              if (o3 <= 0 || o3 > t3.length - e3) throw new q("bad embedded document length in bson");
10160              if (i2) V2 = t3.subarray(e3, e3 + o3);
10161              else {
10162                let e4 = r3;
10163                h2 || (e4 = { ...r3, validation: { utf8: J2 } }), V2 = ee(t3, n3, e4, false);
10164              }
10165              e3 += o3;
10166            } else if (y3 === O) {
10167              const n3 = e3, i3 = at.getInt32LE(t3, e3);
10168              let s3 = r3;
10169              const a3 = e3 + i3;
10170              if (o2 && o2[b3] && (s3 = { ...r3, raw: true }), h2 || (s3 = { ...s3, validation: { utf8: J2 } }), V2 = ee(t3, n3, s3, true), 0 !== t3[(e3 += i3) - 1]) throw new q("invalid array terminator byte");
10171              if (e3 !== a3) throw new q("corrupted array bson");
10172            } else if (y3 === $) V2 = void 0;
10173            else if (y3 === E) V2 = null;
10174            else if (y3 === D) if (l2) V2 = at.getBigInt64LE(t3, e3), e3 += 8;
10175            else {
10176              const r4 = at.getInt32LE(t3, e3), n3 = at.getInt32LE(t3, e3 + 4);
10177              e3 += 8;
10178              const o3 = new $t(r4, n3);
10179              V2 = u2 && true === c2 && o3.lessThanOrEqual(Yt) && o3.greaterThanOrEqual(Zt) ? o3.toNumber() : o3;
10180            }
10181            else if (y3 === R) {
10182              const r4 = rt.allocateUnsafe(16);
10183              for (let n3 = 0; n3 < 16; n3++) r4[n3] = t3[e3 + n3];
10184              e3 += 16, V2 = new Rt(r4);
10185            } else if (y3 === S) {
10186              let r4 = at.getInt32LE(t3, e3);
10187              e3 += 4;
10188              const n3 = r4, o3 = t3[e3++];
10189              if (r4 < 0) throw new q("Negative binary type element size found");
10190              if (r4 > t3.byteLength) throw new q("Binary type size larger than document size");
10191              if (o3 === ut.SUBTYPE_BYTE_ARRAY) {
10192                if (r4 = at.getInt32LE(t3, e3), e3 += 4, r4 < 0) throw new q("Negative binary type element size found for subtype 0x02");
10193                if (r4 > n3 - 4) throw new q("Binary type with subtype 0x02 contains too long binary size");
10194                if (r4 < n3 - 4) throw new q("Binary type with subtype 0x02 contains too short binary size");
10195              }
10196              a2 && c2 ? V2 = rt.toLocalBufferType(t3.subarray(e3, e3 + r4)) : (V2 = new ut(t3.subarray(e3, e3 + r4), o3), o3 === L && pt.isValid(V2) && (V2 = V2.toUUID())), e3 += r4;
10197            } else if (y3 === x && false === s2) {
10198              for (d3 = e3; 0 !== t3[d3] && d3 < t3.length; ) d3++;
10199              if (d3 >= t3.length) throw new q("Bad BSON Document: illegal CString");
10200              const r4 = rt.toUTF8(t3, e3, d3, false);
10201              for (d3 = e3 = d3 + 1; 0 !== t3[d3] && d3 < t3.length; ) d3++;
10202              if (d3 >= t3.length) throw new q("Bad BSON Document: illegal CString");
10203              const n3 = rt.toUTF8(t3, e3, d3, false);
10204              e3 = d3 + 1;
10205              const o3 = new Array(n3.length);
10206              for (d3 = 0; d3 < n3.length; d3++) switch (n3[d3]) {
10207                case "m":
10208                  o3[d3] = "m";
10209                  break;
10210                case "s":
10211                  o3[d3] = "g";
10212                  break;
10213                case "i":
10214                  o3[d3] = "i";
10215              }
10216              V2 = new RegExp(r4, o3.join(""));
10217            } else if (y3 === x && true === s2) {
10218              for (d3 = e3; 0 !== t3[d3] && d3 < t3.length; ) d3++;
10219              if (d3 >= t3.length) throw new q("Bad BSON Document: illegal CString");
10220              const r4 = rt.toUTF8(t3, e3, d3, false);
10221              for (d3 = e3 = d3 + 1; 0 !== t3[d3] && d3 < t3.length; ) d3++;
10222              if (d3 >= t3.length) throw new q("Bad BSON Document: illegal CString");
10223              const n3 = rt.toUTF8(t3, e3, d3, false);
10224              e3 = d3 + 1, V2 = new Ht(r4, n3);
10225            } else if (y3 === N) {
10226              const r4 = at.getInt32LE(t3, e3);
10227              if (e3 += 4, r4 <= 0 || r4 > t3.length - e3 || 0 !== t3[e3 + r4 - 1]) throw new q("bad string length in bson");
10228              const n3 = rt.toUTF8(t3, e3, e3 + r4 - 1, J2);
10229              V2 = c2 ? n3 : new Wt(n3), e3 += r4;
10230            } else if (y3 === M) V2 = new Qt({ i: at.getUint32LE(t3, e3), t: at.getUint32LE(t3, e3 + 4) }), e3 += 8;
10231            else if (y3 === U) V2 = new Lt();
10232            else if (y3 === C) V2 = new Ft();
10233            else if (y3 === k) {
10234              const r4 = at.getInt32LE(t3, e3);
10235              if (e3 += 4, r4 <= 0 || r4 > t3.length - e3 || 0 !== t3[e3 + r4 - 1]) throw new q("bad string length in bson");
10236              const n3 = rt.toUTF8(t3, e3, e3 + r4 - 1, J2);
10237              V2 = new ht(n3), e3 += r4;
10238            } else if (y3 === I) {
10239              const n3 = at.getInt32LE(t3, e3);
10240              if (e3 += 4, n3 < 13) throw new q("code_w_scope total size shorter minimum expected length");
10241              const o3 = at.getInt32LE(t3, e3);
10242              if (e3 += 4, o3 <= 0 || o3 > t3.length - e3 || 0 !== t3[e3 + o3 - 1]) throw new q("bad string length in bson");
10243              const i3 = rt.toUTF8(t3, e3, e3 + o3 - 1, J2), s3 = e3 += o3, a3 = at.getInt32LE(t3, e3), u3 = ee(t3, s3, r3, false);
10244              if (e3 += a3, n3 < 8 + a3 + o3) throw new q("code_w_scope total size is too short, truncating scope");
10245              if (n3 > 8 + a3 + o3) throw new q("code_w_scope total size is too long, clips outer document");
10246              V2 = new ht(i3, u3);
10247            } else {
10248              if (y3 !== T) throw new q(`Detected unknown BSON type ${y3.toString(16)} for fieldname "${b3}"`);
10249              {
10250                const r4 = at.getInt32LE(t3, e3);
10251                if (e3 += 4, r4 <= 0 || r4 > t3.length - e3 || 0 !== t3[e3 + r4 - 1]) throw new q("bad string length in bson");
10252                const n3 = rt.toUTF8(t3, e3, e3 + r4 - 1, J2);
10253                e3 += r4;
10254                const o3 = rt.allocateUnsafe(12);
10255                for (let r5 = 0; r5 < 12; r5++) o3[r5] = t3[e3 + r5];
10256                const i3 = new Jt(o3);
10257                e3 += 12, V2 = new dt(n3, i3);
10258              }
10259            }
10260            "__proto__" === b3 ? Object.defineProperty(m2, b3, { value: V2, writable: true, enumerable: true, configurable: true }) : m2[b3] = V2;
10261          }
10262          if (b2 !== e3 - d2) {
10263            if (n2) throw new q("corrupt array bson");
10264            throw new q("corrupt object bson");
10265          }
10266          if (!F2) return m2;
10267          if (yt(m2)) {
10268            const t4 = Object.assign({}, m2);
10269            return delete t4.$ref, delete t4.$id, delete t4.$db, new dt(m2.$ref, m2.$id, m2.$db, t4);
10270          }
10271          return m2;
10272        }
10273        const re = /\x00/, ne = /* @__PURE__ */ new Set(["$db", "$ref", "$id", "$clusterTime"]);
10274        function oe(t3, e3, r3, n2) {
10275          t3[n2++] = _, t3[(n2 = n2 + rt.encodeUTF8Into(t3, e3, n2) + 1) - 1] = 0;
10276          const o2 = rt.encodeUTF8Into(t3, r3, n2 + 4);
10277          return at.setInt32LE(t3, n2, o2 + 1), n2 = n2 + 4 + o2, t3[n2++] = 0, n2;
10278        }
10279        function ie(t3, e3, r3, n2) {
10280          const o2 = !Object.is(r3, -0) && Number.isSafeInteger(r3) && r3 <= h && r3 >= y ? B : g;
10281          return t3[n2++] = o2, n2 += rt.encodeUTF8Into(t3, e3, n2), t3[n2++] = 0, n2 + (o2 === B ? at.setInt32LE(t3, n2, r3) : at.setFloat64LE(t3, n2, r3));
10282        }
10283        function se(t3, e3, r3, n2) {
10284          return t3[n2++] = D, n2 += rt.encodeUTF8Into(t3, e3, n2), t3[n2++] = 0, n2 + at.setBigInt64LE(t3, n2, r3);
10285        }
10286        function ae(t3, e3, r3, n2) {
10287          return t3[n2++] = E, n2 += rt.encodeUTF8Into(t3, e3, n2), t3[n2++] = 0, n2;
10288        }
10289        function ue(t3, e3, r3, n2) {
10290          return t3[n2++] = P, n2 += rt.encodeUTF8Into(t3, e3, n2), t3[n2++] = 0, t3[n2++] = r3 ? 1 : 0, n2;
10291        }
10292        function ce(t3, e3, r3, n2) {
10293          t3[n2++] = A, n2 += rt.encodeUTF8Into(t3, e3, n2), t3[n2++] = 0;
10294          const o2 = $t.fromNumber(r3.getTime()), i2 = o2.getLowBits(), s2 = o2.getHighBits();
10295          return (n2 += at.setInt32LE(t3, n2, i2)) + at.setInt32LE(t3, n2, s2);
10296        }
10297        function le(t3, e3, r3, n2) {
10298          if (t3[n2++] = x, n2 += rt.encodeUTF8Into(t3, e3, n2), t3[n2++] = 0, r3.source && null != r3.source.match(re)) throw new q("value " + r3.source + " must not contain null bytes");
10299          return n2 += rt.encodeUTF8Into(t3, r3.source, n2), t3[n2++] = 0, r3.ignoreCase && (t3[n2++] = 105), r3.global && (t3[n2++] = 115), r3.multiline && (t3[n2++] = 109), t3[n2++] = 0, n2;
10300        }
10301        function fe(t3, e3, r3, n2) {
10302          if (t3[n2++] = x, n2 += rt.encodeUTF8Into(t3, e3, n2), t3[n2++] = 0, null != r3.pattern.match(re)) throw new q("pattern " + r3.pattern + " must not contain null bytes");
10303          n2 += rt.encodeUTF8Into(t3, r3.pattern, n2), t3[n2++] = 0;
10304          const o2 = r3.options.split("").sort().join("");
10305          return n2 += rt.encodeUTF8Into(t3, o2, n2), t3[n2++] = 0, n2;
10306        }
10307        function pe(t3, e3, r3, n2) {
10308          return null === r3 ? t3[n2++] = E : "MinKey" === r3._bsontype ? t3[n2++] = U : t3[n2++] = C, n2 += rt.encodeUTF8Into(t3, e3, n2), t3[n2++] = 0, n2;
10309        }
10310        function he(t3, e3, r3, n2) {
10311          return t3[n2++] = j, n2 += rt.encodeUTF8Into(t3, e3, n2), t3[n2++] = 0, n2 + r3.serializeInto(t3, n2);
10312        }
10313        function ye(t3, e3, r3, n2) {
10314          t3[n2++] = S, n2 += rt.encodeUTF8Into(t3, e3, n2), t3[n2++] = 0;
10315          const o2 = r3.length;
10316          if (n2 += at.setInt32LE(t3, n2, o2), t3[n2++] = F, o2 <= 16) for (let e4 = 0; e4 < o2; e4++) t3[n2 + e4] = r3[e4];
10317          else t3.set(r3, n2);
10318          return n2 + o2;
10319        }
10320        function de(t3, e3, r3, n2, o2, i2, s2, a2, u2) {
10321          if (u2.has(r3)) throw new q("Cannot convert circular structure to BSON");
10322          u2.add(r3), t3[n2++] = Array.isArray(r3) ? O : w, n2 += rt.encodeUTF8Into(t3, e3, n2), t3[n2++] = 0;
10323          const c2 = je(t3, r3, o2, n2, i2 + 1, s2, a2, u2);
10324          return u2.delete(r3), c2;
10325        }
10326        function be(t3, e3, r3, n2) {
10327          t3[n2++] = R, n2 += rt.encodeUTF8Into(t3, e3, n2), t3[n2++] = 0;
10328          for (let e4 = 0; e4 < 16; e4++) t3[n2 + e4] = r3.bytes[e4];
10329          return n2 + 16;
10330        }
10331        function me(t3, e3, r3, n2) {
10332          t3[n2++] = "Long" === r3._bsontype ? D : M, n2 += rt.encodeUTF8Into(t3, e3, n2), t3[n2++] = 0;
10333          const o2 = r3.getLowBits(), i2 = r3.getHighBits();
10334          return (n2 += at.setInt32LE(t3, n2, o2)) + at.setInt32LE(t3, n2, i2);
10335        }
10336        function ve(t3, e3, r3, n2) {
10337          return r3 = r3.valueOf(), t3[n2++] = B, n2 += rt.encodeUTF8Into(t3, e3, n2), t3[n2++] = 0, n2 + at.setInt32LE(t3, n2, r3);
10338        }
10339        function ge(t3, e3, r3, n2) {
10340          return t3[n2++] = g, n2 += rt.encodeUTF8Into(t3, e3, n2), t3[n2++] = 0, n2 + at.setFloat64LE(t3, n2, r3.value);
10341        }
10342        function _e(t3, e3, r3, n2) {
10343          t3[n2++] = k, n2 += rt.encodeUTF8Into(t3, e3, n2), t3[n2++] = 0;
10344          const o2 = r3.toString(), i2 = rt.encodeUTF8Into(t3, o2, n2 + 4) + 1;
10345          return at.setInt32LE(t3, n2, i2), n2 = n2 + 4 + i2 - 1, t3[n2++] = 0, n2;
10346        }
10347        function we(t3, e3, r3, n2, o2 = false, i2 = 0, s2 = false, a2 = true, u2) {
10348          if (r3.scope && "object" == typeof r3.scope) {
10349            t3[n2++] = I, n2 += rt.encodeUTF8Into(t3, e3, n2), t3[n2++] = 0;
10350            let c2 = n2;
10351            const l2 = r3.code;
10352            n2 += 4;
10353            const f2 = rt.encodeUTF8Into(t3, l2, n2 + 4) + 1;
10354            at.setInt32LE(t3, n2, f2), t3[n2 + 4 + f2 - 1] = 0, n2 = n2 + f2 + 4;
10355            const p2 = je(t3, r3.scope, o2, n2, i2 + 1, s2, a2, u2);
10356            n2 = p2 - 1;
10357            const h2 = p2 - c2;
10358            c2 += at.setInt32LE(t3, c2, h2), t3[n2++] = 0;
10359          } else {
10360            t3[n2++] = k, n2 += rt.encodeUTF8Into(t3, e3, n2), t3[n2++] = 0;
10361            const o3 = r3.code.toString(), i3 = rt.encodeUTF8Into(t3, o3, n2 + 4) + 1;
10362            at.setInt32LE(t3, n2, i3), n2 = n2 + 4 + i3 - 1, t3[n2++] = 0;
10363          }
10364          return n2;
10365        }
10366        function Oe(t3, e3, r3, n2) {
10367          t3[n2++] = S, n2 += rt.encodeUTF8Into(t3, e3, n2), t3[n2++] = 0;
10368          const o2 = r3.buffer;
10369          let i2 = r3.position;
10370          if (r3.sub_type === ut.SUBTYPE_BYTE_ARRAY && (i2 += 4), n2 += at.setInt32LE(t3, n2, i2), t3[n2++] = r3.sub_type, r3.sub_type === ut.SUBTYPE_BYTE_ARRAY && (i2 -= 4, n2 += at.setInt32LE(t3, n2, i2)), r3.sub_type === ut.SUBTYPE_VECTOR && ct(r3), i2 <= 16) for (let e4 = 0; e4 < i2; e4++) t3[n2 + e4] = o2[e4];
10371          else t3.set(o2, n2);
10372          return n2 + r3.position;
10373        }
10374        function Se(t3, e3, r3, n2) {
10375          t3[n2++] = N, n2 += rt.encodeUTF8Into(t3, e3, n2), t3[n2++] = 0;
10376          const o2 = rt.encodeUTF8Into(t3, r3.value, n2 + 4) + 1;
10377          return at.setInt32LE(t3, n2, o2), n2 = n2 + 4 + o2 - 1, t3[n2++] = 0, n2;
10378        }
10379        function $e(t3, e3, r3, n2, o2, i2, s2) {
10380          t3[n2++] = w, n2 += rt.encodeUTF8Into(t3, e3, n2), t3[n2++] = 0;
10381          let a2 = n2, u2 = { $ref: r3.collection || r3.namespace, $id: r3.oid };
10382          null != r3.db && (u2.$db = r3.db), u2 = Object.assign(u2, r3.fields);
10383          const c2 = je(t3, u2, false, n2, o2 + 1, i2, true, s2), l2 = c2 - a2;
10384          return a2 += at.setInt32LE(t3, n2, l2), c2;
10385        }
10386        function je(t3, e3, r3, n2, o2, l2, h2, y2) {
10387          if (null == y2) {
10388            if (null == e3) return t3[0] = 5, t3[1] = 0, t3[2] = 0, t3[3] = 0, t3[4] = 0, 5;
10389            if (Array.isArray(e3)) throw new q("serialize does not support an array as the root input");
10390            if ("object" != typeof e3) throw new q("serialize does not support non-object as the root input");
10391            if ("_bsontype" in e3 && "string" == typeof e3._bsontype) throw new q("BSON types cannot be serialized as a document");
10392            if (c(e3) || a(e3) || i(e3) || s(e3)) throw new q("date, regexp, typedarray, and arraybuffer cannot be BSON documents");
10393            y2 = /* @__PURE__ */ new Set();
10394          }
10395          y2.add(e3);
10396          let d2 = n2 + 4;
10397          if (Array.isArray(e3)) for (let n3 = 0; n3 < e3.length; n3++) {
10398            const s2 = `${n3}`;
10399            let u2 = e3[n3];
10400            "function" == typeof (u2 == null ? void 0 : u2.toBSON) && (u2 = u2.toBSON());
10401            const b3 = typeof u2;
10402            if (void 0 === u2) d2 = ae(t3, s2, 0, d2);
10403            else if (null === u2) d2 = ae(t3, s2, 0, d2);
10404            else if ("string" === b3) d2 = oe(t3, s2, u2, d2);
10405            else if ("number" === b3) d2 = ie(t3, s2, u2, d2);
10406            else if ("bigint" === b3) d2 = se(t3, s2, u2, d2);
10407            else if ("boolean" === b3) d2 = ue(t3, s2, u2, d2);
10408            else if ("object" === b3 && null == u2._bsontype) d2 = u2 instanceof Date || c(u2) ? ce(t3, s2, u2, d2) : u2 instanceof Uint8Array || i(u2) ? ye(t3, s2, u2, d2) : u2 instanceof RegExp || a(u2) ? le(t3, s2, u2, d2) : de(t3, s2, u2, d2, r3, o2, l2, h2, y2);
10409            else if ("object" === b3) {
10410              if (u2[p] !== f) throw new J();
10411              if ("ObjectId" === u2._bsontype) d2 = he(t3, s2, u2, d2);
10412              else if ("Decimal128" === u2._bsontype) d2 = be(t3, s2, u2, d2);
10413              else if ("Long" === u2._bsontype || "Timestamp" === u2._bsontype) d2 = me(t3, s2, u2, d2);
10414              else if ("Double" === u2._bsontype) d2 = ge(t3, s2, u2, d2);
10415              else if ("Code" === u2._bsontype) d2 = we(t3, s2, u2, d2, r3, o2, l2, h2, y2);
10416              else if ("Binary" === u2._bsontype) d2 = Oe(t3, s2, u2, d2);
10417              else if ("BSONSymbol" === u2._bsontype) d2 = Se(t3, s2, u2, d2);
10418              else if ("DBRef" === u2._bsontype) d2 = $e(t3, s2, u2, d2, o2, l2, y2);
10419              else if ("BSONRegExp" === u2._bsontype) d2 = fe(t3, s2, u2, d2);
10420              else if ("Int32" === u2._bsontype) d2 = ve(t3, s2, u2, d2);
10421              else if ("MinKey" === u2._bsontype || "MaxKey" === u2._bsontype) d2 = pe(t3, s2, u2, d2);
10422              else if (void 0 !== u2._bsontype) throw new q(`Unrecognized or invalid _bsontype: ${String(u2._bsontype)}`);
10423            } else "function" === b3 && l2 && (d2 = _e(t3, s2, u2, d2));
10424          }
10425          else if (e3 instanceof Map || u(e3)) {
10426            const n3 = e3.entries();
10427            let s2 = false;
10428            for (; !s2; ) {
10429              const e4 = n3.next();
10430              if (s2 = !!e4.done, s2) continue;
10431              const u2 = e4.value ? e4.value[0] : void 0;
10432              let b3 = e4.value ? e4.value[1] : void 0;
10433              "function" == typeof (b3 == null ? void 0 : b3.toBSON) && (b3 = b3.toBSON());
10434              const m2 = typeof b3;
10435              if ("string" == typeof u2 && !ne.has(u2)) {
10436                if (null != u2.match(re)) throw new q("key " + u2 + " must not contain null bytes");
10437                if (r3) {
10438                  if ("$" === u2[0]) throw new q("key " + u2 + " must not start with '$'");
10439                  if (u2.includes(".")) throw new q("key " + u2 + " must not contain '.'");
10440                }
10441              }
10442              if (void 0 === b3) false === h2 && (d2 = ae(t3, u2, 0, d2));
10443              else if (null === b3) d2 = ae(t3, u2, 0, d2);
10444              else if ("string" === m2) d2 = oe(t3, u2, b3, d2);
10445              else if ("number" === m2) d2 = ie(t3, u2, b3, d2);
10446              else if ("bigint" === m2) d2 = se(t3, u2, b3, d2);
10447              else if ("boolean" === m2) d2 = ue(t3, u2, b3, d2);
10448              else if ("object" === m2 && null == b3._bsontype) d2 = b3 instanceof Date || c(b3) ? ce(t3, u2, b3, d2) : b3 instanceof Uint8Array || i(b3) ? ye(t3, u2, b3, d2) : b3 instanceof RegExp || a(b3) ? le(t3, u2, b3, d2) : de(t3, u2, b3, d2, r3, o2, l2, h2, y2);
10449              else if ("object" === m2) {
10450                if (b3[p] !== f) throw new J();
10451                if ("ObjectId" === b3._bsontype) d2 = he(t3, u2, b3, d2);
10452                else if ("Decimal128" === b3._bsontype) d2 = be(t3, u2, b3, d2);
10453                else if ("Long" === b3._bsontype || "Timestamp" === b3._bsontype) d2 = me(t3, u2, b3, d2);
10454                else if ("Double" === b3._bsontype) d2 = ge(t3, u2, b3, d2);
10455                else if ("Code" === b3._bsontype) d2 = we(t3, u2, b3, d2, r3, o2, l2, h2, y2);
10456                else if ("Binary" === b3._bsontype) d2 = Oe(t3, u2, b3, d2);
10457                else if ("BSONSymbol" === b3._bsontype) d2 = Se(t3, u2, b3, d2);
10458                else if ("DBRef" === b3._bsontype) d2 = $e(t3, u2, b3, d2, o2, l2, y2);
10459                else if ("BSONRegExp" === b3._bsontype) d2 = fe(t3, u2, b3, d2);
10460                else if ("Int32" === b3._bsontype) d2 = ve(t3, u2, b3, d2);
10461                else if ("MinKey" === b3._bsontype || "MaxKey" === b3._bsontype) d2 = pe(t3, u2, b3, d2);
10462                else if (void 0 !== b3._bsontype) throw new q(`Unrecognized or invalid _bsontype: ${String(b3._bsontype)}`);
10463              } else "function" === m2 && l2 && (d2 = _e(t3, u2, b3, d2));
10464            }
10465          } else {
10466            if ("function" == typeof (e3 == null ? void 0 : e3.toBSON) && null != (e3 = e3.toBSON()) && "object" != typeof e3) throw new q("toBSON function did not return an object");
10467            for (const n3 of Object.keys(e3)) {
10468              let s2 = e3[n3];
10469              "function" == typeof (s2 == null ? void 0 : s2.toBSON) && (s2 = s2.toBSON());
10470              const u2 = typeof s2;
10471              if ("string" == typeof n3 && !ne.has(n3)) {
10472                if (null != n3.match(re)) throw new q("key " + n3 + " must not contain null bytes");
10473                if (r3) {
10474                  if ("$" === n3[0]) throw new q("key " + n3 + " must not start with '$'");
10475                  if (n3.includes(".")) throw new q("key " + n3 + " must not contain '.'");
10476                }
10477              }
10478              if (void 0 === s2) false === h2 && (d2 = ae(t3, n3, 0, d2));
10479              else if (null === s2) d2 = ae(t3, n3, 0, d2);
10480              else if ("string" === u2) d2 = oe(t3, n3, s2, d2);
10481              else if ("number" === u2) d2 = ie(t3, n3, s2, d2);
10482              else if ("bigint" === u2) d2 = se(t3, n3, s2, d2);
10483              else if ("boolean" === u2) d2 = ue(t3, n3, s2, d2);
10484              else if ("object" === u2 && null == s2._bsontype) d2 = s2 instanceof Date || c(s2) ? ce(t3, n3, s2, d2) : s2 instanceof Uint8Array || i(s2) ? ye(t3, n3, s2, d2) : s2 instanceof RegExp || a(s2) ? le(t3, n3, s2, d2) : de(t3, n3, s2, d2, r3, o2, l2, h2, y2);
10485              else if ("object" === u2) {
10486                if (s2[p] !== f) throw new J();
10487                if ("ObjectId" === s2._bsontype) d2 = he(t3, n3, s2, d2);
10488                else if ("Decimal128" === s2._bsontype) d2 = be(t3, n3, s2, d2);
10489                else if ("Long" === s2._bsontype || "Timestamp" === s2._bsontype) d2 = me(t3, n3, s2, d2);
10490                else if ("Double" === s2._bsontype) d2 = ge(t3, n3, s2, d2);
10491                else if ("Code" === s2._bsontype) d2 = we(t3, n3, s2, d2, r3, o2, l2, h2, y2);
10492                else if ("Binary" === s2._bsontype) d2 = Oe(t3, n3, s2, d2);
10493                else if ("BSONSymbol" === s2._bsontype) d2 = Se(t3, n3, s2, d2);
10494                else if ("DBRef" === s2._bsontype) d2 = $e(t3, n3, s2, d2, o2, l2, y2);
10495                else if ("BSONRegExp" === s2._bsontype) d2 = fe(t3, n3, s2, d2);
10496                else if ("Int32" === s2._bsontype) d2 = ve(t3, n3, s2, d2);
10497                else if ("MinKey" === s2._bsontype || "MaxKey" === s2._bsontype) d2 = pe(t3, n3, s2, d2);
10498                else if (void 0 !== s2._bsontype) throw new q(`Unrecognized or invalid _bsontype: ${String(s2._bsontype)}`);
10499              } else "function" === u2 && l2 && (d2 = _e(t3, n3, s2, d2));
10500            }
10501          }
10502          y2.delete(e3), t3[d2++] = 0;
10503          const b2 = d2 - n2;
10504          return n2 += at.setInt32LE(t3, n2, b2), d2;
10505        }
10506        const Pe = { $oid: Jt, $binary: ut, $uuid: ut, $symbol: Wt, $numberInt: Ct, $numberDecimal: Rt, $numberDouble: Ut, $numberLong: $t, $minKey: Lt, $maxKey: Ft, $regex: Ht, $regularExpression: Ht, $timestamp: Qt };
10507        function Ae(t3, e3 = {}) {
10508          if ("number" == typeof t3) {
10509            const r4 = t3 <= h && t3 >= y, n2 = t3 <= d && t3 >= b;
10510            if (e3.relaxed || e3.legacy) return t3;
10511            if (Number.isInteger(t3) && !Object.is(t3, -0)) {
10512              if (r4) return new Ct(t3);
10513              if (n2) return e3.useBigInt64 ? BigInt(t3) : $t.fromNumber(t3);
10514            }
10515            return new Ut(t3);
10516          }
10517          if (null == t3 || "object" != typeof t3) return t3;
10518          if (t3.$undefined) return null;
10519          const r3 = Object.keys(t3).filter((e4) => e4.startsWith("$") && null != t3[e4]);
10520          for (let n2 = 0; n2 < r3.length; n2++) {
10521            const o2 = Pe[r3[n2]];
10522            if (o2) return o2.fromExtendedJSON(t3, e3);
10523          }
10524          if (null != t3.$date) {
10525            const r4 = t3.$date, n2 = /* @__PURE__ */ new Date();
10526            if (e3.legacy) if ("number" == typeof r4) n2.setTime(r4);
10527            else if ("string" == typeof r4) n2.setTime(Date.parse(r4));
10528            else {
10529              if ("bigint" != typeof r4) throw new z("Unrecognized type for EJSON date: " + typeof r4);
10530              n2.setTime(Number(r4));
10531            }
10532            else if ("string" == typeof r4) n2.setTime(Date.parse(r4));
10533            else if ($t.isLong(r4)) n2.setTime(r4.toNumber());
10534            else if ("number" == typeof r4 && e3.relaxed) n2.setTime(r4);
10535            else {
10536              if ("bigint" != typeof r4) throw new z("Unrecognized type for EJSON date: " + typeof r4);
10537              n2.setTime(Number(r4));
10538            }
10539            return n2;
10540          }
10541          if (null != t3.$code) {
10542            const e4 = Object.assign({}, t3);
10543            return t3.$scope && (e4.$scope = Ae(t3.$scope)), ht.fromExtendedJSON(t3);
10544          }
10545          if (yt(t3) || t3.$dbPointer) {
10546            const e4 = t3.$ref ? t3 : t3.$dbPointer;
10547            if (e4 instanceof dt) return e4;
10548            const r4 = Object.keys(e4).filter((t4) => t4.startsWith("$"));
10549            let n2 = true;
10550            if (r4.forEach((t4) => {
10551              -1 === ["$ref", "$id", "$db"].indexOf(t4) && (n2 = false);
10552            }), n2) return dt.fromExtendedJSON(e4);
10553          }
10554          return t3;
10555        }
10556        function Ee(t3) {
10557          const e3 = t3.toISOString();
10558          return 0 !== t3.getUTCMilliseconds() ? e3 : e3.slice(0, -5) + "Z";
10559        }
10560        function xe(t3, e3) {
10561          if (t3 instanceof Map || u(t3)) {
10562            const r3 = /* @__PURE__ */ Object.create(null);
10563            for (const [e4, n2] of t3) {
10564              if ("string" != typeof e4) throw new q("Can only serialize maps with string keys");
10565              r3[e4] = n2;
10566            }
10567            return xe(r3, e3);
10568          }
10569          if (("object" == typeof t3 || "function" == typeof t3) && null !== t3) {
10570            const r3 = e3.seenObjects.findIndex((e4) => e4.obj === t3);
10571            if (-1 !== r3) {
10572              const t4 = e3.seenObjects.map((t5) => t5.propertyName), n2 = t4.slice(0, r3).map((t5) => `${t5} -> `).join(""), o2 = t4[r3], i2 = " -> " + t4.slice(r3 + 1, t4.length - 1).map((t5) => `${t5} -> `).join(""), s2 = t4[t4.length - 1], a2 = " ".repeat(n2.length + o2.length / 2), u2 = "-".repeat(i2.length + (o2.length + s2.length) / 2 - 1);
10573              throw new q(`Converting circular structure to EJSON:
10574    ${n2}${o2}${i2}${s2}
10575    ${a2}\\${u2}/`);
10576            }
10577            e3.seenObjects[e3.seenObjects.length - 1].obj = t3;
10578          }
10579          if (Array.isArray(t3)) return (function(t4, e4) {
10580            return t4.map((t5, r3) => {
10581              e4.seenObjects.push({ propertyName: `index ${r3}`, obj: null });
10582              try {
10583                return xe(t5, e4);
10584              } finally {
10585                e4.seenObjects.pop();
10586              }
10587            });
10588          })(t3, e3);
10589          if (void 0 === t3) return null;
10590          if (t3 instanceof Date || c(t3)) {
10591            const r3 = t3.getTime(), n2 = r3 > -1 && r3 < 2534023188e5;
10592            return e3.legacy ? e3.relaxed && n2 ? { $date: t3.getTime() } : { $date: Ee(t3) } : e3.relaxed && n2 ? { $date: Ee(t3) } : { $date: { $numberLong: t3.getTime().toString() } };
10593          }
10594          if (!("number" != typeof t3 || e3.relaxed && isFinite(t3))) {
10595            if (Number.isInteger(t3) && !Object.is(t3, -0)) {
10596              if (t3 >= y && t3 <= h) return { $numberInt: t3.toString() };
10597              if (t3 >= b && t3 <= d) return { $numberLong: t3.toString() };
10598            }
10599            return { $numberDouble: Object.is(t3, -0) ? "-0.0" : t3.toString() };
10600          }
10601          if ("bigint" == typeof t3) return e3.relaxed ? Number(BigInt.asIntN(64, t3)) : { $numberLong: BigInt.asIntN(64, t3).toString() };
10602          if (t3 instanceof RegExp || a(t3)) {
10603            let r3 = t3.flags;
10604            if (void 0 === r3) {
10605              const e4 = t3.toString().match(/[gimuy]*$/);
10606              e4 && (r3 = e4[0]);
10607            }
10608            return new Ht(t3.source, r3).toExtendedJSON(e3);
10609          }
10610          return null != t3 && "object" == typeof t3 ? (function(t4, e4) {
10611            if (null == t4 || "object" != typeof t4) throw new q("not an object instance");
10612            const r3 = t4._bsontype;
10613            if (void 0 === r3) {
10614              const r4 = {};
10615              for (const n2 of Object.keys(t4)) {
10616                e4.seenObjects.push({ propertyName: n2, obj: null });
10617                try {
10618                  const o2 = xe(t4[n2], e4);
10619                  "__proto__" === n2 ? Object.defineProperty(r4, n2, { value: o2, writable: true, enumerable: true, configurable: true }) : r4[n2] = o2;
10620                } finally {
10621                  e4.seenObjects.pop();
10622                }
10623              }
10624              return r4;
10625            }
10626            if (null != t4 && "object" == typeof t4 && "string" == typeof t4._bsontype && t4[p] !== f) throw new J();
10627            if ((function(t5) {
10628              return null != t5 && "object" == typeof t5 && "_bsontype" in t5 && "string" == typeof t5._bsontype;
10629            })(t4)) {
10630              let n2 = t4;
10631              if ("function" != typeof n2.toExtendedJSON) {
10632                const e5 = Te[t4._bsontype];
10633                if (!e5) throw new q("Unrecognized or invalid _bsontype: " + t4._bsontype);
10634                n2 = e5(n2);
10635              }
10636              return "Code" === r3 && n2.scope ? n2 = new ht(n2.code, xe(n2.scope, e4)) : "DBRef" === r3 && n2.oid && (n2 = new dt(xe(n2.collection, e4), xe(n2.oid, e4), xe(n2.db, e4), xe(n2.fields, e4))), n2.toExtendedJSON(e4);
10637            }
10638            throw new q("_bsontype must be a string, but was: " + typeof r3);
10639          })(t3, e3) : t3;
10640        }
10641        const Te = { Binary: (t3) => new ut(t3.value(), t3.sub_type), Code: (t3) => new ht(t3.code, t3.scope), DBRef: (t3) => new dt(t3.collection || t3.namespace, t3.oid, t3.db, t3.fields), Decimal128: (t3) => new Rt(t3.bytes), Double: (t3) => new Ut(t3.value), Int32: (t3) => new Ct(t3.value), Long: (t3) => $t.fromBits(null != t3.low ? t3.low : t3.low_, null != t3.low ? t3.high : t3.high_, null != t3.low ? t3.unsigned : t3.unsigned_), MaxKey: () => new Ft(), MinKey: () => new Lt(), ObjectId: (t3) => new Jt(t3), BSONRegExp: (t3) => new Ht(t3.pattern, t3.options), BSONSymbol: (t3) => new Wt(t3.value), Timestamp: (t3) => Qt.fromBits(t3.low, t3.high) };
10642        function ke(t3, e3) {
10643          const r3 = { useBigInt64: (e3 == null ? void 0 : e3.useBigInt64) ?? false, relaxed: (e3 == null ? void 0 : e3.relaxed) ?? true, legacy: (e3 == null ? void 0 : e3.legacy) ?? false };
10644          return JSON.parse(t3, (t4, e4) => {
10645            if (-1 !== t4.indexOf("\0")) throw new q(`BSON Document field names cannot contain null bytes, found: ${JSON.stringify(t4)}`);
10646            return Ae(e4, r3);
10647          });
10648        }
10649        function Ne(t3, e3, r3, n2) {
10650          null != r3 && "object" == typeof r3 && (n2 = r3, r3 = 0), null == e3 || "object" != typeof e3 || Array.isArray(e3) || (n2 = e3, e3 = void 0, r3 = 0);
10651          const o2 = xe(t3, Object.assign({ relaxed: true, legacy: false }, n2, { seenObjects: [{ propertyName: "(root)", obj: null }] }));
10652          return JSON.stringify(o2, e3, r3);
10653        }
10654        const Ie = /* @__PURE__ */ Object.create(null);
10655        Ie.parse = ke, Ie.stringify = Ne, Ie.serialize = function(t3, e3) {
10656          return e3 = e3 || {}, JSON.parse(Ne(t3, e3));
10657        }, Ie.deserialize = function(t3, e3) {
10658          return e3 = e3 || {}, ke(JSON.stringify(t3), e3);
10659        }, Object.freeze(Ie);
10660        function Be(t3, e3) {
10661          try {
10662            return at.getNonnegativeInt32LE(t3, e3);
10663          } catch (t4) {
10664            throw new K("BSON size cannot be negative", e3, { cause: t4 });
10665          }
10666        }
10667        function Me(t3, e3) {
10668          let r3 = e3;
10669          for (; 0 !== t3[r3]; r3++) ;
10670          if (r3 === t3.length - 1) throw new K("Null terminator not found", e3);
10671          return r3;
10672        }
10673        const De = /* @__PURE__ */ Object.create(null);
10674        De.parseToElements = function(t3, e3 = 0) {
10675          if (e3 ?? (e3 = 0), t3.length < 5) throw new K(`Input must be at least 5 bytes, got ${t3.length} bytes`, e3);
10676          const r3 = Be(t3, e3);
10677          if (r3 > t3.length - e3) throw new K(`Parsed documentSize (${r3} bytes) does not match input length (${t3.length} bytes)`, e3);
10678          if (0 !== t3[e3 + r3 - 1]) throw new K("BSON documents must end in 0x00", e3 + r3);
10679          const n2 = [];
10680          let o2 = e3 + 4;
10681          for (; o2 <= r3 + e3; ) {
10682            const i2 = t3[o2];
10683            if (o2 += 1, 0 === i2) {
10684              if (o2 - e3 !== r3) throw new K("Invalid 0x00 type byte", o2);
10685              break;
10686            }
10687            const s2 = o2, a2 = Me(t3, o2) - s2;
10688            let u2;
10689            if (o2 += a2 + 1, 1 === i2 || 18 === i2 || 9 === i2 || 17 === i2) u2 = 8;
10690            else if (16 === i2) u2 = 4;
10691            else if (7 === i2) u2 = 12;
10692            else if (19 === i2) u2 = 16;
10693            else if (8 === i2) u2 = 1;
10694            else if (10 === i2 || 6 === i2 || 127 === i2 || 255 === i2) u2 = 0;
10695            else if (11 === i2) u2 = Me(t3, Me(t3, o2) + 1) + 1 - o2;
10696            else if (3 === i2 || 4 === i2 || 15 === i2) u2 = Be(t3, o2);
10697            else {
10698              if (2 !== i2 && 5 !== i2 && 12 !== i2 && 13 !== i2 && 14 !== i2) throw new K(`Invalid 0x${i2.toString(16).padStart(2, "0")} type byte`, o2);
10699              u2 = Be(t3, o2) + 4, 5 === i2 && (u2 += 1), 12 === i2 && (u2 += 12);
10700            }
10701            if (u2 > r3) throw new K("value reports length larger than document", o2);
10702            n2.push([i2, s2, a2, o2, u2]), o2 += u2;
10703          }
10704          return n2;
10705        }, De.ByteUtils = rt, De.NumberUtils = at, Object.freeze(De);
10706        const Re = 17825792;
10707        let Ue = rt.allocate(Re);
10708        function Ce(t3) {
10709          Ue.length < t3 && (Ue = rt.allocate(t3));
10710        }
10711        function Fe(t3, e3 = {}) {
10712          const r3 = "boolean" == typeof e3.checkKeys && e3.checkKeys, n2 = "boolean" == typeof e3.serializeFunctions && e3.serializeFunctions, o2 = "boolean" != typeof e3.ignoreUndefined || e3.ignoreUndefined, i2 = "number" == typeof e3.minInternalBufferSize ? e3.minInternalBufferSize : Re;
10713          Ue.length < i2 && (Ue = rt.allocate(i2));
10714          const s2 = je(Ue, t3, r3, 0, 0, n2, o2, null), a2 = rt.allocateUnsafe(s2);
10715          return a2.set(Ue.subarray(0, s2), 0), a2;
10716        }
10717        function Le(t3, e3, r3 = {}) {
10718          const n2 = "boolean" == typeof r3.checkKeys && r3.checkKeys, o2 = "boolean" == typeof r3.serializeFunctions && r3.serializeFunctions, i2 = "boolean" != typeof r3.ignoreUndefined || r3.ignoreUndefined, s2 = "number" == typeof r3.index ? r3.index : 0, a2 = je(Ue, t3, n2, 0, 0, o2, i2, null);
10719          return e3.set(Ue.subarray(0, a2), s2), s2 + a2 - 1;
10720        }
10721        function Ve(t3, e3 = {}) {
10722          return Xt(rt.toLocalBufferType(t3), e3);
10723        }
10724        function qe(t3, e3 = {}) {
10725          return zt(t3, "boolean" == typeof (e3 = e3 || {}).serializeFunctions && e3.serializeFunctions, "boolean" != typeof e3.ignoreUndefined || e3.ignoreUndefined);
10726        }
10727        function Je(t3, e3, r3, n2, o2, i2) {
10728          const s2 = Object.assign({ allowObjectSmallerThanBufferSize: true, index: 0 }, i2), a2 = rt.toLocalBufferType(t3);
10729          let u2 = e3;
10730          for (let t4 = 0; t4 < r3; t4++) {
10731            const e4 = at.getInt32LE(a2, u2);
10732            s2.index = u2, n2[o2 + t4] = Xt(a2, s2), u2 += e4;
10733          }
10734          return u2;
10735        }
10736        var ze = Object.freeze({ __proto__: null, BSONError: q, BSONOffsetError: K, BSONRegExp: Ht, BSONRuntimeError: z, BSONSymbol: Wt, BSONType: V, BSONValue: nt, BSONVersionError: J, Binary: ut, Code: ht, DBRef: dt, Decimal128: Rt, Double: Ut, EJSON: Ie, Int32: Ct, Long: $t, MaxKey: Ft, MinKey: Lt, ObjectId: Jt, Timestamp: Qt, UUID: pt, calculateObjectSize: qe, deserialize: Ve, deserializeStream: Je, onDemand: De, serialize: Fe, serializeWithBufferAndIndex: Le, setInternalBufferSize: Ce });
10737      }, 6365: (t2, e2, r2) => {
10738        var n = r2(5832).hp, o = r2(6353).Binary, i = r2(6353).UUID, s = r2(8768);
10739        function a(t3, e3, r3) {
10740          var o2, i2, u2, l, f = t3;
10741          return null == t3 && (f = 0), Array.isArray(e3) ? (i2 = e3[0], u2 = e3[1]) : o2 = e3, l = "number" == typeof f || f instanceof Number ? n.alloc(f) : n.from(f, o2, r3), s.decorate(l, a.mixin), l.isMongooseBuffer = true, l[a.pathSymbol] = i2, l[c] = u2, l._subtype = 0, l;
10742        }
10743        var u = Symbol.for("mongoose#Buffer#_path"), c = Symbol.for("mongoose#Buffer#_parent");
10744        a.pathSymbol = u, a.mixin = { _subtype: void 0, _markModified: function() {
10745          var t3 = this[c];
10746          return t3 && t3.markModified(this[a.pathSymbol]), this;
10747        }, write: function() {
10748          var t3 = n.prototype.write.apply(this, arguments);
10749          return t3 > 0 && this._markModified(), t3;
10750        }, copy: function(t3) {
10751          var e3 = n.prototype.copy.apply(this, arguments);
10752          return t3 && t3.isMongooseBuffer && t3._markModified(), e3;
10753        } }, s.each(["writeUInt8", "writeUInt16", "writeUInt32", "writeInt8", "writeInt16", "writeInt32", "writeFloat", "writeDouble", "fill", "utf8Write", "binaryWrite", "asciiWrite", "set", "writeUInt16LE", "writeUInt16BE", "writeUInt32LE", "writeUInt32BE", "writeInt16LE", "writeInt16BE", "writeInt32LE", "writeInt32BE", "writeFloatLE", "writeFloatBE", "writeDoubleLE", "writeDoubleBE"], function(t3) {
10754          n.prototype[t3] && (a.mixin[t3] = function() {
10755            var e3 = n.prototype[t3].apply(this, arguments);
10756            return this._markModified(), e3;
10757          });
10758        }), a.mixin.toObject = function(t3) {
10759          var e3 = "number" == typeof t3 ? t3 : this._subtype || 0;
10760          return new o(n.from(this), e3);
10761        }, a.mixin.$toObject = a.mixin.toObject, a.mixin.toBSON = function() {
10762          return new o(this, this._subtype || 0);
10763        }, a.mixin.toUUID = function() {
10764          if (4 !== this._subtype) throw new Error("Cannot convert a Buffer with subtype " + this._subtype + " to a UUID");
10765          return new i(this);
10766        }, a.mixin.equals = function(t3) {
10767          if (!n.isBuffer(t3)) return false;
10768          if (this.length !== t3.length) return false;
10769          for (var e3 = 0; e3 < this.length; ++e3) if (this[e3] !== t3[e3]) return false;
10770          return true;
10771        }, a.mixin.subtype = function(t3) {
10772          if ("number" != typeof t3) throw new TypeError("Invalid subtype. Expected a number");
10773          this._subtype !== t3 && this._markModified(), this._subtype = t3;
10774        }, a.Binary = o, t2.exports = a;
10775      }, 6400: (t2, e2, r2) => {
10776        function n(t3) {
10777          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
10778            return typeof t4;
10779          } : function(t4) {
10780            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
10781          }, n(t3);
10782        }
10783        var o, i = r2(8093), s = r2(9870), a = r2(9206), u = r2(9939), c = r2(783), l = r2(9907), f = r2(2268), p = r2(8188), h = r2(9471), y = r2(2401), d = r2(1697), b = r2(8435), m = r2(8633), v = r2(2151), g = r2(674), _ = Function, w = function(t3) {
10784          try {
10785            return _('"use strict"; return (' + t3 + ").constructor;")();
10786          } catch (t4) {
10787          }
10788        }, O = r2(1464), S = r2(988), $ = function() {
10789          throw new f();
10790        }, j = O ? (function() {
10791          try {
10792            return $;
10793          } catch (t3) {
10794            try {
10795              return O(arguments, "callee").get;
10796            } catch (t4) {
10797              return $;
10798            }
10799          }
10800        })() : $, P = r2(5510)(), A = r2(209), E = r2(5825), x = r2(2403), T = r2(3279), k = r2(3123), N = {}, I = "undefined" != typeof Uint8Array && A ? A(Uint8Array) : o, B = { __proto__: null, "%AggregateError%": "undefined" == typeof AggregateError ? o : AggregateError, "%Array%": Array, "%ArrayBuffer%": "undefined" == typeof ArrayBuffer ? o : ArrayBuffer, "%ArrayIteratorPrototype%": P && A ? A([][Symbol.iterator]()) : o, "%AsyncFromSyncIteratorPrototype%": o, "%AsyncFunction%": N, "%AsyncGenerator%": N, "%AsyncGeneratorFunction%": N, "%AsyncIteratorPrototype%": N, "%Atomics%": "undefined" == typeof Atomics ? o : Atomics, "%BigInt%": "undefined" == typeof BigInt ? o : BigInt, "%BigInt64Array%": "undefined" == typeof BigInt64Array ? o : BigInt64Array, "%BigUint64Array%": "undefined" == typeof BigUint64Array ? o : BigUint64Array, "%Boolean%": Boolean, "%DataView%": "undefined" == typeof DataView ? o : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": s, "%eval%": eval, "%EvalError%": a, "%Float16Array%": "undefined" == typeof Float16Array ? o : Float16Array, "%Float32Array%": "undefined" == typeof Float32Array ? o : Float32Array, "%Float64Array%": "undefined" == typeof Float64Array ? o : Float64Array, "%FinalizationRegistry%": "undefined" == typeof FinalizationRegistry ? o : FinalizationRegistry, "%Function%": _, "%GeneratorFunction%": N, "%Int8Array%": "undefined" == typeof Int8Array ? o : Int8Array, "%Int16Array%": "undefined" == typeof Int16Array ? o : Int16Array, "%Int32Array%": "undefined" == typeof Int32Array ? o : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": P && A ? A(A([][Symbol.iterator]())) : o, "%JSON%": "object" === ("undefined" == typeof JSON ? "undefined" : n(JSON)) ? JSON : o, "%Map%": "undefined" == typeof Map ? o : Map, "%MapIteratorPrototype%": "undefined" != typeof Map && P && A ? A((/* @__PURE__ */ new Map())[Symbol.iterator]()) : o, "%Math%": Math, "%Number%": Number, "%Object%": i, "%Object.getOwnPropertyDescriptor%": O, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": "undefined" == typeof Promise ? o : Promise, "%Proxy%": "undefined" == typeof Proxy ? o : Proxy, "%RangeError%": u, "%ReferenceError%": c, "%Reflect%": "undefined" == typeof Reflect ? o : Reflect, "%RegExp%": RegExp, "%Set%": "undefined" == typeof Set ? o : Set, "%SetIteratorPrototype%": "undefined" != typeof Set && P && A ? A((/* @__PURE__ */ new Set())[Symbol.iterator]()) : o, "%SharedArrayBuffer%": "undefined" == typeof SharedArrayBuffer ? o : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": P && A ? A(""[Symbol.iterator]()) : o, "%Symbol%": P ? Symbol : o, "%SyntaxError%": l, "%ThrowTypeError%": j, "%TypedArray%": I, "%TypeError%": f, "%Uint8Array%": "undefined" == typeof Uint8Array ? o : Uint8Array, "%Uint8ClampedArray%": "undefined" == typeof Uint8ClampedArray ? o : Uint8ClampedArray, "%Uint16Array%": "undefined" == typeof Uint16Array ? o : Uint16Array, "%Uint32Array%": "undefined" == typeof Uint32Array ? o : Uint32Array, "%URIError%": p, "%WeakMap%": "undefined" == typeof WeakMap ? o : WeakMap, "%WeakRef%": "undefined" == typeof WeakRef ? o : WeakRef, "%WeakSet%": "undefined" == typeof WeakSet ? o : WeakSet, "%Function.prototype.call%": k, "%Function.prototype.apply%": T, "%Object.defineProperty%": S, "%Object.getPrototypeOf%": E, "%Math.abs%": h, "%Math.floor%": y, "%Math.max%": d, "%Math.min%": b, "%Math.pow%": m, "%Math.round%": v, "%Math.sign%": g, "%Reflect.getPrototypeOf%": x };
10801        if (A) try {
10802          null.error;
10803        } catch (t3) {
10804          var M = A(A(t3));
10805          B["%Error.prototype%"] = M;
10806        }
10807        var D = function t3(e3) {
10808          var r3;
10809          if ("%AsyncFunction%" === e3) r3 = w("async function () {}");
10810          else if ("%GeneratorFunction%" === e3) r3 = w("function* () {}");
10811          else if ("%AsyncGeneratorFunction%" === e3) r3 = w("async function* () {}");
10812          else if ("%AsyncGenerator%" === e3) {
10813            var n2 = t3("%AsyncGeneratorFunction%");
10814            n2 && (r3 = n2.prototype);
10815          } else if ("%AsyncIteratorPrototype%" === e3) {
10816            var o2 = t3("%AsyncGenerator%");
10817            o2 && A && (r3 = A(o2.prototype));
10818          }
10819          return B[e3] = r3, r3;
10820        }, R = { __proto__: null, "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], "%ArrayPrototype%": ["Array", "prototype"], "%ArrayProto_entries%": ["Array", "prototype", "entries"], "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], "%ArrayProto_keys%": ["Array", "prototype", "keys"], "%ArrayProto_values%": ["Array", "prototype", "values"], "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], "%BooleanPrototype%": ["Boolean", "prototype"], "%DataViewPrototype%": ["DataView", "prototype"], "%DatePrototype%": ["Date", "prototype"], "%ErrorPrototype%": ["Error", "prototype"], "%EvalErrorPrototype%": ["EvalError", "prototype"], "%Float32ArrayPrototype%": ["Float32Array", "prototype"], "%Float64ArrayPrototype%": ["Float64Array", "prototype"], "%FunctionPrototype%": ["Function", "prototype"], "%Generator%": ["GeneratorFunction", "prototype"], "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], "%Int8ArrayPrototype%": ["Int8Array", "prototype"], "%Int16ArrayPrototype%": ["Int16Array", "prototype"], "%Int32ArrayPrototype%": ["Int32Array", "prototype"], "%JSONParse%": ["JSON", "parse"], "%JSONStringify%": ["JSON", "stringify"], "%MapPrototype%": ["Map", "prototype"], "%NumberPrototype%": ["Number", "prototype"], "%ObjectPrototype%": ["Object", "prototype"], "%ObjProto_toString%": ["Object", "prototype", "toString"], "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], "%PromisePrototype%": ["Promise", "prototype"], "%PromiseProto_then%": ["Promise", "prototype", "then"], "%Promise_all%": ["Promise", "all"], "%Promise_reject%": ["Promise", "reject"], "%Promise_resolve%": ["Promise", "resolve"], "%RangeErrorPrototype%": ["RangeError", "prototype"], "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], "%RegExpPrototype%": ["RegExp", "prototype"], "%SetPrototype%": ["Set", "prototype"], "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], "%StringPrototype%": ["String", "prototype"], "%SymbolPrototype%": ["Symbol", "prototype"], "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], "%TypedArrayPrototype%": ["TypedArray", "prototype"], "%TypeErrorPrototype%": ["TypeError", "prototype"], "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], "%URIErrorPrototype%": ["URIError", "prototype"], "%WeakMapPrototype%": ["WeakMap", "prototype"], "%WeakSetPrototype%": ["WeakSet", "prototype"] }, U = r2(2354), C = r2(5994), F = U.call(k, Array.prototype.concat), L = U.call(T, Array.prototype.splice), V = U.call(k, String.prototype.replace), q = U.call(k, String.prototype.slice), J = U.call(k, RegExp.prototype.exec), z = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, K = /\\(\\)?/g, H = function(t3, e3) {
10821          var r3, n2 = t3;
10822          if (C(R, n2) && (n2 = "%" + (r3 = R[n2])[0] + "%"), C(B, n2)) {
10823            var o2 = B[n2];
10824            if (o2 === N && (o2 = D(n2)), void 0 === o2 && !e3) throw new f("intrinsic " + t3 + " exists, but is not available. Please file an issue!");
10825            return { alias: r3, name: n2, value: o2 };
10826          }
10827          throw new l("intrinsic " + t3 + " does not exist!");
10828        };
10829        t2.exports = function(t3, e3) {
10830          if ("string" != typeof t3 || 0 === t3.length) throw new f("intrinsic name must be a non-empty string");
10831          if (arguments.length > 1 && "boolean" != typeof e3) throw new f('"allowMissing" argument must be a boolean');
10832          if (null === J(/^%?[^%]*%?$/, t3)) throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
10833          var r3 = (function(t4) {
10834            var e4 = q(t4, 0, 1), r4 = q(t4, -1);
10835            if ("%" === e4 && "%" !== r4) throw new l("invalid intrinsic syntax, expected closing `%`");
10836            if ("%" === r4 && "%" !== e4) throw new l("invalid intrinsic syntax, expected opening `%`");
10837            var n3 = [];
10838            return V(t4, z, function(t5, e5, r5, o3) {
10839              n3[n3.length] = r5 ? V(o3, K, "$1") : e5 || t5;
10840            }), n3;
10841          })(t3), n2 = r3.length > 0 ? r3[0] : "", o2 = H("%" + n2 + "%", e3), i2 = o2.name, s2 = o2.value, a2 = false, u2 = o2.alias;
10842          u2 && (n2 = u2[0], L(r3, F([0, 1], u2)));
10843          for (var c2 = 1, p2 = true; c2 < r3.length; c2 += 1) {
10844            var h2 = r3[c2], y2 = q(h2, 0, 1), d2 = q(h2, -1);
10845            if (('"' === y2 || "'" === y2 || "`" === y2 || '"' === d2 || "'" === d2 || "`" === d2) && y2 !== d2) throw new l("property names with quotes must have matching quotes");
10846            if ("constructor" !== h2 && p2 || (a2 = true), C(B, i2 = "%" + (n2 += "." + h2) + "%")) s2 = B[i2];
10847            else if (null != s2) {
10848              if (!(h2 in s2)) {
10849                if (!e3) throw new f("base intrinsic for " + t3 + " exists, but the property is not available.");
10850                return;
10851              }
10852              if (O && c2 + 1 >= r3.length) {
10853                var b2 = O(s2, h2);
10854                s2 = (p2 = !!b2) && "get" in b2 && !("originalValue" in b2.get) ? b2.get : s2[h2];
10855              } else p2 = C(s2, h2), s2 = s2[h2];
10856              p2 && !a2 && (B[i2] = s2);
10857            }
10858          }
10859          return s2;
10860        };
10861      }, 6413: (t2, e2, r2) => {
10862        function n(t3) {
10863          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
10864            return typeof t4;
10865          } : function(t4) {
10866            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
10867          }, n(t3);
10868        }
10869        function o(t3, e3) {
10870          var r3 = Object.keys(t3);
10871          if (Object.getOwnPropertySymbols) {
10872            var n2 = Object.getOwnPropertySymbols(t3);
10873            e3 && (n2 = n2.filter(function(e4) {
10874              return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
10875            })), r3.push.apply(r3, n2);
10876          }
10877          return r3;
10878        }
10879        function i(t3, e3, r3) {
10880          return (e3 = (function(t4) {
10881            var e4 = (function(t5) {
10882              if ("object" != n(t5) || !t5) return t5;
10883              var e5 = t5[Symbol.toPrimitive];
10884              if (void 0 !== e5) {
10885                var r4 = e5.call(t5, "string");
10886                if ("object" != n(r4)) return r4;
10887                throw new TypeError("@@toPrimitive must return a primitive value.");
10888              }
10889              return String(t5);
10890            })(t4);
10891            return "symbol" == n(e4) ? e4 : e4 + "";
10892          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
10893        }
10894        var s = r2(3609), a = r2(6426), u = r2(8953), c = r2(4327);
10895        function l(t3, e3) {
10896          a.call(this, t3, e3, "Boolean");
10897        }
10898        l.schemaName = "Boolean", l.defaultOptions = {}, l.prototype = Object.create(a.prototype), l.prototype.constructor = l, l._cast = u, l.set = a.set, l.setters = [], l.get = a.get, l.cast = function(t3) {
10899          return 0 === arguments.length || (false === t3 && (t3 = this._defaultCaster), this._cast = t3), this._cast;
10900        }, l._defaultCaster = function(t3) {
10901          if (null != t3 && "boolean" != typeof t3) throw new Error();
10902          return t3;
10903        }, l._checkRequired = function(t3) {
10904          return true === t3 || false === t3;
10905        }, l.checkRequired = a.checkRequired, l.prototype.checkRequired = function(t3) {
10906          return this.constructor._checkRequired(t3);
10907        }, Object.defineProperty(l, "convertToTrue", { get: function() {
10908          return u.convertToTrue;
10909        }, set: function(t3) {
10910          u.convertToTrue = t3;
10911        } }), Object.defineProperty(l, "convertToFalse", { get: function() {
10912          return u.convertToFalse;
10913        }, set: function(t3) {
10914          u.convertToFalse = t3;
10915        } }), l.prototype.cast = function(t3) {
10916          var e3;
10917          e3 = "function" == typeof this._castFunction ? this._castFunction : "function" == typeof this.constructor.cast ? this.constructor.cast() : l.cast();
10918          try {
10919            return e3(t3);
10920          } catch (e4) {
10921            throw new s("Boolean", t3, this.path, e4, this);
10922          }
10923        };
10924        var f = (function(t3) {
10925          for (var e3 = 1; e3 < arguments.length; e3++) {
10926            var r3 = null != arguments[e3] ? arguments[e3] : {};
10927            e3 % 2 ? o(Object(r3), true).forEach(function(e4) {
10928              i(t3, e4, r3[e4]);
10929            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t3, Object.getOwnPropertyDescriptors(r3)) : o(Object(r3)).forEac
10929h(function(e4) {
10930              Object.defineProperty(t3, e4, Object.getOwnPropertyDescriptor(r3, e4));
10931            });
10932          }
10933          return t3;
10934        })({}, a.prototype.$conditionalHandlers);
10935        Object.defineProperty(l.prototype, "$conditionalHandlers", { enumerable: false, value: f }), l.prototype.castForQuery = function(t3, e3, r3) {
10936          var n2;
10937          if (null != t3) return (n2 = this.$conditionalHandlers[t3]) ? n2.call(this, e3) : this.applySetters(e3, r3);
10938          try {
10939            return this.applySetters(e3, r3);
10940          } catch (t4) {
10941            throw t4 instanceof s && t4.path === this.path && null != this.$fullPath && (t4.path = this.$fullPath), t4;
10942          }
10943        }, l.prototype._castNullish = function(t3) {
10944          if (void 0 === t3) return t3;
10945          var e3 = "function" == typeof this.constructor.cast ? this.constructor.cast() : l.cast();
10946          return null == e3 ? t3 : !(e3.convertToFalse instanceof Set && e3.convertToFalse.has(t3)) && (!!(e3.convertToTrue instanceof Set && e3.convertToTrue.has(t3)) || t3);
10947        }, l.prototype.toJSONSchema = function(t3) {
10948          var e3 = this.options.required && "function" != typeof this.options.required;
10949          return c("boolean", "bool", null == t3 ? void 0 : t3.useBsonType, e3);
10950        }, l.prototype.autoEncryptionType = function() {
10951          return "bool";
10952        }, t2.exports = l;
10953      }, 6426: (t2, e2, r2) => {
10954        var n = r2(5832).hp;
10955        function o(t3) {
10956          return o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
10957            return typeof t4;
10958          } : function(t4) {
10959            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
10960          }, o(t3);
10961        }
10962        var i = r2(3672), s = r2(8879), a = r2(8499), u = r2(2555), c = r2(4450), l = r2(8133), f = r2(9183), p = r2(6155), h = r2(2746), y = r2(7930).schemaTypeSymbol, d = r2(8768), b = r2(7930).validatorErrorSymbol, m = r2(7930).documentIsModified, v = r2(7930).populateModelSymbol, g = i.CastError, _ = i.ValidatorError, w = { _skipMarkModified: true };
10963        function O(t3, e3, r3) {
10964          this[y] = true, this.path = t3, this.instance = r3, this.validators = [], this.getters = this.constructor.hasOwnProperty("getters") ? this.constructor.getters.slice() : [], this.setters = this.constructor.hasOwnProperty("setters") ? this.constructor.setters.slice() : [], this.splitPath(), e3 = e3 || {};
10965          for (var n2 = this.constructor.defaultOptions || {}, i2 = 0, a2 = Object.keys(n2); i2 < a2.length; i2++) {
10966            var u2 = a2[i2];
10967            "validate" === u2 ? this.validate(n2.validate) : n2.hasOwnProperty(u2) && !Object.prototype.hasOwnProperty.call(e3, u2) && (e3[u2] = n2[u2]);
10968          }
10969          null == e3.select && delete e3.select;
10970          var c2 = this.OptionsConstructor || s;
10971          this.options = new c2(e3), this._index = null, d.hasUserDefinedProperty(this.options, "immutable") && (this.$immutable = this.options.immutable, l(this));
10972          for (var f2 = 0, p2 = Object.keys(this.options); f2 < p2.length; f2++) {
10973            var h2 = p2[f2];
10974            if ("cast" !== h2) {
10975              if (d.hasUserDefinedProperty(this.options, h2) && "function" == typeof this[h2]) {
10976                if ("index" === h2 && this._index) {
10977                  if (false === e3.index) {
10978                    var b2 = this._index;
10979                    if ("object" === o(b2) && null != b2) {
10980                      if (b2.unique) throw new Error('Path "' + this.path + '" may not have `index` set to false and `unique` set to true');
10981                      if (b2.sparse) throw new Error('Path "' + this.path + '" may not have `index` set to false and `sparse` set to true');
10982                    }
10983                    this._index = false;
10984                  }
10985                  continue;
10986                }
10987                var m2 = e3[h2];
10988                if ("default" === h2) {
10989                  this.default(m2);
10990                  continue;
10991                }
10992                var v2 = Array.isArray(m2) ? m2 : [m2];
10993                this[h2].apply(this, v2);
10994              }
10995            } else Array.isArray(this.options[h2]) ? this.castFunction.apply(this, this.options[h2]) : this.castFunction(this.options[h2]);
10996          }
10997          Object.defineProperty(this, "$$context", { enumerable: false, configurable: false, writable: true, value: null });
10998        }
10999        function S(t3, e3) {
11000          if (void 0 !== t3 && !t3) {
11001            var r3 = new (e3.ErrorConstructor || _)(e3);
11002            return r3[b] = true, r3;
11003          }
11004        }
11005        function $(t3, e3) {
11006          return this.castForQuery(null, t3, e3);
11007        }
11008        function j(t3, e3) {
11009          var r3 = this;
11010          return Array.isArray(t3) ? t3.map(function(t4) {
11011            return Array.isArray(t4) && 0 === t4.length ? t4 : r3.castForQuery(null, t4, e3);
11012          }) : [this.castForQuery(null, t3, e3)];
11013        }
11014        O.prototype.OptionsConstructor = s, O.prototype.path, O.prototype.validators, O.prototype.isRequired, O.prototype.splitPath = function() {
11015          return null != this._presplitPath ? this._presplitPath : null != this.path ? (this._presplitPath = -1 
11015=== this.path.indexOf(".") ? [this.path] : this.path.split("."), this._presplitPath) : void 0;
11016        }, O.cast = function(t3) {
11017          return 0 === arguments.length || (false === t3 && (t3 = function(t4) {
11018            return t4;
11019          }), this._cast = t3), this._cast;
11020        }, O.prototype.castFunction = function(t3, e3) {
11021          return 0 === arguments.length ? this._castFunction : (false === t3 && (t3 = this.constructor._defaultCaster || function(t4) {
11022            return t4;
11023          }), "string" == typeof t3 ? (this._castErrorMessage = t3, this._castFunction) : (null != t3 && (this._castFunction = t3), null != e3 && (this._castErrorMessage = e3), this._castFunction));
11024        }, O.prototype.cast = function() {
11025          throw new Error("Base SchemaType class does not implement a `cast()` function");
11026        }, O.set = function(t3, e3) {
11027          this.hasOwnProperty("defaultOptions") || (this.defaultOptions = Object.assign({}, this.defaultOptions)), this.defaultOptions[t3] = e3;
11028        }, O.get = function(t3) {
11029          this.getters = this.hasOwnProperty("getters") ? this.getters : [], this.getters.push(t3);
11030        }, O.prototype.default = function(t3) {
11031          if (1 === arguments.length) {
11032            if (void 0 === t3) return void (this.defaultValue = void 0);
11033            if (null != t3 && t3.instanceOfSchema) throw new i("Cannot set default value of path `" + this.path + "` to a mongoose Schema instance.");
11034            return this.defaultValue = t3, this.defaultValue;
11035          }
11036          return arguments.length > 1 && (this.defaultValue = Array.prototype.slice.call(arguments)), this.defaultValue;
11037        }, O.prototype.index = function(t3) {
11038          return this._index = t3, d.expires(this._index), this;
11039        }, O.prototype.unique = function(t3, e3) {
11040          if (false === this._index) {
11041            if (!t3) return;
11042            throw new Error('Path "' + this.path + '" may not have `index` set to false and `unique` set to true');
11043          }
11044          return this.options.hasOwnProperty("index") || false !== t3 ? (null == this._index || true === this._index ? this._index = {} : "string" == typeof this._index && (this._index = { type: this._index }), this._index.unique = !!t3, "string" == typeof e3 && (this._duplicateKeyErrorMessage = e3), this) : this;
11045        }, O.prototype.text = function(t3) {
11046          if (false === this._index) {
11047            if (!t3) return this;
11048            throw new Error('Path "' + this.path + '" may not have `index` set to false and `text` set to true');
11049          }
11050          return this.options.hasOwnProperty("index") || false !== t3 ? (null === this._index || void 0 === this._index || "boolean" == typeof this._index ? this._index = {} : "string" == typeof this._index && (this._index = { type: this._index }), this._index.text = t3, this) : this;
11051        }, O.prototype.sparse = function(t3) {
11052          if (false === this._index) {
11053            if (!t3) return this;
11054            throw new Error('Path "' + this.path + '" may not have `index` set to false and `sparse` set to true');
11055          }
11056          return this.options.hasOwnProperty("index") || false !== t3 ? (null == this._index || "boolean" == typeof this._index ? this._index = {} : "string" == typeof this._index && (this._index = { type: this._index }), this._index.sparse = t3, this) : this;
11057        }, O.prototype.immutable = function(t3) {
11058          return this.$immutable = t3, l(this), this;
11059        }, O.prototype.transform = function(t3) {
11060          return this.options.transform = t3, this;
11061        }, O.prototype.set = function(t3) {
11062          if ("function" != typeof t3) throw new TypeError("A setter must be a function.");
11063          return this.setters.push(t3), this;
11064        }, O.prototype.get = function(t3) {
11065          if ("function" != typeof t3) throw new TypeError("A getter must be a function.");
11066          return this.getters.push(t3), this;
11067        }, O.prototype.validateAll = function(t3) {
11068          for (var e3 = 0; e3 < t3.length; e3++) this.validate(t3[e3]);
11069          return this;
11070        }, O.prototype.validate = function(t3, e3, r3) {
11071          var n2, s2, a2, u2;
11072          if ("function" == typeof t3 || t3 && "RegExp" === d.getFunctionName(t3.constructor)) return "function" == typeof e3 ? (n2 = { validator: t3, message: e3 }).type = r3 || "user defined" : e3 instanceof Object && !r3 ? ((n2 = p(e3) ? Object.assign({}, e3) : c(e3)).message || (n2.message = n2.msg), n2.validator = t3, n2.type = n2.type || "user defined") : (null == e3 && (e3 = i.messages.general.default), r3 || (r3 = "user defined"), n2 = { message: e3, type: r3, validator: t3 }), this.validators.push(n2), this;
11073          for (s2 = 0, a2 = arguments.length; s2 < a2; s2++) {
11074            if (u2 = arguments[s2], !d.isPOJO(u2)) {
11075              var l2 = "Invalid validator. Received (" + o(u2) + ") " + u2 + ". See https://mongoosejs.com/docs/api/schematype.html#SchemaType.prototype.validate()";
11076              throw new Error(l2);
11077            }
11078            this.validate(u2.validator, u2);
11079          }
11080          return this;
11081        }, O.prototype.required = function(t3, e3) {
11082          var r3 = {};
11083          if (arguments.length > 0 && null == t3) return this.validators = this.validators.filter(function(t4) {
11084            return t4.validator !== this.requiredValidator;
11085          }, this), this.isRequired = false, delete this.originalRequiredValue, this;
11086          if ("object" === o(t3) && (e3 = (r3 = t3).message || e3, t3 = t3.isRequired), false === t3) return this.validators = this.validators.filter(function(t4) {
11087            return t4.validator !== this.requiredValidator;
11088          }, this), this.isRequired = false, delete this.originalRequiredValue, this;
11089          var n2 = this;
11090          this.isRequired = true, this.requiredValidator = function(e4) {
11091            var r4 = this && this.$__ && this.$__.cachedRequired;
11092            if (null != r4 && !this.$__isSelected(n2.path) && !this[m](n2.path)) return true;
11093            if (null != r4 && n2.path in r4) {
11094              var o2 = !r4[n2.path] || n2.checkRequired(e4, this);
11095              return delete r4[n2.path], o2;
11096            }
11097            return "function" == typeof t3 && !t3.apply(this) || n2.checkRequired(e4, this);
11098          }, this.originalRequiredValue = t3, "string" == typeof t3 && (e3 = t3, t3 = void 0);
11099          var s2 = e3 || i.messages.general.required;
11100          return this.validators.unshift(Object.assign({}, r3, { validator: this.requiredValidator, message: s2, type: "required" })), this;
11101        }, O.prototype.ref = function(t3) {
11102          return this.options.ref = t3, this;
11103        }, O.prototype.getDefault = function(t3, e3, r3) {
11104          var n2;
11105          if (null != (n2 = "function" == typeof this.defaultValue ? this.defaultValue === Date.now || this.defaultValue === Array || "objectid" === this.defaultValue.name.toLowerCase() ? this.defaultValue.call(t3) : this.defaultValue.call(t3, t3) : this.defaultValue)) {
11106            if ("object" !== o(n2) || this.options && this.options.shared || (n2 = c(n2)), r3 && r3.skipCast) return this._applySetters(n2, t3);
11107            var i2 = this.applySetters(n2, t3, e3, void 0, w);
11108            return i2 && !Array.isArray(i2) && i2.$isSingleNested && (i2.$__parent = t3), i2;
11109          }
11110          return n2;
11111        }, O.prototype._applySetters = function(t3, e3, r3, n2, o2) {
11112          var i2 = t3;
11113          if (r3) return i2;
11114          for (var s2 = this.setters, a2 = s2.length - 1; a2 >= 0; a2--) i2 = s2[a2].call(e3, i2, n2, this, o2);
11115          return i2;
11116        }, O.prototype._castNullish = function(t3) {
11117          return t3;
11118        }, O.prototype.applySetters = function(t3, e3, r3, n2, o2) {
11119          var i2 = this._applySetters(t3, e3, r3, n2, o2);
11120          return null == i2 ? this._castNullish(i2) : i2 = this.cast(i2, e3, r3, n2, o2);
11121        }, O.prototype.applyGetters = function(t3, e3) {
11122          var r3 = t3, n2 = this.getters, o2 = n2.length;
11123          if (0 === o2) return r3;
11124          for (var i2 = 0; i2 < o2; ++i2) r3 = n2[i2].call(e3, r3, this);
11125          return r3;
11126        }, O.prototype.select = function(t3) {
11127          return this.selected = !!t3, this;
11128        }, O.prototype.doValidate = function(t3, e3, r3, n2) {
11129          var i2 = this, s2 = false, a2 = this.path;
11130          if ("function" != typeof e3) throw new TypeError("Must pass callback function to doValidate(), got ".concat(o(e3)));
11131          var u2 = this.validators.filter(function(t4) {
11132            return "object" === o(t4) && null !== t4;
11133          }), l2 = u2.length;
11134          if (!l2) return e3(null);
11135          for (var f2 = function() {
11136            if (s2) return 0;
11137            var e4, o2 = u2[y2], l3 = o2.validator, f3 = p(o2) ? Object.assign({}, o2) : c(o2);
11138            if (f3.path = n2 && n2.path ? n2.path : a2, f3.fullPath = i2.$fullPath, f3.value = t3, "string" == typeof t3 && (f3.length = t3.length, f3.value.length > 30 && (f3.value = f3.value.slice(0, 30) + "...")), l3 instanceof RegExp) return m2(l3.test(t3), f3, r3), 1;
11139            if ("function" != typeof l3) return 1;
11140            if (void 0 === t3 && l3 !== i2.requiredValidator) return m2(true, f3, r3), 1;
11141            try {
11142              e4 = f3.propsParameter ? l3.call(r3, t3, f3) : l3.call(r3, t3);
11143            } catch (t4) {
11144              e4 = false, f3.reason = t4, t4.message && (f3.message = t4.message);
11145            }
11146            null != e4 && "function" == typeof e4.then ? e4.then(function(t4) {
11147              m2(t4, f3, r3);
11148            }, function(t4) {
11149              f3.reason = t4, f3.message = t4.message, m2(e4 = false, f3, r3);
11150            }) : m2(e4, f3, r3);
11151          }, y2 = 0, d2 = u2.length; y2 < d2 && 0 !== f2(); ++y2) ;
11152          function m2(t4, r4, n3) {
11153            if (!s2) if (void 0 === t4 || t4) --l2 <= 0 && h(function() {
11154              e3(null);
11155            });
11156            else {
11157              var o2 = r4.ErrorConstructor || _;
11158              (s2 = new o2(r4, n3))[b] = true, h(function() {
11159                e3(s2);
11160              });
11161            }
11162          }
11163        }, O.prototype.doValidateSync = function(t3, e3, r3) {
11164          var n2 = this.path;
11165          if (!this.validators.length) return null;
11166          var i2 = this.validators;
11167          if (void 0 === t3) {
11168            if (0 === this.validators.length || "required" !== this.validators[0].type) return null;
11169            i2 = [this.validators[0]];
11170          }
11171          var s2 = null, a2 = 0, u2 = i2.length;
11172          for (a2 = 0; a2 < u2; ++a2) {
11173            var l2 = i2[a2];
11174            if (null !== l2 && "object" === o(l2)) {
11175              var h2 = l2.validator, y2 = p(l2) ? Object.assign({}, l2) : c(l2);
11176              y2.path = r3 && r3.path ? r3.path : n2, y2.fullPath = this.$fullPath, y2.value = t3, "string" == typeof t3 && (y2.length = t3.length, y2.value.length >
11176 30 && (y2.value = y2.value.slice(0, 30) + "..."));
11177              var d2 = false;
11178              if (!f(h2)) {
11179                if (h2 instanceof RegExp) s2 = S(h2.test(t3), y2);
11180                else if ("function" == typeof h2) {
11181                  try {
11182                    d2 = y2.propsParameter ? h2.call(e3, t3, y2) : h2.call(e3, t3);
11183                  } catch (t4) {
11184                    d2 = false, y2.reason = t4;
11185                  }
11186                  if ((null == d2 || "function" != typeof d2.then) && (s2 = S(d2, y2))) break;
11187                }
11188              }
11189            }
11190          }
11191          return s2;
11192        }, O._isRef = function(t3, e3, r3, o2) {
11193          var i2 = o2 && t3.options && (t3.options.ref || t3.options.refPath);
11194          if (!i2 && r3 && null != r3.$__) {
11195            var s2 = r3.$__fullPath(t3.path, true), a2 = r3.ownerDocument();
11196            i2 = null != s2 && a2.$populated(s2) || r3.$populated(t3.path);
11197          }
11198          return !!i2 && (null == e3 || !(n.isBuffer(e3) || "Binary" === e3._bsontype || !d.isObject(e3)) || o2);
11199        }, O.prototype._castRef = function(t3, e3, r3, i2) {
11200          if (null == t3) return t3;
11201          if (null != t3.$__) return t3.$__.wasPopulated = t3.$__.wasPopulated || { value: t3._doc._id }, t3;
11202          if (n.isBuffer(t3) || !d.isObject(t3)) {
11203            if (r3) return t3;
11204            throw new g(this.instance, t3, this.path, null, this);
11205          }
11206          var s2, a2, u2, c2 = e3.$__fullPath(this.path, true), l2 = e3.ownerDocument().$populated(c2, true), f2 = t3;
11207          if (!(e3.$__.populated && e3.$__.populated[c2] && e3.$__.populated[c2].options && e3.$__.populated[c2].options.options && e3.$__.populated[c2].options.options.lean)) {
11208            var p2 = l2 ? l2.options[v] : e3.constructor.db.model(this.options.ref);
11209            (f2 = p2.hydrate(t3, null, i2)).$__.wasPopulated = { value: f2._doc._id, options: (s2 = {}, a2 = v, u2 = p2, (a2 = (function(t4) {
11210              var e4 = (function(t5) {
11211                if ("object" != o(t5) || !t5) return t5;
11212                var e5 = t5[Symbol.toPrimitive];
11213                if (void 0 !== e5) {
11214                  var r4 = e5.call(t5, "string");
11215                  if ("object" != o(r4)) return r4;
11216                  throw new TypeError("@@toPrimitive must return a primitive value.");
11217                }
11218                return String(t5);
11219              })(t4);
11220              return "symbol" == o(e4) ? e4 : e4 + "";
11221            })(a2)) in s2 ? Object.defineProperty(s2, a2, { value: u2, enumerable: true, configurable: true, writable: true }) : s2[a2] = u2, s2) };
11222          }
11223          return f2;
11224        }, O.prototype.$conditionalHandlers = { $all: function(t3, e3) {
11225          var r3 = this;
11226          return Array.isArray(t3) ? t3.map(function(t4) {
11227            return r3.castForQuery(null, t4, e3);
11228          }) : [this.castForQuery(null, t3, e3)];
11229        }, $eq: $, $in: j, $ne: $, $nin: j, $exists: a, $type: u }, O.prototype.castForQuery = function(t3, e3, r3) {
11230          var n2;
11231          if (null != t3) {
11232            if (!(n2 = this.$conditionalHandlers[t3])) throw new Error("Can't use " + t3);
11233            return n2.call(this, e3, r3);
11234          }
11235          try {
11236            return this.applySetters(e3, r3);
11237          } catch (t4) {
11238            throw t4 instanceof g && t4.path === this.path && null != this.$fullPath && (t4.path = this.$fullPath), t4;
11239          }
11240        }, O.checkRequired = function(t3) {
11241          return 0 !== arguments.length && (this._checkRequired = t3), this._checkRequired;
11242        }, O.prototype.checkRequired = function(t3) {
11243          return null != t3;
11244        }, O.prototype.clone = function() {
11245          var t3 = Object.assign({}, this.options), e3 = new this.constructor(this.path, t3, this.instance);
11246          return e3.validators = this.validators.slice(), void 0 !== this.requiredValidator && (e3.requiredValidator = this.requiredValidator), void 0 !== this.defaultValue && (e3.defaultValue = this.defaultValue), void 0 !== this.$immutable && void 0 === this.options.immutable && (e3.$immutable = this.$immutable, l(e3)), void 0 !== this._index && (e3._index = this._index), void 0 !== this.selected && (e3.selected = this.selected), void 0 !== this.isRequired && (e3.isRequired = this.isRequired), void 0 !== this.originalRequiredValue && (e3.originalRequiredValue = this.originalRequiredValue), e3.getters = this.getters.slice(), e3.setters = this.setters.slice(), e3;
11247        }, O.prototype.getEmbeddedSchemaType = function() {
11248          return this.$embeddedSchemaType;
11249        }, O.prototype._duplicateKeyErrorMessage = null, O.prototype.toJSONSchema = function(t3) {
11250          throw new Error("Converting unsupported SchemaType to JSON Schema: ".concat(this.instance, ' at path "').concat(this.path, '"'));
11251        }, O.prototype.autoEncryptionType = function() {
11252          return null;
11253        }, t2.exports = e2 = O, e2.CastError = g, e2.ValidatorError = _;
11254      }, 6451: (t2, e2, r2) => {
11255        var n = r2(8768).isPOJO;
11256        t2.exports = function t3(e3) {
11257          for (var r3, o, i, s = Object.keys(e3), a = s.length; a--; ) i = e3[o = s[a]], n(i) && (e3[o] = t3(i)), void 0 !== e3[o] ? r3 = true : delete e3[o];
11258          return r3 ? e3 : void 0;
11259        };
11260      }, 6511: (t2, e2, r2) => {
11261        function n(t3) {
11262          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
11263            return typeof t4;
11264          } : function(t4) {
11265            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
11266          }, n(t3);
11267        }
11268        function o(t3, e3) {
11269          (null == e3 || e3 > t3.length) && (e3 = t3.length);
11270          for (var r3 = 0, n2 = Array(e3); r3 < e3; r3++) n2[r3] = t3[r3];
11271          return n2;
11272        }
11273        function i(t3, e3) {
11274          var r3 = Object.keys(t3);
11275          if (Object.getOwnPropertySymbols) {
11276            var n2 = Object.getOwnPropertySymbols(t3);
11277            e3 && (n2 = n2.filter(function(e4) {
11278              return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
11279            })), r3.push.apply(r3, n2);
11280          }
11281          return r3;
11282        }
11283        function s(t3) {
11284          for (var e3 = 1; e3 < arguments.length; e3++) {
11285            var r3 = null != arguments[e3] ? arguments[e3] : {};
11286            e3 % 2 ? i(Object(r3), true).forEach(function(e4) {
11287              a(t3, e4, r3[e4]);
11288            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t3, Object.getOwnPropertyDescriptors(r3)) : i(Object(r3)).forEac
11288h(function(e4) {
11289              Object.defineProperty(t3, e4, Object.getOwnPropertyDescriptor(r3, e4));
11290            });
11291          }
11292          return t3;
11293        }
11294        function a(t3, e3, r3) {
11295          return (e3 = (function(t4) {
11296            var e4 = (function(t5) {
11297              if ("object" != n(t5) || !t5) return t5;
11298              var e5 = t5[Symbol.toPrimitive];
11299              if (void 0 !== e5) {
11300                var r4 = e5.call(t5, "string");
11301                if ("object" != n(r4)) return r4;
11302                throw new TypeError("@@toPrimitive must return a primitive value.");
11303              }
11304              return String(t5);
11305            })(t4);
11306            return "symbol" == n(e4) ? e4 : e4 + "";
11307          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
11308        }
11309        r2(8768);
11310        var u = t2.exports = function() {
11311        };
11312        u.ctor = function() {
11313          var t3 = Array.prototype.slice.call(arguments), e3 = function() {
11314            u.apply(this, arguments), this.paths = {}, this.states = {};
11315          };
11316          return (e3.prototype = new u()).constructor = e3, e3.prototype.stateNames = t3, t3.forEach(function(t4) {
11317            e3.prototype[t4] = function(e4) {
11318              this._changeState(e4, t4);
11319            };
11320          }), e3;
11321        }, u.prototype._changeState = function(t3, e3) {
11322          var r3 = this.paths[t3];
11323          if (r3 !== e3) {
11324            var n2 = this.states[r3];
11325            n2 && delete n2[t3], this.paths[t3] = e3, this.states[e3] 
11325= this.states[e3] || {}, this.states[e3][t3] = true;
11326          }
11327        }, u.prototype.clear = function(t3) {
11328          if (null != this.states[t3]) for (var e3, r3 = Object.keys(this.states[t3]), n2 = r3.length; n2--; ) e3 = r3[n2], delete this.states[t3][e3], delete this.paths[e3];
11329        }, u.prototype.clearPath = function(t3) {
11330          var e3 = this.paths[t3];
11331          e3 && (delete this.paths[t3], delete this.states[e3][t3]);
11332        }, u.prototype.getStatePaths = function(t3) {
11333          return null != this.states[t3] ? this.states[t3] : {};
11334        }, u.prototype.some = function() {
11335          var t3 = this, e3 = arguments.length ? arguments : this.stateNames;
11336          return Array.prototype.some.call(e3, function(e4) {
11337            return null != t3.states[e4] && Object.keys(t3.states[e4]).length;
11338          });
11339        }, u.prototype._iter = function(t3) {
11340          return function() {
11341            var e3 = Array.prototype.slice.call(arguments), r3 = e3.pop();
11342            e3.length || (e3 = this.stateNames);
11343            var n2 = this;
11344            return e3.reduce(function(t4, e4) {
11345              return null == n2.states[e4] ? t4 : t4.concat(Object.keys(n2.states[e4]));
11346            }, [])[t3](function(t4, e4, n3) {
11347              return r3(t4, e4, n3);
11348            });
11349          };
11350        }, u.prototype.forEach = function() {
11351          return this.forEach = this._iter("forEach"), this.forEach.apply(this, arguments);
11352        }, u.prototype.map = function() {
11353          return this.map = this._iter("map"), this.map.apply(this, arguments);
11354        }, u.prototype.clone = function() {
11355          var t3 = new this.constructor();
11356          t3.paths = s({}, this.paths);
11357          var e3, r3 = (function(t4, e4) {
11358            var r4 = "undefined" != typeof Symbol && t4[Symbol.iterator] || t4["@@iterator"];
11359            if (!r4) {
11360              if (Array.isArray(t4) || (r4 = (function(t5, e5) {
11361                if (t5) {
11362                  if ("string" == typeof t5) return o(t5, e5);
11363                  var r5 = {}.toString.call(t5).slice(8, -1);
11364                  return "Object" === r5 && t5.constructor && (r5 = t5.constructor.name), "Map" === r5 || "Set" === r5 ? Array.from(t5) : "Arguments" === r5 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r5) ? o(t5, e5) : void 0;
11365                }
11366              })(t4)) || e4) {
11367                r4 && (t4 = r4);
11368                var n3 = 0, i2 = function() {
11369                };
11370                return { s: i2, n: function() {
11371                  return n3 >= t4.length ? { done: true } : { done: false, value: t4[n3++] };
11372                }, e: function(t5) {
11373                  throw t5;
11374                }, f: i2 };
11375              }
11376              throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
11377            }
11378            var s2, a2 = true, u2 = false;
11379            return { s: function() {
11380              r4 = r4.call(t4);
11381            }, n: function() {
11382              var t5 = r4.next();
11383              return a2 = t5.done, t5;
11384            }, e: function(t5) {
11385              u2 = true, s2 = t5;
11386            }, f: function() {
11387              try {
11388                a2 || null == r4.return || r4.return();
11389              } finally {
11390                if (u2) throw s2;
11391              }
11392            } };
11393          })(this.stateNames);
11394          try {
11395            for (r3.s(); !(e3 = r3.n()).done; ) {
11396              var n2 = e3.value;
11397              n2 in this.states && (t3.states[n2] = null == this.states[n2] ? this.states[n2] : s({}, this.states[n2]));
11398            }
11399          } catch (t4) {
11400            r3.e(t4);
11401          } finally {
11402            r3.f();
11403          }
11404          return t3;
11405        };
11406      }, 6544: (t2, e2, r2) => {
11407        function n(t3) {
11408          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
11409            return typeof t4;
11410          } : function(t4) {
11411            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
11412          }, n(t3);
11413        }
11414        var o;
11415        if (!Object.keys) {
11416          var i = Object.prototype.hasOwnProperty, s = Object.prototype.toString, a = r2(6312), u = Object.prototype.propertyIsEnumerable, c = !u.call({ toString: null }, "toString"), l = u.call(function() {
11417          }
11417, "prototype"), f = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"], p = function(t3) {
11418            var e3 = t3.constructor;
11419            return e3 && e3.prototype === t3;
11420          }, h = { $applicationCache: true, $console: true, $external: true, $frame: true, $frameElement: true, $frames: true, $innerHeight: true, $innerWidth: true, $onmozfullscreenchange: true, $onmozfullscreenerror: true, $outerHeight: true, $outerWidth: true, $pageXOffset: true, $pageYOffset: true, $parent: true, $scrollLeft: true, $scrollTop: true, $scrollX: true, $scrollY: true, $self: true, $webkitIndexedDB: true, $webkitStorageInfo: true, $window: true }, y = (function() {
11421            if ("undefined" == typeof window) return false;
11422            for (var t3 in window) try {
11423              if (!h["$" + t3] && i.call(window, t3) && null !== window[t3] && "object" === n(window[t3])) try {
11424                p(window[t3]);
11425              } catch (t4) {
11426                return true;
11427              }
11428            } catch (t4) {
11429              return true;
11430            }
11431            return false;
11432          })();
11433          o = function(t3) {
11434            var e3 = null !== t3 && "object" === n(t3), r3 = "[object Function]" === s.call(t3), o2 = a(t3), u2 = e3 && "[object String]" === s.call(t3), h2 = [];
11435            if (!e3 && !r3 && !o2) throw new TypeError("Object.keys called on a non-object");
11436            var d = l && r3;
11437            if (u2 && t3.length > 0 && !i.call(t3, 0)) for (var b = 0; b < t3.length; ++b) h2.push(String(b));
11438            if (o2 && t3.length > 0) for (var m = 0; m < t3.length; ++m) h2.push(String(m));
11439            else for (var v in t3) d && "prototype" === v || !i.call(t3, v) || h2.push(String(v));
11440            if (c) for (var g = (function(t4) {
11441              if ("undefined" == typeof window || !y) return p(t4);
11442              try {
11443                return p(t4);
11444              } catch (t5) {
11445                return false;
11446              }
11447            })(t3), _ = 0; _ < f.length; ++_) g && "constructor" === f[_] || !i.call(t3, f[_]) || h2.push(f[_]);
11448            return h2;
11449          };
11450        }
11451        t2.exports = o;
11452      }, 6547: (t2, e2, r2) => {
11453        function n(t3, e3) {
11454          var r3 = Object.keys(t3);
11455          if (Object.getOwnPropertySymbols) {
11456            var n2 = Object.getOwnPropertySymbols(t3);
11457            e3 && (n2 = n2.filter(function(e4) {
11458              return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
11459            })), r3.push.apply(r3, n2);
11460          }
11461          return r3;
11462        }
11463        function o(t3, e3, r3) {
11464          return (e3 = (function(t4) {
11465            var e4 = (function(t5) {
11466              if ("object" != i(t5) || !t5) return t5;
11467              var e5 = t5[Symbol.toPrimitive];
11468              if (void 0 !== e5) {
11469                var r4 = e5.call(t5, "string");
11470                if ("object" != i(r4)) return r4;
11471                throw new TypeError("@@toPrimitive must return a primitive value.");
11472              }
11473              return String(t5);
11474            })(t4);
11475            return "symbol" == i(e4) ? e4 : e4 + "";
11476          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
11477        }
11478        function i(t3) {
11479          return i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
11480            return typeof t4;
11481          } : function(t4) {
11482            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
11483          }, i(t3);
11484        }
11485        var s = r2(3550).EventEmitter, a = r2(9380), u = r2(8768), c = r2(7930).documentArrayParent;
11486        function l(t3, e3, r3, s2, l2) {
11487          var f2;
11488          u.isMongooseDocumentArray(e3) ? (this.__parentArray = e3, this[c] = e3.$parent()) : (this.__parentArray = void 0, this[c] = void 0), this.$setIndex(l2), this.$__parent = this[c], "object" === i(r3) && null != r3 ? (f2 = (function(t4) {
11489            for (var e4 = 1; e4 < arguments.length; e4++) {
11490              var r4 = null != arguments[e4] ? arguments[e4] : {};
11491              e4 % 2 ? n(Object(r4), true).forEach(function(e5) {
11492                o(t4, e5, r4[e5]);
11493              }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t4, Object.getOwnPropertyDescriptors(r4)) : n(Object(r4)).forEac
11493h(function(e5) {
11494                Object.defineProperty(t4, e5, Object.getOwnPropertyDescriptor(r4, e5));
11495              });
11496            }
11497            return t4;
11498          })({ isNew: true }, r3), r3 = void 0) : f2 = { isNew: true }, a.call(this, t3, s2, this[c], r3, f2);
11499        }
11500        for (var f in l.prototype = Object.create(a.prototype), l.prototype.constructor = l, Object.defineProperty(l.prototype, "$isSingleNested", { configurable: false, writable: false, value: false }), Object.defineProperty(l.prototype, "$isDocumentArrayElement", { configurable: false, writable: false, value: true }), s.prototype) l[f] = s.prototype[f];
11501        l.prototype.$setIndex = function(t3) {
11502          if (this.__index = t3, null != this.$__ && null != this.$__.validationError) for (var e3 = 0, r3 = Object.keys(this.$__.validationError.errors); e3 < r3.length; e3++) {
11503            var n2 = r3[e3];
11504            this.invalidate(n2, this.$__.validationError.errors[n2]);
11505          }
11506        }, l.prototype.populate = function() {
11507          throw new Error('Mongoose does not support calling populate() on nested docs. Instead of `doc.arr[0].populate("path")`, use `doc.populate("arr.0.path")`');
11508        }, l.prototype.$__removeFromParent = function() {
11509          var t3 = this._doc._id;
11510          if (!t3) throw new Error("For your own good, Mongoose does not know how to remove an ArraySubdocument that has no _id");
11511          this.__parentArray.pull({ _id: t3 });
11512        }, l.prototype.$__fullPath = function(t3, e3) {
11513          return null == this.__index ? null : (this.$__.fullPath || this.ownerDocument(), e3 ? t3 ? this.$__.fullPath + "." + t3 : this.$__.fullPath : t3 ? this.$__.fullPath + "." + this.__index + "." + t3 : this.$__.fullPath + "." + this.__index);
11514        }, l.prototype.$__pathRelativeToParent = function(t3, e3) {
11515          return null != this.__index && this.__parentArray && this.__parentArray.$path ? e3 ? null == t3 ? this.__parentArray.$path() : this.__parentArray.$path() + "." + t3 : null == t3 ? this.__parentArray.$path() + "." + this.__index : this.__parentArray.$path() + "." + this.__index + "." + t3 : null;
11516        }, l.prototype.$parent = function() {
11517          return this[c];
11518        }, l.prototype.parentArray = function() {
11519          return this.__parentArray;
11520        }, t2.exports = l;
11521      }, 6583: (t2, e2, r2) => {
11522        function n(t3) {
11523          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
11524            return typeof t4;
11525          } : function(t4) {
11526            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
11527          }, n(t3);
11528        }
11529        var o, i = r2(8863), s = r2(1464);
11530        try {
11531          o = [].__proto__ === Array.prototype;
11532        } catch (t3) {
11533          if (!t3 || "object" !== n(t3) || !("code" in t3) || "ERR_PROTO_ACCESS" !== t3.code) throw t3;
11534        }
11535        var a = !!o && s && s(Object.prototype, "__proto__"), u = Object, c = u.getPrototypeOf;
11536        t2.exports = a && "function" == typeof a.get ? i([a.get]) : "function" == typeof c && function(t3) {
11537          return c(null == t3 ? t3 : u(t3));
11538        };
11539      }, 6665: (t2) => {
11540        t2.exports = function(t3, e2) {
11541          for (var r2, n, o, i = e2.split("."), s = "", a = 0; a < i.length; ++a) if (t3[s += s.length ? "." : "" + i[a]]) {
11542            for (o = (n = Object.keys(t3)).length, r2 = 0; r2 < o; ++r2) 0 !== n[a].indexOf(s + ".") || n[a].indexOf(e2);
11543            return true;
11544          }
11545          return false;
11546        };
11547      }, 6730: (t2) => {
11548        var e2 = Object.prototype.toString, r2 = Math.max, n = function(t3, e3) {
11549          for (var r3 = [], n2 = 0; n2 < t3.length; n2 += 1) r3[n2] = t3[n2];
11550          for (var o = 0; o < e3.length; o += 1) r3[o + t3.length] = e3[o];
11551          return r3;
11552        };
11553        t2.exports = function(t3) {
11554          var o = this;
11555          if ("function" != typeof o || "[object Function]" !== e2.apply(o)) throw new TypeError("Function.prototype.bind called on incompatible " + o);
11556          for (var i, s = (function(t4) {
11557            for (var e3 = [], r3 = 1, n2 = 0; r3 < t4.length; r3 += 1, n2 += 1) e3[n2] = t4[r3];
11558            return e3;
11559          })(arguments), a = r2(0, o.length - s.length), u = [], c = 0; c < a; c++) u[c] = "$" + c;
11560          if (i = Function("binder", "return function (" + (function(t4) {
11561            for (var e3 = "", r3 = 0; r3 < t4.length; r3 += 1) e3 += t4[r3], r3 + 1 < t4.length && (e3 += ",");
11562            return e3;
11563          })(u) + "){ return binder.apply(this,arguments); }")(function() {
11564            if (this instanceof i) {
11565              var e3 = o.apply(this, n(s, arguments));
11566              return Object(e3) === e3 ? e3 : this;
11567            }
11568            return o.apply(t3, n(s, arguments));
11569          }), o.prototype) {
11570            var l = function() {
11571            };
11572            l.prototype = o.prototype, i.prototype = new l(), l.prototype = null;
11573          }
11574          return i;
11575        };
11576      }, 6750: (t2, e2, r2) => {
11577        function n(t3) {
11578          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
11579            return typeof t4;
11580          } : function(t4) {
11581            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
11582          }, n(t3);
11583        }
11584        var o = r2(988), i = r2(9907), s = r2(2268), a = r2(1464);
11585        t2.exports = function(t3, e3, r3) {
11586          if (!t3 || "object" !== n(t3) && "function" != typeof t3) throw new s("`obj` must be an object or a function`");
11587          if ("string" != typeof e3 && "symbol" !== n(e3)) throw new s("`property` must be a string or a symbol`");
11588          if (arguments.length > 3 && "boolean" != typeof arguments[3] && null !== arguments[3]) throw new s("`nonEnumerable`, if provided, must be a boolean or null");
11589          if (arguments.length > 4 && "boolean" != typeof arguments[4] && null !== arguments[4]) throw new s("`nonWritable`, if provided, must be a boolean or null");
11590          if (arguments.length > 5 && "boolean" != typeof arguments[5] && null !== arguments[5]) throw new s("`nonConfigurable`, if provided, must be a boolean or null");
11591          if (arguments.length > 6 && "boolean" != typeof arguments[6]) throw new s("`loose`, if provided, must be a boolean");
11592          var u = arguments.length > 3 ? arguments[3] : null, c = arguments.length > 4 ? arguments[4] : null, l = arguments.length > 5 ? arguments[5] : null, f = arguments.length > 6 && arguments[6], p = !!a && a(t3, e3);
11593          if (o) o(t3, e3, { configurable: null === l && p ? p.configurable : !l, enumerable: null === u && p ? p.enumerable : !u, value: r3, writable: null === c && p ? p.writable : !c });
11594          else {
11595            if (!f && (u || c || l)) throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
11596            t3[e3] = r3;
11597          }
11598        };
11599      }, 6775: (t2, e2) => {
11600        e2.byteLength = function(t3) {
11601          var e3 = a(t3), r3 = e3[0], n2 = e3[1];
11602          return 3 * (r3 + n2) / 4 - n2;
11603        }, e2.toByteArray = function(t3) {
11604          var e3, r3, i2 = a(t3), s2 = i2[0], u2 = i2[1], c2 = new o((function(t4, e4, r4) {
11605            return 3 * (e4 + r4) / 4 - r4;
11606          })(0, s2, u2)), l = 0, f = u2 > 0 ? s2 - 4 : s2;
11607          for (r3 = 0; r3 < f; r3 += 4) e3 = n[t3.charCodeAt(r3)] << 18 | n[t3.charCodeAt(r3 + 1)] << 12 | n[t3.charCodeAt(r3 + 2)] << 6 | n[t3.charCodeAt(r3 + 3)], c2[l++
11607] = e3 >> 16 & 255, c2[l++] = e3 >> 8 & 255, c2[l++] = 255 & e3;
11608          return 2 === u2 && (e3 = n[t3.charCodeAt(r3)] << 2 | n[t3.charCodeAt(r3 + 1)] >> 4, c2[l++] = 255 & e3), 1 === u2 && (e3 = n[t3.charCodeAt(r3)] << 10 | n[t3.charCodeAt(r3 + 1)] << 4 | n[t3.charCodeAt(r3 + 2)] >> 2, c2[l++] = e3 >> 8 & 255, c2[l++] = 255 & e3), c2;
11609        }, e2.fromByteArray = function(t3) {
11610          for (var e3, n2 = t3.length, o2 = n2 % 3, i2 = [], s2 = 16383, a2 = 0, u2 = n2 - o2; a2 < u2; a2 += s2) i2.push(c(t3, a2, a2 + s2 > u2 ? u2 : a2 + s2));
11611          return 1 === o2 ? (e3 = t3[n2 - 1], i2.push(r2[e3 >> 2] + r2[e3 << 4 & 63] + "==")) : 2 === o2 && (e3 = (t3[n2 - 2] << 8) + t3[n2 - 1], i2.push(r2[e3 >> 10] + r2[e3 >> 4 & 63] + r2[e3 << 2 & 63] + "=")), i2.join("");
11612        };
11613        for (var r2 = [], n = [], o = "undefined" != typeof Uint8Array ? Uint8Array : Array, i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", s = 0; s < 64; ++s) r2[s] = i[s], n[i.charCodeAt(s)] = s;
11614        function a(t3) {
11615          var e3 = t3.length;
11616          if (e3 % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4");
11617          var r3 = t3.indexOf("=");
11618          return -1 === r3 && (r3 = e3), [r3, r3 === e3 ? 0 : 4 - r3 % 4];
11619        }
11620        function u(t3) {
11621          return r2[t3 >> 18 & 63] + r2[t3 >> 12 & 63] + r2[t3 >> 6 & 63] + r2[63 & t3];
11622        }
11623        function c(t3, e3, r3) {
11624          for (var n2, o2 = [], i2 = e3; i2 < r3; i2 += 3) n2 = (t3[i2] << 16 & 16711680) + (t3[i2 + 1] << 8 & 65280) + (255 & t3[i2 + 2]), o2.push(u(n2));
11625          return o2.join("");
11626        }
11627        n["-".charCodeAt(0)] = 62, n["_".charCodeAt(0)] = 63;
11628      }, 6801: (t2, e2, r2) => {
11629        function n(t3) {
11630          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
11631            return typeof t4;
11632          } : function(t4) {
11633            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
11634          }, n(t3);
11635        }
11636        function o() {
11637          try {
11638            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
11639            }));
11640          } catch (t4) {
11641          }
11642          return (o = function() {
11643            return !!t3;
11644          })();
11645        }
11646        function i(t3) {
11647          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
11648            return t4.__proto__ || Object.getPrototypeOf(t4);
11649          }, i(t3);
11650        }
11651        function s(t3, e3) {
11652          return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
11653            return t4.__proto__ = e4, t4;
11654          }, s(t3, e3);
11655        }
11656        var a = (function(t3) {
11657          function e3(t4, r4) {
11658            var s2;
11659            return (function(t5, e4) {
11660              if (!(t5 instanceof e4)) throw new TypeError("Cannot call a class as a function");
11661            })(this, e3), (s2 = (function(t5, e4, r5) {
11662              return e4 = i(e4), (function(t6, e5) {
11663                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
11664                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
11665                return (function(t7) {
11666                  if (void 0 === t7) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
11667                  return t7;
11668                })(t6);
11669              })(t5, o() ? Reflect.construct(e4, r5 || [], i(t5).constructor) : e4.apply(t5, r5));
11670            })(this, e3, [r4 = r4 || "Cannot populate path `" + t4 + "` because it is not in your schema. Set the `strictPopulate` option to false to override."])).path = t4, s2;
11671          }
11672          return (function(t4, e4) {
11673            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
11674            t4.prototype = Object.create(e4 && e4.prototype, { constructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && s(t4, e4);
11675          })(e3, t3), r3 = e3, Object.defineProperty(r3, "prototype", { writable: false }), r3;
11676          var r3;
11677        })(r2(8213));
11678        Object.defineProperty(a.prototype, "name", { value: "StrictPopulateError" }), t2.exports = a;
11679      }, 6814: (t2) => {
11680        t2.exports = function(t3) {
11681          for (var e2 = {}, r2 = 0, n = Object.keys(t3); r2 < n.length; r2++) {
11682            var o = n[r2];
11683            if (-1 !== o.indexOf(".")) for (var i = o.split("."), s = i[0], a = 0; a < i.length; ++a) e2[s] = 1, a + 1 < i.length && (s = s + "." + i[a + 1]);
11684            else e2[o] = 1;
11685          }
11686          return e2;
11687        };
11688      }, 6867: (t2, e2, r2) => {
11689        function n(t3) {
11690          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
11691            return typeof t4;
11692          } : function(t4) {
11693            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
11694          }, n(t3);
11695        }
11696        function o(t3, e3) {
11697          (null == e3 || e3 > t3.length) && (e3 = t3.length);
11698          for (var r3 = 0, n2 = Array(e3); r3 < e3; r3++) n2[r3] = t3[r3];
11699          return n2;
11700        }
11701        function i(t3, e3) {
11702          for (var r3 = 0; r3 < e3.length; r3++) {
11703            var n2 = e3[r3];
11704            n2.enumerable = n2.enumerable || false, n2.configurable = true, "value" in n2 && (n2.writable = true), Object.defineProperty(t3, s(n2.key), n2);
11705          }
11706        }
11707        function s(t3) {
11708          var e3 = (function(t4) {
11709            if ("object" != n(t4) || !t4) return t4;
11710            var e4 = t4[Symbol.toPrimitive];
11711            if (void 0 !== e4) {
11712              var r3 = e4.call(t4, "string");
11713              if ("object" != n(r3)) return r3;
11714              throw new TypeError("@@toPrimitive must return a primitive value.");
11715            }
11716            return String(t4);
11717          })(t3);
11718          return "symbol" == n(e3) ? e3 : e3 + "";
11719        }
11720        function a() {
11721          try {
11722            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
11723            }));
11724          } catch (t4) {
11725          }
11726          return (a = function() {
11727            return !!t3;
11728          })();
11729        }
11730        function u() {
11731          return u = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function(t3, e3, r3) {
11732            var n2 = (function(t4, e4) {
11733              for (; !{}.hasOwnProperty.call(t4, e4) && null !== (t4 = c(t4)); ) ;
11734              return t4;
11735            })(t3, e3);
11736            if (n2) {
11737              var o2 = Object.getOwnPropertyDescriptor(n2, e3);
11738              return o2.get ? o2.get.call(arguments.length < 3 ? t3 : r3) : o2.value;
11739            }
11740          }, u.apply(null, arguments);
11741        }
11742        function c(t3) {
11743          return c = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
11744            return t4.__proto__ || Object.getPrototypeOf(t4);
11745          }, c(t3);
11746        }
11747        function l(t3, e3) {
11748          return l = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
11749            return t4.__proto__ = e4, t4;
11750          }, l(t3, e3);
11751        }
11752        var f = r2(2081), p = r2(241), h = r2(6426), y = r2(4327), d = (function(t3) {
11753          function e3(t4, r3) {
11754            var o2;
11755            return (function(t5, e4) {
11756              if (!(t5 instanceof e4)) throw new TypeError("Cannot call a class as a function");
11757            })(this, e3), (o2 = (function(t5, e4, r4) {
11758              return e4 = c(e4), (function(t6, e5) {
11759                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
11760                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
11761                return (function(t7) {
11762                  if (void 0 === t7) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
11763                  return t7;
11764                })(t6);
11765              })(t5, a() ? Reflect.construct(e4, r4 || [], c(t5).constructor) : e4.apply(t5, r4));
11766            })(this, e3, [t4, r3, "Map"])).$isSchemaMap = true, o2;
11767          }
11768          return (function(t4, e4) {
11769            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
11770            t4.prototype = Object.create(e4 && e4.prototype, { c
11770onstructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && l(t4, e4);
11771          })(e3, t3), s2 = e3, p2 = [{ key: "set", value: function(t4, e4) {
11772            return h.set(t4, e4);
11773          } }, { key: "cast", value: function(t4, e4, n2, i2, s3) {
11774            var a2;
11775            if (t4 instanceof f) return t4;
11776            var u2 = null !== (a2 = null == s3 ? void 0 : s3.path) && void 0 !== a2 ? a2 : this.path;
11777            if (n2) {
11778              var c2 = new f({}, u2, e4, this.$__schemaType);
11779              if (t4 instanceof r2.g.Map) {
11780                var l2, p3 = (function(t5, e5) {
11781                  var r3 = "undefined" != typeof Symbol && t5[Symbol.iterator] || t5["@@iterator"];
11782                  if (!r3) {
11783                    if (Array.isArray(t5) || (r3 = (function(t6, e6) {
11784                      if (t6) {
11785                        if ("string" == typeof t6) return o(t6, e6);
11786                        var r4 = {}.toString.call(t6).slice(8, -1);
11787                        return "Object" === r4 && t6.constructor && (r4 = t6.constructor.name), "Map" === r4 || "Set" === r4 ? Array.from(t6) : "Arguments" === r4 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r4) ? o(t6, e6) : void 0;
11788                      }
11789                    })(t5)) || e5) {
11790                      r3 && (t5 = r3);
11791                      var n3 = 0, i3 = function() {
11792                      };
11793                      return { s: i3, n: function() {
11794                        return n3 >= t5.length ? { done: true } : { done: false, value: t5[n3++] };
11795                      }, e: function(t6) {
11796                        throw t6;
11797                      }, f: i3 };
11798                    }
11799                    throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
11800                  }
11801                  var s4, a3 = true, u3 = false;
11802                  return { s: function() {
11803                    r3 = r3.call(t5);
11804                  }, n: function() {
11805                    var t6 = r3.next();
11806                    return a3 = t6.done, t6;
11807                  }, e: function(t6) {
11808                    u3 = true, s4 = t6;
11809                  }, f: function() {
11810                    try {
11811                      a3 || null == r3.return || r3.return();
11812                    } finally {
11813                      if (u3) throw s4;
11814                    }
11815                  } };
11816                })(t4.keys());
11817                try {
11818                  for (p3.s(); !(l2 = p3.n()).done; ) {
11819                    var h2 = l2.value, y2 = t4.get(h2);
11820                    y2 = null == y2 ? c2.$__schemaType._castNullish(y2) : c2.$__schemaType.cast(y2, e4, true, null, { path: u2 + "." + h2 }), c2.$init(h2, y2);
11821                  }
11822                } catch (t5) {
11823                  p3.e(t5);
11824                } finally {
11825                  p3.f();
11826                }
11827              } else for (var d2 = 0, b = Object.keys(t4); d2 < b.length; d2++) {
11828                var m = b[d2], v = t4[m];
11829                v = null == v ? c2.$__schemaType._castNullish(v) : c2.$__schemaType.cast(v, e4, true, null, { path: u2 + "." + m }), c2.$init(m, v);
11830              }
11831              return c2;
11832            }
11833            return new f(t4, u2, e4, this.$__schemaType);
11834          } }, { key: "clone", value: function() {
11835            var t4, r3, n2, o2 = (t4 = e3, r3 = this, "function" == typeof (n2 = u(c(t4.prototype), "clone", r3)) ? function(t5) {
11836              return n2.apply(r3, t5);
11837            } : n2)([]);
11838            return null != this.$__schemaType && (o2.$__schemaType = this.$__schemaType.clone()), o2;
11839          } }, { key: "getEmbeddedSchemaType", value: function() {
11840            return this.$__schemaType;
11841          } }, { key: "toJSONSchema", value: function(t4) {
11842            var e4 = null == t4 ? void 0 : t4.useBsonType, r3 = this.getEmbeddedSchemaType(), n2 = this.options.required && "function" != typeof this.options.required, o2 = y("object", "object", e4, n2);
11843            return o2.additionalProperties = r3.toJSONSchema(t4), o2;
11844          } }, { key: "autoEncryptionType", value: function() {
11845            return "object";
11846          } }], p2 && i(s2.prototype, p2), Object.defineProperty(s2, "prototype", { writable: false }), s2;
11847          var s2, p2;
11848        })(h);
11849        d.schemaName = "Map", d.prototype.OptionsConstructor = p, d.defaultOptions = {}, t2.exports = d;
11850      }, 6948: (t2, e2, r2) => {
11851        function n(t3) {
11852          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
11853            return typeof t4;
11854          } : function(t4) {
11855            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
11856          }, n(t3);
11857        }
11858        function i(t3, e3, r3) {
11859          return Object.defineProperty(t3, "prototype", { writable: false }), t3;
11860        }
11861        var a = r2(4450), u = i(function t3(e3) {
11862          if ((function(t4, e4) {
11863            if (!(t4 instanceof e4)) throw new TypeError("Cannot call a class as a function");
11864          })(this, t3), this._docs = {}, this._childDocs = [], null != e3 && (e3 = a(e3), Object.assign(this, e3), "object" === n(e3.subPopulate) && (this.populate = e3.subPopulate), null != e3.perDocumentLimit && null != e3.limit)) throw new Error("Can not use `limit` and `perDocumentLimit` at the same time. Path: `" + e3.path + "`.");
11865        });
11866        t2.exports = u;
11867      }, 6949: (t2, e2, r2) => {
11868        function n(t3) {
11869          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
11870            return typeof t4;
11871          } : function(t4) {
11872            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
11873          }, n(t3);
11874        }
11875        function o(t3, e3) {
11876          for (var r3 = 0; r3 < e3.length; r3++) {
11877            var n2 = e3[r3];
11878            n2.enumerable = n2.enumerable || false, n2.configurable = true, "value" in n2 && (n2.
11878writable = true), Object.defineProperty(t3, i(n2.key), n2);
11879          }
11880        }
11881        function i(t3) {
11882          var e3 = (function(t4) {
11883            if ("object" != n(t4) || !t4) return t4;
11884            var e4 = t4[Symbol.toPrimitive];
11885            if (void 0 !== e4) {
11886              var r3 = e4.call(t4, "string");
11887              if ("object" != n(r3)) return r3;
11888              throw new TypeError("@@toPrimitive must return a primitive value.");
11889            }
11890            return String(t4);
11891          })(t3);
11892          return "symbol" == n(e3) ? e3 : e3 + "";
11893        }
11894        function s() {
11895          try {
11896            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
11897            }));
11898          } catch (t4) {
11899          }
11900          return (s = function() {
11901            return !!t3;
11902          })();
11903        }
11904        function a(t3) {
11905          return a = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
11906            return t4.__proto__ || Object.getPrototypeOf(t4);
11907          }, a(t3);
11908        }
11909        function u(t3, e3) {
11910          return u = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
11911            return t4.__proto__ = e4, t4;
11912          }, u(t3, e3);
11913        }
11914        var c = r2(8213), l = r2(8260), f = r2(7352), p = r2(1875), h = (function(t3) {
11915          function e3(t4) {
11916            var r4, o2;
11917            return (function(t5, e4) {
11918              if (!(t5 instanceof e4)) throw new TypeError("Cannot call a class as a function");
11919            })(this, e3), (r4 = (function(t5, e4, r5) {
11920              return e4 = a(e4), (function(t6, e5) {
11921                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
11922                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
11923                return (function(t7) {
11924                  if (void 0 === t7) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
11925                  return t7;
11926                })(t6);
11927              })(t5, s() ? Reflect.construct(e4, r5 || [], a(t5).constructor) : e4.apply(t5, r5));
11928            })(this, e3, [o2 = "model" === l(t4) ? t4.constructor.modelName + " validation failed" : "Validation failed"])).errors = {}, r4._message = o2, t4 && (t4.$errors = r4.errors), r4;
11929          }
11930          return (function(t4, e4) {
11931            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
11932            t4.prototype = Object.create(e4 && e4.prototype, { constructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && u(t4, e4);
11933          })(e3, t3), r3 = e3, (i2 = [{ key: "toString", value: function() {
11934            return this.name + ": " + p(this);
11935          } }, { key: "inspect", value: function() {
11936            return Object.assign(new Error(this.message), this);
11937          } }, { key: "addError", value: function(t4, r4) {
11938            if (r4 instanceof e3) for (var n2 = r4.errors, o2 = 0, i3 = Object.keys(n2); o2 < i3.length; o2++) {
11939              var s2 = i3[o2];
11940              this.addError("".concat(t4, ".").concat(s2), n2[s2]);
11941            }
11942            else this.errors[t4] = r4, this.message = this._message + ": " + p(this);
11943          } }]) && o(r3.prototype, i2), Object.defineProperty(r3, "prototype", { writable: false }), r3;
11944          var r3, i2;
11945        })(c);
11946        f.inspect.custom && (h.prototype[f.inspect.custom] = h.prototype.inspect), Object.defineProperty(h.prototype, "toJSON", { enumerable: false, writable: false, configurable: true, value: function() {
11947          return Object.assign({}, this, { name: this.name, message: this.message });
11948        } }), Object.defineProperty(h.prototype, "name", { value: "ValidationError" }), t2.exports = h;
11949      }, 6974: (t2, e2, r2) => {
11950        function n(t3) {
11951          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
11952            return typeof t4;
11953          } : function(t4) {
11954            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
11955          }, n(t3);
11956        }
11957        function o() {
11958          try {
11959            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
11960            }));
11961          } catch (t4) {
11962          }
11963          return (o = function() {
11964            return !!t3;
11965          })();
11966        }
11967        function i(t3) {
11968          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
11969            return t4.__proto__ || Object.getPrototypeOf(t4);
11970          }, i(t3);
11971        }
11972        function s(t3, e3) {
11973          return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
11974            return t4.__proto__ = e4, t4;
11975          }, s(t3, e3);
11976        }
11977        var a = (function(t3) {
11978          function e3() {
11979            return (function(t4, e4) {
11980              if (!(t4 instanceof e4)) throw new TypeError("Cannot call a class as a function");
11981            })(this, e3), (function(t4, e4, r4) {
11982              return e4 = i(e4), (function(t5, e5) {
11983                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
11984                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
11985                return (function(t6) {
11986                  if (void 0 === t6) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
11987                  return t6;
11988                })(t5);
11989              })(t4, o() ? Reflect.construct(e4, r4 || [], i(t4).constructor) : e4.apply(t4, r4));
11990            })(this, e3, arguments);
11991          }
11992          return (function(t4, e4) {
11993            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
11994            t4.prototype = Object.create(e4 && e4.prototype, { c
11994onstructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && s(t4, e4);
11995          })(e3, t3), r3 = e3, Object.defineProperty(r3, "prototype", { writable: false }), r3;
11996          var r3;
11997        })(r2(8879)), u = r2(5761);
11998        Object.defineProperty(a.prototype, "of", u), t2.exports = a;
11999      }, 6996: (t2, e2, r2) => {
12000        function n(t3) {
12001          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
12002            return typeof t4;
12003          } : function(t4) {
12004            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
12005          }, n(t3);
12006        }
12007        function o() {
12008          try {
12009            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
12010            }));
12011          } catch (t4) {
12012          }
12013          return (o = function() {
12014            return !!t3;
12015          })();
12016        }
12017        function i(t3) {
12018          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
12019            return t4.__proto__ || Object.getPrototypeOf(t4);
12020          }, i(t3);
12021        }
12022        function s(t3, e3) {
12023          return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
12024            return t4.__proto__ = e4, t4;
12025          }, s(t3, e3);
12026        }
12027        var a = (function(t3) {
12028          function e3(t4, r4, s2) {
12029            var a2;
12030            !(function(t5, e4) {
12031              if (!(t5 instanceof e4)) throw new TypeError("Cannot call a class as a function");
12032            })(this, e3);
12033            var u = s2.join(", ");
12034            return (a2 = (function(t5, e4, r5) {
12035              return e4 = i(e4), (function(t6, e5) {
12036                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
12037                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
12038                return (function(t7) {
12039                  if (void 0 === t7) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
12040                  return t7;
12041                })(t6);
12042              })(t5, o() ? Reflect.construct(e4, r5 || [], i(t5).constructor) : e4.apply(t5, r5));
12043            })(this, e3, ['No matching document found for id "' + t4._doc._id + '" version ' + r4 + ' modifiedPaths "' + u + '"'])).version = r4, a2.modifiedPaths = s2, a2;
12044          }
12045          return (function(t4, e4) {
12046            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
12047            t4.prototype = Object.create(e4 && e4.prototype, { constructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && s(t4, e4);
12048          })(e3, t3), r3 = e3, Object.defineProperty(r3, "prototype", { writable: false }), r3;
12049          var r3;
12050        })(r2(8213));
12051        Object.defineProperty(a.prototype, "name", { value: "VersionError" }), t2.exports = a;
12052      }, 7045: (t2, e2, r2) => {
12053        function n(t3) {
12054          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
12055            return typeof t4;
12056          } : function(t4) {
12057            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
12058          }, n(t3);
12059        }
12060        function o(t3, e3) {
12061          var r3 = Object.keys(t3);
12062          if (Object.getOwnPropertySymbols) {
12063            var n2 = Object.getOwnPropertySymbols(t3);
12064            e3 && (n2 = n2.filter(function(e4) {
12065              return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
12066            })), r3.push.apply(r3, n2);
12067          }
12068          return r3;
12069        }
12070        function i(t3) {
12071          for (var e3 = 1; e3 < arguments.length; e3++) {
12072            var r3 = null != arguments[e3] ? arguments[e3] : {};
12073            e3 % 2 ? o(Object(r3), true).forEach(function(e4) {
12074              s(t3, e4, r3[e4]);
12075            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t3, Object.getOwnPropertyDescriptors(r3)) : o(Object(r3)).forEac
12075h(function(e4) {
12076              Object.defineProperty(t3, e4, Object.getOwnPropertyDescriptor(r3, e4));
12077            });
12078          }
12079          return t3;
12080        }
12081        function s(t3, e3, r3) {
12082          return (e3 = (function(t4) {
12083            var e4 = (function(t5) {
12084              if ("object" != n(t5) || !t5) return t5;
12085              var e5 = t5[Symbol.toPrimitive];
12086              if (void 0 !== e5) {
12087                var r4 = e5.call(t5, "string");
12088                if ("object" != n(r4)) return r4;
12089                throw new TypeError("@@toPrimitive must return a primitive value.");
12090              }
12091              return String(t5);
12092            })(t4);
12093            return "symbol" == n(e4) ? e4 : e4 + "";
12094          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
12095        }
12096        var a = r2(6426), u = a.CastError, c = r2(9553), l = r2(4327), f = r2(3305);
12097        function p(t3, e3) {
12098          a.call(this, t3, e3, "Decimal128");
12099        }
12100        function h(t3) {
12101          return this.cast(t3);
12102        }
12103        p.schemaName = "Decimal128", p.defaultOptions = {}, p.prototype = Object.create(a.prototype), p.prototype.constructor = p, p._cast = c, p.set = a.set, p.setters = [], p.get = a.get, p.cast = function(t3) {
12104          return 0 === arguments.length || (false === t3 && (t3 = this._defaultCaster), this._cast = t3), this._cast;
12105        }, p._defaultCaster = function(t3) {
12106          if (null != t3 && !f(t3, "Decimal128")) throw new Error();
12107          return t3;
12108        }, p._checkRequired = function(t3) {
12109          return f(t3, "Decimal128");
12110        }, p.checkRequired = a.checkRequired, p.prototype.checkRequired = function(t3, e3) {
12111          return a._isRef(this, t3, e3, true) ? !!t3 : ("function" == typeof this.constructor.checkRequired ? this.constructor.checkRequired() : p.checkRequired())(t3);
12112        }, p.prototype.cast = function(t3, e3, r3, n2, o2) {
12113          if (a._isRef(this, t3, e3, r3)) return f(t3, "Decimal128") ? t3 : this._castRef(t3, e3, r3, o2);
12114          var i2;
12115          i2 = "function" == typeof this._castFunction ? this._castFunction : "function" == typeof this.constructor.cast ? this.constructor.cast() : p.cast();
12116          try {
12117            return i2(t3);
12118          } catch (e4) {
12119            throw new u("Decimal128", t3, this.path, e4, this);
12120          }
12121        };
12122        var y = i(i({}, a.prototype.$conditionalHandlers), {}, { $gt: h, $gte: h, $lt: h, $lte: h });
12123        Object.defineProperty(p.prototype, "$conditionalHandlers", { enumerable: false, value: y }), p.prototype.toJSONSchema = function(t3) {
12124          var e3 = this.options.required && "function" != typeof this.options.required;
12125          return l("string", "decimal", null == t3 ? void 0 : t3.useBsonType, e3);
12126        }, p.prototype.autoEncryptionType = function() {
12127          return "decimal";
12128        }, t2.exports = p;
12129      }, 7058: (t2, e2, r2) => {
12130        var n = r2(5832).hp;
12131        function o(t3) {
12132          return (function(t4) {
12133            if (Array.isArray(t4)) return p(t4);
12134          })(t3) || (function(t4) {
12135            if ("undefined" != typeof Symbol && null != t4[Symbol.iterator] || null != t4["@@iterator"]) return Array.from(t4);
12136          })(t3) || f(t3) || (function() {
12137            throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
12138          })();
12139        }
12140        function i(t3, e3) {
12141          var r3 = Object.keys(t3);
12142          if (Object.getOwnPropertySymbols) {
12143            var n2 = Object.getOwnPropertySymbols(t3);
12144            e3 && (n2 = n2.filter(function(e4) {
12145              return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
12146            })), r3.push.apply(r3, n2);
12147          }
12148          return r3;
12149        }
12150        function s(t3) {
12151          for (var e3 = 1; e3 < arguments.length; e3++) {
12152            var r3 = null != arguments[e3] ? arguments[e3] : {};
12153            e3 % 2 ? i(Object(r3), true).forEach(function(e4) {
12154              a(t3, e4, r3[e4]);
12155            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t3, Object.getOwnPropertyDescriptors(r3)) : i(Object(r3)).forEac
12155h(function(e4) {
12156              Object.defineProperty(t3, e4, Object.getOwnPropertyDescriptor(r3, e4));
12157            });
12158          }
12159          return t3;
12160        }
12161        function a(t3, e3, r3) {
12162          return (e3 = (function(t4) {
12163            var e4 = (function(t5) {
12164              if ("object" != u(t5) || !t5) return t5;
12165              var e5 = t5[Symbol.toPrimitive];
12166              if (void 0 !== e5) {
12167                var r4 = e5.call(t5, "string");
12168                if ("object" != u(r4)) return r4;
12169                throw new TypeError("@@toPrimitive must return a primitive value.");
12170              }
12171              return String(t5);
12172            })(t4);
12173            return "symbol" == u(e4) ? e4 : e4 + "";
12174          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
12175        }
12176        function u(t3) {
12177          return u = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
12178            return typeof t4;
12179          } : function(t4) {
12180            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
12181          }, u(t3);
12182        }
12183        function c(t3, e3) {
12184          return (function(t4) {
12185            if (Array.isArray(t4)) return t4;
12186          })(t3) || (function(t4, e4) {
12187            var r3 = null == t4 ? null : "undefined" != typeof Symbol && t4[Symbol.iterator] || t4["@@iterator"];
12188            if (null != r3) {
12189              var n2, o2, i2, s2, a2 = [], u2 = true, c2 = false;
12190              try {
12191                if (i2 = (r3 = r3.call(t4)).next, 0 === e4) {
12192                  if (Object(r3) !== r3) return;
12193                  u2 = false;
12194                } else for (; !(u2 = (n2 = i2.call(r3)).done) && (a2.push(n2.value), a2.length !== e4); u2 = true) ;
12195              } catch (t5) {
12196                c2 = true, o2 = t5;
12197              } finally {
12198                try {
12199                  if (!u2 && null != r3.return && (s2 = r3.return(), Object(s2) !== s2)) return;
12200                } finally {
12201                  if (c2) throw o2;
12202                }
12203              }
12204              return a2;
12205            }
12206          })(t3, e3) || f(t3, e3) || (function() {
12207            throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
12208          })();
12209        }
12210        function l(t3, e3) {
12211          var r3 = "undefined" != typeof Symbol && t3[Symbol.iterator] || t3["@@iterator"];
12212          if (!r3) {
12213            if (Array.isArray(t3) || (r3 = f(t3)) || e3) {
12214              r3 && (t3 = r3);
12215              var n2 = 0, o2 = function() {
12216              };
12217              return { s: o2, n: function() {
12218                return n2 >= t3.length ? { done: true } : { done: false, value: t3[n2++] };
12219              }, e: function(t4) {
12220                throw t4;
12221              }, f: o2 };
12222            }
12223            throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
12224          }
12225          var i2, s2 = true, a2 = false;
12226          return { s: function() {
12227            r3 = r3.call(t3);
12228          }, n: function() {
12229            var t4 = r3.next();
12230            return s2 = t4.done, t4;
12231          }, e: function(t4) {
12232            a2 = true, i2 = t4;
12233          }, f: function() {
12234            try {
12235              s2 || null == r3.return || r3.return();
12236            } finally {
12237              if (a2) throw i2;
12238            }
12239          } };
12240        }
12241        function f(t3, e3) {
12242          if (t3) {
12243            if ("string" == typeof t3) return p(t3, e3);
12244            var r3 = {}.toString.call(t3).slice(8, -1);
12245            return "Object" === r3 && t3.constructor && (r3 = t3.constructor.name), "Map" === r3 || "Set" === r3 ? Array.from(t3) : "Arguments" === r3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r3) ? p(t3, e3) : void 0;
12246          }
12247        }
12248        function p(t3, e3) {
12249          (null == e3 || e3 > t3.length) && (e3 = t3.length);
12250          for (var r3 = 0, n2 = Array(e3); r3 < e3; r3++) n2[r3] = t3[r3];
12251          return n2;
12252        }
12253        var h, y = r2(3550).EventEmitter, d = r2(8297), b = r2(8213), m = r2(6426), v = r2(8879), g = r2(2069), _ = r2(622), w = r2(486
12253), O = r2(4450), S = r2(3703), $ = r2(8260), j = r2(2003), P = r2(5289), A = r2(3381), E = r2(1199), x = r2(9539), T = r2(5678), k = r2(7834), N = r2(2097), I = r2(8768), B = r2(533), M = /\.\d+(\.|$)/, D = r2(1260).Ut, R = r2(4957).middlewareFunctions, U = D.concat(R).reduce(function(t3, e3) {
12254          return t3.add(e3);
12255        }, /* @__PURE__ */ new Set()), C = I.isPOJO, F = 0, L = /^\d+$/;
12256        function V(t3, e3) {
12257          if (!(this instanceof V)) return new V(t3, e3);
12258          if (this.obj = t3, this.paths = {}, this.aliases = {}, this.subpaths = {}, this.virtuals = {}, this.singleNestedPaths = {}, this.nested = {}, this.inherits = {}, this.callQueue = [], this._indexes = [], this._searchIndexes = [], this.methods = e3 && e3.methods || {}, this.methodOptions = {}, this.statics = e3 && e3.statics || {}, this.tree = {}, this.query = e3 && e3.query || {}, this.childSchemas = [], this.plugins = [], this.$id = ++F, this.mapPaths = [], this.encryptedFields = {}, this.s = { hooks: new d() }, this.options = this.defaultOptions(e3), Array.isArray(t3)) {
12259            var r3, n2 = l(t3);
12260            try {
12261              for (n2.s(); !(r3 = n2.n()).done; ) {
12262                var o2 = r3.value;
12263                this.add(o2);
12264              }
12265            } catch (t4) {
12266              n2.e(t4);
12267            } finally {
12268              n2.f();
12269            }
12270          } else t3 && this.add(t3);
12271          if (e3 && e3.virtuals) for (var i2 = e3.virtuals, s2 = 0, a2 = Object.keys(i2); s2 < a2.length; s2++) {
12272            var u2 = a2[s2], c2 = i2[u2].options ? i2[u2].options : void 0, f2 = this.virtual(u2, c2);
12273            i2[u2].get && f2.get(i2[u2].get), i2[u2].set && f2.set(i2[u2].set);
12274          }
12275          var p2 = t3 && t3._id && I.isObject(t3._id);
12276          !this.paths._id && this.options._id && !p2 && w(this), this.setupTimestamp(this.options.timestamps);
12277        }
12278        function q(t3, e3) {
12279          for (var r3 = 0, n2 = Object.keys(e3); r3 < n2.length; r3++) {
12280            var o2 = n2[r3], i2 = null;
12281            if (null != e3[o2]) i2 = e3[o2];
12282            else {
12283              var s2 = S(t3.paths[o2], "options");
12284              if (null == s2) continue;
12285              i2 = s2.alias;
12286            }
12287            if (i2) {
12288              var a2 = t3.paths[o2].path;
12289              if (Array.isArray(i2)) {
12290                var u2, c2 = l(i2);
12291                try {
12292                  for (c2.s(); !(u2 = c2.n()).done; ) {
12293                    var f2 = u2.value;
12294                    if ("string" != typeof f2) throw new Error("Invalid value for alias option on " + a2 + ", got " + f2);
12295                    t3.aliases[f2] = a2, t3.virtual(f2).get(/* @__PURE__ */ (function(t4) {
12296                      return function() {
12297                        return "function" == typeof this.get ? this.get(t4) : this[t4];
12298                      };
12299                    })(a2)).set(/* @__PURE__ */ (function(t4) {
12300                      return function(e4) {
12301                        return this.$set(t4, e4);
12302                      };
12303                    })(a2));
12304                  }
12305                } catch (t4) {
12306                  c2.e(t4);
12307                } finally {
12308                  c2.f();
12309                }
12310              } else {
12311                if ("string" != typeof i2) throw new Error("Invalid value for alias option on " + a2 + ", got " + i2);
12312                t3.aliases[i2] = a2, t3.virtual(i2).get(/* @__PURE__ */ (function(t4) {
12313                  return function() {
12314                    return "function" == typeof this.get ? this.get(t4) : this[t4];
12315                  };
12316                })(a2)).set(/* @__PURE__ */ (function(t4) {
12317                  return function(e4) {
12318                    return this.$set(t4, e4);
12319                  };
12320                })(a2));
12321              }
12322            }
12323          }
12324        }
12325        V.prototype = Object.create(y.prototype), V.prototype.constructor = V, V.prototype.instanceOfSchema = true, Object.defineProperty(V.prototype, "$schemaType", { configurable: false, enumerable: false, writable: true }), Object.defineProperty(V.prototype, "childSchemas", { configurable: false, enumerable: true, writable: true }), Object.defineProperty(V.prototype, "virtuals", { configurable: false, enumerable: true, writable: true }), V.prototype.obj, V.prototype.paths, V.prototype.tree, V.prototype.clone = function() {
12326          var t3 = this, e3 = this._clone();
12327          return e3.on("init", function(e4) {
12328            return t3.emit("init", e4);
12329          }), e3;
12330        }, V.prototype._clone = function(t3) {
12331          var e3 = new (t3 = t3 || (null == this.base ? V : this.base.Schema))({}, this._userProvidedOptions);
12332          e3.base = this.base, e3.obj = this.obj, e3.options = O(this.options), e3.callQueue = this.callQueue.map(function(t4) {
12333            return t4;
12334          }), e3.methods = O(this.methods), e3.methodOptions = O(this.methodOptions), e3.statics = O(this.statics), e3.query = O(this.query), e3.plugins = Array.prototype.slice.call(this.plugins), e3._indexes = O(this._indexes), e3._searchIndexes = O(this._searchIndexes), e3.s.hooks = this.s.hooks.clone(), e3.tree = O(this.tree), e3.paths = Object.fromEntries(Object.entries(this.paths).map(function(t4) {
12335            var e4 = c(t4, 2);
12336            return [e4[0], e4[1].clone()];
12337          })), e3.nested = O(this.nested), e3.subpaths = O(this.subpaths);
12338          for (var r3 = 0, n2 = Object.values(e3.paths); r3 < n2.length; r3++) {
12339            var o2 = n2[r3];
12340            if (o2.$isSingleNested) {
12341              for (var i2 = o2.path, s2 = 0, a2 = Object.keys(o2.schema.paths); s2 < a2.length; s2++) {
12342                var u2 = a2[s2];
12343                e3.singleNestedPaths[i2 + "." + u2] = o2.schema.paths[u2];
12344              }
12345              for (var l2 = 0, f2 = Object.keys(o2.schema.singleNestedPaths); l2 < f2.length; l2++) {
12346                var p2 = f2[l2];
12347                e3.singleNestedPaths[i2 + "." + p2] = o2.schema.singleNestedPaths[p2];
12348              }
12349              for (var h2 = 0, y2 = Object.keys(o2.schema.subpaths); h2 < y2.length; h2++) {
12350                var d2 = y2[h2];
12351                e3.singleNestedPaths[i2 + "." + d2] = o2.schema.subpaths[d2];
12352              }
12353              for (var b2 = 0, m2 = Object.keys(o2.schema.nested); b2 < m2.length; b2++) {
12354                var v2 = m2[b2];
12355                e3.singleNestedPaths[i2 + "." + v2] = "nested";
12356              }
12357            }
12358          }
12359          return e3._gatherChildSchemas(), e3.virtuals = O(this.virtuals), e3.$globalPluginsApplied = this.$globalPluginsApplied, e3.$isRootDiscriminator = this.$isRootDiscriminator, e3.$implicitlyCreated = this.$implicitlyCreated, e3.$id = ++F, e3.$originalSchemaId = this.$id, e3.mapPaths = [].concat(this.mapPaths), null != this.discriminatorMapping && (e3.discriminatorMapping = Object.assign({}, this.discriminatorMapping)), null != this.discriminators && (e3.discriminators = Object.assign({}, this.discriminators)), null != this._applyDiscriminators && (e3._applyDiscriminators = new Map(this._applyDiscriminators)), e3.aliases = Object.assign({}, this.aliases), e3.encryptedFields = O(this.encryptedFields), e3;
12360        }, V.prototype.pick = function(t3, e3) {
12361          var r3 = new V({}, e3 || this.options);
12362          if (!Array.isArray(t3)) throw new b('Schema#pick() only accepts an array argument, got "' + u(t3) + '"');
12363          var n2, o2 = l(t3);
12364          try {
12365            for (o2.s(); !(n2 = o2.n()).done; ) {
12366              var i2 = n2.value;
12367              if (this._hasEncryptedField(i2)) {
12368                var s2 = this.encryptedFields[i2], c2 = this.path(i2);
12369                r3.add(a({}, i2, a({ encrypt: s2 }, this.options.typeKey, c2)));
12370              } else if (this.nested[i2]) r3.add(a({}, i2, S(this.tree, i2)));
12371              else {
12372                var f2 = this.path(i2);
12373                if (null == f2) throw new b("Path `" + i2 + "` is not in the schema");
12374                r3.add(a({}, i2, f2));
12375              }
12376            }
12377          } catch (t4) {
12378            o2.e(t4);
12379          } finally {
12380            o2.f();
12381          }
12382          return this._hasEncryptedFields() || (r3.options.encryptionType = null), r3;
12383        }, V.prototype.omit = function(t3, e3) {
12384          var r3 = new V(this, e3 || this.options);
12385          if (!Array.isArray(t3)) throw new b('Schema#omit() only accepts an array argument, got "' + u(t3) + '"');
12386          for (var n2 in r3.remove(t3), r3.singleNestedPaths) t3.includes(n2) && delete r3.singleNestedPaths[n2];
12387          return r3;
12388        }, V.prototype.defaultOptions = function(t3) {
12389          this._userProvidedOptions = null == t3 ? {} : O(t3);
12390          var e3 = this.base && this.base.options || {};
12391          if ((t3 = s({ strict: !("strict" in e3) || e3.strict, strictQuery: "strictQuery" in e3 && e3.strictQuery, bufferCommands: true, capped: false, versionKey: "__v", optimisticConcurrency: false, minimize: true, autoIndex: null, discriminatorKey: "__t", shardKey: null, read: null, validateBeforeSave: true, validateModifiedOnly: false, _id: true, id: !("id" in e3) || e3.id, typeKey: "type" }, t3)).versionKey && "string" != typeof t3.versionKey) throw new b("`versionKey` must be falsy or string, got `" + u(t3.versionKey) + "`");
12392          if ("string" == typeof t3.read ? t3.read = P(t3.read) : Array.isArray(t3.read) && "string" == typeof t3.read[0] && (t3.read = { mode: P(t3.read[0]), tags: t3.read[1] }), t3.optimisticConcurrency && !t3.versionKey) throw new b("Must set `versionKey` if using `optimisticConcurrency`");
12393          return t3;
12394        }, V.prototype.discriminator = function(t3, e3, r3) {
12395          return this._applyDiscriminators = this._applyDiscriminators || /* @__P
12395URE__ */ new Map(), this._applyDiscriminators.set(t3, { schema: e3, options: r3 }), this;
12396        }, V.prototype._defaultToObjectOptions = function(t3) {
12397          var e3 = t3 ? "toJSON" : "toObject";
12398          if (this._defaultToObjectOptionsMap && this._defaultToObjectOptionsMap[e3]) return this._defaultToObjectOptionsMap[e3];
12399          var r3 = this.base && this.base.options && this.base.options[e3] || {}, n2 = this.options[e3] || {}, o2 = Object.assign({}, r3, n2);
12400          return this._defaultToObjectOptionsMap = this._defaultToObjectOptionsMap || {}, this._defaultToObjectOptionsMap[e3] = o2, o2;
12401        }, V.prototype.encryptionType = function(t3) {
12402          if (0 === arguments.length) return this.options.encryptionType;
12403          if ("string" != typeof t3 && null !== t3) throw new Error("invalid `encryptionType`: ${encryptionType}");
12404          this.options.encryptionType = t3;
12405        }, V.prototype.add = function(t3, e3) {
12406          if (t3 instanceof V || null != t3 && t3.instanceOfSchema) return x(this, t3), this;
12407          if (false === t3._id && null == e3 && (this.options._id = false), "__proto__." === (e3 = e3 || "") || "constructor." === e3 || "prototype." === e3) return this;
12408          for (var r3 = Object.keys(t3), n2 = this.options.typeKey, o2 = 0, i2 = r3; o2 < i2.length; o2++) {
12409            var s2 = i2[o2];
12410            if (!I.specialProperties.has(s2)) {
12411              var l2 = e3 + s2, f2 = t3[s2];
12412              if (null == f2) throw new TypeError("Invalid value for schema path `" + l2 + '`, got value "' + f2 + '"');
12413              if ("_id" !== s2 || false !== f2) {
12414                var p2 = false;
12415                if ("string" == typeof f2 && (p2 = null != (null != this.base ? this.base.Schema.Types : V.Types)[f2.charAt(0).toUpperCase() + f2.substring(1)]), "_id" !== s2 && ("object" !== u(f2) && "function" != typeof f2 && !p2 || null == f2)) throw new TypeError("Invalid schema configuration: `".concat(f2, "` is not ") + "a valid type at path `".concat(s2, "`. See ") + "https://bit.ly/mongoose-schematypes for a list of valid schema types.");
12416                if (f2 instanceof _ || "VirtualType" === (f2.constructor && f2.constructor.name || null)) this.virtual(f2);
12417                else {
12418                  if (Array.isArray(f2) && 1 === f2.length && null == f2[0]) throw new TypeError("Invalid value for schema Array path `" + l2 + '`, got value "' + f2[0] + '"');
12419                  if (C(f2) || f2 instanceof v) if (Object.keys(f2).length < 1) e3 && (this.nested[e3.substring(0, e3.length - 1)] = true), this.path(l2, f2);
12420                  else if (!f2[n2] || "type" === n2 && C(f2.type) && f2.type.type) this.nested[l2] = true, this.add(f2, l2 + ".");
12421                  else {
12422                    var h2 = f2[n2];
12423                    if (C(h2) && Object.keys(h2).length > 0) {
12424                      e3 && (this.nested[e3.substring(0, e3.length - 1)] = true);
12425                      var y2 = {};
12426                      this._userProvidedOptions.typeKey && (y2.typeKey = this._userProvidedOptions.typeKey), null != this._userProvidedOptions.strict && (y2.strict = this._userProvidedOptions.strict), null != this._userProvidedOptions.toObject && (y2.toObject = I.omit(this._userProvidedOptions.toObject, ["transform"])), null != this._userProvidedOptions.toJSON && (y2.toJSON = I.omit(this._userProvidedOptions.toJSON, ["transform"]));
12427                      var d2 = new V(h2, y2);
12428                      d2.$implicitlyCreated = true;
12429                      var b2 = Object.assign({}, f2, a({}, n2, d2));
12430                      this.path(e3 + s2, b2);
12431                    } else if (e3 && (this.nested[e3.substring(0, e3.length - 1)] = true), this.path(e3 + s2, f2), null != f2 && !f2.instanceOfSchema && I.isPOJO(f2.discriminators)) {
12432                      var m2 = this.path(e3 + s2);
12433                      for (var g2 in f2.discriminators) m2.discriminator(g2, f2.discriminators[g2]);
12434                    }
12435                  }
12436                  else if (e3 && (this.nested[e3.substring(0, e3.length - 1)] = true), this.path(e3 + s2, f2), null != f2[0] && !f2[0].instanceOfSchema && I.isPOJO(f2[0].discriminators)) {
12437                    var w2 = this.path(e3 + s2);
12438                    for (var O2 in f2[0].discriminators) w2.discriminator(O2, f2[0].discriminators[O2]);
12439                  }
12440                  if (f2.instanceOfSchema && null != f2.encryptionType()) {
12441                    if (this.encryptionType() != f2.encryptionType()) throw new Error("encryptionType of a nested schema must match the encryption type of the parent schema.");
12442                    for (var S2 = 0, $2 = Object.entries(f2.encryptedFields); S2 < $2.length; S2++) {
12443                      var j2 = c($2[S2], 2), P2 = j2[0], A2 = j2[1], E2 = l2 + "." + P2;
12444                      this._addEncryptedField(E2, A2);
12445                    }
12446                  } else if ("object" === u(f2) && "encrypt" in f2) {
12447                    var T2 = f2.encrypt;
12448                    if (null == this.encryptionType()) throw new Error("encryptionType must be provided");
12449                    this._addEncryptedField(l2, T2);
12450                  } else this._removeEncryptedField(l2);
12451                }
12452              }
12453            }
12454          }
12455          var k2 = Object.fromEntries(Object.entries(t3).map(function(t4) {
12456            var r4 = c(t4, 1)[0];
12457            return [e3 + r4, null];
12458          }));
12459          return q(this, k2), this;
12460        }, V.prototype._addEncryptedField = function(t3, e3) {
12461          if (null == this.path(t3).autoEncryptionType()) throw new Error("Invalid BSON type for FLE field: '".concat(t3, "'"));
12462          this.encryptedFields[t3] = O(e3);
12463        }, V.prototype._removeEncryptedField = function(t3) {
12464          delete this.encryptedFields[t3];
12465        }, V.prototype._hasEncryptedFields = function() {
12466          return Object.keys(this.encryptedFields).length > 0;
12467        }, V.prototype._hasEncryptedField = function(t3) {
12468          return t3 in this.encryptedFields;
12469        }, V.prototype._buildEncryptedFields = function() {
12470          var t3 = this;
12471          return { fields: Object.entries(this.encryptedFields).map(function(e3) {
12472            var r3 = c(e3, 2), n2 = r3[0], o2 = r3[1];
12473            return s({ path: n2, bsonType: t3.path(n2).autoEncryptionType() }, o2);
12474          }) };
12475        }, V.prototype._buildSchemaMap = function() {
12476          var t3 = this;
12477          return { bsonType: "object", properties: Object.entries(this.encryptedFields).reduce(function(e3, r3) {
12478            var n2 = c(r3, 2), o2 = n2[0], i2 = n2[1], a2 = t3.path(o2).autoEncryptionType();
12479            return (function(t4, e4, r4) {
12480              for (var n3 = 0, o3 = t4[n3]; n3 < t4.length - 1; o3 = t4[++n3]) e4[o3] = null == e4[o3] ? { bsonType: "object", properties: {} } : e4[o3], e4 = e4[o3].properties;
12481              e4[o3] = r4;
12482            })(o2.split("."), e3, { encrypt: s(s({}, i2), {}, { bsonType: a2 }) }), e3;
12483          }, {}) };
12484        }, V.prototype.alias = function(t3, e3) {
12485          return q(this, a({}, t3, e3)), this;
12486        }, V.prototype.removeIndex = function(t3) {
12487          if (arguments.length > 1) throw new Error("removeIndex() takes only 1 argument");
12488          if ("object" !== u(t3) && "string" != typeof t3) throw new Error("removeIndex() may only take either an object or a string as an argument");
12489          if ("object" === u(t3)) for (var e3 = this._indexes.length - 1; e3 >= 0; --e3) E(this._indexes[e3][0], t3) && this._indexes.splice(e3, 1);
12490          else for (var r3 = this._indexes.length - 1; r3 >= 0; --r3) null != this._indexes[r3][1] && this._indexes[r3][1].name === t3 && this._indexes.splice(r3, 1);
12491          return this;
12492        }, V.prototype.clearIndexes = function() {
12493          return this._indexes.length = 0, this;
12494        }, V.prototype.searchIndex = function(t3) {
12495          return this._searchIndexes.push(t3), this;
12496        }, V.reserved = /* @__PURE__ */ Object.create(null), V.prototype.reserved = V.reserved;
12497        var J = V.reserved;
12498        function z(t3) {
12499          return /\.\d+/.test(t3) ? t3.replace(/\.\d+\./g, ".$.").replace(/\.\d+$/, ".$") : t3;
12500        }
12501        function K(t3, e3) {
12502          if (0 === t3.mapPaths.length) return null;
12503          var r3, n2 = l(t3.mapPaths);
12504          try {
12505            for (n2.s(); !(r3 = n2.n()).done; ) {
12506              var o2 = r3.value, i2 = o2.path.replace(/\.\$\*/g, "");
12507              if (e3 === i2 || e3.startsWith(i2 + ".") && -1 === e3.slice(i2.length + 1).indexOf(".")) return o2;
12508              if (o2.schema && e3.startsWith(i2 + ".")) {
12509                var s2 = e3.slice(i2.length + 1);
12510                return s2 = s2.slice(s2.indexOf(".") + 1), o2.schema.paths[s2];
12511              }
12512              if (o2.$isSchemaMap && e3.startsWith(i2 + ".")) {
12513                var a2 = e3.slice(i2.length + 1);
12514                a2 = a2.slice(a2.indexOf(".") + 1);
12515                var u2 = o2.$__schemaType._presplitPath;
12516                if (-1 === a2.indexOf(".") && "$*" === u2[u2.length - 1]) return o2.$__schemaType;
12517                if (-1 !== a2.indexOf(".") && o2.$__schemaType.schema && "$*" === u2[u2.length - 1]) return o2.$__schemaType.schema.path(a2.slice(a2.indexOf(".") + 1));
12518              }
12519            }
12520          } catch (t4) {
12521            n2.e(t4);
12522          } finally {
12523            n2.f();
12524          }
12525          return null;
12526        }
12527        function H(t3, e3, r3) {
12528          var n2 = e3.split(/\.(\d+)\.|\.(\d+)$/).filter(Boolean);
12529          if (n2.length < 2) return t3.paths.hasOwnProperty(n2[0]) ? t3.paths[n2[0]] : "adhocOrUndefined";
12530          var o2 = t3.path(n2[0]), i2 = false;
12531          if (!o2) return "adhocOrUndefined";
12532          for (var s2 = n2.length - 1, a2 = 1; a2 < n2.length; ++a2) {
12533            i2 = false;
12534            var u2 = n2[a2];
12535            if (a2 === s2 && o2 && !/\D/.test(u2)) {
12536              o2 = o2.$isMongooseDocumentArray ? o2.$embeddedSchemaType : o2 instanceof h.Array ? o2.caster : void 0;
12537              break;
12538            }
12539            if (/\D/.test(u2)) {
12540              if (!o2 || !o2.schema) {
12541                o2 = void 0;
12542                break;
12543              }
12544              i2 = "nested" === o2.schema.pathType(u2), o2 = o2.schema.path(u2);
12545            } else o2 instanceof h.Array && a2 !== s2 && (o2 = o2.caster);
12546          }
12547          return t3.subpaths[r3] = o2, o2 ? "real" : i2 ? "nested" : "adhocOrUndefined";
12548        }
12549        function W(t3, e3) {
12550          var r3, n2 = l(t3.childSchemas);
12551          try {
12552            for (n2.s(); !(r3 = n2.n()).done; ) {
12553              var o2 = r3.value.schema;
12554              o2.$implicitlyCreated && (Object.assign(o2.options, e3), W(o2, e3));
12555            }
12556          } catch (t4) {
12557            n2.e(t4);
12558          } finally {
12559            n2.f();
12560          }
12561        }
12562        J.prototype = J.emit = J.listeners = J.removeListener = J.collection = J.errors = J.get = J.init = J.isModified = J.isNew = J.populated = J.remove = J.save = J.toObject = J.validate = 1, J.collection = 1, V.prototype.path = function(t3, e3) {
12563          if (void 0 === e3) {
12564            if (null != this.paths[t3]) return this.paths[t3];
12565            var r3 = z(t3), n2 = (function(t4, e4, r4) {
12566              if (t4.paths.hasOwnProperty(e4)) return t4.paths[e4];
12567              if (t4.subpaths.hasOwnProperty(r4)) {
12568                var n3 = t4.subpaths[r4];
12569                if ("nested" === n3) return;
12570                return n3;
12571              }
12572              if (t4.singleNestedPaths.hasOwnProperty(r4) && "object" === u(t4.singleNestedPaths[r4])) {
12573                var o3 = t4.singleNestedPaths[r4];
12574                if ("nested" === o3) return;
12575                return o3;
12576              }
12577              return null;
12578            })(this, t3, r3);
12579            if (null != n2) return n2;
12580            var o2 = K(this, t3);
12581            return null != o2 ? o2 : null != (n2 = this.hasMixedParent(r3)) ? n2 : M.test(t3) ? (function(t4, e4, r4) {
12582              return H(t4, e4, r4), t4.subpaths[r4];
12583            })(this, t3, r3) : void 0;
12584          }
12585          var i2 = t3.split(".")[0];
12586          if (J[i2] && !this.options.suppressReservedKeysWarning) {
12587            var s2 = "`".concat(i2, "` is a reserved schema pathname and may break some functionality. ") + "You are allowed to use it, but use at your own risk. To disable this warning pass `suppressReservedKeysWarning` as a schema option.";
12588            I.warn(s2);
12589          }
12590          "object" === u(e3) && I.hasUserDefinedProperty(e3, "ref") && B(e3.ref, t3);
12591          var a2, c2 = t3.split(/\./), f2 = c2.pop(), p2 = this.tree, h2 = "", y2 = l(c2);
12592          try {
12593            for (y2.s(); !(a2 = y2.n()).done; ) {
12594              var d2 = a2.value;
12595              if (I.specialProperties.has(d2)) throw new Error("Cannot set special property `" + d2 + "` on a schema");
12596              if (h2 = h2 += (h2.length > 0 ? "." : "") + d2, p2[d2] || (this.nested[h2] = true, p2[d2] = {}), "object" !== u(p2[d2])) {
12597                var b2 = "Cannot set nested path `" + t3 + "`. Parent path `" + h2 + "` already set to type " + p2[d2].name + ".";
12598                throw new Error(b2);
12599              }
12600              p2 = p2[d2];
12601            }
12602          } catch (t4) {
12603            y2.e(t4);
12604          } finally {
12605            y2.f();
12606          }
12607          p2[f2] = O(e3), this.paths[t3] = this.interpretAsType(t3, e3, this.options);
12608          var v2 = this.paths[t3];
12609          if (this.childSchemas = this.childSchemas.filter(function(e4) {
12610            return e4.path !== t3;
12611          }), v2.$isSchemaMap) {
12612            var g2 = t3 + ".$*";
12613            this.paths[g2] = v2.$__schemaType, this.mapPaths.push(this.paths[g2]), v2.$__schemaType.$isSingleNested && this.childSchemas.push({ schema: v2.$__schemaType.schema, model: v2.$__schemaType.caster, path: t3 });
12614          }
12615          if (v2.$isSingleNested) {
12616            for (var _2 = 0, w2 = Object.keys(v2.schema.paths); _2 < w2.length; _2++) {
12617              var S2 = w2[_2];
12618              this.singleNestedPaths[t3 + "." + S2] = v2.schema.paths[S2];
12619            }
12620            for (var $2 = 0, j2 = Object.keys(v2.schema.singleNestedPaths); $2 < j2.length; $2++) {
12621              var P2 = j2[$2];
12622              this.singleNestedPaths[t3 + "." + P2] = v2.schema.singleNestedPaths[P2];
12623            }
12624            for (var A2 = 0, E2 = Object.keys(v2.schema.subpaths); A2 < E2.length; A2++) {
12625              var x2 = E2[A2];
12626              this.singleNestedPaths[t3 + "." + x2] = v2.schema.subpaths[x2];
12627            }
12628            for (var T2 = 0, k2 = Object.keys(v2.schema.nested); T2 < k2.length; T2++) {
12629              var N2 = k2[T2];
12630              this.singleNestedPaths[t3 + "." + N2] = "nested";
12631            }
12632            Object.defineProperty(v2.schema, "base", { configurable: true, enumerable: false, writable: false, value: this.base }), v2.caster.base = this.base, this.childSchemas.push({ schema: v2.schema, model: v2.caster, path: t3 });
12633          } else v2.$isMongooseDocumentArray && (Object.defineProperty(v2.schema, "base", { configurable: true, enumerable: false, writable: false, value: this.base }), v2.casterConstructor.base = this.base, this.childSchemas.push({ schema: v2.schema, model: v2.casterConstructor, path: t3 }));
12634          if (v2.$isMongooseArray && v2.caster instanceof m) {
12635            for (var D2 = t3, R2 = v2; R2.$isMongooseArray; ) D2 += ".$", R2.$isMongooseDocumentArray ? (R2.$embeddedSchemaType._arrayPath = D2, R2.$embeddedSchemaType._arrayParentPath = t3, R2 = R2.$embeddedSchemaType) : (R2.caster._arrayPath = D2, R2.caster._arrayParentPath = t3, R2 = R2.caster), this.subpaths[D2] = R2;
12636            for (var U2 = 0, C2 = []; U2 < C2.length; U2++) {
12637              var F2 = C2[U2];
12638              this.subpaths[F2.path] = F2;
12639            }
12640          }
12641          if (v2.$isMongooseDocumentArray) {
12642            for (var L2 = 0, V2 = Object.keys(v2.schema.paths); L2 < V2.length; L2++) {
12643              var q2 = V2[L2], W2 = v2.schema.paths[q2];
12644              this.subpaths[t3 + "." + q2] = W2, "object" === u(W2) && null != W2 && null == W2.$parentSchemaDocArray && (W2.$parentSchemaDocArray = v2);
12645            }
12646            for (var G2 = 0, Q2 = Object.keys(v2.schema.subpaths); G2 < Q2.length; G2++) {
12647              var Y2 = Q2[G2], Z = v2.schema.subpaths[Y2];
12648              this.subpaths[t3 + "." + Y2] = Z, "object" === u(Z) && null != Z && null == Z.$parentSchemaDocArray && (Z.$parentSchemaDocArray = v2);
12649            }
12650            for (var X = 0, tt = Object.keys(v2.schema.singleNestedPaths); X < tt.length; X++) {
12651              var et = tt[X], rt = v2.schema.singleNestedPaths[et];
12652              this.subpaths[t3 + "." + et] = rt, "object" === u(rt) && null != rt && null == rt.$parentSchemaDocArray && (rt.$parentSchemaDocArray = v2);
12653            }
12654          }
12655          return this;
12656        }, V.prototype._gatherChildSchemas = function() {
12657          for (var t3 = [], e3 = 0, r3 = Object.keys(this.paths); e3 < r3.length; e3++) {
12658            var n2 = r3[e3];
12659            if ("string" == typeof n2) {
12660              var o2 = this.paths[n2];
12661              o2.$isMongooseDocumentArray || o2.$isSingleNested ? t3.push({ schema: o2.schema, model: o2.caster, path: n2 }) : o2.$isSchemaMap && o2.$__schemaType.$isSingleNested && t3.push({ schema: o2.$__schemaType.schema, model: o2.$__schemaType.caster, path: n2 });
12662            }
12663          }
12664          return this.childSchemas = t3, t3;
12665        }, Object.defineProperty(V.prototype, "base", { configurable: true, enumerable: false, writable: true, value: null }), V.prototype.interpretAsType = function(t3, e3, o2) {
12666          if (e3 instanceof m) {
12667            if (e3.path === t3) return e3;
12668            var i2 = e3.clone();
12669            return i2.path = t3, i2;
12670          }
12671          var s2 = null != this.base ? this.base.Schema.Types : V.Types, c2 = null != this.base ? this.base.Types : r2(9600);
12672          if (!(I.isPOJO(e3) || e3 instanceof v) && "Object" !== I.getFunctionName(e3.constructor)) {
12673            var l2 = e3;
12674            (e3 = {})[o2.typeKey] = l2;
12675          }
12676          var f2, p2 = e3[o2.typeKey] && (e3[o2.typeKey] instanceof Function || "type" !== o2.typeKey || !e3.type.type) ? e3[o2.typeKey] : {};
12677          if (p2 instanceof m) {
12678            if (p2.path === t3) return p2;
12679            var h2 = p2.clone();
12680            return h2.path = t3, h2;
12681          }
12682          if (I.isPOJO(p2) || "mixed" === p2) return new s2.Mixed(t3, e3);
12683          if (Array.isArray(p2) || p2 === Array || "array" === p2 || p2 === s2.Array) {
12684            var y2 = p2 === Array || "array" === p2 ? e3.cast || e3.of : p2[0];
12685            if (y2 && y2.instanceOfSchema) {
12686              if (!(y2 instanceof V)) {
12687                if (!this.options._isMerging) throw new TypeError("Schema for array path `" + t3 + "` is from a different c
12687opy of the Mongoose module. Please make sure you're using the same version of Mongoose everywhere with `npm list mongoose`. If you are still getting this error, please add `new Schema()` around the path: " + "".concat(t3, ": new Schema(...)"));
12688                y2 = new V(y2);
12689              }
12690              return new s2.DocumentArray(t3, y2, e3);
12691            }
12692            if (y2 && y2[o2.typeKey] && y2[o2.typeKey].instanceOfSchema) {
12693              if (!(y2[o2.typeKey] instanceof V)) {
12694                if (!this.options._isMerging) throw new TypeError("Schema for array path `" + t3 + "` is from a different copy of the Mongoose module. Please make sure you're using the same version of Mongoose everywhere with `npm list mongoose`. If you are still getting this error, please add `new Schema()` around the path: " + "".concat(t3, ": new Schema(...)"));
12695                y2[o2.typeKey] = new V(y2[o2.typeKey]);
12696              }
12697              return new s2.DocumentArray(t3, y2[o2.typeKey], e3, y2);
12698            }
12699            if (void 0 !== y2 && (Array.isArray(y2) || y2.type === Array || "Array" == y2.type)) return y2 && "Array" == y2.type && (y2.type = Array), new s2.Array(t3, this.interpretAsType(t3, y2, o2), e3);
12700            var d2 = null == y2 || !y2[o2.typeKey] || "type" === o2.typeKey && y2.type.type ? y2 : y2[o2.typeKey];
12701            if ("string" == typeof y2) y2 = s2[y2.charAt(0).toUpperCase() + y2.substring(1)];
12702            else if (I.isPOJO(d2)) {
12703              if (Object.keys(d2).length) {
12704                var g2 = { minimize: o2.minimize };
12705                o2.typeKey && (g2.typeKey = o2.typeKey), o2.hasOwnProperty("strict") && (g2.strict = o2.strict), o2.hasOwnProperty("strictQuery") && (g2.strictQuery = o2.strictQuery), o2.hasOwnProperty("toObject") && (g2.toObject = I.omit(o2.toObject, ["transform"])), o2.hasOwnProperty("toJSON") && (g2.toJSON = I.omit(o2.toJSON, ["transform"])), this._userProvidedOptions.hasOwnProperty("_id") ? g2._id = this._userProvidedOptions._id : null != V.Types.DocumentArray.defaultOptions._id && (g2._id = V.Types.DocumentArray.defaultOptions._id);
12706                var _2 = new V(d2, g2);
12707                return _2.$implicitlyCreated = true, new s2.DocumentArray(t3, _2, e3);
12708              }
12709              return new s2.Array(t3, s2.Mixed, e3);
12710            }
12711            if (y2) {
12712              if (p2 = !y2[o2.typeKey] || "type" === o2.typeKey && y2.type.type ? y2 : y2[o2.typeKey], Array.isArray(p2)) return new s2.Array(t3, this.interpretAsType(t3, p2, o2), e3);
12713              if ("ClockDate" === (f2 = "string" == typeof p2 ? p2 : p2.schemaName || I.getFunctionName(p2)) && (f2 = "Date"), void 0 === f2) throw new TypeError("Invalid schema configuration: " + "Could not determine the embedded type for array `".concat(t3, "`. ") + "See https://mongoosejs.com/docs/guide.html#definition for more info on supported schema syntaxes.");
12714              if (!s2.hasOwnProperty(f2)) throw new TypeError("Invalid schema configuration: " + "`".concat(f2, "` is not a valid type within the array `").concat(t3, "`.") + "See https://bit.ly/mongoose-schematypes for a list of valid schema types.");
12715            }
12716            return new s2.Array(t3, y2 || s2.Mixed, e3, o2);
12717          }
12718          if (p2 && p2.instanceOfSchema) return new s2.Subdocument(p2, t3, e3);
12719          if ((f2 = n.isBuffer(p2) ? "Buffer" : "function" == typeof p2 || "object" === u(p2) ? p2.schemaName || I.getFunctionName(p2) : p2 === c2.ObjectId ? "ObjectId" : p2 === c2.Decimal128 ? "Decimal128" : null == p2 ? "" + p2 : p2.toString()) && (f2 = f2.charAt(0).toUpperCase() + f2.substring(1)), "ObjectID" === f2 && (f2 = "ObjectId"), "ClockDate" === f2 && (f2 = "Date"), void 0 === f2) throw new TypeError("Invalid schema configuration: `".concat(t3, "` schematype definition is ") + "invalid. See https://mongoosejs.com/docs/guide.html#definition for more info on supported schema syntaxes.");
12720          if (null == s2[f2]) throw new TypeError("Invalid schema configuration: `".concat(f2, "` is not ") + "a valid type at path `".concat(t3, "`. See ") + "https://bit.ly/mongoose-schematypes for a list of valid schema types.");
12721          "Union" === f2 && (e3.parentSchema = this);
12722          var w2 = new s2[f2](t3, e3, o2);
12723          return w2.$isSchemaMap && (function(t4, e4, r3, n2, o3) {
12724            var i3 = r3 + ".$*", s3 = { type: {} };
12725            I.hasUserDefinedProperty(n2, "of") && ((s3 = I.isPOJO(n2.of) && Object.keys(n2.of).length > 0 && !I.hasUserDefinedProperty(n2.of, t4.options.typeKey) ? a({}, t4.options.typeKey, new V(n2.of)) : I.isPOJO(n2.of) ? Object.assign({}, n2.of) : a({}, t4.options.typeKey, n2.of))[t4.options.typeKey] && s3[t4.options.typeKey].instanceOfSchema && s3[t4.options.typeKey].eachPath(function(t5, e5) {
12726              if (true === e5.options.select || false === e5.options.select) throw new b('Cannot use schema-level projections (`select: true` or `select: false`) within maps at path "' + r3 + "." + t5 + '"');
12727            }), I.hasUserDefinedProperty(n2, "ref") && (s3.ref = n2.ref)), e4.$__schemaType = t4.interpretAsType(i3, s3, o3);
12728          })(this, w2, t3, e3, o2), w2;
12729        }, V.prototype.eachPath = function(t3) {
12730          for (var e3 = Object.keys(this.paths), r3 = e3.length, n2 = 0; n2 < r3; ++n2) t3(e3[n2], this.paths[e3[n2]]);
12731          return this;
12732        }, V.prototype.requiredPaths = function(t3) {
12733          if (this._requiredpaths && !t3) return this._requiredpaths;
12734          for (var e3 = Object.keys(this.paths), r3 = e3.length, n2 = []; r3--; ) {
12735            var o2 = e3[r3];
12736            this.paths[o2].isRequired && n2.push(o2);
12737          }
12738          return this._requiredpaths = n2, this._requiredpaths;
12739        }, V.prototype.indexedPaths = function() {
12740          return this._indexedpaths || (this._indexedpaths = this.indexes()), this._indexedpaths;
12741        }, V.prototype.pathType = function(t3) {
12742          if (this.paths.hasOwnProperty(t3)) return "real";
12743          if (this.virtuals.hasOwnProperty(t3)) return "virtual";
12744          if (this.nested.hasOwnProperty(t3)) return "nested";
12745          var e3 = z(t3);
12746          if (this.subpaths.hasOwnProperty(e3) || this.subpaths.hasOwnProperty(t3)) return "real";
12747          var r3 = this.singleNestedPaths.hasOwnProperty(e3) || this.singleNestedPaths.hasOwnProperty(t3);
12748          return r3 ? "nested" === r3 ? "nested" : "real" : null != K(this, t3) ? "real" : /\.\d+\.|\.\d+$/.test(t3) ? H(this, t3, e3) : "adhocOrUndefined";
12749        }, V.prototype.hasMixedParent = function(t3) {
12750          var e3 = t3.split(/\./g);
12751          t3 = "";
12752          for (var r3 = 0; r3 < e3.length; ++r3) if (t3 = r3 > 0 ? t3 + "." + e3[r3] : e3[r3], this.paths.hasOwnProperty(t3) && this.paths[t3] instanceof h.Mixed) return this.paths[t3];
12753          return null;
12754        }, V.prototype.setupTimestamp = function(t3) {
12755          return N(this, t3);
12756        }, V.prototype.queue = function(t3, e3) {
12757          return this.callQueue.push([t3, e3]), this;
12758        }, V.prototype.pre = function(t3) {
12759          if (t3 instanceof RegExp) {
12760            var e3, r3 = Array.prototype.slice.call(arguments, 1), n2 = l(U);
12761            try {
12762              for (n2.s(); !(e3 = n2.n()).done; ) {
12763                var o2 = e3.value;
12764                t3.test(o2) && this.pre.apply(this, [o2].concat(r3));
12765              }
12766            } catch (t4) {
12767              n2.e(t4);
12768            } finally {
12769              n2.f();
12770            }
12771            return this;
12772          }
12773          if (Array.isArray(t3)) {
12774            var i2, s2 = Array.prototype.slice.call(arguments, 1), a2 = l(t3);
12775            try {
12776              for (a2.s(); !(i2 = a2.n()).done; ) {
12777                var u2 = i2.value;
12778                this.pre.apply(this, [u2].concat(s2));
12779              }
12780            } catch (t4) {
12781              a2.e(t4);
12782            } finally {
12783              a2.f();
12784            }
12785            return this;
12786          }
12787          return this.s.hooks.pre.apply(this.s.hooks, arguments), this;
12788        }, V.prototype.post = function(t3) {
12789          if (t3 instanceof RegExp) {
12790            var e3, r3 = Array.prototype.slice.call(arguments, 1), n2 = l(U);
12791            try {
12792              for (n2.s(); !(e3 = n2.n()).done; ) {
12793                var o2 = e3.value;
12794                t3.test(o2) && this.post.apply(this, [o2].concat(r3));
12795              }
12796            } catch (t4) {
12797              n2.e(t4);
12798            } finally {
12799              n2.f();
12800            }
12801            return this;
12802          }
12803          if (Array.isArray(t3)) {
12804            var i2, s2 = Array.prototype.slice.call(arguments, 1), a2 = l(t3);
12805            try {
12806              for (a2.s(); !(i2 = a2.n()).done; ) {
12807                var u2 = i2.value;
12808                this.post.apply(this, [u2].concat(s2));
12809              }
12810            } catch (t4) {
12811              a2.e(t4);
12812            } finally {
12813              a2.f();
12814            }
12815            return this;
12816          }
12817          return this.s.hooks.post.apply(this.s.hooks, arguments), this;
12818        }, V.prototype.plugin = function(t3, e3) {
12819          if ("function" != typeof t3) throw new Error('First param to `schema.plugin()` must be a function, got "' + u(t3) + '"');
12820          if (e3 && e3.deduplicate) {
12821            var r3, n2 = l(this.plugins);
12822            try {
12823              for (n2.s(); !(r3 = n2.n()).done; ) if (r3.value.fn === t3) return this;
12824            } catch (t4) {
12825              n2.e(t4);
12826            } finally {
12827              n2.f();
12828            }
12829          }
12830          return this.plugins.push({ fn: t3, opts: e3 }), t3(this, e3), this;
12831        }, V.prototype.method = function(t3, e3, r3) {
12832          if ("string" != typeof t3) for (var n2 in t3) this.methods[n2] = t3[n2], this.methodOptions[n2] = O(r3);
12833          else this.methods[t3] = e3, this.methodOptions[t3] = O(r3);
12834          return this;
12835        }, V.prototype.static = function(t3, e3) {
12836          if ("string" != typeof t3) for (var r3 in t3) this.statics[r3] = t3[r3];
12837          else this.statics[t3] = e3;
12838          return this;
12839        }, V.prototype.index = function(t3, e3) {
12840          for (var r3 in t3 || (t3 = {}), e3 || (e3 = {}), e3.expires && I.expires(e3), t3) this.aliases[r3] && (t3 = I.renameObjKey(t3, r3, this.aliases[r3]));
12841          for (var n2 = 0, o2 = Object.keys(t3); n2 < o2.length; n2++) {
12842            var i2 = o2[n2];
12843            "ascending" === t3[i2] || "asc" === t3[i2] ? t3[i2] = 1 : "descending" !== t3[i2] && "desc" !== t3[i2] || (t3[i2] = -1);
12844          }
12845          var s2, a2 = l(this.indexes());
12846          try {
12847            for (a2.s(); !(s2 = a2.n()).done; ) {
12848              var u2 = s2.value;
12849              null == e3.name && null == u2[1].name && E(u2[0], t3) && I.warn("Duplicate schema index on ".concat(JSON.stringify(t3), ' found. This is often due to declaring an index using both "index: true" and "schema.index()". Please remove the duplicate index definition.'));
12850            }
12851          } catch (t4) {
12852            a2.e(t4);
12853          } finally {
12854            a2.f();
12855          }
12856          return this._indexes.push([t3, e3]), this;
12857        }, V.prototype.set = function(t3, e3, r3) {
12858          if (1 === arguments.length) return this.options[t3];
12859          switch (t3) {
12860            case "read":
12861              "string" == typeof e3 ? this.options[t3] = { mode: P(e3), tags: r3 } : Array.isArray(e3) && "string" == typeof e3[0] ? this.options[t3] = { mode: P(e3[0]), tags: e3[1] } : this.options[t3] = e3, this._userProvidedOptions[t3] = this.options[t3];
12862              break;
12863            case "timestamps":
12864              this.setupTimestamp(e3), this.options[t3] = e3, this._userProvidedOptions[t3] = this.options[t3];
12865              break;
12866            case "_id":
12867              this.options[t3] = e3, this._userProvidedOptions[t3] = this.options[t3], e3 && !this.paths._id ? w(this) : !e3 && null != this.paths._id && this.paths._id.auto && this.remove("_id");
12868              break;
12869            default:
12870              this.options[t3] = e3, this._userProvidedOptions[t3] = this.options[t3];
12871          }
12872          return "strict" === t3 && W(this, { strict: e3 }), "strictQuery" === t3 && W(this, { strictQuery: e3 }), "toObject" === t3 && (delete (e3 = s({}, e3)).transform, W(this, { toObject: e3 })), "toJSON" === t3 && (delete (e3 = s({}, e3)).transform, W(this, { toJSON: e3 })), this;
12873        }, V.prototype.get = function(t3) {
12874          return this.options[t3];
12875        };
12876        var G = "2d 2dsphere hashed text".split(" ");
12877        function Q(t3, e3) {
12878          var r3, n2 = e3.split("."), o2 = n2.pop(), i2 = t3.tree, s2 = l(n2);
12879          try {
12880            for (s2.s(); !(r3 = s2.n()).done; ) i2 = i2[r3.value];
12881          } catch (t4) {
12882            s2.e(t4);
12883          } finally {
12884            s2.f();
12885          }
12886          delete i2[o2];
12887        }
12888        function Y(t3) {
12889          return t3.startsWith("$[") && t3.endsWith("]");
12890        }
12891        Object.defineProperty(V, "indexTypes", { get: function() {
12892          return G;
12893        }, set: function() {
12894          throw new Error("Cannot overwrite Schema.indexTypes");
12895        } }), V.prototype.indexes = function() {
12896          return j(this);
12897        }, V.prototype.virtual = function(t3, e3) {
12898          if (t3 instanceof _ || "VirtualType" === $(t3)) return this.virtual(t3.path, t3.options);
12899          if (e3 = new g(e3), I.hasUserDefinedProperty(e3, ["ref", "refPath"])) {
12900            if (null == e3.localField) throw new Error("Reference virtuals require `localField` option");
12901            if (null == e3.foreignField) throw new Error("Reference virtuals require `foreignField` option");
12902            var r3 = this.virtual(t3);
12903            r3.options = e3, this.pre("init", function(n3, o3) {
12904              if (T.has(t3, n3)) {
12905                var i3 = T.get(t3, n3);
12906                if (this.$$populatedVirtuals || (this.$$populatedVirtuals = {}), e3.justOne || e3.count ? this.$$populatedVirtuals[t3] = Array.isArray(i3) ? i3[0] : i3 : this.$$populatedVirtuals[t3] = Array.isArray(i3) ? i3 : null == i3 ? [] : [i3], null != o3 && o3.hydratedPopulatedDocs && !e3.count) {
12907                  var s3 = r3._getModelNamesForPopulate(this), a3 = this.$$populatedVirtuals[t3];
12908                  if (Array.isArray(a3) || a3.$__ || 1 !== (null == s3 ? void 0 : s3.length)) {
12909                    if (Array.isArray(a3) && 1 === (null == s3 ? void 0 : s3.length)) {
12910                      for (var u3 = this.db.model(s3[0]), c3 = 0; c3 < a3.length; ++c3) a3[c3].$__ || (a3[c3] = u3.hydrate(a3[c3], null, { hydratedPopulatedDocs: true }));
12911                      var l3 = e3.foreignField;
12912                      this.$populated(t3, a3.map(function(t4) {
12913                        return null == t4 ? t4 : t4.get("function" == typeof l3 ? l3.call(t4, t4) : l3);
12914                      }), { populateModelSymbol: u3 });
12915                    }
12916                  } else {
12917                    var f2 = this.db.model(s3[0]);
12918                    this.$$populatedVirtuals[t3] = f2.hydrate(a3);
12919                  }
12920                }
12921                T.unset(t3, n3);
12922              }
12923            }), r3.set(function(r4) {
12924              return this.$$populatedVirtuals || (this.$$populatedVirtuals = {}), k(this.$$populatedVirtuals, t3, r4, e3);
12925            }), "function" == typeof e3.get && r3.get(e3.get);
12926            for (var n2 = t3.split("."), o2 = n2[0], i2 = 0; i2 < n2.length - 1; ++i2) if (null != this.paths[o2]) {
12927              if (this.paths[o2].$isMongooseDocumentArray || this.paths[o2].$isSingleNested) {
12928                var s2 = n2.slice(i2 + 1).join(".");
12929                this.paths[o2].schema.virtual(s2, e3);
12930                break;
12931              }
12932              if (this.paths[o2].$isSchemaMap) {
12933                var a2 = n2.slice(i2 + 2).join(".");
12934                this.paths[o2].$__schemaType.schema.virtual(a2, e3);
12935                break;
12936              }
12937              o2 += "." + n2[i2 + 1];
12938            }
12939            return r3;
12940          }
12941          var u2 = this.virtuals, c2 = t3.split(".");
12942          if ("real" === this.pathType(t3)) throw new Error('Virtual path "' + t3 + '" conflicts with a real path in the schema');
12943          if (u2[t3] = c2.reduce(function(r4, n3, o3) {
12944            return r4[n3] || (r4[n3] = o3 === c2.length - 1 ? new _(e3, t3) : {}), r4[n3];
12945          }, this.tree), e3 && e3.applyToArray && c2.length > 1) {
12946            var l2 = this.path(c2.slice(0, -1).join("."));
12947            if (l2 && l2.$isMongooseArray) return l2.virtual(c2[c2.length - 1], e3);
12948            throw new b('Path "'.concat(l2, '" is not an array'));
12949          }
12950          return u2[t3];
12951        }, V.prototype.virtualpath = function(t3) {
12952          return this.virtuals.hasOwnProperty(t3) ? this.virtuals[t3] : null;
12953        }, V.prototype.remove = function(t3) {
12954          return "string" == typeof t3 && (t3 = [t3]), Array.isArray(t3) && t3.forEach(function(t4) {
12955            if (null != this.path(t4) || this.nested[t4]) {
12956              if (this.nested[t4]) {
12957                var e3, r3 = l(Object.keys(this.paths).concat(Object.keys(this.nested)));
12958                try {
12959                  for (r3.s(); !(e3 = r3.n()).done; ) {
12960                    var n2 = e3.value;
12961                    n2.startsWith(t4 + ".") && (delete this.paths[n2], delete this.nested[n2], Q(this, n2));
12962                  }
12963                } catch (t5) {
12964                  r3.e(t5);
12965                } finally {
12966                  r3.f();
12967                }
12968                return delete this.nested[t4], void Q(this, t4);
12969              }
12970              delete this.paths[t4], Q(this, t4), this._removeEncryptedField(t4);
12971            }
12972          }, this), this;
12973        }, V.prototype.removeVirtual = function(t3) {
12974          if ("string" == typeof t3 && (t3 = [t3]), Array.isArray(t3)) {
12975            var e3, r3 = l(t3);
12976            try {
12977              for (r3.s(); !(e3 = r3.n()).done; ) {
12978                var n2 = e3.value;
12979                if (null == this.virtuals[n2]) throw new b('Attempting to remove virtual "'.concat(n2, '" that does not exist.'));
12980              }
12981            } catch (t4) {
12982              r3.e(t4);
12983            } finally {
12984              r3.f();
12985            }
12986            var o2, i2 = l(t3);
12987            try {
12988              for (i2.s(); !(o2 = i2.n()).done; ) {
12989                var s2 = o2.value;
12990                delete this.paths[s2], delete this.virtuals[s2], -1 !== s2.indexOf(".") ? T.unset(s2, this.tree) : delete this.tree[s2];
12991              }
12992            } catch (t4) {
12993              i2.e(t4);
12994            } finally {
12995              i2.f();
12996            }
12997          }
12998          return this;
12999        }, V.prototype.loadClass = function(t3, e3) {
13000          return t3 === Object.prototype || t3 === Function.prototype || t3.prototype.hasOwnProperty("$isMongooseModelPrototype") || t3.prototype.hasOwnProperty("$isMongooseDocumentPrototype") || (this.loadClass(Object.getPrototypeOf(t3), e3), e3 || Ob
13000ject.getOwnPropertyNames(t3).forEach(function(e4) {
13001            if (!e4.match(/^(length|name|prototype|constructor|__proto__)$/)) {
13002              var r3 = Object.getOwnPropertyDescriptor(t3, e4);
13003              r3.hasOwnProperty("value") && this.static(e4, r3.value);
13004            }
13005          }, this), Object.getOwnPropertyNames(t3.prototype).forEach(function(r3) {
13006            if (!r3.match(/^(constructor)$/)) {
13007              var n2 = Object.getOwnPropertyDescriptor(t3.prototype, r3);
13008              e3 || "function" == typeof n2.value && this.method(r3, n2.value), "function" == typeof n2.get && (this.virtuals[r3] && (this.virtuals[r3].getters = []), this.virtual(r3).get(n2.get)), "function" == typeof n2.set && (this.virtuals[r3] && (this.virtuals[r3].setters = []), this.virtual(r3).set(n2.set));
13009            }
13010          }, this)), this;
13011        }, V.prototype._getSchema = function(t3) {
13012          var e3 = this.path(t3), r3 = [];
13013          if (e3) return e3.$fullPath = t3, e3;
13014          for (var n2 = t3.split("."), o2 = 0; o2 < n2.length; ++o2) ("$" === n2[o2] || Y(n2[o2])) && (n2[o2] = "0"), L.test(n2[o2]) && (n2[o2] = "$");
13015          return (function t4(e4, n3) {
13016            for (var o3, i2, s2 = e4.length + 1; s2--; ) if (i2 = e4.slice(0, s2).join("."), o3 = n3.path(i2)) {
13017              if (r3.push(i2), o3.caster) {
13018                if (o3.caster instanceof h.Mixed) return o3.caster.$fullPath = r3.join("."), o3.caster;
13019                if (s2 !== e4.length) {
13020                  if (s2 + 1 === e4.length && o3.$embeddedSchemaType && ("$" === e4[s2] || Y(e4[s2]))) return o3.$embeddedSchemaType;
13021                  if (o3.schema) {
13022                    var a2 = void 0;
13023                    return "$" === e4[s2] || Y(e4[s2]) ? s2 + 1 === e4.length ? o3.$embeddedSchemaType : ((a2 = t4(e4.slice(s2 + 1), o3.schema)) && (a2.$parentSchemaDocArray = a2.$parentSchemaDocArray || (o3.schema.$isSingleNested ? null : o3)), a2) : ((a2 = t4(e4.slice(s2), o3.schema)) && (a2.$parentSchemaDocArray = a2.$parentSchemaDocArray || (o3.schema.$isSingleNested ? null : o3)), a2);
13024                  }
13025                }
13026              } else if (o3.$isSchemaMap) {
13027                if (s2 >= e4.length) return o3;
13028                if (s2 + 1 >= e4.length) return o3.$__schemaType;
13029                if (o3.$__schemaType instanceof h.Mixed) return o3.$__schemaType;
13030                if (null != o3.$__schemaType.schema) return t4(e4.slice(s2 + 1), o3.$__schemaType.schema);
13031              }
13032              return o3.$fullPath = r3.join("."), o3;
13033            }
13034          })(n2, this);
13035        }, V.prototype._getPathType = function(t3) {
13036          return this.path(t3) ? "real" : (function t4(e3, r3) {
13037            for (var n2, o2, i2 = e3.length + 1; i2--; ) {
13038              if (o2 = e3.slice(0, i2).join("."), n2 = r3.path(o2)) return n2.caster ? n2.caster instanceof h.Mixed ? { schema: n2, pathType: "mixed" } : i2 !== e3.length && n2.schema ? "$" === e3[i2] || Y(e3[i2]) ? i2 === e3.length - 1 ? { schema: n2, pathType: "nested" } : t4(e3.slice(i2 + 1), n2.schema) : t4(e3.slice(i2), n2.schema) : { schema: n2, pathType: n2.$isSingleNested ? "nested" : "array" } : { schema: n2, pathType: "real" };
13039              if (i2 === e3.length && r3.nested[o2]) return { schema: r3, pathType: "nested" };
13040            }
13041            return { schema: n2 || r3, pathType: "undefined" };
13042          })(t3.split("."), this);
13043        }, V.prototype._transformDuplicateKeyError = function(t3) {
13044          if (!this._duplicateKeyErrorMessagesByPath) return t3;
13045          if (11e3 !== t3.code && 11001 !== t3.code) return t3;
13046          if (null != t3.keyPattern) {
13047            var e3 = t3.keyPattern, r3 = Object.keys(e3);
13048            if (1 !== r3.length) return t3;
13049            var n2 = r3[0];
13050            return this._duplicateKeyErrorMessagesByPath.hasOwnProperty(n2) ? new b(this._duplicateKeyErrorMessagesByPath[n2], { cause: t3 }) : t3;
13051          }
13052          return t3;
13053        }, V.prototype._preCompile = function() {
13054          this.plugin(A, { deduplicate: true });
13055        }, V.prototype.toJSONSchema = function(t3) {
13056          for (var e3, r3 = null !== (e3 = null == t3 ? void 0 : t3.useBsonType) && void 0 !== e3 && e3, n2 = r3 ? { required: [], properties: {} } : { type: "object", required: [], properties: {} }, i2 = 0, s2 = Object.keys(this.paths); i2 < s2.length; i2++) {
13057            var a2 = s2[i2], u2 = this.paths[a2];
13058            if (-1 === u2._presplitPath.indexOf("$*")) {
13059              var c2 = n2;
13060              if (u2._presplitPath.length > 1) for (var l2 = 0; l2 < u2._presplitPath.length - 1; ++l2) {
13061                var f2 = u2._presplitPath[l2];
13062                null == c2.properties[f2] && (c2.properties[f2] = r3 ? { bsonType: ["object", "null"], properties: {} } : { type: ["object", "null"], properties: {} }), c2 = c2.properties[f2];
13063              }
13064              var p2 = u2._presplitPath[u2._presplitPath.length - 1], h2 = false;
13065              "_id" === a2 ? (c2.required || (c2.required = []), c2.required.push("_id"), h2 = true) : u2.options.required && "function" != typeof u2.options.required && (c2.required || (c2.required = []), c2.required.push(p2), h2 = true), c2.properties[p2] = u2.toJSONSchema(t3), u2.options.enum && (c2.properties[p2].enum = h2 ? u2.options.enum : [].concat(o(u2.options.enum), [null]));
13066            }
13067          }
13068          return 0 === n2.required.length && delete n2.required, n2;
13069        }, t2.exports = e2 = V, V.Types = h = r2(7953), e2.ObjectId = h.ObjectId;
13070      }, 7160: (t2, e2) => {
13071        e2.schemaMixedSymbol = Symbol.for("mongoose:schema_mixed"), e2.builtInMiddleware = Symbol.for("mongoose:built-in-middleware");
13072      }, 7219: (t2, e2, r2) => {
13073        function n(t3) {
13074          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
13075            return typeof t4;
13076          } : function(t4) {
13077            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
13078          }, n(t3);
13079        }
13080        function o(t3, e3) {
13081          for (var r3 = 0; r3 < e3.length; r3++) {
13082            var n2 = e3[r3];
13083            n2.enumerable = n2.enumerable || false, n2.configurable = true, "value" in n2 && (n2.writable = true), Object.defineProperty(t3, i(n2.key), n2);
13084          }
13085        }
13086        function i(t3) {
13087          var e3 = (function(t4) {
13088            if ("object" != n(t4) || !t4) return t4;
13089            var e4 = t4[Symbol.toPrimitive];
13090            if (void 0 !== e4) {
13091              var r3 = e4.call(t4, "string");
13092              if ("object" != n(r3)) return r3;
13093              throw new TypeError("@@toPrimitive must return a primitive value.");
13094            }
13095            return String(t4);
13096          })(t3);
13097          return "symbol" == n(e3) ? e3 : e3 + "";
13098        }
13099        function s() {
13100          try {
13101            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
13102            }));
13103          } catch (t4) {
13104          }
13105          return (s = function() {
13106            return !!t3;
13107          })();
13108        }
13109        function a(t3) {
13110          return a = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
13111            return t4.__proto__ || Object.getPrototypeOf(t4);
13112          }, a(t3);
13113        }
13114        function u(t3, e3) {
13115          return u = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
13116            return t4.__proto__ = e4, t4;
13117          }, u(t3, e3);
13118        }
13119        var c = r2(8213), l = r2(2900), f = r2(4070), p = r2(5497), h = (function(t3) {
13120          function e3() {
13121            return (function(t4, e4) {
13122              if (!(t4 instanceof e4)) throw new TypeError("Cannot call a class as a function");
13123            })(this, e3), (function(t4, e4, r4) {
13124              return e4 = a(e4), (function(t5, e5) {
13125                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
13126                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
13127                return (function(t6) {
13128                  if (void 0 === t6) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
13129                  return t6;
13130                })(t5);
13131              })(t4, s() ? Reflect.construct(e4, r4 || [], a(t4).constructor) : e4.apply(t4, r4));
13132            })(this, e3, arguments);
13133          }
13134          return (function(t4, e4) {
13135            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
13136            t4.prototype = Object.create(e4 && e4.prototype, { constructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && u(t4, e4);
13137          })(e3, t3), r3 = e3, (i2 = [{ key: "assimilateError", value: function(t4) {
13138            var e4 = t4.reason, r4 = f(e4) && l(e4) && -1 === t4.message.indexOf("bad auth") && -1 === t4.message.indexOf("Authentication failed");
13139            for (var n2 in r4 ? this.message = "Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you're trying to access the database from an IP that isn't whitelisted. Make sure your current IP address is on your Atlas cluster's IP whitelist: https://www.mongodb.com/docs/atlas/security-whitelist/" : p(e4) ? this.message = "Mongoose is connecting with SSL enabled, but the server is not accepting SSL connections. Please ensure that the MongoDB server you are connecting to is configured to accept SSL connections. Learn more: https://mongoosejs.com/docs/tutorials/ssl.html" : this.message = t4.message, t4) "name" !== n2 && (this[n2] = t4[n2]);
13140            return this.cause = e4, this;
13141          } }]) && o(r3.prototype, i2), Object.defineProperty(r3, "prototype", { writable: false }), r3;
13142          var r3, i2;
13143        })(c);
13144        Object.defineProperty(h.prototype, "name", { value: "MongooseServerSelectionError" }), t2.exports = h;
13145      }, 7236: (t2) => {
13146        function e2(t3) {
13147          return e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
13148            return typeof t4;
13149          } : function(t4) {
13150            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
13151          }, e2(t3);
13152        }
13153        t2.exports = function(t3) {
13154          if (null == t3 || "object" !== e2(t3)) return t3;
13155          if (Array.isArray(t3)) for (var r2 = t3.length - 1; r2 >= 0; --r2) void 0 === t3[r2] && t3.splice(r2, 1);
13156          for (var n = 0, o = Object.keys(t3); n < o.length; n++) {
13157            var i = o[n];
13158            void 0 === t3[i] && delete t3[i];
13159          }
13160          return t3;
13161        };
13162      }, 7291: (t2, e2) => {
13163        function r2(t3) {
13164          return r2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
13165            return typeof t4;
13166          } : function(t4) {
13167            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
13168          }, r2(t3);
13169        }
13170        var n = Symbol("mongoose#trustedSymbol");
13171        e2.trustedSymbol = n, e2.trusted = function(t3) {
13172          return null == t3 || "object" !== r2(t3) || (t3[n] = true), t3;
13173        };
13174      }, 7300: (t2) => {
13175        function e2(t3) {
13176          return e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
13177            return typeof t4;
13178          } : function(t4) {
13179            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
13180          }, e2(t3);
13181        }
13182        t2.exports = function(t3) {
13183          return null == t3 || "object" !== e2(t3) || !("$meta" in t3) && !("$slice" in t3);
13184        };
13185      }, 7352: (t2, e2, r2) => {
13186        function n(t3) {
13187          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
13188            return typeof t4;
13189          } : function(t4) {
13190            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
13191          }, n(t3);
13192        }
13193        var o = Object.getOwnPropertyDescriptors || function(t3) {
13194          for (var e3 = Object.keys(t3), r3 = {}, n2 = 0; n2 < e3.length; n2++) r3[e3[n2]] = Object.getOwnPropertyDescriptor(t3, e3[n2]);
13195          return r3;
13196        }, i = /%[sdj%]/g;
13197        e2.format = function(t3) {
13198          if (!g(t3)) {
13199            for (var e3 = [], r3 = 0; r3 < arguments.length; r3++) e3.push(c(arguments[r3]));
13200            return e3.join(" ");
13201          }
13202          r3 = 1;
13203          for (var n2 = arguments, o2 = n2.length, s2 = String(t3).replace(i, function(t4) {
13204            if ("%%" === t4) return "%";
13205            if (r3 >= o2) return t4;
13206            switch (t4) {
13207              case "%s":
13208                return String(n2[r3++]);
13209              case "%d":
13210                return Number(n2[r3++]);
13211              case "%j":
13212                try {
13213                  return JSON.stringify(n2[r3++]);
13214                } catch (t5) {
13215                  return "[Circular]";
13216                }
13217              default:
13218                return t4;
13219            }
13220          }), a2 = n2[r3]; r3 < o2; a2 = n2[++r3]) m(a2) || !O(a2) ? s2 += " " + a2 : s2 += " " + c(a2);
13221          return s2;
13222        }, e2.deprecate = function(t3, e3) {
13223          if (true === {}.noDeprecation) return t3;
13224          var r3 = false;
13225          return function() {
13226            if (!r3) {
13227              if ({}.throwDeprecation) throw new Error(e3);
13228              !{}.traceDeprecation ? console.error(e3) : console.trace(e3), r3 = true;
13229            }
13230            return t3.apply(this, arguments);
13231          };
13232        };
13233        var s = {}, a = /^$/;
13234        if ({}.NODE_DEBUG) {
13235          var u = {}.NODE_DEBUG;
13236          u = u.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), a = new RegExp("^" + u + "$", "i");
13237        }
13238        function c(t3, r3) {
13239          var n2 = { seen: [], stylize: f };
13240          return arguments.length >= 3 && (n2.depth = arguments[2]), arguments.length >= 4 && (n2.colors = arguments[3]), b(r3) ? n2.showHidden = r3 : r3 && e2._extend(n2, r3), _(n2.showHidden) && (n2.showHidden = false), _(n2.depth) && (n2.depth = 2), _(n2.colors) && (n2.colors = false), _(n2.customInspect) && (n2.customInspect = true), n2.colors && (n2.stylize = l), p(n2, t3, n2.depth);
13241        }
13242        function l(t3, e3) {
13243          var r3 = c.styles[e3];
13244          return r3 ? "\x1B[" + c.colors[r3][0] + "m" + t3 + "\x1B[" + c.colors[r3][1] + "m" : t3;
13245        }
13246        function f(t3, e3) {
13247          return t3;
13248        }
13249        function p(t3, r3, n2) {
13250          if (t3.customInspect && r3 && j(r3.inspect) && r3.inspect !== e2.inspect && (!r3.constructor || r3.constructor.prototype !== r3)) {
13251            var o2 = r3.inspect(n2, t3);
13252            return g(o2) || (o2 = p(t3, o2, n2)), o2;
13253          }
13254          var i2 = (function(t4, e3) {
13255            if (_(e3)) return t4.stylize("undefined", "undefined");
13256            if (g(e3)) {
13257              var r4 = "'" + JSON.stringify(e3).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
13258              return t4.stylize(r4, "string");
13259            }
13260            return v(e3) ? t4.stylize("" + e3, "number") : b(e3) ? t4.stylize("" + e3, "boolean") : m(e3) ? t4.stylize("null", "null") : void 0;
13261          })(t3, r3);
13262          if (i2) return i2;
13263          var s2 = Object.keys(r3), a2 = (function(t4) {
13264            var e3 = {};
13265            return t4.forEach(function(t5, r4) {
13266              e3[t5] = true;
13267            }), e3;
13268          })(s2);
13269          if (t3.showHidden && (s2 = Object.getOwnPropertyNames(r3)), $(r3) && (s2.indexOf("message") >= 0 || s2.indexOf("description") >= 0)) return h(r3);
13270          if (0 === s2.length) {
13271            if (j(r3)) {
13272              var u2 = r3.name ? ": " + r3.name : "";
13273              return t3.stylize("[Function" + u2 + "]", "special");
13274            }
13275            if (w(r3)) return t3.stylize(RegExp.prototype.toString.call(r3), "regexp");
13276            if (S(r3)) return t3.stylize(Date.prototype.toString.call(r3), "date");
13277            if ($(r3)) return h(r3);
13278          }
13279          var c2, l2 = "", f2 = false, O2 = ["{", "}"];
13280          return d(r3) && (f2 = true, O2 = ["[", "]"]), j(r3) && (l2 = " [Function" + (r3.name ? ": " + r3.name : "") + "]"), w(r3) && (l2 = " " + RegExp.prototype.toString.call(r3)), S(r3) && (l2 = " " + Date.prototype.toUTCString.call(r3)), $(r3) && (l2 = " " + h(r3)), 0 !== s2.length || f2 && 0 != r3.length ? n2 < 0 ? w(r3) ? t3.stylize(RegExp.prototype.toString.call(r3), "regexp") : t3.stylize("[Object]", "special") : (t3.seen.push(r3), c2 = f2 ? (function(t4, e3, r4, n3, o3) {
13281            for (var i3 = [], s3 = 0, a3 = e3.length; s3 < a3; ++s3) x(e3, String(s3)) ? i3.push(y(t4, e3, r4, n3, String(s3), true)) : i3.push("");
13282            return o3.forEach(function(o4) {
13283              o4.match(/^\d+$/) || i3.push(y(t4, e3, r4, n3, o4, true));
13284            }), i3;
13285          })(t3, r3, n2, a2, s2) : s2.map(function(e3) {
13286            return y(t3, r3, n2, a2, e3, f2);
13287          }), t3.seen.pop(), (function(t4, e3, r4) {
13288            return t4.reduce(function(t5, e4) {
13289              return e4.indexOf("\n"), t5 + e4.replace(/\u001b\[\d\d?m/g, "").length + 1;
13290            }, 0) > 60 ? r4[0] + ("" === e3 ? "" : e3 + "\n ") + " " + t4.join(",\n  ") + " " + r4[1] : r4[0] + e3 + " " + t4.join(", ") + " " + r4[1];
13291          })(c2, l2, O2)) : O2[0] + l2 + O2[1];
13292        }
13293        function h(t3) {
13294          return "[" + Error.prototype.toString.call(t3) + "]";
13295        }
13296        function y(t3, e3, r3, n2, o2, i2) {
13297          var s2, a2, u2;
13298          if ((u2 = Object.getOwnPropertyDescriptor(e3, o2) || { value: e3[o2] }).get ? a2 = u2.set ? t3.stylize("[Getter/Setter]", "special") : t3.stylize("[Getter]", "special") : u2.set && (a2 = t3.stylize("[Setter]", "special")), x(n2, o2) || (s2 = "[" + o2 + "]"), a2 || (t3.seen.indexOf(u2.value) < 0 ? (a2 = m(r3) ? p(t3, u2.value, null) : p(t3, u2.value, r3 - 1)).indexOf("\n") > -1 && (a2 = i2 ? a2.split("\n").map(function(t4) {
13299            return "  " + t4;
13300          }).join("\n").slice(2) : "\n" + a2.split("\n").map(function(t4) {
13301            return "   " + t4;
13302          }).join("\n")) : a2 = t3.stylize("[Circular]", "special")), _(s2)) {
13303            if (i2 && o2.match(/^\d+$/)) return a2;
13304            (s2 = JSON.stringify("" + o2)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (s2 = s2.slice(1, -1), s2 = t3.stylize(s2, "name")) : (s2 = s2.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), s2 = t3.stylize(s2, "string"));
13305          }
13306          return s2 + ": " + a2;
13307        }
13308        function d(t3) {
13309          return Array.isArray(t3);
13310        }
13311        function b(t3) {
13312          return "boolean" == typeof t3;
13313        }
13314        function m(t3) {
13315          return null === t3;
13316        }
13317        function v(t3) {
13318          return "number" == typeof t3;
13319        }
13320        function g(t3) {
13321          return "string" == typeof t3;
13322        }
13323        function _(t3) {
13324          return void 0 === t3;
13325        }
13326        function w(t3) {
13327          return O(t3) && "[object RegExp]" === P(t3);
13328        }
13329        function O(t3) {
13330          return "object" === n(t3) && null !== t3;
13331        }
13332        function S(t3) {
13333          return O(t3) && "[object Date]" === P(t3);
13334        }
13335        function $(t3) {
13336          return O(t3) && ("[object Error]" === P(t3) || t3 instanceof Error);
13337        }
13338        function j(t3) {
13339          return "function" == typeof t3;
13340        }
13341        function P(t3) {
13342          return Object.prototype.toString.call(t3);
13343        }
13344        function A(t3) {
13345          return t3 < 10 ? "0" + t3.toString(10) : t3.toString(10);
13346        }
13347        e2.debuglog = function(t3) {
13348          if (t3 = t3.toUpperCase(), !s[t3]) if (a.test(t3)) {
13349            var r3 = {}.pid;
13350            s[t3] = function() {
13351              var n2 = e2.format.apply(e2, arguments);
13352              console.error("%s %d: %s", t3, r3, n2);
13353            };
13354          } else s[t3] = function() {
13355          };
13356          return s[t3];
13357        }, e2.inspect = c, c.colors = { bold: [1, 22], italic: [3, 23], underline: [4, 24], inverse: [7, 27], white: [37, 39], grey: [90, 39], black: [30, 39], blue: [34, 39], cyan: [36, 39], green: [32, 39], magenta: [35, 39], red: [31, 39], yellow: [33, 39] }, c.styles = { special: "cyan", number: "yellow", boolean: "yellow", undefined: "grey", null: "bold", string: "green", date: "magenta", regexp: "red" }, e2.types = r2(7595), e2.isArray = d, e2.isBoolean = b, e2.isNull = m, e2.isNullOrUndefined = function(t3) {
13358          return null == t3;
13359        }, e2.isNumber = v, e2.isString = g, e2.isSymbol = function(t3) {
13360          return "symbol" === n(t3);
13361        }, e2.isUndefined = _, e2.isRegExp = w, e2.types.isRegExp = w, e2.isObject = O, e2.isDate = 
13361S, e2.types.isDate = S, e2.isError = $, e2.types.isNativeError = $, e2.isFunction = j, e2.isPrimitive = function(t3) {
13362          return null === t3 || "boolean" == typeof t3 || "number" == typeof t3 || "string" == typeof t3 || "symbol" === n(t3) || void 0 === t3;
13363        }, e2.isBuffer = r2(7944);
13364        var E = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
13365        function x(t3, e3) {
13366          return Object.prototype.hasOwnProperty.call(t3, e3);
13367        }
13368        e2.log = function() {
13369          var t3, r3;
13370          console.log("%s - %s", (r3 = [A((t3 = /* @__PURE__ */ new Date()).getHours()), A(t3.getMinutes()), A(t3.getSeconds())].join(":"), [t3.getDate(), E[t3.getMonth()], r3].join(" ")), e2.format.apply(e2, arguments));
13371        }, e2.inherits = r2(1679), e2._extend = function(t3, e3) {
13372          if (!e3 || !O(e3)) return t3;
13373          for (var r3 = Object.keys(e3), n2 = r3.length; n2--; ) t3[r3[n2]] = e3[r3[n2]];
13374          return t3;
13375        };
13376        var T = "undefined" != typeof Symbol ? Symbol("util.promisify.custom") : void 0;
13377        function k(t3, e3) {
13378          if (!t3) {
13379            var r3 = new Error("Promise was rejected with a falsy value");
13380            r3.reason = t3, t3 = r3;
13381          }
13382          return e3(t3);
13383        }
13384        e2.promisify = function(t3) {
13385          if ("function" != typeof t3) throw new TypeError('The "original" argument must be of type Function');
13386          if (T && t3[T]) {
13387            var e3;
13388            if ("function" != typeof (e3 = t3[T])) throw new TypeError('The "util.promisify.custom" argument must be of type Function');
13389            return Object.defineProperty(e3, T, { value: e3, enumerable: false, writable: false, configurable: true }), e3;
13390          }
13391          function e3() {
13392            for (var e4, r3, n2 = new Promise(function(t4, n3) {
13393              e4 = t4, r3 = n3;
13394            }), o2 = [], i2 = 0; i2 < arguments.length; i2++) o2.push(arguments[i2]);
13395            o2.push(function(t4, n3) {
13396              t4 ? r3(t4) : e4(n3);
13397            });
13398            try {
13399              t3.apply(this, o2);
13400            } catch (t4) {
13401              r3(t4);
13402            }
13403            return n2;
13404          }
13405          return Object.setPrototypeOf(e3, Object.getPrototypeOf(t3)), T && Object.defineProperty(e3, T, { value: e3, enumerable: false, writable: false, configurable: true }), Object.defineProperties(e3, o(t3));
13406        }, e2.promisify.custom = T, e2.callbackify = function(t3) {
13407          if ("function" != typeof t3) throw new TypeError('The "original" argument must be of type Function');
13408          function e3() {
13409            for (var e4 = [], r3 = 0; r3 < arguments.length; r3++) e4.push(arguments[r3]);
13410            var n2 = e4.pop();
13411            if ("function" != typeof n2) throw new TypeError("The last argument must be of type Function");
13412            var o2 = this, i2 = function() {
13413              return n2.apply(o2, arguments);
13414            };
13415            t3.apply(this, e4).then(function(t4) {
13416              ({ env: {} }).nextTick(i2.bind(null, null, t4));
13417            }, function(t4) {
13418              ({ env: {} }).nextTick(k.bind(null, t4, i2));
13419            });
13420          }
13421          return Object.setPrototypeOf(e3, Object.getPrototypeOf(t3)), Object.defineProperties(e3, o(t3)), e3;
13422        };
13423      }, 7425: (t2, e2, r2) => {
13424        var n = r2(2696);
13425        t2.exports = function(t3, e3) {
13426          if (null == t3 || null == t3.discriminators) return null;
13427          for (var r3 = 0, o = Object.keys(t3.discriminators); r3 < o.length; r3++) {
13428            var i = o[r3], s = t3.discriminators[i];
13429            if (null != s.discriminatorMapping && n(s.discriminatorMapping.value, e3)) return s;
13430          }
13431          return null;
13432        };
13433      }, 7430: (t2, e2, r2) => {
13434        var n = r2(5832).hp;
13435        function o(t3) {
13436          return o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
13437            return typeof t4;
13438          } : function(t4) {
13439            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
13440          }, o(t3);
13441        }
13442        var i = r2(6353).Binary, s = r2(3305), a = r2(2497);
13443        r2(3672), r2(7352);
13444        function u(t3) {
13445          return t3 && "object" === o(t3) && !(t3 instanceof Date) && !s(t3, "ObjectId") && (!Array.isArray(t3) || 0 !== t3.length) && !(t3 instanceof n) && !s(t3, "Decimal128") && !(t3 instanceof i);
13446        }
13447        e2.B = function t3(e3, r3, o2, i2) {
13448          var s2, c = (s2 = e3 && a(e3) && !n.isBuffer(e3) ? Object.keys(e3.toObject({ transform: false, virtuals: false }) || {}) : Object.keys(e3 || {})).length, l = {};
13449          r3 = r3 ? r3 + "." : "";
13450          for (var f = 0; f < c; ++f) {
13451            var p = s2[f], h = e3[p];
13452            l[r3 + p] = h;
13453            var y = i2 && i2.path && i2.path(r3 + p), d = i2 && i2.nested && i2.nested[r3 + p];
13454            if (!y || "Mixed" !== y.instance) {
13455              if (u(h)) {
13456                if (o2 && o2.skipArrays && Array.isArray(h)) continue;
13457                var b = t3(h, r3 + p, o2, i2);
13458                for (var m in b) l[m] = b[m];
13459                Array.isArray(h) && (l[r3 + p] = h);
13460              }
13461              if (d) for (var v = 0, g = Object.keys(i2.paths); v < g.length; v++) {
13462                var _ = g[v];
13463                _.startsWith(r3 + p + ".") && !l.hasOwnProperty(_) && (l[_] = void 0);
13464              }
13465            }
13466          }
13467          return l;
13468        };
13469      }, 7494: (t2, e2, r2) => {
13470        function n(t3) {
13471          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
13472            return typeof t4;
13473          } : function(t4) {
13474            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
13475          }, n(t3);
13476        }
13477        function o() {
13478          try {
13479            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
13480            }));
13481          } catch (t4) {
13482          }
13483          return (o = function() {
13484            return !!t3;
13485          })();
13486        }
13487        function i(t3) {
13488          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
13489            return t4.__proto__ || Object.getPrototypeOf(t4);
13490          }, i(t3);
13491        }
13492        function s(t3, e3) {
13493          return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
13494            return t4.__proto__ = e4, t4;
13495          }, s(t3, e3);
13496        }
13497        var a = (function(t3) {
13498          function e3() {
13499            return (function(t4, e4) {
13500              if (!(t4 instanceof e4)) throw new TypeError("Cannot call a class as a function");
13501            })(this, e3), (function(t4, e4, r4) {
13502              return e4 = i(e4), (function(t5, e5) {
13503                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
13504                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
13505                return (function(t6) {
13506                  if (void 0 === t6) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
13507                  return t6;
13508                })(t5);
13509              })(t4, o() ? Reflect.construct(e4, r4 || [], i(t4).constructor) : e4.apply(t4, r4));
13510            })(this, e3, arguments);
13511          }
13512          return (function(t4, e4) {
13513            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
13514            t4.prototype = Object.create(e4 && e4.prototype, { c
13514onstructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && s(t4, e4);
13515          })(e3, t3), r3 = e3, Object.defineProperty(r3, "prototype", { writable: false }), r3;
13516          var r3;
13517        })(r2(8879)), u = r2(5761);
13518        Object.defineProperty(a.prototype, "_id", u), Object.defineProperty(a.prototype, "minimize", u), t2.exports = a;
13519      }, 7557: (t2, e2, r2) => {
13520        function n(t3) {
13521          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
13522            return typeof t4;
13523          } : function(t4) {
13524            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
13525          }, n(t3);
13526        }
13527        function o(t3, e3, r3) {
13528          return (e3 = (function(t4) {
13529            var e4 = (function(t5) {
13530              if ("object" != n(t5) || !t5) return t5;
13531              var e5 = t5[Symbol.toPrimitive];
13532              if (void 0 !== e5) {
13533                var r4 = e5.call(t5, "string");
13534                if ("object" != n(r4)) return r4;
13535                throw new TypeError("@@toPrimitive must return a primitive value.");
13536              }
13537              return String(t5);
13538            })(t4);
13539            return "symbol" == n(e4) ? e4 : e4 + "";
13540          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
13541        }
13542        var i = r2(8920), s = r2(7930).arrayAtomicsSymbol, a = r2(7930).arrayAtomicsBackupSymbol, u = r2(7930).arrayParentSymbol, c = r2(7930).arrayPathSymbol, l = r2(7930).arraySchemaSymbol, f = Array.prototype.push, p = /^\d+$/;
13543        t2.exports = function(t3, e3, r3, n2) {
13544          var h;
13545          if (Array.isArray(t3)) {
13546            var y = t3.length;
13547            if (0 === y) h = new Array();
13548            else if (1 === y) (h = new Array(1))[0] = t3[0];
13549            else if (y < 1e4) h = new Array(), f.apply(h, t3);
13550            else {
13551              h = new Array();
13552              for (var d = 0; d < y; ++d) f.call(h, t3[d]);
13553            }
13554          } else h = [];
13555          var b = o(o(o(o(o(o(o(o({}, s, {}), a, void 0), c, e3), l, n2), u, void 0), "isMongooseArray", true), "isMongooseArrayProxy", true), "__array", h);
13556          t3 && null != t3[s] && (b[s] = t3[s]), null != r3 && r3.$__ && (b[u] = r3, b[l] = n2 || r3.schema.path(e3));
13557          var m = new Proxy(h, { get: function(t4, e4) {
13558            return b.hasOwnProperty(e4) ? b[e4] : i.hasOwnProperty(e4) ? i[e4] : n2 && n2.virtuals && n2.virtuals.hasOwnProperty(e4) ? n2.virtuals[e4].applyGetters(void 0, t4) : "string" == typeof e4 && p.test(e4) && null != (null == n2 ? void 0 : n2.$embeddedSchemaType) ? n2.$embeddedSchemaType.applyGetters(h[e4], r3) : h[e4];
13559          }, set: function(t4, e4, r4) {
13560            return "string" == typeof e4 && p.test(e4) ? i.set.call(m, e4, r4, false) : b.hasOwnProperty(e4) ? b[e4] = r4 : n2 && n2.virtuals && n2.virtuals.hasOwnProperty(e4) ? n2.virtuals[e4].applySetters(r4, t4) : h[e4] = r4, true;
13561          } });
13562          return m;
13563        };
13564      }, 7591: (t2) => {
13565        var e2 = null;
13566        t2.exports.get = function() {
13567          return e2;
13568        }, t2.exports.set = function(t3) {
13569          e2 = t3;
13570        };
13571      }, 7595: (t2, e2, r2) => {
13572        function n(t3) {
13573          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
13574            return typeof t4;
13575          } : function(t4) {
13576            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
13577          }, n(t3);
13578        }
13579        var o = r2(5899), i = r2(1905), s = r2(9834), a = r2(7911);
13580        function u(t3) {
13581          return t3.call.bind(t3);
13582        }
13583        var c = "undefined" != typeof BigInt, l = "undefined" != typeof Symbol, f = u(Object.prototype.toString), p = u(Number.prototype.valueOf), h = u(String.prototype.valueOf), y = u(Boolean.prototype.valueOf);
13584        if (c) var d = u(BigInt.prototype.valueOf);
13585        if (l) var b = u(Symbol.prototype.valueOf);
13586        function m(t3, e3) {
13587          if ("object" !== n(t3)) return false;
13588          try {
13589            return e3(t3), true;
13590          } catch (t4) {
13591            return false;
13592          }
13593        }
13594        function v(t3) {
13595          return "[object Map]" === f(t3);
13596        }
13597        function g(t3) {
13598          return "[object Set]" === f(t3);
13599        }
13600        function _(t3) {
13601          return "[object WeakMap]" === f(t3);
13602        }
13603        function w(t3) {
13604          return "[object WeakSet]" === f(t3);
13605        }
13606        function O(t3) {
13607          return "[object ArrayBuffer]" === f(t3);
13608        }
13609        function S(t3) {
13610          return "undefined" != typeof ArrayBuffer && (O.working ? O(t3) : t3 instanceof ArrayBuffer);
13611        }
13612        function $(t3) {
13613          return "[object DataView]" === f(t3);
13614        }
13615        function j(t3) {
13616          return "undefined" != typeof DataView && ($.working ? $(t3) : t3 instanceof DataView);
13617        }
13618        e2.isArgumentsObject = o, e2.isGeneratorFunction = i, e2.isTypedArray = a, e2.isPromise = function(t3) {
13619          return "undefined" != typeof Promise && t3 instanceof Promise || null !== t3 && "object" === n(t3) && "function" == typeof t3.then && "function" == typeof t3.catch;
13620        }, e2.isArrayBufferView = function(t3) {
13621          return "undefined" != typeof ArrayBuffer && ArrayBuffer.isView ? ArrayBuffer.isView(t3) : a(t3) || j(t3);
13622        }, e2.isUint8Array = function(t3) {
13623          return "Uint8Array" === s(t3);
13624        }, e2.isUint8ClampedArray = function(t3) {
13625          return "Uint8ClampedArray" === s(t3);
13626        }, e2.isUint16Array = function(t3) {
13627          return "Uint16Array" === s(t3);
13628        }, e2.isUint32Array = function(t3) {
13629          return "Uint32Array" === s(t3);
13630        }, e2.isInt8Array = function(t3) {
13631          return "Int8Array" === s(t3);
13632        }, e2.isInt16Array = function(t3) {
13633          return "Int16Array" === s(t3);
13634        }, e2.isInt32Array = function(t3) {
13635          return "Int32Array" === s(t3);
13636        }, e2.isFloat32Array = function(t3) {
13637          return "Float32Array" === s(t3);
13638        }, e2.isFloat64Array = function(t3) {
13639          return "Float64Array" === s(t3);
13640        }, e2.isBigInt64Array = function(t3) {
13641          return "BigInt64Array" === s(t3);
13642        }, e2.isBigUint64Array = function(t3) {
13643          return "BigUint64Array" === s(t3);
13644        }, v.working = "undefined" != typeof Map && v(/* @__PURE__ */ new Map()), e2.isMap = function(t3) {
13645          return "undefined" != typeof Map && (v.working ? v(t3) : t3 instanceof Map);
13646        }, g.working = "undefined" != typeof Set && g(/* @__PURE__ */ new Set()), e2.isSet = function(t3) {
13647          return "undefined" != typeof Set && (g.working ? g(t3) : t3 instanceof Set);
13648        }, _.working = "undefined" != typeof WeakMap && _(/* @__PURE__ */ new WeakMap()), e2.isWeakMap = function(t3) {
13649          return "undefined" != typeof WeakMap && (_.working ? _(t3) : t3 instanceof WeakMap);
13650        }, w.working = "undefined" != typeof WeakSet && w(/* @__PURE__ */ new WeakSet()), e2.isWeakSet = function(t3) {
13651          return w(t3);
13652        }, O.working = "undefined" != typeof ArrayBuffer && O(new ArrayBuffer()), e2.isArrayBuffer = S, $.working = "undefined" != typeof ArrayBuffer && "undefined" != typeof DataView && $(new DataView(new ArrayBuffer(1), 0, 1)), e2.isDataView = j;
13653        var P = "undefined" != typeof SharedArrayBuffer ? SharedArrayBuffer : void 0;
13654        function A(t3) {
13655          return "[object SharedArrayBuffer]" === f(t3);
13656        }
13657        function E(t3) {
13658          return void 0 !== P && (void 0 === A.working && (A.working = A(new P())), A.working ? A(t3) : t3 instanceof P);
13659        }
13660        function x(t3) {
13661          return m(t3, p);
13662        }
13663        function T(t3) {
13664          return m(t3, h);
13665        }
13666        function k(t3) {
13667          return m(t3, y);
13668        }
13669        function N(t3) {
13670          return c && m(t3, d);
13671        }
13672        function I(t3) {
13673          return l && m(t3, b);
13674        }
13675        e2.isSharedArrayBuffer = E, e2.isAsyncFunction = function(t3) {
13676          return "[object AsyncFunction]" === f(t3);
13677        }, e2.isMapIterator = function(t3) {
13678          return "[object Map Iterator]" === f(t3);
13679        }, e2.isSetIterator = function(t3) {
13680          return "[object Set Iterator]" === f(t3);
13681        }, e2.isGeneratorObject = function(t3) {
13682          return "[object Generator]" === f(t3);
13683        }, e2.isWebAssemblyCompiledModule = function(t3) {
13684          return "[object WebAssembly.Module]" === f(t3);
13685        }, e2.isNumberObject = x, e2.isStringObject = T, e2.isBooleanObject = k, e2.isBigIntObject = N, e2.isSymbolObject = I, e2.isBoxedPrimitive = function(t3) {
13686          return x(t3) || T(t3) || k(t3) || N(t3) || I(t3);
13687        }, e2.isAnyArrayBuffer = function(t3) {
13688          return "undefined" != typeof Uint8Array && (S(t3) || E(t3));
13689        }, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(t3) {
13690          Object.defineProperty(e2, t3, { enumerable: false, value: function() {
13691            throw new Error(t3 + " is not supported in userland");
13692          } });
13693        });
13694      }, 7760: (t2, e2, r2) => {
13695        function n(t3, e3) {
13696          var r3 = Object.keys(t3);
13697          if (Object.getOwnPropertySymbols) {
13698            var n2 = Object.getOwnPropertySymbols(t3);
13699            e3 && (n2 = n2.filter(function(e4) {
13700              return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
13701            })), r3.push.apply(r3, n2);
13702          }
13703          return r3;
13704        }
13705        function o(t3) {
13706          for (var e3 = 1; e3 < arguments.length; e3++) {
13707            var r3 = null != arguments[e3] ? arguments[e3] : {};
13708            e3 % 2 ? n(Object(r3), true).forEach(function(e4) {
13709              i(t3, e4, r3[e4]);
13710            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t3, Object.getOwnPropertyDescriptors(r3)) : n(Object(r3)).forEac
13710h(function(e4) {
13711              Object.defineProperty(t3, e4, Object.getOwnPropertyDescriptor(r3, e4));
13712            });
13713          }
13714          return t3;
13715        }
13716        function i(t3, e3, r3) {
13717          return (e3 = (function(t4) {
13718            var e4 = (function(t5) {
13719              if ("object" != a(t5) || !t5) return t5;
13720              var e5 = t5[Symbol.toPrimitive];
13721              if (void 0 !== e5) {
13722                var r4 = e5.call(t5, "string");
13723                if ("object" != a(r4)) return r4;
13724                throw new TypeError("@@toPrimitive must return a primitive value.");
13725              }
13726              return String(t5);
13727            })(t4);
13728            return "symbol" == a(e4) ? e4 : e4 + "";
13729          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
13730        }
13731        function s(t3, e3) {
13732          (null == e3 || e3 > t3.length) && (e3 = t3.length);
13733          for (var r3 = 0, n2 = Array(e3); r3 < e3; r3++) n2[r3] = t3[r3];
13734          return n2;
13735        }
13736        function a(t3) {
13737          return a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
13738            return typeof t4;
13739          } : function(t4) {
13740            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
13741          }, a(t3);
13742        }
13743        var u, c, l = r2(8499), f = r2(2555), p = r2(8213), h = r2(4592), y = r2(6426), d = y.CastError, b = r2(5022), m = r2(2069), v = r2(622), g = r2(2073), _ = r2(7982), w = r2(4450), O = r2(8260), S = r2(5110), $ = r2(7352), j = r2(8768), P = r2(5558).G, A = r2(4327), E = r2(9604), x = r2(1058), T = Symbol("mongoose#isNestedArray"), k = Object.freeze({});
13744        function N(t3, e3, n2, o2) {
13745          c || (c = r2(9600).Embedded);
13746          var i2, s2, a2 = "type";
13747          if (o2 && o2.typeKey && (a2 = o2.typeKey), this.schemaOptions = o2, e3) {
13748            var u2 = {};
13749            j.isPOJO(e3) && (e3[a2] ? (delete (u2 = w(e3))[a2], e3 = e3[a2]) : e3 = b), null != n2 && null != n2.ref && null == u2.ref && (u2.ref = n2.ref), e3 === Object && (e3 = b);
13750            var l2 = "string" == typeof e3 ? e3 : j.getFunctionName(e3), f2 = r2(7953), p2 = f2.hasOwnProperty(l2) ? f2[l2] : e3;
13751            if (this.casterConstructor = p2, this.casterConstructor instanceof N && (this.casterConstructor[T] = true), "function" != typeof p2 || p2.$isArraySubdocument || p2.$isSchemaMap) this.caster = p2, this.caster instanceof c || (this.caster.path = t3);
13752            else {
13753              var h2 = this.caster instanceof c ? null : t3;
13754              this.caster = new p2(h2, u2);
13755            }
13756            this.$embeddedSchemaType = this.caster;
13757          }
13758          if (this.$isMongooseArray = true, y.call(this, t3, n2, "Array"), null != this.defaultValue && (i2 = this.defaultValue, s2 = "function" == typeof i2), !("defaultValue" in this) || null != this.defaultValue) {
13759            var d2 = function() {
13760              return s2 ? i2.call(this) : null != i2 ? [].concat(i2) : [];
13761            };
13762            d2.$runBeforeSetters = !s2, this.default(d2);
13763          }
13764        }
13765        N.schemaName = "Array", N.options = { castNonArrays: true }, N.defaultOptions = {}, N.set = y.set, N.setters = [], N.get = y.get, N.prototype = Object.create(y.prototype), N.prototype.constructor = N, N.prototype.OptionsConstructor = h, N._checkRequired = y.prototype.checkRequired, N.checkRequired = y.checkRequired, N.prototype.virtuals = null, N.prototype.checkRequired = function(t3, e3) {
13766          return "object" === a(t3) && y._isRef(this, t3, e3, true) ? !!t3 : ("function" == typeof this.constructor.checkRequired ? this.constructor.checkRequired() : N.checkRequired())(t3);
13767        }, N.prototype.enum = function() {
13768          for (var t3 = this; ; ) {
13769            var e3 = t3 && t3.caster && t3.caster.instance;
13770            if ("Array" !== e3) {
13771              if ("String" !== e3 && "Number" !== e3) throw new Error("`enum` can only be set on an array of strings or numbers , not " + e3);
13772              break;
13773            }
13774            t3 = t3.caster;
13775          }
13776          var r3 = arguments;
13777          return !Array.isArray(arguments) && j.isObject(arguments) && (r3 = j.object.vals(r3)), t3.caster.enum.apply(t3.caster, r3), this;
13778        }, N.prototype.applyGetters = function(t3, e3) {
13779          return null != e3 && null != e3.$__ && e3.$populated(this.path) ? t3 : y.prototype.applyGetters.call(this, t3, e3);
13780        }, N.prototype._applySetters = function(t3, e3, r3, n2) {
13781          if (this.casterConstructor.$isMongooseArray && N.options.castNonArrays && !this[T]) {
13782            for (var o2 = 0, i2 = this; null != i2 && i2.$isMongooseArray && !i2.$isMongooseDocumentArray; ) ++o2, i2 = i2.casterConstructor;
13783            if (null != t3 && 0 !== t3.length) {
13784              var s2 = g(t3);
13785              if (s2.min === s2.max && s2.max < o2 && s2.containsNonArrayItem) for (var a2 = s2.max; a2 < o2; ++a2) t3 = [t3];
13786            }
13787          }
13788          return y.prototype._applySetters.call(this, t3, e3, r3, n2);
13789        }, N.prototype.cast = function(t3, e3, n2, o2, i2) {
13790          var s2, a2;
13791          if (u || (u = r2(9600).Array), Array.isArray(t3)) {
13792            if (!t3.length && e3) {
13793              var c2 = e3.schema.indexedPaths(), l2 = this.path;
13794              for (s2 = 0, a2 = c2.length; s2 < a2; ++s2) {
13795                var f2 = c2[s2][0][l2];
13796                if ("2dsphere" === f2 || "2d" === f2) return;
13797              }
13798              var p2 = this.path.endsWith(".coordinates") ? this.path.substring(0, this.path.lastIndexOf(".")) : null;
13799              if (null != p2) {
13800                for (s2 = 0, a2 = c2.length; s2 < a2; ++s2) if ("2dsphere" === c2[s2][0][p2]) return;
13801              }
13802            }
13803            i2 = i2 || k;
13804            var h2 = j.isMongooseArray(t3) ? t3.__array : t3, y2 = i2.path || this.path;
13805            if (null != i2.arrayPathIndex && (y2 += "." + i2.arrayPathIndex), h2 = (t3 = u(h2, y2, e3, this)).__array, n2 && null != e3 && null != e3.$__ && e3.$populated(this.path)) return t3;
13806            var m2 = this.caster, v2 = m2.$isMongooseArray;
13807            if (m2 && this.casterConstructor !== b) try {
13808              var g2 = h2.length;
13809              for (s2 = 0; s2 < g2; s2++) {
13810                var _2 = {};
13811                v2 && (null != i2.arrayPath || null != m2._arrayParentPath) && (_2.arrayPathIndex = s2), i2.hydratedPopulatedDocs && (_2.hydratedPopulatedDocs = i2.hydratedPopulatedDocs), h2[s2] = m2.applySetters(
13811h2[s2], e3, n2, void 0, _2);
13812              }
13813            } catch (e4) {
13814              throw new d("[" + e4.kind + "]", $.inspect(t3), this.path + "." + s2, e4, this);
13815            }
13816            return t3;
13817          }
13818          var w2 = null != this.options.castNonArrays ? this.options.castNonArrays : N.options.castNonArrays;
13819          if (n2 || w2) return e3 && n2 && e3.markModified(this.path), this.cast([t3], e3, n2);
13820          throw new d("Array", $.inspect(t3), this.path, null, this);
13821        }, N.prototype._castForPopulate = function(t3, e3) {
13822          if (u || (u = r2(9600).Array), Array.isArray(t3)) {
13823            var n2, o2 = t3.__array ? t3.__array : t3, i2 = o2.length, s2 = this.caster;
13824            if (s2 && this.casterConstructor !== b) try {
13825              for (n2 = 0; n2 < i2; n2++) {
13826                var a2 = {};
13827                s2.$isMongooseArray && null != s2._arrayParentPath && (a2.arrayPathIndex = n2), o2[n2] = s2.cast(o2[n2], e3, false, void 0, a2);
13828              }
13829            } catch (e4) {
13830              throw new d("[" + e4.kind + "]", $.inspect(t3), this.path + "." + n2, e4, this);
13831            }
13832            return t3;
13833          }
13834          throw new d("Array", $.inspect(t3), this.path, null, this);
13835        }, N.prototype.$toObject = N.prototype.toObject, N.prototype.discriminator = function() {
13836          for (var t3, e3 = this; e3.$isMongooseArray && !e3.$isMongooseDocumentArray; ) if (null == (e3 = e3.casterConstructor) || "function" == typeof e3) throw new p("You can only add an embedded discriminator on a document array, " + this.path + " is a plain array");
13837          return (t3 = e3).discriminator.apply(t3, arguments);
13838        }, N.prototype.clone = function() {
13839          var t3 = Object.assign({}, this.options), e3 = new this.constructor(this.path, this.caster, t3, this.schemaOptions);
13840          return e3.validators = this.validators.slice(), void 0 !== this.requiredValidator && (e3.requiredValidator = this.requiredValidator), e3;
13841        }, N.prototype._castForQuery = function(t3, e3) {
13842          var r3 = this, n2 = this.casterConstructor;
13843          if (t3 && n2.discriminators && n2.schema && n2.schema.options && n2.schema.options.discriminatorKey) if ("string" == typeof t3[n2.schema.options.discriminatorKey] && n2.discriminators[t3[n2.schema.options.discriminatorKey]]) n2 = n2.discriminators[t3[n2.schema.options.discriminatorKey]];
13844          else {
13845            var o2 = x(n2.discriminators, t3[n2.schema.options.discriminatorKey]);
13846            o2 && (n2 = o2);
13847          }
13848          var i2 = this.casterConstructor.prototype, s2 = i2 && i2.castForQuery, a2 = i2 && i2.cast, u2 = n2.castForQuery, c2 = this.caster;
13849          return Array.isArray(t3) ? (this.setters.reverse().forEach(function(e4) {
13850            t3 = e4.call(r3, t3, r3);
13851          }), t3 = t3.map(function(t4) {
13852            return j.isObject(t4) && t4.$elemMatch ? t4 : s2 ? t4 = s2.call(c2, null, t4, e3) : a2 ? t4 = a2.call(c2, t4) : u2 ? t4 = u2.call(c2, null, t4, e3) : null != t4 ? t4 = new n2(t4) : t4;
13853          })) : s2 ? t3 = s2.call(c2, null, t3, e3) : a2 ? t3 = a2.call(c2, t3) : u2 ? t3 = u2.call(c2, null, t3, e3) : null != t3 && (t3 = new n2(t3)), t3;
13854        }, N.prototype.castForQuery = function(t3, e3, r3) {
13855          var n2;
13856          if (null != t3) {
13857            if (!(n2 = this.$conditionalHandlers[t3])) throw new Error("Can't use " + t3 + " with Array.");
13858            return n2.call(this, e3, r3);
13859          }
13860          return this._castForQuery(e3, r3);
13861        }, N.prototype.virtual = function(t3, e3) {
13862          if (t3 instanceof v || "VirtualType" === O(t3)) return this.virtual(t3.path, t3.options);
13863          if (e3 = new m(e3), j.hasUserDefinedProperty(e3, ["ref", "refPath"])) throw new p("Cannot set populate virtual as a property of an array");
13864          var r3 = new v(e3, t3);
13865          return null === this.virtuals && (this.virtuals = {}), this.virtuals[t3] = r3, r3;
13866        };
13867        var I = N.prototype.$conditionalHandlers = {};
13868        function B(t3) {
13869          return function(e3, r3) {
13870            if (!Array.isArray(e3)) throw new TypeError("conditional " + t3 + " requires an array");
13871            var n2, o2 = [], i2 = (function(t4, e4) {
13872              var r4 = "undefined" != typeof Symbol && t4[Symbol.iterator] || t4["@@iterator"];
13873              if (!r4) {
13874                if (Array.isArray(t4) || (r4 = (function(t5, e5) {
13875                  if (t5) {
13876                    if ("string" == typeof t5) return s(t5, e5);
13877                    var r5 = {}.toString.call(t5).slice(8, -1);
13878                    return "Object" === r5 && t5.constructor && (r5 = t5.constructor.name), "Map" === r5 || "Set" === r5 ? Array.from(t5) : "Arguments" === r5 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r5) ? s(t5, e5) : void 0;
13879                  }
13880                })(t4)) || e4) {
13881                  r4 && (t4 = r4);
13882                  var n3 = 0, o3 = function() {
13883                  };
13884                  return { s: o3, n: function() {
13885                    return n3 >= t4.length ? { done: true } : { done: false, value: t4[n3++] };
13886                  }, e: function(t5) {
13887                    throw t5;
13888                  }, f: o3 };
13889                }
13890                throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
13891              }
13892              var i3, a3 = true, u3 = false;
13893              return { s: function() {
13894                r4 = r4.call(t4);
13895              }, n: function() {
13896                var t5 = r4.next();
13897                return a3 = t5.done, t5;
13898              }, e: function(t5) {
13899                u3 = true, i3 = t5;
13900              }, f: function() {
13901                try {
13902                  a3 || null == r4.return || r4.return();
13903                } finally {
13904                  if (u3) throw i3;
13905                }
13906              } };
13907            })(e3);
13908            try {
13909              for (i2.s(); !(n2 = i2.n()).done; ) {
13910                var a2, u2 = n2.value;
13911                o2.push(_(null !== (a2 = this.casterConstructor.schema) && void 0 !== a2 ? a2 : r3.schema, u2, null, this && this.$$context));
13912              }
13913            } catch (t4) {
13914              i2.e(t4);
13915            } finally {
13916              i2.f();
13917            }
13918            return o2;
13919          };
13920        }
13921        I.$all = function(t3, e3) {
13922          var r3 = this;
13923          return Array.isArray(t3) || (t3 = [t3]), t3 = t3.map(function(t4) {
13924            if (!j.isObject(t4)) return t4;
13925            if (null != t4.$elemMatch) return { $elemMatch: _(r3.casterConstructor.schema, t4.$elemMatch, null, r3 && r3.$$context) };
13926            var e4 = {};
13927            return e4[r3.path] = t4, _(r3.casterConstructor.schema, e4, null, r3 && r3.$$context)[r3.path];
13928          }, this), this.castForQuery(null, t3, e3);
13929        }, I.$options = String, I.$elemMatch = function(t3, e3) {
13930          for (var r3 = Object.keys(t3), n2 = r3.length, o2 = 0; o2 < n2; ++o2) {
13931            var i2 = r3[o2], s2 = t3[i2];
13932            S(i2) && null != s2 && (t3[i2] = this.castForQuery(i2, s2, e3));
13933          }
13934          return t3;
13935        }, I.$geoIntersects = E.cast$geoIntersects, I.$or = B("$or"), I.$and = B("$and"), I.$nor = B("$nor"), I.$near = I.$nearSphere = E.cast$near, I.$within = I.$geoWithin = E.cast$within, I.$size = I.$minDistance = I.$maxDistance = P, I.$exists = l, I.$type = f, I.$eq = I.$gt = I.$gte = I.$lt = I.$lte = I.$not = I.$regex = I.$ne = N.prototype._castForQuery, I.$nin = y.prototype.$conditionalHandlers.$nin, I.$in = y.prototype.$conditionalHandlers.$in, N.prototype.toJSONSchema = function(t3) {
13936          var e3 = this.getEmbeddedSchemaType(), r3 = this.options.required && "function" != typeof this.options.required;
13937          return o(o({}, A("array", "array", null == t3 ? void 0 : t3.useBsonType, r3)), {}, { items: e3.toJSONSchema(t3) });
13938        }, N.prototype.autoEncryptionType = function() {
13939          return "array";
13940        }, t2.exports = N;
13941      }, 7768: (t2, e2, r2) => {
13942        var n = r2(2402);
13943        t2.exports = function(t3) {
13944          return null == t3 ? t3 : "" === t3 ? null : ("string" != typeof t3 && "boolean" != typeof t3 || (t3 = Number(t3)), n.ok(!isNaN(t3)), t3 instanceof Number ? t3.valueOf() : "number" == typeof t3 ? t3 : Array.isArray(t3) || "function" != typeof t3.valueOf ? t3.toString && !Array.isArray(t3) && t3.toString() == Number(t3) ? Number(t3) : void n.ok(false) : Number(t3.valueOf()));
13945        };
13946      }, 7834: (t2) => {
13947        function e2(t3) {
13948          return e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
13949            return typeof t4;
13950          } : function(t4) {
13951            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
13952          }, e2(t3);
13953        }
13954        t2.exports = function(t3, r2, n, o) {
13955          return o.justOne || o.count ? (t3[r2] = Array.isArray(n) ? n[0] : n, "object" !== e2(t3[r2]) && (t3[r2] = o.count ? n : null)) : (t3[r2] = Array.isArray(n) ? n : null == n ? [] : [n], t3[r2] = t3[r2].filter(function(t4) {
13956            return t4 && "object" === e2(t4);
13957          })), t3[r2];
13958        };
13959      }, 7860: (t2) => {
13960        t2.exports = function(t3) {
13961          for (var e2 = [], r2 = "", n = "DEFAULT", o = 0; o < t3.length; ++o) "IN_SQUARE_BRACKETS" !== n || /\d/.test(t3[o]) || "]" === t3[o] || (n = "DEFAULT", r2 = e2[e2.length - 1] + "[" + r2, e2.splice(e2.length - 1, 1)), "[" === t3[o] ? ("IMMEDIATELY_AFTER_SQUARE_BRACKETS" !== n && (e2.push(r2), r2 = ""), n = "IN_SQUARE_BRACKETS") : "]" === t3[o] ? "IN_SQUARE_BRACKETS" === n ? (n = "IMMEDIATELY_AFTER_SQUARE_BRACKETS", e2.push(r2), r2 = "") : (n = "DEFAULT", r2 += t3[o]) : "." === t3[o] ? ("IMMEDIATELY_AFTER_SQUARE_BRACKETS" !== n && (e2.push(r2), r2 = ""), n = "DEFAULT") : r2 += t3[o];
13962          return "IMMEDIATELY_AFTER_SQUARE_BRACKETS" !== n && e2.push(r2), e2;
13963        };
13964      }, 7878: (t2, e2, r2) => {
13965        var n = r2(2273), o = r2(4183);
13966        t2.exports = function() {
13967          var t3 = o();
13968          return n(Number, { isNaN: t3 }, { isNaN: function() {
13969            return Number.isNaN !== t3;
13970          } }), t3;
13971        };
13972      }, 7910: (t2, e2, r2) => {
13973        var n = r2(1058);
13974        t2.exports = function(t3, e3, r3) {
13975          var o = t3.schema.options.discriminatorKey, i = null != e3 && e3[o];
13976          if (null == i && (i = r3), t3.discriminators && null != i) if (t3.discriminators[i]) t3 = t3.discriminators[i];
13977          else {
13978            var s = n(t3.discriminators, i);
13979            s && (t3 = s);
13980          }
13981          return t3;
13982        };
13983      }, 7911: (t2, e2, r2) => {
13984        var n = r2(9834);
13985        t2.exports = function(t3) {
13986          return !!n(t3);
13987        };
13988      }, 7930: (t2, e2) => {
13989        e2.arrayAtomicsBackupSymbol = Symbol("mongoose#Array#atomicsBackup"), e2.arrayAtomicsSymbol = Symbol("mongoose#Array#_atomics"), e2.arrayParentSymbol = Symbol("mongoose#Array#_parent"), e2.arrayPathSymbol = Symbol("mongoose#Array#_path"), e2.arraySchemaSymbol = Symbol("mongoose#Array#_schema"), e2.documentArrayParent = Symbol("mongoose#documentArrayParent"), e2.documentIsSelected = Symbol("mongoose#Document#isSelected"), e2.documentIsModified = Symbol("mongoose#Document#isModified"), e2.documentModifiedPaths = Symbol("mongoose#Document#modifiedPaths"), e2.documentSchemaSymbol = Symbol("mongoose#Document#schema"), e2.getSymbol = Symbol("mongoose#Document#get"), e2.modelSymbol = Symbol("mongoose#Model"), e2.objectIdSymbol = Symbol("mongoose#ObjectId"), e2.populateModelSymbol = Symbol("mongoose#PopulateOptions#Model"), e2.schemaTypeSymbol = Symbol("mongoose#schemaType"), e2.sessionNewDocuments = Symbol("mongoose#ClientSession#newDocuments"), e2.scopeSymbol = Symbol("mongoose#Document#scope"), e2.validatorErrorSymbol = Symbol("mongoose#validatorError");
13990      }, 7944: (t2) => {
13991        function e2(t3) {
13992          return e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
13993            return typeof t4;
13994          } : function(t4) {
13995            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
13996          }, e2(t3);
13997        }
13998        t2.exports = function(t3) {
13999          return t3 && "object" === e2(t3) && "function" == typeof t3.copy && "function" == typeof t3.fill && "function" == typeof t3.readUInt8;
14000        };
14001      }, 7953: (t2, e2, r2) => {
14002        e2.Array = r2(7760), e2.BigInt = r2(3318), e2.Boolean = r2(6413), e2.Buffer = r2(2307), e2.Date = r2(2345), e2.Decimal128 = e2.Decimal = r2(7045), e2.DocumentArray = r2(9123), e2.Double = r2(1732), e2.Int32 = r2(433), e2.Map = r2(6867), e2.Mixed = r2(5022), e2.Number = r2(3660), e2.ObjectId = r2(3091), e2.String = r2(8728), e2.Subdocument = r2(5098), e2.UUID = r2(2134), e2.Union = r2(8866), e2.Oid = e2.ObjectId, e2.Object = e2.Mixed, e2.Bool = e2.Boolean, e2.ObjectID = e2.ObjectId;
14003      }, 7982: (t2, e2, r2) => {
14004        function n(t3, e3) {
14005          var r3 = "undefined" != typeof Symbol && t3[Symbol.iterator] || t3["@@iterator"];
14006          if (!r3) {
14007            if (Array.isArray(t3) || (r3 = (function(t4, e4) {
14008              if (t4) {
14009                if ("string" == typeof t4) return o(t4, e4);
14010                var r4 = {}.toString.call(t4).slice(8, -1);
14011                return "Object" === r4 && t4.constructor && (r4 = t4.constructor.name), "Map" === r4 || "Set" === r4 ? Array.from(t4) : "Arguments" === r4 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r4) ? o(t4, e4) : void 0;
14012              }
14013            })(t3)) || e3) {
14014              r3 && (t3 = r3);
14015              var n2 = 0, i2 = function() {
14016              };
14017              return { s: i2, n: function() {
14018                return n2 >= t3.length ? { done: true } : { done: false, value: t3[n2++] };
14019              }, e: function(t4) {
14020                throw t4;
14021              }, f: i2 };
14022            }
14023            throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14024          }
14025          var s2, a2 = true, u2 = false;
14026          return { s: function() {
14027            r3 = r3.call(t3);
14028          }, n: function() {
14029            var t4 = r3.next();
14030            return a2 = t4.done, t4;
14031          }, e: function(t4) {
14032            u2 = true, s2 = t4;
14033          }, f: function() {
14034            try {
14035              a2 || null == r3.return || r3.return();
14036            } finally {
14037              if (u2) throw s2;
14038            }
14039          } };
14040        }
14041        function o(t3, e3) {
14042          (null == e3 || e3 > t3.length) && (e3 = t3.length);
14043          for (var r3 = 0, n2 = Array(e3); r3 < e3; r3++) n2[r3] = t3[r3];
14044          return n2;
14045        }
14046        function i(t3) {
14047          return i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
14048            return typeof t4;
14049          } : function(t4) {
14050            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
14051          }, i(t3);
14052        }
14053        var s = r2(3609), a = r2(8995), u = r2(7953), c = r2(170), l = r2(1244), f = r2(9064), p = r2(3703), h = r2(7425), y = r2(5110), d = r2(7352), b = r2(608), m = r2(2497), v = r2(8768), g = ["Polygon", "MultiPolygon"];
14054        function _(t3, e3, r3) {
14055          if (Array.isArray(t3)) t3.forEach(function(n3, o3) {
14056            if (Array.isArray(n3) || b(n3)) return _(n3, e3, r3);
14057            t3[o3] = e3.castForQuery(null, n3, r3);
14058          });
14059          else for (var n2 = Object.keys(t3), o2 = n2.length; o2--; ) {
14060            var i2 = n2[o2], s2 = t3[i2];
14061            Array.isArray(s2) || b(s2) ? (_(s2, e3, r3), t3[i2] = s2) : t3[i2] = e3.castForQuery({ val: s2, context: r3 });
14062          }
14063        }
14064        function w(t3, e3, r3, n2) {
14065          if ("strictQuery" in t3) return t3.strictQuery;
14066          if ("strictQuery" in e3) return e3.strictQuery;
14067          var o2 = n2 && n2.mongooseCollection && n2.mongooseCollection.conn && n2.mongooseCollection.conn.base && n2.mongooseCollection.conn.base.options;
14068          return o2 && "strictQuery" in o2 ? o2.strictQuery : r3.strictQuery;
14069        }
14070        t2.exports = function t3(e3, r3, o2, O) {
14071          if (Array.isArray(r3)) throw new Error("Query filter must be an object, got an array ", d.inspect(r3));
14072          if (null == r3) return r3;
14073          null != e3 && null != e3.discriminators && null != r3[e3.options.discriminatorKey] && (e3 = h(e3, r3[e3.options.discriminatorKey]) || e3);
14074          var S, $, j, P, A, E, x = Object.keys(r3), T = x.length;
14075          for (o2 = o2 || {}; T--; ) if (E = r3[P = x[T]], "$or" === P || "$nor" === P || "$and" === P) {
14076            if (!Array.isArray(E)) throw new s("Array", E, P);
14077            for (var k = E.length - 1; k >= 0; k--) {
14078              if (null == E[k] || "object" !== i(E[k])) throw new s("Object", E[k], P + "." + k);
14079              var N = Object.keys(E[k]).length, I = E[k][e3.options.discriminatorKey];
14080              if (null == I) E[k] = t3(e3, E[k], o2, O);
14081              else {
14082                var B = h(O.schema, I);
14083                E[k] = t3(B || e3, E[k], o2, O);
14084              }
14085              0 === Object.keys(E[k]).length && 0 !== N && E.splice(k, 1);
14086            }
14087            0 === E.length && delete r3[P];
14088          } else {
14089            if ("$where" === P) {
14090              if ("string" !== (A = i(E)) && "function" !== A) throw new Error("Mu
14090st have a string or function for $where");
14091              "function" === A && (r3[P] = E.toString());
14092              continue;
14093            }
14094            if ("$expr" === P) {
14095              E = c(E, e3);
14096              continue;
14097            }
14098            if ("$elemMatch" === P) E = t3(e3, E, o2, O);
14099            else if ("$text" === P) E = f(E, P);
14100            else if ("$comment" !== P || e3.paths.hasOwnProperty("$comment")) {
14101              if (!e3) continue;
14102              if (!($ = e3.path(P))) for (var M = P.split("."), D = M.length; D--; ) {
14103                var R = M.slice(0, D).join("."), U = M.slice(D).join("."), C = e3.path(R), F = C && C.schema && C.schema.options && C.schema.options.discriminatorKey;
14104                if (null != C && null != (C.schema && C.schema.discriminators) && null != F && U !== F) {
14105                  var L = p(r3, R + "." + F), V = C.schema.discriminators;
14106                  "string" == typeof L && null != V[L] ? $ = V[L].path(U) : null != L && 1 === Object.keys(L).length && Array.isArray(L.$in) && 1 === L.$in.length && "string" == typeof L.$in[0] && null != V[L.$in[0]] && ($ = V[L.$in[0]].path(U));
14107                }
14108              }
14109              if ($) {
14110                if (null == E) continue;
14111                if (v.isPOJO(E)) if (Object.keys(E).some(y)) for (var q = Object.keys(E), J = void 0, z = q.length; z--; ) if (j = E[J = q[z]], "$elemMatch" === J) j && null != $ && null != $.schema ? t3($.schema, j, o2, O) : j && null != $ && $.$isMongooseArray && (v.isPOJO(j) && null != j.$not ? t3(e3, j, o2, O) : E[J] = $.castForQuery(J, j, O));
14112                else if ("$not" === J) {
14113                  if (j && $) {
14114                    if ((S = Object.keys(j)).length && y(S[0])) for (var K in j) j[K] = $.castForQuery(K, j[K], O);
14115                    else E[J] = $.castForQuery(J, j, O);
14116                    continue;
14117                  }
14118                } else E[J] = $.castForQuery(J, j, O);
14119                else r3[P] = $.castForQuery(null, E, O);
14120                else if (Array.isArray(E) && -1 === ["Buffer", "Array"].indexOf($.instance) && !o2.sanitizeFilter) {
14121                  var H, W = [], G = n(E);
14122                  try {
14123                    for (G.s(); !(H = G.n()).done; ) {
14124                      var Q = H.value;
14125                      W.push($.castForQuery(null, Q, O));
14126                    }
14127                  } catch (t4) {
14128                    G.e(t4);
14129                  } finally {
14130                    G.f();
14131                  }
14132                  r3[P] = { $in: W };
14133                } else r3[P] = $.castForQuery(null, E, O);
14134              } else {
14135                for (var Y = P.split("."), Z = Y.length, X = void 0, tt = void 0, et = void 0; Z-- && (X = Y.slice(0, Z).join("."), !($ = e3.path(X))); ) ;
14136                if ($) {
14137                  if ($.caster && $.caster.schema) {
14138                    (et = {})[tt = Y.slice(Z).join(".")] = E;
14139                    var rt = t3($.caster.schema, et, o2, O)[tt];
14140                    void 0 === rt ? delete r3[P] : r3[P] = rt;
14141                  } else r3[P] = E;
14142                  continue;
14143                }
14144                if (b(E)) {
14145                  var nt = "";
14146                  if (E.$near ? nt = "$near" : E.$nearSphere ? nt = "$nearSphere" : E.$within ? nt = "$within" : E.$geoIntersects ? nt = "$geoIntersects" : E.$geoWithin && (nt = "$geoWithin"), nt) {
14147                    var ot = new u.Number("__QueryCasting__"), it = E[nt];
14148                    if (null != E.$maxDistance && (E.$maxDistance = ot.castForQuery(null, E.$maxDistance, O)), null != E.$minDistance && (E.$minDistance = ot.castForQuery(null, E.$minDistance, O)), "$within" === nt) {
14149                      var st = it.$center || it.$centerSphere || it.$box || it.$polygon;
14150                      if (!st) throw new Error("Bad $within parameter: " + JSON.stringify(E));
14151                      it = st;
14152                    } else if ("$near" === nt && "string" == typeof it.type && Array.isArray(it.coordinates)) it = it.coordinates;
14153                    else if (("$near" === nt || "$nearSphere" === nt || "$geoIntersects" === nt) && it.$geometry && "string" == typeof it.$geometry.type && Array.isArray(it.$geometry.coordinates)) null != it.$maxDistance && (it.$maxDistance = ot.castForQuery(null, it.$maxDistance, O)), null != it.$minDistance && (it.$minDistance = ot.castForQuery(null, it.$minDistance, O)), m(it.$geometry) && (it.$geometry = it.$geometry.toObject({ transform: false, virtuals: false })), it = it.$geometry.coordinates;
14154                    else if ("$geoWithin" === nt) if (it.$geometry) {
14155                      m(it.$geometry) && (it.$geometry = it.$geometry.toObject({ virtuals: false }));
14156                      var at = it.$geometry.type;
14157                      if (-1 === g.indexOf(at)) throw new Error('Invalid geoJSON type for $geoWithin "' + at + '", must be "Polygon" or "MultiPolygon"');
14158                      it = it.$geometry.coordinates;
14159                    } else it = it.$box || it.$polygon || it.$center || it.$centerSphere, m(it) && (it = it.toObject({ virtuals: false }));
14160                    _(it, ot, O);
14161                    continue;
14162                  }
14163                }
14164                if (e3.nested[P]) continue;
14165                var ut = "strict" in o2 ? o2.strict : e3.options.strict, ct = w(o2, e3._userProvidedOptions, e3.options, O);
14166                if (o2.upsert && ut) {
14167                  if ("throw" === ut) throw new a(P);
14168                  throw new a(P, 'Path "' + P + '" is not in schema, strict mode is `true`, and upsert is `true`.');
14169                }
14170                if ("throw" === ct) throw new a(P, 'Path "' + P + `" is not in schema and strictQuery is 'throw'.`);
14171                ct && delete r3[P];
14172              }
14173            } else E = l(E, P), r3[P] = E;
14174          }
14175          return r3;
14176        };
14177      }, 8063: (t2, e2, r2) => {
14178        function n(t3) {
14179          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
14180            return typeof t4;
14181          } : function(t4) {
14182            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
14183          }, n(t3);
14184        }
14185        function o() {
14186          try {
14187            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
14188            }));
14189          } catch (t4) {
14190          }
14191          return (o = function() {
14192            return !!t3;
14193          })();
14194        }
14195        function i(t3) {
14196          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
14197            return t4.__proto__ || Object.getPrototypeOf(t4);
14198          }, i(t3);
14199        }
14200        function s(t3, e3) {
14201          return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
14202            return t4.__proto__ = e4, t4;
14203          }, s(t3, e3);
14204        }
14205        var a = (function(t3) {
14206          function e3(t4) {
14207            return (function(t5, e4) {
14208              if (!(t5 instanceof e4)) throw new TypeError("Cannot call a class as a function");
14209            })(this, e3), (function(t5, e4, r4) {
14210              return e4 = i(e4), (function(t6, e5) {
14211                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
14212                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
14213                return (function(t7) {
14214                  if (void 0 === t7) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
14215                  return t7;
14216                })(t6);
14217              })(t5, o() ? Reflect.construct(e4, r4 || [], i(t5).constructor) : e4.apply(t5, r4));
14218            })(this, e3, [`Schema hasn't been registered for model "` + t4 + '".\nUse mongoose.model(name, schema)']);
14219          }
14220          return (function(t4, e4) {
14221            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
14222            t4.prototype = Object.create(e4 && e4.prototype, { c
14222onstructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && s(t4, e4);
14223          })(e3, t3), r3 = e3, Object.defineProperty(r3, "prototype", { writable: false }), r3;
14224          var r3;
14225        })(r2(8213));
14226        Object.defineProperty(a.prototype, "name", { value: "MissingSchemaError" }), t2.exports = a;
14227      }, 8093: (t2) => {
14228        t2.exports = Object;
14229      }, 8133: (t2, e2, r2) => {
14230        var n = r2(8995);
14231        t2.exports = function(t3) {
14232          var e3, r3;
14233          t3.$immutable ? (t3.$immutableSetter = (e3 = t3.path, r3 = t3.options.immutable, function(t4, o, i, s) {
14234            if (null == this || null == this.$__) return t4;
14235            if (this.isNew) return t4;
14236            if (s && s.overwriteImmutable) return t4;
14237            if (!("function" == typeof r3 ? r3.call(this, this) : r3)) return t4;
14238            var a = null != this.$__.priorDoc ? this.$__.priorDoc.$__getValue(e3) : this.$__getValue(e3);
14239            if ("throw" === this.$__.strictMode && t4 !== a) throw new n(e3, "Path `" + e3 + "` is immutable and strict mode is set to throw.", true);
14240            return a;
14241          }), t3.set(t3.$immutableSetter)) : t3.$immutableSetter && (t3.setters = t3.setters.filter(function(e4) {
14242            return e4 !== t3.$immutableSetter;
14243          }), delete t3.$immutableSetter);
14244        };
14245      }, 8188: (t2) => {
14246        t2.exports = URIError;
14247      }, 8213: (t2) => {
14248        function e2(t3) {
14249          return e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
14250            return typeof t4;
14251          } : function(t4) {
14252            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
14253          }, e2(t3);
14254        }
14255        function r2(t3) {
14256          var e3 = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0;
14257          return r2 = function(t4) {
14258            if (null === t4 || !(function(t5) {
14259              try {
14260                return -1 !== Function.toString.call(t5).indexOf("[native code]");
14261              } catch (e4) {
14262                return "function" == typeof t5;
14263              }
14264            })(t4)) return t4;
14265            if ("function" != typeof t4) throw new TypeError("Super expression must either be null or a function");
14266            if (void 0 !== e3) {
14267              if (e3.has(t4)) return e3.get(t4);
14268              e3.set(t4, r3);
14269            }
14270            function r3() {
14271              return (function(t5, e4, r4) {
14272                if (n()) return Reflect.construct.apply(null, arguments);
14273                var i2 = [null];
14274                i2.push.apply(i2, e4);
14275                var s2 = new (t5.bind.apply(t5, i2))();
14276                return r4 && o(s2, r4.prototype), s2;
14277              })(t4, arguments, i(this).constructor);
14278            }
14279            return r3.prototype = Object.create(t4.prototype, { constructor: { value: r3, enumerable: false, writable: true, configurable: true } }), o(r3, t4);
14280          }, r2(t3);
14281        }
14282        function n() {
14283          try {
14284            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
14285            }));
14286          } catch (t4) {
14287          }
14288          return (n = function() {
14289            return !!t3;
14290          })();
14291        }
14292        function o(t3, e3) {
14293          return o = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
14294            return t4.__proto__ = e4, t4;
14295          }, o(t3, e3);
14296        }
14297        function i(t3) {
14298          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
14299            return t4.__proto__ || Object.getPrototypeOf(t4);
14300          }, i(t3);
14301        }
14302        var s = (function(t3) {
14303          function r3() {
14304            return (function(t4, e3) {
14305              if (!(t4 instanceof e3)) throw new TypeError("Cannot call a class as a function");
14306            })(this, r3), (function(t4, r4, o2) {
14307              return r4 = i(r4), (function(t5, r5) {
14308                if (r5 && ("object" == e2(r5) || "function" == typeof r5)) return r5;
14309                if (void 0 !== r5) throw new TypeError("Derived constructors may only return object or undefined");
14310                return (function(t6) {
14311                  if (void 0 === t6) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
14312                  return t6;
14313                })(t5);
14314              })(t4, n() ? Reflect.construct(r4, o2 || [], i(t4).constructor) : r4.apply(t4, o2));
14315            })(this, r3, arguments);
14316          }
14317          return (function(t4, e3) {
14318            if ("function" != typeof e3 && null !== e3) throw new TypeError("Super expression must either be null or a function");
14319            t4.prototype = Object.create(e3 && e3.prototype, { c
14319onstructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e3 && o(t4, e3);
14320          })(r3, t3), s2 = r3, Object.defineProperty(s2, "prototype", { writable: false }), s2;
14321          var s2;
14322        })(r2(Error));
14323        Object.defineProperty(s.prototype, "name", { value: "MongooseError" }), t2.exports = s;
14324      }, 8235: (t2, e2, r2) => {
14325        var n = r2(8213), o = r2(6426), i = r2(5098), s = r2(7910);
14326        function a(t3, e3) {
14327          if (this.$parentSchemaType = e3 && e3.$parentSchemaType, !this.$parentSchemaType) throw new n("Cannot create DocumentArrayElement schematype without a parent");
14328          delete e3.$parentSchemaType, o.call(this, t3, e3, "DocumentArrayElement"), this.$isMongooseDocumentArrayElement = true;
14329        }
14330        a.schemaName = "DocumentArrayElement", a.defaultOptions = {}, a.prototype = Object.create(o.prototype), a.prototype.constructor = a, a.prototype.cast = function() {
14331          var t3;
14332          return (t3 = this.$parentSchemaType).cast.apply(t3, arguments)[0];
14333        }, a.prototype.doValidate = function(t3, e3, r3, n2) {
14334          var o2 = s(this.caster, t3);
14335          return !t3 || t3 instanceof o2 || (t3 = new o2(t3, r3, null, null, n2 && null != n2.index ? n2.index : null)), i.prototype.doValidate.call(this, t3, e3, r3, n2);
14336        }, a.prototype.clone = function() {
14337          this.options.$parentSchemaType = this.$parentSchemaType;
14338          var t3 = o.prototype.clone.apply(this, arguments);
14339          return delete this.options.$parentSchemaType, t3.caster = this.caster, t3.schema = this.schema, t3;
14340        }, t2.exports = a;
14341      }, 8250: (t2, e2, r2) => {
14342        var n = r2(5832).hp, o = r2(6365), i = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i, s = o.Binary;
14343        function a(t3) {
14344          "string" != typeof t3 && (t3 = "");
14345          var e3, r3 = null != (e3 = t3.replace(/[{}-]/g, "")) && n.from(e3, "hex"), i2 = new o(r3);
14346          return i2._subtype = 4, i2;
14347        }
14348        t2.exports = function(t3) {
14349          if (null == t3) return t3;
14350          function e3(t4) {
14351            var e4 = new o(t4);
14352            return e4._subtype = 4, e4;
14353          }
14354          if ("string" == typeof t3) {
14355            if (i.test(t3)) return a(t3);
14356            throw new Error('"'.concat(t3, '" is not a valid UUID string'));
14357          }
14358          if (n.isBuffer(t3)) return e3(t3);
14359          if (t3 instanceof s) return e3(t3.value(true));
14360          if (t3.toString && t3.toString !== Object.prototype.toString && i.test(t3.toString())) return a(t3.toString());
14361          throw new Error('"'.concat(t3, '" cannot be casted to a UUID'));
14362        }, t2.exports.UUID_FORMAT = i;
14363      }, 8260: (t2) => {
14364        t2.exports = function(t3) {
14365          if (null != t3 && "function" == typeof t3.constructor) return t3.constructor.name;
14366        };
14367      }, 8285: (t2, e2, r2) => {
14368        var n = r2(2400), o = r2(2580), i = false;
14369        t2.exports = function() {
14370          return i ? o : n;
14371        }, t2.exports.setBrowser = function(t3) {
14372          i = t3;
14373        };
14374      }, 8297: (t2) => {
14375        function e2(t3, e3) {
14376          var r3 = "undefined" != typeof Symbol && t3[Symbol.iterator] || t3["@@iterator"];
14377          if (!r3) {
14378            if (Array.isArray(t3) || (r3 = n(t3)) || e3) {
14379              r3 && (t3 = r3);
14380              var o2 = 0, i2 = function() {
14381              };
14382              return { s: i2, n: function() {
14383                return o2 >= t3.length ? { done: true } : { done: false, value: t3[o2++] };
14384              }, e: function(t4) {
14385                throw t4;
14386              }, f: i2 };
14387            }
14388            throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14389          }
14390          var s, a2 = true, u2 = false;
14391          return { s: function() {
14392            r3 = r3.call(t3);
14393          }, n: function() {
14394            var t4 = r3.next();
14395            return a2 = t4.done, t4;
14396          }, e: function(t4) {
14397            u2 = true, s = t4;
14398          }, f: function() {
14399            try {
14400              a2 || null == r3.return || r3.return();
14401            } finally {
14402              if (u2) throw s;
14403            }
14404          } };
14405        }
14406        function r2(t3) {
14407          return r2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
14408            return typeof t4;
14409          } : function(t4) {
14410            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
14411          }, r2(t3);
14412        }
14413        function n(t3, e3) {
14414          if (t3) {
14415            if ("string" == typeof t3) return o(t3, e3);
14416            var r3 = {}.toString.call(t3).slice(8, -1);
14417            return "Object" === r3 && t3.constructor && (r3 = t3.constructor.name), "Map" === r3 || "Set" === r3 ? Array.from(t3) : "Arguments" === r3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r3) ? o(t3, e3) : void 0;
14418          }
14419        }
14420        function o(t3, e3) {
14421          (null == e3 || e3 > t3.length) && (e3 = t3.length);
14422          for (var r3 = 0, n2 = Array(e3); r3 < e3; r3++) n2[r3] = t3[r3];
14423          return n2;
14424        }
14425        function i(t3, e3, r3) {
14426          if (a()) return Reflect.construct.apply(null, arguments);
14427          var n2 = [null];
14428          n2.push.apply(n2, e3);
14429          var o2 = new (t3.bind.apply(t3, n2))();
14430          return o2;
14431        }
14432        function a() {
14433          try {
14434            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
14435            }));
14436          } catch (t4) {
14437          }
14438          return (a = function() {
14439            return !!t3;
14440          })();
14441        }
14442        function u() {
14443          this._pres = /* @__PURE__ */ new Map(), this._posts = /* @__PURE__ */ new Map();
14444        }
14445        function c(t3, e3, r3, n2, o2, i2, s) {
14446          return i2.useErrorHandlers ? t3.execPost(r3, n2, o2, { error: e3 }, function(t4) {
14447            return "function" == typeof s && s(t4);
14448          }) : "function" == typeof s && s(e3);
14449        }
14450        function l(t3, e3, r3, n2) {
14451          var o2;
14452          try {
14453            o2 = t3.apply(e3, r3);
14454          } catch (t4) {
14455            return n2(t4);
14456          }
14457          f(o2) && o2.then(function() {
14458            return n2();
14459          }, function(t4) {
14460            return n2(t4);
14461          });
14462        }
14463        function f(t3) {
14464          return "object" === r2(t3) && null !== t3 && "function" == typeof t3.then;
14465        }
14466        function p(t3) {
14467          var e3 = false, r3 = this;
14468          return function() {
14469            var n2 = arguments;
14470            if (!e3) return e3 = true, h(function() {
14471              return t3.apply(r3, n2);
14472            });
14473          };
14474        }
14475        u.skipWrappedFunction = function() {
14476          if (!(this instanceof u.skipWrappedFunction)) return i(u.ski
14476pWrappedFunction, Array.prototype.slice.call(arguments));
14477          this.args = Array.prototype.slice.call(arguments);
14478        }, u.overwriteResult = function() {
14479          if (!(this instanceof u.overwriteResult)) return i(u.overwriteResult, Array.prototype.slice.call(arguments));
14480          this.args = Array.prototype.slice.call(arguments);
14481        }, u.prototype.execPre = function(t3, e3, r3, n2) {
14482          3 === arguments.length && (n2 = r3, r3 = []);
14483          var o2 = this._pres.get(t3) || [], i2 = o2.length, s = o2.numAsync || 0, a2 = 0, c2 = s, y2 = false, d = r3, b = null;
14484          if (!i2) return h(function() {
14485            n2(null);
14486          });
14487          function m() {
14488            if (!(a2 >= i2)) {
14489              var t4 = o2[a2];
14490              if (t4.isAsync) {
14491                var r4 = [p(v), p(function(t5) {
14492                  if (t5) {
14493                    if (y2) return;
14494                    if (!(t5 instanceof u.skipWrappedFunction)) return y2 = true, n2(t5);
14495                    b = t5;
14496                  }
14497                  if (0 === --c2 && a2 >= i2) return n2(b);
14498                })];
14499                l(t4.fn, e3, r4, r4[0]);
14500              } else if (t4.fn.length > 0) {
14501                for (var s2 = [p(v)], g = arguments.length >= 2 ? arguments : [null].concat(d), _ = 1; _ < g.length; ++_) _ === g.length - 1 && "function" == typeof g[_] || s2.push(g[_]);
14502                l(t4.fn, e3, s2, s2[0]);
14503              } else {
14504                var w = null;
14505                try {
14506                  w = t4.fn.call(e3);
14507                } catch (t5) {
14508                  if (null != t5) return n2(t5);
14509                }
14510                if (f(w)) w.then(function() {
14511                  return v();
14512                }, function(t5) {
14513                  return v(t5);
14514                });
14515                else {
14516                  if (++a2 >= i2) return c2 > 0 ? void 0 : h(function() {
14517                    n2(b);
14518                  });
14519                  m();
14520                }
14521              }
14522            }
14523          }
14524          function v(t4) {
14525            if (t4) {
14526              if (y2) return;
14527              if (!(t4 instanceof u.skipWrappedFunction)) return y2 = true, n2(t4);
14528              b = t4;
14529            }
14530            if (++a2 >= i2) return c2 > 0 ? void 0 : n2(b);
14531            m.apply(e3, arguments);
14532          }
14533          m.apply(null, [null].concat(r3));
14534        }, u.prototype.execPreSync = function(t3, e3, r3) {
14535          for (var n2 = this._pres.get(t3) || [], o2 = n2.length, i2 = 0; i2 < o2; ++i2) n2[i2].fn.apply(e3, r3 || []);
14536        }, u.prototype.execPost = function(t3, e3, r3, n2, o2) {
14537          arguments.length < 5 && (o2 = n2, n2 = null);
14538          var i2 = this._posts.get(t3) || [], s = i2.length, a2 = 0, c2 = null;
14539          if (n2 && n2.error && (c2 = n2.error), !s) return h(function() {
14540            o2.apply(null, [c2].concat(r3));
14541          });
14542          !(function t4() {
14543            for (var n3 = i2[a2].fn, h2 = 0, d = r3.length, b = [], m = 0; m < d; ++m) h2 += r3[m] && r3[m]._kareemIgnore ? 0 : 1, r3[m] && r3[m]._kareemIgnore || b.push(r3[m]);
14544            if (c2) if (y(i2[a2], h2)) {
14545              var v = p(function(e4) {
14546                if (e4) {
14547                  if (e4 instanceof u.overwriteResult) return r3 = e4.args, ++a2 >= s ? o2.call(null, c2) : t4();
14548                  c2 = e4;
14549                }
14550                if (++a2 >= s) return o2.call(null, c2);
14551                t4();
14552              });
14553              l(n3, e3, [c2].concat(b).concat([v]), v);
14554            } else {
14555              if (++a2 >= s) return o2.call(null, c2);
14556              t4();
14557            }
14558            else {
14559              var g = p(function(e4) {
14560                return e4 ? e4 instanceof u.overwriteResult ? (r3 = e4.args, ++a2 >= s ? o2.apply(null, [null].concat(r3)) : t4()) : (c2 = e4, t4()) : ++a2 >= s ? o2.apply(null, [null].concat(r3)) : void t4();
14561              });
14562              if (y(i2[a2], h2)) return ++a2 >= s ? o2.apply(null, [null].concat(r3)) : t4();
14563              if (n3.length === h2 + 1) l(n3, e3, b.concat([g]), g);
14564              else {
14565                var _, w;
14566                try {
14567                  w = n3.apply(e3, b);
14568                } catch (t5) {
14569                  _ = t5, c2 = t5;
14570                }
14571                if (f(w)) return w.then(function(t5) {
14572                  g(t5 instanceof u.overwriteResult ? t5 : null);
14573                }, function(t5) {
14574                  return g(t5);
14575                });
14576                if (w instanceof u.overwriteResult && (r3 = w.args), ++a2 >
14576= s) return o2.apply(null, [_].concat(r3));
14577                t4();
14578              }
14579            }
14580          })();
14581        }, u.prototype.execPostSync = function(t3, e3, r3) {
14582          for (var n2 = this._posts.get(t3) || [], o2 = n2.length, i2 = 0; i2 < o2; ++i2) {
14583            var s = n2[i2].fn.apply(e3, r3 || []);
14584            s instanceof u.overwriteResult && (r3 = s.args);
14585          }
14586          return r3;
14587        }, u.prototype.createWrapperSync = function(t3, e3) {
14588          var r3 = this;
14589          return function() {
14590            r3.execPreSync(t3, this, arguments);
14591            var n2 = e3.apply(this, arguments);
14592            return r3.execPostSync(t3, this, [n2])[0];
14593          };
14594        }, u.prototype.wrap = function(t3, e3, r3, i2, s) {
14595          var a2 = i2.length > 0 ? i2[i2.length - 1] : null, l2 = Array.from(i2);
14596          "function" == typeof a2 && l2.pop();
14597          var p2 = this, h2 = (s = s || {}).checkForPromise;
14598          this.execPre(t3, r3, i2, function(i3) {
14599            if (i3 && !(i3 instanceof u.skipWrappedFunction)) {
14600              for (var y2 = s.numCallbackParams || 0, d = s.contextParameter ? [r3] : [], b = d.length; b < y2; ++b) d.push(null);
14601              return c(p2, i3, t3, r3, d, s, a2);
14602            }
14603            var m, v, g = e3.length;
14604            if (i3 instanceof u.skipWrappedFunction) return m = i3.args[0], _.apply(void 0, [null].concat((function(t4) {
14605              if (Array.isArray(t4)) return o(t4);
14606            })(v = i3.args) || (function(t4) {
14607              if ("undefined" != typeof Symbol && null != t4[Symbol.iterator] || null != t4["@@iterator"]) return Array.from(t4);
14608            })(v) || n(v) || (function() {
14609              throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14610            })()));
14611            try {
14612              m = e3.apply(r3, l2.concat(_));
14613            } catch (t4) {
14614              return _(t4);
14615            }
14616            if (h2) {
14617              if (f(m)) return m.then(function(t4) {
14618                return _(null, t4);
14619              }, function(t4) {
14620                return _(t4);
14621              });
14622              if (g < l2.length + 1) return _(null, m);
14623            }
14624            function _() {
14625              var e4 = Array.from(arguments);
14626              if (e4.shift(), s.nullResultByDefault && 0 === e4.length && e4.push(null), arguments[0]) return c(p2, arguments[0], t3, r3, e4, s, a2);
14627              p2.execPost(t3, r3, e4, function() {
14628                null !== a2 && (arguments[0] ? a2(arguments[0]) : a2.apply(r3, arguments));
14629              });
14630            }
14631          });
14632        }, u.prototype.filter = function(t3) {
14633          for (var e3 = this, r3 = this.clone(), n2 = Array.from(r3._pres.keys()), o2 = function() {
14634            var n3 = s[i2], o3 = e3._pres.get(n3).map(function(t4) {
14635              return Object.assign({}, t4, { name: n3 });
14636            }).filter(t3);
14637            if (0 === o3.length) return r3._pres.delete(n3), 1;
14638            o3.numAsync = o3.filter(function(t4) {
14639              return t4.isAsync;
14640            }).length, r3._pres.set(n3, o3);
14641          }, i2 = 0, s = n2; i2 < s.length; i2++) o2();
14642          for (var a2 = Array.from(r3._posts.keys()), u2 = function() {
14643            var n3 = l2[c2], o3 = e3._posts.get(n3).map(function(t4) {
14644              return Object.assign({}, t4, { name: n3 });
14645            }).filter(t3);
14646            if (0 === o3.length) return r3._posts.delete(n3), 1;
14647            r3._posts.set(n3, o3);
14648          }, c2 = 0, l2 = a2; c2 < l2.length; c2++) u2();
14649          return r3;
14650        }, u.prototype.hasHooks = function(t3) {
14651          return this._pres.has(t3) || this._posts.has(t3);
14652        }, u.prototype.createWrapper = function(t3, e3, r3, n2) {
14653          var o2 = this;
14654          return this.hasHooks(t3) ? function() {
14655            var i2 = r3 || this;
14656            o2.wrap(t3, e3, i2, Array.from(arguments), n2);
14657          } : function() {
14658            var t4 = arguments, r4 = this;
14659            h(function() {
14660              return e3.apply(r4, t4);
14661            });
14662          };
14663        }, u.prototype.pre = function(t3, e3, n2, o2, i2) {
14664          var s = {};
14665          "object" === r2(e3) && null !== e3 ? e3 = (s = e3).isAsync : "boolean" != typeof arguments[1] && (n2 = e3, e3 = false);
14666          var a2 = this._pres.get(t3) || [];
14667          if (this._pres.set(t3, a2), e3 && (a2.numAsync = a2.numAsync || 0, ++a2.numAsync), "function" != typeof n2) throw new Error('pre() requires a function, got "' + r2(n2) + '"');
14668          return i2 ? a2.unshift(Object.assign({}, s, { fn: n2, isAsync: e3 })) : a2.push(Object.assign({}, s, { fn: n2, isAsync: e3 })), this;
14669        }, u.prototype.post = function(t3, e3, n2, o2) {
14670          var i2 = this._posts.get(t3) || [];
14671          if ("function" == typeof e3 && (o2 = !!n2, n2 = e3, e3 = {}), "function" != typeof n2) throw new Error('post() requires a function, got "' + r2(n2) + '"');
14672          return o2 ? i2.unshift(Object.assign({}, e3, { fn: n2 })) : i2.push(Object.assign({}, e3, { fn: n2 })), this._posts.set(t3, i2), this;
14673        }, u.prototype.clone = function() {
14674          var t3, r3 = new u(), n2 = e2(this._pres.keys());
14675          try {
14676            for (n2.s(); !(t3 = n2.n()).done; ) {
14677              var o2 = t3.value, i2 = this._pres.get(o2).slice();
14678              i2.numAsync = this._pres.get(o2).numAsync, r3._pres.set(o2, i2);
14679            }
14680          } catch (t4) {
14681            n2.e(t4);
14682          } finally {
14683            n2.f();
14684          }
14685          var s, a2 = e2(this._posts.keys());
14686          try {
14687            for (a2.s(); !(s = a2.n()).done; ) {
14688              var c2 = s.value;
14689              r3._posts.set(c2, this._posts.get(c2).slice());
14690            }
14691          } catch (t4) {
14692            a2.e(t4);
14693          } finally {
14694            a2.f();
14695          }
14696          return r3;
14697        }, u.prototype.merge = function(t3, r3) {
14698          var n2, o2 = (r3 = 1 === arguments.length || r3) ? this.clone() : this, i2 = e2(t3._pres.keys());
14699          try {
14700            var s = function() {
14701              var e3 = n2.value, r4 = o2._pres.get(e3) || [], i3 = t3._pres.get(e3).filter(function(t4) {
14702                return -1 === r4.map(function(t5) {
14703                  return t5.fn;
14704                }).indexOf(t4.fn);
14705              }), s2 = r4.concat(i3);
14706              s2.numAsync = r4.numAsync || 0, s2.numAsync += i3.filter(function(t4) {
14707                return t4.isAsync;
14708              }).length, o2._pres.set(e3, s2);
14709            };
14710            for (i2.s(); !(n2 = i2.n()).done; ) s();
14711          } catch (t4) {
14712            i2.e(t4);
14713          } finally {
14714            i2.f();
14715          }
14716          var a2, u2 = e2(t3._posts.keys());
14717          try {
14718            var c2 = function() {
14719              var e3 = a2.value, r4 = o2._posts.get(e3) || [], n3 = t3._posts.get(e3).filter(function(t4) {
14720                return -1 === r4.indexOf(t4);
14721              });
14722              o2._posts.set(e3, r4.concat(n3));
14723            };
14724            for (u2.s(); !(a2 = u2.n()).done; ) c2();
14725          } catch (t4) {
14726            u2.e(t4);
14727          } finally {
14728            u2.f();
14729          }
14730          return o2;
14731        };
14732        var h = "object" === r2({ env: {} }) && null !== {} && {}.nextTick || function(t3) {
14733          setTimeout(t3, 0);
14734        };
14735        function y(t3, e3) {
14736          return !!t3.errorHandler || t3.fn.length === e3 + 2;
14737        }
14738        t2.exports = u;
14739      }, 8435: (t2) => {
14740        t2.exports = Math.min;
14741      }, 8442: (t2, e2, r2) => {
14742        var n = r2(1898);
14743        t2.exports = function(t3) {
14744          for (var e3 = 0, r3 = Object.values(n); e3 < r3.length; e3++) (0, r3[e3])(t3, { deduplicate: true });
14745          t3.plugins = Object.values(n).map(function(t4) {
14746            return { fn: t4, opts: { deduplicate: true } };
14747          }).concat(t3.plugins);
14748        };
14749      }, 8499: (t2, e2, r2) => {
14750        var n = r2(8953);
14751        t2.exports = function(t3) {
14752          var e3 = null != this ? this.path : null;
14753          return n(t3, e3);
14754        };
14755      }, 8517: (t2, e2, r2) => {
14756        function n(t3) {
14757          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
14758            return typeof t4;
14759          } : function(t4) {
14760            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
14761          }, n(t3);
14762        }
14763        function o() {
14764          try {
14765            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
14766            }));
14767          } catch (t4) {
14768          }
14769          return (o = function() {
14770            return !!t3;
14771          })();
14772        }
14773        function i(t3) {
14774          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
14775            return t4.__proto__ || Object.getPrototypeOf(t4);
14776          }, i(t3);
14777        }
14778        function s(t3, e3) {
14779          return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
14780            return t4.__proto__ = e4, t4;
14781          }, s(t3, e3);
14782        }
14783        var a = (function(t3) {
14784          function e3(t4, r4, s2) {
14785            var a2, u, c;
14786            !(function(t5, e4) {
14787              if (!(t5 instanceof e4)) throw new TypeError("Cannot call a class as a function");
14788            })(this, e3);
14789            var l = null !== (a2 = null == s2 ? void 0 : s2.matchedCount) && void 0 !== a2 ? a2 : 0, f = null !== (u = null == s2 ? void 0 : s2.insertedCount) && void 0 !== u ? u : 0, p = r4.map(function(t5) {
14790              return t5._id;
14791            }).join(", ");
14792            p.length > 100 && (p = p.slice(0, 100) + "...");
14793            var h = r4.length - l - f;
14794            return (c = (function(t5, e4, r5) {
14795              return e4 = i(e4), (function(t6, e5) {
14796                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
14797                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
14798                return (function(t7) {
14799                  if (void 0 === t7) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
14800                  return t7;
14801                })(t6);
14802              })(t5, o() ? Reflect.construct(e4, r5 || [], i(t5).constructor) : e4.apply(t5, r5));
14803            })(this, e3, ["".concat(t4, ".bulkSave() was not able to update ").concat(h, " of the given documents due to incorrect version or optimistic concurrency, document ids: ").concat(p)])).modelName = t4, c.documents = r4, c.bulkWriteResult = s2, c.numDocumentsNotUpdated = h, c;
14804          }
14805          return (function(t4, e4) {
14806            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
14807            t4.prototype = Object.create(e4 && e4.prototype, { c
14807onstructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && s(t4, e4);
14808          })(e3, t3), r3 = e3, Object.defineProperty(r3, "prototype", { writable: false }), r3;
14809          var r3;
14810        })(r2(8213));
14811        Object.defineProperty(a.prototype, "name", { value: "MongooseBulkSaveIncompleteError" }), t2.exports = a;
14812      }, 8533: (t2, e2, r2) => {
14813        var n = r2(5832).hp;
14814        function o(t3) {
14815          return o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
14816            return typeof t4;
14817          } : function(t4) {
14818            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
14819          }, o(t3);
14820        }
14821        function i() {
14822          try {
14823            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
14824            }));
14825          } catch (t4) {
14826          }
14827          return (i = function() {
14828            return !!t3;
14829          })();
14830        }
14831        function s(t3) {
14832          return s = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
14833            return t4.__proto__ || Object.getPrototypeOf(t4);
14834          }, s(t3);
14835        }
14836        function a(t3, e3) {
14837          return a = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
14838            return t4.__proto__ = e4, t4;
14839          }, a(t3, e3);
14840        }
14841        r2(7591).set(r2(4026));
14842        var u = r2(8285);
14843        u.setBrowser(true), e2.Error = r2(3672), e2.Schema = r2(7058), e2.Types = r2(9600), e2.VirtualType = r2(622), e2.SchemaType = r2(6426), e2.SchemaTypeOptions = r2(8879), e2.utils = r2(8768), e2.Document = u(), e2.model = function(t3, r3) {
14844          var n2 = (function(t4) {
14845            function e3(t5, n4) {
14846              return (function(t6, e4) {
14847                if (!(t6 instanceof e4)) throw new TypeError("Cannot call a class as a function");
14848              })(this, e3), (function(t6, e4, r4) {
14849                return e4 = s(e4), (function(t7, e5) {
14850                  if (e5 && ("object" == o(e5) || "function" == typeof e5)) return e5;
14851                  if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
14852                  return (function(t8) {
14853                    if (void 0 === t8) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
14854                    return t8;
14855                  })(t7);
14856                })(t6, i() ? Reflect.construct(e4, r4 || [], s(t6).constructor) : e4.apply(t6, r4));
14857              })(this, e3, [t5, r3, n4]);
14858            }
14859            return (function(t5, e4) {
14860              if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
14861              t5.prototype = Object.create(e4 && e4.prototype, { constructor: { value: t5, writable: true, configurable: true } }), Object.defineProperty(t5, "prototype", { writable: false }), e4 && a(t5, e4);
14862            })(e3, t4), n3 = e3, Object.defineProperty(n3, "prototype", { writable: false }), n3;
14863            var n3;
14864          })(e2.Document);
14865          return n2.modelName = t3, n2;
14866        }, "undefined" != typeof window && (window.mongoose = t2.exports, window.Buffer = n);
14867      }, 8633: (t2) => {
14868        t2.exports = Math.pow;
14869      }, 8728: (t2, e2, r2) => {
14870        function n(t3, e3) {
14871          var r3 = Object.keys(t3);
14872          if (Object.getOwnPropertySymbols) {
14873            var n2 = Object.getOwnPropertySymbols(t3);
14874            e3 && (n2 = n2.filter(function(e4) {
14875              return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
14876            })), r3.push.apply(r3, n2);
14877          }
14878          return r3;
14879        }
14880        function o(t3) {
14881          for (var e3 = 1; e3 < arguments.length; e3++) {
14882            var r3 = null != arguments[e3] ? arguments[e3] : {};
14883            e3 % 2 ? n(Object(r3), true).forEach(function(e4) {
14884              i(t3, e4, r3[e4]);
14885            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t3, Object.getOwnPropertyDescriptors(r3)) : n(Object(r3)).forEac
14885h(function(e4) {
14886              Object.defineProperty(t3, e4, Object.getOwnPropertyDescriptor(r3, e4));
14887            });
14888          }
14889          return t3;
14890        }
14891        function i(t3, e3, r3) {
14892          return (e3 = (function(t4) {
14893            var e4 = (function(t5) {
14894              if ("object" != s(t5) || !t5) return t5;
14895              var e5 = t5[Symbol.toPrimitive];
14896              if (void 0 !== e5) {
14897                var r4 = e5.call(t5, "string");
14898                if ("object" != s(r4)) return r4;
14899                throw new TypeError("@@toPrimitive must return a primitive value.");
14900              }
14901              return String(t5);
14902            })(t4);
14903            return "symbol" == s(e4) ? e4 : e4 + "";
14904          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
14905        }
14906        function s(t3) {
14907          return s = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
14908            return typeof t4;
14909          } : function(t4) {
14910            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
14911          }, s(t3);
14912        }
14913        function a(t3, e3) {
14914          (null == e3 || e3 > t3.length) && (e3 = t3.length);
14915          for (var r3 = 0, n2 = Array(e3); r3 < e3; r3++) n2[r3] = t3[r3];
14916          return n2;
14917        }
14918        var u = r2(6426), c = r2(3672), l = r2(9528), f = r2(1244), p = r2(4327), h = r2(8768), y = r2(3305), d = u.CastError;
14919        function b(t3, e3) {
14920          this.enumValues = [], this.regExp = null, u.call(this, t3, e3, "String");
14921        }
14922        function m(t3, e3) {
14923          return this.castForQuery(null, t3, e3);
14924        }
14925        function v(t3) {
14926          return null == t3 ? this._castNullish(t3) : this.cast(t3, this);
14927        }
14928        b.schemaName = "String", b.defaultOptions = {}, b.prototype = Object.create(u.prototype), b.prototype.constructor = b, Object.defineProperty(b.prototype, "OptionsConstructor", { configurable: false, enumerable: false, writable: false, value: l }), b._cast = f, b.cast = function(t3) {
14929          return 0 === arguments.length || (false === t3 && (t3 = this._defaultCaster), this._cast = t3), this._cast;
14930        }, b._defaultCaster = function(t3) {
14931          if (null != t3 && "string" != typeof t3) throw new Error();
14932          return t3;
14933        }, b.get = u.get, b.set = u.set, b.setters = [], b._checkRequired = function(t3) {
14934          return (t3 instanceof String || "string" == typeof t3) && t3.length;
14935        }, b.checkRequired = u.checkRequired, b.prototype.enum = function() {
14936          if (this.enumValidator && (this.validators = this.validators.filter(function(t4) {
14937            return t4.validator !== this.enumValidator;
14938          }, this), this.enumValidator = false), void 0 === arguments[0] || false === arguments[0]) return this;
14939          var t3, e3;
14940          h.isObject(arguments[0]) ? Array.isArray(arguments[0].values) ? (t3 = arguments[0].values, e3 = arguments[0].message) : (t3 = h.object.vals(arguments[0]), e3 = c.messages.String.enum) : (t3 = arguments, e3 = c.messages.String.enum);
14941          var r3, n2 = (function(t4, e4) {
14942            var r4 = "undefined" != typeof Symbol && t4[Symbol.iterator] || t4["@@iterator"];
14943            if (!r4) {
14944              if (Array.isArray(t4) || (r4 = (function(t5, e5) {
14945                if (t5) {
14946                  if ("string" == typeof t5) return a(t5, e5);
14947                  var r5 = {}.toString.call(t5).slice(8, -1);
14948                  return "Object" === r5 && t5.constructor && (r5 = t5.constructor.name), "Map" === r5 || "Set" === r5 ? Array.from(t5) : "Arguments" === r5 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r5) ? a(t5, e5) : void 0;
14949                }
14950              })(t4)) || e4) {
14951                r4 && (t4 = r4);
14952                var n3 = 0, o3 = function() {
14953                };
14954                return { s: o3, n: function() {
14955                  return n3 >= t4.length ? { done: true } : { done: false, value: t4[n3++] };
14956                }, e: function(t5) {
14957                  throw t5;
14958                }, f: o3 };
14959              }
14960              throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14961            }
14962            var i3, s2 = true, u2 = false;
14963            return { s: function() {
14964              r4 = r4.call(t4);
14965            }, n: function() {
14966              var t5 = r4.next();
14967              return s2 = t5.done, t5;
14968            }, e: function(t5) {
14969              u2 = true, i3 = t5;
14970            }, f: function() {
14971              try {
14972                s2 || null == r4.return || r4.return();
14973              } finally {
14974                if (u2) throw i3;
14975              }
14976            } };
14977          })(t3);
14978          try {
14979            for (n2.s(); !(r3 = n2.n()).done; ) {
14980              var o2 = r3.value;
14981              void 0 !== o2 && this.enumValues.push(this.cast(o2));
14982            }
14983          } catch (t4) {
14984            n2.e(t4);
14985          } finally {
14986            n2.f();
14987          }
14988          var i2 = this.enumValues;
14989          return this.enumValidator = function(t4) {
14990            return null == t4 || ~i2.indexOf(t4);
14991          }, this.validators.push({ validator: this.enumValidator, message: e3, type: "enum", enumValues: i2 }), this;
14992        }, b.prototype.lowercase = function(t3) {
14993          var e3 = this;
14994          return arguments.length > 0 && !t3 ? this : this.set(function(t4) {
14995            return "string" != typeof t4 && (t4 = e3.cast(t4)), t4 ? t4.toLowerCase() : t4;
14996          });
14997        }, b.prototype.uppercase = function(t3) {
14998          var e3 = this;
14999          return arguments.length > 0 && !t3 ? this : this.set(function(t4) {
15000            return "string" != typeof t4 && (t4 = e3.cast(t4)), t4 ? t4.toUpperCase() : t4;
15001          });
15002        }, b.prototype.trim = function(t3) {
15003          var e3 = this;
15004          return arguments.length > 0 && !t3 ? this : this.set(function(t4) {
15005            return "string" != typeof t4 && (t4 = e3.cast(t4)), t4 ? t4.trim() : t4;
15006          });
15007        }, b.prototype.minlength = function(t3, e3) {
15008          if (this.minlengthValidator && (this.validators = this.validators.filter(function(t4) {
15009            return t4.validator !== this.minlengthValidator;
15010          }, this)), null != t3) {
15011            var r3 = e3 || c.messages.String.minlength;
15012            r3 = r3.replace(/{MINLENGTH}/, t3), this.validators.push({ validator: this.minlengthValidator = function(e4) {
15013              return null === e4 || e4.length >= t3;
15014            }, message: r3, type: "minlength", minlength: t3 });
15015          }
15016          return this;
15017        }, b.prototype.minLength = b.prototype.minlength, b.prototype.maxlength = function(t3, e3) {
15018          if (this.maxlengthValidator && (this.validators = this.validators.filter(function(t4) {
15019            return t4.validator !== this.maxlengthValidator;
15020          }, this)), null != t3) {
15021            var r3 = e3 || c.messages.String.maxlength;
15022            r3 = r3.replace(/{MAXLENGTH}/, t3), this.validators.push({ validator: this.maxlengthValidator = function(e4) {
15023              return null === e4 || e4.length <= t3;
15024            }, message: r3, type: "maxlength", maxlength: t3 });
15025          }
15026          return this;
15027        }, b.prototype.maxLength = b.prototype.maxlength, b.prototype.match = function(t3, e3) {
15028          var r3 = e3 || c.messages.String.match;
15029          return this.validators.push({ validator: function(e4) {
15030            return !!t3 && (t3.lastIndex = 0, null == e4 || "" === e4 || t3.test(e4));
15031          }, message: r3, type: "regexp", regexp: t3 }), this;
15032        }, b.prototype.checkRequired = function(t3, e3) {
15033          return "object" === s(t3) && u._isRef(this, t3, e3, true) ? null != t3 : ("function" == typeof this.constructor.checkRequired ? this.constructor.checkRequired() : b.checkRequired())(t3);
15034        }, b.prototype.cast = function(t3, e3, r3, n2, o2) {
15035          if ("string" != typeof t3 && u._isRef(this, t3, e3, r3)) return this._castRef(t3, e3, r3, o2);
15036          var i2;
15037          i2 = "function" == typeof this._castFunction ? this._castFunction : "function" == typeof this.constructor.cast ? this.constructor.cast() : b.cast();
15038          try {
15039            return i2(t3);
15040          } catch (e4) {
15041            throw new d("string", t3, this.path, null, this);
15042          }
15043        };
15044        var g = o(o({}, u.prototype.$conditionalHandlers), {}, { $all: function(t3, e3) {
15045          var r3 = this;
15046          return Array.isArray(t3) ? t3.map(function(t4) {
15047            return r3.castForQuery(null, t4, e3);
15048          }) : [this.castForQuery(null, t3, e3)];
15049        }, $gt: m, $gte: m, $lt: m, $lte: m, $options: v, $regex: function(t3) {
15050          return "[object RegExp]" === Object.prototype.toString.call(t3) ? t3 : v.call(this, t3);
15051        }, $not: m });
15052        Object.defineProperty(b.prototype, "$conditionalHandlers", { enumerable: false, value: g }), b.prototype.castForQuery = function(t3, e3, r3) {
15053          var n2;
15054          if (null != t3) {
15055            if (!(n2 = this.$conditionalHandlers[t3])) throw new Error("Can't use " + t3 + " with String.");
15056            return n2.call(this, e3, r3);
15057          }
15058          if ("[object RegExp]" === Object.prototype.toString.call(e3) || y(e3, "BSONRegExp")) return e3;
15059          try {
15060            return this.applySetters(e3, r3);
15061          } catch (t4) {
15062            throw t4 instanceof d && t4.path === this.path && null != this.$fullPath && (t4.path = this.$fullPath), t4;
15063          }
15064        }, b.prototype.toJSONSchema = function(t3) {
15065          var e3 = this.options.required && "function" != typeof this.options.required;
15066          return p("string", "string", null == t3 ? void 0 : t3.useBsonType, e3);
15067        }, b.prototype.autoEncryptionType = function() {
15068          return "string";
15069        }, t2.exports = b;
15070      }, 8759: (t2) => {
15071        t2.exports = function(t3) {
15072          return t3.replace(/\.\$(\[[^\]]*\])?(?=\.)/g, ".0").replace(/\.\$(\[[^\]]*\])?$/g, ".0");
15073        };
15074      }, 8768: (t2, e2, r2) => {
15075        var n = r2(5832).hp;
15076        function o(t3, e3) {
15077          var r3 = Object.keys(t3);
15078          if (Object.getOwnPropertySymbols) {
15079            var n2 = Object.getOwnPropertySymbols(t3);
15080            e3 && (n2 = n2.filter(function(e4) {
15081              return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
15082            })), r3.push.apply(r3, n2);
15083          }
15084          return r3;
15085        }
15086        function i(t3, e3, r3) {
15087          return (e3 = (function(t4) {
15088            var e4 = (function(t5) {
15089              if ("object" != c(t5) || !t5) return t5;
15090              var e5 = t5[Symbol.toPrimitive];
15091              if (void 0 !== e5) {
15092                var r4 = e5.call(t5, "string");
15093                if ("object" != c(r4)) return r4;
15094                throw new TypeError("@@toPrimitive must return a primitive value.");
15095              }
15096              return String(t5);
15097            })(t4);
15098            return "symbol" == c(e4) ? e4 : e4 + "";
15099          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
15100        }
15101        function s(t3, e3) {
15102          var r3 = "undefined" != typeof Symbol && t3[Symbol.iterator] || t3["@@iterator"];
15103          if (!r3) {
15104            if (Array.isArray(t3) || (r3 = a(t3)) || e3) {
15105              r3 && (t3 = r3);
15106              var n2 = 0, o2 = function() {
15107              };
15108              return { s: o2, n: function() {
15109                return n2 >= t3.length ? { done: true } : { done: false, value: t3[n2++] };
15110              }, e: function(t4) {
15111                throw t4;
15112              }, f: o2 };
15113            }
15114            throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
15115          }
15116          var i2, s2 = true, u2 = false;
15117          return { s: function() {
15118            r3 = r3.call(t3);
15119          }, n: function() {
15120            var t4 = r3.next();
15121            return s2 = t4.done, t4;
15122          }, e: function(t4) {
15123            u2 = true, i2 = t4;
15124          }, f: function() {
15125            try {
15126              s2 || null == r3.return || r3.return();
15127            } finally {
15128              if (u2) throw i2;
15129            }
15130          } };
15131        }
15132        function a(t3, e3) {
15133          if (t3) {
15134            if ("string" == typeof t3) return u(t3, e3);
15135            var r3 = {}.toString.call(t3).slice(8, -1);
15136            return "Object" === r3 && t3.constructor && (r3 = t3.constructor.name), "Map" === r3 || "Set" === r3 ? Array.from(t3) : "Arguments" === r3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r3) ? u(t3, e3) : void 0;
15137          }
15138        }
15139        function u(t3, e3) {
15140          (null == e3 || e3 > t3.length) && (e3 = t3.length);
15141          for (var r3 = 0, n2 = Array(e3); r3 < e3; r3++) n2[r3] = t3[r3];
15142          return n2;
15143        }
15144        function c(t3) {
15145          return c = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
15146            return typeof t4;
15147          } : function(t4) {
15148            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
15149          }, c(t3);
15150        }
15151        var l, f = r2(6353).UUID, p = r2(354), h = r2(5678), y = r2(5549), d = r2(6948), b = r2(4450), m = r2(2746), v = r2(608), g = r2(1243), _ = r2(1347), w = r2(3305), O = r2(2789), S = r2(9696), $ = r2(2497), j = r2(5268), P = r2(9539), A = r2(2793), E = r2(7291).trustedSymbol;
15152        e2.specialProperties = A, e2.isMongooseArray = g.isMongooseArray, e2.isMongooseDocumentArray = _.isMongooseDocumentArray, e2.registerMongooseArray = g.registerMongooseArray, e2.registerMongooseDocumentArray = _.registerMongooseDocumentArray;
15153        var x = /\s/, T = /\s+/;
15154        e2.toCollectionName = function(t3, e3) {
15155          if ("system.profile" === t3) return t3;
15156          if ("system.indexes" === t3) return t3;
15157          if ("function" == typeof e3) {
15158            if ("string" != typeof t3) throw new TypeError("Collection name must be a string");
15159            if (0 === t3.length) throw new TypeError("Collection name cannot be empty");
15160            return e3(t3);
15161          }
15162          return t3;
15163        }, e2.deepEqual = function t3(r3, o2) {
15164          if (r3 === o2) return true;
15165          if ("object" !== c(r3) || "object" !== c(o2)) return r3 === o2;
15166          if (r3 instanceof Date && o2 instanceof Date) return r3.getTime() === o2.getTime();
15167          if (w(r3, "ObjectId") && w(o2, "ObjectId") || w(r3, "Decimal128") && w(o2, "Decimal128")) return r3.toString() === o2.toString();
15168          if (r3 instanceof RegExp && o2 instanceof RegExp) return r3.source === o2.source && r3.ignoreCase === o2.ignoreCase && r3.multiline === o2.multiline && r3.global === o2.global && r3.dotAll === o2.dotAll && r3.unicode === o2.unicode && r3.sticky === o2.sticky && r3.hasIndices === o2.hasIndices;
15169          if (null == r3 || null == o2) return false;
15170          if (r3.prototype !== o2.prototype) return false;
15171          if (r3 instanceof Map || o2 instanceof Map) return r3 instanceof Map && o2 instanceof Map && t3(Array.from(r3.keys()), Array.from(o2.keys())) && t3(Array.from(r3.values()), Array.from(o2.values()));
15172          if (r3 instanceof Number && o2 instanceof Number) return r3.valueOf() === o2.valueOf();
15173          if (n.isBuffer(r3)) return e2.buffer.areEqual(r3, o2);
15174          if (Array.isArray(r3) || Array.isArray(o2)) {
15175            if (!Array.isArray(r3) || !Array.isArray(o2)) return false;
15176            var i2 = r3.length;
15177            if (i2 !== o2.length) return false;
15178            for (var s2 = 0; s2 < i2; ++s2) if (!t3(r3[s2], o2[s2])) return false;
15179            return true;
15180          }
15181          null != r3.$__ ? r3 = r3._doc : $(r3) && (r3 = r3.toObject()), null != o2.$__ ? o2 = o2._doc : $(o2) && (o2 = o2.toObject());
15182          var a2 = Object.keys(r3), u2 = Object.keys(o2), l2 = a2.length;
15183          if (l2 !== u2.length) return false;
15184          for (var f2 = l2 - 1; f2 >= 0; f2--) if (a2[f2] !== u2[f2]) return false;
15185          for (var p2 = 0, h2 = a2; p2 < h2.length; p2++) {
15186            var y2 = h2[p2];
15187            if (!t3(r3[y2], o2[y2])) return false;
15188          }
15189          return true;
15190        }, e2.last = function(t3) {
15191          if (t3.length > 0) return t3[t3.length - 1];
15192        }, e2.promiseOrCallback = j, e2.cloneArrays = function(t3) {
15193          return Array.isArray(t3) ? t3.map(function(t4) {
15194            return e2.cloneArrays(t4);
15195          }) : t3;
15196        }, e2.omit = function(t3, e3) {
15197          if (null == e3) return Object.assign({}, t3);
15198          Array.isArray(e3) || (e3 = [e3]);
15199          var r3, n2 = Object.assign({}, t3), o2 = s(e3);
15200          try {
15201            for (o2.s(); !(r3 = o2.n()).done; ) delete n2[r3.value];
15202          } catch (t4) {
15203            o2.e(t4);
15204          } finally {
15205            o2.f();
15206          }
15207          return n2;
15208        }, e2.clonePOJOsAndArrays = function(t3) {
15209          if (null == t3) return t3;
15210          if (null != t3.$__) return t3;
15211          if (O(t3)) {
15212            t3 = (function(t4) {
15213              for (var e3 = 1; e3 < arguments.length; e3++) {
15214                var r4 = null != arguments[e3] ? arguments[e3] : {};
15215                e3 % 2 ? o(Object(r4), true).forEach(function(e4) {
15216                  i(t4, e4, r4[e4]);
15217                }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t4, Object.getOwnPropertyDescriptors(r4)) : o(Object(r4)).forEach(function(e4) {
15218                  Object.defineProperty(t4, e4, Object.getOwnPropertyDescriptor(r4, e4));
15219                });
15220              }
15221              return t4;
15222            })({}, t3);
15223            for (var r3 = 0, n2 = Object.keys(t3); r3 < n2.length; r3++) {
15224              var s2 = n2[r3];
15225              t3[s2] = e2.clonePOJOsAndArrays(t3[s2]);
15226            }
15227            return t3;
15228          }
15229          if (Array.isArray(t3)) {
15230            t3 = (function(t4) {
15231              if (Array.isArray(t4)) return u(t4);
15232            })(l2 = t3) || (function(t4) {
15233              if ("undefined" != typeof Symbol && null != t4[Symbol.iterator] || null != t4["@@iterator"]) return Array.from(t4);
15234            })(l2) || a(l2) || (function() {
15235              throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
15236            })();
15237            for (var c2 = 0; c2 < t3.length; ++c2) t3[c2] = e2.clonePOJOsAndArrays(t3[c2]);
15238            return t3;
15239          }
15240          var l2;
15241          return t3;
15242        }, e2.merge = function t3(r3, n2, o2, i2) {
15243          o2 = o2 || {};
15244          var s2, a2 = Object.keys(n2), u2 = 0, c2 = a2.length;
15245          n2[E] && (r3[E] = n2[E]), i2 = i2 || "";
15246          for (var l2 = o2.omitNested || {}; u2 < c2; ) if (s2 = a2[u2++], !(o2.omit && o2.omit[s2] || l2[i2] || A.has(s2))) if (null == r3[s2]) r3[s2] = e2.clonePOJOsAndArrays(n2[s2]);
15247          else if (e2.isObject(n2[s2])) {
15248            if (e2.isObject(r3[s2]) || (r3[s2] = {}), null != n2[s2]) {
15249              if (o2.isDiscriminatorSchemaMerge && n2[s2].$isSingleNested && r3[s2].$isMongooseDocumentArray || n2[s2].$isMongooseDocumentArray && r3[s2].$isSingleNested) continue;
15250              if (n2[s2].instanceOfSchema) {
15251                r3[s2].instanceOfSchema ? P(r3[s2], n2[s2].clone(), o2.isDiscriminatorSchemaMerge) : r3[s2] = n2[s2].clone();
15252                continue;
15253              }
15254              if (w(n2[s2], "ObjectId")) {
15255                r3[s2] = new y(n2[s2]);
15256                continue;
15257              }
15258            }
15259            t3(r3[s2], n2[s2], o2, i2 ? i2 + "." + s2 : s2);
15260          } else o2.overwrite && (r3[s2] = n2[s2]);
15261          return r3;
15262        }, e2.toObject = function t3(n2) {
15263          var o2;
15264          if (l || (l = r2(2400)), null == n2) return n2;
15265          if (n2 instanceof l) return n2.toObject();
15266          if (Array.isArray(n2)) {
15267            o2 = [];
15268            var i2, a2 = s(n2);
15269            try {
15270              for (a2.s(); !(i2 = a2.n()).done; ) {
15271                var u2 = i2.value;
15272                o2.push(t3(u2));
15273              }
15274            } catch (t4) {
15275              a2.e(t4);
15276            } finally {
15277              a2.f();
15278            }
15279            return o2;
15280          }
15281          if (e2.isPOJO(n2)) {
15282            o2 = {}, n2[E] && (o2[E] = n2[E]);
15283            for (var c2 = 0, f2 = Object.keys(n2); c2 < f2.length; c2++) {
15284              var p2 = f2[c2];
15285              A.has(p2) || (o2[p2] = t3(n2[p2]));
15286            }
15287            return o2;
15288          }
15289          return n2;
15290        }, e2.isObject = v, e2.isPOJO = r2(2789), e2.isNonBuiltinObject = function(t3) {
15291          return !("object" !== c(t3) || e2.isNativeObject(t3) || e2.isMongooseType(t3) || t3 instanceof f || null == t3);
15292        }, e2.isNativeObject = function(t3) {
15293          return Array.isArray(t3) || t3 instanceof Date || t3 instanceof Boolean || t3 instanceof Number || t3 instanceof String;
15294        }, e2.isEmptyObject = function(t3) {
15295          return null != t3 && "object" === c(t3) && 0 === Object.keys(t3).length;
15296        }, e2.hasKey = function(t3, r3) {
15297          for (var n2 = 0, o2 = Object.keys(t3); n2 < o2.length; n2++) {
15298            var i2 = o2[n2];
15299            if (i2 === r3) return true;
15300            if (e2.isPOJO(t3[i2]) && e2.hasKey(t3[i2], r3)) return true;
15301          }
15302          return false;
15303        }, e2.tick = function(t3) {
15304          if ("function" == typeof t3) return function() {
15305            try {
15306              t3.apply(this, arguments);
15307            } catch (t4) {
15308              m(function() {
15309                throw t4;
15310              });
15311            }
15312          };
15313        }, e2.isMongooseType = function(t3) {
15314          return w(t3, "ObjectId") || w(t3, "Decimal128") || t3 instanceof n;
15315        }, e2.isMongooseObject = $, e2.expires = function(t3) {
15316          t3 && "Object" === t3.constructor.name && "expires" in t3 && (t3.expireAfterSeconds = "string" != typeof t3.expires ? t3.expires : Math.round(p(t3.expires) / 1e3), delete t3.expires);
15317        }, e2.populate = function(t3, r3, n2, o2, i2, a2, u2, l2) {
15318          var f2, p2 = null;
15319          if (1 === arguments.length) {
15320            if (t3 instanceof d) return t3._docs = {}, t3._childDocs = [], [t3];
15321            if (Array.isArray(t3)) {
15322              var h2 = (f2 = [], t3.forEach(function(t4) {
15323                x.test(t4.path) ? t4.path.split(T).forEach(function(e3) {
15324                  var r4 = Object.assign({}, t4);
15325                  r4.path = e3, f2.push(r4);
15326                }) : f2.push(t4);
15327              }), f2);
15328              return h2.map(function(t4) {
15329                return e2.populate(t4)[0];
15330              });
15331            }
15332            p2 = e2.isObject(t3) ? Object.assign({}, t3) : { path: t3 };
15333          } else p2 = "object" === c(n2) ? { path: t3, select: r3, match: n2, options: o2 } : { path: t3, select: r3, model: n2, match: o2, options: i2, populate: a2, justOne: u2, count: l2 };
15334          if (!("string" == typeof p2.path || Array.isArray(p2.path) && p2.path.every(function(t4) {
15335            return "string" == typeof t4;
15336          }))) throw new TypeError("utils.populate: invalid path. Expected string or array of strings. Got typeof `" + c(t3) + "`");
15337          return (function(t4) {
15338            if (Array.isArray(t4.populate)) {
15339              var r4 = [];
15340              t4.populate.forEach(function(t5) {
15341                if (x.test(t5.path)) {
15342                  var n4 = Object.assign({}, t5);
15343                  n4.path.split(T).forEach(function(t6) {
15344                    n4.path = t6, r4.push(e2.populate(n4)[0]);
15345                  });
15346                } else r4.push(e2.populate(t5)[0]);
15347              }), t4.populate = e2.populate(r4);
15348            } else null != t4.populate && "object" === c(t4.populate) && (t4.populate = e2.populate(t4.populate));
15349            var n3 = [], o3 = x.test(t4.path) ? t4.path.split(T) : Array.isArray(t4.path) ? t4.path : [t4.path];
15350            null != t4.options && (t4.options = b(t4.options));
15351            var i3, a3 = s(o3);
15352            try {
15353              for (a3.s(); !(i3 = a3.n()).done; ) {
15354                var u3 = i3.value;
15355                n3.push(new d(Object.assign({}, t4, { path: u3 }
15355)));
15356              }
15357            } catch (t5) {
15358              a3.e(t5);
15359            } finally {
15360              a3.f();
15361            }
15362            return n3;
15363          })(p2);
15364        }, e2.getValue = function(t3, e3, r3) {
15365          return h.get(t3, e3, N, r3);
15366        };
15367        var k = Object.freeze({ getters: false });
15368        function N(t3, e3) {
15369          if ("$*" === e3 && t3 instanceof Map) return t3;
15370          var r3 = (null == t3 ? void 0 : t3._doc) || t3;
15371          return null != r3 && r3.isMongooseArrayProxy && (r3 = r3.__array), r3 instanceof Map ? r3.get(e3, k) : r3[e3];
15372        }
15373        e2.setValue = function(t3, e3, r3, n2, o2) {
15374          h.set(t3, e3, r3, "_doc", n2, o2);
15375        }, e2.object = {}, e2.object.vals = function(t3) {
15376          for (var e3 = Object.keys(t3), r3 = e3.length, n2 = []; r3--; ) n2.push(t3[e3[r3]]);
15377          return n2;
15378        };
15379        var I = Object.prototype.hasOwnProperty;
15380        e2.object.hasOwnProperty = function(t3, e3) {
15381          return I.call(t3, e3);
15382        }, e2.isNullOrUndefined = function(t3) {
15383          return null == t3;
15384        }, e2.array = {}, e2.array.flatten = function t3(e3, r3, n2) {
15385          return n2 || (n2 = []), e3.forEach(function(e4) {
15386            Array.isArray(e4) ? t3(e4, r3, n2) : r3 && !r3(e4) || n2.push(e4);
15387          }), n2;
15388        };
15389        var B = Object.prototype.hasOwnProperty;
15390        e2.hasUserDefinedProperty = function(t3, r3) {
15391          if (null == t3) return false;
15392          if (Array.isArray(r3)) {
15393            var n2, o2 = s(r3);
15394            try {
15395              for (o2.s(); !(n2 = o2.n()).done; ) {
15396                var i2 = n2.value;
15397                if (e2.hasUserDefinedProperty(t3, i2)) return true;
15398              }
15399            } catch (t4) {
15400              o2.e(t4);
15401            } finally {
15402              o2.f();
15403            }
15404            return false;
15405          }
15406          if (B.call(t3, r3)) return true;
15407          if ("object" === c(t3) && r3 in t3) {
15408            var a2 = t3[r3];
15409            return a2 !== Object.prototype[r3] && a2 !== Array.prototype[r3];
15410          }
15411          return false;
15412        };
15413        var M = Math.pow(2, 32) - 1;
15414        e2.isArrayIndex = function(t3) {
15415          return "number" == typeof t3 ? t3 >= 0 && t3 <= M : "string" == typeof t3 && !!/^\d+$/.test(t3) && (t3 = +t3) >= 0 && t3 <= M;
15416        }, e2.array.unique = function(t3) {
15417          var e3, r3 = /* @__PURE__ */ new Set(), n2 = /* @__PURE__ */ new Set(), o2 = [], i2 = s(t3);
15418          try {
15419            for (i2.s(); !(e3 = i2.n()).done; ) {
15420              var a2 = e3.value;
15421              if ("number" == typeof a2 || "string" == typeof a2 || null == a2) {
15422                if (r3.has(a2)) continue;
15423                o2.push(a2), r3.add(a2);
15424              } else if (w(a2, "ObjectId")) {
15425                if (n2.has(a2.toString())) continue;
15426                o2.push(a2), n2.add(a2.toString());
15427              } else o2.push(a2);
15428            }
15429          } catch (t4) {
15430            i2.e(t4);
15431          } finally {
15432            i2.f();
15433          }
15434          return o2;
15435        }, e2.buffer = {}, e2.buffer.areEqual = function(t3, e3) {
15436          if (!n.isBuffer(t3)) return false;
15437          if (!n.isBuffer(e3)) return false;
15438          if (t3.length !== e3.length) return false;
15439          for (var r3 = 0, o2 = t3.length; r3 < o2; ++r3) if (t3[r3] !== e3[r3]) return false;
15440          return true;
15441        }, e2.getFunctionName = S, e2.decorate = function(t3, e3) {
15442          for (var r3 in e3) A.has(r3) || (t3[r3] = e3[r3]);
15443        }, e2.mergeClone = function(t3, r3) {
15444          $(r3) && (r3 = r3.toObject({ transform: false, virtuals: false, depopulate: true, getters: false, flattenDecimals: false }));
15445          for (var o2, i2 = Object.keys(r3), s2 = i2.length, a2 = 0; a2 < s2; ) if (o2 = i2[a2++], !A.has(o2)) if (void 0 === t3[o2]) t3[o2] = b(r3[o2], { transform: false, virtuals: false, depopulate: true, getters: false, flattenDecimals: false });
15446          else {
15447            var u2 = r3[o2];
15448            if (null == u2 || !u2.valueOf || u2 instanceof Date || (u2 = u2.valueOf()), e2.isObject(u2)) {
15449              var c2 = u2;
15450              $(u2) && !u2.isMongooseBuffer && (c2 = c2.toObject({ transform: false, virtuals: false, depopulate: true, getters: false, flattenDecimals: false })), u2.isMongooseBuffer && (c2 = n.from(c2)), e2.mergeClone(t3[o2], c2);
15451            } else t3[o2] = b(u2, { flattenDecimals: false });
15452          }
15453        }, e2.each = function(t3, e3) {
15454          var r3, n2 = s(t3);
15455          try {
15456            for (n2.s(); !(r3 = n2.n()).done; ) e3(r3.value);
15457          } catch (t4) {
15458            n2.e(t4);
15459          } finally {
15460            n2.f();
15461          }
15462        }, e2.renameObjKey = function(t3, e3, r3) {
15463          return Object.keys(t3).reduce(function(n2, o2) {
15464            return o2 === e3 ? n2[r3] = t3[e3] : n2[o2] = t3[o2], n2;
15465          }, {});
15466        }, e2.getOption = function(t3) {
15467          var e3, r3 = s(Array.prototype.slice.call(arguments, 1));
15468          try {
15469            for (r3.s(); !(e3 = r3.n()).done; ) {
15470              var n2 = e3.value;
15471              if (null != n2 && null != n2[t3]) return n2[t3];
15472            }
15473          } catch (t4) {
15474            r3.e(t4);
15475          } finally {
15476            r3.f();
15477          }
15478          return null;
15479        }, e2.noop = function() {
15480        }, e2.errorToPOJO = function(t3) {
15481          if (!(t3 instanceof Error)) throw new Error("`error` must be `instanceof Error`.");
15482          var e3, r3 = {}, n2 = s(Object.getOwnPropertyNames(t3));
15483          try {
15484            for (n2.s(); !(e3 = n2.n()).done; ) {
15485              var o2 = e3.value;
15486              r3[o2] = t3[o2];
15487            }
15488          } catch (t4) {
15489            n2.e(t4);
15490          } finally {
15491            n2.f();
15492          }
15493          return r3;
15494        }, e2.warn = function(t3) {
15495          return { env: {} }.emitWarning(t3, { code: "MONGOOSE" });
15496        }, e2.injectTimestampsOption = function(t3, e3) {
15497          null != e3 && (t3.timestamps = e3);
15498        };
15499      }, 8863: (t2, e2, r2) => {
15500        var n = r2(2354), o = r2(2268), i = r2(3123), s = r2(5477);
15501        t2.exports = function(t3) {
15502          if (t3.length < 1 || "function" != typeof t3[0]) throw new o("a function is required");
15503          return s(n, i, t3);
15504        };
15505      }, 8866: (t2, e2, r2) => {
15506        function n(t3) {
15507          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
15508            return typeof t4;
15509          } : function(t4) {
15510            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
15511          }, n(t3);
15512        }
15513        function o(t3, e3) {
15514          for (var r3 = 0; r3 < e3.length; r3++) {
15515            var n2 = e3[r3];
15516            n2.enumerable = n2.enumerable || false, n2.configurable = true, "value" in n2 && (n2.
15516writable = true), Object.defineProperty(t3, i(n2.key), n2);
15517          }
15518        }
15519        function i(t3) {
15520          var e3 = (function(t4) {
15521            if ("object" != n(t4) || !t4) return t4;
15522            var e4 = t4[Symbol.toPrimitive];
15523            if (void 0 !== e4) {
15524              var r3 = e4.call(t4, "string");
15525              if ("object" != n(r3)) return r3;
15526              throw new TypeError("@@toPrimitive must return a primitive value.");
15527            }
15528            return String(t4);
15529          })(t3);
15530          return "symbol" == n(e3) ? e3 : e3 + "";
15531        }
15532        function s() {
15533          try {
15534            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
15535            }));
15536          } catch (t4) {
15537          }
15538          return (s = function() {
15539            return !!t3;
15540          })();
15541        }
15542        function a() {
15543          return a = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function(t3, e3, r3) {
15544            var n2 = (function(t4, e4) {
15545              for (; !{}.hasOwnProperty.call(t4, e4) && null !== (t4 = u(t4)); ) ;
15546              return t4;
15547            })(t3, e3);
15548            if (n2) {
15549              var o2 = Object.getOwnPropertyDescriptor(n2, e3);
15550              return o2.get ? o2.get.call(arguments.length < 3 ? t3 : r3) : o2.value;
15551            }
15552          }, a.apply(null, arguments);
15553        }
15554        function u(t3) {
15555          return u = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
15556            return t4.__proto__ || Object.getPrototypeOf(t4);
15557          }, u(t3);
15558        }
15559        function c(t3, e3) {
15560          return c = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
15561            return t4.__proto__ = e4, t4;
15562          }, c(t3, e3);
15563        }
15564        var l = r2(6974), f = r2(6426), p = Symbol("firstValue"), h = (function(t3) {
15565          function e3(t4, r4) {
15566            var o2, i3 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
15567            if ((function(t5, e4) {
15568              if (!(t5 instanceof e4)) throw new TypeError("Cannot call a class as a function");
15569            })(this, e3), o2 = (function(t5, e4, r5) {
15570              return e4 = u(e4), (function(t6, e5) {
15571                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
15572                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
15573                return (function(t7) {
15574                  if (void 0 === t7) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
15575                  return t7;
15576                })(t6);
15577              })(t5, s() ? Reflect.construct(e4, r5 || [], u(t5).constructor) : e4.apply(t5, r5));
15578            })(this, e3, [t4, r4, "Union"]), !r4 || !Array.isArray(r4.of) || 0 === r4.of.length) throw new Error("Union schema type requires an array of types");
15579            return o2.schemaTypes = r4.of.map(function(e4) {
15580              return r4.parentSchema.interpretAsType(t4, e4, i3);
15581            }), o2;
15582          }
15583          return (function(t4, e4) {
15584            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
15585            t4.prototype = Object.create(e4 && e4.prototype, { constructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && c(t4, e4);
15586          })(e3, t3), r3 = e3, i2 = [{ key: "cast", value: function(t4, e4, r4, n2, o2) {
15587            for (var i3, s2 = p, a2 = 0; a2 < this.schemaTypes.length; ++a2) try {
15588              var u2 = this.schemaTypes[a2].cast(t4, e4, r4, n2, o2);
15589              if (u2 === t4) return u2;
15590              s2 === p && (s2 = u2);
15591            } catch (t5) {
15592              i3 = t5;
15593            }
15594            if (s2 !== p) return s2;
15595            throw i3;
15596          } }, { key: "applySetters", value: function(t4, e4, r4, n2, o2) {
15597            for (var i3, s2 = p, a2 = 0; a2 < this.schemaTypes.length; ++a2) try {
15598              var u2 = this.schemaTypes[a2]._applySetters(t4, e4, r4, n2, o2);
15599              if ((u2 = null == u2 ? this.schemaTypes[a2]._castNullish(u2) : this.schemaTypes[a2].cast(u2, e4, r4, n2, o2)) === t4) return u2;
15600              s2 === p && (s2 = u2);
15601            } catch (t5) {
15602              i3 = t5;
15603            }
15604            if (s2 !== p) return s2;
15605            throw i3;
15606          } }, { key: "clone", value: function() {
15607            var t4, r4, n2, o2 = (t4 = e3, r4 = this, "function" == typeof (n2 = a(u(t4.prototype), "clone", r4)) ? function(t5) {
15608              return n2.apply(r4, t5);
15609            } : n2)([]);
15610            return o2.schemaTypes = this.schemaTypes.map(function(t5) {
15611              return t5.clone();
15612            }), o2;
15613          } }], i2 && o(r3.prototype, i2), Object.defineProperty(r3, "prototype", { writable: false }), r3;
15614          var r3, i2;
15615        })(f);
15616        h.schemaName = "Union", h.defaultOptions = {}, h.prototype.OptionsConstructor = l, t2.exports = h;
15617      }, 8879: (t2, e2, r2) => {
15618        function i(t3, e3, r3) {
15619          return Object.defineProperty(t3, "prototype", { writable: false }), t3;
15620        }
15621        var a = r2(4450), u = i(function t3(e3) {
15622          if ((function(t4, e4) {
15623            if (!(t4 instanceof e4)) throw new TypeError("Cannot call a class as a function");
15624          })(this, t3), null == e3) return this;
15625          Object.assign(this, a(e3));
15626        }), c = r2(5761);
15627        Object.defineProperty(u.prototype, "type", c), Object.defineProperty(u.prototype, "validate", c), Object.defineProperty(u.prototype, "cast", c), Object.defineProperty(u.prototype, "required", c), Object.defineProperty(u.prototype, "default", c), Object.defineProperty(u.prototype, "ref", c), Object.defineProperty(u.prototype, "refPath", c), Object.defineProperty(u.prototype, "select", c), Object.defineProperty(u.prototype, "index", c), Object.defineProperty(u.prototype, "unique", c), Object.defineProperty(u.prototype, "immutable", c), Object.defineProperty(u.prototype, "sparse", c), Object.defineProperty(u.prototype, "text", c), Object.defineProperty(u.prototype, "transform", c), t2.exports = u;
15628      }, 8920: (t2, e2, r2) => {
15629        var n = r2(5832).hp;
15630        function o(t3) {
15631          return o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
15632            return typeof t4;
15633          } : function(t4) {
15634            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
15635          }, o(t3);
15636        }
15637        function i(t3, e3) {
15638          var r3 = "undefined" != typeof Symbol && t3[Symbol.iterator] || t3["@@iterator"];
15639          if (!r3) {
15640            if (Array.isArray(t3) || (r3 = s(t3)) || e3) {
15641              r3 && (t3 = r3);
15642              var n2 = 0, o2 = function() {
15643              };
15644              return { s: o2, n: function() {
15645                return n2 >= t3.length ? { done: true } : { done: false, value: t3[n2++] };
15646              }, e: function(t4) {
15647                throw t4;
15648              }, f: o2 };
15649            }
15650            throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
15651          }
15652          var i2, a2 = true, u2 = false;
15653          return { s: function() {
15654            r3 = r3.call(t3);
15655          }, n: function() {
15656            var t4 = r3.next();
15657            return a2 = t4.done, t4;
15658          }, e: function(t4) {
15659            u2 = true, i2 = t4;
15660          }, f: function() {
15661            try {
15662              a2 || null == r3.return || r3.return();
15663            } finally {
15664              if (u2) throw i2;
15665            }
15666          } };
15667        }
15668        function s(t3, e3) {
15669          if (t3) {
15670            if ("string" == typeof t3) return a(t3, e3);
15671            var r3 = {}.toString.call(t3).slice(8, -1);
15672            return "Object" === r3 && t3.constructor && (r3 = t3.constructor.name), "Map" === r3 || "Set" === r3 ? Array.from(t3) : "Arguments" === r3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r3) ? a(t3, e3) : void 0;
15673          }
15674        }
15675        function a(t3, e3) {
15676          (null == e3 || e3 > t3.length) && (e3 = t3.length);
15677          for (var r3 = 0, n2 = Array(e3); r3 < e3; r3++) n2[r3] = t3[r3];
15678          return n2;
15679        }
15680        var u = r2(2400), c = r2(6547), l = r2(8213), f = r2(4473), p = r2(4450), h = r2(3303)._, y = r2(5678), d = r2(8768), b = r2(3305), m = r2(7930).arrayAtomicsSymbol, v = r2(7930).arrayParentSymbol, g = r2(7930).arrayPathSymbol, _ = r2(7930).arraySchemaSymbol, w = r2(7930).populateModelSymbol, O = Symbol("mongoose#Array#sliced"), S = Array.prototype.push, $ = { $__getAtomics: function() {
15681          var t3 = [], e3 = Object.keys(this[m] || {}), r3 = e3.length, n2 = Object.assign({}, h, { _isNested: true });
15682          if (0 === r3) return t3[0] = ["$set", this.toObject(n2)], t3;
15683          for (; r3--; ) {
15684            var o2 = e3[r3], i2 = this[m][o2];
15685            d.isMongooseObject(i2) ? i2 = i2.toObject(n2) : Array.isArray(i2) ? i2 = this.toObject.call(i2, n2) : null != i2 && Array.isArray(i2.$each) ? i2.$each = this.toObject.call(i2.$each, n2) : null != i2 && "function" == typeof i2.valueOf && (i2 = i2.valueOf()), "$addToSet" === o2 && (i2 = { $each: i2 }), t3.push([o2, i2]);
15686          }
15687          return t3;
15688        }, $atomics: function() {
15689          return this[m];
15690        }, $parent: function() {
15691          return this[v];
15692        }, $path: function() {
15693          return this[g];
15694        }, $shift: function() {
15695          this._registerAtomic("$pop", -1), this._markModified();
15696          var t3 = this.__array;
15697          if (!t3._shifted) return t3._shifted = true, [].shift.call(t3);
15698        }, $pop: function() {
15699          if (this._registerAtomic("$pop", 1), this._markModified(), !this._popped) return this._popped = true, [].pop.call(this);
15700        }, $schema: function() {
15701          return this[_];
15702        }, _cast: function(t3) {
15703          var e3, r3 = false, o2 = this[v];
15704          if (o2 && (r3 = o2.$populated(this[g], true)), r3 && null != t3) {
15705            if (null == (e3 = r3.options[w])) throw new l("No populated model found for path `" + this[g] + "`. This is likely a bug in Mongoose, please report an issue on github.com/Automattic/mongoose.");
15706            return (n.isBuffer(t3) || b(t3, "ObjectId") || !d.isObject(t3)) && (t3 = { _id: t3 }), t3.schema && t3.schema.discriminatorMapping && void 0 !== t3.schema.discriminatorMapping.key || (t3 = new e3(t3)), this[_].caster.applySetters(t3, o2, true);
15707          }
15708          return this[_].caster.applySetters(t3, o2, false);
15709        }, _mapCast: function(t3, e3) {
15710          return this._cast(t3, this.length + e3);
15711        }, _markModified: function(t3) {
15712          var e3, r3 = this[v];
15713          if (r3) {
15714            if (e3 = this[g], arguments.length && (e3 = e3 + "." + t3), null != e3 && e3.endsWith(".$")) return this;
15715            r3.markModified(e3, 0 !== arguments.length ? t3 : r3);
15716          }
15717          return this;
15718        }, _registerAtomic: function(t3, e3) {
15719          if (!this[O]) {
15720            if ("$set" === t3) return this[m] = { $set: e3 }, f(this[v], this[g]), this._markModified(), this;
15721            var r3, n2 = this[m];
15722            if ("$pop" === t3 && !("$pop" in n2)) {
15723              var o2 = this;
15724              this[v].once("save", function() {
15725                o2._popped = o2._shifted = null;
15726              });
15727            }
15728            if (n2.$set || Object.keys(n2).length && !(t3 in n2)) return this[m] = { $set: this }, this;
15729            if ("$pullAll" === t3 || "$addToSet" === t3) n2[t3] || (n2[t3] = []), n2[t3] = n2[t3].concat(e3);
15730            else if ("$pullDocs" === t3) {
15731              var u2 = n2.$pull || (n2.$pull = {});
15732              e3[0] instanceof c ? (r3 = u2.$or || (u2.$or = []), Array.prototype.push.apply(r3, e3.map(function(t4) {
15733                return t4.toObject({ transform: function(e4, r4) {
15734                  return null == t4 || null == t4.$__ || Object.keys(t4.$__.activePaths.getStatePaths("default")).forEach(function(t5) {
15735                    y.unset(t5, r4), j(r4, t5);
15736                  }), r4;
15737                }, virtuals: false });
15738              }))) : (r3 = u2._id || (u2._id = { $in: [] })).$in = r3.$in.concat(e3);
15739            } else if ("$push" === t3) if (n2.$push = n2.$push || { $each: [] }, null != e3 && d.hasUserDefinedProperty(e3, "$each")) n2.$push = e3;
15740            else if (1 === e3.length) n2.$push.$each.push(e3[0]);
15741            else if (e3.length < 1e4) {
15742              var l2;
15743              (l2 = n2.$push.$each).push.apply(l2, (function(t4) {
15744                if (Array.isArray(t4)) return a(t4);
15745              })(_2 = e3) || (function(t4) {
15746                if ("undefined" != typeof Symbol && null != t4[Symbol.iterator] || null != t4["@@iterator"]) return Array.from(t4);
15747              })(_2) || s(_2) || (function() {
15748                throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
15749              })());
15750            } else {
15751              var p2, h2 = i(e3);
15752              try {
15753                for (h2.s(); !(p2 = h2.n()).done; ) {
15754                  var b2 = p2.value;
15755                  n2.$push.$each.push(b2);
15756                }
15757              } catch (t4) {
15758                h2.e(t4);
15759              } finally {
15760                h2.f();
15761              }
15762            }
15763            else n2[t3] = e3;
15764            return this;
15765          }
15766          var _2;
15767        }, addToSet: function() {
15768          P(this, arguments), A(this, arguments);
15769          var t3 = [].map.call(arguments, this._mapCast, this), e3 = [], r3 = "";
15770          t3[0] instanceof c ? r3 = "doc" : t3[0] instanceof Date ? r3 = "date" : b(t3[0], "ObjectId") && (r3 = "ObjectId");
15771          var n2 = d.isMongooseArray(t3) ? t3.__array : t3, o2 = d.isMongooseArray(this) ? this.__array : this;
15772          return n2.forEach(function(t4) {
15773            var n3, i2 = +t4;
15774            switch (r3) {
15775              case "doc":
15776                n3 = this.some(function(e4) {
15777                  return e4.equals(t4);
15778                });
15779                break;
15780              case "date":
15781                n3 = this.some(function(t5) {
15782                  return +t5 === i2;
15783                });
15784                break;
15785              case "ObjectId":
15786                n3 = this.find(function(e4) {
15787                  return e4.toString() === t4.toString();
15788                });
15789                break;
15790              default:
15791                n3 = ~this.indexOf(t4);
15792            }
15793            n3 || (this._markModified(), o2.push(t4), this._registerAtomic("$addToSet", t4), [].push.call(e3, t4));
15794          }, this), e3;
15795        }, hasAtomics: function() {
15796          return d.isPOJO(this[m]) ? Object.keys(this[m]).length : 0;
15797        }, includes: function(t3, e3) {
15798          return -1 !== this.indexOf(t3, e3);
15799        }, indexOf: function(t3, e3) {
15800          b(t3, "ObjectId") && (t3 = t3.toString()), e3 = null == e3 ? 0 : e3;
15801          for (var r3 = this.length, n2 = e3; n2 < r3; ++n2) if (t3 == this[n2]) return n2;
15802          return -1;
15803        }, inspect: function() {
15804          return JSON.stringify(this);
15805        }, nonAtomicPush: function() {
15806          var t3 = [].map.call(arguments, this._mapCast, this);
15807          this._markModified();
15808          var e3 = [].push.apply(this, t3);
15809          return this._registerAtomic("$set", this), e3;
15810        }, pop: function() {
15811          this._markModified();
15812          var t3 = [].pop.call(this);
15813          return this._registerAtomic("$set", this), t3;
15814        }, pull: function() {
15815          var t3 = this, e3 = [].map.call(arguments, function(e4, r4) {
15816            return t3._cast(e4, r4, { defaults: false });
15817          }, this), r3 = this[v].get(this[g]);
15818          d.isMongooseArray(r3) && (r3 = r3.__array);
15819          var n2, o2 = r3.length;
15820          for (this._markModified(); o2--; ) (n2 = r3[o2]) instanceof u ? e3.some(function(t4) {
15821            return n2.equals(t4);
15822          }) && r3.splice(o2, 1) : ~this.indexOf.call(e3, n2) && r3.splice(o2, 1);
15823          return e3[0] instanceof c ? this._registerAtomic("$pullDocs", e3.map(function(t4) {
15824            var e4 = t4.$__getValue("_id");
15825            return void 0 === e4 || t4.$isDefault("_id") ? t4 : e4;
15826          })) : this._registerAtomic("$pullAll", e3), f(this[v], this[g]) > 0 && this._registerAtomic("$set", this), this;
15827        }, push: function() {
15828          var t3, e3 = arguments, r3 = e3, n2 = null != e3[0] && d.hasUserDefinedProperty(e3[0], "$each"), o2 = d.isMongooseArray(this) ? this.__array : this;
15829          if (n2 && (r3 = e3[0], e3 = e3[0].$each), null == this[_]) return S.apply(this, e3);
15830          P(this, e3), A(this, e3), e3 = [].map.call(e3, this._mapCast, this);
15831          var i2 = this[m];
15832          return this._markModified(), n2 ? (r3.$each = e3, 0 !== (i2.$push && i2.$push.$each && i2.$push.$each.length || 0) && i2.$push.$position != r3.$position ? (null != r3.$position ? ([].splice.apply(o2, [r3.$position, 0].concat(e3)), t3 = o2.length) : t3 = [].push.apply(o2, e3), this._registerAtomic("$set", this)) : null != r3.$position ? ([].splice.apply(o2, [r3.$position, 0].concat(e3)), t3 = this.length) : t3 = [].push.apply(o2, e3)) : (r3 = e3, t3 = S.apply(o2, e3)), this._registerAtomic("$push", r3), t3;
15833        }, remove: function() {
15834          return this.pull.apply(this, arguments);
15835        }, set: function(t3, e3, r3) {
15836          var n2 = this.__array;
15837          if (r3) return n2[t3] = e3, this;
15838          var o2 = $._cast.call(this, e3, t3);
15839          return $._markModified.call(this, t3), n2[t3] = o2, this;
15840        }, shift: function() {
15841          var t3 = d.isMongooseArray(this) ? this.__array : this;
15842          this._markModified();
15843          var e3 = [].shift.call(t3);
15844          return this._registerAtomic("$set", this), e3;
15845        }, sort: function() {
15846          var t3 = d.isMongooseArray(this) ? this.__array : this, e3 = [].sort.apply(t3, arguments);
15847          return this._registerAtomic("$set", this), e3;
15848        }, splice: function() {
15849          var t3, e3 = d.isMongooseArray(this) ? this.__array : this;
15850          if (this._markModified(), P(this, Array.prototype.slice.call(arguments, 2)), arguments.length) {
15851            var r3;
15852            if (null == this[_]) r3 = arguments;
15853            else {
15854              r3 = [];
15855              for (var n2 = 0; n2 < arguments.length; ++n2) r3[n2] = n2 < 2 ? arguments[n2] : this._cast(arguments[n2], arguments[0] + (n2 - 2));
15856            }
15857            t3 = [].splice.apply(e3, r3), this._registerAtomic("$set", this);
15858          }
15859          return t3;
15860        }, toBSON: function() {
15861          return this.toObject(h);
15862        }, toObject: function(t3) {
15863          var e3 = d.isMongooseArray(this) ? this.__array : this;
15864          return t3 && t3.depopulate ? ((t3 = p(t3))._isNested = true, [].concat(e3).map(function(e4) {
15865            return e4 instanceof u ? e4.toObject(t3) : e4;
15866          })) : [].concat(e3);
15867        }, $toObject: function() {
15868          return this.constructor.prototype.toObject.apply(this, arguments);
15869        }, unshift: function() {
15870          var t3;
15871          P(this, arguments), t3 = null == this[_] ? arguments : [].map.call(arguments, this._cast, this);
15872          var e3 = d.isMongooseArray(this) ? this.__array : this;
15873          return this._markModified(), [].unshift.apply(e3, t3), this._registerAtomic("$set", this), this.length;
15874        } };
15875        function j(t3, e3, r3) {
15876          if ("string" == typeof e3) {
15877            if (-1 === e3.indexOf(".")) return;
15878            e3 = y.stringToParts(e3);
15879          }
15880          (r3 = r3 || 0) >= e3.length || null != t3 && "object" === o(t3) && (j(t3[e3[0]], e3, r3 + 1), null != t3[e3[0]] && "object" === o(t3[e3[0]]) && 0 === Object.keys(t3[e3[0]]).length && delete t3[e3[0]]);
15881        }
15882        function P(t3, e3) {
15883          var r3, n2, s2, a2 = null == t3 ? null : t3[_] && t3[_].caster && t3[_].caster.options && t3[_].caster.options.ref || null;
15884          0 === t3.length && 0 !== e3.length && (function(t4, e4) {
15885            if (!e4) return false;
15886            var r4, n3 = i(t4);
15887            try {
15888              for (n3.s(); !(r4 = n3.n()).done; ) {
15889                var o2 = r4.value;
15890                if (null == o2) return false;
15891                var s3 = o2.constructor;
15892                if (!(o2 instanceof u) || s3.modelName !== e4 && s3.baseModelName !== e4) return false;
15893              }
15894            } catch (t5) {
15895              n3.e(t5);
15896            } finally {
15897              n3.f();
15898            }
15899            return true;
15900          })(e3, a2) && t3[v].$populated(t3[g], [], (r3 = {}, n2 = w, s2 = e3[0].constructor, (n2 = (function(t4) {
15901            var e4 = (function(t5) {
15902              if ("object" != o(t5) || !t5) return t5;
15903              var e5 = t5[Symbol.toPrimitive];
15904              if (void 0 !== e5) {
15905                var r4 = e5.call(t5, "string");
15906                if ("object" != o(r4)) return r4;
15907                throw new TypeError("@@toPrimitive must return a primitive value.");
15908              }
15909              return String(t5);
15910            })(t4);
15911            return "symbol" == o(e4) ? e4 : e4 + "";
15912          })(n2)) in r3 ? Object.defineProperty(r3, n2, { value: s2, enumerable: true, configurable: true, writable: true }) : r3[n2] = s2, r3));
15913        }
15914        function A(t3, e3) {
15915          var r3 = null == t3 ? null : t3[_] && t3[_].caster && t3[_].caster.options && t3[_].caster.options.ref || null, s2 = t3[v], a2 = t3[g];
15916          if (r3 && s2.populated(a2)) {
15917            var u2, c2 = i(e3);
15918            try {
15919              for (c2.s(); !(u2 = c2.n()).done; ) {
15920                var l2 = u2.value;
15921                if (null != l2 && ("object" !== o(l2) || l2 instanceof String || l2 instanceof Number || l2 instanceof n || d.isMongooseType(l2))) {
15922                  s2.depopulate(a2);
15923                  break;
15924                }
15925              }
15926            } catch (t4) {
15927              c2.e(t4);
15928            } finally {
15929              c2.f();
15930            }
15931          }
15932        }
15933        for (var E = function() {
15934          var t3 = T[x];
15935          if (null == Array.prototype[t3]) return 1;
15936          $[t3] = function() {
15937            var e3 = d.isMongooseArray(this) ? this.__array : this, r3 = [].concat(e3);
15938            return r3[t3].apply(r3, arguments);
15939          };
15940        }, x = 0, T = ["filter", "flat", "flatMap", "map", "slice"]; x < T.length; x++) E();
15941        t2.exports = $;
15942      }, 8953: (t2, e2, r2) => {
15943        var n = r2(3609);
15944        t2.exports = function(e3, r3) {
15945          if (t2.exports.convertToTrue.has(e3)) return true;
15946          if (t2.exports.convertToFalse.has(e3)) return false;
15947          if (null == e3) return e3;
15948          throw new n("boolean", e3, r3);
15949        }, t2.exports.convertToTrue = /* @__PURE__ */ new Set([true, "true", 1, "1", "yes"]), t2.exports.convertToFalse = /* @__PURE__ */ new Set([false, "false", 0, "0", "no"]);
15950      }, 8995: (t2, e2, r2) => {
15951        function n(t3) {
15952          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
15953            return typeof t4;
15954          } : function(t4) {
15955            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
15956          }, n(t3);
15957        }
15958        function o() {
15959          try {
15960            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
15961            }));
15962          } catch (t4) {
15963          }
15964          return (o = function() {
15965            return !!t3;
15966          })();
15967        }
15968        function i(t3) {
15969          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
15970            return t4.__proto__ || Object.getPrototypeOf(t4);
15971          }, i(t3);
15972        }
15973        function s(t3, e3) {
15974          return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
15975            return t4.__proto__ = e4, t4;
15976          }, s(t3, e3);
15977        }
15978        var a = (function(t3) {
15979          function e3(t4, r4, s2) {
15980            var a2;
15981            return (function(t5, e4) {
15982              if (!(t5 instanceof e4)) throw new TypeError("Cannot call a class as a function");
15983            })(this, e3), (a2 = (function(t5, e4, r5) {
15984              return e4 = i(e4), (function(t6, e5) {
15985                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
15986                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
15987                return (function(t7) {
15988                  if (void 0 === t7) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
15989                  return t7;
15990                })(t6);
15991              })(t5, o() ? Reflect.construct(e4, r5 || [], i(t5).constructor) : e4.apply(t5, r5));
15992            })(this, e3, [r4 = r4 || "Field `" + t4 + "` is not in schema and strict mode is set to throw."])).isImmutableError = !!s2, a2.path = t4, a2;
15993          }
15994          return (function(t4, e4) {
15995            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
15996            t4.prototype = Object.create(e4 && e4.prototype, { c
15996onstructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && s(t4, e4);
15997          })(e3, t3), r3 = e3, Object.defineProperty(r3, "prototype", { writable: false }), r3;
15998          var r3;
15999        })(r2(8213));
16000        Object.defineProperty(a.prototype, "name", { value: "StrictModeError" }), t2.exports = a;
16001      }, 9064: (t2, e2, r2) => {
16002        function n(t3) {
16003          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
16004            return typeof t4;
16005          } : function(t4) {
16006            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
16007          }, n(t3);
16008        }
16009        var o = r2(3609), i = r2(8953), s = r2(1244);
16010        t2.exports = function(t3, e3) {
16011          if (null == t3 || "object" !== n(t3)) throw new o("$text", t3, e3);
16012          return null != t3.$search && (t3.$search = s(t3.$search, e3 + ".$search")), null != t3.$language && (t3.$language = s(t3.$language, e3 + ".$language")), null != t3.$caseSensitive && (t3.$caseSensitive = i(t3.$caseSensitive, e3 + ".$castSensitive")), null != t3.$diacriticSensitive && (t3.$diacriticSensitive = i(t3.$diacriticSensitive, e3 + ".$diacriticSensitive")), t3;
16013        };
16014      }, 9068: (t2, e2, r2) => {
16015        function n(t3) {
16016          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
16017            return typeof t4;
16018          } : function(t4) {
16019            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
16020          }, n(t3);
16021        }
16022        function o(t3, e3, r3) {
16023          return e3 in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
16024        }
16025        function i(t3, e3) {
16026          for (var r3 = 0; r3 < e3.length; r3++) {
16027            var n2 = e3[r3];
16028            n2.enumerable = n2.enumerable || false, n2.configurable = true, "value" in n2 && (n2.writable = true), Object.defineProperty(t3, n2.key, n2);
16029          }
16030        }
16031        function s(t3, e3) {
16032          return !e3 || "object" !== p(e3) && "function" != typeof e3 ? a(t3) : e3;
16033        }
16034        function a(t3) {
16035          if (void 0 === t3) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
16036          return t3;
16037        }
16038        function u(t3) {
16039          var e3 = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0;
16040          return u = function(t4) {
16041            if (null === t4 || (r3 = t4, -1 === Function.toString.call(r3).indexOf("[native code]"))) return t4;
16042            var r3;
16043            if ("function" != typeof t4) throw new TypeError("Super expression must either be null or a function");
16044            if (void 0 !== e3) {
16045              if (e3.has(t4)) return e3.get(t4);
16046              e3.set(t4, n2);
16047            }
16048            function n2() {
16049              return c(t4, arguments, f(this).constructor);
16050            }
16051            return n2.prototype = Object.create(t4.prototype, { constructor: { value: n2, enumerable: false, writable: true, configurable: true } }), l(n2, t4);
16052          }, u(t3);
16053        }
16054        function c(t3, e3, r3) {
16055          return c = (function() {
16056            if ("undefined" == typeof Reflect || !Reflect.construct) return false;
16057            if (Reflect.construct.sham) return false;
16058            if ("function" == typeof Proxy) return true;
16059            try {
16060              return Date.prototype.toString.call(Reflect.construct(Date, [], function() {
16061              })), true;
16062            } catch (t4) {
16063              return false;
16064            }
16065          })() ? Reflect.construct : function(t4, e4, r4) {
16066            var n2 = [null];
16067            n2.push.apply(n2, e4);
16068            var o2 = new (Function.bind.apply(t4, n2))();
16069            return r4 && l(o2, r4.prototype), o2;
16070          }, c.apply(null, arguments);
16071        }
16072        function l(t3, e3) {
16073          return l = Object.setPrototypeOf || function(t4, e4) {
16074            return t4.__proto__ = e4, t4;
16075          }, l(t3, e3);
16076        }
16077        function f(t3) {
16078          return f = Object.setPrototypeOf ? Object.getPrototypeOf : function(t4) {
16079            return t4.__proto__ || Object.getPrototypeOf(t4);
16080          }, f(t3);
16081        }
16082        function p(t3) {
16083          return p = "function" == typeof Symbol && "symbol" === n(Symbol.iterator) ? function(t4) {
16084            return n(t4);
16085          } : function(t4) {
16086            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : n(t4);
16087          }, p(t3);
16088        }
16089        var h = r2(7352).inspect, y = r2(3743).codes.ERR_INVALID_ARG_TYPE;
16090        function d(t3, e3, r3) {
16091          return (void 0 === r3 || r3 > t3.length) && (r3 = t3.length), t3.substring(r3 - e3.length, r3) === e3;
16092        }
16093        var b = "", m = "", v = "", g = "", _ = { deepStrictEqual: "Expected values to be strictly deep-equal:", strictEqual: "Expected values to be strictly equal:", strictEqualObject: 'Expected "actual" to be reference-equal to "expected":', deepEqual: "Expected values to be loosely deep-equal:", equal: "Expected values to be loosely equal:", notDeepStrictEqual: 'Expected "actual" not to be strictly deep-equal to:', notStr
16093ictEqual: 'Expected "actual" to be strictly unequal to:', notStrictEqualObject: 'Expected "actual" not to be reference-equal to "expected":', notDeepEqual: 'Expected "actual" not to be loosely deep-equal to:', notEqual: 'Expected "actual" to be loosely unequal to:', notIdentical: "Values identical but not reference-equal:" };
16094        function w(t3) {
16095          var e3 = Object.keys(t3), r3 = Object.create(Object.getPrototypeOf(t3));
16096          return e3.forEach(function(e4) {
16097            r3[e4] = t3[e4];
16098          }), Object.defineProperty(r3, "message", { value: t3.message }), r3;
16099        }
16100        function O(t3) {
16101          return h(t3, { compact: false, customInspect: false, depth: 1e3, maxArrayLength: 1 / 0, showHidden: false, breakLength: 1 / 0, showProxy: false, sorted: true, getters: true });
16102        }
16103        var S = (function(t3) {
16104          function e3(t4) {
16105            var r4;
16106            if ((function(t5, e4) {
16107              if (!(t5 instanceof e4)) throw new TypeError("Cannot call a class as a function");
16108            })(this, e3), "object" !== p(t4) || null === t4) throw new y("options", "Object", t4);
16109            var n3 = t4.message, o2 = t4.operator, i2 = t4.stackStartFn, u2 = t4.actual, c2 = t4.expected, l2 = Error.stackTraceLimit;
16110            if (Error.stackTraceLimit = 0, null != n3) r4 = s(this, f(e3).call(this, String(n3)));
16111            else if ({}.stderr && {}.stderr.isTTY && ({}.stderr && {}.stderr.getColorDepth && 1 !== {}.stderr.getColorDepth() ? (b = "\x1B[34m", m = "\x1B[32m", g = "\x1B[39m", v = "\x1B[31m") : (b = "", m = "", g = "", v = "")), "object" === p(u2) && null !== u2 && "object" === p(c2) && null !== c2 && "stack" in u2 && u2 instanceof Error && "stack" in c2 && c2 instanceof Error && (u2 = w(u2), c2 = w(c2)), "deepStrictEqual" === o2 || "strictEqual" === o2) r4 = s(this, f(e3).call(this, (function(t5, e4, r5) {
16112              var n4 = "", o3 = "", i3 = 0, s2 = "", a2 = false, u3 = O(t5), c3 = u3.split("\n"), l3 = O(e4).split("\n"), f2 = 0, h3 = "";
16113              if ("strictEqual" === r5 && "object" === p(t5) && "object" === p(e4) && null !== t5 && null !== e4 && (r5 = "strictEqualObject"), 1 === c3.length && 1 === l3.length && c3[0] !== l3[0]) {
16114                var y2 = c3[0].length + l3[0].length;
16115                if (y2 <= 10) {
16116                  if (!("object" === p(t5) && null !== t5 || "object" === p(e4) && null !== e4 || 0 === t5 && 0 === e4)) return "".concat(_[r5], "\n\n") + "".concat(c3[0], " !== ").concat(l3[0], "\n");
16117                } else if ("strictEqualObject" !== r5 && y2 < ({}.stderr && {}.stderr.isTTY ? {}.stderr.columns : 80)) {
16118                  for (; c3[0][f2] === l3[0][f2]; ) f2++;
16119                  f2 > 2 && (h3 = "\n  ".concat((function(t6, e5) {
16120                    if (e5 = Math.floor(e5), 0 == t6.length || 0 == e5) return "";
16121                    var r6 = t6.length * e5;
16122                    for (e5 = Math.floor(Math.log(e5) / Math.log(2)); e5; ) t6 += t6, e5--;
16123                    return t6 + t6.substring(0, r6 - t6.length);
16124                  })(" ", f2), "^"), f2 = 0);
16125                }
16126              }
16127              for (var w2 = c3[c3.length - 1], S3 = l3[l3.length - 1]; w2 === S3 && (f2++ < 2 ? s2 = "\n  ".concat(w2).concat(s2) : n4 = w2, c3.pop(), l3.pop(), 0 !== c3.length && 0 !== l3.length); ) w2 = c3[c3.length - 1], S3 = l3[l3.length - 1];
16128              var $2 = Math.max(c3.length, l3.length);
16129              if (0 === $2) {
16130                var j2 = u3.split("\n");
16131                if (j2.length > 30) for (j2[26] = "".concat(b, "...").concat(g); j2.length > 27; ) j2.pop();
16132                return "".concat(_.notIdentical, "\n\n").concat(j2.join("\n"), "\n");
16133              }
16134              f2 > 3 && (s2 = "\n".concat(b, "...").concat(g).concat(s2), a2 = true), "" !== n4 && (s2 = "\n  ".concat(n4).concat(s2), n4 = "");
16135              var P2 = 0, A = _[r5] + "\n".concat(m, "+ actual").concat(g, " ").concat(v, "- expected").concat(g), E = " ".concat(b, "...").concat(g, " Lines skipped");
16136              for (f2 = 0; f2 < $2; f2++) {
16137                var x = f2 - i3;
16138                if (c3.length < f2 + 1) x > 1 && f2 > 2 && (x > 4 ? (o3 += "\n".concat(b, "...").concat(g), a2 = true) : x > 3 && (o3 += "\n  ".concat(l3[f2 - 2]), P2++), o3 += "\n  ".concat(l3[f2 - 1]), P2++), i3 = f2, n4 += "\n".concat(v, "-").concat(g, " ").concat(l3[f2]), P2++;
16139                else if (l3.length < f2 + 1) x > 1 && f2 > 2 && (x > 4 ? (o3 += "\n".concat(b, "...").concat(g), a2 = true) : x > 3 && (o3 += "\n  ".concat(c3[f2 - 2]), P2++), o3 += "\n  ".concat(c3[f2 - 1]), P2++), i3 = f2, o3 += "\n".concat(m, "+").concat(g, " ").concat(c3[f2]), P2++;
16140                else {
16141                  var T = l3[f2], k = c3[f2], N = k !== T && (!d(k, ",") || k.slice(0, -1) !== T);
16142                  N && d(T, ",") && T.slice(0, -1) === k && (N = false, k += ","), N ? (x > 1 && f2 > 2 && (x > 4 ? (o3 += "\n".concat(b, "...").concat(g), a2 = true) : x > 3 && (o3 += "\n  ".concat(c3[f2 - 2]), P2++), o3 += "\n  ".concat(c3[f2 - 1]), P2++), i3 = f2, o3 += "\n".concat(m, "+").concat(g, " ").concat(k), n4 += "\n".concat(v, "-").concat(g, " ").concat(T), P2 += 2) : (o3 += n4, n4 = "", 1 !== x && 0 !== f2 || (o3 += "\n  ".concat(k), P2++));
16143                }
16144                if (P2 >
16144 20 && f2 < $2 - 2) return "".concat(A).concat(E, "\n").concat(o3, "\n").concat(b, "...").concat(g).concat(n4, "\n") + "".concat(b, "...").concat(g);
16145              }
16146              return "".concat(A).concat(a2 ? E : "", "\n").concat(o3).concat(n4).concat(s2).concat(h3);
16147            })(u2, c2, o2)));
16148            else if ("notDeepStrictEqual" === o2 || "notStrictEqual" === o2) {
16149              var h2 = _[o2], S2 = O(u2).split("\n");
16150              if ("notStrictEqual" === o2 && "object" === p(u2) && null !== u2 && (h2 = _.notStrictEqualObject), S2.length > 30) for (S2[26] = "".concat(b, "...").concat(g); S2.length > 27; ) S2.pop();
16151              r4 = 1 === S2.length ? s(this, f(e3).call(this, "".concat(h2, " ").concat(S2[0]))) : s(this, f(e3).call(this, "".concat(h2, "\n\n").concat(S2.join("\n"), "\n")));
16152            } else {
16153              var $ = O(u2), j = "", P = _[o2];
16154              "notDeepEqual" === o2 || "notEqual" === o2 ? ($ = "".concat(_[o2], "\n\n").concat($)).length > 1024 && ($ = "".concat($.slice(0, 1021), "...")) : (j = "".concat(O(c2)), $.length > 512 && ($ = "".concat($.slice(0, 509), "...")), j.length > 512 && (j = "".concat(j.slice(0, 509), "...")), "deepEqual" === o2 || "equal" === o2 ? $ = "".concat(P, "\n\n").concat($, "\n\nshould equal\n\n") : j = " ".concat(o2, " ").concat(j)), r4 = s(this, f(e3).call(this, "".concat($).concat(j)));
16155            }
16156            return Error.stackTraceLimit = l2, r4.generatedMessage = !n3, Object.defineProperty(a(r4), "name", { value: "AssertionError [ERR_ASSERTION]", enumerable: false, writable: true, configurable: true }), r4.code = "ERR_ASSERTION", r4.actual = u2, r4.expected = c2, r4.operator = o2, Error.captureStackTrace && Error.captureStackTrace(a(r4), i2), r4.stack, r4.name = "AssertionError", s(r4);
16157          }
16158          var r3, n2;
16159          return (function(t4, e4) {
16160            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
16161            t4.prototype = Object.create(e4 && e4.prototype, { constructor: { value: t4, writable: true, configurable: true } }), e4 && l(t4, e4);
16162          })(e3, t3), r3 = e3, n2 = [{ key: "toString", value: function() {
16163            return "".concat(this.name, " [").concat(this.code, "]: ").concat(this.message);
16164          } }, { key: h.custom, value: function(t4, e4) {
16165            return h(this, (function(t5) {
16166              for (var e5 = 1; e5 < arguments.length; e5++) {
16167                var r4 = null != arguments[e5] ? arguments[e5] : {}, n3 = Object.keys(r4);
16168                "function" == typeof Object.getOwnPropertySymbols && (n3 = n3.concat(Object.getOwnPropertySymbols(r4).filter(function(t6) {
16169                  return Object.getOwnPropertyDescriptor(r4, t6).enumerable;
16170                }))), n3.forEach(function(e6) {
16171                  o(t5, e6, r4[e6]);
16172                });
16173              }
16174              return t5;
16175            })({}, e4, { customInspect: false, depth: 0 }));
16176          } }], n2 && i(r3.prototype, n2), e3;
16177        })(u(Error));
16178        t2.exports = S;
16179      }, 9122: (t2, e2, r2) => {
16180        var n = r2(3900), o = r2(988), i = r2(8863), s = r2(5804);
16181        t2.exports = function(t3) {
16182          var e3 = i(arguments), r3 = t3.length - (arguments.length - 1);
16183          return n(e3, 1 + (r3 > 0 ? r3 : 0), true);
16184        }, o ? o(t2.exports, "apply", { value: s }) : t2.exports.apply = s;
16185      }, 9123: (t2, e2, r2) => {
16186        function n(t3) {
16187          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
16188            return typeof t4;
16189          } : function(t4) {
16190            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
16191          }, n(t3);
16192        }
16193        function o(t3, e3) {
16194          var r3 = Object.keys(t3);
16195          if (Object.getOwnPropertySymbols) {
16196            var n2 = Object.getOwnPropertySymbols(t3);
16197            e3 && (n2 = n2.filter(function(e4) {
16198              return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
16199            })), r3.push.apply(r3, n2);
16200          }
16201          return r3;
16202        }
16203        function i(t3) {
16204          for (var e3 = 1; e3 < arguments.length; e3++) {
16205            var r3 = null != arguments[e3] ? arguments[e3] : {};
16206            e3 % 2 ? o(Object(r3), true).forEach(function(e4) {
16207              s(t3, e4, r3[e4]);
16208            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t3, Object.getOwnPropertyDescriptors(r3)) : o(Object(r3)).forEac
16208h(function(e4) {
16209              Object.defineProperty(t3, e4, Object.getOwnPropertyDescriptor(r3, e4));
16210            });
16211          }
16212          return t3;
16213        }
16214        function s(t3, e3, r3) {
16215          return (e3 = (function(t4) {
16216            var e4 = (function(t5) {
16217              if ("object" != n(t5) || !t5) return t5;
16218              var e5 = t5[Symbol.toPrimitive];
16219              if (void 0 !== e5) {
16220                var r4 = e5.call(t5, "string");
16221                if ("object" != n(r4)) return r4;
16222                throw new TypeError("@@toPrimitive must return a primitive value.");
16223              }
16224              return String(t5);
16225            })(t4);
16226            return "symbol" == n(e4) ? e4 : e4 + "";
16227          })(e3)) in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
16228        }
16229        var a, u, c = r2(3609), l = r2(8235), f = r2(3550).EventEmitter, p = r2(7760), h = r2(4561), y = r2(6426), d = r2(7982), b = r2(4327), m = r2(1469), v = r2(1313), g = r2(3216), _ = r2(5110), w = r2(8768), O = r2(7910), S = r2(5537), $ = r2(7930).arrayAtomicsSymbol, j = r2(7930).arrayPathSymbol, P = r2(7930).documentArrayParent;
16230        function A(t3, e3, r3, n2) {
16231          if (e3.options && e3.options.timeseries) throw new S(t3, "timeseries");
16232          var o2 = A.defaultOptions && A.defaultOptions._id;
16233          null != o2 && ((n2 = n2 || {})._id = o2), null != n2 && null != n2._id ? e3 = v(e3, n2) : null != r3 && null != r3._id && (e3 = v(e3, r3));
16234          var s2 = E(e3, r3);
16235          s2.prototype.$basePath = t3, p.call(this, t3, s2, r3), this.schema = e3, this.schemaOptions = n2 || {}, this.$isMongooseDocumentArray = true, this.Constructor = s2, s2.base = e3.base;
16236          var a2 = this.defaultValue;
16237          "defaultValue" in this && null == a2 || this.default(function() {
16238            var t4 = a2.call(this);
16239            return null == t4 || Array.isArray(t4) || (t4 = [t4]), t4;
16240          }), this.$embeddedSchemaType = new l(t3 + ".$", i(i({}, n2 || {}), {}, { $parentSchemaType: this })), this.$embeddedSchemaType.caster = this.Constructor, this.$embeddedSchemaType.schema = this.schema;
16241        }
16242        function E(t3, e3, n2) {
16243          function o2() {
16244            u.apply(this, arguments), null != this.__parentArray && null != this.__parentArray.getArrayParent() && this.$session(this.__parentArray.getArrayParent().$session());
16245          }
16246          u || (u = r2(6547)), t3._preCompile();
16247          var i2 = null != n2 ? n2.prototype : u.prototype;
16248          for (var s2 in o2.prototype = Object.create(i2), o2.prototype.$__setSchema(t3), o2.schema = t3, o2.prototype.constructor = o2, o2.$isArraySubdocument = true, o2.events = new f(), o2.base = t3.base, t3.methods) o2.prototype[s2] = t3.methods[s2];
16249          for (var a2 in t3.statics) o2[a2] = t3.statics[a2];
16250          for (var c2 in f.prototype) o2[c2] = f.prototype[c2];
16251          return o2.options = e3, o2;
16252        }
16253        A.schemaName = "DocumentArray", A.options = { castNonArrays: true }, A.prototype = Object.create(p.prototype), A.prototype.constructor = A, A.prototype.OptionsConstructor = h, Object.defineProperty(A.prototype, "$conditionalHandlers", { enumerable: false, value: i({}, p.prototype.$conditionalHandlers) }), A.prototype.discriminator = function(t3, e3, r3) {
16254          var n2;
16255          "function" == typeof t3 && (t3 = w.getFunctionName(t3)), r3 = r3 || {};
16256          var o2 = w.isPOJO(r3) ? r3.value : r3, i2 = "boolean" != typeof r3.clone || r3.clone;
16257          e3.instanceOfSchema && i2 && (e3 = e3.clone());
16258          var s2 = E(e3 = m(this.casterConstructor, t3, e3, o2, null, null, null === (n2 = r3) || void 0 === n2 ? void 0 : n2.overwriteExisting), null, this.casterConstructor);
16259          s2.baseCasterConstructor = this.casterConstructor;
16260          try {
16261            Object.defineProperty(s2, "name", { value: t3 });
16262          } catch (t4) {
16263          }
16264          return this.casterConstructor.discriminators[t3] = s2, this.casterConstructor.discriminators[t3];
16265        }, A.prototype.doValidate = function(t3, e3, n2, o2) {
16266          a || (a = r2(4878));
16267          var i2 = this;
16268          try {
16269            y.prototype.doValidate.call(this, t3, function(r3) {
16270              if (r3) return e3(r3);
16271              var s2, c2 = t3 && t3.length;
16272              if (!c2) return e3();
16273              if (o2 && o2.updateValidator) return e3();
16274              function l2(t4) {
16275                null != t4 && (s2 = t4), --c2 || e3(s2);
16276              }
16277              w.isMongooseDocumentArray(t3) || (t3 = new a(t3, i2.path, n2));
16278              for (var f2 = 0, p2 = c2; f2 < p2; ++f2) {
16279                var h2 = t3[f2];
16280                if (null != h2) {
16281                  if (!(h2 instanceof u)) {
16282                    var y2 = O(i2.casterConstructor, t3[f2]);
16283                    h2 = t3[f2] = new y2(h2, t3, void 0, void 0, f2);
16284                  }
16285                  null == o2 || !o2.validateModifiedOnly || h2.$isModified() ? h2.$__validate(null, o2, l2) : --c2 || e3(s2);
16286                } else --c2 || e3(s2);
16287              }
16288            }, n2);
16289          } catch (t4) {
16290            return e3(t4);
16291          }
16292        }, A.prototype.doValidateSync = function(t3, e3, r3) {
16293          var n2 = y.prototype.doValidateSync.call(this, t3, e3);
16294          if (null != n2) return n2;
16295          var o2 = t3 && t3.length, i2 = null;
16296          if (o2) {
16297            for (var s2 = 0, a2 = o2; s2 < a2; ++s2) {
16298              var c2 = t3[s2];
16299              if (c2) {
16300                if (!(c2 instanceof u)) {
16301                  var l2 = O(this.casterConstructor, t3[s2]);
16302                  c2 = t3[s2] = new l2(c2, t3, void 0, void 0, s2);
16303                }
16304                if (null == r3 || !r3.validateModifiedOnly || c2.$isModified()) {
16305                  var f2 = c2.validateSync(r3);
16306                  f2 && null == i2 && (i2 = f2);
16307                }
16308              }
16309            }
16310            return i2;
16311          }
16312        }, A.prototype.getDefault = function(t3, e3, n2) {
16313          var o2 = "function" == typeof this.defaultValue ? this.defaultValue.call(t3) : this.defaultValue;
16314          if (null == o2) return o2;
16315          if (n2 && n2.skipCast) return o2;
16316          a || (a = r2(4878)), Array.isArray(o2) || (o2 = [o2]), o2 = new a(o2, this.path, t3);
16317          for (var i2 = 0; i2 < o2.length; ++i2) {
16318            var s2 = new (O(this.casterConstructor, o2[i2]))({}, o2, void 0, void 0, i2);
16319            s2.$init(o2[i2]), s2.isNew = true, Object.assign(s2.$__.activePaths.default, s2.$__.activePaths.init), s2.$__.activePaths.init = {}, o2[i2] = s2;
16320          }
16321          return o2;
16322        };
16323        var x = Object.freeze({ transform: false, virtuals: false }), T = Object.freeze({ skipId: false, willInit: true });
16324        function k(t3, e3, r3) {
16325          if (r3 && e3) {
16326            for (var n2, o2, i2, s2 = t3.path + ".", a2 = Object.keys(e3), u2 = a2.length, c2 = {}; u2--; ) if ((o2 = a2[u2]).startsWith(s2)) {
16327              if ("$" === (i2 = o2.substring(s2.length))) continue;
16328              i2.startsWith("$.") && (i2 = i2.substring(2)), n2 || (n2 = true), c2[i2] = e3[o2];
16329            }
16330            return n2 && c2 || void 0;
16331          }
16332        }
16333        A.prototype.cast = function(t3, e3, n2, o2, i2) {
16334          if (a || (a = r2(4878)), null != t3 && null != t3[j] && t3 === o2) return t3;
16335          var s2, l2, f2 = (i2 = i2 || {}).path || this.path;
16336          if (!Array.isArray(t3)) {
16337            if (!n2 && !A.options.castNonArrays) throw new c("DocumentArray", t3, this.path, null, this);
16338            return e3 && n2 && e3.markModified(f2), this.cast([t3], e3, n2, o2, i2);
16339          }
16340          i2.skipDocumentArrayCast && !w.isMongooseDocumentArray(t3) || (t3 = new a(t3, f2, e3, this)), null != o2 && (t3[$] = o2[$] || {}), null != i2.arrayPathIndex && (t3[j] = f2 + "." + i2.arrayPathIndex);
16341          for (var p2 = w.isMongooseDocumentArray(t3) ? t3.__array : t3, h2 = p2.length, y2 = 0; y2 < h2; ++y2) if (p2[y2]) {
16342            var d2 = O(this.casterConstructor, p2[y2]), b2 = g(p2[y2], true);
16343            if (p2[y2] !== b2 && (p2[y2] = b2), p2[y2] instanceof u) {
16344              if (p2[y2][P] !== e3) if (n2) {
16345                var m2 = new d2(null, t3, T, s2, y2);
16346                p2[y2] = m2.$init(p2[y2]);
16347              } else {
16348                var v2 = new d2(p2[y2], t3, void 0, void 0, y2);
16349                p2[y2] = v2;
16350              }
16351              null == p2[y2].__index && p2[y2].$setIndex(y2);
16352            } else if (null != p2[y2]) if (n2) e3 ? s2 || (s2 = k(this, e3.$__.selected, n2)) : s2 = true, l2 = new d2(null, t3, T, s2, y2), p2[y2] = l2.$init(p2[y2]);
16353            else if (o2 && "function" == typeof o2.id && (l2 = o2.id(p2[y2]._id)), o2 && l2 && w.deepEqual(l2.toObject(x), p2[y2])) l2.set(p2[y2]), p2[y2] = l2;
16354            else try {
16355              l2 = new d2(p2[y2], t3, void 0, void 0, y2), p2[y2] = l2;
16356            } catch (e4) {
16357              throw new c("embedded", p2[y2], t3[j], e4, this);
16358            }
16359          }
16360          return t3;
16361        }, A.prototype.clone = function() {
16362          var t3 = Object.assign({}, this.options), e3 = new this.constructor(this.path, this.schema, t3, this.schemaOptions);
16363          return e3.validators = this.validators.slice(), void 0 !== this.requiredValidator && (e3.requiredValidator = this.requiredValidator), e3.Constructor.discriminators = Object.assign({}, this.Constructor.discriminators), e3._appliedDiscriminators = this._appliedDiscriminators, e3;
16364        }, A.prototype.applyGetters = function(t3, e3) {
16365          return y.prototype.applyGetters.call(this, t3, e3);
16366        }, A.defaultOptions = {}, A.set = y.set, A.setters = [], A.get = y.get, A.prototype.$conditionalHandlers.$elemMatch = function(t3, e3) {
16367          for (var r3, n2 = Object.keys(t3), o2 = n2.length, i2 = 0; i2 < o2; ++i2) {
16368            var s2 = n2[i2], a2 = t3[s2];
16369            _(s2) && null != a2 && (t3[s2] = this.castForQuery(s2, a2, e3));
16370          }
16371          var u2 = this && this.casterConstructor && this.casterConstructor.schema && this.casterConstructor.schema.options && this.casterConstructor.schema.options.discriminatorKey, c2 = this && this.casterConstructor && this.casterConstructor.schema && this.casterConstructor.schema.discriminators || {};
16372          if (null != u2 && null != t3[u2] && null != c2[t3[u2]]) return d(c2[t3[u2]], t3, null, this && this.$$context);
16373          var l2 = null !== (r3 = this.casterConstructor.schema) && void 0 !== r3 ? r3 : e3.schema;
16374          return d(l2, t3, null, this && this.$$context);
16375        }, A.prototype.toJSONSchema = function(t3) {
16376          var e3 = b("object", "object", null == t3 ? void 0 : t3.useBsonType, false), r3 = this.options.required && "function" != typeof this.options.required;
16377          return i(i({}, b("array", "array", null == t3 ? void 0 : t3.useBsonType, r3)), {}, { items: i(i({}, e3), this.schema.toJSONSchema(t3)) });
16378        }, t2.exports = A;
16379      }, 9166: (t2, e2, r2) => {
16380        function n(t3, e3) {
16381          var r3 = "undefined" != typeof Symbol && t3[Symbol.iterator] || t3["@@iterator"];
16382          if (!r3) {
16383            if (Array.isArray(t3) || (r3 = (function(t4, e4) {
16384              if (t4) {
16385                if ("string" == typeof t4) return o(t4, e4);
16386                var r4 = {}.toString.call(t4).slice(8, -1);
16387                return "Object" === r4 && t4.constructor && (r4 = t4.constructor.name), "Map" === r4 || "Set" === r4 ? Array.from(t4) : "Arguments" === r4 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r4) ? o(t4, e4) : void 0;
16388              }
16389            })(t3)) || e3) {
16390              r3 && (t3 = r3);
16391              var n2 = 0, i2 = function() {
16392              };
16393              return { s: i2, n: function() {
16394                return n2 >= t3.length ? { done: true } : { done: false, value: t3[n2++] };
16395              }, e: function(t4) {
16396                throw t4;
16397              }, f: i2 };
16398            }
16399            throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
16400          }
16401          var s2, a2 = true, u2 = false;
16402          return { s: function() {
16403            r3 = r3.call(t3);
16404          }, n: function() {
16405            var t4 = r3.next();
16406            return a2 = t4.done, t4;
16407          }, e: function(t4) {
16408            u2 = true, s2 = t4;
16409          }, f: function() {
16410            try {
16411              a2 || null == r3.return || r3.return();
16412            } finally {
16413              if (u2) throw s2;
16414            }
16415          } };
16416        }
16417        function o(t3, e3) {
16418          (null == e3 || e3 > t3.length) && (e3 = t3.length);
16419          for (var r3 = 0, n2 = Array(e3); r3 < e3; r3++) n2[r3] = t3[r3];
16420          return n2;
16421        }
16422        var i = r2(8759), s = r2(3696);
16423        function a(t3, e3, r3) {
16424          if (null != e3) {
16425            var o2 = Object.keys(e3).some(function(t4) {
16426              return "$" === t4[0];
16427            });
16428            if (o2) {
16429              if (e3.$push && v(e3.$push), e3.$addToSet && v(e3.$addToSet), null != e3.$set) for (var i2 = 0, c = Object.keys(e3.$set); i2 < c.length; i2++) {
16430                var l = c[i2];
16431                u(r3, l, e3.$set, t3);
16432              }
16433              if (null != e3.$setOnInsert) for (var f = 0, p = Object.keys(e3.$setOnInsert); f < p.length; f++) {
16434                var h = p[f];
16435                u(r3, h, e3.$setOnInsert, t3);
16436              }
16437            }
16438            var y, d = Object.keys(e3).filter(function(t4) {
16439              return "$" !== t4[0];
16440            }), b = n(d);
16441            try {
16442              for (b.s(); !(y = b.n()).done; ) {
16443                var m = y.value;
16444                u(r3, m, e3, t3);
16445              }
16446            } catch (t4) {
16447              b.e(t4);
16448            } finally {
16449              b.f();
16450            }
16451          }
16452          function v(e4) {
16453            for (var n2 = function() {
16454              var n3 = i3[o3], u2 = r3.path(n3.replace(/\.\$\./i, ".").replace(/.\$$/, ""));
16455              if (e4[n3] && u2 && u2.$isMongooseDocumentArray && u2.schema.options.timestamps) {
16456                var c2 = u2.schema.options.timestamps, l2 = s(c2, "createdAt"), f2 = s(c2, "updatedAt");
16457                e4[n3].$each ? e4[n3].$each.forEach(function(e5) {
16458                  null != f2 && (e5[f2] = t3), null != l2 && (e5[l2] = t3), a(t3, e5, u2.schema);
16459                }) : (null != f2 && (e4[n3][f2] = t3), null != l2 && (e4[n3][l2] = t3), a(t3, e4[n3], u2.schema));
16460              }
16461            }, o3 = 0, i3 = Object.keys(e4); o3 < i3.length; o3++) n2();
16462          }
16463        }
16464        function u(t3, e3, r3, o2) {
16465          var u2 = i(e3), c = t3.path(u2);
16466          if (c) {
16467            for (var l = [], f = u2.split("."), p = f.length - 1; p > 0; --p) {
16468              var h = t3.path(f.slice(0, p).join("."));
16469              null != h && (h.$isMongooseDocumentArray || h.$isSingleNested) && l.push({ parentPath: e3.split(".").slice(0, p).join("."), parentSchemaType: h });
16470            }
16471            if (Array.isArray(r3[e3]) && c.$isMongooseDocumentArray) !(function(t4, e4, r4) {
16472              var n2 = e4.schema.options.timestamps, o3 = t4.length;
16473              if (n2) for (var i2 = s(n2, "createdAt"), u3 = s(n2, "updatedAt"), c2 = 0; c2 < o3; ++c2) null != u3 && (t4[c2][u3] = r4), null != i2 && (t4[c2][i2] = r4), a(r4, t4[c2], e4.schema);
16474              else for (var l2 = 0; l2 < o3; ++l2) a(r4, t4[l2], e4.schema);
16475            })(r3[e3], c, o2);
16476            else if (r3[e3] && c.$isSingleNested) !(function(t4, e4, r4) {
16477              var n2 = e4.schema.options.timestamps;
16478              if (n2) {
16479                var o3 = s(n2, "createdAt"), i2 = s(n2, "updatedAt");
16480                null != i2 && (t4[i2] = r4), null != o3 && (t4[o3] = r4), a(r4, t4, e4.schema);
16481              } else a(r4, t4, e4.schema);
16482            })(r3[e3], c, o2);
16483            else if (l.length > 0) {
16484              var y, d = n(l);
16485              try {
16486                for (d.s(); !(y = d.n()).done; ) {
16487                  var b = y.value, m = b.parentPath, v = b.parentSchemaType, g = v.schema.options.timestamps, _ = s(g, "updatedAt");
16488                  if (g && null != _) {
16489                    if (v.$isSingleNested) r3[m + "." + _] = o2;
16490                    else if (v.$isMongooseDocumentArray) {
16491                      var w = e3.substring(m.length + 1);
16492                      if (/^\d+$/.test(w)) {
16493                        r3[m + "." + w][_] = o2;
16494                        continue;
16495                      }
16496                      var O = w.indexOf(".");
16497                      r3[m + "." + (w = -1 !== O ? w.substring(0, O) 
16497: w) + "." + _] = o2;
16498                    }
16499                  }
16500                }
16501              } catch (t4) {
16502                d.e(t4);
16503              } finally {
16504                d.f();
16505              }
16506            } else if (null != c.schema && c.schema != t3 && r3[e3]) {
16507              var S = c.schema.options.timestamps, $ = s(S, "createdAt"), j = s(S, "updatedAt");
16508              if (!S) return;
16509              null != j && (r3[e3][j] = o2), null != $ && (r3[e3][$] = o2);
16510            }
16511          }
16512        }
16513        t2.exports = a;
16514      }, 9183: (t2) => {
16515        t2.exports = function(t3) {
16516          return "function" == typeof t3 && t3.constructor && "AsyncFunction" === t3.constructor.name;
16517        };
16518      }, 9206: (t2) => {
16519        t2.exports = EvalError;
16520      }, 9247: (t2, e2, r2) => {
16521        var n = r2(2481), o = r2(2273);
16522        t2.exports = function() {
16523          var t3 = n();
16524          return o(Object, { is: t3 }, { is: function() {
16525            return Object.is !== t3;
16526          } }), t3;
16527        };
16528      }, 9344: (t2, e2, r2) => {
16529        function n(t3) {
16530          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
16531            return typeof t4;
16532          } : function(t4) {
16533            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
16534          }, n(t3);
16535        }
16536        var o, i = r2(3071), s = r2(953)(), a = r2(5994), u = r2(1464);
16537        if (s) {
16538          var c = i("RegExp.prototype.exec"), l = {}, f = function() {
16539            throw l;
16540          }, p = { toString: f, valueOf: f };
16541          "symbol" === n(Symbol.toPrimitive) && (p[Symbol.toPrimitive] = f), o = function(t3) {
16542            if (!t3 || "object" !== n(t3)) return false;
16543            var e3 = u(t3, "lastIndex");
16544            if (!e3 || !a(e3, "value")) return false;
16545            try {
16546              c(t3, p);
16547            } catch (t4) {
16548              return t4 === l;
16549            }
16550          };
16551        } else {
16552          var h = i("Object.prototype.toString");
16553          o = function(t3) {
16554            return !(!t3 || "object" !== n(t3) && "function" != typeof t3) && "[object RegExp]" === h(t3);
16555          };
16556        }
16557        t2.exports = o;
16558      }, 9380: (t2, e2, r2) => {
16559        function n() {
16560          var t3, e3, r3 = "function" == typeof Symbol ? Symbol : {}, i2 = r3.iterator || "@@iterator", s2 = r3.toStringTag || "@@toStringTag";
16561          function a2(r4, n2, i3, s3) {
16562            var a3 = n2 && n2.prototype instanceof c2 ? n2 : c2, l3 = Object.create(a3.prototype);
16563            return o(l3, "_invoke", (function(r5, n3, o2) {
16564              var i4, s4, a4, c3 = 0, l4 = o2 || [], f3 = false, p3 = { p: 0, n: 0, v: t3, a: h2, f: h2.bind(t3, 4), d: function(e4, r6) {
16565                return i4 = e4, s4 = 0, a4 = t3, p3.n = r6, u2;
16566              } };
16567              function h2(r6, n4) {
16568                for (s4 = r6, a4 = n4, e3 = 0; !f3 && c3 && !o3 && e3 < l4.length; e3++) {
16569                  var o3, i5 = l4[e3], h3 = p3.p, y2 = i5[2];
16570                  r6 > 3 ? (o3 = y2 === n4) && (a4 = i5[(s4 = i5[4]) ? 5 : (s4 = 3, 3)], i5[4] = i5[5] = t3) : i5[0] <= h3 && ((o3 = r6 < 2 && h3 < i5[1]) ? (s4 = 0, p3.v = n4, p3.n = i5[1]) : h3 < y2 && (o3 = r6 < 3 || i5[0] > n4 || n4 > y2) && (i5[4] = r6, i5[5] = n4, p3.n = y2, s4 = 0));
16571                }
16572                if (o3 || r6 > 1) return u2;
16573                throw f3 = true, n4;
16574              }
16575              return function(o3, l5, y2) {
16576                if (c3 > 1) throw TypeError("Generator is already running");
16577                for (f3 && 1 === l5 && h2(l5, y2), s4 = l5, a4 = y2; (e3 = s4 < 2 ? t3 : a4) || !f3; ) {
16578                  i4 || (s4 ? s4 < 3 ? (s4 > 1 && (p3.n = -1), h2(s4, a4)) : p3.n = a4 : p3.v = a4);
16579                  try {
16580                    if (c3 = 2, i4) {
16581                      if (s4 || (o3 = "next"), e3 = i4[o3]) {
16582                        if (!(e3 = e3.call(i4, a4))) throw TypeError("iterator result is not an object");
16583                        if (!e3.done) return e3;
16584                        a4 = e3.value, s4 < 2 && (s4 = 0);
16585                      } else 1 === s4 && (e3 = i4.return) && e3.call(i4), s4 < 2 && (a4 = TypeError("The iterator does not provide a '" + o3 + "' method"), s4 = 1);
16586                      i4 = t3;
16587                    } else if ((e3 = (f3 = p3.n < 0) ? a4 : r5.call(n3, p3)) !== u2) break;
16588                  } catch (e4) {
16589                    i4 = t3, s4 = 1, a4 = e4;
16590                  } finally {
16591                    c3 = 1;
16592                  }
16593                }
16594                return { value: e3, done: f3 };
16595              };
16596            })(r4, i3, s3), true), l3;
16597          }
16598          var u2 = {};
16599          function c2() {
16600          }
16601          function l2() {
16602          }
16603          function f2() {
16604          }
16605          e3 = Object.getPrototypeOf;
16606          var p2 = [][i2] ? e3(e3([][i2]())) : (o(e3 = {}, i2, function() {
16607            return this;
16608          }), e3), h = f2.prototype = c2.prototype = Object.create(p2);
16609          function y(t4) {
16610            return Object.setPrototypeOf ? Object.setPrototypeOf(t4, f2) : (t4.__proto__ = f2, o(t4, s2, "GeneratorFunction")), t4.prototype = Object.create(h), t4;
16611          }
16612          return l2.prototype = f2, o(h, "constructor", f2), o(f2, "constructor", l2), l2.dis
16612playName = "GeneratorFunction", o(f2, s2, "GeneratorFunction"), o(h), o(h, s2, "Generator"), o(h, i2, function() {
16613            return this;
16614          }), o(h, "toString", function() {
16615            return "[object Generator]";
16616          }), (n = function() {
16617            return { w: a2, m: y };
16618          })();
16619        }
16620        function o(t3, e3, r3, n2) {
16621          var i2 = Object.defineProperty;
16622          try {
16623            i2({}, "", {});
16624          } catch (t4) {
16625            i2 = 0;
16626          }
16627          o = function(t4, e4, r4, n3) {
16628            function s2(e5, r5) {
16629              o(t4, e5, function(t5) {
16630                return this._invoke(e5, r5, t5);
16631              });
16632            }
16633            e4 ? i2 ? i2(t4, e4, { value: r4, enumerable: !n3, configurable: !n3, writable: !n3 }) : t4[e4] = r4 : (s2("next", 0), s2("throw", 1), s2("return", 2));
16634          }, o(t3, e3, r3, n2);
16635        }
16636        function i(t3, e3, r3, n2, o2, i2, s2) {
16637          try {
16638            var a2 = t3[i2](s2), u2 = a2.value;
16639          } catch (t4) {
16640            return void r3(t4);
16641          }
16642          a2.done ? e3(u2) : Promise.resolve(u2).then(n2, o2);
16643        }
16644        function s(t3) {
16645          return s = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
16646            return typeof t4;
16647          } : function(t4) {
16648            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
16649          }, s(t3);
16650        }
16651        var a = r2(2400), u = r2(2746), c = r2(3303)._, l = r2(7352), f = r2(8768);
16652        function p(t3, e3, r3, n2, o2) {
16653          if ("object" === s(n2) && null != n2 && null == o2 && (o2 = n2, n2 = void 0), null != r3) {
16654            var i2 = { isNew: r3.isNew };
16655            "defaults" in r3.$__ && (i2.defaults = r3.$__.defaults), o2 = Object.assign(i2, o2);
16656          }
16657          null != o2 && null != o2.path && (this.$basePath = o2.path), a.call(this, t3, e3, n2, o2), delete this.$__.priorDoc;
16658        }
16659        t2.exports = p, p.prototype = Object.create(a.prototype), Object.defineProperty(p.prototype, "$isSubdocument", { configurable: false, writable: false, value: true }), Object.defineProperty(p.prototype, "$isSingleNested", { configurable: false, writable: false, value: true }), p.prototype.toBSON = function() {
16660          return this.toObject(c);
16661        }, p.prototype.save = (function() {
16662          var t3, e3 = (t3 = n().m(function t4(e4) {
16663            var r3 = this;
16664            return n().w(function(t5) {
16665              for (; ; ) if (0 === t5.n) return (e4 = e4 || {}).suppressWarning || f.warn("mongoose: calling `save()` on a subdoc does **not** save the document to MongoDB, it only runs save middleware. Use `subdoc.save({ suppressWarning: true })` to hide this warning if you're sure this behavior is right for your app."), t5.a(2, new Promise(function(t6, e5) {
16666                r3.$__save(function(n2) {
16667                  if (null != n2) return e5(n2);
16668                  t6(r3);
16669                });
16670              }));
16671            }, t4);
16672          }), function() {
16673            var e4 = this, r3 = arguments;
16674            return new Promise(function(n2, o2) {
16675              var s2 = t3.apply(e4, r3);
16676              function a2(t4) {
16677                i(s2, n2, o2, a2, u2, "next", t4);
16678              }
16679              function u2(t4) {
16680                i(s2, n2, o2, a2, u2, "throw", t4);
16681              }
16682              a2(void 0);
16683            });
16684          });
16685          return function(t4) {
16686            return e3.apply(this, arguments);
16687          };
16688        })(), p.prototype.$__fullPath = function(t3) {
16689          return this.$__.fullPath || this.ownerDocument(), t3 ? this.$__.fullPath + "." + t3 : this.$__.fullPath;
16690        }, p.prototype.$__pathRelativeToParent = function(t3) {
16691          return null == t3 ? this.$basePath : [this.$basePath, t3].join(".");
16692        }, p.prototype.$__save = function(t3) {
16693          var e3 = this;
16694          return u(function() {
16695            return t3(null, e3);
16696          });
16697        }, p.prototype.$isValid = function(t3) {
16698          var e3 = this.$parent(), r3 = this.$__pathRelativeToParent(t3);
16699          return null != e3 && null != r3 ? e3.$isValid(r3) : a.prototype.$isValid.call(this, t3);
16700        }, p.prototype.markModified = function(t3) {
16701          a.prototype.markModified.call(this, t3);
16702          var e3 = this.$parent(), r3 = this.$__pathRelativeToParent(t3);
16703          if (null != e3 && null != r3) {
16704            var n2 = this.$__pathRelativeToParent().replace(/\.$/, "");
16705            e3.isDirectModified(n2) || this.isNew || this.$__parent.markModified(r3, this);
16706          }
16707        }, p.prototype.isModified = function(t3, e3, r3) {
16708          var n2 = this, o2 = this.$parent();
16709          return null != o2 ? (Array.isArray(t3) || "string" == typeof t3 ? t3 = (t3 = Array.isArray(t3) ? t3 : t3.split(" ")).map(function(t4) {
16710            return n2.$__pathRelativeToParent(t4);
16711          }).filter(function(t4) {
16712            return null != t4;
16713          }) : t3 || (t3 = this.$__pathRelativeToParent()), o2.$isModified(t3, e3, r3)) : a.prototype.isModified.call(this, t3, e3, r3);
16714        }, p.prototype.$markValid = function(t3) {
16715          a.prototype.$markValid.call(this, t3);
16716          var e3 = this.$parent(), r3 = this.$__pathRelativeToParent(t3);
16717          null != e3 && null != r3 && e3.$markValid(r3);
16718        }, p.prototype.invalidate = function(t3, e3, r3) {
16719          a.prototype.invalidate.call(this, t3, e3, r3);
16720          var n2 = this.$parent(), o2 = this.$__pathRelativeToParent(t3);
16721          if (null != n2 && null != o2) n2.invalidate(o2, e3, r3);
16722          else if ("cast" === e3.kind || "CastError" === e3.name || null == o2) throw e3;
16723          return this.ownerDocument().$__.validationError;
16724        }, p.prototype.$ignore = function(t3) {
16725          a.prototype.$ignore.call(this, t3);
16726          var e3 = this.$parent(), r3 = this.$__pathRelativeToParent(t3);
16727          null != e3 && null != r3 && e3.$ignore(r3);
16728        }, p.prototype.ownerDocument = function() {
16729          if (this.$__.ownerDocument) return this.$__.ownerDocument;
16730          for (var t3 = this, e3 = [], r3 = /* @__PURE__ */ new Set([t3]); "function" == typeof t3.$__pathRelativeToParent; ) {
16731            e3.unshift(t3.$__pathRelativeToParent(void 0, true));
16732            var n2 = t3.$parent();
16733            if (null == n2) break;
16734            if (t3 = n2, r3.has(t3)) throw new Error("Infinite subdocument loop: subdoc with _id " + t3._id + " is a parent of itself");
16735            r3.add(t3);
16736          }
16737          return this.$__.fullPath = e3.join("."), this.$__.ownerDocument = t3, this.$__.ownerDocument;
16738        }, p.prototype.$__fullPathWithIndexes = function() {
16739          for (var t3 = this, e3 = [], r3 = /* @__PURE__ */ new Set([t3]); "function" == typeof t3.$__pathRelativeToParent; ) {
16740            e3.unshift(t3.$__pathRelativeToParent(void 0, false));
16741            var n2 = t3.$parent();
16742            if (null == n2) break;
16743            if (t3 = n2, r3.has(t3)) throw new Error("Infinite subdocument loop: subdoc with _id " + t3._id + " is a parent of itself");
16744            r3.add(t3);
16745          }
16746          return e3.join(".");
16747        }, p.prototype.parent = function() {
16748          return this.$__parent;
16749        }, p.prototype.$parent = p.prototype.parent, p.prototype.$__deleteOne = function(t3) {
16750          if (null != t3) return t3(null, this);
16751        }, p.prototype.$__removeFromParent = function() {
16752          this.$__parent.set(this.$basePath, null);
16753        }, p.prototype.deleteOne = function(t3, e3) {
16754          if ("function" == typeof t3 && (e3 = t3, t3 = null), (function(t4) {
16755            var e4 = t4.ownerDocument();
16756            function r4() {
16757              e4.$removeListener("save", r4), e4.$removeListener("deleteOne", r4), t4.emit("deleteOne", t4), t4.constructor.emit("deleteOne", t4);
16758            }
16759            e4.$on("save", r4), e4.$on("deleteOne", r4);
16760          })(this), !t3 || !t3.noop) {
16761            this.$__removeFromParent();
16762            var r3 = this.ownerDocument();
16763            r3.$__.removedSubdocs = r3.$__.removedSubdocs || [], r3.$__.removedSubdocs.push(this);
16764          }
16765          return this.$__deleteOne(e3);
16766        }, p.prototype.populate = function() {
16767          throw new Error('Mongoose does not support calling populate() on nested docs. Instead of `doc.nested.populate("path")`, use `doc.populate("nested.path")`');
16768        }, p.prototype.inspect = function() {
16769          return this.toObject();
16770        }, l.inspect.custom && (p.prototype[l.inspect.custom] = p.prototype.inspect), p.prototype.$toObject = function(t3, e3) {
16771          var r3, n2, o2, i2, s2 = a.prototype.$toObject.call(this, t3, e3);
16772          if (0 !== Object.keys(s2).length || null == (null == t3 ? void 0 : t3._calledWithOptions) || !(null !== (r3 = null !== (n2 = null === (o2 = t3._calledWithOptions) || void 0 === o2 ? void 0 : o2.minimize) && void 0 !== n2 ? n2 : null == this || null === (i2 = this.$__schemaTypeOptions) || void 0 === i2 ? void 0 : i2.minimize) && void 0 !== r3 ? r3 : t3.minimize) || this.constructor.$__required) return s2;
16773        };
16774      }, 9460: (t2, e2, r2) => {
16775        var n = r2(5832).hp, o = r2(3609);
16776        function i(t3, e3) {
16777          var r3 = Number(e3);
16778          if (isNaN(r3)) throw new o("number", e3, t3);
16779          return r3;
16780        }
16781        t2.exports = function(t3) {
16782          var e3 = this;
16783          return Array.isArray(t3) ? t3.map(function(t4) {
16784            return i(e3.path, t4);
16785          }) : n.isBuffer(t3) ? t3 : i(e3.path, t3);
16786        };
16787      }, 9471: (t2) => {
16788        t2.exports = Math.abs;
16789      }, 9528: (t2, e2, r2) => {
16790        function n(t3) {
16791          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
16792            return typeof t4;
16793          } : function(t4) {
16794            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
16795          }, n(t3);
16796        }
16797        function o() {
16798          try {
16799            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
16800            }));
16801          } catch (t4) {
16802          }
16803          return (o = function() {
16804            return !!t3;
16805          })();
16806        }
16807        function i(t3) {
16808          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
16809            return t4.__proto__ || Object.getPrototypeOf(t4);
16810          }, i(t3);
16811        }
16812        function s(t3, e3) {
16813          return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
16814            return t4.__proto__ = e4, t4;
16815          }, s(t3, e3);
16816        }
16817        var a = (function(t3) {
16818          function e3() {
16819            return (function(t4, e4) {
16820              if (!(t4 instanceof e4)) throw new TypeError("Cannot call a class as a function");
16821            })(this, e3), (function(t4, e4, r4) {
16822              return e4 = i(e4), (function(t5, e5) {
16823                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
16824                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
16825                return (function(t6) {
16826                  if (void 0 === t6) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
16827                  return t6;
16828                })(t5);
16829              })(t4, o() ? Reflect.construct(e4, r4 || [], i(t4).constructor) : e4.apply(t4, r4));
16830            })(this, e3, arguments);
16831          }
16832          return (function(t4, e4) {
16833            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
16834            t4.prototype = Object.create(e4 && e4.prototype, { c
16834onstructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && s(t4, e4);
16835          })(e3, t3), r3 = e3, Object.defineProperty(r3, "prototype", { writable: false }), r3;
16836          var r3;
16837        })(r2(8879)), u = r2(5761);
16838        Object.defineProperty(a.prototype, "enum", u), Object.defineProperty(a.prototype, "match", u), Object.defineProperty(a.prototype, "lowercase", u), Object.defineProperty(a.prototype, "trim", u), Object.defineProperty(a.prototype, "uppercase", u), Object.defineProperty(a.prototype, "minLength", u), Object.defineProperty(a.prototype, "minlength", u), Object.defineProperty(a.prototype, "maxLength", u), Object.defineProperty(a.prototype, "maxlength", u), Object.defineProperty(a.prototype, "populate", u), t2.exports = a;
16839      }, 9538: (t2, e2, r2) => {
16840        function n(t3) {
16841          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
16842            return typeof t4;
16843          } : function(t4) {
16844            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
16845          }, n(t3);
16846        }
16847        function o(t3, e3) {
16848          for (var r3 = 0; r3 < e3.length; r3++) {
16849            var n2 = e3[r3];
16850            n2.enumerable = n2.enumerable || false, n2.configurable = true, "value" in n2 && (n2.writable = true), Object.defineProperty(t3, i(n2.key), n2);
16851          }
16852        }
16853        function i(t3) {
16854          var e3 = (function(t4) {
16855            if ("object" != n(t4) || !t4) return t4;
16856            var e4 = t4[Symbol.toPrimitive];
16857            if (void 0 !== e4) {
16858              var r3 = e4.call(t4, "string");
16859              if ("object" != n(r3)) return r3;
16860              throw new TypeError("@@toPrimitive must return a primitive value.");
16861            }
16862            return String(t4);
16863          })(t3);
16864          return "symbol" == n(e3) ? e3 : e3 + "";
16865        }
16866        function s() {
16867          try {
16868            var t3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
16869            }));
16870          } catch (t4) {
16871          }
16872          return (s = function() {
16873            return !!t3;
16874          })();
16875        }
16876        function a(t3) {
16877          return a = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t4) {
16878            return t4.__proto__ || Object.getPrototypeOf(t4);
16879          }, a(t3);
16880        }
16881        function u(t3, e3) {
16882          return u = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t4, e4) {
16883            return t4.__proto__ = e4, t4;
16884          }, u(t3, e3);
16885        }
16886        var c = r2(8213), l = (function(t3) {
16887          function e3(t4, r4) {
16888            var o2;
16889            !(function(t5, e4) {
16890              if (!(t5 instanceof e4)) throw new TypeError("Cannot call a class as a function");
16891            })(this, e3);
16892            var i3 = t4.message;
16893            i3 || (i3 = c.messages.general.default);
16894            var u2 = f(i3, t4, r4);
16895            return o2 = (function(t5, e4, r5) {
16896              return e4 = a(e4), (function(t6, e5) {
16897                if (e5 && ("object" == n(e5) || "function" == typeof e5)) return e5;
16898                if (void 0 !== e5) throw new TypeError("Derived constructors may only return object or undefined");
16899                return (function(t7) {
16900                  if (void 0 === t7) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
16901                  return t7;
16902                })(t6);
16903              })(t5, s() ? Reflect.construct(e4, r5 || [], a(t5).constructor) : e4.apply(t5, r5));
16904            })(this, e3, [u2]), t4 = Object.assign({}, t4, { message: u2 }), o2.properties = t4, o2.kind = t4.type, o2.path = t4.path, o2.value = t4.value, o2.reason = t4.reason, o2;
16905          }
16906          return (function(t4, e4) {
16907            if ("function" != typeof e4 && null !== e4) throw new TypeError("Super expression must either be null or a function");
16908            t4.prototype = Object.create(e4 && e4.prototype, { constructor: { value: t4, writable: true, configurable: true } }), Object.defineProperty(t4, "prototype", { writable: false }), e4 && u(t4, e4);
16909          })(e3, t3), r3 = e3, (i2 = [{ key: "toString", value: function() {
16910            return this.message;
16911          } }, { key: "toJSON", value: function() {
16912            return Object.assign({ name: this.name, message: this.message }, this);
16913          } }]) && o(r3.prototype, i2), Object.defineProperty(r3, "prototype", { writable: false }), r3;
16914          var r3, i2;
16915        })(c);
16916        function f(t3, e3, r3) {
16917          if ("function" == typeof t3) return t3(e3, r3);
16918          for (var n2 = 0, o2 = Object.keys(e3); n2 < o2.length; n2++) {
16919            var i2 = o2[n2];
16920            "message" !== i2 && (t3 = t3.replace("{" + i2.toUpperCase() + "}", e3[i2]));
16921          }
16922          return t3;
16923        }
16924        Object.defineProperty(l.prototype, "name", { value: "ValidatorError" }), Object.defineProperty(l.prototype, "properties", { enumerable: false, writable: true, value: null }), l.prototype.formatMessage = f, t2.exports = l;
16925      }, 9539: (t2) => {
16926        function e2(t3, e3) {
16927          return (function(t4) {
16928            if (Array.isArray(t4)) return t4;
16929          })(t3) || (function(t4, e4) {
16930            var r3 = null == t4 ? null : "undefined" != typeof Symbol && t4[Symbol.iterator] || t4["@@iterator"];
16931            if (null != r3) {
16932              var n, o, i, s, a = [], u = true, c = false;
16933              try {
16934                if (i = (r3 = r3.call(t4)).next, 0 === e4) ;
16935                else for (; !(u = (n = i.call(r3)).done) && (a.push(n.value), a.length !== e4); u = true) ;
16936              } catch (t5) {
16937                c = true, o = t5;
16938              } finally {
16939                try {
16940                  if (!u && null != r3.return && (s = r3.return(), Object(s) !== s)) return;
16941                } finally {
16942                  if (c) throw o;
16943                }
16944              }
16945              return a;
16946            }
16947          })(t3, e3) || (function(t4, e4) {
16948            if (t4) {
16949              if ("string" == typeof t4) return r2(t4, e4);
16950              var n = {}.toString.call(t4).slice(8, -1);
16951              return "Object" === n && t4.constructor && (n = t4.constructor.name), "Map" === n || "Set" === n ? Array.from(t4) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? r2(t4, e4) : void 0;
16952            }
16953          })(t3, e3) || (function() {
16954            throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
16955          })();
16956        }
16957        function r2(t3, e3) {
16958          (null == e3 || e3 > t3.length) && (e3 = t3.length);
16959          for (var r3 = 0, n = Array(e3); r3 < e3; r3++) n[r3] = t3[r3];
16960          return n;
16961        }
16962        t2.exports = function(t3, r3, n) {
16963          for (var o = {}, i = 0, s = Object.keys(r3.tree); i < s.length; i++) {
16964            var a = s[i];
16965            n && (t3.paths[a] || t3.nested[a] || t3.singleNestedPaths[a]) || (o[a] = r3.tree[a]);
16966          }
16967          t3.options._isMerging = true, t3.add(o, null), delete t3.options._isMerging, t3.callQueue = t3.callQueue.concat(r3.callQueue), t3.method(r3.methods), t3.static(r3.statics);
16968          for (var u = 0, c = Object.entries(r3._userProvidedOptions); u < c.length; u++) {
16969            var l = e2(c[u], 2), f = l[0], p = l[1];
16970            f in t3._userProvidedOptions || t3.set(f, p);
16971          }
16972          for (var h in r3.query) t3.query[h] = r3.query[h];
16973          for (var y in r3.virtuals) t3.virtuals[y] = r3.virtuals[y].clone();
16974          t3._indexes = t3._indexes.concat(r3._indexes || []), t3.s.hooks.merge(r3.s.hooks, false);
16975        };
16976      }, 9553: (t2, e2, r2) => {
16977        var n = r2(5832).hp;
16978        function o(t3) {
16979          return o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
16980            return typeof t4;
16981          } : function(t4) {
16982            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
16983          }, o(t3);
16984        }
16985        var i = r2(9639), s = r2(2402);
16986        t2.exports = function(t3) {
16987          return null == t3 ? t3 : "object" === o(t3) && "string" == typeof t3.$numberDecimal ? i.fromString(t3.$numberDecimal) : t3 instanceof i ? t3 : "string" == typeof t3 ? i.fromString(t3) : "function" == typeof n && n.isBuffer(t3) || "function" == typeof Uint8Array && t3 instanceof Uint8Array ? new i(t3) : "number" == typeof t3 ? i.fromString(String(t3)) : "function" == typeof t3.valueOf && "string" == typeof t3.valueOf() ? i.fromString(t3.valueOf()) : void s.ok(false);
16988        };
16989      }, 9600: (t2, e2, r2) => {
16990        e2.Array = r2(7557), e2.Buffer = r2(6365), e2.Document = e2.Embedded = r2(6547), e2.DocumentArray = r2(4878), e2.Double = r2(2822), e2.Decimal128 = r2(9639), e2.ObjectId = r2(5549), e2.Map = r2(2081), e2.Subdocument = r2(9380), e2.UUID = r2(1344);
16991      }, 9604: (t2, e2, r2) => {
16992        var n = r2(5558).p, o = r2(5558).G;
16993        function i(t3, e3) {
16994          switch (t3.$geometry.type) {
16995            case "Polygon":
16996            case "LineString":
16997            case "Point":
16998              n(t3.$geometry.coordinates, e3);
16999          }
17000          return s(e3, t3), t3;
17001        }
17002        function s(t3, e3) {
17003          e3.$maxDistance && (e3.$maxDistance = o.call(t3, e3.$maxDistance)), e3.$minDistance && (e3.$minDistance = o.call(t3, e3.$minDistance));
17004        }
17005        e2.cast$geoIntersects = function(t3) {
17006          if (t3.$geometry) return i(t3, this), t3;
17007        }, e2.cast$near = function(t3) {
17008          var e3 = r2(7760);
17009          if (Array.isArray(t3)) return n(t3, this), t3;
17010          if (s(this, t3), t3 && t3.$geometry) return i(t3, this);
17011          if (!Array.isArray(t3)) throw new TypeError("$near must be either an array or an object with a $geometry property");
17012          return e3.prototype.castForQuery.call(this, null, t3);
17013        }, e2.cast$within = function(t3) {
17014          var e3 = this;
17015          if (s(this, t3), t3.$box || t3.$polygon) {
17016            var r3 = t3.$box ? "$box" : "$polygon";
17017            t3[r3].forEach(function(t4) {
17018              if (!Array.isArray(t4)) throw new TypeError("Invalid $within $box argument. Expected an array, received " + t4);
17019              t4.forEach(function(r4, n3) {
17020                t4[n3] = o.call(e3, r4);
17021              });
17022            });
17023          } else if (t3.$center || t3.$centerSphere) {
17024            var n2 = t3.$center ? "$center" : "$centerSphere";
17025            t3[n2].forEach(function(r4, i2) {
17026              Array.isArray(r4) ? r4.forEach(function(t4, n3) {
17027                r4[n3] = o.call(e3, t4);
17028              }) : t3[n2][i2] = o.call(e3, r4);
17029            });
17030          } else t3.$geometry && i(t3, this);
17031          return t3;
17032        };
17033      }, 9639: (t2, e2, r2) => {
17034        t2.exports = r2(6353).Decimal128;
17035      }, 9696: (t2) => {
17036        var e2 = /^function\s*([^\s(]+)/;
17037        t2.exports = function(t3) {
17038          return t3.name || (t3.toString().trim().match(e2) || [])[1];
17039        };
17040      }, 9809: (t2) => {
17041        function e2(t3) {
17042          return e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
17043            return typeof t4;
17044          } : function(t4) {
17045            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
17046          }, e2(t3);
17047        }
17048        var r2, n, o = Function.prototype.toString, i = "object" === ("undefined" == typeof Reflect ? "undefined" : e2(Reflect)) && null !== Reflect && Reflect.apply;
17049        if ("function" == typeof i && "function" == typeof Object.defineProperty) try {
17050          r2 = Object.defineProperty({}, "length", { get: function() {
17051            throw n;
17052          } }), n = {}, i(function() {
17053            throw 42;
17054          }, null, r2);
17055        } catch (t3) {
17056          t3 !== n && (i = null);
17057        }
17058        else i = null;
17059        var s = /^\s*class\b/, a = function(t3) {
17060          try {
17061            var e3 = o.call(t3);
17062            return s.test(e3);
17063          } catch (t4) {
17064            return false;
17065          }
17066        }, u = function(t3) {
17067          try {
17068            return !a(t3) && (o.call(t3), true);
17069          } catch (t4) {
17070            return false;
17071          }
17072        }, c = Object.prototype.toString, l = "function" == typeof Symbol && !!Symbol.toStringTag, f = !(0 in [,]), p = function() {
17073          return false;
17074        };
17075        if ("object" === ("undefined" == typeof document ? "undefined" : e2(document))) {
17076          var h = document.all;
17077          c.call(h) === c.call(document.all) && (p = function(t3) {
17078            if ((f || !t3) && (void 0 === t3 || "object" === e2(t3))) try {
17079              var r3 = c.call(t3);
17080              return ("[object HTMLAllCollection]" === r3 || "[object HTML document.all class]" === r3 || "[object HTMLCollection]" === r3 || "[object Object]" === r3) && null == t3("");
17081            } catch (t4) {
17082            }
17083            return false;
17084          });
17085        }
17086        t2.exports = i ? function(t3) {
17087          if (p(t3)) return true;
17088          if (!t3) return false;
17089          if ("function" != typeof t3 && "object" !== e2(t3)) return false;
17090          try {
17091            i(t3, null, r2);
17092          } catch (t4) {
17093            if (t4 !== n) return false;
17094          }
17095          return !a(t3) && u(t3);
17096        } : function(t3) {
17097          if (p(t3)) return true;
17098          if (!t3) return false;
17099          if ("function" != typeof t3 && "object" !== e2(t3)) return false;
17100          if (l) return u(t3);
17101          if (a(t3)) return false;
17102          var r3 = c.call(t3);
17103          return !("[object Function]" !== r3 && "[object GeneratorFunction]" !== r3 && !/^\[object HTML/.test(r3)) && u(t3);
17104        };
17105      }, 9834: (t2, e2, r2) => {
17106        function n(t3) {
17107          return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
17108            return typeof t4;
17109          } : function(t4) {
17110            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
17111          }, n(t3);
17112        }
17113        var o = r2(3777), i = r2(3426), s = r2(9122), a = r2(3071), u = r2(1464), c = r2(209), l = a("Object.prototype.toString"), f = r2(953)(), p = "undefined" == typeof globalThis ? r2.g : globalThis, h = i(), y = a("String.prototype.slice"), d = a("Array.prototype.indexOf", true) || function(t3, e3) {
17114          for (var r3 = 0; r3 < t3.length; r3 += 1) if (t3[r3] === e3) return r3;
17115          return -1;
17116        }, b = { __proto__: null };
17117        o(h, f && u && c ? function(t3) {
17118          var e3 = new p[t3]();
17119          if (Symbol.toStringTag in e3 && c) {
17120            var r3 = c(e3), n2 = u(r3, Symbol.toStringTag);
17121            if (!n2 && r3) {
17122              var o2 = c(r3);
17123              n2 = u(o2, Symbol.toStringTag);
17124            }
17125            b["$" + t3] = s(n2.get);
17126          }
17127        } : function(t3) {
17128          var e3 = new p[t3](), r3 = e3.slice || e3.set;
17129          r3 && (b["$" + t3] = s(r3));
17130        }), t2.exports = function(t3) {
17131          if (!t3 || "object" !== n(t3)) return false;
17132          if (!f) {
17133            var e3 = y(l(t3), 8, -1);
17134            return d(h, e3) > -1 ? e3 : "Object" === e3 && (function(t4) {
17135              var e4 = false;
17136              return o(b, function(r3, n2) {
17137                if (!e4) try {
17138                  r3(t4), e4 = y(n2, 1);
17139                } catch (t5) {
17140                }
17141              }), e4;
17142            })(t3);
17143          }
17144          return u ? (function(t4) {
17145            var e4 = false;
17146            return o(b, function(r3, n2) {
17147              if (!e4) try {
17148                "$" + r3(t4) === n2 && (e4 = y(n2, 1));
17149              } catch (t5) {
17150              }
17151            }), e4;
17152          })(t3) : null;
17153        };
17154      }, 9848: (t2) => {
17155        function e2(t3) {
17156          return e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
17157            return typeof t4;
17158          } : function(t4) {
17159            return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
17160          }, e2(t3);
17161        }
17162        t2.exports = function(t3) {
17163          t3.pre("save", false, function(t4, r2) {
17164            var n = this, o = this;
17165            if (this.$isSubdocument) return t4();
17166            if (r2 && "object" === e2(r2) && "validateBeforeSave" in r2 ? r2.validateBeforeSave : this.$__schema.options.validateBeforeSave) {
17167              var i = r2 && "object" === e2(r2) && "validateModifiedOnly" in r2 ? { validateModifiedOnly: r2.validateModifiedOnly } : null;
17168              this.$validate(i).then(function() {
17169                n.$op = "save", t4();
17170              }, function(e3) {
17171                o.$__schema.s.hooks.execPost("save:error", o, [o], { error: e3 }, function(e4) {
17172                  o.$op = "save", t4(e4);
17173                });
17174              });
17175            } else t4();
17176          }, null, true);
17177        };
17178      }, 9870: (t2) => {
17179        t2.exports = Error;
17180      }, 9907: (t2) => {
17181        t2.exports = SyntaxError;
17182      }, 9939: (t2) => {
17183        t2.exports = RangeError;
17184      } }, e = {};
17185      function r(n) {
17186        var o = e[n];
17187        if (void 0 !== o) return o.exports;
17188        var i = e[n] = { exports: {} };
17189        return t[n](i, i.exports, r), i.exports;
17190      }
17191      return r.d = (t2, e2) => {
17192        for (var n in e2) r.o(e2, n) && !r.o(t2, n) && Object.defineProperty(t2, n, { enumerable: true, get: e2[n] });
17193      }, r.g = (function() {
17194        if ("object" == typeof globalThis) return globalThis;
17195        try {
17196          return this || new Function("return this")();
17197        } catch (t2) {
17198          if ("object" == typeof window) return window;
17199        }
17200      })(), r.o = (t2, e2) => Object.prototype.hasOwnProperty.call(t2, e2), r.r = (t2) => {
17201        "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true });
17202      }, r(4829);
17203    })());
17204  })(browser_umd$1);
17205  return browser_umd$1.exports;
17206}
17207var browser_umdExports = requireBrowser_umd();
17208const pkg = /* @__PURE__ */ getDefaultExportFromCjs(browser_umdExports);
17209export {
17210  contractPartyTypes as a,
17211  businessStates as b,
17212  contractPartyRoles as c,
17213  contractStatuses as d,
17214  contractTypes as e,
17215  formatContractStatusLabel as f,
17216  contractTypeTitles as g,
17217  countries as h,
17218  isPostSignatureContractStatus as i,
17219  getVarsMemberValues as j,
17220  getAvailableVarsMembers as k,
17221  getDefaultExportFromCjs as l,
17222  pkg as p,
17223  transactencyInfo as t
17224};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.