Skip to content

Instantly share code, notes, and snippets.

@SamSaffron
Created August 13, 2024 08:06
Show Gist options
  • Save SamSaffron/bbf2cbb7e8fdf794fa0a88db689ddd24 to your computer and use it in GitHub Desktop.
Save SamSaffron/bbf2cbb7e8fdf794fa0a88db689ddd24 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
window = globalThis;
window.devicePixelRatio = 2;
ABCABD
typeof window.markdownitABCABDvar rails = {
logger: {
info: function(){},
warn: function(){},
error: function(){}
}
};
ABCABDtypeof window.markdownitABCABDconsole = {
prefix: "[PrettyText] ",
log: function(...args){ rails.logger.info(console.prefix + args.join(" ")); },
warn: function(...args){ rails.logger.warn(console.prefix + args.join(" ")); },
error: function(...args){ rails.logger.error(console.prefix + args.join(" ")); }
}
ABCABDtypeof window.markdownitABCABD__PRETTY_TEXT = trueABCABDtypeof window.markdownitABCABDvar __helpers = {};ABCABDtypeof window.markdownitABCABD__helpers.t = function() {}ABCABDtypeof window.markdownitABCABD__helpers.avatar_template = function() {}ABCABDtypeof window.markdownitABCABD__helpers.lookup_primary_user_group = function() {}ABCABDtypeof window.markdownitABCABD__helpers.lookup_upload_urls = function() {}ABCABDtypeof window.markdownitABCABD__helpers.get_topic_info = function() {}ABCABDtypeof window.markdownitABCABD__helpers.hashtag_lookup = function() {}ABCABDtypeof window.markdownitABCABD__helpers.get_current_user = function() {}ABCABDtypeof window.markdownitABCABD__helpers.format_username = function() {}ABCABDtypeof window.markdownitABCABDvar loader, define, requireModule, require, requirejs;
(function (global) {
'use strict';
function dict() {
var obj = Object.create(null);
obj['__'] = undefined;
delete obj['__'];
return obj;
}
// Save off the original values of these globals, so we can restore them if someone asks us to
var oldGlobals = {
loader: loader,
define: define,
requireModule: requireModule,
require: require,
requirejs: requirejs
};
requirejs = require = requireModule = function (id) {
var pending = [];
var mod = findModule(id, '(require)', pending);
for (var i = pending.length - 1; i >= 0; i--) {
pending[i].exports();
}
return mod.module.exports;
};
loader = {
noConflict: function (aliases) {
var oldName, newName;
for (oldName in aliases) {
if (aliases.hasOwnProperty(oldName)) {
if (oldGlobals.hasOwnProperty(oldName)) {
newName = aliases[oldName];
global[newName] = global[oldName];
global[oldName] = oldGlobals[oldName];
}
}
}
},
// Option to enable or disable the generation of default exports
makeDefaultExport: true
};
var registry = dict();
var seen = dict();
var uuid = 0;
function unsupportedModule(length) {
throw new Error('an unsupported module was defined, expected `define(id, deps, module)` instead got: `' + length + '` arguments to define`');
}
var defaultDeps = ['require', 'exports', 'module'];
function Module(id, deps, callback, alias) {
this.uuid = uuid++;
this.id = id;
this.deps = !deps.length && callback.length ? defaultDeps : deps;
this.module = { exports: {} };
this.callback = callback;
this.hasExportsAsDep = false;
this.isAlias = alias;
this.reified = new Array(deps.length);
/*
Each module normally passes through these states, in order:
new : initial state
pending : this module is scheduled to be executed
reifying : this module's dependencies are being executed
reified : this module's dependencies finished executing successfully
errored : this module's dependencies failed to execute
finalized : this module executed successfully
*/
this.state = 'new';
}
Module.prototype.makeDefaultExport = function () {
var exports = this.module.exports;
if (exports !== null && (typeof exports === 'object' || typeof exports === 'function') && exports['default'] === undefined && Object.isExtensible(exports)) {
exports['default'] = exports;
}
};
Module.prototype.exports = function () {
// if finalized, there is no work to do. If reifying, there is a
// circular dependency so we must return our (partial) exports.
if (this.state === 'finalized' || this.state === 'reifying') {
return this.module.exports;
}
if (loader.wrapModules) {
this.callback = loader.wrapModules(this.id, this.callback);
}
this.reify();
var result = this.callback.apply(this, this.reified);
this.reified.length = 0;
this.state = 'finalized';
if (!(this.hasExportsAsDep && result === undefined)) {
this.module.exports = result;
}
if (loader.makeDefaultExport) {
this.makeDefaultExport();
}
return this.module.exports;
};
Module.prototype.unsee = function () {
this.state = 'new';
this.module = { exports: {} };
};
Module.prototype.reify = function () {
if (this.state === 'reified') {
return;
}
this.state = 'reifying';
try {
this.reified = this._reify();
this.state = 'reified';
} finally {
if (this.state === 'reifying') {
this.state = 'errored';
}
}
};
Module.prototype._reify = function () {
var reified = this.reified.slice();
for (var i = 0; i < reified.length; i++) {
var mod = reified[i];
reified[i] = mod.exports ? mod.exports : mod.module.exports();
}
return reified;
};
Module.prototype.findDeps = function (pending) {
if (this.state !== 'new') {
return;
}
this.state = 'pending';
var deps = this.deps;
for (var i = 0; i < deps.length; i++) {
var dep = deps[i];
var entry = this.reified[i] = { exports: undefined, module: undefined };
if (dep === 'exports') {
this.hasExportsAsDep = true;
entry.exports = this.module.exports;
} else if (dep === 'require') {
entry.exports = this.makeRequire();
} else if (dep === 'module') {
entry.exports = this.module;
} else {
entry.module = findModule(resolve(dep, this.id), this.id, pending);
}
}
};
Module.prototype.makeRequire = function () {
var id = this.id;
var r = function (dep) {
return require(resolve(dep, id));
};
r['default'] = r;
r.moduleId = id;
r.has = function (dep) {
return has(resolve(dep, id));
};
return r;
};
define = function (id, deps, callback) {
var module = registry[id];
// If a module for this id has already been defined and is in any state
// other than `new` (meaning it has been or is currently being required),
// then we return early to avoid redefinition.
if (module && module.state !== 'new') {
return;
}
if (arguments.length < 2) {
unsupportedModule(arguments.length);
}
if (!Array.isArray(deps)) {
callback = deps;
deps = [];
}
if (callback instanceof Alias) {
registry[id] = new Module(callback.id, deps, callback, true);
} else {
registry[id] = new Module(id, deps, callback, false);
}
};
define.exports = function (name, defaultExport) {
var module = registry[name];
// If a module for this name has already been defined and is in any state
// other than `new` (meaning it has been or is currently being required),
// then we return early to avoid redefinition.
if (module && module.state !== 'new') {
return;
}
module = new Module(name, [], noop, null);
module.module.exports = defaultExport;
module.state = 'finalized';
registry[name] = module;
return module;
};
function noop() {}
// we don't support all of AMD
// define.amd = {};
function Alias(id) {
this.id = id;
}
define.alias = function (id, target) {
if (arguments.length === 2) {
return define(target, new Alias(id));
}
return new Alias(id);
};
function missingModule(id, referrer) {
throw new Error('Could not find module `' + id + '` imported from `' + referrer + '`');
}
function findModule(id, referrer, pending) {
var mod = registry[id] || registry[id + '/index'];
while (mod && mod.isAlias) {
mod = registry[mod.id] || registry[mod.id + '/index'];
}
if (!mod) {
missingModule(id, referrer);
}
if (pending && mod.state !== 'pending' && mod.state !== 'finalized') {
mod.findDeps(pending);
pending.push(mod);
}
return mod;
}
function resolve(child, id) {
if (child.charAt(0) !== '.') {
return child;
}
var parts = child.split('/');
var nameParts = id.split('/');
var parentBase = nameParts.slice(0, -1);
for (var i = 0, l = parts.length; i < l; i++) {
var part = parts[i];
if (part === '..') {
if (parentBase.length === 0) {
throw new Error('Cannot access parent module of root');
}
parentBase.pop();
} else if (part === '.') {
continue;
} else {
parentBase.push(part);
}
}
return parentBase.join('/');
}
function has(id) {
return !!(registry[id] || registry[id + '/index']);
}
requirejs.entries = requirejs._eak_seen = registry;
requirejs.has = has;
requirejs.unsee = function (id) {
findModule(id, '(unsee)', false).unsee();
};
requirejs.clear = function () {
requirejs.entries = requirejs._eak_seen = registry = dict();
seen = dict();
};
// This code primes the JS engine for good performance by warming the
// JIT compiler for these functions.
define('foo', function () {});
define('foo/bar', [], function () {});
define('foo/asdf', ['module', 'exports', 'require'], function (module, exports, require) {
if (require.has('foo/bar')) {
require('foo/bar');
}
});
define('foo/baz', [], define.alias('foo'));
define('foo/quz', define.alias('foo'));
define.alias('foo', 'foo/qux');
define('foo/bar', ['foo', './quz', './baz', './asdf', './bar', '../foo'], function () {});
define('foo/main', ['foo/bar'], function () {});
define.exports('foo/exports', {});
require('foo/exports');
require('foo/main');
require.unsee('foo/bar');
requirejs.clear();
if (typeof exports === 'object' && typeof module === 'object' && module.exports) {
module.exports = { require: require, define: define };
}
})(this);ABCABDtypeof window.markdownitABCABD/*! markdown-it 14.0.0 https://github.com/markdown-it/markdown-it @license MIT */
(function(global, factory) {
typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self,
global.markdownit = factory());
})(this, (function() {
"use strict";
/* eslint-disable no-bitwise */ const decodeCache = {};
function getDecodeCache(exclude) {
let cache = decodeCache[exclude];
if (cache) {
return cache;
}
cache = decodeCache[exclude] = [];
for (let i = 0; i < 128; i++) {
const ch = String.fromCharCode(i);
cache.push(ch);
}
for (let i = 0; i < exclude.length; i++) {
const ch = exclude.charCodeAt(i);
cache[ch] = "%" + ("0" + ch.toString(16).toUpperCase()).slice(-2);
}
return cache;
}
// Decode percent-encoded string.
function decode$1(string, exclude) {
if (typeof exclude !== "string") {
exclude = decode$1.defaultChars;
}
const cache = getDecodeCache(exclude);
return string.replace(/(%[a-f0-9]{2})+/gi, (function(seq) {
let result = "";
for (let i = 0, l = seq.length; i < l; i += 3) {
const b1 = parseInt(seq.slice(i + 1, i + 3), 16);
if (b1 < 128) {
result += cache[b1];
continue;
}
if ((b1 & 224) === 192 && i + 3 < l) {
// 110xxxxx 10xxxxxx
const b2 = parseInt(seq.slice(i + 4, i + 6), 16);
if ((b2 & 192) === 128) {
const chr = b1 << 6 & 1984 | b2 & 63;
if (chr < 128) {
result += "\ufffd\ufffd";
} else {
result += String.fromCharCode(chr);
}
i += 3;
continue;
}
}
if ((b1 & 240) === 224 && i + 6 < l) {
// 1110xxxx 10xxxxxx 10xxxxxx
const b2 = parseInt(seq.slice(i + 4, i + 6), 16);
const b3 = parseInt(seq.slice(i + 7, i + 9), 16);
if ((b2 & 192) === 128 && (b3 & 192) === 128) {
const chr = b1 << 12 & 61440 | b2 << 6 & 4032 | b3 & 63;
if (chr < 2048 || chr >= 55296 && chr <= 57343) {
result += "\ufffd\ufffd\ufffd";
} else {
result += String.fromCharCode(chr);
}
i += 6;
continue;
}
}
if ((b1 & 248) === 240 && i + 9 < l) {
// 111110xx 10xxxxxx 10xxxxxx 10xxxxxx
const b2 = parseInt(seq.slice(i + 4, i + 6), 16);
const b3 = parseInt(seq.slice(i + 7, i + 9), 16);
const b4 = parseInt(seq.slice(i + 10, i + 12), 16);
if ((b2 & 192) === 128 && (b3 & 192) === 128 && (b4 & 192) === 128) {
let chr = b1 << 18 & 1835008 | b2 << 12 & 258048 | b3 << 6 & 4032 | b4 & 63;
if (chr < 65536 || chr > 1114111) {
result += "\ufffd\ufffd\ufffd\ufffd";
} else {
chr -= 65536;
result += String.fromCharCode(55296 + (chr >> 10), 56320 + (chr & 1023));
}
i += 9;
continue;
}
}
result += "\ufffd";
}
return result;
}));
}
decode$1.defaultChars = ";/?:@&=+$,#";
decode$1.componentChars = "";
const encodeCache = {};
// Create a lookup array where anything but characters in `chars` string
// and alphanumeric chars is percent-encoded.
function getEncodeCache(exclude) {
let cache = encodeCache[exclude];
if (cache) {
return cache;
}
cache = encodeCache[exclude] = [];
for (let i = 0; i < 128; i++) {
const ch = String.fromCharCode(i);
if (/^[0-9a-z]$/i.test(ch)) {
// always allow unencoded alphanumeric characters
cache.push(ch);
} else {
cache.push("%" + ("0" + i.toString(16).toUpperCase()).slice(-2));
}
}
for (let i = 0; i < exclude.length; i++) {
cache[exclude.charCodeAt(i)] = exclude[i];
}
return cache;
}
// Encode unsafe characters with percent-encoding, skipping already
// encoded sequences.
// - string - string to encode
// - exclude - list of characters to ignore (in addition to a-zA-Z0-9)
// - keepEscaped - don't encode '%' in a correct escape sequence (default: true)
function encode$1(string, exclude, keepEscaped) {
if (typeof exclude !== "string") {
// encode(string, keepEscaped)
keepEscaped = exclude;
exclude = encode$1.defaultChars;
}
if (typeof keepEscaped === "undefined") {
keepEscaped = true;
}
const cache = getEncodeCache(exclude);
let result = "";
for (let i = 0, l = string.length; i < l; i++) {
const code = string.charCodeAt(i);
if (keepEscaped && code === 37 /* % */ && i + 2 < l) {
if (/^[0-9a-f]{2}$/i.test(string.slice(i + 1, i + 3))) {
result += string.slice(i, i + 3);
i += 2;
continue;
}
}
if (code < 128) {
result += cache[code];
continue;
}
if (code >= 55296 && code <= 57343) {
if (code >= 55296 && code <= 56319 && i + 1 < l) {
const nextCode = string.charCodeAt(i + 1);
if (nextCode >= 56320 && nextCode <= 57343) {
result += encodeURIComponent(string[i] + string[i + 1]);
i++;
continue;
}
}
result += "%EF%BF%BD";
continue;
}
result += encodeURIComponent(string[i]);
}
return result;
}
encode$1.defaultChars = ";/?:@&=+$,-_.!~*'()#";
encode$1.componentChars = "-_.!~*'()";
function format(url) {
let result = "";
result += url.protocol || "";
result += url.slashes ? "//" : "";
result += url.auth ? url.auth + "@" : "";
if (url.hostname && url.hostname.indexOf(":") !== -1) {
// ipv6 address
result += "[" + url.hostname + "]";
} else {
result += url.hostname || "";
}
result += url.port ? ":" + url.port : "";
result += url.pathname || "";
result += url.search || "";
result += url.hash || "";
return result;
}
// Copyright Joyent, Inc. and other Node contributors.
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// Changes from joyent/node:
// 1. No leading slash in paths,
// e.g. in `url.parse('http://foo?bar')` pathname is ``, not `/`
// 2. Backslashes are not replaced with slashes,
// so `http:\\example.org\` is treated like a relative path
// 3. Trailing colon is treated like a part of the path,
// i.e. in `http://example.org:foo` pathname is `:foo`
// 4. Nothing is URL-encoded in the resulting object,
// (in joyent/node some chars in auth and paths are encoded)
// 5. `url.parse()` does not have `parseQueryString` argument
// 6. Removed extraneous result properties: `host`, `path`, `query`, etc.,
// which can be constructed using other parts of the url.
function Url() {
this.protocol = null;
this.slashes = null;
this.auth = null;
this.port = null;
this.hostname = null;
this.hash = null;
this.search = null;
this.pathname = null;
}
// Reference: RFC 3986, RFC 1808, RFC 2396
// define these here so at least they only have to be
// compiled once on the first module load.
const protocolPattern = /^([a-z0-9.+-]+:)/i;
const portPattern = /:[0-9]*$/;
// Special case for a simple path URL
/* eslint-disable-next-line no-useless-escape */ const simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/;
// RFC 2396: characters reserved for delimiting URLs.
// We actually just auto-escape these.
const delims = [ "<", ">", '"', "`", " ", "\r", "\n", "\t" ];
// RFC 2396: characters not allowed for various reasons.
const unwise = [ "{", "}", "|", "\\", "^", "`" ].concat(delims);
// Allowed by RFCs, but cause of XSS attacks. Always escape these.
const autoEscape = [ "'" ].concat(unwise);
// Characters that are never ever allowed in a hostname.
// Note that any invalid chars are also handled, but these
// are the ones that are *expected* to be seen, so we fast-path
// them.
const nonHostChars = [ "%", "/", "?", ";", "#" ].concat(autoEscape);
const hostEndingChars = [ "/", "?", "#" ];
const hostnameMaxLen = 255;
const hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/;
const hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/;
// protocols that can allow "unsafe" and "unwise" chars.
// protocols that never have a hostname.
const hostlessProtocol = {
javascript: true,
"javascript:": true
};
// protocols that always contain a // bit.
const slashedProtocol = {
http: true,
https: true,
ftp: true,
gopher: true,
file: true,
"http:": true,
"https:": true,
"ftp:": true,
"gopher:": true,
"file:": true
};
function urlParse(url, slashesDenoteHost) {
if (url && url instanceof Url) return url;
const u = new Url;
u.parse(url, slashesDenoteHost);
return u;
}
Url.prototype.parse = function(url, slashesDenoteHost) {
let lowerProto, hec, slashes;
let rest = url;
// trim before proceeding.
// This is to support parse stuff like " http://foo.com \n"
rest = rest.trim();
if (!slashesDenoteHost && url.split("#").length === 1) {
// Try fast path regexp
const simplePath = simplePathPattern.exec(rest);
if (simplePath) {
this.pathname = simplePath[1];
if (simplePath[2]) {
this.search = simplePath[2];
}
return this;
}
}
let proto = protocolPattern.exec(rest);
if (proto) {
proto = proto[0];
lowerProto = proto.toLowerCase();
this.protocol = proto;
rest = rest.substr(proto.length);
}
// figure out if it's got a host
// user@server is *always* interpreted as a hostname, and url
// resolution will treat //foo/bar as host=foo,path=bar because that's
// how the browser resolves relative URLs.
/* eslint-disable-next-line no-useless-escape */ if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) {
slashes = rest.substr(0, 2) === "//";
if (slashes && !(proto && hostlessProtocol[proto])) {
rest = rest.substr(2);
this.slashes = true;
}
}
if (!hostlessProtocol[proto] && (slashes || proto && !slashedProtocol[proto])) {
// there's a hostname.
// the first instance of /, ?, ;, or # ends the host.
// If there is an @ in the hostname, then non-host chars *are* allowed
// to the left of the last @ sign, unless some host-ending character
// comes *before* the @-sign.
// URLs are obnoxious.
// ex:
// http://a@b@c/ => user:a@b host:c
// http://a@b?@c => user:a host:c path:/?@c
// v0.12 TODO(isaacs): This is not quite how Chrome does things.
// Review our test case against browsers more comprehensively.
// find the first instance of any hostEndingChars
let hostEnd = -1;
for (let i = 0; i < hostEndingChars.length; i++) {
hec = rest.indexOf(hostEndingChars[i]);
if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {
hostEnd = hec;
}
}
// at this point, either we have an explicit point where the
// auth portion cannot go past, or the last @ char is the decider.
let auth, atSign;
if (hostEnd === -1) {
// atSign can be anywhere.
atSign = rest.lastIndexOf("@");
} else {
// atSign must be in auth portion.
// http://a@b/c@d => host:b auth:a path:/c@d
atSign = rest.lastIndexOf("@", hostEnd);
}
// Now we have a portion which is definitely the auth.
// Pull that off.
if (atSign !== -1) {
auth = rest.slice(0, atSign);
rest = rest.slice(atSign + 1);
this.auth = auth;
}
// the host is the remaining to the left of the first non-host char
hostEnd = -1;
for (let i = 0; i < nonHostChars.length; i++) {
hec = rest.indexOf(nonHostChars[i]);
if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {
hostEnd = hec;
}
}
// if we still have not hit it, then the entire thing is a host.
if (hostEnd === -1) {
hostEnd = rest.length;
}
if (rest[hostEnd - 1] === ":") {
hostEnd--;
}
const host = rest.slice(0, hostEnd);
rest = rest.slice(hostEnd);
// pull out port.
this.parseHost(host);
// we've indicated that there is a hostname,
// so even if it's empty, it has to be present.
this.hostname = this.hostname || "";
// if hostname begins with [ and ends with ]
// assume that it's an IPv6 address.
const ipv6Hostname = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
// validate a little.
if (!ipv6Hostname) {
const hostparts = this.hostname.split(/\./);
for (let i = 0, l = hostparts.length; i < l; i++) {
const part = hostparts[i];
if (!part) {
continue;
}
if (!part.match(hostnamePartPattern)) {
let newpart = "";
for (let j = 0, k = part.length; j < k; j++) {
if (part.charCodeAt(j) > 127) {
// we replace non-ASCII char with a temporary placeholder
// we need this to make sure size of hostname is not
// broken by replacing non-ASCII by nothing
newpart += "x";
} else {
newpart += part[j];
}
}
// we test again with ASCII char only
if (!newpart.match(hostnamePartPattern)) {
const validParts = hostparts.slice(0, i);
const notHost = hostparts.slice(i + 1);
const bit = part.match(hostnamePartStart);
if (bit) {
validParts.push(bit[1]);
notHost.unshift(bit[2]);
}
if (notHost.length) {
rest = notHost.join(".") + rest;
}
this.hostname = validParts.join(".");
break;
}
}
}
}
if (this.hostname.length > hostnameMaxLen) {
this.hostname = "";
}
// strip [ and ] from the hostname
// the host field still retains them, though
if (ipv6Hostname) {
this.hostname = this.hostname.substr(1, this.hostname.length - 2);
}
}
// chop off from the tail first.
const hash = rest.indexOf("#");
if (hash !== -1) {
// got a fragment string.
this.hash = rest.substr(hash);
rest = rest.slice(0, hash);
}
const qm = rest.indexOf("?");
if (qm !== -1) {
this.search = rest.substr(qm);
rest = rest.slice(0, qm);
}
if (rest) {
this.pathname = rest;
}
if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) {
this.pathname = "";
}
return this;
};
Url.prototype.parseHost = function(host) {
let port = portPattern.exec(host);
if (port) {
port = port[0];
if (port !== ":") {
this.port = port.substr(1);
}
host = host.substr(0, host.length - port.length);
}
if (host) {
this.hostname = host;
}
};
var mdurl = Object.freeze({
__proto__: null,
decode: decode$1,
encode: encode$1,
format: format,
parse: urlParse
});
var Any = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
var Cc = /[\0-\x1F\x7F-\x9F]/;
var regex = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/;
var P = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/;
var Z = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;
var ucmicro = Object.freeze({
__proto__: null,
Any: Any,
Cc: Cc,
Cf: regex,
P: P,
Z: Z
});
// Generated using scripts/write-decode-map.ts
var htmlDecodeTree = new Uint16Array(
// prettier-ignore
'\u1d41<\xd5\u0131\u028a\u049d\u057b\u05d0\u0675\u06de\u07a2\u07d6\u080f\u0a4a\u0a91\u0da1\u0e6d\u0f09\u0f26\u10ca\u1228\u12e1\u1415\u149d\u14c3\u14df\u1525\0\0\0\0\0\0\u156b\u16cd\u198d\u1c12\u1ddd\u1f7e\u2060\u21b0\u228d\u23c0\u23fb\u2442\u2824\u2912\u2d08\u2e48\u2fce\u3016\u32ba\u3639\u37ac\u38fe\u3a28\u3a71\u3ae0\u3b2e\u0800EMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig\u803b\xc6\u40c6P\u803b&\u4026cute\u803b\xc1\u40c1reve;\u4102\u0100iyx}rc\u803b\xc2\u40c2;\u4410r;\uc000\ud835\udd04rave\u803b\xc0\u40c0pha;\u4391acr;\u4100d;\u6a53\u0100gp\x9d\xa1on;\u4104f;\uc000\ud835\udd38plyFunction;\u6061ing\u803b\xc5\u40c5\u0100cs\xbe\xc3r;\uc000\ud835\udc9cign;\u6254ilde\u803b\xc3\u40c3ml\u803b\xc4\u40c4\u0400aceforsu\xe5\xfb\xfe\u0117\u011c\u0122\u0127\u012a\u0100cr\xea\xf2kslash;\u6216\u0176\xf6\xf8;\u6ae7ed;\u6306y;\u4411\u0180crt\u0105\u010b\u0114ause;\u6235noullis;\u612ca;\u4392r;\uc000\ud835\udd05pf;\uc000\ud835\udd39eve;\u42d8c\xf2\u0113mpeq;\u624e\u0700HOacdefhilorsu\u014d\u0151\u0156\u0180\u019e\u01a2\u01b5\u01b7\u01ba\u01dc\u0215\u0273\u0278\u027ecy;\u4427PY\u803b\xa9\u40a9\u0180cpy\u015d\u0162\u017aute;\u4106\u0100;i\u0167\u0168\u62d2talDifferentialD;\u6145leys;\u612d\u0200aeio\u0189\u018e\u0194\u0198ron;\u410cdil\u803b\xc7\u40c7rc;\u4108nint;\u6230ot;\u410a\u0100dn\u01a7\u01adilla;\u40b8terDot;\u40b7\xf2\u017fi;\u43a7rcle\u0200DMPT\u01c7\u01cb\u01d1\u01d6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01e2\u01f8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020foubleQuote;\u601duote;\u6019\u0200lnpu\u021e\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6a74\u0180git\u022f\u0236\u023aruent;\u6261nt;\u622fourIntegral;\u622e\u0100fr\u024c\u024e;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6a2fcr;\uc000\ud835\udc9ep\u0100;C\u0284\u0285\u62d3ap;\u624d\u0580DJSZacefios\u02a0\u02ac\u02b0\u02b4\u02b8\u02cb\u02d7\u02e1\u02e6\u0333\u048d\u0100;o\u0179\u02a5trahd;\u6911cy;\u4402cy;\u4405cy;\u440f\u0180grs\u02bf\u02c4\u02c7ger;\u6021r;\u61a1hv;\u6ae4\u0100ay\u02d0\u02d5ron;\u410e;\u4414l\u0100;t\u02dd\u02de\u6207a;\u4394r;\uc000\ud835\udd07\u0100af\u02eb\u0327\u0100cm\u02f0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031ccute;\u40b4o\u0174\u030b\u030d;\u42d9bleAcute;\u42ddrave;\u4060ilde;\u42dcond;\u62c4ferentialD;\u6146\u0470\u033d\0\0\0\u0342\u0354\0\u0405f;\uc000\ud835\udd3b\u0180;DE\u0348\u0349\u034d\u40a8ot;\u60dcqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03cf\u03e2\u03f8ontourIntegra\xec\u0239o\u0274\u0379\0\0\u037b\xbb\u0349nArrow;\u61d3\u0100eo\u0387\u03a4ft\u0180ART\u0390\u0396\u03a1rrow;\u61d0ightArrow;\u61d4e\xe5\u02cang\u0100LR\u03ab\u03c4eft\u0100AR\u03b3\u03b9rrow;\u67f8ightArrow;\u67faightArrow;\u67f9ight\u0100AT\u03d8\u03derrow;\u61d2ee;\u62a8p\u0241\u03e9\0\0\u03efrrow;\u61d1ownArrow;\u61d5erticalBar;\u6225n\u0300ABLRTa\u0412\u042a\u0430\u045e\u047f\u037crrow\u0180;BU\u041d\u041e\u0422\u6193ar;\u6913pArrow;\u61f5reve;\u4311eft\u02d2\u043a\0\u0446\0\u0450ightVector;\u6950eeVector;\u695eector\u0100;B\u0459\u045a\u61bdar;\u6956ight\u01d4\u0467\0\u0471eeVector;\u695fector\u0100;B\u047a\u047b\u61c1ar;\u6957ee\u0100;A\u0486\u0487\u62a4rrow;\u61a7\u0100ct\u0492\u0497r;\uc000\ud835\udc9frok;\u4110\u0800NTacdfglmopqstux\u04bd\u04c0\u04c4\u04cb\u04de\u04e2\u04e7\u04ee\u04f5\u0521\u052f\u0536\u0552\u055d\u0560\u0565G;\u414aH\u803b\xd0\u40d0cute\u803b\xc9\u40c9\u0180aiy\u04d2\u04d7\u04dcron;\u411arc\u803b\xca\u40ca;\u442dot;\u4116r;\uc000\ud835\udd08rave\u803b\xc8\u40c8ement;\u6208\u0100ap\u04fa\u04fecr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65fberySmallSquare;\u65ab\u0100gp\u0526\u052aon;\u4118f;\uc000\ud835\udd3csilon;\u4395u\u0100ai\u053c\u0549l\u0100;T\u0542\u0543\u6a75ilde;\u6242librium;\u61cc\u0100ci\u0557\u055ar;\u6130m;\u6a73a;\u4397ml\u803b\xcb\u40cb\u0100ip\u056a\u056fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058d\u05b2\u05ccy;\u4424r;\uc000\ud835\udd09lled\u0253\u0597\0\0\u05a3mallSquare;\u65fcerySmallSquare;\u65aa\u0370\u05ba\0\u05bf\0\0\u05c4f;\uc000\ud835\udd3dAll;\u6200riertrf;\u6131c\xf2\u05cb\u0600JTabcdfgorst\u05e8\u05ec\u05ef\u05fa\u0600\u0612\u0616\u061b\u061d\u0623\u066c\u0672cy;\u4403\u803b>\u403emma\u0100;d\u05f7\u05f8\u4393;\u43dcreve;\u411e\u0180eiy\u0607\u060c\u0610dil;\u4122rc;\u411c;\u4413ot;\u4120r;\uc000\ud835\udd0a;\u62d9pf;\uc000\ud835\udd3eeater\u0300EFGLST\u0635\u0644\u064e\u0656\u065b\u0666qual\u0100;L\u063e\u063f\u6265ess;\u62dbullEqual;\u6267reater;\u6aa2ess;\u6277lantEqual;\u6a7eilde;\u6273cr;\uc000\ud835\udca2;\u626b\u0400Aacfiosu\u0685\u068b\u0696\u069b\u069e\u06aa\u06be\u06caRDcy;\u442a\u0100ct\u0690\u0694ek;\u42c7;\u405eirc;\u4124r;\u610clbertSpace;\u610b\u01f0\u06af\0\u06b2f;\u610dizontalLine;\u6500\u0100ct\u06c3\u06c5\xf2\u06a9rok;\u4126mp\u0144\u06d0\u06d8ownHum\xf0\u012fqual;\u624f\u0700EJOacdfgmnostu\u06fa\u06fe\u0703\u0707\u070e\u071a\u071e\u0721\u0728\u0744\u0778\u078b\u078f\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803b\xcd\u40cd\u0100iy\u0713\u0718rc\u803b\xce\u40ce;\u4418ot;\u4130r;\u6111rave\u803b\xcc\u40cc\u0180;ap\u0720\u072f\u073f\u0100cg\u0734\u0737r;\u412ainaryI;\u6148lie\xf3\u03dd\u01f4\u0749\0\u0762\u0100;e\u074d\u074e\u622c\u0100gr\u0753\u0758ral;\u622bsection;\u62c2isible\u0100CT\u076c\u0772omma;\u6063imes;\u6062\u0180gpt\u077f\u0783\u0788on;\u412ef;\uc000\ud835\udd40a;\u4399cr;\u6110ilde;\u4128\u01eb\u079a\0\u079ecy;\u4406l\u803b\xcf\u40cf\u0280cfosu\u07ac\u07b7\u07bc\u07c2\u07d0\u0100iy\u07b1\u07b5rc;\u4134;\u4419r;\uc000\ud835\udd0dpf;\uc000\ud835\udd41\u01e3\u07c7\0\u07ccr;\uc000\ud835\udca5rcy;\u4408kcy;\u4404\u0380HJacfos\u07e4\u07e8\u07ec\u07f1\u07fd\u0802\u0808cy;\u4425cy;\u440cppa;\u439a\u0100ey\u07f6\u07fbdil;\u4136;\u441ar;\uc000\ud835\udd0epf;\uc000\ud835\udd42cr;\uc000\ud835\udca6\u0580JTaceflmost\u0825\u0829\u082c\u0850\u0863\u09b3\u09b8\u09c7\u09cd\u0a37\u0a47cy;\u4409\u803b<\u403c\u0280cmnpr\u0837\u083c\u0841\u0844\u084dute;\u4139bda;\u439bg;\u67ealacetrf;\u6112r;\u619e\u0180aey\u0857\u085c\u0861ron;\u413ddil;\u413b;\u441b\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087e\u08a9\u08b1\u08e0\u08e6\u08fc\u092f\u095b\u0390\u096a\u0100nr\u0883\u088fgleBracket;\u67e8row\u0180;BR\u0899\u089a\u089e\u6190ar;\u61e4ightArrow;\u61c6eiling;\u6308o\u01f5\u08b7\0\u08c3bleBracket;\u67e6n\u01d4\u08c8\0\u08d2eeVector;\u6961ector\u0100;B\u08db\u08dc\u61c3ar;\u6959loor;\u630aight\u0100AV\u08ef\u08f5rrow;\u6194ector;\u694e\u0100er\u0901\u0917e\u0180;AV\u0909\u090a\u0910\u62a3rrow;\u61a4ector;\u695aiangle\u0180;BE\u0924\u0925\u0929\u62b2ar;\u69cfqual;\u62b4p\u0180DTV\u0937\u0942\u094cownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61bfar;\u6958ector\u0100;B\u0965\u0966\u61bcar;\u6952ight\xe1\u039cs\u0300EFGLST\u097e\u098b\u0995\u099d\u09a2\u09adqualGreater;\u62daullEqual;\u6266reater;\u6276ess;\u6aa1lantEqual;\u6a7dilde;\u6272r;\uc000\ud835\udd0f\u0100;e\u09bd\u09be\u62d8ftarrow;\u61daidot;\u413f\u0180npw\u09d4\u0a16\u0a1bg\u0200LRlr\u09de\u09f7\u0a02\u0a10eft\u0100AR\u09e6\u09ecrrow;\u67f5ightArrow;\u67f7ightArrow;\u67f6eft\u0100ar\u03b3\u0a0aight\xe1\u03bfight\xe1\u03caf;\uc000\ud835\udd43er\u0100LR\u0a22\u0a2ceftArrow;\u6199ightArrow;\u6198\u0180cht\u0a3e\u0a40\u0a42\xf2\u084c;\u61b0rok;\u4141;\u626a\u0400acefiosu\u0a5a\u0a5d\u0a60\u0a77\u0a7c\u0a85\u0a8b\u0a8ep;\u6905y;\u441c\u0100dl\u0a65\u0a6fiumSpace;\u605flintrf;\u6133r;\uc000\ud835\udd10nusPlus;\u6213pf;\uc000\ud835\udd44c\xf2\u0a76;\u439c\u0480Jacefostu\u0aa3\u0aa7\u0aad\u0ac0\u0b14\u0b19\u0d91\u0d97\u0d9ecy;\u440acute;\u4143\u0180aey\u0ab4\u0ab9\u0aberon;\u4147dil;\u4145;\u441d\u0180gsw\u0ac7\u0af0\u0b0eative\u0180MTV\u0ad3\u0adf\u0ae8ediumSpace;\u600bhi\u0100cn\u0ae6\u0ad8\xeb\u0ad9eryThi\xee\u0ad9ted\u0100GL\u0af8\u0b06reaterGreate\xf2\u0673essLes\xf3\u0a48Line;\u400ar;\uc000\ud835\udd11\u0200Bnpt\u0b22\u0b28\u0b37\u0b3areak;\u6060BreakingSpace;\u40a0f;\u6115\u0680;CDEGHLNPRSTV\u0b55\u0b56\u0b6a\u0b7c\u0ba1\u0beb\u0c04\u0c5e\u0c84\u0ca6\u0cd8\u0d61\u0d85\u6aec\u0100ou\u0b5b\u0b64ngruent;\u6262pCap;\u626doubleVerticalBar;\u6226\u0180lqx\u0b83\u0b8a\u0b9bement;\u6209ual\u0100;T\u0b92\u0b93\u6260ilde;\uc000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0bb6\u0bb7\u0bbd\u0bc9\u0bd3\u0bd8\u0be5\u626fqual;\u6271ullEqual;\uc000\u2267\u0338reater;\uc000\u226b\u0338ess;\u6279lantEqual;\uc000\u2a7e\u0338ilde;\u6275ump\u0144\u0bf2\u0bfdownHump;\uc000\u224e\u0338qual;\uc000\u224f\u0338e\u0100fs\u0c0a\u0c27tTriangle\u0180;BE\u0c1a\u0c1b\u0c21\u62eaar;\uc000\u29cf\u0338qual;\u62ecs\u0300;EGLST\u0c35\u0c36\u0c3c\u0c44\u0c4b\u0c58\u626equal;\u6270reater;\u6278ess;\uc000\u226a\u0338lantEqual;\uc000\u2a7d\u0338ilde;\u6274ested\u0100GL\u0c68\u0c79reaterGreater;\uc000\u2aa2\u0338essLess;\uc000\u2aa1\u0338recedes\u0180;ES\u0c92\u0c93\u0c9b\u6280qual;\uc000\u2aaf\u0338lantEqual;\u62e0\u0100ei\u0cab\u0cb9verseElement;\u620cghtTriangle\u0180;BE\u0ccb\u0ccc\u0cd2\u62ebar;\uc000\u29d0\u0338qual;\u62ed\u0100qu\u0cdd\u0d0cuareSu\u0100bp\u0ce8\u0cf9set\u0100;E\u0cf0\u0cf3\uc000\u228f\u0338qual;\u62e2erset\u0100;E\u0d03\u0d06\uc000\u2290\u0338qual;\u62e3\u0180bcp\u0d13\u0d24\u0d4eset\u0100;E\u0d1b\u0d1e\uc000\u2282\u20d2qual;\u6288ceeds\u0200;EST\u0d32\u0d33\u0d3b\u0d46\u6281qual;\uc000\u2ab0\u0338lantEqual;\u62e1ilde;\uc000\u227f\u0338erset\u0100;E\u0d58\u0d5b\uc000\u2283\u20d2qual;\u6289ilde\u0200;EFT\u0d6e\u0d6f\u0d75\u0d7f\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uc000\ud835\udca9ilde\u803b\xd1\u40d1;\u439d\u0700Eacdfgmoprstuv\u0dbd\u0dc2\u0dc9\u0dd5\u0ddb\u0de0\u0de7\u0dfc\u0e02\u0e20\u0e22\u0e32\u0e3f\u0e44lig;\u4152cute\u803b\xd3\u40d3\u0100iy\u0dce\u0dd3rc\u803b\xd4\u40d4;\u441eblac;\u4150r;\uc000\ud835\udd12rave\u803b\xd2\u40d2\u0180aei\u0dee\u0df2\u0df6cr;\u414cga;\u43a9cron;\u439fpf;\uc000\ud835\udd46enCurly\u0100DQ\u0e0e\u0e1aoubleQuote;\u601cuote;\u6018;\u6a54\u0100cl\u0e27\u0e2cr;\uc000\ud835\udcaaash\u803b\xd8\u40d8i\u016c\u0e37\u0e3cde\u803b\xd5\u40d5es;\u6a37ml\u803b\xd6\u40d6er\u0100BP\u0e4b\u0e60\u0100ar\u0e50\u0e53r;\u603eac\u0100ek\u0e5a\u0e5c;\u63deet;\u63b4arenthesis;\u63dc\u0480acfhilors\u0e7f\u0e87\u0e8a\u0e8f\u0e92\u0e94\u0e9d\u0eb0\u0efcrtialD;\u6202y;\u441fr;\uc000\ud835\udd13i;\u43a6;\u43a0usMinus;\u40b1\u0100ip\u0ea2\u0eadncareplan\xe5\u069df;\u6119\u0200;eio\u0eb9\u0eba\u0ee0\u0ee4\u6abbcedes\u0200;EST\u0ec8\u0ec9\u0ecf\u0eda\u627aqual;\u6aaflantEqual;\u627cilde;\u627eme;\u6033\u0100dp\u0ee9\u0eeeuct;\u620fortion\u0100;a\u0225\u0ef9l;\u621d\u0100ci\u0f01\u0f06r;\uc000\ud835\udcab;\u43a8\u0200Ufos\u0f11\u0f16\u0f1b\u0f1fOT\u803b"\u4022r;\uc000\ud835\udd14pf;\u611acr;\uc000\ud835\udcac\u0600BEacefhiorsu\u0f3e\u0f43\u0f47\u0f60\u0f73\u0fa7\u0faa\u0fad\u1096\u10a9\u10b4\u10bearr;\u6910G\u803b\xae\u40ae\u0180cnr\u0f4e\u0f53\u0f56ute;\u4154g;\u67ebr\u0100;t\u0f5c\u0f5d\u61a0l;\u6916\u0180aey\u0f67\u0f6c\u0f71ron;\u4158dil;\u4156;\u4420\u0100;v\u0f78\u0f79\u611cerse\u0100EU\u0f82\u0f99\u0100lq\u0f87\u0f8eement;\u620builibrium;\u61cbpEquilibrium;\u696fr\xbb\u0f79o;\u43a1ght\u0400ACDFTUVa\u0fc1\u0feb\u0ff3\u1022\u1028\u105b\u1087\u03d8\u0100nr\u0fc6\u0fd2gleBracket;\u67e9row\u0180;BL\u0fdc\u0fdd\u0fe1\u6192ar;\u61e5eftArrow;\u61c4eiling;\u6309o\u01f5\u0ff9\0\u1005bleBracket;\u67e7n\u01d4\u100a\0\u1014eeVector;\u695dector\u0100;B\u101d\u101e\u61c2ar;\u6955loor;\u630b\u0100er\u102d\u1043e\u0180;AV\u1035\u1036\u103c\u62a2rrow;\u61a6ector;\u695biangle\u0180;BE\u1050\u1051\u1055\u62b3ar;\u69d0qual;\u62b5p\u0180DTV\u1063\u106e\u1078ownVector;\u694feeVector;\u695cector\u0100;B\u1082\u1083\u61bear;\u6954ector\u0100;B\u1091\u1092\u61c0ar;\u6953\u0100pu\u109b\u109ef;\u611dndImplies;\u6970ightarrow;\u61db\u0100ch\u10b9\u10bcr;\u611b;\u61b1leDelayed;\u69f4\u0680HOacfhimoqstu\u10e4\u10f1\u10f7\u10fd\u1119\u111e\u1151\u1156\u1161\u1167\u11b5\u11bb\u11bf\u0100Cc\u10e9\u10eeHcy;\u4429y;\u4428FTcy;\u442ccute;\u415a\u0280;aeiy\u1108\u1109\u110e\u1113\u1117\u6abcron;\u4160dil;\u415erc;\u415c;\u4421r;\uc000\ud835\udd16ort\u0200DLRU\u112a\u1134\u113e\u1149ownArrow\xbb\u041eeftArrow\xbb\u089aightArrow\xbb\u0fddpArrow;\u6191gma;\u43a3allCircle;\u6218pf;\uc000\ud835\udd4a\u0272\u116d\0\0\u1170t;\u621aare\u0200;ISU\u117b\u117c\u1189\u11af\u65a1ntersection;\u6293u\u0100bp\u118f\u119eset\u0100;E\u1197\u1198\u628fqual;\u6291erset\u0100;E\u11a8\u11a9\u6290qual;\u6292nion;\u6294cr;\uc000\ud835\udcaear;\u62c6\u0200bcmp\u11c8\u11db\u1209\u120b\u0100;s\u11cd\u11ce\u62d0et\u0100;E\u11cd\u11d5qual;\u6286\u0100ch\u11e0\u1205eeds\u0200;EST\u11ed\u11ee\u11f4\u11ff\u627bqual;\u6ab0lantEqual;\u627dilde;\u627fTh\xe1\u0f8c;\u6211\u0180;es\u1212\u1213\u1223\u62d1rset\u0100;E\u121c\u121d\u6283qual;\u6287et\xbb\u1213\u0580HRSacfhiors\u123e\u1244\u1249\u1255\u125e\u1271\u1276\u129f\u12c2\u12c8\u12d1ORN\u803b\xde\u40deADE;\u6122\u0100Hc\u124e\u1252cy;\u440by;\u4426\u0100bu\u125a\u125c;\u4009;\u43a4\u0180aey\u1265\u126a\u126fron;\u4164dil;\u4162;\u4422r;\uc000\ud835\udd17\u0100ei\u127b\u1289\u01f2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128e\u1298kSpace;\uc000\u205f\u200aSpace;\u6009lde\u0200;EFT\u12ab\u12ac\u12b2\u12bc\u623cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uc000\ud835\udd4bipleDot;\u60db\u0100ct\u12d6\u12dbr;\uc000\ud835\udcafrok;\u4166\u0ae1\u12f7\u130e\u131a\u1326\0\u132c\u1331\0\0\0\0\0\u1338\u133d\u1377\u1385\0\u13ff\u1404\u140a\u1410\u0100cr\u12fb\u1301ute\u803b\xda\u40dar\u0100;o\u1307\u1308\u619fcir;\u6949r\u01e3\u1313\0\u1316y;\u440eve;\u416c\u0100iy\u131e\u1323rc\u803b\xdb\u40db;\u4423blac;\u4170r;\uc000\ud835\udd18rave\u803b\xd9\u40d9acr;\u416a\u0100di\u1341\u1369er\u0100BP\u1348\u135d\u0100ar\u134d\u1350r;\u405fac\u0100ek\u1357\u1359;\u63dfet;\u63b5arenthesis;\u63ddon\u0100;P\u1370\u1371\u62c3lus;\u628e\u0100gp\u137b\u137fon;\u4172f;\uc000\ud835\udd4c\u0400ADETadps\u1395\u13ae\u13b8\u13c4\u03e8\u13d2\u13d7\u13f3rrow\u0180;BD\u1150\u13a0\u13a4ar;\u6912ownArrow;\u61c5ownArrow;\u6195quilibrium;\u696eee\u0100;A\u13cb\u13cc\u62a5rrow;\u61a5own\xe1\u03f3er\u0100LR\u13de\u13e8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13f9\u13fa\u43d2on;\u43a5ing;\u416ecr;\uc000\ud835\udcb0ilde;\u4168ml\u803b\xdc\u40dc\u0480Dbcdefosv\u1427\u142c\u1430\u1433\u143e\u1485\u148a\u1490\u1496ash;\u62abar;\u6aeby;\u4412ash\u0100;l\u143b\u143c\u62a9;\u6ae6\u0100er\u1443\u1445;\u62c1\u0180bty\u144c\u1450\u147aar;\u6016\u0100;i\u144f\u1455cal\u0200BLST\u1461\u1465\u146a\u1474ar;\u6223ine;\u407ceparator;\u6758ilde;\u6240ThinSpace;\u600ar;\uc000\ud835\udd19pf;\uc000\ud835\udd4dcr;\uc000\ud835\udcb1dash;\u62aa\u0280cefos\u14a7\u14ac\u14b1\u14b6\u14bcirc;\u4174dge;\u62c0r;\uc000\ud835\udd1apf;\uc000\ud835\udd4ecr;\uc000\ud835\udcb2\u0200fios\u14cb\u14d0\u14d2\u14d8r;\uc000\ud835\udd1b;\u439epf;\uc000\ud835\udd4fcr;\uc000\ud835\udcb3\u0480AIUacfosu\u14f1\u14f5\u14f9\u14fd\u1504\u150f\u1514\u151a\u1520cy;\u442fcy;\u4407cy;\u442ecute\u803b\xdd\u40dd\u0100iy\u1509\u150drc;\u4176;\u442br;\uc000\ud835\udd1cpf;\uc000\ud835\udd50cr;\uc000\ud835\udcb4ml;\u4178\u0400Hacdefos\u1535\u1539\u153f\u154b\u154f\u155d\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417d;\u4417ot;\u417b\u01f2\u1554\0\u155boWidt\xe8\u0ad9a;\u4396r;\u6128pf;\u6124cr;\uc000\ud835\udcb5\u0be1\u1583\u158a\u1590\0\u15b0\u15b6\u15bf\0\0\0\0\u15c6\u15db\u15eb\u165f\u166d\0\u1695\u169b\u16b2\u16b9\0\u16becute\u803b\xe1\u40e1reve;\u4103\u0300;Ediuy\u159c\u159d\u15a1\u15a3\u15a8\u15ad\u623e;\uc000\u223e\u0333;\u623frc\u803b\xe2\u40e2te\u80bb\xb4\u0306;\u4430lig\u803b\xe6\u40e6\u0100;r\xb2\u15ba;\uc000\ud835\udd1erave\u803b\xe0\u40e0\u0100ep\u15ca\u15d6\u0100fp\u15cf\u15d4sym;\u6135\xe8\u15d3ha;\u43b1\u0100ap\u15dfc\u0100cl\u15e4\u15e7r;\u4101g;\u6a3f\u0264\u15f0\0\0\u160a\u0280;adsv\u15fa\u15fb\u15ff\u1601\u1607\u6227nd;\u6a55;\u6a5clope;\u6a58;\u6a5a\u0380;elmrsz\u1618\u1619\u161b\u161e\u163f\u164f\u1659\u6220;\u69a4e\xbb\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163a\u163c\u163e;\u69a8;\u69a9;\u69aa;\u69ab;\u69ac;\u69ad;\u69ae;\u69aft\u0100;v\u1645\u1646\u621fb\u0100;d\u164c\u164d\u62be;\u699d\u0100pt\u1654\u1657h;\u6222\xbb\xb9arr;\u637c\u0100gp\u1663\u1667on;\u4105f;\uc000\ud835\udd52\u0380;Eaeiop\u12c1\u167b\u167d\u1682\u1684\u1687\u168a;\u6a70cir;\u6a6f;\u624ad;\u624bs;\u4027rox\u0100;e\u12c1\u1692\xf1\u1683ing\u803b\xe5\u40e5\u0180cty\u16a1\u16a6\u16a8r;\uc000\ud835\udcb6;\u402amp\u0100;e\u12c1\u16af\xf1\u0288ilde\u803b\xe3\u40e3ml\u803b\xe4\u40e4\u0100ci\u16c2\u16c8onin\xf4\u0272nt;\u6a11\u0800Nabcdefiklnoprsu\u16ed\u16f1\u1730\u173c\u1743\u1748\u1778\u177d\u17e0\u17e6\u1839\u1850\u170d\u193d\u1948\u1970ot;\u6aed\u0100cr\u16f6\u171ek\u0200ceps\u1700\u1705\u170d\u1713ong;\u624cpsilon;\u43f6rime;\u6035im\u0100;e\u171a\u171b\u623dq;\u62cd\u0176\u1722\u1726ee;\u62bded\u0100;g\u172c\u172d\u6305e\xbb\u172drk\u0100;t\u135c\u1737brk;\u63b6\u0100oy\u1701\u1741;\u4431quo;\u601e\u0280cmprt\u1753\u175b\u1761\u1764\u1768aus\u0100;e\u010a\u0109ptyv;\u69b0s\xe9\u170cno\xf5\u0113\u0180ahw\u176f\u1771\u1773;\u43b2;\u6136een;\u626cr;\uc000\ud835\udd1fg\u0380costuvw\u178d\u179d\u17b3\u17c1\u17d5\u17db\u17de\u0180aiu\u1794\u1796\u179a\xf0\u0760rc;\u65efp\xbb\u1371\u0180dpt\u17a4\u17a8\u17adot;\u6a00lus;\u6a01imes;\u6a02\u0271\u17b9\0\0\u17becup;\u6a06ar;\u6605riangle\u0100du\u17cd\u17d2own;\u65bdp;\u65b3plus;\u6a04e\xe5\u1444\xe5\u14adarow;\u690d\u0180ako\u17ed\u1826\u1835\u0100cn\u17f2\u1823k\u0180lst\u17fa\u05ab\u1802ozenge;\u69ebriangle\u0200;dlr\u1812\u1813\u1818\u181d\u65b4own;\u65beeft;\u65c2ight;\u65b8k;\u6423\u01b1\u182b\0\u1833\u01b2\u182f\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183e\u184d\u0100;q\u1843\u1846\uc000=\u20e5uiv;\uc000\u2261\u20e5t;\u6310\u0200ptwx\u1859\u185e\u1867\u186cf;\uc000\ud835\udd53\u0100;t\u13cb\u1863om\xbb\u13cctie;\u62c8\u0600DHUVbdhmptuv\u1885\u1896\u18aa\u18bb\u18d7\u18db\u18ec\u18ff\u1905\u190a\u1910\u1921\u0200LRlr\u188e\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18a1\u18a2\u18a4\u18a6\u18a8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18b3\u18b5\u18b7\u18b9;\u655d;\u655a;\u655c;\u6559\u0380;HLRhlr\u18ca\u18cb\u18cd\u18cf\u18d1\u18d3\u18d5\u6551;\u656c;\u6563;\u6560;\u656b;\u6562;\u655fox;\u69c9\u0200LRlr\u18e4\u18e6\u18e8\u18ea;\u6555;\u6552;\u6510;\u650c\u0280;DUdu\u06bd\u18f7\u18f9\u18fb\u18fd;\u6565;\u6568;\u652c;\u6534inus;\u629flus;\u629eimes;\u62a0\u0200LRlr\u1919\u191b\u191d\u191f;\u655b;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193b\u6502;\u656a;\u6561;\u655e;\u653c;\u6524;\u651c\u0100ev\u0123\u1942bar\u803b\xa6\u40a6\u0200ceio\u1951\u1956\u195a\u1960r;\uc000\ud835\udcb7mi;\u604fm\u0100;e\u171a\u171cl\u0180;bh\u1968\u1969\u196b\u405c;\u69c5sub;\u67c8\u016c\u1974\u197el\u0100;e\u1979\u197a\u6022t\xbb\u197ap\u0180;Ee\u012f\u1985\u1987;\u6aae\u0100;q\u06dc\u06db\u0ce1\u19a7\0\u19e8\u1a11\u1a15\u1a32\0\u1a37\u1a50\0\0\u1ab4\0\0\u1ac1\0\0\u1b21\u1b2e\u1b4d\u1b52\0\u1bfd\0\u1c0c\u0180cpr\u19ad\u19b2\u19ddute;\u4107\u0300;abcds\u19bf\u19c0\u19c4\u19ca\u19d5\u19d9\u6229nd;\u6a44rcup;\u6a49\u0100au\u19cf\u19d2p;\u6a4bp;\u6a47ot;\u6a40;\uc000\u2229\ufe00\u0100eo\u19e2\u19e5t;\u6041\xee\u0693\u0200aeiu\u19f0\u19fb\u1a01\u1a05\u01f0\u19f5\0\u19f8s;\u6a4don;\u410ddil\u803b\xe7\u40e7rc;\u4109ps\u0100;s\u1a0c\u1a0d\u6a4cm;\u6a50ot;\u410b\u0180dmn\u1a1b\u1a20\u1a26il\u80bb\xb8\u01adptyv;\u69b2t\u8100\xa2;e\u1a2d\u1a2e\u40a2r\xe4\u01b2r;\uc000\ud835\udd20\u0180cei\u1a3d\u1a40\u1a4dy;\u4447ck\u0100;m\u1a47\u1a48\u6713ark\xbb\u1a48;\u43c7r\u0380;Ecefms\u1a5f\u1a60\u1a62\u1a6b\u1aa4\u1aaa\u1aae\u65cb;\u69c3\u0180;el\u1a69\u1a6a\u1a6d\u42c6q;\u6257e\u0261\u1a74\0\0\u1a88rrow\u0100lr\u1a7c\u1a81eft;\u61baight;\u61bb\u0280RSacd\u1a92\u1a94\u1a96\u1a9a\u1a9f\xbb\u0f47;\u64c8st;\u629birc;\u629aash;\u629dnint;\u6a10id;\u6aefcir;\u69c2ubs\u0100;u\u1abb\u1abc\u6663it\xbb\u1abc\u02ec\u1ac7\u1ad4\u1afa\0\u1b0aon\u0100;e\u1acd\u1ace\u403a\u0100;q\xc7\xc6\u026d\u1ad9\0\0\u1ae2a\u0100;t\u1ade\u1adf\u402c;\u4040\u0180;fl\u1ae8\u1ae9\u1aeb\u6201\xee\u1160e\u0100mx\u1af1\u1af6ent\xbb\u1ae9e\xf3\u024d\u01e7\u1afe\0\u1b07\u0100;d\u12bb\u1b02ot;\u6a6dn\xf4\u0246\u0180fry\u1b10\u1b14\u1b17;\uc000\ud835\udd54o\xe4\u0254\u8100\xa9;s\u0155\u1b1dr;\u6117\u0100ao\u1b25\u1b29rr;\u61b5ss;\u6717\u0100cu\u1b32\u1b37r;\uc000\ud835\udcb8\u0100bp\u1b3c\u1b44\u0100;e\u1b41\u1b42\u6acf;\u6ad1\u0100;e\u1b49\u1b4a\u6ad0;\u6ad2dot;\u62ef\u0380delprvw\u1b60\u1b6c\u1b77\u1b82\u1bac\u1bd4\u1bf9arr\u0100lr\u1b68\u1b6a;\u6938;\u6935\u0270\u1b72\0\0\u1b75r;\u62dec;\u62dfarr\u0100;p\u1b7f\u1b80\u61b6;\u693d\u0300;bcdos\u1b8f\u1b90\u1b96\u1ba1\u1ba5\u1ba8\u622arcap;\u6a48\u0100au\u1b9b\u1b9ep;\u6a46p;\u6a4aot;\u628dr;\u6a45;\uc000\u222a\ufe00\u0200alrv\u1bb5\u1bbf\u1bde\u1be3rr\u0100;m\u1bbc\u1bbd\u61b7;\u693cy\u0180evw\u1bc7\u1bd4\u1bd8q\u0270\u1bce\0\0\u1bd2re\xe3\u1b73u\xe3\u1b75ee;\u62ceedge;\u62cfen\u803b\xa4\u40a4earrow\u0100lr\u1bee\u1bf3eft\xbb\u1b80ight\xbb\u1bbde\xe4\u1bdd\u0100ci\u1c01\u1c07onin\xf4\u01f7nt;\u6231lcty;\u632d\u0980AHabcdefhijlorstuwz\u1c38\u1c3b\u1c3f\u1c5d\u1c69\u1c75\u1c8a\u1c9e\u1cac\u1cb7\u1cfb\u1cff\u1d0d\u1d7b\u1d91\u1dab\u1dbb\u1dc6\u1dcdr\xf2\u0381ar;\u6965\u0200glrs\u1c48\u1c4d\u1c52\u1c54ger;\u6020eth;\u6138\xf2\u1133h\u0100;v\u1c5a\u1c5b\u6010\xbb\u090a\u016b\u1c61\u1c67arow;\u690fa\xe3\u0315\u0100ay\u1c6e\u1c73ron;\u410f;\u4434\u0180;ao\u0332\u1c7c\u1c84\u0100gr\u02bf\u1c81r;\u61catseq;\u6a77\u0180glm\u1c91\u1c94\u1c98\u803b\xb0\u40b0ta;\u43b4ptyv;\u69b1\u0100ir\u1ca3\u1ca8sht;\u697f;\uc000\ud835\udd21ar\u0100lr\u1cb3\u1cb5\xbb\u08dc\xbb\u101e\u0280aegsv\u1cc2\u0378\u1cd6\u1cdc\u1ce0m\u0180;os\u0326\u1cca\u1cd4nd\u0100;s\u0326\u1cd1uit;\u6666amma;\u43ddin;\u62f2\u0180;io\u1ce7\u1ce8\u1cf8\u40f7de\u8100\xf7;o\u1ce7\u1cf0ntimes;\u62c7n\xf8\u1cf7cy;\u4452c\u026f\u1d06\0\0\u1d0arn;\u631eop;\u630d\u0280lptuw\u1d18\u1d1d\u1d22\u1d49\u1d55lar;\u4024f;\uc000\ud835\udd55\u0280;emps\u030b\u1d2d\u1d37\u1d3d\u1d42q\u0100;d\u0352\u1d33ot;\u6251inus;\u6238lus;\u6214quare;\u62a1blebarwedg\xe5\xfan\u0180adh\u112e\u1d5d\u1d67ownarrow\xf3\u1c83arpoon\u0100lr\u1d72\u1d76ef\xf4\u1cb4igh\xf4\u1cb6\u0162\u1d7f\u1d85karo\xf7\u0f42\u026f\u1d8a\0\0\u1d8ern;\u631fop;\u630c\u0180cot\u1d98\u1da3\u1da6\u0100ry\u1d9d\u1da1;\uc000\ud835\udcb9;\u4455l;\u69f6rok;\u4111\u0100dr\u1db0\u1db4ot;\u62f1i\u0100;f\u1dba\u1816\u65bf\u0100ah\u1dc0\u1dc3r\xf2\u0429a\xf2\u0fa6angle;\u69a6\u0100ci\u1dd2\u1dd5y;\u445fgrarr;\u67ff\u0900Dacdefglmnopqrstux\u1e01\u1e09\u1e19\u1e38\u0578\u1e3c\u1e49\u1e61\u1e7e\u1ea5\u1eaf\u1ebd\u1ee1\u1f2a\u1f37\u1f44\u1f4e\u1f5a\u0100Do\u1e06\u1d34o\xf4\u1c89\u0100cs\u1e0e\u1e14ute\u803b\xe9\u40e9ter;\u6a6e\u0200aioy\u1e22\u1e27\u1e31\u1e36ron;\u411br\u0100;c\u1e2d\u1e2e\u6256\u803b\xea\u40ealon;\u6255;\u444dot;\u4117\u0100Dr\u1e41\u1e45ot;\u6252;\uc000\ud835\udd22\u0180;rs\u1e50\u1e51\u1e57\u6a9aave\u803b\xe8\u40e8\u0100;d\u1e5c\u1e5d\u6a96ot;\u6a98\u0200;ils\u1e6a\u1e6b\u1e72\u1e74\u6a99nters;\u63e7;\u6113\u0100;d\u1e79\u1e7a\u6a95ot;\u6a97\u0180aps\u1e85\u1e89\u1e97cr;\u4113ty\u0180;sv\u1e92\u1e93\u1e95\u6205et\xbb\u1e93p\u01001;\u1e9d\u1ea4\u0133\u1ea1\u1ea3;\u6004;\u6005\u6003\u0100gs\u1eaa\u1eac;\u414bp;\u6002\u0100gp\u1eb4\u1eb8on;\u4119f;\uc000\ud835\udd56\u0180als\u1ec4\u1ece\u1ed2r\u0100;s\u1eca\u1ecb\u62d5l;\u69e3us;\u6a71i\u0180;lv\u1eda\u1edb\u1edf\u43b5on\xbb\u1edb;\u43f5\u0200csuv\u1eea\u1ef3\u1f0b\u1f23\u0100io\u1eef\u1e31rc\xbb\u1e2e\u0269\u1ef9\0\0\u1efb\xed\u0548ant\u0100gl\u1f02\u1f06tr\xbb\u1e5dess\xbb\u1e7a\u0180aei\u1f12\u1f16\u1f1als;\u403dst;\u625fv\u0100;D\u0235\u1f20D;\u6a78parsl;\u69e5\u0100Da\u1f2f\u1f33ot;\u6253rr;\u6971\u0180cdi\u1f3e\u1f41\u1ef8r;\u612fo\xf4\u0352\u0100ah\u1f49\u1f4b;\u43b7\u803b\xf0\u40f0\u0100mr\u1f53\u1f57l\u803b\xeb\u40ebo;\u60ac\u0180cip\u1f61\u1f64\u1f67l;\u4021s\xf4\u056e\u0100eo\u1f6c\u1f74ctatio\xee\u0559nential\xe5\u0579\u09e1\u1f92\0\u1f9e\0\u1fa1\u1fa7\0\0\u1fc6\u1fcc\0\u1fd3\0\u1fe6\u1fea\u2000\0\u2008\u205allingdotse\xf1\u1e44y;\u4444male;\u6640\u0180ilr\u1fad\u1fb3\u1fc1lig;\u8000\ufb03\u0269\u1fb9\0\0\u1fbdg;\u8000\ufb00ig;\u8000\ufb04;\uc000\ud835\udd23lig;\u8000\ufb01lig;\uc000fj\u0180alt\u1fd9\u1fdc\u1fe1t;\u666dig;\u8000\ufb02ns;\u65b1of;\u4192\u01f0\u1fee\0\u1ff3f;\uc000\ud835\udd57\u0100ak\u05bf\u1ff7\u0100;v\u1ffc\u1ffd\u62d4;\u6ad9artint;\u6a0d\u0100ao\u200c\u2055\u0100cs\u2011\u2052\u03b1\u201a\u2030\u2038\u2045\u2048\0\u2050\u03b2\u2022\u2025\u2027\u202a\u202c\0\u202e\u803b\xbd\u40bd;\u6153\u803b\xbc\u40bc;\u6155;\u6159;\u615b\u01b3\u2034\0\u2036;\u6154;\u6156\u02b4\u203e\u2041\0\0\u2043\u803b\xbe\u40be;\u6157;\u615c5;\u6158\u01b6\u204c\0\u204e;\u615a;\u615d8;\u615el;\u6044wn;\u6322cr;\uc000\ud835\udcbb\u0880Eabcdefgijlnorstv\u2082\u2089\u209f\u20a5\u20b0\u20b4\u20f0\u20f5\u20fa\u20ff\u2103\u2112\u2138\u0317\u213e\u2152\u219e\u0100;l\u064d\u2087;\u6a8c\u0180cmp\u2090\u2095\u209dute;\u41f5ma\u0100;d\u209c\u1cda\u43b3;\u6a86reve;\u411f\u0100iy\u20aa\u20aerc;\u411d;\u4433ot;\u4121\u0200;lqs\u063e\u0642\u20bd\u20c9\u0180;qs\u063e\u064c\u20c4lan\xf4\u0665\u0200;cdl\u0665\u20d2\u20d5\u20e5c;\u6aa9ot\u0100;o\u20dc\u20dd\u6a80\u0100;l\u20e2\u20e3\u6a82;\u6a84\u0100;e\u20ea\u20ed\uc000\u22db\ufe00s;\u6a94r;\uc000\ud835\udd24\u0100;g\u0673\u061bmel;\u6137cy;\u4453\u0200;Eaj\u065a\u210c\u210e\u2110;\u6a92;\u6aa5;\u6aa4\u0200Eaes\u211b\u211d\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6a8arox\xbb\u2124\u0100;q\u212e\u212f\u6a88\u0100;q\u212e\u211bim;\u62e7pf;\uc000\ud835\udd58\u0100ci\u2143\u2146r;\u610am\u0180;el\u066b\u214e\u2150;\u6a8e;\u6a90\u8300>;cdlqr\u05ee\u2160\u216a\u216e\u2173\u2179\u0100ci\u2165\u2167;\u6aa7r;\u6a7aot;\u62d7Par;\u6995uest;\u6a7c\u0280adels\u2184\u216a\u2190\u0656\u219b\u01f0\u2189\0\u218epro\xf8\u209er;\u6978q\u0100lq\u063f\u2196les\xf3\u2088i\xed\u066b\u0100en\u21a3\u21adrtneqq;\uc000\u2269\ufe00\xc5\u21aa\u0500Aabcefkosy\u21c4\u21c7\u21f1\u21f5\u21fa\u2218\u221d\u222f\u2268\u227dr\xf2\u03a0\u0200ilmr\u21d0\u21d4\u21d7\u21dbrs\xf0\u1484f\xbb\u2024il\xf4\u06a9\u0100dr\u21e0\u21e4cy;\u444a\u0180;cw\u08f4\u21eb\u21efir;\u6948;\u61adar;\u610firc;\u4125\u0180alr\u2201\u220e\u2213rts\u0100;u\u2209\u220a\u6665it\xbb\u220alip;\u6026con;\u62b9r;\uc000\ud835\udd25s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223a\u223e\u2243\u225e\u2263rr;\u61fftht;\u623bk\u0100lr\u2249\u2253eftarrow;\u61a9ightarrow;\u61aaf;\uc000\ud835\udd59bar;\u6015\u0180clt\u226f\u2274\u2278r;\uc000\ud835\udcbdas\xe8\u21f4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xbb\u1c5b\u0ae1\u22a3\0\u22aa\0\u22b8\u22c5\u22ce\0\u22d5\u22f3\0\0\u22f8\u2322\u2367\u2362\u237f\0\u2386\u23aa\u23b4cute\u803b\xed\u40ed\u0180;iy\u0771\u22b0\u22b5rc\u803b\xee\u40ee;\u4438\u0100cx\u22bc\u22bfy;\u4435cl\u803b\xa1\u40a1\u0100fr\u039f\u22c9;\uc000\ud835\udd26rave\u803b\xec\u40ec\u0200;ino\u073e\u22dd\u22e9\u22ee\u0100in\u22e2\u22e6nt;\u6a0ct;\u622dfin;\u69dcta;\u6129lig;\u4133\u0180aop\u22fe\u231a\u231d\u0180cgt\u2305\u2308\u2317r;\u412b\u0180elp\u071f\u230f\u2313in\xe5\u078ear\xf4\u0720h;\u4131f;\u62b7ed;\u41b5\u0280;cfot\u04f4\u232c\u2331\u233d\u2341are;\u6105in\u0100;t\u2338\u2339\u621eie;\u69dddo\xf4\u2319\u0280;celp\u0757\u234c\u2350\u235b\u2361al;\u62ba\u0100gr\u2355\u2359er\xf3\u1563\xe3\u234darhk;\u6a17rod;\u6a3c\u0200cgpt\u236f\u2372\u2376\u237by;\u4451on;\u412ff;\uc000\ud835\udd5aa;\u43b9uest\u803b\xbf\u40bf\u0100ci\u238a\u238fr;\uc000\ud835\udcben\u0280;Edsv\u04f4\u239b\u239d\u23a1\u04f3;\u62f9ot;\u62f5\u0100;v\u23a6\u23a7\u62f4;\u62f3\u0100;i\u0777\u23aelde;\u4129\u01eb\u23b8\0\u23bccy;\u4456l\u803b\xef\u40ef\u0300cfmosu\u23cc\u23d7\u23dc\u23e1\u23e7\u23f5\u0100iy\u23d1\u23d5rc;\u4135;\u4439r;\uc000\ud835\udd27ath;\u4237pf;\uc000\ud835\udd5b\u01e3\u23ec\0\u23f1r;\uc000\ud835\udcbfrcy;\u4458kcy;\u4454\u0400acfghjos\u240b\u2416\u2422\u2427\u242d\u2431\u2435\u243bppa\u0100;v\u2413\u2414\u43ba;\u43f0\u0100ey\u241b\u2420dil;\u4137;\u443ar;\uc000\ud835\udd28reen;\u4138cy;\u4445cy;\u445cpf;\uc000\ud835\udd5ccr;\uc000\ud835\udcc0\u0b80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248d\u2491\u250e\u253d\u255a\u2580\u264e\u265e\u2665\u2679\u267d\u269a\u26b2\u26d8\u275d\u2768\u278b\u27c0\u2801\u2812\u0180art\u2477\u247a\u247cr\xf2\u09c6\xf2\u0395ail;\u691barr;\u690e\u0100;g\u0994\u248b;\u6a8bar;\u6962\u0963\u24a5\0\u24aa\0\u24b1\0\0\0\0\0\u24b5\u24ba\0\u24c6\u24c8\u24cd\0\u24f9ute;\u413amptyv;\u69b4ra\xee\u084cbda;\u43bbg\u0180;dl\u088e\u24c1\u24c3;\u6991\xe5\u088e;\u6a85uo\u803b\xab\u40abr\u0400;bfhlpst\u0899\u24de\u24e6\u24e9\u24eb\u24ee\u24f1\u24f5\u0100;f\u089d\u24e3s;\u691fs;\u691d\xeb\u2252p;\u61abl;\u6939im;\u6973l;\u61a2\u0180;ae\u24ff\u2500\u2504\u6aabil;\u6919\u0100;s\u2509\u250a\u6aad;\uc000\u2aad\ufe00\u0180abr\u2515\u2519\u251drr;\u690crk;\u6772\u0100ak\u2522\u252cc\u0100ek\u2528\u252a;\u407b;\u405b\u0100es\u2531\u2533;\u698bl\u0100du\u2539\u253b;\u698f;\u698d\u0200aeuy\u2546\u254b\u2556\u2558ron;\u413e\u0100di\u2550\u2554il;\u413c\xec\u08b0\xe2\u2529;\u443b\u0200cqrs\u2563\u2566\u256d\u257da;\u6936uo\u0100;r\u0e19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694bh;\u61b2\u0280;fgqs\u258b\u258c\u0989\u25f3\u25ff\u6264t\u0280ahlrt\u2598\u25a4\u25b7\u25c2\u25e8rrow\u0100;t\u0899\u25a1a\xe9\u24f6arpoon\u0100du\u25af\u25b4own\xbb\u045ap\xbb\u0966eftarrows;\u61c7ight\u0180ahs\u25cd\u25d6\u25derrow\u0100;s\u08f4\u08a7arpoon\xf3\u0f98quigarro\xf7\u21f0hreetimes;\u62cb\u0180;qs\u258b\u0993\u25falan\xf4\u09ac\u0280;cdgs\u09ac\u260a\u260d\u261d\u2628c;\u6aa8ot\u0100;o\u2614\u2615\u6a7f\u0100;r\u261a\u261b\u6a81;\u6a83\u0100;e\u2622\u2625\uc000\u22da\ufe00s;\u6a93\u0280adegs\u2633\u2639\u263d\u2649\u264bppro\xf8\u24c6ot;\u62d6q\u0100gq\u2643\u2645\xf4\u0989gt\xf2\u248c\xf4\u099bi\xed\u09b2\u0180ilr\u2655\u08e1\u265asht;\u697c;\uc000\ud835\udd29\u0100;E\u099c\u2663;\u6a91\u0161\u2669\u2676r\u0100du\u25b2\u266e\u0100;l\u0965\u2673;\u696alk;\u6584cy;\u4459\u0280;acht\u0a48\u2688\u268b\u2691\u2696r\xf2\u25c1orne\xf2\u1d08ard;\u696bri;\u65fa\u0100io\u269f\u26a4dot;\u4140ust\u0100;a\u26ac\u26ad\u63b0che\xbb\u26ad\u0200Eaes\u26bb\u26bd\u26c9\u26d4;\u6268p\u0100;p\u26c3\u26c4\u6a89rox\xbb\u26c4\u0100;q\u26ce\u26cf\u6a87\u0100;q\u26ce\u26bbim;\u62e6\u0400abnoptwz\u26e9\u26f4\u26f7\u271a\u272f\u2741\u2747\u2750\u0100nr\u26ee\u26f1g;\u67ecr;\u61fdr\xeb\u08c1g\u0180lmr\u26ff\u270d\u2714eft\u0100ar\u09e6\u2707ight\xe1\u09f2apsto;\u67fcight\xe1\u09fdparrow\u0100lr\u2725\u2729ef\xf4\u24edight;\u61ac\u0180afl\u2736\u2739\u273dr;\u6985;\uc000\ud835\udd5dus;\u6a2dimes;\u6a34\u0161\u274b\u274fst;\u6217\xe1\u134e\u0180;ef\u2757\u2758\u1800\u65cange\xbb\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277c\u2785\u2787r\xf2\u08a8orne\xf2\u1d8car\u0100;d\u0f98\u2783;\u696d;\u600eri;\u62bf\u0300achiqt\u2798\u279d\u0a40\u27a2\u27ae\u27bbquo;\u6039r;\uc000\ud835\udcc1m\u0180;eg\u09b2\u27aa\u27ac;\u6a8d;\u6a8f\u0100bu\u252a\u27b3o\u0100;r\u0e1f\u27b9;\u601arok;\u4142\u8400<;cdhilqr\u082b\u27d2\u2639\u27dc\u27e0\u27e5\u27ea\u27f0\u0100ci\u27d7\u27d9;\u6aa6r;\u6a79re\xe5\u25f2mes;\u62c9arr;\u6976uest;\u6a7b\u0100Pi\u27f5\u27f9ar;\u6996\u0180;ef\u2800\u092d\u181b\u65c3r\u0100du\u2807\u280dshar;\u694ahar;\u6966\u0100en\u2817\u2821rtneqq;\uc000\u2268\ufe00\xc5\u281e\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288e\u2893\u28a0\u28a5\u28a8\u28da\u28e2\u28e4\u0a83\u28f3\u2902Dot;\u623a\u0200clpr\u284e\u2852\u2863\u287dr\u803b\xaf\u40af\u0100et\u2857\u2859;\u6642\u0100;e\u285e\u285f\u6720se\xbb\u285f\u0100;s\u103b\u2868to\u0200;dlu\u103b\u2873\u2877\u287bow\xee\u048cef\xf4\u090f\xf0\u13d1ker;\u65ae\u0100oy\u2887\u288cmma;\u6a29;\u443cash;\u6014asuredangle\xbb\u1626r;\uc000\ud835\udd2ao;\u6127\u0180cdn\u28af\u28b4\u28c9ro\u803b\xb5\u40b5\u0200;acd\u1464\u28bd\u28c0\u28c4s\xf4\u16a7ir;\u6af0ot\u80bb\xb7\u01b5us\u0180;bd\u28d2\u1903\u28d3\u6212\u0100;u\u1d3c\u28d8;\u6a2a\u0163\u28de\u28e1p;\u6adb\xf2\u2212\xf0\u0a81\u0100dp\u28e9\u28eeels;\u62a7f;\uc000\ud835\udd5e\u0100ct\u28f8\u28fdr;\uc000\ud835\udcc2pos\xbb\u159d\u0180;lm\u2909\u290a\u290d\u43bctimap;\u62b8\u0c00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297e\u2989\u2998\u29da\u29e9\u2a15\u2a1a\u2a58\u2a5d\u2a83\u2a95\u2aa4\u2aa8\u2b04\u2b07\u2b44\u2b7f\u2bae\u2c34\u2c67\u2c7c\u2ce9\u0100gt\u2947\u294b;\uc000\u22d9\u0338\u0100;v\u2950\u0bcf\uc000\u226b\u20d2\u0180elt\u295a\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61cdightarrow;\u61ce;\uc000\u22d8\u0338\u0100;v\u297b\u0c47\uc000\u226a\u20d2ightarrow;\u61cf\u0100Dd\u298e\u2993ash;\u62afash;\u62ae\u0280bcnpt\u29a3\u29a7\u29ac\u29b1\u29ccla\xbb\u02deute;\u4144g;\uc000\u2220\u20d2\u0280;Eiop\u0d84\u29bc\u29c0\u29c5\u29c8;\uc000\u2a70\u0338d;\uc000\u224b\u0338s;\u4149ro\xf8\u0d84ur\u0100;a\u29d3\u29d4\u666el\u0100;s\u29d3\u0b38\u01f3\u29df\0\u29e3p\u80bb\xa0\u0b37mp\u0100;e\u0bf9\u0c00\u0280aeouy\u29f4\u29fe\u2a03\u2a10\u2a13\u01f0\u29f9\0\u29fb;\u6a43on;\u4148dil;\u4146ng\u0100;d\u0d7e\u2a0aot;\uc000\u2a6d\u0338p;\u6a42;\u443dash;\u6013\u0380;Aadqsx\u0b92\u2a29\u2a2d\u2a3b\u2a41\u2a45\u2a50rr;\u61d7r\u0100hr\u2a33\u2a36k;\u6924\u0100;o\u13f2\u13f0ot;\uc000\u2250\u0338ui\xf6\u0b63\u0100ei\u2a4a\u2a4ear;\u6928\xed\u0b98ist\u0100;s\u0ba0\u0b9fr;\uc000\ud835\udd2b\u0200Eest\u0bc5\u2a66\u2a79\u2a7c\u0180;qs\u0bbc\u2a6d\u0be1\u0180;qs\u0bbc\u0bc5\u2a74lan\xf4\u0be2i\xed\u0bea\u0100;r\u0bb6\u2a81\xbb\u0bb7\u0180Aap\u2a8a\u2a8d\u2a91r\xf2\u2971rr;\u61aear;\u6af2\u0180;sv\u0f8d\u2a9c\u0f8c\u0100;d\u2aa1\u2aa2\u62fc;\u62facy;\u445a\u0380AEadest\u2ab7\u2aba\u2abe\u2ac2\u2ac5\u2af6\u2af9r\xf2\u2966;\uc000\u2266\u0338rr;\u619ar;\u6025\u0200;fqs\u0c3b\u2ace\u2ae3\u2aeft\u0100ar\u2ad4\u2ad9rro\xf7\u2ac1ightarro\xf7\u2a90\u0180;qs\u0c3b\u2aba\u2aealan\xf4\u0c55\u0100;s\u0c55\u2af4\xbb\u0c36i\xed\u0c5d\u0100;r\u0c35\u2afei\u0100;e\u0c1a\u0c25i\xe4\u0d90\u0100pt\u2b0c\u2b11f;\uc000\ud835\udd5f\u8180\xac;in\u2b19\u2b1a\u2b36\u40acn\u0200;Edv\u0b89\u2b24\u2b28\u2b2e;\uc000\u22f9\u0338ot;\uc000\u22f5\u0338\u01e1\u0b89\u2b33\u2b35;\u62f7;\u62f6i\u0100;v\u0cb8\u2b3c\u01e1\u0cb8\u2b41\u2b43;\u62fe;\u62fd\u0180aor\u2b4b\u2b63\u2b69r\u0200;ast\u0b7b\u2b55\u2b5a\u2b5flle\xec\u0b7bl;\uc000\u2afd\u20e5;\uc000\u2202\u0338lint;\u6a14\u0180;ce\u0c92\u2b70\u2b73u\xe5\u0ca5\u0100;c\u0c98\u2b78\u0100;e\u0c92\u2b7d\xf1\u0c98\u0200Aait\u2b88\u2b8b\u2b9d\u2ba7r\xf2\u2988rr\u0180;cw\u2b94\u2b95\u2b99\u619b;\uc000\u2933\u0338;\uc000\u219d\u0338ghtarrow\xbb\u2b95ri\u0100;e\u0ccb\u0cd6\u0380chimpqu\u2bbd\u2bcd\u2bd9\u2b04\u0b78\u2be4\u2bef\u0200;cer\u0d32\u2bc6\u0d37\u2bc9u\xe5\u0d45;\uc000\ud835\udcc3ort\u026d\u2b05\0\0\u2bd6ar\xe1\u2b56m\u0100;e\u0d6e\u2bdf\u0100;q\u0d74\u0d73su\u0100bp\u2beb\u2bed\xe5\u0cf8\xe5\u0d0b\u0180bcp\u2bf6\u2c11\u2c19\u0200;Ees\u2bff\u2c00\u0d22\u2c04\u6284;\uc000\u2ac5\u0338et\u0100;e\u0d1b\u2c0bq\u0100;q\u0d23\u2c00c\u0100;e\u0d32\u2c17\xf1\u0d38\u0200;Ees\u2c22\u2c23\u0d5f\u2c27\u6285;\uc000\u2ac6\u0338et\u0100;e\u0d58\u2c2eq\u0100;q\u0d60\u2c23\u0200gilr\u2c3d\u2c3f\u2c45\u2c47\xec\u0bd7lde\u803b\xf1\u40f1\xe7\u0c43iangle\u0100lr\u2c52\u2c5ceft\u0100;e\u0c1a\u2c5a\xf1\u0c26ight\u0100;e\u0ccb\u2c65\xf1\u0cd7\u0100;m\u2c6c\u2c6d\u43bd\u0180;es\u2c74\u2c75\u2c79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2c8f\u2c94\u2c99\u2c9e\u2ca3\u2cb0\u2cb6\u2cd3\u2ce3ash;\u62adarr;\u6904p;\uc000\u224d\u20d2ash;\u62ac\u0100et\u2ca8\u2cac;\uc000\u2265\u20d2;\uc000>\u20d2nfin;\u69de\u0180Aet\u2cbd\u2cc1\u2cc5rr;\u6902;\uc000\u2264\u20d2\u0100;r\u2cca\u2ccd\uc000<\u20d2ie;\uc000\u22b4\u20d2\u0100At\u2cd8\u2cdcrr;\u6903rie;\uc000\u22b5\u20d2im;\uc000\u223c\u20d2\u0180Aan\u2cf0\u2cf4\u2d02rr;\u61d6r\u0100hr\u2cfa\u2cfdk;\u6923\u0100;o\u13e7\u13e5ear;\u6927\u1253\u1a95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2d2d\0\u2d38\u2d48\u2d60\u2d65\u2d72\u2d84\u1b07\0\0\u2d8d\u2dab\0\u2dc8\u2dce\0\u2ddc\u2e19\u2e2b\u2e3e\u2e43\u0100cs\u2d31\u1a97ute\u803b\xf3\u40f3\u0100iy\u2d3c\u2d45r\u0100;c\u1a9e\u2d42\u803b\xf4\u40f4;\u443e\u0280abios\u1aa0\u2d52\u2d57\u01c8\u2d5alac;\u4151v;\u6a38old;\u69bclig;\u4153\u0100cr\u2d69\u2d6dir;\u69bf;\uc000\ud835\udd2c\u036f\u2d79\0\0\u2d7c\0\u2d82n;\u42dbave\u803b\xf2\u40f2;\u69c1\u0100bm\u2d88\u0df4ar;\u69b5\u0200acit\u2d95\u2d98\u2da5\u2da8r\xf2\u1a80\u0100ir\u2d9d\u2da0r;\u69beoss;\u69bbn\xe5\u0e52;\u69c0\u0180aei\u2db1\u2db5\u2db9cr;\u414dga;\u43c9\u0180cdn\u2dc0\u2dc5\u01cdron;\u43bf;\u69b6pf;\uc000\ud835\udd60\u0180ael\u2dd4\u2dd7\u01d2r;\u69b7rp;\u69b9\u0380;adiosv\u2dea\u2deb\u2dee\u2e08\u2e0d\u2e10\u2e16\u6228r\xf2\u1a86\u0200;efm\u2df7\u2df8\u2e02\u2e05\u6a5dr\u0100;o\u2dfe\u2dff\u6134f\xbb\u2dff\u803b\xaa\u40aa\u803b\xba\u40bagof;\u62b6r;\u6a56lope;\u6a57;\u6a5b\u0180clo\u2e1f\u2e21\u2e27\xf2\u2e01ash\u803b\xf8\u40f8l;\u6298i\u016c\u2e2f\u2e34de\u803b\xf5\u40f5es\u0100;a\u01db\u2e3as;\u6a36ml\u803b\xf6\u40f6bar;\u633d\u0ae1\u2e5e\0\u2e7d\0\u2e80\u2e9d\0\u2ea2\u2eb9\0\0\u2ecb\u0e9c\0\u2f13\0\0\u2f2b\u2fbc\0\u2fc8r\u0200;ast\u0403\u2e67\u2e72\u0e85\u8100\xb6;l\u2e6d\u2e6e\u40b6le\xec\u0403\u0269\u2e78\0\0\u2e7bm;\u6af3;\u6afdy;\u443fr\u0280cimpt\u2e8b\u2e8f\u2e93\u1865\u2e97nt;\u4025od;\u402eil;\u6030enk;\u6031r;\uc000\ud835\udd2d\u0180imo\u2ea8\u2eb0\u2eb4\u0100;v\u2ead\u2eae\u43c6;\u43d5ma\xf4\u0a76ne;\u660e\u0180;tv\u2ebf\u2ec0\u2ec8\u43c0chfork\xbb\u1ffd;\u43d6\u0100au\u2ecf\u2edfn\u0100ck\u2ed5\u2eddk\u0100;h\u21f4\u2edb;\u610e\xf6\u21f4s\u0480;abcdemst\u2ef3\u2ef4\u1908\u2ef9\u2efd\u2f04\u2f06\u2f0a\u2f0e\u402bcir;\u6a23ir;\u6a22\u0100ou\u1d40\u2f02;\u6a25;\u6a72n\u80bb\xb1\u0e9dim;\u6a26wo;\u6a27\u0180ipu\u2f19\u2f20\u2f25ntint;\u6a15f;\uc000\ud835\udd61nd\u803b\xa3\u40a3\u0500;Eaceinosu\u0ec8\u2f3f\u2f41\u2f44\u2f47\u2f81\u2f89\u2f92\u2f7e\u2fb6;\u6ab3p;\u6ab7u\xe5\u0ed9\u0100;c\u0ece\u2f4c\u0300;acens\u0ec8\u2f59\u2f5f\u2f66\u2f68\u2f7eppro\xf8\u2f43urlye\xf1\u0ed9\xf1\u0ece\u0180aes\u2f6f\u2f76\u2f7approx;\u6ab9qq;\u6ab5im;\u62e8i\xed\u0edfme\u0100;s\u2f88\u0eae\u6032\u0180Eas\u2f78\u2f90\u2f7a\xf0\u2f75\u0180dfp\u0eec\u2f99\u2faf\u0180als\u2fa0\u2fa5\u2faalar;\u632eine;\u6312urf;\u6313\u0100;t\u0efb\u2fb4\xef\u0efbrel;\u62b0\u0100ci\u2fc0\u2fc5r;\uc000\ud835\udcc5;\u43c8ncsp;\u6008\u0300fiopsu\u2fda\u22e2\u2fdf\u2fe5\u2feb\u2ff1r;\uc000\ud835\udd2epf;\uc000\ud835\udd62rime;\u6057cr;\uc000\ud835\udcc6\u0180aeo\u2ff8\u3009\u3013t\u0100ei\u2ffe\u3005rnion\xf3\u06b0nt;\u6a16st\u0100;e\u3010\u3011\u403f\xf1\u1f19\xf4\u0f14\u0a80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30e0\u310e\u312b\u3147\u3162\u3172\u318e\u3206\u3215\u3224\u3229\u3258\u326e\u3272\u3290\u32b0\u32b7\u0180art\u3047\u304a\u304cr\xf2\u10b3\xf2\u03ddail;\u691car\xf2\u1c65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307f\u308f\u3094\u30cc\u0100eu\u306d\u3071;\uc000\u223d\u0331te;\u4155i\xe3\u116emptyv;\u69b3g\u0200;del\u0fd1\u3089\u308b\u308d;\u6992;\u69a5\xe5\u0fd1uo\u803b\xbb\u40bbr\u0580;abcfhlpstw\u0fdc\u30ac\u30af\u30b7\u30b9\u30bc\u30be\u30c0\u30c3\u30c7\u30cap;\u6975\u0100;f\u0fe0\u30b4s;\u6920;\u6933s;\u691e\xeb\u225d\xf0\u272el;\u6945im;\u6974l;\u61a3;\u619d\u0100ai\u30d1\u30d5il;\u691ao\u0100;n\u30db\u30dc\u6236al\xf3\u0f1e\u0180abr\u30e7\u30ea\u30eer\xf2\u17e5rk;\u6773\u0100ak\u30f3\u30fdc\u0100ek\u30f9\u30fb;\u407d;\u405d\u0100es\u3102\u3104;\u698cl\u0100du\u310a\u310c;\u698e;\u6990\u0200aeuy\u3117\u311c\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xec\u0ff2\xe2\u30fa;\u4440\u0200clqs\u3134\u3137\u313d\u3144a;\u6937dhar;\u6969uo\u0100;r\u020e\u020dh;\u61b3\u0180acg\u314e\u315f\u0f44l\u0200;ips\u0f78\u3158\u315b\u109cn\xe5\u10bbar\xf4\u0fa9t;\u65ad\u0180ilr\u3169\u1023\u316esht;\u697d;\uc000\ud835\udd2f\u0100ao\u3177\u3186r\u0100du\u317d\u317f\xbb\u047b\u0100;l\u1091\u3184;\u696c\u0100;v\u318b\u318c\u43c1;\u43f1\u0180gns\u3195\u31f9\u31fcht\u0300ahlrst\u31a4\u31b0\u31c2\u31d8\u31e4\u31eerrow\u0100;t\u0fdc\u31ada\xe9\u30c8arpoon\u0100du\u31bb\u31bfow\xee\u317ep\xbb\u1092eft\u0100ah\u31ca\u31d0rrow\xf3\u0feaarpoon\xf3\u0551ightarrows;\u61c9quigarro\xf7\u30cbhreetimes;\u62ccg;\u42daingdotse\xf1\u1f32\u0180ahm\u320d\u3210\u3213r\xf2\u0feaa\xf2\u0551;\u600foust\u0100;a\u321e\u321f\u63b1che\xbb\u321fmid;\u6aee\u0200abpt\u3232\u323d\u3240\u3252\u0100nr\u3237\u323ag;\u67edr;\u61fer\xeb\u1003\u0180afl\u3247\u324a\u324er;\u6986;\uc000\ud835\udd63us;\u6a2eimes;\u6a35\u0100ap\u325d\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6a12ar\xf2\u31e3\u0200achq\u327b\u3280\u10bc\u3285quo;\u603ar;\uc000\ud835\udcc7\u0100bu\u30fb\u328ao\u0100;r\u0214\u0213\u0180hir\u3297\u329b\u32a0re\xe5\u31f8mes;\u62cai\u0200;efl\u32aa\u1059\u1821\u32ab\u65b9tri;\u69celuhar;\u6968;\u611e\u0d61\u32d5\u32db\u32df\u332c\u3338\u3371\0\u337a\u33a4\0\0\u33ec\u33f0\0\u3428\u3448\u345a\u34ad\u34b1\u34ca\u34f1\0\u3616\0\0\u3633cute;\u415bqu\xef\u27ba\u0500;Eaceinpsy\u11ed\u32f3\u32f5\u32ff\u3302\u330b\u330f\u331f\u3326\u3329;\u6ab4\u01f0\u32fa\0\u32fc;\u6ab8on;\u4161u\xe5\u11fe\u0100;d\u11f3\u3307il;\u415frc;\u415d\u0180Eas\u3316\u3318\u331b;\u6ab6p;\u6abaim;\u62e9olint;\u6a13i\xed\u1204;\u4441ot\u0180;be\u3334\u1d47\u3335\u62c5;\u6a66\u0380Aacmstx\u3346\u334a\u3357\u335b\u335e\u3363\u336drr;\u61d8r\u0100hr\u3350\u3352\xeb\u2228\u0100;o\u0a36\u0a34t\u803b\xa7\u40a7i;\u403bwar;\u6929m\u0100in\u3369\xf0nu\xf3\xf1t;\u6736r\u0100;o\u3376\u2055\uc000\ud835\udd30\u0200acoy\u3382\u3386\u3391\u33a0rp;\u666f\u0100hy\u338b\u338fcy;\u4449;\u4448rt\u026d\u3399\0\0\u339ci\xe4\u1464ara\xec\u2e6f\u803b\xad\u40ad\u0100gm\u33a8\u33b4ma\u0180;fv\u33b1\u33b2\u33b2\u43c3;\u43c2\u0400;deglnpr\u12ab\u33c5\u33c9\u33ce\u33d6\u33de\u33e1\u33e6ot;\u6a6a\u0100;q\u12b1\u12b0\u0100;E\u33d3\u33d4\u6a9e;\u6aa0\u0100;E\u33db\u33dc\u6a9d;\u6a9fe;\u6246lus;\u6a24arr;\u6972ar\xf2\u113d\u0200aeit\u33f8\u3408\u340f\u3417\u0100ls\u33fd\u3404lsetm\xe9\u336ahp;\u6a33parsl;\u69e4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341c\u341d\u6aaa\u0100;s\u3422\u3423\u6aac;\uc000\u2aac\ufe00\u0180flp\u342e\u3433\u3442tcy;\u444c\u0100;b\u3438\u3439\u402f\u0100;a\u343e\u343f\u69c4r;\u633ff;\uc000\ud835\udd64a\u0100dr\u344d\u0402es\u0100;u\u3454\u3455\u6660it\xbb\u3455\u0180csu\u3460\u3479\u349f\u0100au\u3465\u346fp\u0100;s\u1188\u346b;\uc000\u2293\ufe00p\u0100;s\u11b4\u3475;\uc000\u2294\ufe00u\u0100bp\u347f\u348f\u0180;es\u1197\u119c\u3486et\u0100;e\u1197\u348d\xf1\u119d\u0180;es\u11a8\u11ad\u3496et\u0100;e\u11a8\u349d\xf1\u11ae\u0180;af\u117b\u34a6\u05b0r\u0165\u34ab\u05b1\xbb\u117car\xf2\u1148\u0200cemt\u34b9\u34be\u34c2\u34c5r;\uc000\ud835\udcc8tm\xee\xf1i\xec\u3415ar\xe6\u11be\u0100ar\u34ce\u34d5r\u0100;f\u34d4\u17bf\u6606\u0100an\u34da\u34edight\u0100ep\u34e3\u34eapsilo\xee\u1ee0h\xe9\u2eafs\xbb\u2852\u0280bcmnp\u34fb\u355e\u1209\u358b\u358e\u0480;Edemnprs\u350e\u350f\u3511\u3515\u351e\u3523\u352c\u3531\u3536\u6282;\u6ac5ot;\u6abd\u0100;d\u11da\u351aot;\u6ac3ult;\u6ac1\u0100Ee\u3528\u352a;\u6acb;\u628alus;\u6abfarr;\u6979\u0180eiu\u353d\u3552\u3555t\u0180;en\u350e\u3545\u354bq\u0100;q\u11da\u350feq\u0100;q\u352b\u3528m;\u6ac7\u0100bp\u355a\u355c;\u6ad5;\u6ad3c\u0300;acens\u11ed\u356c\u3572\u3579\u357b\u3326ppro\xf8\u32faurlye\xf1\u11fe\xf1\u11f3\u0180aes\u3582\u3588\u331bppro\xf8\u331aq\xf1\u3317g;\u666a\u0680123;Edehlmnps\u35a9\u35ac\u35af\u121c\u35b2\u35b4\u35c0\u35c9\u35d5\u35da\u35df\u35e8\u35ed\u803b\xb9\u40b9\u803b\xb2\u40b2\u803b\xb3\u40b3;\u6ac6\u0100os\u35b9\u35bct;\u6abeub;\u6ad8\u0100;d\u1222\u35c5ot;\u6ac4s\u0100ou\u35cf\u35d2l;\u67c9b;\u6ad7arr;\u697bult;\u6ac2\u0100Ee\u35e4\u35e6;\u6acc;\u628blus;\u6ac0\u0180eiu\u35f4\u3609\u360ct\u0180;en\u121c\u35fc\u3602q\u0100;q\u1222\u35b2eq\u0100;q\u35e7\u35e4m;\u6ac8\u0100bp\u3611\u3613;\u6ad4;\u6ad6\u0180Aan\u361c\u3620\u362drr;\u61d9r\u0100hr\u3626\u3628\xeb\u222e\u0100;o\u0a2b\u0a29war;\u692alig\u803b\xdf\u40df\u0be1\u3651\u365d\u3660\u12ce\u3673\u3679\0\u367e\u36c2\0\0\0\0\0\u36db\u3703\0\u3709\u376c\0\0\0\u3787\u0272\u3656\0\0\u365bget;\u6316;\u43c4r\xeb\u0e5f\u0180aey\u3666\u366b\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uc000\ud835\udd31\u0200eiko\u3686\u369d\u36b5\u36bc\u01f2\u368b\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369b\u43b8ym;\u43d1\u0100cn\u36a2\u36b2k\u0100as\u36a8\u36aeppro\xf8\u12c1im\xbb\u12acs\xf0\u129e\u0100as\u36ba\u36ae\xf0\u12c1rn\u803b\xfe\u40fe\u01ec\u031f\u36c6\u22e7es\u8180\xd7;bd\u36cf\u36d0\u36d8\u40d7\u0100;a\u190f\u36d5r;\u6a31;\u6a30\u0180eps\u36e1\u36e3\u3700\xe1\u2a4d\u0200;bcf\u0486\u36ec\u36f0\u36f4ot;\u6336ir;\u6af1\u0100;o\u36f9\u36fc\uc000\ud835\udd65rk;\u6ada\xe1\u3362rime;\u6034\u0180aip\u370f\u3712\u3764d\xe5\u1248\u0380adempst\u3721\u374d\u3740\u3751\u3757\u375c\u375fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65b5own\xbb\u1dbbeft\u0100;e\u2800\u373e\xf1\u092e;\u625cight\u0100;e\u32aa\u374b\xf1\u105aot;\u65ecinus;\u6a3alus;\u6a39b;\u69cdime;\u6a3bezium;\u63e2\u0180cht\u3772\u377d\u3781\u0100ry\u3777\u377b;\uc000\ud835\udcc9;\u4446cy;\u445brok;\u4167\u0100io\u378b\u378ex\xf4\u1777head\u0100lr\u3797\u37a0eftarro\xf7\u084fightarrow\xbb\u0f5d\u0900AHabcdfghlmoprstuw\u37d0\u37d3\u37d7\u37e4\u37f0\u37fc\u380e\u381c\u3823\u3834\u3851\u385d\u386b\u38a9\u38cc\u38d2\u38ea\u38f6r\xf2\u03edar;\u6963\u0100cr\u37dc\u37e2ute\u803b\xfa\u40fa\xf2\u1150r\u01e3\u37ea\0\u37edy;\u445eve;\u416d\u0100iy\u37f5\u37farc\u803b\xfb\u40fb;\u4443\u0180abh\u3803\u3806\u380br\xf2\u13adlac;\u4171a\xf2\u13c3\u0100ir\u3813\u3818sht;\u697e;\uc000\ud835\udd32rave\u803b\xf9\u40f9\u0161\u3827\u3831r\u0100lr\u382c\u382e\xbb\u0957\xbb\u1083lk;\u6580\u0100ct\u3839\u384d\u026f\u383f\0\0\u384arn\u0100;e\u3845\u3846\u631cr\xbb\u3846op;\u630fri;\u65f8\u0100al\u3856\u385acr;\u416b\u80bb\xa8\u0349\u0100gp\u3862\u3866on;\u4173f;\uc000\ud835\udd66\u0300adhlsu\u114b\u3878\u387d\u1372\u3891\u38a0own\xe1\u13b3arpoon\u0100lr\u3888\u388cef\xf4\u382digh\xf4\u382fi\u0180;hl\u3899\u389a\u389c\u43c5\xbb\u13faon\xbb\u389aparrows;\u61c8\u0180cit\u38b0\u38c4\u38c8\u026f\u38b6\0\0\u38c1rn\u0100;e\u38bc\u38bd\u631dr\xbb\u38bdop;\u630eng;\u416fri;\u65f9cr;\uc000\ud835\udcca\u0180dir\u38d9\u38dd\u38e2ot;\u62f0lde;\u4169i\u0100;f\u3730\u38e8\xbb\u1813\u0100am\u38ef\u38f2r\xf2\u38a8l\u803b\xfc\u40fcangle;\u69a7\u0780ABDacdeflnoprsz\u391c\u391f\u3929\u392d\u39b5\u39b8\u39bd\u39df\u39e4\u39e8\u39f3\u39f9\u39fd\u3a01\u3a20r\xf2\u03f7ar\u0100;v\u3926\u3927\u6ae8;\u6ae9as\xe8\u03e1\u0100nr\u3932\u3937grt;\u699c\u0380eknprst\u34e3\u3946\u394b\u3952\u395d\u3964\u3996app\xe1\u2415othin\xe7\u1e96\u0180hir\u34eb\u2ec8\u3959op\xf4\u2fb5\u0100;h\u13b7\u3962\xef\u318d\u0100iu\u3969\u396dgm\xe1\u33b3\u0100bp\u3972\u3984setneq\u0100;q\u397d\u3980\uc000\u228a\ufe00;\uc000\u2acb\ufe00setneq\u0100;q\u398f\u3992\uc000\u228b\ufe00;\uc000\u2acc\ufe00\u0100hr\u399b\u399fet\xe1\u369ciangle\u0100lr\u39aa\u39afeft\xbb\u0925ight\xbb\u1051y;\u4432ash\xbb\u1036\u0180elr\u39c4\u39d2\u39d7\u0180;be\u2dea\u39cb\u39cfar;\u62bbq;\u625alip;\u62ee\u0100bt\u39dc\u1468a\xf2\u1469r;\uc000\ud835\udd33tr\xe9\u39aesu\u0100bp\u39ef\u39f1\xbb\u0d1c\xbb\u0d59pf;\uc000\ud835\udd67ro\xf0\u0efbtr\xe9\u39b4\u0100cu\u3a06\u3a0br;\uc000\ud835\udccb\u0100bp\u3a10\u3a18n\u0100Ee\u3980\u3a16\xbb\u397en\u0100Ee\u3992\u3a1e\xbb\u3990igzag;\u699a\u0380cefoprs\u3a36\u3a3b\u3a56\u3a5b\u3a54\u3a61\u3a6airc;\u4175\u0100di\u3a40\u3a51\u0100bg\u3a45\u3a49ar;\u6a5fe\u0100;q\u15fa\u3a4f;\u6259erp;\u6118r;\uc000\ud835\udd34pf;\uc000\ud835\udd68\u0100;e\u1479\u3a66at\xe8\u1479cr;\uc000\ud835\udccc\u0ae3\u178e\u3a87\0\u3a8b\0\u3a90\u3a9b\0\0\u3a9d\u3aa8\u3aab\u3aaf\0\0\u3ac3\u3ace\0\u3ad8\u17dc\u17dftr\xe9\u17d1r;\uc000\ud835\udd35\u0100Aa\u3a94\u3a97r\xf2\u03c3r\xf2\u09f6;\u43be\u0100Aa\u3aa1\u3aa4r\xf2\u03b8r\xf2\u09eba\xf0\u2713is;\u62fb\u0180dpt\u17a4\u3ab5\u3abe\u0100fl\u3aba\u17a9;\uc000\ud835\udd69im\xe5\u17b2\u0100Aa\u3ac7\u3acar\xf2\u03cer\xf2\u0a01\u0100cq\u3ad2\u17b8r;\uc000\ud835\udccd\u0100pt\u17d6\u3adcr\xe9\u17d4\u0400acefiosu\u3af0\u3afd\u3b08\u3b0c\u3b11\u3b15\u3b1b\u3b21c\u0100uy\u3af6\u3afbte\u803b\xfd\u40fd;\u444f\u0100iy\u3b02\u3b06rc;\u4177;\u444bn\u803b\xa5\u40a5r;\uc000\ud835\udd36cy;\u4457pf;\uc000\ud835\udd6acr;\uc000\ud835\udcce\u0100cm\u3b26\u3b29y;\u444el\u803b\xff\u40ff\u0500acdefhiosw\u3b42\u3b48\u3b54\u3b58\u3b64\u3b69\u3b6d\u3b74\u3b7a\u3b80cute;\u417a\u0100ay\u3b4d\u3b52ron;\u417e;\u4437ot;\u417c\u0100et\u3b5d\u3b61tr\xe6\u155fa;\u43b6r;\uc000\ud835\udd37cy;\u4436grarr;\u61ddpf;\uc000\ud835\udd6bcr;\uc000\ud835\udccf\u0100jn\u3b85\u3b87;\u600dj;\u600c'.split("").map((c => c.charCodeAt(0))));
// Generated using scripts/write-decode-map.ts
var xmlDecodeTree = new Uint16Array(
// prettier-ignore
"\u0200aglq\t\x15\x18\x1b\u026d\x0f\0\0\x12p;\u4026os;\u4027t;\u403et;\u403cuot;\u4022".split("").map((c => c.charCodeAt(0))));
// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134
var _a;
const decodeMap = new Map([ [ 0, 65533 ],
// C1 Unicode control character reference replacements
[ 128, 8364 ], [ 130, 8218 ], [ 131, 402 ], [ 132, 8222 ], [ 133, 8230 ], [ 134, 8224 ], [ 135, 8225 ], [ 136, 710 ], [ 137, 8240 ], [ 138, 352 ], [ 139, 8249 ], [ 140, 338 ], [ 142, 381 ], [ 145, 8216 ], [ 146, 8217 ], [ 147, 8220 ], [ 148, 8221 ], [ 149, 8226 ], [ 150, 8211 ], [ 151, 8212 ], [ 152, 732 ], [ 153, 8482 ], [ 154, 353 ], [ 155, 8250 ], [ 156, 339 ], [ 158, 382 ], [ 159, 376 ] ]);
/**
* Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point.
*/ const fromCodePoint$1 =
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins
(_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function(codePoint) {
let output = "";
if (codePoint > 65535) {
codePoint -= 65536;
output += String.fromCharCode(codePoint >>> 10 & 1023 | 55296);
codePoint = 56320 | codePoint & 1023;
}
output += String.fromCharCode(codePoint);
return output;
};
/**
* Replace the given code point with a replacement character if it is a
* surrogate or is outside the valid range. Otherwise return the code
* point unchanged.
*/ function replaceCodePoint(codePoint) {
var _a;
if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) {
return 65533;
}
return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint;
}
var CharCodes;
(function(CharCodes) {
CharCodes[CharCodes["NUM"] = 35] = "NUM";
CharCodes[CharCodes["SEMI"] = 59] = "SEMI";
CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS";
CharCodes[CharCodes["ZERO"] = 48] = "ZERO";
CharCodes[CharCodes["NINE"] = 57] = "NINE";
CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A";
CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F";
CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X";
CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z";
CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A";
CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F";
CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z";
})(CharCodes || (CharCodes = {}));
/** Bit that needs to be set to convert an upper case ASCII character to lower case */ const TO_LOWER_BIT = 32;
var BinTrieFlags;
(function(BinTrieFlags) {
BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH";
BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH";
BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE";
})(BinTrieFlags || (BinTrieFlags = {}));
function isNumber(code) {
return code >= CharCodes.ZERO && code <= CharCodes.NINE;
}
function isHexadecimalCharacter(code) {
return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F;
}
function isAsciiAlphaNumeric(code) {
return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z || isNumber(code);
}
/**
* Checks if the given character is a valid end character for an entity in an attribute.
*
* Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error.
* See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state
*/ function isEntityInAttributeInvalidEnd(code) {
return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code);
}
var EntityDecoderState;
(function(EntityDecoderState) {
EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart";
EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart";
EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal";
EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex";
EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity";
})(EntityDecoderState || (EntityDecoderState = {}));
var DecodingMode;
(function(DecodingMode) {
/** Entities in text nodes that can end with any character. */
DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy";
/** Only allow entities terminated with a semicolon. */ DecodingMode[DecodingMode["Strict"] = 1] = "Strict";
/** Entities in attributes have limitations on ending characters. */ DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute";
})(DecodingMode || (DecodingMode = {}));
/**
* Token decoder with support of writing partial entities.
*/ class EntityDecoder {
constructor(/** The tree used to decode entities. */
decodeTree,
/**
* The function that is called when a codepoint is decoded.
*
* For multi-byte named entities, this will be called multiple times,
* with the second codepoint, and the same `consumed` value.
*
* @param codepoint The decoded codepoint.
* @param consumed The number of bytes consumed by the decoder.
*/
emitCodePoint, /** An object that is used to produce errors. */
errors) {
this.decodeTree = decodeTree;
this.emitCodePoint = emitCodePoint;
this.errors = errors;
/** The current state of the decoder. */ this.state = EntityDecoderState.EntityStart;
/** Characters that were consumed while parsing an entity. */ this.consumed = 1;
/**
* The result of the entity.
*
* Either the result index of a numeric entity, or the codepoint of a
* numeric entity.
*/ this.result = 0;
/** The current index in the decode tree. */ this.treeIndex = 0;
/** The number of characters that were consumed in excess. */ this.excess = 1;
/** The mode in which the decoder is operating. */ this.decodeMode = DecodingMode.Strict;
}
/** Resets the instance to make it reusable. */ startEntity(decodeMode) {
this.decodeMode = decodeMode;
this.state = EntityDecoderState.EntityStart;
this.result = 0;
this.treeIndex = 0;
this.excess = 1;
this.consumed = 1;
}
/**
* Write an entity to the decoder. This can be called multiple times with partial entities.
* If the entity is incomplete, the decoder will return -1.
*
* Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the
* entity is incomplete, and resume when the next string is written.
*
* @param string The string containing the entity (or a continuation of the entity).
* @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/ write(str, offset) {
switch (this.state) {
case EntityDecoderState.EntityStart:
{
if (str.charCodeAt(offset) === CharCodes.NUM) {
this.state = EntityDecoderState.NumericStart;
this.consumed += 1;
return this.stateNumericStart(str, offset + 1);
}
this.state = EntityDecoderState.NamedEntity;
return this.stateNamedEntity(str, offset);
}
case EntityDecoderState.NumericStart:
{
return this.stateNumericStart(str, offset);
}
case EntityDecoderState.NumericDecimal:
{
return this.stateNumericDecimal(str, offset);
}
case EntityDecoderState.NumericHex:
{
return this.stateNumericHex(str, offset);
}
case EntityDecoderState.NamedEntity:
{
return this.stateNamedEntity(str, offset);
}
}
}
/**
* Switches between the numeric decimal and hexadecimal states.
*
* Equivalent to the `Numeric character reference state` in the HTML spec.
*
* @param str The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/ stateNumericStart(str, offset) {
if (offset >= str.length) {
return -1;
}
if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {
this.state = EntityDecoderState.NumericHex;
this.consumed += 1;
return this.stateNumericHex(str, offset + 1);
}
this.state = EntityDecoderState.NumericDecimal;
return this.stateNumericDecimal(str, offset);
}
addToNumericResult(str, start, end, base) {
if (start !== end) {
const digitCount = end - start;
this.result = this.result * Math.pow(base, digitCount) + parseInt(str.substr(start, digitCount), base);
this.consumed += digitCount;
}
}
/**
* Parses a hexadecimal numeric entity.
*
* Equivalent to the `Hexademical character reference state` in the HTML spec.
*
* @param str The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/ stateNumericHex(str, offset) {
const startIdx = offset;
while (offset < str.length) {
const char = str.charCodeAt(offset);
if (isNumber(char) || isHexadecimalCharacter(char)) {
offset += 1;
} else {
this.addToNumericResult(str, startIdx, offset, 16);
return this.emitNumericEntity(char, 3);
}
}
this.addToNumericResult(str, startIdx, offset, 16);
return -1;
}
/**
* Parses a decimal numeric entity.
*
* Equivalent to the `Decimal character reference state` in the HTML spec.
*
* @param str The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/ stateNumericDecimal(str, offset) {
const startIdx = offset;
while (offset < str.length) {
const char = str.charCodeAt(offset);
if (isNumber(char)) {
offset += 1;
} else {
this.addToNumericResult(str, startIdx, offset, 10);
return this.emitNumericEntity(char, 2);
}
}
this.addToNumericResult(str, startIdx, offset, 10);
return -1;
}
/**
* Validate and emit a numeric entity.
*
* Implements the logic from the `Hexademical character reference start
* state` and `Numeric character reference end state` in the HTML spec.
*
* @param lastCp The last code point of the entity. Used to see if the
* entity was terminated with a semicolon.
* @param expectedLength The minimum number of characters that should be
* consumed. Used to validate that at least one digit
* was consumed.
* @returns The number of characters that were consumed.
*/ emitNumericEntity(lastCp, expectedLength) {
var _a;
// Ensure we consumed at least one digit.
if (this.consumed <= expectedLength) {
(_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
return 0;
}
// Figure out if this is a legit end of the entity
if (lastCp === CharCodes.SEMI) {
this.consumed += 1;
} else if (this.decodeMode === DecodingMode.Strict) {
return 0;
}
this.emitCodePoint(replaceCodePoint(this.result), this.consumed);
if (this.errors) {
if (lastCp !== CharCodes.SEMI) {
this.errors.missingSemicolonAfterCharacterReference();
}
this.errors.validateNumericCharacterReference(this.result);
}
return this.consumed;
}
/**
* Parses a named entity.
*
* Equivalent to the `Named character reference state` in the HTML spec.
*
* @param str The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/ stateNamedEntity(str, offset) {
const {decodeTree: decodeTree} = this;
let current = decodeTree[this.treeIndex];
// The mask is the number of bytes of the value, including the current byte.
let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
for (;offset < str.length; offset++, this.excess++) {
const char = str.charCodeAt(offset);
this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);
if (this.treeIndex < 0) {
return this.result === 0 ||
// If we are parsing an attribute
this.decodeMode === DecodingMode.Attribute && (
// We shouldn't have consumed any characters after the entity,
valueLength === 0 ||
// And there should be no invalid characters.
isEntityInAttributeInvalidEnd(char)) ? 0 : this.emitNotTerminatedNamedEntity();
}
current = decodeTree[this.treeIndex];
valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
// If the branch is a value, store it and continue
if (valueLength !== 0) {
// If the entity is terminated by a semicolon, we are done.
if (char === CharCodes.SEMI) {
return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);
}
// If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it.
if (this.decodeMode !== DecodingMode.Strict) {
this.result = this.treeIndex;
this.consumed += this.excess;
this.excess = 0;
}
}
}
return -1;
}
/**
* Emit a named entity that was not terminated with a semicolon.
*
* @returns The number of characters consumed.
*/ emitNotTerminatedNamedEntity() {
var _a;
const {result: result, decodeTree: decodeTree} = this;
const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;
this.emitNamedEntityData(result, valueLength, this.consumed);
(_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference();
return this.consumed;
}
/**
* Emit a named entity.
*
* @param result The index of the entity in the decode tree.
* @param valueLength The number of bytes in the entity.
* @param consumed The number of characters consumed.
*
* @returns The number of characters consumed.
*/ emitNamedEntityData(result, valueLength, consumed) {
const {decodeTree: decodeTree} = this;
this.emitCodePoint(valueLength === 1 ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH : decodeTree[result + 1], consumed);
if (valueLength === 3) {
// For multi-byte values, we need to emit the second byte.
this.emitCodePoint(decodeTree[result + 2], consumed);
}
return consumed;
}
/**
* Signal to the parser that the end of the input was reached.
*
* Remaining data will be emitted and relevant errors will be produced.
*
* @returns The number of characters consumed.
*/ end() {
var _a;
switch (this.state) {
case EntityDecoderState.NamedEntity:
{
// Emit a named entity if we have one.
return this.result !== 0 && (this.decodeMode !== DecodingMode.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
}
// Otherwise, emit a numeric entity if we have one.
case EntityDecoderState.NumericDecimal:
{
return this.emitNumericEntity(0, 2);
}
case EntityDecoderState.NumericHex:
{
return this.emitNumericEntity(0, 3);
}
case EntityDecoderState.NumericStart:
{
(_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
return 0;
}
case EntityDecoderState.EntityStart:
{
// Return 0 if we have no entity.
return 0;
}
}
}
}
/**
* Creates a function that decodes entities in a string.
*
* @param decodeTree The decode tree.
* @returns A function that decodes entities in a string.
*/ function getDecoder(decodeTree) {
let ret = "";
const decoder = new EntityDecoder(decodeTree, (str => ret += fromCodePoint$1(str)));
return function decodeWithTrie(str, decodeMode) {
let lastIndex = 0;
let offset = 0;
while ((offset = str.indexOf("&", offset)) >= 0) {
ret += str.slice(lastIndex, offset);
decoder.startEntity(decodeMode);
const len = decoder.write(str,
// Skip the "&"
offset + 1);
if (len < 0) {
lastIndex = offset + decoder.end();
break;
}
lastIndex = offset + len;
// If `len` is 0, skip the current `&` and continue.
offset = len === 0 ? lastIndex + 1 : lastIndex;
}
const result = ret + str.slice(lastIndex);
// Make sure we don't keep a reference to the final string.
ret = "";
return result;
};
}
/**
* Determines the branch of the current node that is taken given the current
* character. This function is used to traverse the trie.
*
* @param decodeTree The trie.
* @param current The current node.
* @param nodeIdx The index right after the current node and its value.
* @param char The current character.
* @returns The index of the next node, or -1 if no branch is taken.
*/ function determineBranch(decodeTree, current, nodeIdx, char) {
const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;
const jumpOffset = current & BinTrieFlags.JUMP_TABLE;
// Case 1: Single branch encoded in jump offset
if (branchCount === 0) {
return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1;
}
// Case 2: Multiple branches encoded in jump table
if (jumpOffset) {
const value = char - jumpOffset;
return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIdx + value] - 1;
}
// Case 3: Multiple branches encoded in dictionary
// Binary search for the character.
let lo = nodeIdx;
let hi = lo + branchCount - 1;
while (lo <= hi) {
const mid = lo + hi >>> 1;
const midVal = decodeTree[mid];
if (midVal < char) {
lo = mid + 1;
} else if (midVal > char) {
hi = mid - 1;
} else {
return decodeTree[mid + branchCount];
}
}
return -1;
}
const htmlDecoder = getDecoder(htmlDecodeTree);
getDecoder(xmlDecodeTree);
/**
* Decodes an HTML string.
*
* @param str The string to decode.
* @param mode The decoding mode.
* @returns The decoded string.
*/ function decodeHTML(str, mode = DecodingMode.Legacy) {
return htmlDecoder(str, mode);
}
// Utilities
function _class$1(obj) {
return Object.prototype.toString.call(obj);
}
function isString$1(obj) {
return _class$1(obj) === "[object String]";
}
const _hasOwnProperty = Object.prototype.hasOwnProperty;
function has(object, key) {
return _hasOwnProperty.call(object, key);
}
// Merge objects
function assign$1(obj /* from1, from2, from3, ... */) {
const sources = Array.prototype.slice.call(arguments, 1);
sources.forEach((function(source) {
if (!source) {
return;
}
if (typeof source !== "object") {
throw new TypeError(source + "must be object");
}
Object.keys(source).forEach((function(key) {
obj[key] = source[key];
}));
}));
return obj;
}
// Remove element from array and put another array at those position.
// Useful for some operations with tokens
function arrayReplaceAt(src, pos, newElements) {
return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1));
}
function isValidEntityCode(c) {
/* eslint no-bitwise:0 */
// broken sequence
if (c >= 55296 && c <= 57343) {
return false;
}
// never used
if (c >= 64976 && c <= 65007) {
return false;
}
if ((c & 65535) === 65535 || (c & 65535) === 65534) {
return false;
}
// control codes
if (c >= 0 && c <= 8) {
return false;
}
if (c === 11) {
return false;
}
if (c >= 14 && c <= 31) {
return false;
}
if (c >= 127 && c <= 159) {
return false;
}
// out of range
if (c > 1114111) {
return false;
}
return true;
}
function fromCodePoint(c) {
/* eslint no-bitwise:0 */
if (c > 65535) {
c -= 65536;
const surrogate1 = 55296 + (c >> 10);
const surrogate2 = 56320 + (c & 1023);
return String.fromCharCode(surrogate1, surrogate2);
}
return String.fromCharCode(c);
}
const UNESCAPE_MD_RE = /\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g;
const ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi;
const UNESCAPE_ALL_RE = new RegExp(UNESCAPE_MD_RE.source + "|" + ENTITY_RE.source, "gi");
const DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;
function replaceEntityPattern(match, name) {
if (name.charCodeAt(0) === 35 /* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) {
const code = name[1].toLowerCase() === "x" ? parseInt(name.slice(2), 16) : parseInt(name.slice(1), 10);
if (isValidEntityCode(code)) {
return fromCodePoint(code);
}
return match;
}
const decoded = decodeHTML(match);
if (decoded !== match) {
return decoded;
}
return match;
}
/* function replaceEntities(str) {
if (str.indexOf('&') < 0) { return str; }
return str.replace(ENTITY_RE, replaceEntityPattern);
} */ function unescapeMd(str) {
if (str.indexOf("\\") < 0) {
return str;
}
return str.replace(UNESCAPE_MD_RE, "$1");
}
function unescapeAll(str) {
if (str.indexOf("\\") < 0 && str.indexOf("&") < 0) {
return str;
}
return str.replace(UNESCAPE_ALL_RE, (function(match, escaped, entity) {
if (escaped) {
return escaped;
}
return replaceEntityPattern(match, entity);
}));
}
const HTML_ESCAPE_TEST_RE = /[&<>"]/;
const HTML_ESCAPE_REPLACE_RE = /[&<>"]/g;
const HTML_REPLACEMENTS = {
"&": "&amp;",
"<": "&lt;",
">": "&gt;",
'"': "&quot;"
};
function replaceUnsafeChar(ch) {
return HTML_REPLACEMENTS[ch];
}
function escapeHtml(str) {
if (HTML_ESCAPE_TEST_RE.test(str)) {
return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);
}
return str;
}
const REGEXP_ESCAPE_RE = /[.?*+^$[\]\\(){}|-]/g;
function escapeRE$1(str) {
return str.replace(REGEXP_ESCAPE_RE, "\\$&");
}
function isSpace(code) {
switch (code) {
case 9:
case 32:
return true;
}
return false;
}
// Zs (unicode class) || [\t\f\v\r\n]
function isWhiteSpace(code) {
if (code >= 8192 && code <= 8202) {
return true;
}
switch (code) {
case 9:
// \t
case 10:
// \n
case 11:
// \v
case 12:
// \f
case 13:
// \r
case 32:
case 160:
case 5760:
case 8239:
case 8287:
case 12288:
return true;
}
return false;
}
/* eslint-disable max-len */
// Currently without astral characters support.
function isPunctChar(ch) {
return P.test(ch);
}
// Markdown ASCII punctuation characters.
// !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~
// http://spec.commonmark.org/0.15/#ascii-punctuation-character
// Don't confuse with unicode punctuation !!! It lacks some chars in ascii range.
function isMdAsciiPunct(ch) {
switch (ch) {
case 33 /* ! */ :
case 34 /* " */ :
case 35 /* # */ :
case 36 /* $ */ :
case 37 /* % */ :
case 38 /* & */ :
case 39 /* ' */ :
case 40 /* ( */ :
case 41 /* ) */ :
case 42 /* * */ :
case 43 /* + */ :
case 44 /* , */ :
case 45 /* - */ :
case 46 /* . */ :
case 47 /* / */ :
case 58 /* : */ :
case 59 /* ; */ :
case 60 /* < */ :
case 61 /* = */ :
case 62 /* > */ :
case 63 /* ? */ :
case 64 /* @ */ :
case 91 /* [ */ :
case 92 /* \ */ :
case 93 /* ] */ :
case 94 /* ^ */ :
case 95 /* _ */ :
case 96 /* ` */ :
case 123 /* { */ :
case 124 /* | */ :
case 125 /* } */ :
case 126 /* ~ */ :
return true;
default:
return false;
}
}
// Hepler to unify [reference labels].
function normalizeReference(str) {
// Trim and collapse whitespace
str = str.trim().replace(/\s+/g, " ");
// In node v10 'ẞ'.toLowerCase() === 'Ṿ', which is presumed to be a bug
// fixed in v12 (couldn't find any details).
// So treat this one as a special case
// (remove this when node v10 is no longer supported).
if ("\u1e9e".toLowerCase() === "\u1e7e") {
str = str.replace(/\u1e9e/g, "\xdf");
}
// .toLowerCase().toUpperCase() should get rid of all differences
// between letter variants.
// Simple .toLowerCase() doesn't normalize 125 code points correctly,
// and .toUpperCase doesn't normalize 6 of them (list of exceptions:
// İ, ϴ, ẞ, Ω, K, Å - those are already uppercased, but have differently
// uppercased versions).
// Here's an example showing how it happens. Lets take greek letter omega:
// uppercase U+0398 (Θ), U+03f4 (ϴ) and lowercase U+03b8 (θ), U+03d1 (ϑ)
// Unicode entries:
// 0398;GREEK CAPITAL LETTER THETA;Lu;0;L;;;;;N;;;;03B8;
// 03B8;GREEK SMALL LETTER THETA;Ll;0;L;;;;;N;;;0398;;0398
// 03D1;GREEK THETA SYMBOL;Ll;0;L;<compat> 03B8;;;;N;GREEK SMALL LETTER SCRIPT THETA;;0398;;0398
// 03F4;GREEK CAPITAL THETA SYMBOL;Lu;0;L;<compat> 0398;;;;N;;;;03B8;
// Case-insensitive comparison should treat all of them as equivalent.
// But .toLowerCase() doesn't change ϑ (it's already lowercase),
// and .toUpperCase() doesn't change ϴ (already uppercase).
// Applying first lower then upper case normalizes any character:
// '\u0398\u03f4\u03b8\u03d1'.toLowerCase().toUpperCase() === '\u0398\u0398\u0398\u0398'
// Note: this is equivalent to unicode case folding; unicode normalization
// is a different step that is not required here.
// Final result should be uppercased, because it's later stored in an object
// (this avoid a conflict with Object.prototype members,
// most notably, `__proto__`)
return str.toLowerCase().toUpperCase();
}
// Re-export libraries commonly used in both markdown-it and its plugins,
// so plugins won't have to depend on them explicitly, which reduces their
// bundled size (e.g. a browser build).
const lib = {
mdurl: mdurl,
ucmicro: ucmicro
};
var utils = Object.freeze({
__proto__: null,
arrayReplaceAt: arrayReplaceAt,
assign: assign$1,
escapeHtml: escapeHtml,
escapeRE: escapeRE$1,
fromCodePoint: fromCodePoint,
has: has,
isMdAsciiPunct: isMdAsciiPunct,
isPunctChar: isPunctChar,
isSpace: isSpace,
isString: isString$1,
isValidEntityCode: isValidEntityCode,
isWhiteSpace: isWhiteSpace,
lib: lib,
normalizeReference: normalizeReference,
unescapeAll: unescapeAll,
unescapeMd: unescapeMd
});
// Parse link label
// this function assumes that first character ("[") already matches;
// returns the end of the label
function parseLinkLabel(state, start, disableNested) {
let level, found, marker, prevPos;
const max = state.posMax;
const oldPos = state.pos;
state.pos = start + 1;
level = 1;
while (state.pos < max) {
marker = state.src.charCodeAt(state.pos);
if (marker === 93 /* ] */) {
level--;
if (level === 0) {
found = true;
break;
}
}
prevPos = state.pos;
state.md.inline.skipToken(state);
if (marker === 91 /* [ */) {
if (prevPos === state.pos - 1) {
// increase level if we find text `[`, which is not a part of any token
level++;
} else if (disableNested) {
state.pos = oldPos;
return -1;
}
}
}
let labelEnd = -1;
if (found) {
labelEnd = state.pos;
}
// restore old state
state.pos = oldPos;
return labelEnd;
}
// Parse link destination
function parseLinkDestination(str, start, max) {
let code;
let pos = start;
const result = {
ok: false,
pos: 0,
lines: 0,
str: ""
};
if (str.charCodeAt(pos) === 60 /* < */) {
pos++;
while (pos < max) {
code = str.charCodeAt(pos);
if (code === 10 /* \n */) {
return result;
}
if (code === 60 /* < */) {
return result;
}
if (code === 62 /* > */) {
result.pos = pos + 1;
result.str = unescapeAll(str.slice(start + 1, pos));
result.ok = true;
return result;
}
if (code === 92 /* \ */ && pos + 1 < max) {
pos += 2;
continue;
}
pos++;
}
// no closing '>'
return result;
}
// this should be ... } else { ... branch
let level = 0;
while (pos < max) {
code = str.charCodeAt(pos);
if (code === 32) {
break;
}
// ascii control characters
if (code < 32 || code === 127) {
break;
}
if (code === 92 /* \ */ && pos + 1 < max) {
if (str.charCodeAt(pos + 1) === 32) {
break;
}
pos += 2;
continue;
}
if (code === 40 /* ( */) {
level++;
if (level > 32) {
return result;
}
}
if (code === 41 /* ) */) {
if (level === 0) {
break;
}
level--;
}
pos++;
}
if (start === pos) {
return result;
}
if (level !== 0) {
return result;
}
result.str = unescapeAll(str.slice(start, pos));
result.pos = pos;
result.ok = true;
return result;
}
// Parse link title
function parseLinkTitle(str, start, max) {
let code, marker;
let lines = 0;
let pos = start;
const result = {
ok: false,
pos: 0,
lines: 0,
str: ""
};
if (pos >= max) {
return result;
}
marker = str.charCodeAt(pos);
if (marker !== 34 /* " */ && marker !== 39 /* ' */ && marker !== 40 /* ( */) {
return result;
}
pos++;
// if opening marker is "(", switch it to closing marker ")"
if (marker === 40) {
marker = 41;
}
while (pos < max) {
code = str.charCodeAt(pos);
if (code === marker) {
result.pos = pos + 1;
result.lines = lines;
result.str = unescapeAll(str.slice(start + 1, pos));
result.ok = true;
return result;
} else if (code === 40 /* ( */ && marker === 41 /* ) */) {
return result;
} else if (code === 10) {
lines++;
} else if (code === 92 /* \ */ && pos + 1 < max) {
pos++;
if (str.charCodeAt(pos) === 10) {
lines++;
}
}
pos++;
}
return result;
}
// Just a shortcut for bulk export
var helpers = Object.freeze({
__proto__: null,
parseLinkDestination: parseLinkDestination,
parseLinkLabel: parseLinkLabel,
parseLinkTitle: parseLinkTitle
});
/**
* class Renderer
*
* Generates HTML from parsed token stream. Each instance has independent
* copy of rules. Those can be rewritten with ease. Also, you can add new
* rules if you create plugin and adds new token types.
**/ const default_rules = {};
default_rules.code_inline = function(tokens, idx, options, env, slf) {
const token = tokens[idx];
return "<code" + slf.renderAttrs(token) + ">" + escapeHtml(token.content) + "</code>";
};
default_rules.code_block = function(tokens, idx, options, env, slf) {
const token = tokens[idx];
return "<pre" + slf.renderAttrs(token) + "><code>" + escapeHtml(tokens[idx].content) + "</code></pre>\n";
};
default_rules.fence = function(tokens, idx, options, env, slf) {
const token = tokens[idx];
const info = token.info ? unescapeAll(token.info).trim() : "";
let langName = "";
let langAttrs = "";
if (info) {
const arr = info.split(/(\s+)/g);
langName = arr[0];
langAttrs = arr.slice(2).join("");
}
let highlighted;
if (options.highlight) {
highlighted = options.highlight(token.content, langName, langAttrs) || escapeHtml(token.content);
} else {
highlighted = escapeHtml(token.content);
}
if (highlighted.indexOf("<pre") === 0) {
return highlighted + "\n";
}
// If language exists, inject class gently, without modifying original token.
// May be, one day we will add .deepClone() for token and simplify this part, but
// now we prefer to keep things local.
if (info) {
const i = token.attrIndex("class");
const tmpAttrs = token.attrs ? token.attrs.slice() : [];
if (i < 0) {
tmpAttrs.push([ "class", options.langPrefix + langName ]);
} else {
tmpAttrs[i] = tmpAttrs[i].slice();
tmpAttrs[i][1] += " " + options.langPrefix + langName;
}
// Fake token just to render attributes
const tmpToken = {
attrs: tmpAttrs
};
return `<pre><code${slf.renderAttrs(tmpToken)}>${highlighted}</code></pre>\n`;
}
return `<pre><code${slf.renderAttrs(token)}>${highlighted}</code></pre>\n`;
};
default_rules.image = function(tokens, idx, options, env, slf) {
const token = tokens[idx];
// "alt" attr MUST be set, even if empty. Because it's mandatory and
// should be placed on proper position for tests.
// Replace content with actual value
token.attrs[token.attrIndex("alt")][1] = slf.renderInlineAsText(token.children, options, env);
return slf.renderToken(tokens, idx, options);
};
default_rules.hardbreak = function(tokens, idx, options /*, env */) {
return options.xhtmlOut ? "<br />\n" : "<br>\n";
};
default_rules.softbreak = function(tokens, idx, options /*, env */) {
return options.breaks ? options.xhtmlOut ? "<br />\n" : "<br>\n" : "\n";
};
default_rules.text = function(tokens, idx /*, options, env */) {
return escapeHtml(tokens[idx].content);
};
default_rules.html_block = function(tokens, idx /*, options, env */) {
return tokens[idx].content;
};
default_rules.html_inline = function(tokens, idx /*, options, env */) {
return tokens[idx].content;
};
/**
* new Renderer()
*
* Creates new [[Renderer]] instance and fill [[Renderer#rules]] with defaults.
**/ function Renderer() {
/**
* Renderer#rules -> Object
*
* Contains render rules for tokens. Can be updated and extended.
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')();
*
* md.renderer.rules.strong_open = function () { return '<b>'; };
* md.renderer.rules.strong_close = function () { return '</b>'; };
*
* var result = md.renderInline(...);
* ```
*
* Each rule is called as independent static function with fixed signature:
*
* ```javascript
* function my_token_render(tokens, idx, options, env, renderer) {
* // ...
* return renderedHTML;
* }
* ```
*
* See [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js)
* for more details and examples.
**/
this.rules = assign$1({}, default_rules);
}
/**
* Renderer.renderAttrs(token) -> String
*
* Render token attributes to string.
**/ Renderer.prototype.renderAttrs = function renderAttrs(token) {
let i, l, result;
if (!token.attrs) {
return "";
}
result = "";
for (i = 0, l = token.attrs.length; i < l; i++) {
result += " " + escapeHtml(token.attrs[i][0]) + '="' + escapeHtml(token.attrs[i][1]) + '"';
}
return result;
};
/**
* Renderer.renderToken(tokens, idx, options) -> String
* - tokens (Array): list of tokens
* - idx (Numbed): token index to render
* - options (Object): params of parser instance
*
* Default token renderer. Can be overriden by custom function
* in [[Renderer#rules]].
**/ Renderer.prototype.renderToken = function renderToken(tokens, idx, options) {
const token = tokens[idx];
let result = "";
// Tight list paragraphs
if (token.hidden) {
return "";
}
// Insert a newline between hidden paragraph and subsequent opening
// block-level tag.
// For example, here we should insert a newline before blockquote:
// - a
// >
if (token.block && token.nesting !== -1 && idx && tokens[idx - 1].hidden) {
result += "\n";
}
// Add token name, e.g. `<img`
result += (token.nesting === -1 ? "</" : "<") + token.tag;
// Encode attributes, e.g. `<img src="foo"`
result += this.renderAttrs(token);
// Add a slash for self-closing tags, e.g. `<img src="foo" /`
if (token.nesting === 0 && options.xhtmlOut) {
result += " /";
}
// Check if we need to add a newline after this tag
let needLf = false;
if (token.block) {
needLf = true;
if (token.nesting === 1) {
if (idx + 1 < tokens.length) {
const nextToken = tokens[idx + 1];
if (nextToken.type === "inline" || nextToken.hidden) {
// Block-level tag containing an inline tag.
needLf = false;
} else if (nextToken.nesting === -1 && nextToken.tag === token.tag) {
// Opening tag + closing tag of the same type. E.g. `<li></li>`.
needLf = false;
}
}
}
}
result += needLf ? ">\n" : ">";
return result;
};
/**
* Renderer.renderInline(tokens, options, env) -> String
* - tokens (Array): list on block tokens to render
* - options (Object): params of parser instance
* - env (Object): additional data from parsed input (references, for example)
*
* The same as [[Renderer.render]], but for single token of `inline` type.
**/ Renderer.prototype.renderInline = function(tokens, options, env) {
let result = "";
const rules = this.rules;
for (let i = 0, len = tokens.length; i < len; i++) {
const type = tokens[i].type;
if (typeof rules[type] !== "undefined") {
result += rules[type](tokens, i, options, env, this);
} else {
result += this.renderToken(tokens, i, options);
}
}
return result;
};
/** internal
* Renderer.renderInlineAsText(tokens, options, env) -> String
* - tokens (Array): list on block tokens to render
* - options (Object): params of parser instance
* - env (Object): additional data from parsed input (references, for example)
*
* Special kludge for image `alt` attributes to conform CommonMark spec.
* Don't try to use it! Spec requires to show `alt` content with stripped markup,
* instead of simple escaping.
**/ Renderer.prototype.renderInlineAsText = function(tokens, options, env) {
let result = "";
for (let i = 0, len = tokens.length; i < len; i++) {
switch (tokens[i].type) {
case "text":
result += tokens[i].content;
break;
case "image":
result += this.renderInlineAsText(tokens[i].children, options, env);
break;
case "html_inline":
case "html_block":
result += tokens[i].content;
break;
case "softbreak":
case "hardbreak":
result += "\n";
break;
// all other tokens are skipped
}
}
return result;
};
/**
* Renderer.render(tokens, options, env) -> String
* - tokens (Array): list on block tokens to render
* - options (Object): params of parser instance
* - env (Object): additional data from parsed input (references, for example)
*
* Takes token stream and generates HTML. Probably, you will never need to call
* this method directly.
**/ Renderer.prototype.render = function(tokens, options, env) {
let result = "";
const rules = this.rules;
for (let i = 0, len = tokens.length; i < len; i++) {
const type = tokens[i].type;
if (type === "inline") {
result += this.renderInline(tokens[i].children, options, env);
} else if (typeof rules[type] !== "undefined") {
result += rules[type](tokens, i, options, env, this);
} else {
result += this.renderToken(tokens, i, options, env);
}
}
return result;
};
/**
* class Ruler
*
* Helper class, used by [[MarkdownIt#core]], [[MarkdownIt#block]] and
* [[MarkdownIt#inline]] to manage sequences of functions (rules):
*
* - keep rules in defined order
* - assign the name to each rule
* - enable/disable rules
* - add/replace rules
* - allow assign rules to additional named chains (in the same)
* - cacheing lists of active rules
*
* You will not need use this class directly until write plugins. For simple
* rules control use [[MarkdownIt.disable]], [[MarkdownIt.enable]] and
* [[MarkdownIt.use]].
**/
/**
* new Ruler()
**/ function Ruler() {
// List of added rules. Each element is:
// {
// name: XXX,
// enabled: Boolean,
// fn: Function(),
// alt: [ name2, name3 ]
// }
this.__rules__ = [];
// Cached rule chains.
// First level - chain name, '' for default.
// Second level - diginal anchor for fast filtering by charcodes.
this.__cache__ = null;
}
// Helper methods, should not be used directly
// Find rule index by name
Ruler.prototype.__find__ = function(name) {
for (let i = 0; i < this.__rules__.length; i++) {
if (this.__rules__[i].name === name) {
return i;
}
}
return -1;
};
// Build rules lookup cache
Ruler.prototype.__compile__ = function() {
const self = this;
const chains = [ "" ];
// collect unique names
self.__rules__.forEach((function(rule) {
if (!rule.enabled) {
return;
}
rule.alt.forEach((function(altName) {
if (chains.indexOf(altName) < 0) {
chains.push(altName);
}
}));
}));
self.__cache__ = {};
chains.forEach((function(chain) {
self.__cache__[chain] = [];
self.__rules__.forEach((function(rule) {
if (!rule.enabled) {
return;
}
if (chain && rule.alt.indexOf(chain) < 0) {
return;
}
self.__cache__[chain].push(rule.fn);
}));
}));
};
/**
* Ruler.at(name, fn [, options])
* - name (String): rule name to replace.
* - fn (Function): new rule function.
* - options (Object): new rule options (not mandatory).
*
* Replace rule by name with new function & options. Throws error if name not
* found.
*
* ##### Options:
*
* - __alt__ - array with names of "alternate" chains.
*
* ##### Example
*
* Replace existing typographer replacement rule with new one:
*
* ```javascript
* var md = require('markdown-it')();
*
* md.core.ruler.at('replacements', function replace(state) {
* //...
* });
* ```
**/ Ruler.prototype.at = function(name, fn, options) {
const index = this.__find__(name);
const opt = options || {};
if (index === -1) {
throw new Error("Parser rule not found: " + name);
}
this.__rules__[index].fn = fn;
this.__rules__[index].alt = opt.alt || [];
this.__cache__ = null;
};
/**
* Ruler.before(beforeName, ruleName, fn [, options])
* - beforeName (String): new rule will be added before this one.
* - ruleName (String): name of added rule.
* - fn (Function): rule function.
* - options (Object): rule options (not mandatory).
*
* Add new rule to chain before one with given name. See also
* [[Ruler.after]], [[Ruler.push]].
*
* ##### Options:
*
* - __alt__ - array with names of "alternate" chains.
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')();
*
* md.block.ruler.before('paragraph', 'my_rule', function replace(state) {
* //...
* });
* ```
**/ Ruler.prototype.before = function(beforeName, ruleName, fn, options) {
const index = this.__find__(beforeName);
const opt = options || {};
if (index === -1) {
throw new Error("Parser rule not found: " + beforeName);
}
this.__rules__.splice(index, 0, {
name: ruleName,
enabled: true,
fn: fn,
alt: opt.alt || []
});
this.__cache__ = null;
};
/**
* Ruler.after(afterName, ruleName, fn [, options])
* - afterName (String): new rule will be added after this one.
* - ruleName (String): name of added rule.
* - fn (Function): rule function.
* - options (Object): rule options (not mandatory).
*
* Add new rule to chain after one with given name. See also
* [[Ruler.before]], [[Ruler.push]].
*
* ##### Options:
*
* - __alt__ - array with names of "alternate" chains.
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')();
*
* md.inline.ruler.after('text', 'my_rule', function replace(state) {
* //...
* });
* ```
**/ Ruler.prototype.after = function(afterName, ruleName, fn, options) {
const index = this.__find__(afterName);
const opt = options || {};
if (index === -1) {
throw new Error("Parser rule not found: " + afterName);
}
this.__rules__.splice(index + 1, 0, {
name: ruleName,
enabled: true,
fn: fn,
alt: opt.alt || []
});
this.__cache__ = null;
};
/**
* Ruler.push(ruleName, fn [, options])
* - ruleName (String): name of added rule.
* - fn (Function): rule function.
* - options (Object): rule options (not mandatory).
*
* Push new rule to the end of chain. See also
* [[Ruler.before]], [[Ruler.after]].
*
* ##### Options:
*
* - __alt__ - array with names of "alternate" chains.
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')();
*
* md.core.ruler.push('my_rule', function replace(state) {
* //...
* });
* ```
**/ Ruler.prototype.push = function(ruleName, fn, options) {
const opt = options || {};
this.__rules__.push({
name: ruleName,
enabled: true,
fn: fn,
alt: opt.alt || []
});
this.__cache__ = null;
};
/**
* Ruler.enable(list [, ignoreInvalid]) -> Array
* - list (String|Array): list of rule names to enable.
* - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
*
* Enable rules with given names. If any rule name not found - throw Error.
* Errors can be disabled by second param.
*
* Returns list of found rule names (if no exception happened).
*
* See also [[Ruler.disable]], [[Ruler.enableOnly]].
**/ Ruler.prototype.enable = function(list, ignoreInvalid) {
if (!Array.isArray(list)) {
list = [ list ];
}
const result = [];
// Search by name and enable
list.forEach((function(name) {
const idx = this.__find__(name);
if (idx < 0) {
if (ignoreInvalid) {
return;
}
throw new Error("Rules manager: invalid rule name " + name);
}
this.__rules__[idx].enabled = true;
result.push(name);
}), this);
this.__cache__ = null;
return result;
};
/**
* Ruler.enableOnly(list [, ignoreInvalid])
* - list (String|Array): list of rule names to enable (whitelist).
* - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
*
* Enable rules with given names, and disable everything else. If any rule name
* not found - throw Error. Errors can be disabled by second param.
*
* See also [[Ruler.disable]], [[Ruler.enable]].
**/ Ruler.prototype.enableOnly = function(list, ignoreInvalid) {
if (!Array.isArray(list)) {
list = [ list ];
}
this.__rules__.forEach((function(rule) {
rule.enabled = false;
}));
this.enable(list, ignoreInvalid);
};
/**
* Ruler.disable(list [, ignoreInvalid]) -> Array
* - list (String|Array): list of rule names to disable.
* - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
*
* Disable rules with given names. If any rule name not found - throw Error.
* Errors can be disabled by second param.
*
* Returns list of found rule names (if no exception happened).
*
* See also [[Ruler.enable]], [[Ruler.enableOnly]].
**/ Ruler.prototype.disable = function(list, ignoreInvalid) {
if (!Array.isArray(list)) {
list = [ list ];
}
const result = [];
// Search by name and disable
list.forEach((function(name) {
const idx = this.__find__(name);
if (idx < 0) {
if (ignoreInvalid) {
return;
}
throw new Error("Rules manager: invalid rule name " + name);
}
this.__rules__[idx].enabled = false;
result.push(name);
}), this);
this.__cache__ = null;
return result;
};
/**
* Ruler.getRules(chainName) -> Array
*
* Return array of active functions (rules) for given chain name. It analyzes
* rules configuration, compiles caches if not exists and returns result.
*
* Default chain name is `''` (empty string). It can't be skipped. That's
* done intentionally, to keep signature monomorphic for high speed.
**/ Ruler.prototype.getRules = function(chainName) {
if (this.__cache__ === null) {
this.__compile__();
}
// Chain can be empty, if rules disabled. But we still have to return Array.
return this.__cache__[chainName] || [];
};
// Token class
/**
* class Token
**/
/**
* new Token(type, tag, nesting)
*
* Create new token and fill passed properties.
**/ function Token(type, tag, nesting) {
/**
* Token#type -> String
*
* Type of the token (string, e.g. "paragraph_open")
**/
this.type = type;
/**
* Token#tag -> String
*
* html tag name, e.g. "p"
**/ this.tag = tag;
/**
* Token#attrs -> Array
*
* Html attributes. Format: `[ [ name1, value1 ], [ name2, value2 ] ]`
**/ this.attrs = null;
/**
* Token#map -> Array
*
* Source map info. Format: `[ line_begin, line_end ]`
**/ this.map = null;
/**
* Token#nesting -> Number
*
* Level change (number in {-1, 0, 1} set), where:
*
* - `1` means the tag is opening
* - `0` means the tag is self-closing
* - `-1` means the tag is closing
**/ this.nesting = nesting;
/**
* Token#level -> Number
*
* nesting level, the same as `state.level`
**/ this.level = 0;
/**
* Token#children -> Array
*
* An array of child nodes (inline and img tokens)
**/ this.children = null;
/**
* Token#content -> String
*
* In a case of self-closing tag (code, html, fence, etc.),
* it has contents of this tag.
**/ this.content = "";
/**
* Token#markup -> String
*
* '*' or '_' for emphasis, fence string for fence, etc.
**/ this.markup = "";
/**
* Token#info -> String
*
* Additional information:
*
* - Info string for "fence" tokens
* - The value "auto" for autolink "link_open" and "link_close" tokens
* - The string value of the item marker for ordered-list "list_item_open" tokens
**/ this.info = "";
/**
* Token#meta -> Object
*
* A place for plugins to store an arbitrary data
**/ this.meta = null;
/**
* Token#block -> Boolean
*
* True for block-level tokens, false for inline tokens.
* Used in renderer to calculate line breaks
**/ this.block = false;
/**
* Token#hidden -> Boolean
*
* If it's true, ignore this element when rendering. Used for tight lists
* to hide paragraphs.
**/ this.hidden = false;
}
/**
* Token.attrIndex(name) -> Number
*
* Search attribute index by name.
**/ Token.prototype.attrIndex = function attrIndex(name) {
if (!this.attrs) {
return -1;
}
const attrs = this.attrs;
for (let i = 0, len = attrs.length; i < len; i++) {
if (attrs[i][0] === name) {
return i;
}
}
return -1;
};
/**
* Token.attrPush(attrData)
*
* Add `[ name, value ]` attribute to list. Init attrs if necessary
**/ Token.prototype.attrPush = function attrPush(attrData) {
if (this.attrs) {
this.attrs.push(attrData);
} else {
this.attrs = [ attrData ];
}
};
/**
* Token.attrSet(name, value)
*
* Set `name` attribute to `value`. Override old value if exists.
**/ Token.prototype.attrSet = function attrSet(name, value) {
const idx = this.attrIndex(name);
const attrData = [ name, value ];
if (idx < 0) {
this.attrPush(attrData);
} else {
this.attrs[idx] = attrData;
}
};
/**
* Token.attrGet(name)
*
* Get the value of attribute `name`, or null if it does not exist.
**/ Token.prototype.attrGet = function attrGet(name) {
const idx = this.attrIndex(name);
let value = null;
if (idx >= 0) {
value = this.attrs[idx][1];
}
return value;
};
/**
* Token.attrJoin(name, value)
*
* Join value to existing attribute via space. Or create new attribute if not
* exists. Useful to operate with token classes.
**/ Token.prototype.attrJoin = function attrJoin(name, value) {
const idx = this.attrIndex(name);
if (idx < 0) {
this.attrPush([ name, value ]);
} else {
this.attrs[idx][1] = this.attrs[idx][1] + " " + value;
}
};
// Core state object
function StateCore(src, md, env) {
this.src = src;
this.env = env;
this.tokens = [];
this.inlineMode = false;
this.md = md;
// link to parser instance
}
// re-export Token class to use in core rules
StateCore.prototype.Token = Token;
// Normalize input string
// https://spec.commonmark.org/0.29/#line-ending
const NEWLINES_RE = /\r\n?|\n/g;
const NULL_RE = /\0/g;
function normalize(state) {
let str;
// Normalize newlines
str = state.src.replace(NEWLINES_RE, "\n");
// Replace NULL characters
str = str.replace(NULL_RE, "\ufffd");
state.src = str;
}
function block(state) {
let token;
if (state.inlineMode) {
token = new state.Token("inline", "", 0);
token.content = state.src;
token.map = [ 0, 1 ];
token.children = [];
state.tokens.push(token);
} else {
state.md.block.parse(state.src, state.md, state.env, state.tokens);
}
}
function inline(state) {
const tokens = state.tokens;
// Parse inlines
for (let i = 0, l = tokens.length; i < l; i++) {
const tok = tokens[i];
if (tok.type === "inline") {
state.md.inline.parse(tok.content, state.md, state.env, tok.children);
}
}
}
// Replace link-like texts with link nodes.
// Currently restricted by `md.validateLink()` to http/https/ftp
function isLinkOpen$1(str) {
return /^<a[>\s]/i.test(str);
}
function isLinkClose$1(str) {
return /^<\/a\s*>/i.test(str);
}
function linkify$1(state) {
const blockTokens = state.tokens;
if (!state.md.options.linkify) {
return;
}
for (let j = 0, l = blockTokens.length; j < l; j++) {
if (blockTokens[j].type !== "inline" || !state.md.linkify.pretest(blockTokens[j].content)) {
continue;
}
let tokens = blockTokens[j].children;
let htmlLinkLevel = 0;
// We scan from the end, to keep position when new tags added.
// Use reversed logic in links start/end match
for (let i = tokens.length - 1; i >= 0; i--) {
const currentToken = tokens[i];
// Skip content of markdown links
if (currentToken.type === "link_close") {
i--;
while (tokens[i].level !== currentToken.level && tokens[i].type !== "link_open") {
i--;
}
continue;
}
// Skip content of html tag links
if (currentToken.type === "html_inline") {
if (isLinkOpen$1(currentToken.content) && htmlLinkLevel > 0) {
htmlLinkLevel--;
}
if (isLinkClose$1(currentToken.content)) {
htmlLinkLevel++;
}
}
if (htmlLinkLevel > 0) {
continue;
}
if (currentToken.type === "text" && state.md.linkify.test(currentToken.content)) {
const text = currentToken.content;
let links = state.md.linkify.match(text);
// Now split string to nodes
const nodes = [];
let level = currentToken.level;
let lastPos = 0;
// forbid escape sequence at the start of the string,
// this avoids http\://example.com/ from being linkified as
// http:<a href="//example.com/">//example.com/</a>
if (links.length > 0 && links[0].index === 0 && i > 0 && tokens[i - 1].type === "text_special") {
links = links.slice(1);
}
for (let ln = 0; ln < links.length; ln++) {
const url = links[ln].url;
const fullUrl = state.md.normalizeLink(url);
if (!state.md.validateLink(fullUrl)) {
continue;
}
let urlText = links[ln].text;
// Linkifier might send raw hostnames like "example.com", where url
// starts with domain name. So we prepend http:// in those cases,
// and remove it afterwards.
if (!links[ln].schema) {
urlText = state.md.normalizeLinkText("http://" + urlText).replace(/^http:\/\//, "");
} else if (links[ln].schema === "mailto:" && !/^mailto:/i.test(urlText)) {
urlText = state.md.normalizeLinkText("mailto:" + urlText).replace(/^mailto:/, "");
} else {
urlText = state.md.normalizeLinkText(urlText);
}
const pos = links[ln].index;
if (pos > lastPos) {
const token = new state.Token("text", "", 0);
token.content = text.slice(lastPos, pos);
token.level = level;
nodes.push(token);
}
const token_o = new state.Token("link_open", "a", 1);
token_o.attrs = [ [ "href", fullUrl ] ];
token_o.level = level++;
token_o.markup = "linkify";
token_o.info = "auto";
nodes.push(token_o);
const token_t = new state.Token("text", "", 0);
token_t.content = urlText;
token_t.level = level;
nodes.push(token_t);
const token_c = new state.Token("link_close", "a", -1);
token_c.level = --level;
token_c.markup = "linkify";
token_c.info = "auto";
nodes.push(token_c);
lastPos = links[ln].lastIndex;
}
if (lastPos < text.length) {
const token = new state.Token("text", "", 0);
token.content = text.slice(lastPos);
token.level = level;
nodes.push(token);
}
// replace current node
blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, nodes);
}
}
}
}
// Simple typographic replacements
// (c) (C) → ©
// (tm) (TM) → ™
// (r) (R) → ®
// +- → ±
// ... → … (also ?.... → ?.., !.... → !..)
// ???????? → ???, !!!!! → !!!, `,,` → `,`
// -- → &ndash;, --- → &mdash;
// TODO:
// - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾
// - multiplications 2 x 4 -> 2 × 4
const RARE_RE = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/;
// Workaround for phantomjs - need regex without /g flag,
// or root check will fail every second time
const SCOPED_ABBR_TEST_RE = /\((c|tm|r)\)/i;
const SCOPED_ABBR_RE = /\((c|tm|r)\)/gi;
const SCOPED_ABBR = {
c: "\xa9",
r: "\xae",
tm: "\u2122"
};
function replaceFn(match, name) {
return SCOPED_ABBR[name.toLowerCase()];
}
function replace_scoped(inlineTokens) {
let inside_autolink = 0;
for (let i = inlineTokens.length - 1; i >= 0; i--) {
const token = inlineTokens[i];
if (token.type === "text" && !inside_autolink) {
token.content = token.content.replace(SCOPED_ABBR_RE, replaceFn);
}
if (token.type === "link_open" && token.info === "auto") {
inside_autolink--;
}
if (token.type === "link_close" && token.info === "auto") {
inside_autolink++;
}
}
}
function replace_rare(inlineTokens) {
let inside_autolink = 0;
for (let i = inlineTokens.length - 1; i >= 0; i--) {
const token = inlineTokens[i];
if (token.type === "text" && !inside_autolink) {
if (RARE_RE.test(token.content)) {
token.content = token.content.replace(/\+-/g, "\xb1").replace(/\.{2,}/g, "\u2026").replace(/([?!])\u2026/g, "$1..").replace(/([?!]){4,}/g, "$1$1$1").replace(/,{2,}/g, ",").replace(/(^|[^-])---(?=[^-]|$)/gm, "$1\u2014").replace(/(^|\s)--(?=\s|$)/gm, "$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm, "$1\u2013");
}
}
if (token.type === "link_open" && token.info === "auto") {
inside_autolink--;
}
if (token.type === "link_close" && token.info === "auto") {
inside_autolink++;
}
}
}
function replace(state) {
let blkIdx;
if (!state.md.options.typographer) {
return;
}
for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {
if (state.tokens[blkIdx].type !== "inline") {
continue;
}
if (SCOPED_ABBR_TEST_RE.test(state.tokens[blkIdx].content)) {
replace_scoped(state.tokens[blkIdx].children);
}
if (RARE_RE.test(state.tokens[blkIdx].content)) {
replace_rare(state.tokens[blkIdx].children);
}
}
}
// Convert straight quotation marks to typographic ones
const QUOTE_TEST_RE = /['"]/;
const QUOTE_RE = /['"]/g;
const APOSTROPHE = "\u2019";
/* ’ */ function replaceAt(str, index, ch) {
return str.slice(0, index) + ch + str.slice(index + 1);
}
function process_inlines(tokens, state) {
let j;
const stack = [];
for (let i = 0; i < tokens.length; i++) {
const token = tokens[i];
const thisLevel = tokens[i].level;
for (j = stack.length - 1; j >= 0; j--) {
if (stack[j].level <= thisLevel) {
break;
}
}
stack.length = j + 1;
if (token.type !== "text") {
continue;
}
let text = token.content;
let pos = 0;
let max = text.length;
/* eslint no-labels:0,block-scoped-var:0 */ OUTER: while (pos < max) {
QUOTE_RE.lastIndex = pos;
const t = QUOTE_RE.exec(text);
if (!t) {
break;
}
let canOpen = true;
let canClose = true;
pos = t.index + 1;
const isSingle = t[0] === "'";
// Find previous character,
// default to space if it's the beginning of the line
let lastChar = 32;
if (t.index - 1 >= 0) {
lastChar = text.charCodeAt(t.index - 1);
} else {
for (j = i - 1; j >= 0; j--) {
if (tokens[j].type === "softbreak" || tokens[j].type === "hardbreak") break;
// lastChar defaults to 0x20
if (!tokens[j].content) continue;
// should skip all tokens except 'text', 'html_inline' or 'code_inline'
lastChar = tokens[j].content.charCodeAt(tokens[j].content.length - 1);
break;
}
}
// Find next character,
// default to space if it's the end of the line
let nextChar = 32;
if (pos < max) {
nextChar = text.charCodeAt(pos);
} else {
for (j = i + 1; j < tokens.length; j++) {
if (tokens[j].type === "softbreak" || tokens[j].type === "hardbreak") break;
// nextChar defaults to 0x20
if (!tokens[j].content) continue;
// should skip all tokens except 'text', 'html_inline' or 'code_inline'
nextChar = tokens[j].content.charCodeAt(0);
break;
}
}
const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));
const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));
const isLastWhiteSpace = isWhiteSpace(lastChar);
const isNextWhiteSpace = isWhiteSpace(nextChar);
if (isNextWhiteSpace) {
canOpen = false;
} else if (isNextPunctChar) {
if (!(isLastWhiteSpace || isLastPunctChar)) {
canOpen = false;
}
}
if (isLastWhiteSpace) {
canClose = false;
} else if (isLastPunctChar) {
if (!(isNextWhiteSpace || isNextPunctChar)) {
canClose = false;
}
}
if (nextChar === 34 /* " */ && t[0] === '"') {
if (lastChar >= 48 /* 0 */ && lastChar <= 57 /* 9 */) {
// special case: 1"" - count first quote as an inch
canClose = canOpen = false;
}
}
if (canOpen && canClose) {
// Replace quotes in the middle of punctuation sequence, but not
// in the middle of the words, i.e.:
// 1. foo " bar " baz - not replaced
// 2. foo-"-bar-"-baz - replaced
// 3. foo"bar"baz - not replaced
canOpen = isLastPunctChar;
canClose = isNextPunctChar;
}
if (!canOpen && !canClose) {
// middle of word
if (isSingle) {
token.content = replaceAt(token.content, t.index, APOSTROPHE);
}
continue;
}
if (canClose) {
// this could be a closing quote, rewind the stack to get a match
for (j = stack.length - 1; j >= 0; j--) {
let item = stack[j];
if (stack[j].level < thisLevel) {
break;
}
if (item.single === isSingle && stack[j].level === thisLevel) {
item = stack[j];
let openQuote;
let closeQuote;
if (isSingle) {
openQuote = state.md.options.quotes[2];
closeQuote = state.md.options.quotes[3];
} else {
openQuote = state.md.options.quotes[0];
closeQuote = state.md.options.quotes[1];
}
// replace token.content *before* tokens[item.token].content,
// because, if they are pointing at the same token, replaceAt
// could mess up indices when quote length != 1
token.content = replaceAt(token.content, t.index, closeQuote);
tokens[item.token].content = replaceAt(tokens[item.token].content, item.pos, openQuote);
pos += closeQuote.length - 1;
if (item.token === i) {
pos += openQuote.length - 1;
}
text = token.content;
max = text.length;
stack.length = j;
continue OUTER;
}
}
}
if (canOpen) {
stack.push({
token: i,
pos: t.index,
single: isSingle,
level: thisLevel
});
} else if (canClose && isSingle) {
token.content = replaceAt(token.content, t.index, APOSTROPHE);
}
}
}
}
function smartquotes(state) {
/* eslint max-depth:0 */
if (!state.md.options.typographer) {
return;
}
for (let blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {
if (state.tokens[blkIdx].type !== "inline" || !QUOTE_TEST_RE.test(state.tokens[blkIdx].content)) {
continue;
}
process_inlines(state.tokens[blkIdx].children, state);
}
}
// Join raw text tokens with the rest of the text
// This is set as a separate rule to provide an opportunity for plugins
// to run text replacements after text join, but before escape join.
// For example, `\:)` shouldn't be replaced with an emoji.
function text_join(state) {
let curr, last;
const blockTokens = state.tokens;
const l = blockTokens.length;
for (let j = 0; j < l; j++) {
if (blockTokens[j].type !== "inline") continue;
const tokens = blockTokens[j].children;
const max = tokens.length;
for (curr = 0; curr < max; curr++) {
if (tokens[curr].type === "text_special") {
tokens[curr].type = "text";
}
}
for (curr = last = 0; curr < max; curr++) {
if (tokens[curr].type === "text" && curr + 1 < max && tokens[curr + 1].type === "text") {
// collapse two adjacent text nodes
tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;
} else {
if (curr !== last) {
tokens[last] = tokens[curr];
}
last++;
}
}
if (curr !== last) {
tokens.length = last;
}
}
}
/** internal
* class Core
*
* Top-level rules executor. Glues block/inline parsers and does intermediate
* transformations.
**/ const _rules$2 = [ [ "normalize", normalize ], [ "block", block ], [ "inline", inline ], [ "linkify", linkify$1 ], [ "replacements", replace ], [ "smartquotes", smartquotes ],
// `text_join` finds `text_special` tokens (for escape sequences)
// and joins them with the rest of the text
[ "text_join", text_join ] ];
/**
* new Core()
**/ function Core() {
/**
* Core#ruler -> Ruler
*
* [[Ruler]] instance. Keep configuration of core rules.
**/
this.ruler = new Ruler;
for (let i = 0; i < _rules$2.length; i++) {
this.ruler.push(_rules$2[i][0], _rules$2[i][1]);
}
}
/**
* Core.process(state)
*
* Executes core chain rules.
**/ Core.prototype.process = function(state) {
const rules = this.ruler.getRules("");
for (let i = 0, l = rules.length; i < l; i++) {
rules[i](state);
}
};
Core.prototype.State = StateCore;
// Parser state class
function StateBlock(src, md, env, tokens) {
this.src = src;
// link to parser instance
this.md = md;
this.env = env;
// Internal state vartiables
this.tokens = tokens;
this.bMarks = [];
// line begin offsets for fast jumps
this.eMarks = [];
// line end offsets for fast jumps
this.tShift = [];
// offsets of the first non-space characters (tabs not expanded)
this.sCount = [];
// indents for each line (tabs expanded)
// An amount of virtual spaces (tabs expanded) between beginning
// of each line (bMarks) and real beginning of that line.
// It exists only as a hack because blockquotes override bMarks
// losing information in the process.
// It's used only when expanding tabs, you can think about it as
// an initial tab length, e.g. bsCount=21 applied to string `\t123`
// means first tab should be expanded to 4-21%4 === 3 spaces.
this.bsCount = [];
// block parser variables
// required block content indent (for example, if we are
// inside a list, it would be positioned after list marker)
this.blkIndent = 0;
this.line = 0;
// line index in src
this.lineMax = 0;
// lines count
this.tight = false;
// loose/tight mode for lists
this.ddIndent = -1;
// indent of the current dd block (-1 if there isn't any)
this.listIndent = -1;
// indent of the current list block (-1 if there isn't any)
// can be 'blockquote', 'list', 'root', 'paragraph' or 'reference'
// used in lists to determine if they interrupt a paragraph
this.parentType = "root";
this.level = 0;
// Create caches
// Generate markers.
const s = this.src;
for (let start = 0, pos = 0, indent = 0, offset = 0, len = s.length, indent_found = false; pos < len; pos++) {
const ch = s.charCodeAt(pos);
if (!indent_found) {
if (isSpace(ch)) {
indent++;
if (ch === 9) {
offset += 4 - offset % 4;
} else {
offset++;
}
continue;
} else {
indent_found = true;
}
}
if (ch === 10 || pos === len - 1) {
if (ch !== 10) {
pos++;
}
this.bMarks.push(start);
this.eMarks.push(pos);
this.tShift.push(indent);
this.sCount.push(offset);
this.bsCount.push(0);
indent_found = false;
indent = 0;
offset = 0;
start = pos + 1;
}
}
// Push fake entry to simplify cache bounds checks
this.bMarks.push(s.length);
this.eMarks.push(s.length);
this.tShift.push(0);
this.sCount.push(0);
this.bsCount.push(0);
this.lineMax = this.bMarks.length - 1;
// don't count last fake line
}
// Push new token to "stream".
StateBlock.prototype.push = function(type, tag, nesting) {
const token = new Token(type, tag, nesting);
token.block = true;
if (nesting < 0) this.level--;
// closing tag
token.level = this.level;
if (nesting > 0) this.level++;
// opening tag
this.tokens.push(token);
return token;
};
StateBlock.prototype.isEmpty = function isEmpty(line) {
return this.bMarks[line] + this.tShift[line] >= this.eMarks[line];
};
StateBlock.prototype.skipEmptyLines = function skipEmptyLines(from) {
for (let max = this.lineMax; from < max; from++) {
if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) {
break;
}
}
return from;
};
// Skip spaces from given position.
StateBlock.prototype.skipSpaces = function skipSpaces(pos) {
for (let max = this.src.length; pos < max; pos++) {
const ch = this.src.charCodeAt(pos);
if (!isSpace(ch)) {
break;
}
}
return pos;
};
// Skip spaces from given position in reverse.
StateBlock.prototype.skipSpacesBack = function skipSpacesBack(pos, min) {
if (pos <= min) {
return pos;
}
while (pos > min) {
if (!isSpace(this.src.charCodeAt(--pos))) {
return pos + 1;
}
}
return pos;
};
// Skip char codes from given position
StateBlock.prototype.skipChars = function skipChars(pos, code) {
for (let max = this.src.length; pos < max; pos++) {
if (this.src.charCodeAt(pos) !== code) {
break;
}
}
return pos;
};
// Skip char codes reverse from given position - 1
StateBlock.prototype.skipCharsBack = function skipCharsBack(pos, code, min) {
if (pos <= min) {
return pos;
}
while (pos > min) {
if (code !== this.src.charCodeAt(--pos)) {
return pos + 1;
}
}
return pos;
};
// cut lines range from source.
StateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF) {
if (begin >= end) {
return "";
}
const queue = new Array(end - begin);
for (let i = 0, line = begin; line < end; line++, i++) {
let lineIndent = 0;
const lineStart = this.bMarks[line];
let first = lineStart;
let last;
if (line + 1 < end || keepLastLF) {
// No need for bounds check because we have fake entry on tail.
last = this.eMarks[line] + 1;
} else {
last = this.eMarks[line];
}
while (first < last && lineIndent < indent) {
const ch = this.src.charCodeAt(first);
if (isSpace(ch)) {
if (ch === 9) {
lineIndent += 4 - (lineIndent + this.bsCount[line]) % 4;
} else {
lineIndent++;
}
} else if (first - lineStart < this.tShift[line]) {
// patched tShift masked characters to look like spaces (blockquotes, list markers)
lineIndent++;
} else {
break;
}
first++;
}
if (lineIndent > indent) {
// partially expanding tabs in code blocks, e.g '\t\tfoobar'
// with indent=2 becomes ' \tfoobar'
queue[i] = new Array(lineIndent - indent + 1).join(" ") + this.src.slice(first, last);
} else {
queue[i] = this.src.slice(first, last);
}
}
return queue.join("");
};
// re-export Token class to use in block rules
StateBlock.prototype.Token = Token;
// GFM table, https://github.github.com/gfm/#tables-extension-
function getLine(state, line) {
const pos = state.bMarks[line] + state.tShift[line];
const max = state.eMarks[line];
return state.src.slice(pos, max);
}
function escapedSplit(str) {
const result = [];
const max = str.length;
let pos = 0;
let ch = str.charCodeAt(pos);
let isEscaped = false;
let lastPos = 0;
let current = "";
while (pos < max) {
if (ch === 124 /* | */) {
if (!isEscaped) {
// pipe separating cells, '|'
result.push(current + str.substring(lastPos, pos));
current = "";
lastPos = pos + 1;
} else {
// escaped pipe, '\|'
current += str.substring(lastPos, pos - 1);
lastPos = pos;
}
}
isEscaped = ch === 92 /* \ */;
pos++;
ch = str.charCodeAt(pos);
}
result.push(current + str.substring(lastPos));
return result;
}
function table(state, startLine, endLine, silent) {
// should have at least two lines
if (startLine + 2 > endLine) {
return false;
}
let nextLine = startLine + 1;
if (state.sCount[nextLine] < state.blkIndent) {
return false;
}
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[nextLine] - state.blkIndent >= 4) {
return false;
}
// first character of the second line should be '|', '-', ':',
// and no other characters are allowed but spaces;
// basically, this is the equivalent of /^[-:|][-:|\s]*$/ regexp
let pos = state.bMarks[nextLine] + state.tShift[nextLine];
if (pos >= state.eMarks[nextLine]) {
return false;
}
const firstCh = state.src.charCodeAt(pos++);
if (firstCh !== 124 /* | */ && firstCh !== 45 /* - */ && firstCh !== 58 /* : */) {
return false;
}
if (pos >= state.eMarks[nextLine]) {
return false;
}
const secondCh = state.src.charCodeAt(pos++);
if (secondCh !== 124 /* | */ && secondCh !== 45 /* - */ && secondCh !== 58 /* : */ && !isSpace(secondCh)) {
return false;
}
// if first character is '-', then second character must not be a space
// (due to parsing ambiguity with list)
if (firstCh === 45 /* - */ && isSpace(secondCh)) {
return false;
}
while (pos < state.eMarks[nextLine]) {
const ch = state.src.charCodeAt(pos);
if (ch !== 124 /* | */ && ch !== 45 /* - */ && ch !== 58 /* : */ && !isSpace(ch)) {
return false;
}
pos++;
}
let lineText = getLine(state, startLine + 1);
let columns = lineText.split("|");
const aligns = [];
for (let i = 0; i < columns.length; i++) {
const t = columns[i].trim();
if (!t) {
// allow empty columns before and after table, but not in between columns;
// e.g. allow ` |---| `, disallow ` ---||--- `
if (i === 0 || i === columns.length - 1) {
continue;
} else {
return false;
}
}
if (!/^:?-+:?$/.test(t)) {
return false;
}
if (t.charCodeAt(t.length - 1) === 58 /* : */) {
aligns.push(t.charCodeAt(0) === 58 /* : */ ? "center" : "right");
} else if (t.charCodeAt(0) === 58 /* : */) {
aligns.push("left");
} else {
aligns.push("");
}
}
lineText = getLine(state, startLine).trim();
if (lineText.indexOf("|") === -1) {
return false;
}
if (state.sCount[startLine] - state.blkIndent >= 4) {
return false;
}
columns = escapedSplit(lineText);
if (columns.length && columns[0] === "") columns.shift();
if (columns.length && columns[columns.length - 1] === "") columns.pop();
// header row will define an amount of columns in the entire table,
// and align row should be exactly the same (the rest of the rows can differ)
const columnCount = columns.length;
if (columnCount === 0 || columnCount !== aligns.length) {
return false;
}
if (silent) {
return true;
}
const oldParentType = state.parentType;
state.parentType = "table";
// use 'blockquote' lists for termination because it's
// the most similar to tables
const terminatorRules = state.md.block.ruler.getRules("blockquote");
const token_to = state.push("table_open", "table", 1);
const tableLines = [ startLine, 0 ];
token_to.map = tableLines;
const token_tho = state.push("thead_open", "thead", 1);
token_tho.map = [ startLine, startLine + 1 ];
const token_htro = state.push("tr_open", "tr", 1);
token_htro.map = [ startLine, startLine + 1 ];
for (let i = 0; i < columns.length; i++) {
const token_ho = state.push("th_open", "th", 1);
if (aligns[i]) {
token_ho.attrs = [ [ "style", "text-align:" + aligns[i] ] ];
}
const token_il = state.push("inline", "", 0);
token_il.content = columns[i].trim();
token_il.children = [];
state.push("th_close", "th", -1);
}
state.push("tr_close", "tr", -1);
state.push("thead_close", "thead", -1);
let tbodyLines;
for (nextLine = startLine + 2; nextLine < endLine; nextLine++) {
if (state.sCount[nextLine] < state.blkIndent) {
break;
}
let terminate = false;
for (let i = 0, l = terminatorRules.length; i < l; i++) {
if (terminatorRules[i](state, nextLine, endLine, true)) {
terminate = true;
break;
}
}
if (terminate) {
break;
}
lineText = getLine(state, nextLine).trim();
if (!lineText) {
break;
}
if (state.sCount[nextLine] - state.blkIndent >= 4) {
break;
}
columns = escapedSplit(lineText);
if (columns.length && columns[0] === "") columns.shift();
if (columns.length && columns[columns.length - 1] === "") columns.pop();
if (nextLine === startLine + 2) {
const token_tbo = state.push("tbody_open", "tbody", 1);
token_tbo.map = tbodyLines = [ startLine + 2, 0 ];
}
const token_tro = state.push("tr_open", "tr", 1);
token_tro.map = [ nextLine, nextLine + 1 ];
for (let i = 0; i < columnCount; i++) {
const token_tdo = state.push("td_open", "td", 1);
if (aligns[i]) {
token_tdo.attrs = [ [ "style", "text-align:" + aligns[i] ] ];
}
const token_il = state.push("inline", "", 0);
token_il.content = columns[i] ? columns[i].trim() : "";
token_il.children = [];
state.push("td_close", "td", -1);
}
state.push("tr_close", "tr", -1);
}
if (tbodyLines) {
state.push("tbody_close", "tbody", -1);
tbodyLines[1] = nextLine;
}
state.push("table_close", "table", -1);
tableLines[1] = nextLine;
state.parentType = oldParentType;
state.line = nextLine;
return true;
}
// Code block (4 spaces padded)
function code(state, startLine, endLine /*, silent */) {
if (state.sCount[startLine] - state.blkIndent < 4) {
return false;
}
let nextLine = startLine + 1;
let last = nextLine;
while (nextLine < endLine) {
if (state.isEmpty(nextLine)) {
nextLine++;
continue;
}
if (state.sCount[nextLine] - state.blkIndent >= 4) {
nextLine++;
last = nextLine;
continue;
}
break;
}
state.line = last;
const token = state.push("code_block", "code", 0);
token.content = state.getLines(startLine, last, 4 + state.blkIndent, false) + "\n";
token.map = [ startLine, state.line ];
return true;
}
// fences (``` lang, ~~~ lang)
function fence(state, startLine, endLine, silent) {
let pos = state.bMarks[startLine] + state.tShift[startLine];
let max = state.eMarks[startLine];
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) {
return false;
}
if (pos + 3 > max) {
return false;
}
const marker = state.src.charCodeAt(pos);
if (marker !== 126 /* ~ */ && marker !== 96 /* ` */) {
return false;
}
// scan marker length
let mem = pos;
pos = state.skipChars(pos, marker);
let len = pos - mem;
if (len < 3) {
return false;
}
const markup = state.src.slice(mem, pos);
const params = state.src.slice(pos, max);
if (marker === 96 /* ` */) {
if (params.indexOf(String.fromCharCode(marker)) >= 0) {
return false;
}
}
// Since start is found, we can report success here in validation mode
if (silent) {
return true;
}
// search end of block
let nextLine = startLine;
let haveEndMarker = false;
for (;;) {
nextLine++;
if (nextLine >= endLine) {
// unclosed block should be autoclosed by end of document.
// also block seems to be autoclosed by end of parent
break;
}
pos = mem = state.bMarks[nextLine] + state.tShift[nextLine];
max = state.eMarks[nextLine];
if (pos < max && state.sCount[nextLine] < state.blkIndent) {
// non-empty line with negative indent should stop the list:
// - ```
// test
break;
}
if (state.src.charCodeAt(pos) !== marker) {
continue;
}
if (state.sCount[nextLine] - state.blkIndent >= 4) {
// closing fence should be indented less than 4 spaces
continue;
}
pos = state.skipChars(pos, marker);
// closing code fence must be at least as long as the opening one
if (pos - mem < len) {
continue;
}
// make sure tail has spaces only
pos = state.skipSpaces(pos);
if (pos < max) {
continue;
}
haveEndMarker = true;
// found!
break;
}
// If a fence has heading spaces, they should be removed from its inner block
len = state.sCount[startLine];
state.line = nextLine + (haveEndMarker ? 1 : 0);
const token = state.push("fence", "code", 0);
token.info = params;
token.content = state.getLines(startLine + 1, nextLine, len, true);
token.markup = markup;
token.map = [ startLine, state.line ];
return true;
}
// Block quotes
function blockquote(state, startLine, endLine, silent) {
let pos = state.bMarks[startLine] + state.tShift[startLine];
let max = state.eMarks[startLine];
const oldLineMax = state.lineMax;
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) {
return false;
}
// check the block quote marker
if (state.src.charCodeAt(pos) !== 62 /* > */) {
return false;
}
// we know that it's going to be a valid blockquote,
// so no point trying to find the end of it in silent mode
if (silent) {
return true;
}
const oldBMarks = [];
const oldBSCount = [];
const oldSCount = [];
const oldTShift = [];
const terminatorRules = state.md.block.ruler.getRules("blockquote");
const oldParentType = state.parentType;
state.parentType = "blockquote";
let lastLineEmpty = false;
let nextLine;
// Search the end of the block
// Block ends with either:
// 1. an empty line outside:
// ```
// > test
// ```
// 2. an empty line inside:
// ```
// >
// test
// ```
// 3. another tag:
// ```
// > test
// - - -
// ```
for (nextLine = startLine; nextLine < endLine; nextLine++) {
// check if it's outdented, i.e. it's inside list item and indented
// less than said list item:
// ```
// 1. anything
// > current blockquote
// 2. checking this line
// ```
const isOutdented = state.sCount[nextLine] < state.blkIndent;
pos = state.bMarks[nextLine] + state.tShift[nextLine];
max = state.eMarks[nextLine];
if (pos >= max) {
// Case 1: line is not inside the blockquote, and this line is empty.
break;
}
if (state.src.charCodeAt(pos++) === 62 /* > */ && !isOutdented) {
// This line is inside the blockquote.
// set offset past spaces and ">"
let initial = state.sCount[nextLine] + 1;
let spaceAfterMarker;
let adjustTab;
// skip one optional space after '>'
if (state.src.charCodeAt(pos) === 32 /* space */) {
// ' > test '
// ^ -- position start of line here:
pos++;
initial++;
adjustTab = false;
spaceAfterMarker = true;
} else if (state.src.charCodeAt(pos) === 9 /* tab */) {
spaceAfterMarker = true;
if ((state.bsCount[nextLine] + initial) % 4 === 3) {
// ' >\t test '
// ^ -- position start of line here (tab has width===1)
pos++;
initial++;
adjustTab = false;
} else {
// ' >\t test '
// ^ -- position start of line here + shift bsCount slightly
// to make extra space appear
adjustTab = true;
}
} else {
spaceAfterMarker = false;
}
let offset = initial;
oldBMarks.push(state.bMarks[nextLine]);
state.bMarks[nextLine] = pos;
while (pos < max) {
const ch = state.src.charCodeAt(pos);
if (isSpace(ch)) {
if (ch === 9) {
offset += 4 - (offset + state.bsCount[nextLine] + (adjustTab ? 1 : 0)) % 4;
} else {
offset++;
}
} else {
break;
}
pos++;
}
lastLineEmpty = pos >= max;
oldBSCount.push(state.bsCount[nextLine]);
state.bsCount[nextLine] = state.sCount[nextLine] + 1 + (spaceAfterMarker ? 1 : 0);
oldSCount.push(state.sCount[nextLine]);
state.sCount[nextLine] = offset - initial;
oldTShift.push(state.tShift[nextLine]);
state.tShift[nextLine] = pos - state.bMarks[nextLine];
continue;
}
// Case 2: line is not inside the blockquote, and the last line was empty.
if (lastLineEmpty) {
break;
}
// Case 3: another tag found.
let terminate = false;
for (let i = 0, l = terminatorRules.length; i < l; i++) {
if (terminatorRules[i](state, nextLine, endLine, true)) {
terminate = true;
break;
}
}
if (terminate) {
// Quirk to enforce "hard termination mode" for paragraphs;
// normally if you call `tokenize(state, startLine, nextLine)`,
// paragraphs will look below nextLine for paragraph continuation,
// but if blockquote is terminated by another tag, they shouldn't
state.lineMax = nextLine;
if (state.blkIndent !== 0) {
// state.blkIndent was non-zero, we now set it to zero,
// so we need to re-calculate all offsets to appear as
// if indent wasn't changed
oldBMarks.push(state.bMarks[nextLine]);
oldBSCount.push(state.bsCount[nextLine]);
oldTShift.push(state.tShift[nextLine]);
oldSCount.push(state.sCount[nextLine]);
state.sCount[nextLine] -= state.blkIndent;
}
break;
}
oldBMarks.push(state.bMarks[nextLine]);
oldBSCount.push(state.bsCount[nextLine]);
oldTShift.push(state.tShift[nextLine]);
oldSCount.push(state.sCount[nextLine]);
// A negative indentation means that this is a paragraph continuation
state.sCount[nextLine] = -1;
}
const oldIndent = state.blkIndent;
state.blkIndent = 0;
const token_o = state.push("blockquote_open", "blockquote", 1);
token_o.markup = ">";
const lines = [ startLine, 0 ];
token_o.map = lines;
state.md.block.tokenize(state, startLine, nextLine);
const token_c = state.push("blockquote_close", "blockquote", -1);
token_c.markup = ">";
state.lineMax = oldLineMax;
state.parentType = oldParentType;
lines[1] = state.line;
// Restore original tShift; this might not be necessary since the parser
// has already been here, but just to make sure we can do that.
for (let i = 0; i < oldTShift.length; i++) {
state.bMarks[i + startLine] = oldBMarks[i];
state.tShift[i + startLine] = oldTShift[i];
state.sCount[i + startLine] = oldSCount[i];
state.bsCount[i + startLine] = oldBSCount[i];
}
state.blkIndent = oldIndent;
return true;
}
// Horizontal rule
function hr(state, startLine, endLine, silent) {
const max = state.eMarks[startLine];
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) {
return false;
}
let pos = state.bMarks[startLine] + state.tShift[startLine];
const marker = state.src.charCodeAt(pos++);
// Check hr marker
if (marker !== 42 /* * */ && marker !== 45 /* - */ && marker !== 95 /* _ */) {
return false;
}
// markers can be mixed with spaces, but there should be at least 3 of them
let cnt = 1;
while (pos < max) {
const ch = state.src.charCodeAt(pos++);
if (ch !== marker && !isSpace(ch)) {
return false;
}
if (ch === marker) {
cnt++;
}
}
if (cnt < 3) {
return false;
}
if (silent) {
return true;
}
state.line = startLine + 1;
const token = state.push("hr", "hr", 0);
token.map = [ startLine, state.line ];
token.markup = Array(cnt + 1).join(String.fromCharCode(marker));
return true;
}
// Lists
// Search `[-+*][\n ]`, returns next pos after marker on success
// or -1 on fail.
function skipBulletListMarker(state, startLine) {
const max = state.eMarks[startLine];
let pos = state.bMarks[startLine] + state.tShift[startLine];
const marker = state.src.charCodeAt(pos++);
// Check bullet
if (marker !== 42 /* * */ && marker !== 45 /* - */ && marker !== 43 /* + */) {
return -1;
}
if (pos < max) {
const ch = state.src.charCodeAt(pos);
if (!isSpace(ch)) {
// " -test " - is not a list item
return -1;
}
}
return pos;
}
// Search `\d+[.)][\n ]`, returns next pos after marker on success
// or -1 on fail.
function skipOrderedListMarker(state, startLine) {
const start = state.bMarks[startLine] + state.tShift[startLine];
const max = state.eMarks[startLine];
let pos = start;
// List marker should have at least 2 chars (digit + dot)
if (pos + 1 >= max) {
return -1;
}
let ch = state.src.charCodeAt(pos++);
if (ch < 48 /* 0 */ || ch > 57 /* 9 */) {
return -1;
}
for (;;) {
// EOL -> fail
if (pos >= max) {
return -1;
}
ch = state.src.charCodeAt(pos++);
if (ch >= 48 /* 0 */ && ch <= 57 /* 9 */) {
// List marker should have no more than 9 digits
// (prevents integer overflow in browsers)
if (pos - start >= 10) {
return -1;
}
continue;
}
// found valid marker
if (ch === 41 /* ) */ || ch === 46 /* . */) {
break;
}
return -1;
}
if (pos < max) {
ch = state.src.charCodeAt(pos);
if (!isSpace(ch)) {
// " 1.test " - is not a list item
return -1;
}
}
return pos;
}
function markTightParagraphs(state, idx) {
const level = state.level + 2;
for (let i = idx + 2, l = state.tokens.length - 2; i < l; i++) {
if (state.tokens[i].level === level && state.tokens[i].type === "paragraph_open") {
state.tokens[i + 2].hidden = true;
state.tokens[i].hidden = true;
i += 2;
}
}
}
function list(state, startLine, endLine, silent) {
let max, pos, start, token;
let nextLine = startLine;
let tight = true;
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[nextLine] - state.blkIndent >= 4) {
return false;
}
// Special case:
// - item 1
// - item 2
// - item 3
// - item 4
// - this one is a paragraph continuation
if (state.listIndent >= 0 && state.sCount[nextLine] - state.listIndent >= 4 && state.sCount[nextLine] < state.blkIndent) {
return false;
}
let isTerminatingParagraph = false;
// limit conditions when list can interrupt
// a paragraph (validation mode only)
if (silent && state.parentType === "paragraph") {
// Next list item should still terminate previous list item;
// This code can fail if plugins use blkIndent as well as lists,
// but I hope the spec gets fixed long before that happens.
if (state.sCount[nextLine] >= state.blkIndent) {
isTerminatingParagraph = true;
}
}
// Detect list type and position after marker
let isOrdered;
let markerValue;
let posAfterMarker;
if ((posAfterMarker = skipOrderedListMarker(state, nextLine)) >= 0) {
isOrdered = true;
start = state.bMarks[nextLine] + state.tShift[nextLine];
markerValue = Number(state.src.slice(start, posAfterMarker - 1));
// If we're starting a new ordered list right after
// a paragraph, it should start with 1.
if (isTerminatingParagraph && markerValue !== 1) return false;
} else if ((posAfterMarker = skipBulletListMarker(state, nextLine)) >= 0) {
isOrdered = false;
} else {
return false;
}
// If we're starting a new unordered list right after
// a paragraph, first line should not be empty.
if (isTerminatingParagraph) {
if (state.skipSpaces(posAfterMarker) >= state.eMarks[nextLine]) return false;
}
// For validation mode we can terminate immediately
if (silent) {
return true;
}
// We should terminate list on style change. Remember first one to compare.
const markerCharCode = state.src.charCodeAt(posAfterMarker - 1);
// Start list
const listTokIdx = state.tokens.length;
if (isOrdered) {
token = state.push("ordered_list_open", "ol", 1);
if (markerValue !== 1) {
token.attrs = [ [ "start", markerValue ] ];
}
} else {
token = state.push("bullet_list_open", "ul", 1);
}
const listLines = [ nextLine, 0 ];
token.map = listLines;
token.markup = String.fromCharCode(markerCharCode);
// Iterate list items
let prevEmptyEnd = false;
const terminatorRules = state.md.block.ruler.getRules("list");
const oldParentType = state.parentType;
state.parentType = "list";
while (nextLine < endLine) {
pos = posAfterMarker;
max = state.eMarks[nextLine];
const initial = state.sCount[nextLine] + posAfterMarker - (state.bMarks[nextLine] + state.tShift[nextLine]);
let offset = initial;
while (pos < max) {
const ch = state.src.charCodeAt(pos);
if (ch === 9) {
offset += 4 - (offset + state.bsCount[nextLine]) % 4;
} else if (ch === 32) {
offset++;
} else {
break;
}
pos++;
}
const contentStart = pos;
let indentAfterMarker;
if (contentStart >= max) {
// trimming space in "- \n 3" case, indent is 1 here
indentAfterMarker = 1;
} else {
indentAfterMarker = offset - initial;
}
// If we have more than 4 spaces, the indent is 1
// (the rest is just indented code block)
if (indentAfterMarker > 4) {
indentAfterMarker = 1;
}
// " - test"
// ^^^^^ - calculating total length of this thing
const indent = initial + indentAfterMarker;
// Run subparser & write tokens
token = state.push("list_item_open", "li", 1);
token.markup = String.fromCharCode(markerCharCode);
const itemLines = [ nextLine, 0 ];
token.map = itemLines;
if (isOrdered) {
token.info = state.src.slice(start, posAfterMarker - 1);
}
// change current state, then restore it after parser subcall
const oldTight = state.tight;
const oldTShift = state.tShift[nextLine];
const oldSCount = state.sCount[nextLine];
// - example list
// ^ listIndent position will be here
// ^ blkIndent position will be here
const oldListIndent = state.listIndent;
state.listIndent = state.blkIndent;
state.blkIndent = indent;
state.tight = true;
state.tShift[nextLine] = contentStart - state.bMarks[nextLine];
state.sCount[nextLine] = offset;
if (contentStart >= max && state.isEmpty(nextLine + 1)) {
// workaround for this case
// (list item is empty, list terminates before "foo"):
// ~~~~~~~~
// -
// foo
// ~~~~~~~~
state.line = Math.min(state.line + 2, endLine);
} else {
state.md.block.tokenize(state, nextLine, endLine, true);
}
// If any of list item is tight, mark list as tight
if (!state.tight || prevEmptyEnd) {
tight = false;
}
// Item become loose if finish with empty line,
// but we should filter last element, because it means list finish
prevEmptyEnd = state.line - nextLine > 1 && state.isEmpty(state.line - 1);
state.blkIndent = state.listIndent;
state.listIndent = oldListIndent;
state.tShift[nextLine] = oldTShift;
state.sCount[nextLine] = oldSCount;
state.tight = oldTight;
token = state.push("list_item_close", "li", -1);
token.markup = String.fromCharCode(markerCharCode);
nextLine = state.line;
itemLines[1] = nextLine;
if (nextLine >= endLine) {
break;
}
// Try to check if list is terminated or continued.
if (state.sCount[nextLine] < state.blkIndent) {
break;
}
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[nextLine] - state.blkIndent >= 4) {
break;
}
// fail if terminating block found
let terminate = false;
for (let i = 0, l = terminatorRules.length; i < l; i++) {
if (terminatorRules[i](state, nextLine, endLine, true)) {
terminate = true;
break;
}
}
if (terminate) {
break;
}
// fail if list has another type
if (isOrdered) {
posAfterMarker = skipOrderedListMarker(state, nextLine);
if (posAfterMarker < 0) {
break;
}
start = state.bMarks[nextLine] + state.tShift[nextLine];
} else {
posAfterMarker = skipBulletListMarker(state, nextLine);
if (posAfterMarker < 0) {
break;
}
}
if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) {
break;
}
}
// Finalize list
if (isOrdered) {
token = state.push("ordered_list_close", "ol", -1);
} else {
token = state.push("bullet_list_close", "ul", -1);
}
token.markup = String.fromCharCode(markerCharCode);
listLines[1] = nextLine;
state.line = nextLine;
state.parentType = oldParentType;
// mark paragraphs tight if needed
if (tight) {
markTightParagraphs(state, listTokIdx);
}
return true;
}
function reference(state, startLine, _endLine, silent) {
let lines = 0;
let pos = state.bMarks[startLine] + state.tShift[startLine];
let max = state.eMarks[startLine];
let nextLine = startLine + 1;
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) {
return false;
}
if (state.src.charCodeAt(pos) !== 91 /* [ */) {
return false;
}
// Simple check to quickly interrupt scan on [link](url) at the start of line.
// Can be useful on practice: https://github.com/markdown-it/markdown-it/issues/54
while (++pos < max) {
if (state.src.charCodeAt(pos) === 93 /* ] */ && state.src.charCodeAt(pos - 1) !== 92 /* \ */) {
if (pos + 1 === max) {
return false;
}
if (state.src.charCodeAt(pos + 1) !== 58 /* : */) {
return false;
}
break;
}
}
const endLine = state.lineMax;
// jump line-by-line until empty one or EOF
const terminatorRules = state.md.block.ruler.getRules("reference");
const oldParentType = state.parentType;
state.parentType = "reference";
for (;nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {
// this would be a code block normally, but after paragraph
// it's considered a lazy continuation regardless of what's there
if (state.sCount[nextLine] - state.blkIndent > 3) {
continue;
}
// quirk for blockquotes, this line should already be checked by that rule
if (state.sCount[nextLine] < 0) {
continue;
}
// Some tags can terminate paragraph without empty line.
let terminate = false;
for (let i = 0, l = terminatorRules.length; i < l; i++) {
if (terminatorRules[i](state, nextLine, endLine, true)) {
terminate = true;
break;
}
}
if (terminate) {
break;
}
}
const str = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
max = str.length;
let labelEnd = -1;
for (pos = 1; pos < max; pos++) {
const ch = str.charCodeAt(pos);
if (ch === 91 /* [ */) {
return false;
} else if (ch === 93 /* ] */) {
labelEnd = pos;
break;
} else if (ch === 10 /* \n */) {
lines++;
} else if (ch === 92 /* \ */) {
pos++;
if (pos < max && str.charCodeAt(pos) === 10) {
lines++;
}
}
}
if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 58 /* : */) {
return false;
}
// [label]: destination 'title'
// ^^^ skip optional whitespace here
for (pos = labelEnd + 2; pos < max; pos++) {
const ch = str.charCodeAt(pos);
if (ch === 10) {
lines++;
} else if (isSpace(ch)) ; else {
break;
}
}
// [label]: destination 'title'
// ^^^^^^^^^^^ parse this
const destRes = state.md.helpers.parseLinkDestination(str, pos, max);
if (!destRes.ok) {
return false;
}
const href = state.md.normalizeLink(destRes.str);
if (!state.md.validateLink(href)) {
return false;
}
pos = destRes.pos;
lines += destRes.lines;
// save cursor state, we could require to rollback later
const destEndPos = pos;
const destEndLineNo = lines;
// [label]: destination 'title'
// ^^^ skipping those spaces
const start = pos;
for (;pos < max; pos++) {
const ch = str.charCodeAt(pos);
if (ch === 10) {
lines++;
} else if (isSpace(ch)) ; else {
break;
}
}
// [label]: destination 'title'
// ^^^^^^^ parse this
const titleRes = state.md.helpers.parseLinkTitle(str, pos, max);
let title;
if (pos < max && start !== pos && titleRes.ok) {
title = titleRes.str;
pos = titleRes.pos;
lines += titleRes.lines;
} else {
title = "";
pos = destEndPos;
lines = destEndLineNo;
}
// skip trailing spaces until the rest of the line
while (pos < max) {
const ch = str.charCodeAt(pos);
if (!isSpace(ch)) {
break;
}
pos++;
}
if (pos < max && str.charCodeAt(pos) !== 10) {
if (title) {
// garbage at the end of the line after title,
// but it could still be a valid reference if we roll back
title = "";
pos = destEndPos;
lines = destEndLineNo;
while (pos < max) {
const ch = str.charCodeAt(pos);
if (!isSpace(ch)) {
break;
}
pos++;
}
}
}
if (pos < max && str.charCodeAt(pos) !== 10) {
// garbage at the end of the line
return false;
}
const label = normalizeReference(str.slice(1, labelEnd));
if (!label) {
// CommonMark 0.20 disallows empty labels
return false;
}
// Reference can not terminate anything. This check is for safety only.
/* istanbul ignore if */ if (silent) {
return true;
}
if (typeof state.env.references === "undefined") {
state.env.references = {};
}
if (typeof state.env.references[label] === "undefined") {
state.env.references[label] = {
title: title,
href: href
};
}
state.parentType = oldParentType;
state.line = startLine + lines + 1;
return true;
}
// List of valid html blocks names, according to commonmark spec
// https://spec.commonmark.org/0.30/#html-blocks
var block_names = [ "address", "article", "aside", "base", "basefont", "blockquote", "body", "caption", "center", "col", "colgroup", "dd", "details", "dialog", "dir", "div", "dl", "dt", "fieldset", "figcaption", "figure", "footer", "form", "frame", "frameset", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hr", "html", "iframe", "legend", "li", "link", "main", "menu", "menuitem", "nav", "noframes", "ol", "optgroup", "option", "p", "param", "section", "source", "summary", "table", "tbody", "td", "tfoot", "th", "thead", "title", "tr", "track", "ul" ];
// Regexps to match html elements
const attr_name = "[a-zA-Z_:][a-zA-Z0-9:._-]*";
const unquoted = "[^\"'=<>`\\x00-\\x20]+";
const single_quoted = "'[^']*'";
const double_quoted = '"[^"]*"';
const attr_value = "(?:" + unquoted + "|" + single_quoted + "|" + double_quoted + ")";
const attribute = "(?:\\s+" + attr_name + "(?:\\s*=\\s*" + attr_value + ")?)";
const open_tag = "<[A-Za-z][A-Za-z0-9\\-]*" + attribute + "*\\s*\\/?>";
const close_tag = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>";
const comment = "\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e";
const processing = "<[?][\\s\\S]*?[?]>";
const declaration = "<![A-Z]+\\s+[^>]*>";
const cdata = "<!\\[CDATA\\[[\\s\\S]*?\\]\\]>";
const HTML_TAG_RE = new RegExp("^(?:" + open_tag + "|" + close_tag + "|" + comment + "|" + processing + "|" + declaration + "|" + cdata + ")");
const HTML_OPEN_CLOSE_TAG_RE = new RegExp("^(?:" + open_tag + "|" + close_tag + ")");
// HTML block
// An array of opening and corresponding closing sequences for html tags,
// last argument defines whether it can terminate a paragraph or not
const HTML_SEQUENCES = [ [ /^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, true ], [ /^<!--/, /-->/, true ], [ /^<\?/, /\?>/, true ], [ /^<![A-Z]/, />/, true ], [ /^<!\[CDATA\[/, /\]\]>/, true ], [ new RegExp("^</?(" + block_names.join("|") + ")(?=(\\s|/?>|$))", "i"), /^$/, true ], [ new RegExp(HTML_OPEN_CLOSE_TAG_RE.source + "\\s*$"), /^$/, false ] ];
function html_block(state, startLine, endLine, silent) {
let pos = state.bMarks[startLine] + state.tShift[startLine];
let max = state.eMarks[startLine];
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) {
return false;
}
if (!state.md.options.html) {
return false;
}
if (state.src.charCodeAt(pos) !== 60 /* < */) {
return false;
}
let lineText = state.src.slice(pos, max);
let i = 0;
for (;i < HTML_SEQUENCES.length; i++) {
if (HTML_SEQUENCES[i][0].test(lineText)) {
break;
}
}
if (i === HTML_SEQUENCES.length) {
return false;
}
if (silent) {
// true if this sequence can be a terminator, false otherwise
return HTML_SEQUENCES[i][2];
}
let nextLine = startLine + 1;
// If we are here - we detected HTML block.
// Let's roll down till block end.
if (!HTML_SEQUENCES[i][1].test(lineText)) {
for (;nextLine < endLine; nextLine++) {
if (state.sCount[nextLine] < state.blkIndent) {
break;
}
pos = state.bMarks[nextLine] + state.tShift[nextLine];
max = state.eMarks[nextLine];
lineText = state.src.slice(pos, max);
if (HTML_SEQUENCES[i][1].test(lineText)) {
if (lineText.length !== 0) {
nextLine++;
}
break;
}
}
}
state.line = nextLine;
const token = state.push("html_block", "", 0);
token.map = [ startLine, nextLine ];
token.content = state.getLines(startLine, nextLine, state.blkIndent, true);
return true;
}
// heading (#, ##, ...)
function heading(state, startLine, endLine, silent) {
let pos = state.bMarks[startLine] + state.tShift[startLine];
let max = state.eMarks[startLine];
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) {
return false;
}
let ch = state.src.charCodeAt(pos);
if (ch !== 35 /* # */ || pos >= max) {
return false;
}
// count heading level
let level = 1;
ch = state.src.charCodeAt(++pos);
while (ch === 35 /* # */ && pos < max && level <= 6) {
level++;
ch = state.src.charCodeAt(++pos);
}
if (level > 6 || pos < max && !isSpace(ch)) {
return false;
}
if (silent) {
return true;
}
// Let's cut tails like ' ### ' from the end of string
max = state.skipSpacesBack(max, pos);
const tmp = state.skipCharsBack(max, 35, pos);
// #
if (tmp > pos && isSpace(state.src.charCodeAt(tmp - 1))) {
max = tmp;
}
state.line = startLine + 1;
const token_o = state.push("heading_open", "h" + String(level), 1);
token_o.markup = "########".slice(0, level);
token_o.map = [ startLine, state.line ];
const token_i = state.push("inline", "", 0);
token_i.content = state.src.slice(pos, max).trim();
token_i.map = [ startLine, state.line ];
token_i.children = [];
const token_c = state.push("heading_close", "h" + String(level), -1);
token_c.markup = "########".slice(0, level);
return true;
}
// lheading (---, ===)
function lheading(state, startLine, endLine /*, silent */) {
const terminatorRules = state.md.block.ruler.getRules("paragraph");
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) {
return false;
}
const oldParentType = state.parentType;
state.parentType = "paragraph";
// use paragraph to match terminatorRules
// jump line-by-line until empty one or EOF
let level = 0;
let marker;
let nextLine = startLine + 1;
for (;nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {
// this would be a code block normally, but after paragraph
// it's considered a lazy continuation regardless of what's there
if (state.sCount[nextLine] - state.blkIndent > 3) {
continue;
}
// Check for underline in setext header
if (state.sCount[nextLine] >= state.blkIndent) {
let pos = state.bMarks[nextLine] + state.tShift[nextLine];
const max = state.eMarks[nextLine];
if (pos < max) {
marker = state.src.charCodeAt(pos);
if (marker === 45 /* - */ || marker === 61 /* = */) {
pos = state.skipChars(pos, marker);
pos = state.skipSpaces(pos);
if (pos >= max) {
level = marker === 61 /* = */ ? 1 : 2;
break;
}
}
}
}
// quirk for blockquotes, this line should already be checked by that rule
if (state.sCount[nextLine] < 0) {
continue;
}
// Some tags can terminate paragraph without empty line.
let terminate = false;
for (let i = 0, l = terminatorRules.length; i < l; i++) {
if (terminatorRules[i](state, nextLine, endLine, true)) {
terminate = true;
break;
}
}
if (terminate) {
break;
}
}
if (!level) {
// Didn't find valid underline
return false;
}
const content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
state.line = nextLine + 1;
const token_o = state.push("heading_open", "h" + String(level), 1);
token_o.markup = String.fromCharCode(marker);
token_o.map = [ startLine, state.line ];
const token_i = state.push("inline", "", 0);
token_i.content = content;
token_i.map = [ startLine, state.line - 1 ];
token_i.children = [];
const token_c = state.push("heading_close", "h" + String(level), -1);
token_c.markup = String.fromCharCode(marker);
state.parentType = oldParentType;
return true;
}
// Paragraph
function paragraph(state, startLine, endLine) {
const terminatorRules = state.md.block.ruler.getRules("paragraph");
const oldParentType = state.parentType;
let nextLine = startLine + 1;
state.parentType = "paragraph";
// jump line-by-line until empty one or EOF
for (;nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {
// this would be a code block normally, but after paragraph
// it's considered a lazy continuation regardless of what's there
if (state.sCount[nextLine] - state.blkIndent > 3) {
continue;
}
// quirk for blockquotes, this line should already be checked by that rule
if (state.sCount[nextLine] < 0) {
continue;
}
// Some tags can terminate paragraph without empty line.
let terminate = false;
for (let i = 0, l = terminatorRules.length; i < l; i++) {
if (terminatorRules[i](state, nextLine, endLine, true)) {
terminate = true;
break;
}
}
if (terminate) {
break;
}
}
const content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
state.line = nextLine;
const token_o = state.push("paragraph_open", "p", 1);
token_o.map = [ startLine, state.line ];
const token_i = state.push("inline", "", 0);
token_i.content = content;
token_i.map = [ startLine, state.line ];
token_i.children = [];
state.push("paragraph_close", "p", -1);
state.parentType = oldParentType;
return true;
}
/** internal
* class ParserBlock
*
* Block-level tokenizer.
**/ const _rules$1 = [
// First 2 params - rule name & source. Secondary array - list of rules,
// which can be terminated by this one.
[ "table", table, [ "paragraph", "reference" ] ], [ "code", code ], [ "fence", fence, [ "paragraph", "reference", "blockquote", "list" ] ], [ "blockquote", blockquote, [ "paragraph", "reference", "blockquote", "list" ] ], [ "hr", hr, [ "paragraph", "reference", "blockquote", "list" ] ], [ "list", list, [ "paragraph", "reference", "blockquote" ] ], [ "reference", reference ], [ "html_block", html_block, [ "paragraph", "reference", "blockquote" ] ], [ "heading", heading, [ "paragraph", "reference", "blockquote" ] ], [ "lheading", lheading ], [ "paragraph", paragraph ] ];
/**
* new ParserBlock()
**/ function ParserBlock() {
/**
* ParserBlock#ruler -> Ruler
*
* [[Ruler]] instance. Keep configuration of block rules.
**/
this.ruler = new Ruler;
for (let i = 0; i < _rules$1.length; i++) {
this.ruler.push(_rules$1[i][0], _rules$1[i][1], {
alt: (_rules$1[i][2] || []).slice()
});
}
}
// Generate tokens for input range
ParserBlock.prototype.tokenize = function(state, startLine, endLine) {
const rules = this.ruler.getRules("");
const len = rules.length;
const maxNesting = state.md.options.maxNesting;
let line = startLine;
let hasEmptyLines = false;
while (line < endLine) {
state.line = line = state.skipEmptyLines(line);
if (line >= endLine) {
break;
}
// Termination condition for nested calls.
// Nested calls currently used for blockquotes & lists
if (state.sCount[line] < state.blkIndent) {
break;
}
// If nesting level exceeded - skip tail to the end. That's not ordinary
// situation and we should not care about content.
if (state.level >= maxNesting) {
state.line = endLine;
break;
}
// Try all possible rules.
// On success, rule should:
// - update `state.line`
// - update `state.tokens`
// - return true
const prevLine = state.line;
let ok = false;
for (let i = 0; i < len; i++) {
ok = rules[i](state, line, endLine, false);
if (ok) {
if (prevLine >= state.line) {
throw new Error("block rule didn't increment state.line");
}
break;
}
}
// this can only happen if user disables paragraph rule
if (!ok) throw new Error("none of the block rules matched");
// set state.tight if we had an empty line before current tag
// i.e. latest empty line should not count
state.tight = !hasEmptyLines;
// paragraph might "eat" one newline after it in nested lists
if (state.isEmpty(state.line - 1)) {
hasEmptyLines = true;
}
line = state.line;
if (line < endLine && state.isEmpty(line)) {
hasEmptyLines = true;
line++;
state.line = line;
}
}
};
/**
* ParserBlock.parse(str, md, env, outTokens)
*
* Process input string and push block tokens into `outTokens`
**/ ParserBlock.prototype.parse = function(src, md, env, outTokens) {
if (!src) {
return;
}
const state = new this.State(src, md, env, outTokens);
this.tokenize(state, state.line, state.lineMax);
};
ParserBlock.prototype.State = StateBlock;
// Inline parser state
function StateInline(src, md, env, outTokens) {
this.src = src;
this.env = env;
this.md = md;
this.tokens = outTokens;
this.tokens_meta = Array(outTokens.length);
this.pos = 0;
this.posMax = this.src.length;
this.level = 0;
this.pending = "";
this.pendingLevel = 0;
// Stores { start: end } pairs. Useful for backtrack
// optimization of pairs parse (emphasis, strikes).
this.cache = {};
// List of emphasis-like delimiters for current tag
this.delimiters = [];
// Stack of delimiter lists for upper level tags
this._prev_delimiters = [];
// backtick length => last seen position
this.backticks = {};
this.backticksScanned = false;
// Counter used to disable inline linkify-it execution
// inside <a> and markdown links
this.linkLevel = 0;
}
// Flush pending text
StateInline.prototype.pushPending = function() {
const token = new Token("text", "", 0);
token.content = this.pending;
token.level = this.pendingLevel;
this.tokens.push(token);
this.pending = "";
return token;
};
// Push new token to "stream".
// If pending text exists - flush it as text token
StateInline.prototype.push = function(type, tag, nesting) {
if (this.pending) {
this.pushPending();
}
const token = new Token(type, tag, nesting);
let token_meta = null;
if (nesting < 0) {
// closing tag
this.level--;
this.delimiters = this._prev_delimiters.pop();
}
token.level = this.level;
if (nesting > 0) {
// opening tag
this.level++;
this._prev_delimiters.push(this.delimiters);
this.delimiters = [];
token_meta = {
delimiters: this.delimiters
};
}
this.pendingLevel = this.level;
this.tokens.push(token);
this.tokens_meta.push(token_meta);
return token;
};
// Scan a sequence of emphasis-like markers, and determine whether
// it can start an emphasis sequence or end an emphasis sequence.
// - start - position to scan from (it should point at a valid marker);
// - canSplitWord - determine if these markers can be found inside a word
StateInline.prototype.scanDelims = function(start, canSplitWord) {
let can_open, can_close;
let left_flanking = true;
let right_flanking = true;
const max = this.posMax;
const marker = this.src.charCodeAt(start);
// treat beginning of the line as a whitespace
const lastChar = start > 0 ? this.src.charCodeAt(start - 1) : 32;
let pos = start;
while (pos < max && this.src.charCodeAt(pos) === marker) {
pos++;
}
const count = pos - start;
// treat end of the line as a whitespace
const nextChar = pos < max ? this.src.charCodeAt(pos) : 32;
const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));
const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));
const isLastWhiteSpace = isWhiteSpace(lastChar);
const isNextWhiteSpace = isWhiteSpace(nextChar);
if (isNextWhiteSpace) {
left_flanking = false;
} else if (isNextPunctChar) {
if (!(isLastWhiteSpace || isLastPunctChar)) {
left_flanking = false;
}
}
if (isLastWhiteSpace) {
right_flanking = false;
} else if (isLastPunctChar) {
if (!(isNextWhiteSpace || isNextPunctChar)) {
right_flanking = false;
}
}
if (!canSplitWord) {
can_open = left_flanking && (!right_flanking || isLastPunctChar);
can_close = right_flanking && (!left_flanking || isNextPunctChar);
} else {
can_open = left_flanking;
can_close = right_flanking;
}
return {
can_open: can_open,
can_close: can_close,
length: count
};
};
// re-export Token class to use in block rules
StateInline.prototype.Token = Token;
// Skip text characters for text token, place those to pending buffer
// and increment current pos
// Rule to skip pure text
// '{}$%@~+=:' reserved for extentions
// !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~
// !!!! Don't confuse with "Markdown ASCII Punctuation" chars
// http://spec.commonmark.org/0.15/#ascii-punctuation-character
function isTerminatorChar(ch) {
switch (ch) {
case 10 /* \n */ :
case 33 /* ! */ :
case 35 /* # */ :
case 36 /* $ */ :
case 37 /* % */ :
case 38 /* & */ :
case 42 /* * */ :
case 43 /* + */ :
case 45 /* - */ :
case 58 /* : */ :
case 60 /* < */ :
case 61 /* = */ :
case 62 /* > */ :
case 64 /* @ */ :
case 91 /* [ */ :
case 92 /* \ */ :
case 93 /* ] */ :
case 94 /* ^ */ :
case 95 /* _ */ :
case 96 /* ` */ :
case 123 /* { */ :
case 125 /* } */ :
case 126 /* ~ */ :
return true;
default:
return false;
}
}
function text(state, silent) {
let pos = state.pos;
while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) {
pos++;
}
if (pos === state.pos) {
return false;
}
if (!silent) {
state.pending += state.src.slice(state.pos, pos);
}
state.pos = pos;
return true;
}
// Alternative implementation, for memory.
// It costs 10% of performance, but allows extend terminators list, if place it
// to `ParcerInline` property. Probably, will switch to it sometime, such
// flexibility required.
/*
var TERMINATOR_RE = /[\n!#$%&*+\-:<=>@[\\\]^_`{}~]/;
module.exports = function text(state, silent) {
var pos = state.pos,
idx = state.src.slice(pos).search(TERMINATOR_RE);
// first char is terminator -> empty text
if (idx === 0) { return false; }
// no terminator -> text till end of string
if (idx < 0) {
if (!silent) { state.pending += state.src.slice(pos); }
state.pos = state.src.length;
return true;
}
if (!silent) { state.pending += state.src.slice(pos, pos + idx); }
state.pos += idx;
return true;
}; */
// Process links like https://example.org/
// RFC3986: scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
const SCHEME_RE = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;
function linkify(state, silent) {
if (!state.md.options.linkify) return false;
if (state.linkLevel > 0) return false;
const pos = state.pos;
const max = state.posMax;
if (pos + 3 > max) return false;
if (state.src.charCodeAt(pos) !== 58 /* : */) return false;
if (state.src.charCodeAt(pos + 1) !== 47 /* / */) return false;
if (state.src.charCodeAt(pos + 2) !== 47 /* / */) return false;
const match = state.pending.match(SCHEME_RE);
if (!match) return false;
const proto = match[1];
const link = state.md.linkify.matchAtStart(state.src.slice(pos - proto.length));
if (!link) return false;
let url = link.url;
// invalid link, but still detected by linkify somehow;
// need to check to prevent infinite loop below
if (url.length <= proto.length) return false;
// disallow '*' at the end of the link (conflicts with emphasis)
url = url.replace(/\*+$/, "");
const fullUrl = state.md.normalizeLink(url);
if (!state.md.validateLink(fullUrl)) return false;
if (!silent) {
state.pending = state.pending.slice(0, -proto.length);
const token_o = state.push("link_open", "a", 1);
token_o.attrs = [ [ "href", fullUrl ] ];
token_o.markup = "linkify";
token_o.info = "auto";
const token_t = state.push("text", "", 0);
token_t.content = state.md.normalizeLinkText(url);
const token_c = state.push("link_close", "a", -1);
token_c.markup = "linkify";
token_c.info = "auto";
}
state.pos += url.length - proto.length;
return true;
}
// Proceess '\n'
function newline(state, silent) {
let pos = state.pos;
if (state.src.charCodeAt(pos) !== 10 /* \n */) {
return false;
}
const pmax = state.pending.length - 1;
const max = state.posMax;
// ' \n' -> hardbreak
// Lookup in pending chars is bad practice! Don't copy to other rules!
// Pending string is stored in concat mode, indexed lookups will cause
// convertion to flat mode.
if (!silent) {
if (pmax >= 0 && state.pending.charCodeAt(pmax) === 32) {
if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 32) {
// Find whitespaces tail of pending chars.
let ws = pmax - 1;
while (ws >= 1 && state.pending.charCodeAt(ws - 1) === 32) ws--;
state.pending = state.pending.slice(0, ws);
state.push("hardbreak", "br", 0);
} else {
state.pending = state.pending.slice(0, -1);
state.push("softbreak", "br", 0);
}
} else {
state.push("softbreak", "br", 0);
}
}
pos++;
// skip heading spaces for next line
while (pos < max && isSpace(state.src.charCodeAt(pos))) {
pos++;
}
state.pos = pos;
return true;
}
// Process escaped chars and hardbreaks
const ESCAPED = [];
for (let i = 0; i < 256; i++) {
ESCAPED.push(0);
}
"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(ch) {
ESCAPED[ch.charCodeAt(0)] = 1;
}));
function escape(state, silent) {
let pos = state.pos;
const max = state.posMax;
if (state.src.charCodeAt(pos) !== 92 /* \ */) return false;
pos++;
// '\' at the end of the inline block
if (pos >= max) return false;
let ch1 = state.src.charCodeAt(pos);
if (ch1 === 10) {
if (!silent) {
state.push("hardbreak", "br", 0);
}
pos++;
// skip leading whitespaces from next line
while (pos < max) {
ch1 = state.src.charCodeAt(pos);
if (!isSpace(ch1)) break;
pos++;
}
state.pos = pos;
return true;
}
let escapedStr = state.src[pos];
if (ch1 >= 55296 && ch1 <= 56319 && pos + 1 < max) {
const ch2 = state.src.charCodeAt(pos + 1);
if (ch2 >= 56320 && ch2 <= 57343) {
escapedStr += state.src[pos + 1];
pos++;
}
}
const origStr = "\\" + escapedStr;
if (!silent) {
const token = state.push("text_special", "", 0);
if (ch1 < 256 && ESCAPED[ch1] !== 0) {
token.content = escapedStr;
} else {
token.content = origStr;
}
token.markup = origStr;
token.info = "escape";
}
state.pos = pos + 1;
return true;
}
// Parse backticks
function backtick(state, silent) {
let pos = state.pos;
const ch = state.src.charCodeAt(pos);
if (ch !== 96 /* ` */) {
return false;
}
const start = pos;
pos++;
const max = state.posMax;
// scan marker length
while (pos < max && state.src.charCodeAt(pos) === 96 /* ` */) {
pos++;
}
const marker = state.src.slice(start, pos);
const openerLength = marker.length;
if (state.backticksScanned && (state.backticks[openerLength] || 0) <= start) {
if (!silent) state.pending += marker;
state.pos += openerLength;
return true;
}
let matchEnd = pos;
let matchStart;
// Nothing found in the cache, scan until the end of the line (or until marker is found)
while ((matchStart = state.src.indexOf("`", matchEnd)) !== -1) {
matchEnd = matchStart + 1;
// scan marker length
while (matchEnd < max && state.src.charCodeAt(matchEnd) === 96 /* ` */) {
matchEnd++;
}
const closerLength = matchEnd - matchStart;
if (closerLength === openerLength) {
// Found matching closer length.
if (!silent) {
const token = state.push("code_inline", "code", 0);
token.markup = marker;
token.content = state.src.slice(pos, matchStart).replace(/\n/g, " ").replace(/^ (.+) $/, "$1");
}
state.pos = matchEnd;
return true;
}
// Some different length found, put it in cache as upper limit of where closer can be found
state.backticks[closerLength] = matchStart;
}
// Scanned through the end, didn't find anything
state.backticksScanned = true;
if (!silent) state.pending += marker;
state.pos += openerLength;
return true;
}
// ~~strike through~~
// Insert each marker as a separate text token, and add it to delimiter list
function strikethrough_tokenize(state, silent) {
const start = state.pos;
const marker = state.src.charCodeAt(start);
if (silent) {
return false;
}
if (marker !== 126 /* ~ */) {
return false;
}
const scanned = state.scanDelims(state.pos, true);
let len = scanned.length;
const ch = String.fromCharCode(marker);
if (len < 2) {
return false;
}
let token;
if (len % 2) {
token = state.push("text", "", 0);
token.content = ch;
len--;
}
for (let i = 0; i < len; i += 2) {
token = state.push("text", "", 0);
token.content = ch + ch;
state.delimiters.push({
marker: marker,
length: 0,
// disable "rule of 3" length checks meant for emphasis
token: state.tokens.length - 1,
end: -1,
open: scanned.can_open,
close: scanned.can_close
});
}
state.pos += scanned.length;
return true;
}
function postProcess$1(state, delimiters) {
let token;
const loneMarkers = [];
const max = delimiters.length;
for (let i = 0; i < max; i++) {
const startDelim = delimiters[i];
if (startDelim.marker !== 126 /* ~ */) {
continue;
}
if (startDelim.end === -1) {
continue;
}
const endDelim = delimiters[startDelim.end];
token = state.tokens[startDelim.token];
token.type = "s_open";
token.tag = "s";
token.nesting = 1;
token.markup = "~~";
token.content = "";
token = state.tokens[endDelim.token];
token.type = "s_close";
token.tag = "s";
token.nesting = -1;
token.markup = "~~";
token.content = "";
if (state.tokens[endDelim.token - 1].type === "text" && state.tokens[endDelim.token - 1].content === "~") {
loneMarkers.push(endDelim.token - 1);
}
}
// If a marker sequence has an odd number of characters, it's splitted
// like this: `~~~~~` -> `~` + `~~` + `~~`, leaving one marker at the
// start of the sequence.
// So, we have to move all those markers after subsequent s_close tags.
while (loneMarkers.length) {
const i = loneMarkers.pop();
let j = i + 1;
while (j < state.tokens.length && state.tokens[j].type === "s_close") {
j++;
}
j--;
if (i !== j) {
token = state.tokens[j];
state.tokens[j] = state.tokens[i];
state.tokens[i] = token;
}
}
}
// Walk through delimiter list and replace text tokens with tags
function strikethrough_postProcess(state) {
const tokens_meta = state.tokens_meta;
const max = state.tokens_meta.length;
postProcess$1(state, state.delimiters);
for (let curr = 0; curr < max; curr++) {
if (tokens_meta[curr] && tokens_meta[curr].delimiters) {
postProcess$1(state, tokens_meta[curr].delimiters);
}
}
}
var r_strikethrough = {
tokenize: strikethrough_tokenize,
postProcess: strikethrough_postProcess
};
// Process *this* and _that_
// Insert each marker as a separate text token, and add it to delimiter list
function emphasis_tokenize(state, silent) {
const start = state.pos;
const marker = state.src.charCodeAt(start);
if (silent) {
return false;
}
if (marker !== 95 /* _ */ && marker !== 42 /* * */) {
return false;
}
const scanned = state.scanDelims(state.pos, marker === 42);
for (let i = 0; i < scanned.length; i++) {
const token = state.push("text", "", 0);
token.content = String.fromCharCode(marker);
state.delimiters.push({
// Char code of the starting marker (number).
marker: marker,
// Total length of these series of delimiters.
length: scanned.length,
// A position of the token this delimiter corresponds to.
token: state.tokens.length - 1,
// If this delimiter is matched as a valid opener, `end` will be
// equal to its position, otherwise it's `-1`.
end: -1,
// Boolean flags that determine if this delimiter could open or close
// an emphasis.
open: scanned.can_open,
close: scanned.can_close
});
}
state.pos += scanned.length;
return true;
}
function postProcess(state, delimiters) {
const max = delimiters.length;
for (let i = max - 1; i >= 0; i--) {
const startDelim = delimiters[i];
if (startDelim.marker !== 95 /* _ */ && startDelim.marker !== 42 /* * */) {
continue;
}
// Process only opening markers
if (startDelim.end === -1) {
continue;
}
const endDelim = delimiters[startDelim.end];
// If the previous delimiter has the same marker and is adjacent to this one,
// merge those into one strong delimiter.
// `<em><em>whatever</em></em>` -> `<strong>whatever</strong>`
const isStrong = i > 0 && delimiters[i - 1].end === startDelim.end + 1 &&
// check that first two markers match and adjacent
delimiters[i - 1].marker === startDelim.marker && delimiters[i - 1].token === startDelim.token - 1 &&
// check that last two markers are adjacent (we can safely assume they match)
delimiters[startDelim.end + 1].token === endDelim.token + 1;
const ch = String.fromCharCode(startDelim.marker);
const token_o = state.tokens[startDelim.token];
token_o.type = isStrong ? "strong_open" : "em_open";
token_o.tag = isStrong ? "strong" : "em";
token_o.nesting = 1;
token_o.markup = isStrong ? ch + ch : ch;
token_o.content = "";
const token_c = state.tokens[endDelim.token];
token_c.type = isStrong ? "strong_close" : "em_close";
token_c.tag = isStrong ? "strong" : "em";
token_c.nesting = -1;
token_c.markup = isStrong ? ch + ch : ch;
token_c.content = "";
if (isStrong) {
state.tokens[delimiters[i - 1].token].content = "";
state.tokens[delimiters[startDelim.end + 1].token].content = "";
i--;
}
}
}
// Walk through delimiter list and replace text tokens with tags
function emphasis_post_process(state) {
const tokens_meta = state.tokens_meta;
const max = state.tokens_meta.length;
postProcess(state, state.delimiters);
for (let curr = 0; curr < max; curr++) {
if (tokens_meta[curr] && tokens_meta[curr].delimiters) {
postProcess(state, tokens_meta[curr].delimiters);
}
}
}
var r_emphasis = {
tokenize: emphasis_tokenize,
postProcess: emphasis_post_process
};
// Process [link](<to> "stuff")
function link(state, silent) {
let code, label, res, ref;
let href = "";
let title = "";
let start = state.pos;
let parseReference = true;
if (state.src.charCodeAt(state.pos) !== 91 /* [ */) {
return false;
}
const oldPos = state.pos;
const max = state.posMax;
const labelStart = state.pos + 1;
const labelEnd = state.md.helpers.parseLinkLabel(state, state.pos, true);
// parser failed to find ']', so it's not a valid link
if (labelEnd < 0) {
return false;
}
let pos = labelEnd + 1;
if (pos < max && state.src.charCodeAt(pos) === 40 /* ( */) {
// Inline link
// might have found a valid shortcut link, disable reference parsing
parseReference = false;
// [link]( <href> "title" )
// ^^ skipping these spaces
pos++;
for (;pos < max; pos++) {
code = state.src.charCodeAt(pos);
if (!isSpace(code) && code !== 10) {
break;
}
}
if (pos >= max) {
return false;
}
// [link]( <href> "title" )
// ^^^^^^ parsing link destination
start = pos;
res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);
if (res.ok) {
href = state.md.normalizeLink(res.str);
if (state.md.validateLink(href)) {
pos = res.pos;
} else {
href = "";
}
// [link]( <href> "title" )
// ^^ skipping these spaces
start = pos;
for (;pos < max; pos++) {
code = state.src.charCodeAt(pos);
if (!isSpace(code) && code !== 10) {
break;
}
}
// [link]( <href> "title" )
// ^^^^^^^ parsing link title
res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);
if (pos < max && start !== pos && res.ok) {
title = res.str;
pos = res.pos;
// [link]( <href> "title" )
// ^^ skipping these spaces
for (;pos < max; pos++) {
code = state.src.charCodeAt(pos);
if (!isSpace(code) && code !== 10) {
break;
}
}
}
}
if (pos >= max || state.src.charCodeAt(pos) !== 41 /* ) */) {
// parsing a valid shortcut link failed, fallback to reference
parseReference = true;
}
pos++;
}
if (parseReference) {
// Link reference
if (typeof state.env.references === "undefined") {
return false;
}
if (pos < max && state.src.charCodeAt(pos) === 91 /* [ */) {
start = pos + 1;
pos = state.md.helpers.parseLinkLabel(state, pos);
if (pos >= 0) {
label = state.src.slice(start, pos++);
} else {
pos = labelEnd + 1;
}
} else {
pos = labelEnd + 1;
}
// covers label === '' and label === undefined
// (collapsed reference link and shortcut reference link respectively)
if (!label) {
label = state.src.slice(labelStart, labelEnd);
}
ref = state.env.references[normalizeReference(label)];
if (!ref) {
state.pos = oldPos;
return false;
}
href = ref.href;
title = ref.title;
}
// We found the end of the link, and know for a fact it's a valid link;
// so all that's left to do is to call tokenizer.
if (!silent) {
state.pos = labelStart;
state.posMax = labelEnd;
const token_o = state.push("link_open", "a", 1);
const attrs = [ [ "href", href ] ];
token_o.attrs = attrs;
if (title) {
attrs.push([ "title", title ]);
}
state.linkLevel++;
state.md.inline.tokenize(state);
state.linkLevel--;
state.push("link_close", "a", -1);
}
state.pos = pos;
state.posMax = max;
return true;
}
// Process ![image](<src> "title")
function image(state, silent) {
let code, content, label, pos, ref, res, title, start;
let href = "";
const oldPos = state.pos;
const max = state.posMax;
if (state.src.charCodeAt(state.pos) !== 33 /* ! */) {
return false;
}
if (state.src.charCodeAt(state.pos + 1) !== 91 /* [ */) {
return false;
}
const labelStart = state.pos + 2;
const labelEnd = state.md.helpers.parseLinkLabel(state, state.pos + 1, false);
// parser failed to find ']', so it's not a valid link
if (labelEnd < 0) {
return false;
}
pos = labelEnd + 1;
if (pos < max && state.src.charCodeAt(pos) === 40 /* ( */) {
// Inline link
// [link]( <href> "title" )
// ^^ skipping these spaces
pos++;
for (;pos < max; pos++) {
code = state.src.charCodeAt(pos);
if (!isSpace(code) && code !== 10) {
break;
}
}
if (pos >= max) {
return false;
}
// [link]( <href> "title" )
// ^^^^^^ parsing link destination
start = pos;
res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);
if (res.ok) {
href = state.md.normalizeLink(res.str);
if (state.md.validateLink(href)) {
pos = res.pos;
} else {
href = "";
}
}
// [link]( <href> "title" )
// ^^ skipping these spaces
start = pos;
for (;pos < max; pos++) {
code = state.src.charCodeAt(pos);
if (!isSpace(code) && code !== 10) {
break;
}
}
// [link]( <href> "title" )
// ^^^^^^^ parsing link title
res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);
if (pos < max && start !== pos && res.ok) {
title = res.str;
pos = res.pos;
// [link]( <href> "title" )
// ^^ skipping these spaces
for (;pos < max; pos++) {
code = state.src.charCodeAt(pos);
if (!isSpace(code) && code !== 10) {
break;
}
}
} else {
title = "";
}
if (pos >= max || state.src.charCodeAt(pos) !== 41 /* ) */) {
state.pos = oldPos;
return false;
}
pos++;
} else {
// Link reference
if (typeof state.env.references === "undefined") {
return false;
}
if (pos < max && state.src.charCodeAt(pos) === 91 /* [ */) {
start = pos + 1;
pos = state.md.helpers.parseLinkLabel(state, pos);
if (pos >= 0) {
label = state.src.slice(start, pos++);
} else {
pos = labelEnd + 1;
}
} else {
pos = labelEnd + 1;
}
// covers label === '' and label === undefined
// (collapsed reference link and shortcut reference link respectively)
if (!label) {
label = state.src.slice(labelStart, labelEnd);
}
ref = state.env.references[normalizeReference(label)];
if (!ref) {
state.pos = oldPos;
return false;
}
href = ref.href;
title = ref.title;
}
// We found the end of the link, and know for a fact it's a valid link;
// so all that's left to do is to call tokenizer.
if (!silent) {
content = state.src.slice(labelStart, labelEnd);
const tokens = [];
state.md.inline.parse(content, state.md, state.env, tokens);
const token = state.push("image", "img", 0);
const attrs = [ [ "src", href ], [ "alt", "" ] ];
token.attrs = attrs;
token.children = tokens;
token.content = content;
if (title) {
attrs.push([ "title", title ]);
}
}
state.pos = pos;
state.posMax = max;
return true;
}
// Process autolinks '<protocol:...>'
/* eslint max-len:0 */ const EMAIL_RE = /^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/;
/* eslint-disable-next-line no-control-regex */ const AUTOLINK_RE = /^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;
function autolink(state, silent) {
let pos = state.pos;
if (state.src.charCodeAt(pos) !== 60 /* < */) {
return false;
}
const start = state.pos;
const max = state.posMax;
for (;;) {
if (++pos >= max) return false;
const ch = state.src.charCodeAt(pos);
if (ch === 60 /* < */) return false;
if (ch === 62 /* > */) break;
}
const url = state.src.slice(start + 1, pos);
if (AUTOLINK_RE.test(url)) {
const fullUrl = state.md.normalizeLink(url);
if (!state.md.validateLink(fullUrl)) {
return false;
}
if (!silent) {
const token_o = state.push("link_open", "a", 1);
token_o.attrs = [ [ "href", fullUrl ] ];
token_o.markup = "autolink";
token_o.info = "auto";
const token_t = state.push("text", "", 0);
token_t.content = state.md.normalizeLinkText(url);
const token_c = state.push("link_close", "a", -1);
token_c.markup = "autolink";
token_c.info = "auto";
}
state.pos += url.length + 2;
return true;
}
if (EMAIL_RE.test(url)) {
const fullUrl = state.md.normalizeLink("mailto:" + url);
if (!state.md.validateLink(fullUrl)) {
return false;
}
if (!silent) {
const token_o = state.push("link_open", "a", 1);
token_o.attrs = [ [ "href", fullUrl ] ];
token_o.markup = "autolink";
token_o.info = "auto";
const token_t = state.push("text", "", 0);
token_t.content = state.md.normalizeLinkText(url);
const token_c = state.push("link_close", "a", -1);
token_c.markup = "autolink";
token_c.info = "auto";
}
state.pos += url.length + 2;
return true;
}
return false;
}
// Process html tags
function isLinkOpen(str) {
return /^<a[>\s]/i.test(str);
}
function isLinkClose(str) {
return /^<\/a\s*>/i.test(str);
}
function isLetter(ch) {
/* eslint no-bitwise:0 */
const lc = ch | 32;
// to lower case
return lc >= 97 /* a */ && lc <= 122 /* z */;
}
function html_inline(state, silent) {
if (!state.md.options.html) {
return false;
}
// Check start
const max = state.posMax;
const pos = state.pos;
if (state.src.charCodeAt(pos) !== 60 /* < */ || pos + 2 >= max) {
return false;
}
// Quick fail on second char
const ch = state.src.charCodeAt(pos + 1);
if (ch !== 33 /* ! */ && ch !== 63 /* ? */ && ch !== 47 /* / */ && !isLetter(ch)) {
return false;
}
const match = state.src.slice(pos).match(HTML_TAG_RE);
if (!match) {
return false;
}
if (!silent) {
const token = state.push("html_inline", "", 0);
token.content = match[0];
if (isLinkOpen(token.content)) state.linkLevel++;
if (isLinkClose(token.content)) state.linkLevel--;
}
state.pos += match[0].length;
return true;
}
// Process html entity - &#123;, &#xAF;, &quot;, ...
const DIGITAL_RE = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i;
const NAMED_RE = /^&([a-z][a-z0-9]{1,31});/i;
function entity(state, silent) {
const pos = state.pos;
const max = state.posMax;
if (state.src.charCodeAt(pos) !== 38 /* & */) return false;
if (pos + 1 >= max) return false;
const ch = state.src.charCodeAt(pos + 1);
if (ch === 35 /* # */) {
const match = state.src.slice(pos).match(DIGITAL_RE);
if (match) {
if (!silent) {
const code = match[1][0].toLowerCase() === "x" ? parseInt(match[1].slice(1), 16) : parseInt(match[1], 10);
const token = state.push("text_special", "", 0);
token.content = isValidEntityCode(code) ? fromCodePoint(code) : fromCodePoint(65533);
token.markup = match[0];
token.info = "entity";
}
state.pos += match[0].length;
return true;
}
} else {
const match = state.src.slice(pos).match(NAMED_RE);
if (match) {
const decoded = decodeHTML(match[0]);
if (decoded !== match[0]) {
if (!silent) {
const token = state.push("text_special", "", 0);
token.content = decoded;
token.markup = match[0];
token.info = "entity";
}
state.pos += match[0].length;
return true;
}
}
}
return false;
}
// For each opening emphasis-like marker find a matching closing one
function processDelimiters(delimiters) {
const openersBottom = {};
const max = delimiters.length;
if (!max) return;
// headerIdx is the first delimiter of the current (where closer is) delimiter run
let headerIdx = 0;
let lastTokenIdx = -2;
// needs any value lower than -1
const jumps = [];
for (let closerIdx = 0; closerIdx < max; closerIdx++) {
const closer = delimiters[closerIdx];
jumps.push(0);
// markers belong to same delimiter run if:
// - they have adjacent tokens
// - AND markers are the same
if (delimiters[headerIdx].marker !== closer.marker || lastTokenIdx !== closer.token - 1) {
headerIdx = closerIdx;
}
lastTokenIdx = closer.token;
// Length is only used for emphasis-specific "rule of 3",
// if it's not defined (in strikethrough or 3rd party plugins),
// we can default it to 0 to disable those checks.
closer.length = closer.length || 0;
if (!closer.close) continue;
// Previously calculated lower bounds (previous fails)
// for each marker, each delimiter length modulo 3,
// and for whether this closer can be an opener;
// https://github.com/commonmark/cmark/commit/34250e12ccebdc6372b8b49c44fab57c72443460
/* eslint-disable-next-line no-prototype-builtins */ if (!openersBottom.hasOwnProperty(closer.marker)) {
openersBottom[closer.marker] = [ -1, -1, -1, -1, -1, -1 ];
}
const minOpenerIdx = openersBottom[closer.marker][(closer.open ? 3 : 0) + closer.length % 3];
let openerIdx = headerIdx - jumps[headerIdx] - 1;
let newMinOpenerIdx = openerIdx;
for (;openerIdx > minOpenerIdx; openerIdx -= jumps[openerIdx] + 1) {
const opener = delimiters[openerIdx];
if (opener.marker !== closer.marker) continue;
if (opener.open && opener.end < 0) {
let isOddMatch = false;
// from spec:
// If one of the delimiters can both open and close emphasis, then the
// sum of the lengths of the delimiter runs containing the opening and
// closing delimiters must not be a multiple of 3 unless both lengths
// are multiples of 3.
if (opener.close || closer.open) {
if ((opener.length + closer.length) % 3 === 0) {
if (opener.length % 3 !== 0 || closer.length % 3 !== 0) {
isOddMatch = true;
}
}
}
if (!isOddMatch) {
// If previous delimiter cannot be an opener, we can safely skip
// the entire sequence in future checks. This is required to make
// sure algorithm has linear complexity (see *_*_*_*_*_... case).
const lastJump = openerIdx > 0 && !delimiters[openerIdx - 1].open ? jumps[openerIdx - 1] + 1 : 0;
jumps[closerIdx] = closerIdx - openerIdx + lastJump;
jumps[openerIdx] = lastJump;
closer.open = false;
opener.end = closerIdx;
opener.close = false;
newMinOpenerIdx = -1;
// treat next token as start of run,
// it optimizes skips in **<...>**a**<...>** pathological case
lastTokenIdx = -2;
break;
}
}
}
if (newMinOpenerIdx !== -1) {
// If match for this delimiter run failed, we want to set lower bound for
// future lookups. This is required to make sure algorithm has linear
// complexity.
// See details here:
// https://github.com/commonmark/cmark/issues/178#issuecomment-270417442
openersBottom[closer.marker][(closer.open ? 3 : 0) + (closer.length || 0) % 3] = newMinOpenerIdx;
}
}
}
function link_pairs(state) {
const tokens_meta = state.tokens_meta;
const max = state.tokens_meta.length;
processDelimiters(state.delimiters);
for (let curr = 0; curr < max; curr++) {
if (tokens_meta[curr] && tokens_meta[curr].delimiters) {
processDelimiters(tokens_meta[curr].delimiters);
}
}
}
// Clean up tokens after emphasis and strikethrough postprocessing:
// merge adjacent text nodes into one and re-calculate all token levels
// This is necessary because initially emphasis delimiter markers (*, _, ~)
// are treated as their own separate text tokens. Then emphasis rule either
// leaves them as text (needed to merge with adjacent text) or turns them
// into opening/closing tags (which messes up levels inside).
function fragments_join(state) {
let curr, last;
let level = 0;
const tokens = state.tokens;
const max = state.tokens.length;
for (curr = last = 0; curr < max; curr++) {
// re-calculate levels after emphasis/strikethrough turns some text nodes
// into opening/closing tags
if (tokens[curr].nesting < 0) level--;
// closing tag
tokens[curr].level = level;
if (tokens[curr].nesting > 0) level++;
// opening tag
if (tokens[curr].type === "text" && curr + 1 < max && tokens[curr + 1].type === "text") {
// collapse two adjacent text nodes
tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;
} else {
if (curr !== last) {
tokens[last] = tokens[curr];
}
last++;
}
}
if (curr !== last) {
tokens.length = last;
}
}
/** internal
* class ParserInline
*
* Tokenizes paragraph content.
**/
// Parser rules
const _rules = [ [ "text", text ], [ "linkify", linkify ], [ "newline", newline ], [ "escape", escape ], [ "backticks", backtick ], [ "strikethrough", r_strikethrough.tokenize ], [ "emphasis", r_emphasis.tokenize ], [ "link", link ], [ "image", image ], [ "autolink", autolink ], [ "html_inline", html_inline ], [ "entity", entity ] ];
// `rule2` ruleset was created specifically for emphasis/strikethrough
// post-processing and may be changed in the future.
// Don't use this for anything except pairs (plugins working with `balance_pairs`).
const _rules2 = [ [ "balance_pairs", link_pairs ], [ "strikethrough", r_strikethrough.postProcess ], [ "emphasis", r_emphasis.postProcess ],
// rules for pairs separate '**' into its own text tokens, which may be left unused,
// rule below merges unused segments back with the rest of the text
[ "fragments_join", fragments_join ] ];
/**
* new ParserInline()
**/ function ParserInline() {
/**
* ParserInline#ruler -> Ruler
*
* [[Ruler]] instance. Keep configuration of inline rules.
**/
this.ruler = new Ruler;
for (let i = 0; i < _rules.length; i++) {
this.ruler.push(_rules[i][0], _rules[i][1]);
}
/**
* ParserInline#ruler2 -> Ruler
*
* [[Ruler]] instance. Second ruler used for post-processing
* (e.g. in emphasis-like rules).
**/ this.ruler2 = new Ruler;
for (let i = 0; i < _rules2.length; i++) {
this.ruler2.push(_rules2[i][0], _rules2[i][1]);
}
}
// Skip single token by running all rules in validation mode;
// returns `true` if any rule reported success
ParserInline.prototype.skipToken = function(state) {
const pos = state.pos;
const rules = this.ruler.getRules("");
const len = rules.length;
const maxNesting = state.md.options.maxNesting;
const cache = state.cache;
if (typeof cache[pos] !== "undefined") {
state.pos = cache[pos];
return;
}
let ok = false;
if (state.level < maxNesting) {
for (let i = 0; i < len; i++) {
// Increment state.level and decrement it later to limit recursion.
// It's harmless to do here, because no tokens are created. But ideally,
// we'd need a separate private state variable for this purpose.
state.level++;
ok = rules[i](state, true);
state.level--;
if (ok) {
if (pos >= state.pos) {
throw new Error("inline rule didn't increment state.pos");
}
break;
}
}
} else {
// Too much nesting, just skip until the end of the paragraph.
// NOTE: this will cause links to behave incorrectly in the following case,
// when an amount of `[` is exactly equal to `maxNesting + 1`:
// [[[[[[[[[[[[[[[[[[[[[foo]()
// TODO: remove this workaround when CM standard will allow nested links
// (we can replace it by preventing links from being parsed in
// validation mode)
state.pos = state.posMax;
}
if (!ok) {
state.pos++;
}
cache[pos] = state.pos;
};
// Generate tokens for input range
ParserInline.prototype.tokenize = function(state) {
const rules = this.ruler.getRules("");
const len = rules.length;
const end = state.posMax;
const maxNesting = state.md.options.maxNesting;
while (state.pos < end) {
// Try all possible rules.
// On success, rule should:
// - update `state.pos`
// - update `state.tokens`
// - return true
const prevPos = state.pos;
let ok = false;
if (state.level < maxNesting) {
for (let i = 0; i < len; i++) {
ok = rules[i](state, false);
if (ok) {
if (prevPos >= state.pos) {
throw new Error("inline rule didn't increment state.pos");
}
break;
}
}
}
if (ok) {
if (state.pos >= end) {
break;
}
continue;
}
state.pending += state.src[state.pos++];
}
if (state.pending) {
state.pushPending();
}
};
/**
* ParserInline.parse(str, md, env, outTokens)
*
* Process input string and push inline tokens into `outTokens`
**/ ParserInline.prototype.parse = function(str, md, env, outTokens) {
const state = new this.State(str, md, env, outTokens);
this.tokenize(state);
const rules = this.ruler2.getRules("");
const len = rules.length;
for (let i = 0; i < len; i++) {
rules[i](state);
}
};
ParserInline.prototype.State = StateInline;
function reFactory(opts) {
const re = {};
opts = opts || {};
re.src_Any = Any.source;
re.src_Cc = Cc.source;
re.src_Z = Z.source;
re.src_P = P.source;
// \p{\Z\P\Cc\CF} (white spaces + control + format + punctuation)
re.src_ZPCc = [ re.src_Z, re.src_P, re.src_Cc ].join("|");
// \p{\Z\Cc} (white spaces + control)
re.src_ZCc = [ re.src_Z, re.src_Cc ].join("|");
// Experimental. List of chars, completely prohibited in links
// because can separate it from other part of text
const text_separators = "[><\uff5c]";
// All possible word characters (everything without punctuation, spaces & controls)
// Defined via punctuation & spaces to save space
// Should be something like \p{\L\N\S\M} (\w but without `_`)
re.src_pseudo_letter = "(?:(?!" + text_separators + "|" + re.src_ZPCc + ")" + re.src_Any + ")";
// The same as abothe but without [0-9]
// var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCc + ')' + src_Any + ')';
re.src_ip4 = "(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)";
// Prohibit any of "@/[]()" in user/pass to avoid wrong domain fetch.
re.src_auth = "(?:(?:(?!" + re.src_ZCc + "|[@/\\[\\]()]).)+@)?";
re.src_port = "(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?";
re.src_host_terminator = "(?=$|" + text_separators + "|" + re.src_ZPCc + ")" + "(?!" + (opts["---"] ? "-(?!--)|" : "-|") + "_|:\\d|\\.-|\\.(?!$|" + re.src_ZPCc + "))";
re.src_path = "(?:" + "[/?#]" + "(?:" + "(?!" + re.src_ZCc + "|" + text_separators + "|[()[\\]{}.,\"'?!\\-;]).|" + "\\[(?:(?!" + re.src_ZCc + "|\\]).)*\\]|" + "\\((?:(?!" + re.src_ZCc + "|[)]).)*\\)|" + "\\{(?:(?!" + re.src_ZCc + "|[}]).)*\\}|" + '\\"(?:(?!' + re.src_ZCc + '|["]).)+\\"|' + "\\'(?:(?!" + re.src_ZCc + "|[']).)+\\'|" +
// allow `I'm_king` if no pair found
"\\'(?=" + re.src_pseudo_letter + "|[-])|" +
// google has many dots in "google search" links (#66, #81).
// github has ... in commit range links,
// Restrict to
// - english
// - percent-encoded
// - parts of file path
// - params separator
// until more examples found.
"\\.{2,}[a-zA-Z0-9%/&]|" + "\\.(?!" + re.src_ZCc + "|[.]|$)|" + (opts["---"] ? "\\-(?!--(?:[^-]|$))(?:-*)|" : "\\-+|") +
// allow `,,,` in paths
",(?!" + re.src_ZCc + "|$)|" +
// allow `;` if not followed by space-like char
";(?!" + re.src_ZCc + "|$)|" +
// allow `!!!` in paths, but not at the end
"\\!+(?!" + re.src_ZCc + "|[!]|$)|" + "\\?(?!" + re.src_ZCc + "|[?]|$)" + ")+" + "|\\/" + ")?";
// Allow anything in markdown spec, forbid quote (") at the first position
// because emails enclosed in quotes are far more common
re.src_email_name = '[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*';
re.src_xn = "xn--[a-z0-9\\-]{1,59}";
// More to read about domain names
// http://serverfault.com/questions/638260/
re.src_domain_root =
// Allow letters & digits (http://test1)
"(?:" + re.src_xn + "|" + re.src_pseudo_letter + "{1,63}" + ")";
re.src_domain = "(?:" + re.src_xn + "|" + "(?:" + re.src_pseudo_letter + ")" + "|" + "(?:" + re.src_pseudo_letter + "(?:-|" + re.src_pseudo_letter + "){0,61}" + re.src_pseudo_letter + ")" + ")";
re.src_host = "(?:" +
// Don't need IP check, because digits are already allowed in normal domain names
// src_ip4 +
// '|' +
"(?:(?:(?:" + re.src_domain + ")\\.)*" + re.src_domain /* _root */ + ")" + ")";
re.tpl_host_fuzzy = "(?:" + re.src_ip4 + "|" + "(?:(?:(?:" + re.src_domain + ")\\.)+(?:%TLDS%))" + ")";
re.tpl_host_no_ip_fuzzy = "(?:(?:(?:" + re.src_domain + ")\\.)+(?:%TLDS%))";
re.src_host_strict = re.src_host + re.src_host_terminator;
re.tpl_host_fuzzy_strict = re.tpl_host_fuzzy + re.src_host_terminator;
re.src_host_port_strict = re.src_host + re.src_port + re.src_host_terminator;
re.tpl_host_port_fuzzy_strict = re.tpl_host_fuzzy + re.src_port + re.src_host_terminator;
re.tpl_host_port_no_ip_fuzzy_strict = re.tpl_host_no_ip_fuzzy + re.src_port + re.src_host_terminator;
// Main rules
// Rude test fuzzy links by host, for quick deny
re.tpl_host_fuzzy_test = "localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:" + re.src_ZPCc + "|>|$))";
re.tpl_email_fuzzy = "(^|" + text_separators + '|"|\\(|' + re.src_ZCc + ")" + "(" + re.src_email_name + "@" + re.tpl_host_fuzzy_strict + ")";
re.tpl_link_fuzzy =
// Fuzzy link can't be prepended with .:/\- and non punctuation.
// but can start with > (markdown blockquote)
"(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|" + re.src_ZPCc + "))" + "((?![$+<=>^`|\uff5c])" + re.tpl_host_port_fuzzy_strict + re.src_path + ")";
re.tpl_link_no_ip_fuzzy =
// Fuzzy link can't be prepended with .:/\- and non punctuation.
// but can start with > (markdown blockquote)
"(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|" + re.src_ZPCc + "))" + "((?![$+<=>^`|\uff5c])" + re.tpl_host_port_no_ip_fuzzy_strict + re.src_path + ")";
return re;
}
// Helpers
// Merge objects
function assign(obj /* from1, from2, from3, ... */) {
const sources = Array.prototype.slice.call(arguments, 1);
sources.forEach((function(source) {
if (!source) {
return;
}
Object.keys(source).forEach((function(key) {
obj[key] = source[key];
}));
}));
return obj;
}
function _class(obj) {
return Object.prototype.toString.call(obj);
}
function isString(obj) {
return _class(obj) === "[object String]";
}
function isObject(obj) {
return _class(obj) === "[object Object]";
}
function isRegExp(obj) {
return _class(obj) === "[object RegExp]";
}
function isFunction(obj) {
return _class(obj) === "[object Function]";
}
function escapeRE(str) {
return str.replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&");
}
const defaultOptions = {
fuzzyLink: true,
fuzzyEmail: true,
fuzzyIP: false
};
function isOptionsObj(obj) {
return Object.keys(obj || {}).reduce((function(acc, k) {
/* eslint-disable-next-line no-prototype-builtins */
return acc || defaultOptions.hasOwnProperty(k);
}), false);
}
const defaultSchemas = {
"http:": {
validate: function(text, pos, self) {
const tail = text.slice(pos);
if (!self.re.http) {
// compile lazily, because "host"-containing variables can change on tlds update.
self.re.http = new RegExp("^\\/\\/" + self.re.src_auth + self.re.src_host_port_strict + self.re.src_path, "i");
}
if (self.re.http.test(tail)) {
return tail.match(self.re.http)[0].length;
}
return 0;
}
},
"https:": "http:",
"ftp:": "http:",
"//": {
validate: function(text, pos, self) {
const tail = text.slice(pos);
if (!self.re.no_http) {
// compile lazily, because "host"-containing variables can change on tlds update.
self.re.no_http = new RegExp("^" + self.re.src_auth +
// Don't allow single-level domains, because of false positives like '//test'
// with code comments
"(?:localhost|(?:(?:" + self.re.src_domain + ")\\.)+" + self.re.src_domain_root + ")" + self.re.src_port + self.re.src_host_terminator + self.re.src_path, "i");
}
if (self.re.no_http.test(tail)) {
// should not be `://` & `///`, that protects from errors in protocol name
if (pos >= 3 && text[pos - 3] === ":") {
return 0;
}
if (pos >= 3 && text[pos - 3] === "/") {
return 0;
}
return tail.match(self.re.no_http)[0].length;
}
return 0;
}
},
"mailto:": {
validate: function(text, pos, self) {
const tail = text.slice(pos);
if (!self.re.mailto) {
self.re.mailto = new RegExp("^" + self.re.src_email_name + "@" + self.re.src_host_strict, "i");
}
if (self.re.mailto.test(tail)) {
return tail.match(self.re.mailto)[0].length;
}
return 0;
}
}
};
// RE pattern for 2-character tlds (autogenerated by ./support/tlds_2char_gen.js)
/* eslint-disable-next-line max-len */ const tlds_2ch_src_re = "a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]";
// DON'T try to make PRs with changes. Extend TLDs with LinkifyIt.tlds() instead
const tlds_default = "biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");
function resetScanCache(self) {
self.__index__ = -1;
self.__text_cache__ = "";
}
function createValidator(re) {
return function(text, pos) {
const tail = text.slice(pos);
if (re.test(tail)) {
return tail.match(re)[0].length;
}
return 0;
};
}
function createNormalizer() {
return function(match, self) {
self.normalize(match);
};
}
// Schemas compiler. Build regexps.
function compile(self) {
// Load & clone RE patterns.
const re = self.re = reFactory(self.__opts__);
// Define dynamic patterns
const tlds = self.__tlds__.slice();
self.onCompile();
if (!self.__tlds_replaced__) {
tlds.push(tlds_2ch_src_re);
}
tlds.push(re.src_xn);
re.src_tlds = tlds.join("|");
function untpl(tpl) {
return tpl.replace("%TLDS%", re.src_tlds);
}
re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), "i");
re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), "i");
re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), "i");
re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), "i");
// Compile each schema
const aliases = [];
self.__compiled__ = {};
// Reset compiled data
function schemaError(name, val) {
throw new Error('(LinkifyIt) Invalid schema "' + name + '": ' + val);
}
Object.keys(self.__schemas__).forEach((function(name) {
const val = self.__schemas__[name];
// skip disabled methods
if (val === null) {
return;
}
const compiled = {
validate: null,
link: null
};
self.__compiled__[name] = compiled;
if (isObject(val)) {
if (isRegExp(val.validate)) {
compiled.validate = createValidator(val.validate);
} else if (isFunction(val.validate)) {
compiled.validate = val.validate;
} else {
schemaError(name, val);
}
if (isFunction(val.normalize)) {
compiled.normalize = val.normalize;
} else if (!val.normalize) {
compiled.normalize = createNormalizer();
} else {
schemaError(name, val);
}
return;
}
if (isString(val)) {
aliases.push(name);
return;
}
schemaError(name, val);
}));
// Compile postponed aliases
aliases.forEach((function(alias) {
if (!self.__compiled__[self.__schemas__[alias]]) {
// Silently fail on missed schemas to avoid errons on disable.
// schemaError(alias, self.__schemas__[alias]);
return;
}
self.__compiled__[alias].validate = self.__compiled__[self.__schemas__[alias]].validate;
self.__compiled__[alias].normalize = self.__compiled__[self.__schemas__[alias]].normalize;
}));
// Fake record for guessed links
self.__compiled__[""] = {
validate: null,
normalize: createNormalizer()
};
// Build schema condition
const slist = Object.keys(self.__compiled__).filter((function(name) {
// Filter disabled & fake schemas
return name.length > 0 && self.__compiled__[name];
})).map(escapeRE).join("|");
// (?!_) cause 1.5x slowdown
self.re.schema_test = RegExp("(^|(?!_)(?:[><\uff5c]|" + re.src_ZPCc + "))(" + slist + ")", "i");
self.re.schema_search = RegExp("(^|(?!_)(?:[><\uff5c]|" + re.src_ZPCc + "))(" + slist + ")", "ig");
self.re.schema_at_start = RegExp("^" + self.re.schema_search.source, "i");
self.re.pretest = RegExp("(" + self.re.schema_test.source + ")|(" + self.re.host_fuzzy_test.source + ")|@", "i");
// Cleanup
resetScanCache(self);
}
/**
* class Match
*
* Match result. Single element of array, returned by [[LinkifyIt#match]]
**/ function Match(self, shift) {
const start = self.__index__;
const end = self.__last_index__;
const text = self.__text_cache__.slice(start, end);
/**
* Match#schema -> String
*
* Prefix (protocol) for matched string.
**/ this.schema = self.__schema__.toLowerCase();
/**
* Match#index -> Number
*
* First position of matched string.
**/ this.index = start + shift;
/**
* Match#lastIndex -> Number
*
* Next position after matched string.
**/ this.lastIndex = end + shift;
/**
* Match#raw -> String
*
* Matched string.
**/ this.raw = text;
/**
* Match#text -> String
*
* Notmalized text of matched string.
**/ this.text = text;
/**
* Match#url -> String
*
* Normalized url of matched string.
**/ this.url = text;
}
function createMatch(self, shift) {
const match = new Match(self, shift);
self.__compiled__[match.schema].normalize(match, self);
return match;
}
/**
* class LinkifyIt
**/
/**
* new LinkifyIt(schemas, options)
* - schemas (Object): Optional. Additional schemas to validate (prefix/validator)
* - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }
*
* Creates new linkifier instance with optional additional schemas.
* Can be called without `new` keyword for convenience.
*
* By default understands:
*
* - `http(s)://...` , `ftp://...`, `mailto:...` & `//...` links
* - "fuzzy" links and emails (example.com, [email protected]).
*
* `schemas` is an object, where each key/value describes protocol/rule:
*
* - __key__ - link prefix (usually, protocol name with `:` at the end, `skype:`
* for example). `linkify-it` makes shure that prefix is not preceeded with
* alphanumeric char and symbols. Only whitespaces and punctuation allowed.
* - __value__ - rule to check tail after link prefix
* - _String_ - just alias to existing rule
* - _Object_
* - _validate_ - validator function (should return matched length on success),
* or `RegExp`.
* - _normalize_ - optional function to normalize text & url of matched result
* (for example, for @twitter mentions).
*
* `options`:
*
* - __fuzzyLink__ - recognige URL-s without `http(s):` prefix. Default `true`.
* - __fuzzyIP__ - allow IPs in fuzzy links above. Can conflict with some texts
* like version numbers. Default `false`.
* - __fuzzyEmail__ - recognize emails without `mailto:` prefix.
*
**/ function LinkifyIt(schemas, options) {
if (!(this instanceof LinkifyIt)) {
return new LinkifyIt(schemas, options);
}
if (!options) {
if (isOptionsObj(schemas)) {
options = schemas;
schemas = {};
}
}
this.__opts__ = assign({}, defaultOptions, options);
// Cache last tested result. Used to skip repeating steps on next `match` call.
this.__index__ = -1;
this.__last_index__ = -1;
// Next scan position
this.__schema__ = "";
this.__text_cache__ = "";
this.__schemas__ = assign({}, defaultSchemas, schemas);
this.__compiled__ = {};
this.__tlds__ = tlds_default;
this.__tlds_replaced__ = false;
this.re = {};
compile(this);
}
/** chainable
* LinkifyIt#add(schema, definition)
* - schema (String): rule name (fixed pattern prefix)
* - definition (String|RegExp|Object): schema definition
*
* Add new rule definition. See constructor description for details.
**/ LinkifyIt.prototype.add = function add(schema, definition) {
this.__schemas__[schema] = definition;
compile(this);
return this;
};
/** chainable
* LinkifyIt#set(options)
* - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }
*
* Set recognition options for links without schema.
**/ LinkifyIt.prototype.set = function set(options) {
this.__opts__ = assign(this.__opts__, options);
return this;
};
/**
* LinkifyIt#test(text) -> Boolean
*
* Searches linkifiable pattern and returns `true` on success or `false` on fail.
**/ LinkifyIt.prototype.test = function test(text) {
// Reset scan cache
this.__text_cache__ = text;
this.__index__ = -1;
if (!text.length) {
return false;
}
let m, ml, me, len, shift, next, re, tld_pos, at_pos;
// try to scan for link with schema - that's the most simple rule
if (this.re.schema_test.test(text)) {
re = this.re.schema_search;
re.lastIndex = 0;
while ((m = re.exec(text)) !== null) {
len = this.testSchemaAt(text, m[2], re.lastIndex);
if (len) {
this.__schema__ = m[2];
this.__index__ = m.index + m[1].length;
this.__last_index__ = m.index + m[0].length + len;
break;
}
}
}
if (this.__opts__.fuzzyLink && this.__compiled__["http:"]) {
// guess schemaless links
tld_pos = text.search(this.re.host_fuzzy_test);
if (tld_pos >= 0) {
// if tld is located after found link - no need to check fuzzy pattern
if (this.__index__ < 0 || tld_pos < this.__index__) {
if ((ml = text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) {
shift = ml.index + ml[1].length;
if (this.__index__ < 0 || shift < this.__index__) {
this.__schema__ = "";
this.__index__ = shift;
this.__last_index__ = ml.index + ml[0].length;
}
}
}
}
}
if (this.__opts__.fuzzyEmail && this.__compiled__["mailto:"]) {
// guess schemaless emails
at_pos = text.indexOf("@");
if (at_pos >= 0) {
// We can't skip this check, because this cases are possible:
// [email protected], [email protected]
if ((me = text.match(this.re.email_fuzzy)) !== null) {
shift = me.index + me[1].length;
next = me.index + me[0].length;
if (this.__index__ < 0 || shift < this.__index__ || shift === this.__index__ && next > this.__last_index__) {
this.__schema__ = "mailto:";
this.__index__ = shift;
this.__last_index__ = next;
}
}
}
}
return this.__index__ >= 0;
};
/**
* LinkifyIt#pretest(text) -> Boolean
*
* Very quick check, that can give false positives. Returns true if link MAY BE
* can exists. Can be used for speed optimization, when you need to check that
* link NOT exists.
**/ LinkifyIt.prototype.pretest = function pretest(text) {
return this.re.pretest.test(text);
};
/**
* LinkifyIt#testSchemaAt(text, name, position) -> Number
* - text (String): text to scan
* - name (String): rule (schema) name
* - position (Number): text offset to check from
*
* Similar to [[LinkifyIt#test]] but checks only specific protocol tail exactly
* at given position. Returns length of found pattern (0 on fail).
**/ LinkifyIt.prototype.testSchemaAt = function testSchemaAt(text, schema, pos) {
// If not supported schema check requested - terminate
if (!this.__compiled__[schema.toLowerCase()]) {
return 0;
}
return this.__compiled__[schema.toLowerCase()].validate(text, pos, this);
};
/**
* LinkifyIt#match(text) -> Array|null
*
* Returns array of found link descriptions or `null` on fail. We strongly
* recommend to use [[LinkifyIt#test]] first, for best speed.
*
* ##### Result match description
*
* - __schema__ - link schema, can be empty for fuzzy links, or `//` for
* protocol-neutral links.
* - __index__ - offset of matched text
* - __lastIndex__ - index of next char after mathch end
* - __raw__ - matched text
* - __text__ - normalized text
* - __url__ - link, generated from matched text
**/ LinkifyIt.prototype.match = function match(text) {
const result = [];
let shift = 0;
// Try to take previous element from cache, if .test() called before
if (this.__index__ >= 0 && this.__text_cache__ === text) {
result.push(createMatch(this, shift));
shift = this.__last_index__;
}
// Cut head if cache was used
let tail = shift ? text.slice(shift) : text;
// Scan string until end reached
while (this.test(tail)) {
result.push(createMatch(this, shift));
tail = tail.slice(this.__last_index__);
shift += this.__last_index__;
}
if (result.length) {
return result;
}
return null;
};
/**
* LinkifyIt#matchAtStart(text) -> Match|null
*
* Returns fully-formed (not fuzzy) link if it starts at the beginning
* of the string, and null otherwise.
**/ LinkifyIt.prototype.matchAtStart = function matchAtStart(text) {
// Reset scan cache
this.__text_cache__ = text;
this.__index__ = -1;
if (!text.length) return null;
const m = this.re.schema_at_start.exec(text);
if (!m) return null;
const len = this.testSchemaAt(text, m[2], m[0].length);
if (!len) return null;
this.__schema__ = m[2];
this.__index__ = m.index + m[1].length;
this.__last_index__ = m.index + m[0].length + len;
return createMatch(this, 0);
};
/** chainable
* LinkifyIt#tlds(list [, keepOld]) -> this
* - list (Array): list of tlds
* - keepOld (Boolean): merge with current list if `true` (`false` by default)
*
* Load (or merge) new tlds list. Those are user for fuzzy links (without prefix)
* to avoid false positives. By default this algorythm used:
*
* - hostname with any 2-letter root zones are ok.
* - biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф
* are ok.
* - encoded (`xn--...`) root zones are ok.
*
* If list is replaced, then exact match for 2-chars root zones will be checked.
**/ LinkifyIt.prototype.tlds = function tlds(list, keepOld) {
list = Array.isArray(list) ? list : [ list ];
if (!keepOld) {
this.__tlds__ = list.slice();
this.__tlds_replaced__ = true;
compile(this);
return this;
}
this.__tlds__ = this.__tlds__.concat(list).sort().filter((function(el, idx, arr) {
return el !== arr[idx - 1];
})).reverse();
compile(this);
return this;
};
/**
* LinkifyIt#normalize(match)
*
* Default normalizer (if schema does not define it's own).
**/ LinkifyIt.prototype.normalize = function normalize(match) {
// Do minimal possible changes by default. Need to collect feedback prior
// to move forward https://github.com/markdown-it/linkify-it/issues/1
if (!match.schema) {
match.url = "http://" + match.url;
}
if (match.schema === "mailto:" && !/^mailto:/i.test(match.url)) {
match.url = "mailto:" + match.url;
}
};
/**
* LinkifyIt#onCompile()
*
* Override to modify basic RegExp-s.
**/ LinkifyIt.prototype.onCompile = function onCompile() {};
/** Highest positive signed 32-bit float value */ const maxInt = 2147483647;
// aka. 0x7FFFFFFF or 2^31-1
/** Bootstring parameters */ const base = 36;
const tMin = 1;
const tMax = 26;
const skew = 38;
const damp = 700;
const initialBias = 72;
const initialN = 128;
// 0x80
const delimiter = "-";
// '\x2D'
/** Regular expressions */ const regexPunycode = /^xn--/;
const regexNonASCII = /[^\0-\x7F]/;
// Note: U+007F DEL is excluded too.
const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g;
// RFC 3490 separators
/** Error messages */ const errors = {
overflow: "Overflow: input needs wider integers to process",
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
"invalid-input": "Invalid input"
};
/** Convenience shortcuts */ const baseMinusTMin = base - tMin;
const floor = Math.floor;
const stringFromCharCode = String.fromCharCode;
/*--------------------------------------------------------------------------*/
/**
* A generic error utility function.
* @private
* @param {String} type The error type.
* @returns {Error} Throws a `RangeError` with the applicable error message.
*/ function error(type) {
throw new RangeError(errors[type]);
}
/**
* A generic `Array#map` utility function.
* @private
* @param {Array} array The array to iterate over.
* @param {Function} callback The function that gets called for every array
* item.
* @returns {Array} A new array of values returned by the callback function.
*/ function map(array, callback) {
const result = [];
let length = array.length;
while (length--) {
result[length] = callback(array[length]);
}
return result;
}
/**
* A simple `Array#map`-like wrapper to work with domain name strings or email
* addresses.
* @private
* @param {String} domain The domain name or email address.
* @param {Function} callback The function that gets called for every
* character.
* @returns {String} A new string of characters returned by the callback
* function.
*/ function mapDomain(domain, callback) {
const parts = domain.split("@");
let result = "";
if (parts.length > 1) {
// In email addresses, only the domain name should be punycoded. Leave
// the local part (i.e. everything up to `@`) intact.
result = parts[0] + "@";
domain = parts[1];
}
// Avoid `split(regex)` for IE8 compatibility. See #17.
domain = domain.replace(regexSeparators, ".");
const labels = domain.split(".");
const encoded = map(labels, callback).join(".");
return result + encoded;
}
/**
* Creates an array containing the numeric code points of each Unicode
* character in the string. While JavaScript uses UCS-2 internally,
* this function will convert a pair of surrogate halves (each of which
* UCS-2 exposes as separate characters) into a single code point,
* matching UTF-16.
* @see `punycode.ucs2.encode`
* @see <https://mathiasbynens.be/notes/javascript-encoding>
* @memberOf punycode.ucs2
* @name decode
* @param {String} string The Unicode input string (UCS-2).
* @returns {Array} The new array of code points.
*/ function ucs2decode(string) {
const output = [];
let counter = 0;
const length = string.length;
while (counter < length) {
const value = string.charCodeAt(counter++);
if (value >= 55296 && value <= 56319 && counter < length) {
// It's a high surrogate, and there is a next character.
const extra = string.charCodeAt(counter++);
if ((extra & 64512) == 56320) {
// Low surrogate.
output.push(((value & 1023) << 10) + (extra & 1023) + 65536);
} else {
// It's an unmatched surrogate; only append this code unit, in case the
// next code unit is the high surrogate of a surrogate pair.
output.push(value);
counter--;
}
} else {
output.push(value);
}
}
return output;
}
/**
* Creates a string based on an array of numeric code points.
* @see `punycode.ucs2.decode`
* @memberOf punycode.ucs2
* @name encode
* @param {Array} codePoints The array of numeric code points.
* @returns {String} The new Unicode string (UCS-2).
*/ const ucs2encode = codePoints => String.fromCodePoint(...codePoints)
/**
* Converts a basic code point into a digit/integer.
* @see `digitToBasic()`
* @private
* @param {Number} codePoint The basic numeric code point value.
* @returns {Number} The numeric value of a basic code point (for use in
* representing integers) in the range `0` to `base - 1`, or `base` if
* the code point does not represent a value.
*/;
const basicToDigit = function(codePoint) {
if (codePoint >= 48 && codePoint < 58) {
return 26 + (codePoint - 48);
}
if (codePoint >= 65 && codePoint < 91) {
return codePoint - 65;
}
if (codePoint >= 97 && codePoint < 123) {
return codePoint - 97;
}
return base;
};
/**
* Converts a digit/integer into a basic code point.
* @see `basicToDigit()`
* @private
* @param {Number} digit The numeric value of a basic code point.
* @returns {Number} The basic code point whose value (when used for
* representing integers) is `digit`, which needs to be in the range
* `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
* used; else, the lowercase form is used. The behavior is undefined
* if `flag` is non-zero and `digit` has no uppercase form.
*/ const digitToBasic = function(digit, flag) {
// 0..25 map to ASCII a..z or A..Z
// 26..35 map to ASCII 0..9
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
};
/**
* Bias adaptation function as per section 3.4 of RFC 3492.
* https://tools.ietf.org/html/rfc3492#section-3.4
* @private
*/ const adapt = function(delta, numPoints, firstTime) {
let k = 0;
delta = firstTime ? floor(delta / damp) : delta >> 1;
delta += floor(delta / numPoints);
for (;delta > baseMinusTMin * tMax >> 1; k += base) {
delta = floor(delta / baseMinusTMin);
}
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
};
/**
* Converts a Punycode string of ASCII-only symbols to a string of Unicode
* symbols.
* @memberOf punycode
* @param {String} input The Punycode string of ASCII-only symbols.
* @returns {String} The resulting string of Unicode symbols.
*/ const decode = function(input) {
// Don't use UCS-2.
const output = [];
const inputLength = input.length;
let i = 0;
let n = initialN;
let bias = initialBias;
// Handle the basic code points: let `basic` be the number of input code
// points before the last delimiter, or `0` if there is none, then copy
// the first basic code points to the output.
let basic = input.lastIndexOf(delimiter);
if (basic < 0) {
basic = 0;
}
for (let j = 0; j < basic; ++j) {
// if it's not a basic code point
if (input.charCodeAt(j) >= 128) {
error("not-basic");
}
output.push(input.charCodeAt(j));
}
// Main decoding loop: start just after the last delimiter if any basic code
// points were copied; start at the beginning otherwise.
for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; ) {
// `index` is the index of the next character to be consumed.
// Decode a generalized variable-length integer into `delta`,
// which gets added to `i`. The overflow checking is easier
// if we increase `i` as we go, then subtract off its starting
// value at the end to obtain `delta`.
const oldi = i;
for (let w = 1, k = base; ;k += base) {
if (index >= inputLength) {
error("invalid-input");
}
const digit = basicToDigit(input.charCodeAt(index++));
if (digit >= base) {
error("invalid-input");
}
if (digit > floor((maxInt - i) / w)) {
error("overflow");
}
i += digit * w;
const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
if (digit < t) {
break;
}
const baseMinusT = base - t;
if (w > floor(maxInt / baseMinusT)) {
error("overflow");
}
w *= baseMinusT;
}
const out = output.length + 1;
bias = adapt(i - oldi, out, oldi == 0);
// `i` was supposed to wrap around from `out` to `0`,
// incrementing `n` each time, so we'll fix that now:
if (floor(i / out) > maxInt - n) {
error("overflow");
}
n += floor(i / out);
i %= out;
// Insert `n` at position `i` of the output.
output.splice(i++, 0, n);
}
return String.fromCodePoint(...output);
};
/**
* Converts a string of Unicode symbols (e.g. a domain name label) to a
* Punycode string of ASCII-only symbols.
* @memberOf punycode
* @param {String} input The string of Unicode symbols.
* @returns {String} The resulting Punycode string of ASCII-only symbols.
*/ const encode = function(input) {
const output = [];
// Convert the input in UCS-2 to an array of Unicode code points.
input = ucs2decode(input);
// Cache the length.
const inputLength = input.length;
// Initialize the state.
let n = initialN;
let delta = 0;
let bias = initialBias;
// Handle the basic code points.
for (const currentValue of input) {
if (currentValue < 128) {
output.push(stringFromCharCode(currentValue));
}
}
const basicLength = output.length;
let handledCPCount = basicLength;
// `handledCPCount` is the number of code points that have been handled;
// `basicLength` is the number of basic code points.
// Finish the basic string with a delimiter unless it's empty.
if (basicLength) {
output.push(delimiter);
}
// Main encoding loop:
while (handledCPCount < inputLength) {
// All non-basic code points < n have been handled already. Find the next
// larger one:
let m = maxInt;
for (const currentValue of input) {
if (currentValue >= n && currentValue < m) {
m = currentValue;
}
}
// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
// but guard against overflow.
const handledCPCountPlusOne = handledCPCount + 1;
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
error("overflow");
}
delta += (m - n) * handledCPCountPlusOne;
n = m;
for (const currentValue of input) {
if (currentValue < n && ++delta > maxInt) {
error("overflow");
}
if (currentValue === n) {
// Represent delta as a generalized variable-length integer.
let q = delta;
for (let k = base; ;k += base) {
const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
if (q < t) {
break;
}
const qMinusT = q - t;
const baseMinusT = base - t;
output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));
q = floor(qMinusT / baseMinusT);
}
output.push(stringFromCharCode(digitToBasic(q, 0)));
bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);
delta = 0;
++handledCPCount;
}
}
++delta;
++n;
}
return output.join("");
};
/**
* Converts a Punycode string representing a domain name or an email address
* to Unicode. Only the Punycoded parts of the input will be converted, i.e.
* it doesn't matter if you call it on a string that has already been
* converted to Unicode.
* @memberOf punycode
* @param {String} input The Punycoded domain name or email address to
* convert to Unicode.
* @returns {String} The Unicode representation of the given Punycode
* string.
*/ const toUnicode = function(input) {
return mapDomain(input, (function(string) {
return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
}));
};
/**
* Converts a Unicode string representing a domain name or an email address to
* Punycode. Only the non-ASCII parts of the domain name will be converted,
* i.e. it doesn't matter if you call it with a domain that's already in
* ASCII.
* @memberOf punycode
* @param {String} input The domain name or email address to convert, as a
* Unicode string.
* @returns {String} The Punycode representation of the given domain name or
* email address.
*/ const toASCII = function(input) {
return mapDomain(input, (function(string) {
return regexNonASCII.test(string) ? "xn--" + encode(string) : string;
}));
};
/*--------------------------------------------------------------------------*/
/** Define the public API */ const punycode = {
/**
* A string representing the current Punycode.js version number.
* @memberOf punycode
* @type String
*/
version: "2.3.1",
/**
* An object of methods to convert from JavaScript's internal character
* representation (UCS-2) to Unicode code points, and back.
* @see <https://mathiasbynens.be/notes/javascript-encoding>
* @memberOf punycode
* @type Object
*/
ucs2: {
decode: ucs2decode,
encode: ucs2encode
},
decode: decode,
encode: encode,
toASCII: toASCII,
toUnicode: toUnicode
};
// markdown-it default options
var cfg_default = {
options: {
// Enable HTML tags in source
html: false,
// Use '/' to close single tags (<br />)
xhtmlOut: false,
// Convert '\n' in paragraphs into <br>
breaks: false,
// CSS language prefix for fenced blocks
langPrefix: "language-",
// autoconvert URL-like texts to links
linkify: false,
// Enable some language-neutral replacements + quotes beautification
typographer: false,
// Double + single quotes replacement pairs, when typographer enabled,
// and smartquotes on. Could be either a String or an Array.
// For example, you can use '«»„“' for Russian, '„“‚‘' for German,
// and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
quotes: "\u201c\u201d\u2018\u2019",
/* “”‘’ */
// Highlighter function. Should return escaped HTML,
// or '' if the source string is not changed and should be escaped externaly.
// If result starts with <pre... internal wrapper is skipped.
// function (/*str, lang*/) { return ''; }
highlight: null,
// Internal protection, recursion limit
maxNesting: 100
},
components: {
core: {},
block: {},
inline: {}
}
};
// "Zero" preset, with nothing enabled. Useful for manual configuring of simple
// modes. For example, to parse bold/italic only.
var cfg_zero = {
options: {
// Enable HTML tags in source
html: false,
// Use '/' to close single tags (<br />)
xhtmlOut: false,
// Convert '\n' in paragraphs into <br>
breaks: false,
// CSS language prefix for fenced blocks
langPrefix: "language-",
// autoconvert URL-like texts to links
linkify: false,
// Enable some language-neutral replacements + quotes beautification
typographer: false,
// Double + single quotes replacement pairs, when typographer enabled,
// and smartquotes on. Could be either a String or an Array.
// For example, you can use '«»„“' for Russian, '„“‚‘' for German,
// and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
quotes: "\u201c\u201d\u2018\u2019",
/* “”‘’ */
// Highlighter function. Should return escaped HTML,
// or '' if the source string is not changed and should be escaped externaly.
// If result starts with <pre... internal wrapper is skipped.
// function (/*str, lang*/) { return ''; }
highlight: null,
// Internal protection, recursion limit
maxNesting: 20
},
components: {
core: {
rules: [ "normalize", "block", "inline", "text_join" ]
},
block: {
rules: [ "paragraph" ]
},
inline: {
rules: [ "text" ],
rules2: [ "balance_pairs", "fragments_join" ]
}
}
};
// Commonmark default options
var cfg_commonmark = {
options: {
// Enable HTML tags in source
html: true,
// Use '/' to close single tags (<br />)
xhtmlOut: true,
// Convert '\n' in paragraphs into <br>
breaks: false,
// CSS language prefix for fenced blocks
langPrefix: "language-",
// autoconvert URL-like texts to links
linkify: false,
// Enable some language-neutral replacements + quotes beautification
typographer: false,
// Double + single quotes replacement pairs, when typographer enabled,
// and smartquotes on. Could be either a String or an Array.
// For example, you can use '«»„“' for Russian, '„“‚‘' for German,
// and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
quotes: "\u201c\u201d\u2018\u2019",
/* “”‘’ */
// Highlighter function. Should return escaped HTML,
// or '' if the source string is not changed and should be escaped externaly.
// If result starts with <pre... internal wrapper is skipped.
// function (/*str, lang*/) { return ''; }
highlight: null,
// Internal protection, recursion limit
maxNesting: 20
},
components: {
core: {
rules: [ "normalize", "block", "inline", "text_join" ]
},
block: {
rules: [ "blockquote", "code", "fence", "heading", "hr", "html_block", "lheading", "list", "reference", "paragraph" ]
},
inline: {
rules: [ "autolink", "backticks", "emphasis", "entity", "escape", "html_inline", "image", "link", "newline", "text" ],
rules2: [ "balance_pairs", "emphasis", "fragments_join" ]
}
}
};
// Main parser class
const config = {
default: cfg_default,
zero: cfg_zero,
commonmark: cfg_commonmark
};
// This validator can prohibit more than really needed to prevent XSS. It's a
// tradeoff to keep code simple and to be secure by default.
// If you need different setup - override validator method as you wish. Or
// replace it with dummy function and use external sanitizer.
const BAD_PROTO_RE = /^(vbscript|javascript|file|data):/;
const GOOD_DATA_RE = /^data:image\/(gif|png|jpeg|webp);/;
function validateLink(url) {
// url should be normalized at this point, and existing entities are decoded
const str = url.trim().toLowerCase();
return BAD_PROTO_RE.test(str) ? GOOD_DATA_RE.test(str) : true;
}
const RECODE_HOSTNAME_FOR = [ "http:", "https:", "mailto:" ];
function normalizeLink(url) {
const parsed = urlParse(url, true);
if (parsed.hostname) {
// Encode hostnames in urls like:
// `http://host/`, `https://host/`, `mailto:user@host`, `//host/`
// We don't encode unknown schemas, because it's likely that we encode
// something we shouldn't (e.g. `skype:name` treated as `skype:host`)
if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {
try {
parsed.hostname = punycode.toASCII(parsed.hostname);
} catch (er) {}
}
}
return encode$1(format(parsed));
}
function normalizeLinkText(url) {
const parsed = urlParse(url, true);
if (parsed.hostname) {
// Encode hostnames in urls like:
// `http://host/`, `https://host/`, `mailto:user@host`, `//host/`
// We don't encode unknown schemas, because it's likely that we encode
// something we shouldn't (e.g. `skype:name` treated as `skype:host`)
if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {
try {
parsed.hostname = punycode.toUnicode(parsed.hostname);
} catch (er) {}
}
}
// add '%' to exclude list because of https://github.com/markdown-it/markdown-it/issues/720
return decode$1(format(parsed), decode$1.defaultChars + "%");
}
/**
* class MarkdownIt
*
* Main parser/renderer class.
*
* ##### Usage
*
* ```javascript
* // node.js, "classic" way:
* var MarkdownIt = require('markdown-it'),
* md = new MarkdownIt();
* var result = md.render('# markdown-it rulezz!');
*
* // node.js, the same, but with sugar:
* var md = require('markdown-it')();
* var result = md.render('# markdown-it rulezz!');
*
* // browser without AMD, added to "window" on script load
* // Note, there are no dash.
* var md = window.markdownit();
* var result = md.render('# markdown-it rulezz!');
* ```
*
* Single line rendering, without paragraph wrap:
*
* ```javascript
* var md = require('markdown-it')();
* var result = md.renderInline('__markdown-it__ rulezz!');
* ```
**/
/**
* new MarkdownIt([presetName, options])
* - presetName (String): optional, `commonmark` / `zero`
* - options (Object)
*
* Creates parser instanse with given config. Can be called without `new`.
*
* ##### presetName
*
* MarkdownIt provides named presets as a convenience to quickly
* enable/disable active syntax rules and options for common use cases.
*
* - ["commonmark"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/commonmark.js) -
* configures parser to strict [CommonMark](http://commonmark.org/) mode.
* - [default](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/default.js) -
* similar to GFM, used when no preset name given. Enables all available rules,
* but still without html, typographer & autolinker.
* - ["zero"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.js) -
* all rules disabled. Useful to quickly setup your config via `.enable()`.
* For example, when you need only `bold` and `italic` markup and nothing else.
*
* ##### options:
*
* - __html__ - `false`. Set `true` to enable HTML tags in source. Be careful!
* That's not safe! You may need external sanitizer to protect output from XSS.
* It's better to extend features via plugins, instead of enabling HTML.
* - __xhtmlOut__ - `false`. Set `true` to add '/' when closing single tags
* (`<br />`). This is needed only for full CommonMark compatibility. In real
* world you will need HTML output.
* - __breaks__ - `false`. Set `true` to convert `\n` in paragraphs into `<br>`.
* - __langPrefix__ - `language-`. CSS language class prefix for fenced blocks.
* Can be useful for external highlighters.
* - __linkify__ - `false`. Set `true` to autoconvert URL-like text to links.
* - __typographer__ - `false`. Set `true` to enable [some language-neutral
* replacement](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.js) +
* quotes beautification (smartquotes).
* - __quotes__ - `“”‘’`, String or Array. Double + single quotes replacement
* pairs, when typographer enabled and smartquotes on. For example, you can
* use `'«»„“'` for Russian, `'„“‚‘'` for German, and
* `['«\xA0', '\xA0»', '‹\xA0', '\xA0›']` for French (including nbsp).
* - __highlight__ - `null`. Highlighter function for fenced code blocks.
* Highlighter `function (str, lang)` should return escaped HTML. It can also
* return empty string if the source was not changed and should be escaped
* externaly. If result starts with <pre... internal wrapper is skipped.
*
* ##### Example
*
* ```javascript
* // commonmark mode
* var md = require('markdown-it')('commonmark');
*
* // default mode
* var md = require('markdown-it')();
*
* // enable everything
* var md = require('markdown-it')({
* html: true,
* linkify: true,
* typographer: true
* });
* ```
*
* ##### Syntax highlighting
*
* ```js
* var hljs = require('highlight.js') // https://highlightjs.org/
*
* var md = require('markdown-it')({
* highlight: function (str, lang) {
* if (lang && hljs.getLanguage(lang)) {
* try {
* return hljs.highlight(str, { language: lang, ignoreIllegals: true }).value;
* } catch (__) {}
* }
*
* return ''; // use external default escaping
* }
* });
* ```
*
* Or with full wrapper override (if you need assign class to `<pre>` or `<code>`):
*
* ```javascript
* var hljs = require('highlight.js') // https://highlightjs.org/
*
* // Actual default values
* var md = require('markdown-it')({
* highlight: function (str, lang) {
* if (lang && hljs.getLanguage(lang)) {
* try {
* return '<pre><code class="hljs">' +
* hljs.highlight(str, { language: lang, ignoreIllegals: true }).value +
* '</code></pre>';
* } catch (__) {}
* }
*
* return '<pre><code class="hljs">' + md.utils.escapeHtml(str) + '</code></pre>';
* }
* });
* ```
*
**/ function MarkdownIt(presetName, options) {
if (!(this instanceof MarkdownIt)) {
return new MarkdownIt(presetName, options);
}
if (!options) {
if (!isString$1(presetName)) {
options = presetName || {};
presetName = "default";
}
}
/**
* MarkdownIt#inline -> ParserInline
*
* Instance of [[ParserInline]]. You may need it to add new rules when
* writing plugins. For simple rules control use [[MarkdownIt.disable]] and
* [[MarkdownIt.enable]].
**/ this.inline = new ParserInline;
/**
* MarkdownIt#block -> ParserBlock
*
* Instance of [[ParserBlock]]. You may need it to add new rules when
* writing plugins. For simple rules control use [[MarkdownIt.disable]] and
* [[MarkdownIt.enable]].
**/ this.block = new ParserBlock;
/**
* MarkdownIt#core -> Core
*
* Instance of [[Core]] chain executor. You may need it to add new rules when
* writing plugins. For simple rules control use [[MarkdownIt.disable]] and
* [[MarkdownIt.enable]].
**/ this.core = new Core;
/**
* MarkdownIt#renderer -> Renderer
*
* Instance of [[Renderer]]. Use it to modify output look. Or to add rendering
* rules for new token types, generated by plugins.
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')();
*
* function myToken(tokens, idx, options, env, self) {
* //...
* return result;
* };
*
* md.renderer.rules['my_token'] = myToken
* ```
*
* See [[Renderer]] docs and [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js).
**/ this.renderer = new Renderer;
/**
* MarkdownIt#linkify -> LinkifyIt
*
* [linkify-it](https://github.com/markdown-it/linkify-it) instance.
* Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.js)
* rule.
**/ this.linkify = new LinkifyIt;
/**
* MarkdownIt#validateLink(url) -> Boolean
*
* Link validation function. CommonMark allows too much in links. By default
* we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas
* except some embedded image types.
*
* You can change this behaviour:
*
* ```javascript
* var md = require('markdown-it')();
* // enable everything
* md.validateLink = function () { return true; }
* ```
**/ this.validateLink = validateLink;
/**
* MarkdownIt#normalizeLink(url) -> String
*
* Function used to encode link url to a machine-readable format,
* which includes url-encoding, punycode, etc.
**/ this.normalizeLink = normalizeLink;
/**
* MarkdownIt#normalizeLinkText(url) -> String
*
* Function used to decode link url to a human-readable format`
**/ this.normalizeLinkText = normalizeLinkText;
// Expose utils & helpers for easy acces from plugins
/**
* MarkdownIt#utils -> utils
*
* Assorted utility functions, useful to write plugins. See details
* [here](https://github.com/markdown-it/markdown-it/blob/master/lib/common/utils.mjs).
**/ this.utils = utils;
/**
* MarkdownIt#helpers -> helpers
*
* Link components parser functions, useful to write plugins. See details
* [here](https://github.com/markdown-it/markdown-it/blob/master/lib/helpers).
**/ this.helpers = assign$1({}, helpers);
this.options = {};
this.configure(presetName);
if (options) {
this.set(options);
}
}
/** chainable
* MarkdownIt.set(options)
*
* Set parser options (in the same format as in constructor). Probably, you
* will never need it, but you can change options after constructor call.
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')()
* .set({ html: true, breaks: true })
* .set({ typographer, true });
* ```
*
* __Note:__ To achieve the best possible performance, don't modify a
* `markdown-it` instance options on the fly. If you need multiple configurations
* it's best to create multiple instances and initialize each with separate
* config.
**/ MarkdownIt.prototype.set = function(options) {
assign$1(this.options, options);
return this;
};
/** chainable, internal
* MarkdownIt.configure(presets)
*
* Batch load of all options and compenent settings. This is internal method,
* and you probably will not need it. But if you will - see available presets
* and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets)
*
* We strongly recommend to use presets instead of direct config loads. That
* will give better compatibility with next versions.
**/ MarkdownIt.prototype.configure = function(presets) {
const self = this;
if (isString$1(presets)) {
const presetName = presets;
presets = config[presetName];
if (!presets) {
throw new Error('Wrong `markdown-it` preset "' + presetName + '", check name');
}
}
if (!presets) {
throw new Error("Wrong `markdown-it` preset, can't be empty");
}
if (presets.options) {
self.set(presets.options);
}
if (presets.components) {
Object.keys(presets.components).forEach((function(name) {
if (presets.components[name].rules) {
self[name].ruler.enableOnly(presets.components[name].rules);
}
if (presets.components[name].rules2) {
self[name].ruler2.enableOnly(presets.components[name].rules2);
}
}));
}
return this;
};
/** chainable
* MarkdownIt.enable(list, ignoreInvalid)
* - list (String|Array): rule name or list of rule names to enable
* - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
*
* Enable list or rules. It will automatically find appropriate components,
* containing rules with given names. If rule not found, and `ignoreInvalid`
* not set - throws exception.
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')()
* .enable(['sub', 'sup'])
* .disable('smartquotes');
* ```
**/ MarkdownIt.prototype.enable = function(list, ignoreInvalid) {
let result = [];
if (!Array.isArray(list)) {
list = [ list ];
}
[ "core", "block", "inline" ].forEach((function(chain) {
result = result.concat(this[chain].ruler.enable(list, true));
}), this);
result = result.concat(this.inline.ruler2.enable(list, true));
const missed = list.filter((function(name) {
return result.indexOf(name) < 0;
}));
if (missed.length && !ignoreInvalid) {
throw new Error("MarkdownIt. Failed to enable unknown rule(s): " + missed);
}
return this;
};
/** chainable
* MarkdownIt.disable(list, ignoreInvalid)
* - list (String|Array): rule name or list of rule names to disable.
* - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
*
* The same as [[MarkdownIt.enable]], but turn specified rules off.
**/ MarkdownIt.prototype.disable = function(list, ignoreInvalid) {
let result = [];
if (!Array.isArray(list)) {
list = [ list ];
}
[ "core", "block", "inline" ].forEach((function(chain) {
result = result.concat(this[chain].ruler.disable(list, true));
}), this);
result = result.concat(this.inline.ruler2.disable(list, true));
const missed = list.filter((function(name) {
return result.indexOf(name) < 0;
}));
if (missed.length && !ignoreInvalid) {
throw new Error("MarkdownIt. Failed to disable unknown rule(s): " + missed);
}
return this;
};
/** chainable
* MarkdownIt.use(plugin, params)
*
* Load specified plugin with given params into current parser instance.
* It's just a sugar to call `plugin(md, params)` with curring.
*
* ##### Example
*
* ```javascript
* var iterator = require('markdown-it-for-inline');
* var md = require('markdown-it')()
* .use(iterator, 'foo_replace', 'text', function (tokens, idx) {
* tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar');
* });
* ```
**/ MarkdownIt.prototype.use = function(plugin /*, params, ... */) {
const args = [ this ].concat(Array.prototype.slice.call(arguments, 1));
plugin.apply(plugin, args);
return this;
};
/** internal
* MarkdownIt.parse(src, env) -> Array
* - src (String): source string
* - env (Object): environment sandbox
*
* Parse input string and return list of block tokens (special token type
* "inline" will contain list of inline tokens). You should not call this
* method directly, until you write custom renderer (for example, to produce
* AST).
*
* `env` is used to pass data between "distributed" rules and return additional
* metadata like reference info, needed for the renderer. It also can be used to
* inject data in specific cases. Usually, you will be ok to pass `{}`,
* and then pass updated object to renderer.
**/ MarkdownIt.prototype.parse = function(src, env) {
if (typeof src !== "string") {
throw new Error("Input data should be a String");
}
const state = new this.core.State(src, this, env);
this.core.process(state);
return state.tokens;
};
/**
* MarkdownIt.render(src [, env]) -> String
* - src (String): source string
* - env (Object): environment sandbox
*
* Render markdown string into html. It does all magic for you :).
*
* `env` can be used to inject additional metadata (`{}` by default).
* But you will not need it with high probability. See also comment
* in [[MarkdownIt.parse]].
**/ MarkdownIt.prototype.render = function(src, env) {
env = env || {};
return this.renderer.render(this.parse(src, env), this.options, env);
};
/** internal
* MarkdownIt.parseInline(src, env) -> Array
* - src (String): source string
* - env (Object): environment sandbox
*
* The same as [[MarkdownIt.parse]] but skip all block rules. It returns the
* block tokens list with the single `inline` element, containing parsed inline
* tokens in `children` property. Also updates `env` object.
**/ MarkdownIt.prototype.parseInline = function(src, env) {
const state = new this.core.State(src, this, env);
state.inlineMode = true;
this.core.process(state);
return state.tokens;
};
/**
* MarkdownIt.renderInline(src [, env]) -> String
* - src (String): source string
* - env (Object): environment sandbox
*
* Similar to [[MarkdownIt.render]] but for single paragraph content. Result
* will NOT be wrapped into `<p>` tags.
**/ MarkdownIt.prototype.renderInline = function(src, env) {
env = env || {};
return this.renderer.render(this.parseInline(src, env), this.options, env);
};
return MarkdownIt;
}));
ABCABD// allow us to import this as a module
if (typeof define !== "undefined") {
define("handlebars", ["exports"], function (__exports__) {
// It might not be defined server side, which is OK for pretty-text
if (typeof Handlebars !== "undefined") {
// eslint-disable-next-line
__exports__.default = Handlebars;
__exports__.compile = function () {
// eslint-disable-next-line
return Handlebars.compile.apply(this, arguments);
};
}
});
define("handlebars-compiler", ["exports"], function (__exports__) {
// eslint-disable-next-line
__exports__.default = Handlebars.compile;
});
}
ABCABDtypeof window.markdownitABCABD(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
/**
* default settings
*
* @author Zongmin Lei<[email protected]>
*/
var FilterCSS = require("cssfilter").FilterCSS;
var getDefaultCSSWhiteList = require("cssfilter").getDefaultWhiteList;
var _ = require("./util");
function getDefaultWhiteList() {
return {
a: ["target", "href", "title"],
abbr: ["title"],
address: [],
area: ["shape", "coords", "href", "alt"],
article: [],
aside: [],
audio: [
"autoplay",
"controls",
"crossorigin",
"loop",
"muted",
"preload",
"src",
],
b: [],
bdi: ["dir"],
bdo: ["dir"],
big: [],
blockquote: ["cite"],
br: [],
caption: [],
center: [],
cite: [],
code: [],
col: ["align", "valign", "span", "width"],
colgroup: ["align", "valign", "span", "width"],
dd: [],
del: ["datetime"],
details: ["open"],
div: [],
dl: [],
dt: [],
em: [],
figcaption: [],
figure: [],
font: ["color", "size", "face"],
footer: [],
h1: [],
h2: [],
h3: [],
h4: [],
h5: [],
h6: [],
header: [],
hr: [],
i: [],
img: ["src", "alt", "title", "width", "height", "loading"],
ins: ["datetime"],
kbd: [],
li: [],
mark: [],
nav: [],
ol: [],
p: [],
pre: [],
s: [],
section: [],
small: [],
span: [],
sub: [],
summary: [],
sup: [],
strong: [],
strike: [],
table: ["width", "border", "align", "valign"],
tbody: ["align", "valign"],
td: ["width", "rowspan", "colspan", "align", "valign"],
tfoot: ["align", "valign"],
th: ["width", "rowspan", "colspan", "align", "valign"],
thead: ["align", "valign"],
tr: ["rowspan", "align", "valign"],
tt: [],
u: [],
ul: [],
video: [
"autoplay",
"controls",
"crossorigin",
"loop",
"muted",
"playsinline",
"poster",
"preload",
"src",
"height",
"width",
],
};
}
var defaultCSSFilter = new FilterCSS();
/**
* default onTag function
*
* @param {String} tag
* @param {String} html
* @param {Object} options
* @return {String}
*/
function onTag(tag, html, options) {
// do nothing
}
/**
* default onIgnoreTag function
*
* @param {String} tag
* @param {String} html
* @param {Object} options
* @return {String}
*/
function onIgnoreTag(tag, html, options) {
// do nothing
}
/**
* default onTagAttr function
*
* @param {String} tag
* @param {String} name
* @param {String} value
* @return {String}
*/
function onTagAttr(tag, name, value) {
// do nothing
}
/**
* default onIgnoreTagAttr function
*
* @param {String} tag
* @param {String} name
* @param {String} value
* @return {String}
*/
function onIgnoreTagAttr(tag, name, value) {
// do nothing
}
/**
* default escapeHtml function
*
* @param {String} html
*/
function escapeHtml(html) {
return html.replace(REGEXP_LT, "&lt;").replace(REGEXP_GT, "&gt;");
}
/**
* default safeAttrValue function
*
* @param {String} tag
* @param {String} name
* @param {String} value
* @param {Object} cssFilter
* @return {String}
*/
function safeAttrValue(tag, name, value, cssFilter) {
// unescape attribute value firstly
value = friendlyAttrValue(value);
if (name === "href" || name === "src") {
// filter `href` and `src` attribute
// only allow the value that starts with `http://` | `https://` | `mailto:` | `/` | `#`
value = _.trim(value);
if (value === "#") return "#";
if (
!(
value.substr(0, 7) === "http://" ||
value.substr(0, 8) === "https://" ||
value.substr(0, 7) === "mailto:" ||
value.substr(0, 4) === "tel:" ||
value.substr(0, 11) === "data:image/" ||
value.substr(0, 6) === "ftp://" ||
value.substr(0, 2) === "./" ||
value.substr(0, 3) === "../" ||
value[0] === "#" ||
value[0] === "/"
)
) {
return "";
}
} else if (name === "background") {
// filter `background` attribute (maybe no use)
// `javascript:`
REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex = 0;
if (REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value)) {
return "";
}
} else if (name === "style") {
// `expression()`
REGEXP_DEFAULT_ON_TAG_ATTR_7.lastIndex = 0;
if (REGEXP_DEFAULT_ON_TAG_ATTR_7.test(value)) {
return "";
}
// `url()`
REGEXP_DEFAULT_ON_TAG_ATTR_8.lastIndex = 0;
if (REGEXP_DEFAULT_ON_TAG_ATTR_8.test(value)) {
REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex = 0;
if (REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value)) {
return "";
}
}
if (cssFilter !== false) {
cssFilter = cssFilter || defaultCSSFilter;
value = cssFilter.process(value);
}
}
// escape `<>"` before returns
value = escapeAttrValue(value);
return value;
}
// RegExp list
var REGEXP_LT = /</g;
var REGEXP_GT = />/g;
var REGEXP_QUOTE = /"/g;
var REGEXP_QUOTE_2 = /&quot;/g;
var REGEXP_ATTR_VALUE_1 = /&#([a-zA-Z0-9]*);?/gim;
var REGEXP_ATTR_VALUE_COLON = /&colon;?/gim;
var REGEXP_ATTR_VALUE_NEWLINE = /&newline;?/gim;
// var REGEXP_DEFAULT_ON_TAG_ATTR_3 = /\/\*|\*\//gm;
var REGEXP_DEFAULT_ON_TAG_ATTR_4 =
/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi;
// var REGEXP_DEFAULT_ON_TAG_ATTR_5 = /^[\s"'`]*(d\s*a\s*t\s*a\s*)\:/gi;
// var REGEXP_DEFAULT_ON_TAG_ATTR_6 = /^[\s"'`]*(d\s*a\s*t\s*a\s*)\:\s*image\//gi;
var REGEXP_DEFAULT_ON_TAG_ATTR_7 =
/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi;
var REGEXP_DEFAULT_ON_TAG_ATTR_8 = /u\s*r\s*l\s*\(.*/gi;
/**
* escape double quote
*
* @param {String} str
* @return {String} str
*/
function escapeQuote(str) {
return str.replace(REGEXP_QUOTE, "&quot;");
}
/**
* unescape double quote
*
* @param {String} str
* @return {String} str
*/
function unescapeQuote(str) {
return str.replace(REGEXP_QUOTE_2, '"');
}
/**
* escape html entities
*
* @param {String} str
* @return {String}
*/
function escapeHtmlEntities(str) {
return str.replace(REGEXP_ATTR_VALUE_1, function replaceUnicode(str, code) {
return code[0] === "x" || code[0] === "X"
? String.fromCharCode(parseInt(code.substr(1), 16))
: String.fromCharCode(parseInt(code, 10));
});
}
/**
* escape html5 new danger entities
*
* @param {String} str
* @return {String}
*/
function escapeDangerHtml5Entities(str) {
return str
.replace(REGEXP_ATTR_VALUE_COLON, ":")
.replace(REGEXP_ATTR_VALUE_NEWLINE, " ");
}
/**
* clear nonprintable characters
*
* @param {String} str
* @return {String}
*/
function clearNonPrintableCharacter(str) {
var str2 = "";
for (var i = 0, len = str.length; i < len; i++) {
str2 += str.charCodeAt(i) < 32 ? " " : str.charAt(i);
}
return _.trim(str2);
}
/**
* get friendly attribute value
*
* @param {String} str
* @return {String}
*/
function friendlyAttrValue(str) {
str = unescapeQuote(str);
str = escapeHtmlEntities(str);
str = escapeDangerHtml5Entities(str);
str = clearNonPrintableCharacter(str);
return str;
}
/**
* unescape attribute value
*
* @param {String} str
* @return {String}
*/
function escapeAttrValue(str) {
str = escapeQuote(str);
str = escapeHtml(str);
return str;
}
/**
* `onIgnoreTag` function for removing all the tags that are not in whitelist
*/
function onIgnoreTagStripAll() {
return "";
}
/**
* remove tag body
* specify a `tags` list, if the tag is not in the `tags` list then process by the specify function (optional)
*
* @param {array} tags
* @param {function} next
*/
function StripTagBody(tags, next) {
if (typeof next !== "function") {
next = function () {};
}
var isRemoveAllTag = !Array.isArray(tags);
function isRemoveTag(tag) {
if (isRemoveAllTag) return true;
return _.indexOf(tags, tag) !== -1;
}
var removeList = [];
var posStart = false;
return {
onIgnoreTag: function (tag, html, options) {
if (isRemoveTag(tag)) {
if (options.isClosing) {
var ret = "[/removed]";
var end = options.position + ret.length;
removeList.push([
posStart !== false ? posStart : options.position,
end,
]);
posStart = false;
return ret;
} else {
if (!posStart) {
posStart = options.position;
}
return "[removed]";
}
} else {
return next(tag, html, options);
}
},
remove: function (html) {
var rethtml = "";
var lastPos = 0;
_.forEach(removeList, function (pos) {
rethtml += html.slice(lastPos, pos[0]);
lastPos = pos[1];
});
rethtml += html.slice(lastPos);
return rethtml;
},
};
}
/**
* remove html comments
*
* @param {String} html
* @return {String}
*/
function stripCommentTag(html) {
var retHtml = "";
var lastPos = 0;
while (lastPos < html.length) {
var i = html.indexOf("<!--", lastPos);
if (i === -1) {
retHtml += html.slice(lastPos);
break;
}
retHtml += html.slice(lastPos, i);
var j = html.indexOf("-->", i);
if (j === -1) {
break;
}
lastPos = j + 3;
}
return retHtml;
}
/**
* remove invisible characters
*
* @param {String} html
* @return {String}
*/
function stripBlankChar(html) {
var chars = html.split("");
chars = chars.filter(function (char) {
var c = char.charCodeAt(0);
if (c === 127) return false;
if (c <= 31) {
if (c === 10 || c === 13) return true;
return false;
}
return true;
});
return chars.join("");
}
exports.whiteList = getDefaultWhiteList();
exports.getDefaultWhiteList = getDefaultWhiteList;
exports.onTag = onTag;
exports.onIgnoreTag = onIgnoreTag;
exports.onTagAttr = onTagAttr;
exports.onIgnoreTagAttr = onIgnoreTagAttr;
exports.safeAttrValue = safeAttrValue;
exports.escapeHtml = escapeHtml;
exports.escapeQuote = escapeQuote;
exports.unescapeQuote = unescapeQuote;
exports.escapeHtmlEntities = escapeHtmlEntities;
exports.escapeDangerHtml5Entities = escapeDangerHtml5Entities;
exports.clearNonPrintableCharacter = clearNonPrintableCharacter;
exports.friendlyAttrValue = friendlyAttrValue;
exports.escapeAttrValue = escapeAttrValue;
exports.onIgnoreTagStripAll = onIgnoreTagStripAll;
exports.StripTagBody = StripTagBody;
exports.stripCommentTag = stripCommentTag;
exports.stripBlankChar = stripBlankChar;
exports.attributeWrapSign = '"';
exports.cssFilter = defaultCSSFilter;
exports.getDefaultCSSWhiteList = getDefaultCSSWhiteList;
},{"./util":4,"cssfilter":8}],2:[function(require,module,exports){
/**
* xss
*
* @author Zongmin Lei<[email protected]>
*/
var DEFAULT = require("./default");
var parser = require("./parser");
var FilterXSS = require("./xss");
/**
* filter xss function
*
* @param {String} html
* @param {Object} options { whiteList, onTag, onTagAttr, onIgnoreTag, onIgnoreTagAttr, safeAttrValue, escapeHtml }
* @return {String}
*/
function filterXSS(html, options) {
var xss = new FilterXSS(options);
return xss.process(html);
}
exports = module.exports = filterXSS;
exports.filterXSS = filterXSS;
exports.FilterXSS = FilterXSS;
(function () {
for (var i in DEFAULT) {
exports[i] = DEFAULT[i];
}
for (var j in parser) {
exports[j] = parser[j];
}
})();
// using `xss` on the browser, output `filterXSS` to the globals
if (typeof window !== "undefined") {
window.filterXSS = module.exports;
}
// using `xss` on the WebWorker, output `filterXSS` to the globals
function isWorkerEnv() {
return (
typeof self !== "undefined" &&
typeof DedicatedWorkerGlobalScope !== "undefined" &&
self instanceof DedicatedWorkerGlobalScope
);
}
if (isWorkerEnv()) {
self.filterXSS = module.exports;
}
},{"./default":1,"./parser":3,"./xss":5}],3:[function(require,module,exports){
/**
* Simple HTML Parser
*
* @author Zongmin Lei<[email protected]>
*/
var _ = require("./util");
/**
* get tag name
*
* @param {String} html e.g. '<a hef="#">'
* @return {String}
*/
function getTagName(html) {
var i = _.spaceIndex(html);
var tagName;
if (i === -1) {
tagName = html.slice(1, -1);
} else {
tagName = html.slice(1, i + 1);
}
tagName = _.trim(tagName).toLowerCase();
if (tagName.slice(0, 1) === "/") tagName = tagName.slice(1);
if (tagName.slice(-1) === "/") tagName = tagName.slice(0, -1);
return tagName;
}
/**
* is close tag?
*
* @param {String} html 如:'<a hef="#">'
* @return {Boolean}
*/
function isClosing(html) {
return html.slice(0, 2) === "</";
}
/**
* parse input html and returns processed html
*
* @param {String} html
* @param {Function} onTag e.g. function (sourcePosition, position, tag, html, isClosing)
* @param {Function} escapeHtml
* @return {String}
*/
function parseTag(html, onTag, escapeHtml) {
"use strict";
var rethtml = "";
var lastPos = 0;
var tagStart = false;
var quoteStart = false;
var currentPos = 0;
var len = html.length;
var currentTagName = "";
var currentHtml = "";
chariterator: for (currentPos = 0; currentPos < len; currentPos++) {
var c = html.charAt(currentPos);
if (tagStart === false) {
if (c === "<") {
tagStart = currentPos;
continue;
}
} else {
if (quoteStart === false) {
if (c === "<") {
rethtml += escapeHtml(html.slice(lastPos, currentPos));
tagStart = currentPos;
lastPos = currentPos;
continue;
}
if (c === ">" || currentPos === len - 1) {
rethtml += escapeHtml(html.slice(lastPos, tagStart));
currentHtml = html.slice(tagStart, currentPos + 1);
currentTagName = getTagName(currentHtml);
rethtml += onTag(
tagStart,
rethtml.length,
currentTagName,
currentHtml,
isClosing(currentHtml)
);
lastPos = currentPos + 1;
tagStart = false;
continue;
}
if (c === '"' || c === "'") {
var i = 1;
var ic = html.charAt(currentPos - i);
while (ic.trim() === "" || ic === "=") {
if (ic === "=") {
quoteStart = c;
continue chariterator;
}
ic = html.charAt(currentPos - ++i);
}
}
} else {
if (c === quoteStart) {
quoteStart = false;
continue;
}
}
}
}
if (lastPos < len) {
rethtml += escapeHtml(html.substr(lastPos));
}
return rethtml;
}
var REGEXP_ILLEGAL_ATTR_NAME = /[^a-zA-Z0-9\\_:.-]/gim;
/**
* parse input attributes and returns processed attributes
*
* @param {String} html e.g. `href="#" target="_blank"`
* @param {Function} onAttr e.g. `function (name, value)`
* @return {String}
*/
function parseAttr(html, onAttr) {
"use strict";
var lastPos = 0;
var lastMarkPos = 0;
var retAttrs = [];
var tmpName = false;
var len = html.length;
function addAttr(name, value) {
name = _.trim(name);
name = name.replace(REGEXP_ILLEGAL_ATTR_NAME, "").toLowerCase();
if (name.length < 1) return;
var ret = onAttr(name, value || "");
if (ret) retAttrs.push(ret);
}
// 逐个分析字符
for (var i = 0; i < len; i++) {
var c = html.charAt(i);
var v, j;
if (tmpName === false && c === "=") {
tmpName = html.slice(lastPos, i);
lastPos = i + 1;
lastMarkPos = html.charAt(lastPos) === '"' || html.charAt(lastPos) === "'" ? lastPos : findNextQuotationMark(html, i + 1);
continue;
}
if (tmpName !== false) {
if (
i === lastMarkPos
) {
j = html.indexOf(c, i + 1);
if (j === -1) {
break;
} else {
v = _.trim(html.slice(lastMarkPos + 1, j));
addAttr(tmpName, v);
tmpName = false;
i = j;
lastPos = i + 1;
continue;
}
}
}
if (/\s|\n|\t/.test(c)) {
html = html.replace(/\s|\n|\t/g, " ");
if (tmpName === false) {
j = findNextEqual(html, i);
if (j === -1) {
v = _.trim(html.slice(lastPos, i));
addAttr(v);
tmpName = false;
lastPos = i + 1;
continue;
} else {
i = j - 1;
continue;
}
} else {
j = findBeforeEqual(html, i - 1);
if (j === -1) {
v = _.trim(html.slice(lastPos, i));
v = stripQuoteWrap(v);
addAttr(tmpName, v);
tmpName = false;
lastPos = i + 1;
continue;
} else {
continue;
}
}
}
}
if (lastPos < html.length) {
if (tmpName === false) {
addAttr(html.slice(lastPos));
} else {
addAttr(tmpName, stripQuoteWrap(_.trim(html.slice(lastPos))));
}
}
return _.trim(retAttrs.join(" "));
}
function findNextEqual(str, i) {
for (; i < str.length; i++) {
var c = str[i];
if (c === " ") continue;
if (c === "=") return i;
return -1;
}
}
function findNextQuotationMark(str, i) {
for (; i < str.length; i++) {
var c = str[i];
if (c === " ") continue;
if (c === "'" || c === '"') return i;
return -1;
}
}
function findBeforeEqual(str, i) {
for (; i > 0; i--) {
var c = str[i];
if (c === " ") continue;
if (c === "=") return i;
return -1;
}
}
function isQuoteWrapString(text) {
if (
(text[0] === '"' && text[text.length - 1] === '"') ||
(text[0] === "'" && text[text.length - 1] === "'")
) {
return true;
} else {
return false;
}
}
function stripQuoteWrap(text) {
if (isQuoteWrapString(text)) {
return text.substr(1, text.length - 2);
} else {
return text;
}
}
exports.parseTag = parseTag;
exports.parseAttr = parseAttr;
},{"./util":4}],4:[function(require,module,exports){
module.exports = {
indexOf: function (arr, item) {
var i, j;
if (Array.prototype.indexOf) {
return arr.indexOf(item);
}
for (i = 0, j = arr.length; i < j; i++) {
if (arr[i] === item) {
return i;
}
}
return -1;
},
forEach: function (arr, fn, scope) {
var i, j;
if (Array.prototype.forEach) {
return arr.forEach(fn, scope);
}
for (i = 0, j = arr.length; i < j; i++) {
fn.call(scope, arr[i], i, arr);
}
},
trim: function (str) {
if (String.prototype.trim) {
return str.trim();
}
return str.replace(/(^\s*)|(\s*$)/g, "");
},
spaceIndex: function (str) {
var reg = /\s|\n|\t/;
var match = reg.exec(str);
return match ? match.index : -1;
},
};
},{}],5:[function(require,module,exports){
/**
* filter xss
*
* @author Zongmin Lei<[email protected]>
*/
var FilterCSS = require("cssfilter").FilterCSS;
var DEFAULT = require("./default");
var parser = require("./parser");
var parseTag = parser.parseTag;
var parseAttr = parser.parseAttr;
var _ = require("./util");
/**
* returns `true` if the input value is `undefined` or `null`
*
* @param {Object} obj
* @return {Boolean}
*/
function isNull(obj) {
return obj === undefined || obj === null;
}
/**
* get attributes for a tag
*
* @param {String} html
* @return {Object}
* - {String} html
* - {Boolean} closing
*/
function getAttrs(html) {
var i = _.spaceIndex(html);
if (i === -1) {
return {
html: "",
closing: html[html.length - 2] === "/",
};
}
html = _.trim(html.slice(i + 1, -1));
var isClosing = html[html.length - 1] === "/";
if (isClosing) html = _.trim(html.slice(0, -1));
return {
html: html,
closing: isClosing,
};
}
/**
* shallow copy
*
* @param {Object} obj
* @return {Object}
*/
function shallowCopyObject(obj) {
var ret = {};
for (var i in obj) {
ret[i] = obj[i];
}
return ret;
}
function keysToLowerCase(obj) {
var ret = {};
for (var i in obj) {
if (Array.isArray(obj[i])) {
ret[i.toLowerCase()] = obj[i].map(function (item) {
return item.toLowerCase();
});
} else {
ret[i.toLowerCase()] = obj[i];
}
}
return ret;
}
/**
* FilterXSS class
*
* @param {Object} options
* whiteList (or allowList), onTag, onTagAttr, onIgnoreTag,
* onIgnoreTagAttr, safeAttrValue, escapeHtml
* stripIgnoreTagBody, allowCommentTag, stripBlankChar
* css{whiteList, onAttr, onIgnoreAttr} `css=false` means don't use `cssfilter`
*/
function FilterXSS(options) {
options = shallowCopyObject(options || {});
if (options.stripIgnoreTag) {
if (options.onIgnoreTag) {
console.error(
'Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'
);
}
options.onIgnoreTag = DEFAULT.onIgnoreTagStripAll;
}
if (options.whiteList || options.allowList) {
options.whiteList = keysToLowerCase(options.whiteList || options.allowList);
} else {
options.whiteList = DEFAULT.whiteList;
}
this.attributeWrapSign = options.singleQuotedAttributeValue === true ? "'" : DEFAULT.attributeWrapSign;
options.onTag = options.onTag || DEFAULT.onTag;
options.onTagAttr = options.onTagAttr || DEFAULT.onTagAttr;
options.onIgnoreTag = options.onIgnoreTag || DEFAULT.onIgnoreTag;
options.onIgnoreTagAttr = options.onIgnoreTagAttr || DEFAULT.onIgnoreTagAttr;
options.safeAttrValue = options.safeAttrValue || DEFAULT.safeAttrValue;
options.escapeHtml = options.escapeHtml || DEFAULT.escapeHtml;
this.options = options;
if (options.css === false) {
this.cssFilter = false;
} else {
options.css = options.css || {};
this.cssFilter = new FilterCSS(options.css);
}
}
/**
* start process and returns result
*
* @param {String} html
* @return {String}
*/
FilterXSS.prototype.process = function (html) {
// compatible with the input
html = html || "";
html = html.toString();
if (!html) return "";
var me = this;
var options = me.options;
var whiteList = options.whiteList;
var onTag = options.onTag;
var onIgnoreTag = options.onIgnoreTag;
var onTagAttr = options.onTagAttr;
var onIgnoreTagAttr = options.onIgnoreTagAttr;
var safeAttrValue = options.safeAttrValue;
var escapeHtml = options.escapeHtml;
var attributeWrapSign = me.attributeWrapSign;
var cssFilter = me.cssFilter;
// remove invisible characters
if (options.stripBlankChar) {
html = DEFAULT.stripBlankChar(html);
}
// remove html comments
if (!options.allowCommentTag) {
html = DEFAULT.stripCommentTag(html);
}
// if enable stripIgnoreTagBody
var stripIgnoreTagBody = false;
if (options.stripIgnoreTagBody) {
stripIgnoreTagBody = DEFAULT.StripTagBody(
options.stripIgnoreTagBody,
onIgnoreTag
);
onIgnoreTag = stripIgnoreTagBody.onIgnoreTag;
}
var retHtml = parseTag(
html,
function (sourcePosition, position, tag, html, isClosing) {
var info = {
sourcePosition: sourcePosition,
position: position,
isClosing: isClosing,
isWhite: Object.prototype.hasOwnProperty.call(whiteList, tag),
};
// call `onTag()`
var ret = onTag(tag, html, info);
if (!isNull(ret)) return ret;
if (info.isWhite) {
if (info.isClosing) {
return "</" + tag + ">";
}
var attrs = getAttrs(html);
var whiteAttrList = whiteList[tag];
var attrsHtml = parseAttr(attrs.html, function (name, value) {
// call `onTagAttr()`
var isWhiteAttr = _.indexOf(whiteAttrList, name) !== -1;
var ret = onTagAttr(tag, name, value, isWhiteAttr);
if (!isNull(ret)) return ret;
if (isWhiteAttr) {
// call `safeAttrValue()`
value = safeAttrValue(tag, name, value, cssFilter);
if (value) {
return name + '=' + attributeWrapSign + value + attributeWrapSign;
} else {
return name;
}
} else {
// call `onIgnoreTagAttr()`
ret = onIgnoreTagAttr(tag, name, value, isWhiteAttr);
if (!isNull(ret)) return ret;
return;
}
});
// build new tag html
html = "<" + tag;
if (attrsHtml) html += " " + attrsHtml;
if (attrs.closing) html += " /";
html += ">";
return html;
} else {
// call `onIgnoreTag()`
ret = onIgnoreTag(tag, html, info);
if (!isNull(ret)) return ret;
return escapeHtml(html);
}
},
escapeHtml
);
// if enable stripIgnoreTagBody
if (stripIgnoreTagBody) {
retHtml = stripIgnoreTagBody.remove(retHtml);
}
return retHtml;
};
module.exports = FilterXSS;
},{"./default":1,"./parser":3,"./util":4,"cssfilter":8}],6:[function(require,module,exports){
/**
* cssfilter
*
* @author 老雷<[email protected]>
*/
var DEFAULT = require('./default');
var parseStyle = require('./parser');
var _ = require('./util');
/**
* 返回值是否为空
*
* @param {Object} obj
* @return {Boolean}
*/
function isNull (obj) {
return (obj === undefined || obj === null);
}
/**
* 浅拷贝对象
*
* @param {Object} obj
* @return {Object}
*/
function shallowCopyObject (obj) {
var ret = {};
for (var i in obj) {
ret[i] = obj[i];
}
return ret;
}
/**
* 创建CSS过滤器
*
* @param {Object} options
* - {Object} whiteList
* - {Function} onAttr
* - {Function} onIgnoreAttr
* - {Function} safeAttrValue
*/
function FilterCSS (options) {
options = shallowCopyObject(options || {});
options.whiteList = options.whiteList || DEFAULT.whiteList;
options.onAttr = options.onAttr || DEFAULT.onAttr;
options.onIgnoreAttr = options.onIgnoreAttr || DEFAULT.onIgnoreAttr;
options.safeAttrValue = options.safeAttrValue || DEFAULT.safeAttrValue;
this.options = options;
}
FilterCSS.prototype.process = function (css) {
// 兼容各种奇葩输入
css = css || '';
css = css.toString();
if (!css) return '';
var me = this;
var options = me.options;
var whiteList = options.whiteList;
var onAttr = options.onAttr;
var onIgnoreAttr = options.onIgnoreAttr;
var safeAttrValue = options.safeAttrValue;
var retCSS = parseStyle(css, function (sourcePosition, position, name, value, source) {
var check = whiteList[name];
var isWhite = false;
if (check === true) isWhite = check;
else if (typeof check === 'function') isWhite = check(value);
else if (check instanceof RegExp) isWhite = check.test(value);
if (isWhite !== true) isWhite = false;
// 如果过滤后 value 为空则直接忽略
value = safeAttrValue(name, value);
if (!value) return;
var opts = {
position: position,
sourcePosition: sourcePosition,
source: source,
isWhite: isWhite
};
if (isWhite) {
var ret = onAttr(name, value, opts);
if (isNull(ret)) {
return name + ':' + value;
} else {
return ret;
}
} else {
var ret = onIgnoreAttr(name, value, opts);
if (!isNull(ret)) {
return ret;
}
}
});
return retCSS;
};
module.exports = FilterCSS;
},{"./default":7,"./parser":9,"./util":10}],7:[function(require,module,exports){
/**
* cssfilter
*
* @author 老雷<[email protected]>
*/
function getDefaultWhiteList () {
// 白名单值说明:
// true: 允许该属性
// Function: function (val) { } 返回true表示允许该属性,其他值均表示不允许
// RegExp: regexp.test(val) 返回true表示允许该属性,其他值均表示不允许
// 除上面列出的值外均表示不允许
var whiteList = {};
whiteList['align-content'] = false; // default: auto
whiteList['align-items'] = false; // default: auto
whiteList['align-self'] = false; // default: auto
whiteList['alignment-adjust'] = false; // default: auto
whiteList['alignment-baseline'] = false; // default: baseline
whiteList['all'] = false; // default: depending on individual properties
whiteList['anchor-point'] = false; // default: none
whiteList['animation'] = false; // default: depending on individual properties
whiteList['animation-delay'] = false; // default: 0
whiteList['animation-direction'] = false; // default: normal
whiteList['animation-duration'] = false; // default: 0
whiteList['animation-fill-mode'] = false; // default: none
whiteList['animation-iteration-count'] = false; // default: 1
whiteList['animation-name'] = false; // default: none
whiteList['animation-play-state'] = false; // default: running
whiteList['animation-timing-function'] = false; // default: ease
whiteList['azimuth'] = false; // default: center
whiteList['backface-visibility'] = false; // default: visible
whiteList['background'] = true; // default: depending on individual properties
whiteList['background-attachment'] = true; // default: scroll
whiteList['background-clip'] = true; // default: border-box
whiteList['background-color'] = true; // default: transparent
whiteList['background-image'] = true; // default: none
whiteList['background-origin'] = true; // default: padding-box
whiteList['background-position'] = true; // default: 0% 0%
whiteList['background-repeat'] = true; // default: repeat
whiteList['background-size'] = true; // default: auto
whiteList['baseline-shift'] = false; // default: baseline
whiteList['binding'] = false; // default: none
whiteList['bleed'] = false; // default: 6pt
whiteList['bookmark-label'] = false; // default: content()
whiteList['bookmark-level'] = false; // default: none
whiteList['bookmark-state'] = false; // default: open
whiteList['border'] = true; // default: depending on individual properties
whiteList['border-bottom'] = true; // default: depending on individual properties
whiteList['border-bottom-color'] = true; // default: current color
whiteList['border-bottom-left-radius'] = true; // default: 0
whiteList['border-bottom-right-radius'] = true; // default: 0
whiteList['border-bottom-style'] = true; // default: none
whiteList['border-bottom-width'] = true; // default: medium
whiteList['border-collapse'] = true; // default: separate
whiteList['border-color'] = true; // default: depending on individual properties
whiteList['border-image'] = true; // default: none
whiteList['border-image-outset'] = true; // default: 0
whiteList['border-image-repeat'] = true; // default: stretch
whiteList['border-image-slice'] = true; // default: 100%
whiteList['border-image-source'] = true; // default: none
whiteList['border-image-width'] = true; // default: 1
whiteList['border-left'] = true; // default: depending on individual properties
whiteList['border-left-color'] = true; // default: current color
whiteList['border-left-style'] = true; // default: none
whiteList['border-left-width'] = true; // default: medium
whiteList['border-radius'] = true; // default: 0
whiteList['border-right'] = true; // default: depending on individual properties
whiteList['border-right-color'] = true; // default: current color
whiteList['border-right-style'] = true; // default: none
whiteList['border-right-width'] = true; // default: medium
whiteList['border-spacing'] = true; // default: 0
whiteList['border-style'] = true; // default: depending on individual properties
whiteList['border-top'] = true; // default: depending on individual properties
whiteList['border-top-color'] = true; // default: current color
whiteList['border-top-left-radius'] = true; // default: 0
whiteList['border-top-right-radius'] = true; // default: 0
whiteList['border-top-style'] = true; // default: none
whiteList['border-top-width'] = true; // default: medium
whiteList['border-width'] = true; // default: depending on individual properties
whiteList['bottom'] = false; // default: auto
whiteList['box-decoration-break'] = true; // default: slice
whiteList['box-shadow'] = true; // default: none
whiteList['box-sizing'] = true; // default: content-box
whiteList['box-snap'] = true; // default: none
whiteList['box-suppress'] = true; // default: show
whiteList['break-after'] = true; // default: auto
whiteList['break-before'] = true; // default: auto
whiteList['break-inside'] = true; // default: auto
whiteList['caption-side'] = false; // default: top
whiteList['chains'] = false; // default: none
whiteList['clear'] = true; // default: none
whiteList['clip'] = false; // default: auto
whiteList['clip-path'] = false; // default: none
whiteList['clip-rule'] = false; // default: nonzero
whiteList['color'] = true; // default: implementation dependent
whiteList['color-interpolation-filters'] = true; // default: auto
whiteList['column-count'] = false; // default: auto
whiteList['column-fill'] = false; // default: balance
whiteList['column-gap'] = false; // default: normal
whiteList['column-rule'] = false; // default: depending on individual properties
whiteList['column-rule-color'] = false; // default: current color
whiteList['column-rule-style'] = false; // default: medium
whiteList['column-rule-width'] = false; // default: medium
whiteList['column-span'] = false; // default: none
whiteList['column-width'] = false; // default: auto
whiteList['columns'] = false; // default: depending on individual properties
whiteList['contain'] = false; // default: none
whiteList['content'] = false; // default: normal
whiteList['counter-increment'] = false; // default: none
whiteList['counter-reset'] = false; // default: none
whiteList['counter-set'] = false; // default: none
whiteList['crop'] = false; // default: auto
whiteList['cue'] = false; // default: depending on individual properties
whiteList['cue-after'] = false; // default: none
whiteList['cue-before'] = false; // default: none
whiteList['cursor'] = false; // default: auto
whiteList['direction'] = false; // default: ltr
whiteList['display'] = true; // default: depending on individual properties
whiteList['display-inside'] = true; // default: auto
whiteList['display-list'] = true; // default: none
whiteList['display-outside'] = true; // default: inline-level
whiteList['dominant-baseline'] = false; // default: auto
whiteList['elevation'] = false; // default: level
whiteList['empty-cells'] = false; // default: show
whiteList['filter'] = false; // default: none
whiteList['flex'] = false; // default: depending on individual properties
whiteList['flex-basis'] = false; // default: auto
whiteList['flex-direction'] = false; // default: row
whiteList['flex-flow'] = false; // default: depending on individual properties
whiteList['flex-grow'] = false; // default: 0
whiteList['flex-shrink'] = false; // default: 1
whiteList['flex-wrap'] = false; // default: nowrap
whiteList['float'] = false; // default: none
whiteList['float-offset'] = false; // default: 0 0
whiteList['flood-color'] = false; // default: black
whiteList['flood-opacity'] = false; // default: 1
whiteList['flow-from'] = false; // default: none
whiteList['flow-into'] = false; // default: none
whiteList['font'] = true; // default: depending on individual properties
whiteList['font-family'] = true; // default: implementation dependent
whiteList['font-feature-settings'] = true; // default: normal
whiteList['font-kerning'] = true; // default: auto
whiteList['font-language-override'] = true; // default: normal
whiteList['font-size'] = true; // default: medium
whiteList['font-size-adjust'] = true; // default: none
whiteList['font-stretch'] = true; // default: normal
whiteList['font-style'] = true; // default: normal
whiteList['font-synthesis'] = true; // default: weight style
whiteList['font-variant'] = true; // default: normal
whiteList['font-variant-alternates'] = true; // default: normal
whiteList['font-variant-caps'] = true; // default: normal
whiteList['font-variant-east-asian'] = true; // default: normal
whiteList['font-variant-ligatures'] = true; // default: normal
whiteList['font-variant-numeric'] = true; // default: normal
whiteList['font-variant-position'] = true; // default: normal
whiteList['font-weight'] = true; // default: normal
whiteList['grid'] = false; // default: depending on individual properties
whiteList['grid-area'] = false; // default: depending on individual properties
whiteList['grid-auto-columns'] = false; // default: auto
whiteList['grid-auto-flow'] = false; // default: none
whiteList['grid-auto-rows'] = false; // default: auto
whiteList['grid-column'] = false; // default: depending on individual properties
whiteList['grid-column-end'] = false; // default: auto
whiteList['grid-column-start'] = false; // default: auto
whiteList['grid-row'] = false; // default: depending on individual properties
whiteList['grid-row-end'] = false; // default: auto
whiteList['grid-row-start'] = false; // default: auto
whiteList['grid-template'] = false; // default: depending on individual properties
whiteList['grid-template-areas'] = false; // default: none
whiteList['grid-template-columns'] = false; // default: none
whiteList['grid-template-rows'] = false; // default: none
whiteList['hanging-punctuation'] = false; // default: none
whiteList['height'] = true; // default: auto
whiteList['hyphens'] = false; // default: manual
whiteList['icon'] = false; // default: auto
whiteList['image-orientation'] = false; // default: auto
whiteList['image-resolution'] = false; // default: normal
whiteList['ime-mode'] = false; // default: auto
whiteList['initial-letters'] = false; // default: normal
whiteList['inline-box-align'] = false; // default: last
whiteList['justify-content'] = false; // default: auto
whiteList['justify-items'] = false; // default: auto
whiteList['justify-self'] = false; // default: auto
whiteList['left'] = false; // default: auto
whiteList['letter-spacing'] = true; // default: normal
whiteList['lighting-color'] = true; // default: white
whiteList['line-box-contain'] = false; // default: block inline replaced
whiteList['line-break'] = false; // default: auto
whiteList['line-grid'] = false; // default: match-parent
whiteList['line-height'] = false; // default: normal
whiteList['line-snap'] = false; // default: none
whiteList['line-stacking'] = false; // default: depending on individual properties
whiteList['line-stacking-ruby'] = false; // default: exclude-ruby
whiteList['line-stacking-shift'] = false; // default: consider-shifts
whiteList['line-stacking-strategy'] = false; // default: inline-line-height
whiteList['list-style'] = true; // default: depending on individual properties
whiteList['list-style-image'] = true; // default: none
whiteList['list-style-position'] = true; // default: outside
whiteList['list-style-type'] = true; // default: disc
whiteList['margin'] = true; // default: depending on individual properties
whiteList['margin-bottom'] = true; // default: 0
whiteList['margin-left'] = true; // default: 0
whiteList['margin-right'] = true; // default: 0
whiteList['margin-top'] = true; // default: 0
whiteList['marker-offset'] = false; // default: auto
whiteList['marker-side'] = false; // default: list-item
whiteList['marks'] = false; // default: none
whiteList['mask'] = false; // default: border-box
whiteList['mask-box'] = false; // default: see individual properties
whiteList['mask-box-outset'] = false; // default: 0
whiteList['mask-box-repeat'] = false; // default: stretch
whiteList['mask-box-slice'] = false; // default: 0 fill
whiteList['mask-box-source'] = false; // default: none
whiteList['mask-box-width'] = false; // default: auto
whiteList['mask-clip'] = false; // default: border-box
whiteList['mask-image'] = false; // default: none
whiteList['mask-origin'] = false; // default: border-box
whiteList['mask-position'] = false; // default: center
whiteList['mask-repeat'] = false; // default: no-repeat
whiteList['mask-size'] = false; // default: border-box
whiteList['mask-source-type'] = false; // default: auto
whiteList['mask-type'] = false; // default: luminance
whiteList['max-height'] = true; // default: none
whiteList['max-lines'] = false; // default: none
whiteList['max-width'] = true; // default: none
whiteList['min-height'] = true; // default: 0
whiteList['min-width'] = true; // default: 0
whiteList['move-to'] = false; // default: normal
whiteList['nav-down'] = false; // default: auto
whiteList['nav-index'] = false; // default: auto
whiteList['nav-left'] = false; // default: auto
whiteList['nav-right'] = false; // default: auto
whiteList['nav-up'] = false; // default: auto
whiteList['object-fit'] = false; // default: fill
whiteList['object-position'] = false; // default: 50% 50%
whiteList['opacity'] = false; // default: 1
whiteList['order'] = false; // default: 0
whiteList['orphans'] = false; // default: 2
whiteList['outline'] = false; // default: depending on individual properties
whiteList['outline-color'] = false; // default: invert
whiteList['outline-offset'] = false; // default: 0
whiteList['outline-style'] = false; // default: none
whiteList['outline-width'] = false; // default: medium
whiteList['overflow'] = false; // default: depending on individual properties
whiteList['overflow-wrap'] = false; // default: normal
whiteList['overflow-x'] = false; // default: visible
whiteList['overflow-y'] = false; // default: visible
whiteList['padding'] = true; // default: depending on individual properties
whiteList['padding-bottom'] = true; // default: 0
whiteList['padding-left'] = true; // default: 0
whiteList['padding-right'] = true; // default: 0
whiteList['padding-top'] = true; // default: 0
whiteList['page'] = false; // default: auto
whiteList['page-break-after'] = false; // default: auto
whiteList['page-break-before'] = false; // default: auto
whiteList['page-break-inside'] = false; // default: auto
whiteList['page-policy'] = false; // default: start
whiteList['pause'] = false; // default: implementation dependent
whiteList['pause-after'] = false; // default: implementation dependent
whiteList['pause-before'] = false; // default: implementation dependent
whiteList['perspective'] = false; // default: none
whiteList['perspective-origin'] = false; // default: 50% 50%
whiteList['pitch'] = false; // default: medium
whiteList['pitch-range'] = false; // default: 50
whiteList['play-during'] = false; // default: auto
whiteList['position'] = false; // default: static
whiteList['presentation-level'] = false; // default: 0
whiteList['quotes'] = false; // default: text
whiteList['region-fragment'] = false; // default: auto
whiteList['resize'] = false; // default: none
whiteList['rest'] = false; // default: depending on individual properties
whiteList['rest-after'] = false; // default: none
whiteList['rest-before'] = false; // default: none
whiteList['richness'] = false; // default: 50
whiteList['right'] = false; // default: auto
whiteList['rotation'] = false; // default: 0
whiteList['rotation-point'] = false; // default: 50% 50%
whiteList['ruby-align'] = false; // default: auto
whiteList['ruby-merge'] = false; // default: separate
whiteList['ruby-position'] = false; // default: before
whiteList['shape-image-threshold'] = false; // default: 0.0
whiteList['shape-outside'] = false; // default: none
whiteList['shape-margin'] = false; // default: 0
whiteList['size'] = false; // default: auto
whiteList['speak'] = false; // default: auto
whiteList['speak-as'] = false; // default: normal
whiteList['speak-header'] = false; // default: once
whiteList['speak-numeral'] = false; // default: continuous
whiteList['speak-punctuation'] = false; // default: none
whiteList['speech-rate'] = false; // default: medium
whiteList['stress'] = false; // default: 50
whiteList['string-set'] = false; // default: none
whiteList['tab-size'] = false; // default: 8
whiteList['table-layout'] = false; // default: auto
whiteList['text-align'] = true; // default: start
whiteList['text-align-last'] = true; // default: auto
whiteList['text-combine-upright'] = true; // default: none
whiteList['text-decoration'] = true; // default: none
whiteList['text-decoration-color'] = true; // default: currentColor
whiteList['text-decoration-line'] = true; // default: none
whiteList['text-decoration-skip'] = true; // default: objects
whiteList['text-decoration-style'] = true; // default: solid
whiteList['text-emphasis'] = true; // default: depending on individual properties
whiteList['text-emphasis-color'] = true; // default: currentColor
whiteList['text-emphasis-position'] = true; // default: over right
whiteList['text-emphasis-style'] = true; // default: none
whiteList['text-height'] = true; // default: auto
whiteList['text-indent'] = true; // default: 0
whiteList['text-justify'] = true; // default: auto
whiteList['text-orientation'] = true; // default: mixed
whiteList['text-overflow'] = true; // default: clip
whiteList['text-shadow'] = true; // default: none
whiteList['text-space-collapse'] = true; // default: collapse
whiteList['text-transform'] = true; // default: none
whiteList['text-underline-position'] = true; // default: auto
whiteList['text-wrap'] = true; // default: normal
whiteList['top'] = false; // default: auto
whiteList['transform'] = false; // default: none
whiteList['transform-origin'] = false; // default: 50% 50% 0
whiteList['transform-style'] = false; // default: flat
whiteList['transition'] = false; // default: depending on individual properties
whiteList['transition-delay'] = false; // default: 0s
whiteList['transition-duration'] = false; // default: 0s
whiteList['transition-property'] = false; // default: all
whiteList['transition-timing-function'] = false; // default: ease
whiteList['unicode-bidi'] = false; // default: normal
whiteList['vertical-align'] = false; // default: baseline
whiteList['visibility'] = false; // default: visible
whiteList['voice-balance'] = false; // default: center
whiteList['voice-duration'] = false; // default: auto
whiteList['voice-family'] = false; // default: implementation dependent
whiteList['voice-pitch'] = false; // default: medium
whiteList['voice-range'] = false; // default: medium
whiteList['voice-rate'] = false; // default: normal
whiteList['voice-stress'] = false; // default: normal
whiteList['voice-volume'] = false; // default: medium
whiteList['volume'] = false; // default: medium
whiteList['white-space'] = false; // default: normal
whiteList['widows'] = false; // default: 2
whiteList['width'] = true; // default: auto
whiteList['will-change'] = false; // default: auto
whiteList['word-break'] = true; // default: normal
whiteList['word-spacing'] = true; // default: normal
whiteList['word-wrap'] = true; // default: normal
whiteList['wrap-flow'] = false; // default: auto
whiteList['wrap-through'] = false; // default: wrap
whiteList['writing-mode'] = false; // default: horizontal-tb
whiteList['z-index'] = false; // default: auto
return whiteList;
}
/**
* 匹配到白名单上的一个属性时
*
* @param {String} name
* @param {String} value
* @param {Object} options
* @return {String}
*/
function onAttr (name, value, options) {
// do nothing
}
/**
* 匹配到不在白名单上的一个属性时
*
* @param {String} name
* @param {String} value
* @param {Object} options
* @return {String}
*/
function onIgnoreAttr (name, value, options) {
// do nothing
}
var REGEXP_URL_JAVASCRIPT = /javascript\s*\:/img;
/**
* 过滤属性值
*
* @param {String} name
* @param {String} value
* @return {String}
*/
function safeAttrValue(name, value) {
if (REGEXP_URL_JAVASCRIPT.test(value)) return '';
return value;
}
exports.whiteList = getDefaultWhiteList();
exports.getDefaultWhiteList = getDefaultWhiteList;
exports.onAttr = onAttr;
exports.onIgnoreAttr = onIgnoreAttr;
exports.safeAttrValue = safeAttrValue;
},{}],8:[function(require,module,exports){
/**
* cssfilter
*
* @author 老雷<[email protected]>
*/
var DEFAULT = require('./default');
var FilterCSS = require('./css');
/**
* XSS过滤
*
* @param {String} css 要过滤的CSS代码
* @param {Object} options 选项:whiteList, onAttr, onIgnoreAttr
* @return {String}
*/
function filterCSS (html, options) {
var xss = new FilterCSS(options);
return xss.process(html);
}
// 输出
exports = module.exports = filterCSS;
exports.FilterCSS = FilterCSS;
for (var i in DEFAULT) exports[i] = DEFAULT[i];
// 在浏览器端使用
if (typeof window !== 'undefined') {
window.filterCSS = module.exports;
}
},{"./css":6,"./default":7}],9:[function(require,module,exports){
/**
* cssfilter
*
* @author 老雷<[email protected]>
*/
var _ = require('./util');
/**
* 解析style
*
* @param {String} css
* @param {Function} onAttr 处理属性的函数
* 参数格式: function (sourcePosition, position, name, value, source)
* @return {String}
*/
function parseStyle (css, onAttr) {
css = _.trimRight(css);
if (css[css.length - 1] !== ';') css += ';';
var cssLength = css.length;
var isParenthesisOpen = false;
var lastPos = 0;
var i = 0;
var retCSS = '';
function addNewAttr () {
// 如果没有正常的闭合圆括号,则直接忽略当前属性
if (!isParenthesisOpen) {
var source = _.trim(css.slice(lastPos, i));
var j = source.indexOf(':');
if (j !== -1) {
var name = _.trim(source.slice(0, j));
var value = _.trim(source.slice(j + 1));
// 必须有属性名称
if (name) {
var ret = onAttr(lastPos, retCSS.length, name, value, source);
if (ret) retCSS += ret + '; ';
}
}
}
lastPos = i + 1;
}
for (; i < cssLength; i++) {
var c = css[i];
if (c === '/' && css[i + 1] === '*') {
// 备注开始
var j = css.indexOf('*/', i + 2);
// 如果没有正常的备注结束,则后面的部分全部跳过
if (j === -1) break;
// 直接将当前位置调到备注结尾,并且初始化状态
i = j + 1;
lastPos = i + 1;
isParenthesisOpen = false;
} else if (c === '(') {
isParenthesisOpen = true;
} else if (c === ')') {
isParenthesisOpen = false;
} else if (c === ';') {
if (isParenthesisOpen) {
// 在圆括号里面,忽略
} else {
addNewAttr();
}
} else if (c === '\n') {
addNewAttr();
}
}
return _.trim(retCSS);
}
module.exports = parseStyle;
},{"./util":10}],10:[function(require,module,exports){
module.exports = {
indexOf: function (arr, item) {
var i, j;
if (Array.prototype.indexOf) {
return arr.indexOf(item);
}
for (i = 0, j = arr.length; i < j; i++) {
if (arr[i] === item) {
return i;
}
}
return -1;
},
forEach: function (arr, fn, scope) {
var i, j;
if (Array.prototype.forEach) {
return arr.forEach(fn, scope);
}
for (i = 0, j = arr.length; i < j; i++) {
fn.call(scope, arr[i], i, arr);
}
},
trim: function (str) {
if (String.prototype.trim) {
return str.trim();
}
return str.replace(/(^\s*)|(\s*$)/g, '');
},
trimRight: function (str) {
if (String.prototype.trimRight) {
return str.trimRight();
}
return str.replace(/(\s*$)/g, '');
}
};
},{}]},{},[2]);
ABCABDtypeof window.markdownitABCABDdefine("@embroider/macros", ["exports", "require"], function (
__require__,
__exports__
) {
__exports__.importSync = __require__;
});
define("discourse-common/lib/loader-shim", ["exports", "require"], function (
__exports__,
__require__
) {
__exports__.default = (id, callback) => {
if (!__require__.has(id)) {
define(id, callback);
}
};
});
define("xss", ["exports"], function (__exports__) {
__exports__.default = window.filterXSS;
});
define("markdown-it", ["exports"], function (exports) {
exports.default = window.markdownit;
});
ABCABD(()=>{var nut=Object.create;var xB=Object.defineProperty;var sut=Object.getOwnPropertyDescriptor;var iut=Object.getOwnPropertyNames;var out=Object.getPrototypeOf,uut=Object.prototype.hasOwnProperty;var Yhe=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(r,u)=>(typeof require<"u"?require:r)[u]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var Sn=(a,r)=>()=>(a&&(r=a(a=0)),r);var Lt=(a,r)=>()=>(r||a((r={exports:{}}).exports,r),r.exports),Aut=(a,r)=>{for(var u in r)xB(a,u,{get:r[u],enumerable:!0})},Qhe=(a,r,u,l)=>{if(r&&typeof r=="object"||typeof r=="function")for(let p of iut(r))!uut.call(a,p)&&p!==u&&xB(a,p,{get:()=>r[p],enumerable:!(l=sut(r,p))||l.enumerable});return a};var td=(a,r,u)=>(u=a!=null?nut(out(a)):{},Qhe(r||!a||!a.__esModule?xB(u,"default",{value:a,enumerable:!0}):u,a)),lut=a=>Qhe(xB({},"__esModule",{value:!0}),a);var Jhe=(()=>{for(var a=new Uint8Array(128),r=0;r<64;r++)a[r<26?r+65:r<52?r+71:r<62?r-4:r*4-205]=r;return u=>{for(var l=u.length,p=new Uint8Array((l-(u[l-1]=="=")-(u[l-2]=="="))*3/4|0),D=0,j=0;D<l;){var y=a[u.charCodeAt(D++)],S=a[u.charCodeAt(D++)],k=a[u.charCodeAt(D++)],z=a[u.charCodeAt(D++)];p[j++]=y<<2|S>>4,p[j++]=S<<4|k>>2,p[j++]=k<<6|z}return p}})();var Ze,oe=Sn(()=>{Ze={env:{}}});var e1e=Lt((DB,Zhe)=>{oe();(function(a,r){typeof DB=="object"&&typeof Zhe<"u"?r(DB):typeof define=="function"&&define.amd?define(["exports"],r):(a=typeof globalThis<"u"?globalThis:a||self,r(a.Babel={}))})(DB,function(a){"use strict";var r=Object.freeze({__proto__:null,get DEFAULT_EXTENSIONS(){return FHe},get File(){return u6},get buildExternalHelpers(){return $ee},get createConfigItem(){return Kqe},get createConfigItemAsync(){return Vqe},get createConfigItemSync(){return Ore},get getEnv(){return qee},get loadOptions(){return Hqe},get loadOptionsAsync(){return qqe},get loadOptionsSync(){return vP},get loadPartialConfig(){return Gqe},get loadPartialConfigAsync(){return Uqe},get loadPartialConfigSync(){return Pre},get parse(){return mHe},get parseAsync(){return EHe},get parseSync(){return yHe},get resolvePlugin(){return IMe},get resolvePreset(){return OMe},get template(){return Qt},get tokTypes(){return rY},get transform(){return fHe},get transformAsync(){return pHe},get transformFile(){return xHe},get transformFileAsync(){return hHe},get transformFileSync(){return DHe},get transformFromAst(){return jHe},get transformFromAstAsync(){return gHe},get transformFromAstSync(){return rae},get transformSync(){return tae},get traverse(){return ns},get types(){return xT},get version(){return g6}});function u(e,t,n){if(l())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,t);var o=new(e.bind.apply(e,i));return n&&Ee(o,n.prototype),o}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(l=function(){return!!e})()}function p(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,o,s,A,d=[],c=!0,f=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(i=s.call(n)).done)&&(d.push(i.value),d.length!==t);c=!0);}catch(x){f=!0,o=x}finally{try{if(!c&&n.return!=null&&(A=n.return(),Object(A)!==A))return}finally{if(f)throw o}}return d}}function D(){D=function(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(pe,xe,de){pe[xe]=de.value},s=typeof Symbol=="function"?Symbol:{},A=s.iterator||"@@iterator",d=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function f(pe,xe,de){return Object.defineProperty(pe,xe,{value:de,enumerable:!0,configurable:!0,writable:!0}),pe[xe]}try{f({},"")}catch{f=function(xe,de,$e){return xe[de]=$e}}function x(pe,xe,de,$e){var Se=xe&&xe.prototype instanceof w?xe:w,et=Object.create(Se.prototype),st=new ve($e||[]);return o(et,"_invoke",{value:se(pe,de,st)}),et}function g(pe,xe,de){try{return{type:"normal",arg:pe.call(xe,de)}}catch($e){return{type:"throw",arg:$e}}}t.wrap=x;var m="suspendedStart",B="suspendedYield",b="executing",_="completed",C={};function w(){}function P(){}function M(){}var N={};f(N,A,function(){return this});var q=Object.getPrototypeOf,V=q&&q(q(Te([])));V&&V!==n&&i.call(V,A)&&(N=V);var U=M.prototype=w.prototype=Object.create(N);function te(pe){["next","throw","return"].forEach(function(xe){f(pe,xe,function(de){return this._invoke(xe,de)})})}function ae(pe,xe){function de(Se,et,st,Me){var Ve=g(pe[Se],pe,et);if(Ve.type!=="throw"){var Ye=Ve.arg,ht=Ye.value;return ht&&typeof ht=="object"&&i.call(ht,"__await")?xe.resolve(ht.__await).then(function(Ct){de("next",Ct,st,Me)},function(Ct){de("throw",Ct,st,Me)}):xe.resolve(ht).then(function(Ct){Ye.value=Ct,st(Ye)},function(Ct){return de("throw",Ct,st,Me)})}Me(Ve.arg)}var $e;o(this,"_invoke",{value:function(Se,et){function st(){return new xe(function(Me,Ve){de(Se,et,Me,Ve)})}return $e=$e?$e.then(st,st):st()}})}function se(pe,xe,de){var $e=m;return function(Se,et){if($e===b)throw Error("Generator is already running");if($e===_){if(Se==="throw")throw et;return{value:e,done:!0}}for(de.method=Se,de.arg=et;;){var st=de.delegate;if(st){var Me=ne(st,de);if(Me){if(Me===C)continue;return Me}}if(de.method==="next")de.sent=de._sent=de.arg;else if(de.method==="throw"){if($e===m)throw $e=_,de.arg;de.dispatchException(de.arg)}else de.method==="return"&&de.abrupt("return",de.arg);$e=b;var Ve=g(pe,xe,de);if(Ve.type==="normal"){if($e=de.done?_:B,Ve.arg===C)continue;return{value:Ve.arg,done:de.done}}Ve.type==="throw"&&($e=_,de.method="throw",de.arg=Ve.arg)}}}function ne(pe,xe){var de=xe.method,$e=pe.iterator[de];if($e===e)return xe.delegate=null,de==="throw"&&pe.iterator.return&&(xe.method="return",xe.arg=e,ne(pe,xe),xe.method==="throw")||de!=="return"&&(xe.method="throw",xe.arg=new TypeError("The iterator does not provide a '"+de+"' method")),C;var Se=g($e,pe.iterator,xe.arg);if(Se.type==="throw")return xe.method="throw",xe.arg=Se.arg,xe.delegate=null,C;var et=Se.arg;return et?et.done?(xe[pe.resultName]=et.value,xe.next=pe.nextLoc,xe.method!=="return"&&(xe.method="next",xe.arg=e),xe.delegate=null,C):et:(xe.method="throw",xe.arg=new TypeError("iterator result is not an object"),xe.delegate=null,C)}function Ae(pe){var xe={tryLoc:pe[0]};1 in pe&&(xe.catchLoc=pe[1]),2 in pe&&(xe.finallyLoc=pe[2],xe.afterLoc=pe[3]),this.tryEntries.push(xe)}function Fe(pe){var xe=pe.completion||{};xe.type="normal",delete xe.arg,pe.completion=xe}function ve(pe){this.tryEntries=[{tryLoc:"root"}],pe.forEach(Ae,this),this.reset(!0)}function Te(pe){if(pe||pe===""){var xe=pe[A];if(xe)return xe.call(pe);if(typeof pe.next=="function")return pe;if(!isNaN(pe.length)){var de=-1,$e=function Se(){for(;++de<pe.length;)if(i.call(pe,de))return Se.value=pe[de],Se.done=!1,Se;return Se.value=e,Se.done=!0,Se};return $e.next=$e}}throw new TypeError(typeof pe+" is not iterable")}return P.prototype=M,o(U,"constructor",{value:M,configurable:!0}),o(M,"constructor",{value:P,configurable:!0}),P.displayName=f(M,c,"GeneratorFunction"),t.isGeneratorFunction=function(pe){var xe=typeof pe=="function"&&pe.constructor;return!!xe&&(xe===P||(xe.displayName||xe.name)==="GeneratorFunction")},t.mark=function(pe){return Object.setPrototypeOf?Object.setPrototypeOf(pe,M):(pe.__proto__=M,f(pe,c,"GeneratorFunction")),pe.prototype=Object.create(U),pe},t.awrap=function(pe){return{__await:pe}},te(ae.prototype),f(ae.prototype,d,function(){return this}),t.AsyncIterator=ae,t.async=function(pe,xe,de,$e,Se){Se===void 0&&(Se=Promise);var et=new ae(x(pe,xe,de,$e),Se);return t.isGeneratorFunction(xe)?et:et.next().then(function(st){return st.done?st.value:et.next()})},te(U),f(U,c,"Generator"),f(U,A,function(){return this}),f(U,"toString",function(){return"[object Generator]"}),t.keys=function(pe){var xe=Object(pe),de=[];for(var $e in xe)de.push($e);return de.reverse(),function Se(){for(;de.length;){var et=de.pop();if(et in xe)return Se.value=et,Se.done=!1,Se}return Se.done=!0,Se}},t.values=Te,ve.prototype={constructor:ve,reset:function(pe){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(Fe),!pe)for(var xe in this)xe.charAt(0)==="t"&&i.call(this,xe)&&!isNaN(+xe.slice(1))&&(this[xe]=e)},stop:function(){this.done=!0;var pe=this.tryEntries[0].completion;if(pe.type==="throw")throw pe.arg;return this.rval},dispatchException:function(pe){if(this.done)throw pe;var xe=this;function de(Ve,Ye){return et.type="throw",et.arg=pe,xe.next=Ve,Ye&&(xe.method="next",xe.arg=e),!!Ye}for(var $e=this.tryEntries.length-1;$e>=0;--$e){var Se=this.tryEntries[$e],et=Se.completion;if(Se.tryLoc==="root")return de("end");if(Se.tryLoc<=this.prev){var st=i.call(Se,"catchLoc"),Me=i.call(Se,"finallyLoc");if(st&&Me){if(this.prev<Se.catchLoc)return de(Se.catchLoc,!0);if(this.prev<Se.finallyLoc)return de(Se.finallyLoc)}else if(st){if(this.prev<Se.catchLoc)return de(Se.catchLoc,!0)}else{if(!Me)throw Error("try statement without catch or finally");if(this.prev<Se.finallyLoc)return de(Se.finallyLoc)}}}},abrupt:function(pe,xe){for(var de=this.tryEntries.length-1;de>=0;--de){var $e=this.tryEntries[de];if($e.tryLoc<=this.prev&&i.call($e,"finallyLoc")&&this.prev<$e.finallyLoc){var Se=$e;break}}Se&&(pe==="break"||pe==="continue")&&Se.tryLoc<=xe&&xe<=Se.finallyLoc&&(Se=null);var et=Se?Se.completion:{};return et.type=pe,et.arg=xe,Se?(this.method="next",this.next=Se.finallyLoc,C):this.complete(et)},complete:function(pe,xe){if(pe.type==="throw")throw pe.arg;return pe.type==="break"||pe.type==="continue"?this.next=pe.arg:pe.type==="return"?(this.rval=this.arg=pe.arg,this.method="return",this.next="end"):pe.type==="normal"&&xe&&(this.next=xe),C},finish:function(pe){for(var xe=this.tryEntries.length-1;xe>=0;--xe){var de=this.tryEntries[xe];if(de.finallyLoc===pe)return this.complete(de.completion,de.afterLoc),Fe(de),C}},catch:function(pe){for(var xe=this.tryEntries.length-1;xe>=0;--xe){var de=this.tryEntries[xe];if(de.tryLoc===pe){var $e=de.completion;if($e.type==="throw"){var Se=$e.arg;Fe(de)}return Se}}throw Error("illegal catch attempt")},delegateYield:function(pe,xe,de){return this.delegate={iterator:Te(pe),resultName:xe,nextLoc:de},this.method==="next"&&(this.arg=e),C}},t}function j(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function y(e){var t=j(e,"string");return typeof t=="symbol"?t:t+""}function S(e,t,n,i,o,s,A){try{var d=e[s](A),c=d.value}catch(f){n(f);return}d.done?t(c):Promise.resolve(c).then(i,o)}function k(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var s=e.apply(t,n);function A(c){S(s,i,o,A,d,"next",c)}function d(c){S(s,i,o,A,d,"throw",c)}A(void 0)})}}function z(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,y(i.key),i)}}function T(e,t,n){return t&&z(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ue(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ee(e,t)}function ge(e){return ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ge(e)}function Ee(e,t){return Ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,o){return i.__proto__=o,i},Ee(e,t)}function $(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function v(e){var t=typeof Map=="function"?new Map:void 0;return v=function(i){if(i===null||!$(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(i))return t.get(i);t.set(i,o)}function o(){return u(i,arguments,ge(this).constructor)}return o.prototype=Object.create(i.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Ee(o,i)},v(e)}function R(e,t){if(e==null)return{};var n={},i=Object.keys(e),o,s;for(s=0;s<i.length;s++)o=i[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Y(e,t){if(e==null)return{};var n=R(e,t),i,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)i=s[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function H(e,t){return t||(t=e.slice(0)),e.raw=t,e}function J(e,t){return jt(e)||p(e,t)||xt(e,t)||mt()}function K(e){return Ge(e)||Ke(e)||xt(e)||Yt()}function Ge(e){if(Array.isArray(e))return At(e)}function jt(e){if(Array.isArray(e))return e}function Ke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xt(e,t){if(e){if(typeof e=="string")return At(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return At(e,t)}}function At(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Yt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function je(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=xt(e))||t){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ce(e,t){for(var n=Object.keys(t),i=0,o=n;i<o.length;i++){var s=o[i];if(e[s]!==t[s])return!1}return!0}var Jr=new Set;function er(e,t,n){if(n===void 0&&(n=""),!Jr.has(e)){Jr.add(e);var i=we(1,2),o=i.internal,s=i.trace;o||console.warn(n+"`"+e+"` has been deprecated, please migrate to `"+t+"`\n"+s)}}function we(e,t){var n=Error.stackTraceLimit,i=Error.prepareStackTrace,o;if(Error.stackTraceLimit=1+e+t,Error.prepareStackTrace=function(A,d){o=d},new Error().stack,Error.stackTraceLimit=n,Error.prepareStackTrace=i,!o)return{internal:!1,trace:""};var s=o.slice(1+e,1+e+t);return{internal:/[\\/]@babel[\\/]/.test(s[1].getFileName()),trace:s.map(function(A){return" at "+A}).join(`
`)}}function vt(e,t){return!e||e.type!=="ArrayExpression"?!1:t==null||ce(e,t)}function zt(e,t){return!e||e.type!=="AssignmentExpression"?!1:t==null||ce(e,t)}function $t(e,t){return!e||e.type!=="BinaryExpression"?!1:t==null||ce(e,t)}function cr(e,t){return!e||e.type!=="InterpreterDirective"?!1:t==null||ce(e,t)}function Xe(e,t){return!e||e.type!=="Directive"?!1:t==null||ce(e,t)}function rt(e,t){return!e||e.type!=="DirectiveLiteral"?!1:t==null||ce(e,t)}function at(e,t){return!e||e.type!=="BlockStatement"?!1:t==null||ce(e,t)}function Ft(e,t){return!e||e.type!=="BreakStatement"?!1:t==null||ce(e,t)}function Jt(e,t){return!e||e.type!=="CallExpression"?!1:t==null||ce(e,t)}function Et(e,t){return!e||e.type!=="CatchClause"?!1:t==null||ce(e,t)}function ya(e,t){return!e||e.type!=="ConditionalExpression"?!1:t==null||ce(e,t)}function Vt(e,t){return!e||e.type!=="ContinueStatement"?!1:t==null||ce(e,t)}function Ln(e,t){return!e||e.type!=="DebuggerStatement"?!1:t==null||ce(e,t)}function vn(e,t){return!e||e.type!=="DoWhileStatement"?!1:t==null||ce(e,t)}function xn(e,t){return!e||e.type!=="EmptyStatement"?!1:t==null||ce(e,t)}function cn(e,t){return!e||e.type!=="ExpressionStatement"?!1:t==null||ce(e,t)}function Tt(e,t){return!e||e.type!=="File"?!1:t==null||ce(e,t)}function jr(e,t){return!e||e.type!=="ForInStatement"?!1:t==null||ce(e,t)}function Ir(e,t){return!e||e.type!=="ForStatement"?!1:t==null||ce(e,t)}function Aa(e,t){return!e||e.type!=="FunctionDeclaration"?!1:t==null||ce(e,t)}function Zr(e,t){return!e||e.type!=="FunctionExpression"?!1:t==null||ce(e,t)}function Ut(e,t){return!e||e.type!=="Identifier"?!1:t==null||ce(e,t)}function es(e,t){return!e||e.type!=="IfStatement"?!1:t==null||ce(e,t)}function Hr(e,t){return!e||e.type!=="LabeledStatement"?!1:t==null||ce(e,t)}function Br(e,t){return!e||e.type!=="StringLiteral"?!1:t==null||ce(e,t)}function na(e,t){return!e||e.type!=="NumericLiteral"?!1:t==null||ce(e,t)}function Sa(e,t){return!e||e.type!=="NullLiteral"?!1:t==null||ce(e,t)}function yt(e,t){return!e||e.type!=="BooleanLiteral"?!1:t==null||ce(e,t)}function Kt(e,t){return!e||e.type!=="RegExpLiteral"?!1:t==null||ce(e,t)}function be(e,t){return!e||e.type!=="LogicalExpression"?!1:t==null||ce(e,t)}function Gt(e,t){return!e||e.type!=="MemberExpression"?!1:t==null||ce(e,t)}function _r(e,t){return!e||e.type!=="NewExpression"?!1:t==null||ce(e,t)}function kr(e,t){return!e||e.type!=="Program"?!1:t==null||ce(e,t)}function Tr(e,t){return!e||e.type!=="ObjectExpression"?!1:t==null||ce(e,t)}function Dn(e,t){return!e||e.type!=="ObjectMethod"?!1:t==null||ce(e,t)}function ka(e,t){return!e||e.type!=="ObjectProperty"?!1:t==null||ce(e,t)}function Wr(e,t){return!e||e.type!=="RestElement"?!1:t==null||ce(e,t)}function Fr(e,t){return!e||e.type!=="ReturnStatement"?!1:t==null||ce(e,t)}function sa(e,t){return!e||e.type!=="SequenceExpression"?!1:t==null||ce(e,t)}function Nr(e,t){return!e||e.type!=="ParenthesizedExpression"?!1:t==null||ce(e,t)}function Or(e,t){return!e||e.type!=="SwitchCase"?!1:t==null||ce(e,t)}function it(e,t){return!e||e.type!=="SwitchStatement"?!1:t==null||ce(e,t)}function nt(e,t){return!e||e.type!=="ThisExpression"?!1:t==null||ce(e,t)}function Er(e,t){return!e||e.type!=="ThrowStatement"?!1:t==null||ce(e,t)}function or(e,t){return!e||e.type!=="TryStatement"?!1:t==null||ce(e,t)}function Cn(e,t){return!e||e.type!=="UnaryExpression"?!1:t==null||ce(e,t)}function Qs(e,t){return!e||e.type!=="UpdateExpression"?!1:t==null||ce(e,t)}function Mn(e,t){return!e||e.type!=="VariableDeclaration"?!1:t==null||ce(e,t)}function jo(e,t){return!e||e.type!=="VariableDeclarator"?!1:t==null||ce(e,t)}function Vn(e,t){return!e||e.type!=="WhileStatement"?!1:t==null||ce(e,t)}function Fi(e,t){return!e||e.type!=="WithStatement"?!1:t==null||ce(e,t)}function _a(e,t){return!e||e.type!=="AssignmentPattern"?!1:t==null||ce(e,t)}function lt(e,t){return!e||e.type!=="ArrayPattern"?!1:t==null||ce(e,t)}function ee(e,t){return!e||e.type!=="ArrowFunctionExpression"?!1:t==null||ce(e,t)}function De(e,t){return!e||e.type!=="ClassBody"?!1:t==null||ce(e,t)}function me(e,t){return!e||e.type!=="ClassExpression"?!1:t==null||ce(e,t)}function We(e,t){return!e||e.type!=="ClassDeclaration"?!1:t==null||ce(e,t)}function ut(e,t){return!e||e.type!=="ExportAllDeclaration"?!1:t==null||ce(e,t)}function qt(e,t){return!e||e.type!=="ExportDefaultDeclaration"?!1:t==null||ce(e,t)}function tr(e,t){return!e||e.type!=="ExportNamedDeclaration"?!1:t==null||ce(e,t)}function Lr(e,t){return!e||e.type!=="ExportSpecifier"?!1:t==null||ce(e,t)}function Ea(e,t){return!e||e.type!=="ForOfStatement"?!1:t==null||ce(e,t)}function rs(e,t){return!e||e.type!=="ImportDeclaration"?!1:t==null||ce(e,t)}function Kn(e,t){return!e||e.type!=="ImportDefaultSpecifier"?!1:t==null||ce(e,t)}function Es(e,t){return!e||e.type!=="ImportNamespaceSpecifier"?!1:t==null||ce(e,t)}function Pa(e,t){return!e||e.type!=="ImportSpecifier"?!1:t==null||ce(e,t)}function Mi(e,t){return!e||e.type!=="ImportExpression"?!1:t==null||ce(e,t)}function bo(e,t){return!e||e.type!=="MetaProperty"?!1:t==null||ce(e,t)}function SA(e,t){return!e||e.type!=="ClassMethod"?!1:t==null||ce(e,t)}function Ai(e,t){return!e||e.type!=="ObjectPattern"?!1:t==null||ce(e,t)}function ki(e,t){return!e||e.type!=="SpreadElement"?!1:t==null||ce(e,t)}function _i(e,t){return!e||e.type!=="Super"?!1:t==null||ce(e,t)}function zc(e,t){return!e||e.type!=="TaggedTemplateExpression"?!1:t==null||ce(e,t)}function $l(e,t){return!e||e.type!=="TemplateElement"?!1:t==null||ce(e,t)}function go(e,t){return!e||e.type!=="TemplateLiteral"?!1:t==null||ce(e,t)}function kA(e,t){return!e||e.type!=="YieldExpression"?!1:t==null||ce(e,t)}function Nl(e,t){return!e||e.type!=="AwaitExpression"?!1:t==null||ce(e,t)}function Au(e,t){return!e||e.type!=="Import"?!1:t==null||ce(e,t)}function fd(e,t){return!e||e.type!=="BigIntLiteral"?!1:t==null||ce(e,t)}function Xc(e,t){return!e||e.type!=="ExportNamespaceSpecifier"?!1:t==null||ce(e,t)}function _A(e,t){return!e||e.type!=="OptionalMemberExpression"?!1:t==null||ce(e,t)}function Yc(e,t){return!e||e.type!=="OptionalCallExpression"?!1:t==null||ce(e,t)}function TA(e,t){return!e||e.type!=="ClassProperty"?!1:t==null||ce(e,t)}function Ui(e,t){return!e||e.type!=="ClassAccessorProperty"?!1:t==null||ce(e,t)}function pd(e,t){return!e||e.type!=="ClassPrivateProperty"?!1:t==null||ce(e,t)}function Qc(e,t){return!e||e.type!=="ClassPrivateMethod"?!1:t==null||ce(e,t)}function Ia(e,t){return!e||e.type!=="PrivateName"?!1:t==null||ce(e,t)}function Ll(e,t){return!e||e.type!=="StaticBlock"?!1:t==null||ce(e,t)}function ln(e,t){return!e||e.type!=="AnyTypeAnnotation"?!1:t==null||ce(e,t)}function Al(e,t){return!e||e.type!=="ArrayTypeAnnotation"?!1:t==null||ce(e,t)}function nf(e,t){return!e||e.type!=="BooleanTypeAnnotation"?!1:t==null||ce(e,t)}function li(e,t){return!e||e.type!=="BooleanLiteralTypeAnnotation"?!1:t==null||ce(e,t)}function xd(e,t){return!e||e.type!=="NullLiteralTypeAnnotation"?!1:t==null||ce(e,t)}function sf(e,t){return!e||e.type!=="ClassImplements"?!1:t==null||ce(e,t)}function Sp(e,t){return!e||e.type!=="DeclareClass"?!1:t==null||ce(e,t)}function of(e,t){return!e||e.type!=="DeclareFunction"?!1:t==null||ce(e,t)}function uf(e,t){return!e||e.type!=="DeclareInterface"?!1:t==null||ce(e,t)}function Jc(e,t){return!e||e.type!=="DeclareModule"?!1:t==null||ce(e,t)}function Yu(e,t){return!e||e.type!=="DeclareModuleExports"?!1:t==null||ce(e,t)}function Af(e,t){return!e||e.type!=="DeclareTypeAlias"?!1:t==null||ce(e,t)}function Zc(e,t){return!e||e.type!=="DeclareOpaqueType"?!1:t==null||ce(e,t)}function vD(e,t){return!e||e.type!=="DeclareVariable"?!1:t==null||ce(e,t)}function eo(e,t){return!e||e.type!=="DeclareExportDeclaration"?!1:t==null||ce(e,t)}function lf(e,t){return!e||e.type!=="DeclareExportAllDeclaration"?!1:t==null||ce(e,t)}function e0(e,t){return!e||e.type!=="DeclaredPredicate"?!1:t==null||ce(e,t)}function Jd(e,t){return!e||e.type!=="ExistsTypeAnnotation"?!1:t==null||ce(e,t)}function kp(e,t){return!e||e.type!=="FunctionTypeAnnotation"?!1:t==null||ce(e,t)}function df(e,t){return!e||e.type!=="FunctionTypeParam"?!1:t==null||ce(e,t)}function cf(e,t){return!e||e.type!=="GenericTypeAnnotation"?!1:t==null||ce(e,t)}function Dd(e,t){return!e||e.type!=="InferredPredicate"?!1:t==null||ce(e,t)}function _p(e,t){return!e||e.type!=="InterfaceExtends"?!1:t==null||ce(e,t)}function Zd(e,t){return!e||e.type!=="InterfaceDeclaration"?!1:t==null||ce(e,t)}function Ml(e,t){return!e||e.type!=="InterfaceTypeAnnotation"?!1:t==null||ce(e,t)}function ff(e,t){return!e||e.type!=="IntersectionTypeAnnotation"?!1:t==null||ce(e,t)}function ec(e,t){return!e||e.type!=="MixedTypeAnnotation"?!1:t==null||ce(e,t)}function pf(e,t){return!e||e.type!=="EmptyTypeAnnotation"?!1:t==null||ce(e,t)}function xf(e,t){return!e||e.type!=="NullableTypeAnnotation"?!1:t==null||ce(e,t)}function ll(e,t){return!e||e.type!=="NumberLiteralTypeAnnotation"?!1:t==null||ce(e,t)}function Df(e,t){return!e||e.type!=="NumberTypeAnnotation"?!1:t==null||ce(e,t)}function CD(e,t){return!e||e.type!=="ObjectTypeAnnotation"?!1:t==null||ce(e,t)}function Ua(e,t){return!e||e.type!=="ObjectTypeInternalSlot"?!1:t==null||ce(e,t)}function $s(e,t){return!e||e.type!=="ObjectTypeCallProperty"?!1:t==null||ce(e,t)}function Tp(e,t){return!e||e.type!=="ObjectTypeIndexer"?!1:t==null||ce(e,t)}function tc(e,t){return!e||e.type!=="ObjectTypeProperty"?!1:t==null||ce(e,t)}function bD(e,t){return!e||e.type!=="ObjectTypeSpreadProperty"?!1:t==null||ce(e,t)}function t0(e,t){return!e||e.type!=="OpaqueType"?!1:t==null||ce(e,t)}function ku(e,t){return!e||e.type!=="QualifiedTypeIdentifier"?!1:t==null||ce(e,t)}function hd(e,t){return!e||e.type!=="StringLiteralTypeAnnotation"?!1:t==null||ce(e,t)}function r0(e,t){return!e||e.type!=="StringTypeAnnotation"?!1:t==null||ce(e,t)}function wp(e,t){return!e||e.type!=="SymbolTypeAnnotation"?!1:t==null||ce(e,t)}function Js(e,t){return!e||e.type!=="ThisTypeAnnotation"?!1:t==null||ce(e,t)}function wA(e,t){return!e||e.type!=="TupleTypeAnnotation"?!1:t==null||ce(e,t)}function PA(e,t){return!e||e.type!=="TypeofTypeAnnotation"?!1:t==null||ce(e,t)}function hf(e,t){return!e||e.type!=="TypeAlias"?!1:t==null||ce(e,t)}function a0(e,t){return!e||e.type!=="TypeAnnotation"?!1:t==null||ce(e,t)}function Gi(e,t){return!e||e.type!=="TypeCastExpression"?!1:t==null||ce(e,t)}function jf(e,t){return!e||e.type!=="TypeParameter"?!1:t==null||ce(e,t)}function Pp(e,t){return!e||e.type!=="TypeParameterDeclaration"?!1:t==null||ce(e,t)}function Ip(e,t){return!e||e.type!=="TypeParameterInstantiation"?!1:t==null||ce(e,t)}function gf(e,t){return!e||e.type!=="UnionTypeAnnotation"?!1:t==null||ce(e,t)}function Op(e,t){return!e||e.type!=="Variance"?!1:t==null||ce(e,t)}function mf(e,t){return!e||e.type!=="VoidTypeAnnotation"?!1:t==null||ce(e,t)}function Go(e,t){return!e||e.type!=="EnumDeclaration"?!1:t==null||ce(e,t)}function rc(e,t){return!e||e.type!=="EnumBooleanBody"?!1:t==null||ce(e,t)}function qo(e,t){return!e||e.type!=="EnumNumberBody"?!1:t==null||ce(e,t)}function $p(e,t){return!e||e.type!=="EnumStringBody"?!1:t==null||ce(e,t)}function yf(e,t){return!e||e.type!=="EnumSymbolBody"?!1:t==null||ce(e,t)}function co(e,t){return!e||e.type!=="EnumBooleanMember"?!1:t==null||ce(e,t)}function dl(e,t){return!e||e.type!=="EnumNumberMember"?!1:t==null||ce(e,t)}function IA(e,t){return!e||e.type!=="EnumStringMember"?!1:t==null||ce(e,t)}function Fs(e,t){return!e||e.type!=="EnumDefaultedMember"?!1:t==null||ce(e,t)}function _u(e,t){return!e||e.type!=="IndexedAccessType"?!1:t==null||ce(e,t)}function Ef(e,t){return!e||e.type!=="OptionalIndexedAccessType"?!1:t==null||ce(e,t)}function cl(e,t){return!e||e.type!=="JSXAttribute"?!1:t==null||ce(e,t)}function Ff(e,t){return!e||e.type!=="JSXClosingElement"?!1:t==null||ce(e,t)}function ac(e,t){return!e||e.type!=="JSXElement"?!1:t==null||ce(e,t)}function vf(e,t){return!e||e.type!=="JSXEmptyExpression"?!1:t==null||ce(e,t)}function OA(e,t){return!e||e.type!=="JSXExpressionContainer"?!1:t==null||ce(e,t)}function re(e,t){return!e||e.type!=="JSXSpreadChild"?!1:t==null||ce(e,t)}function L(e,t){return!e||e.type!=="JSXIdentifier"?!1:t==null||ce(e,t)}function le(e,t){return!e||e.type!=="JSXMemberExpression"?!1:t==null||ce(e,t)}function Pe(e,t){return!e||e.type!=="JSXNamespacedName"?!1:t==null||ce(e,t)}function X(e,t){return!e||e.type!=="JSXOpeningElement"?!1:t==null||ce(e,t)}function F(e,t){return!e||e.type!=="JSXSpreadAttribute"?!1:t==null||ce(e,t)}function G(e,t){return!e||e.type!=="JSXText"?!1:t==null||ce(e,t)}function ie(e,t){return!e||e.type!=="JSXFragment"?!1:t==null||ce(e,t)}function _e(e,t){return!e||e.type!=="JSXOpeningFragment"?!1:t==null||ce(e,t)}function dt(e,t){return!e||e.type!=="JSXClosingFragment"?!1:t==null||ce(e,t)}function Pt(e,t){return!e||e.type!=="Noop"?!1:t==null||ce(e,t)}function nr(e,t){return!e||e.type!=="Placeholder"?!1:t==null||ce(e,t)}function vr(e,t){return!e||e.type!=="V8IntrinsicIdentifier"?!1:t==null||ce(e,t)}function Ta(e,t){return!e||e.type!=="ArgumentPlaceholder"?!1:t==null||ce(e,t)}function Wa(e,t){return!e||e.type!=="BindExpression"?!1:t==null||ce(e,t)}function Ws(e,t){return!e||e.type!=="ImportAttribute"?!1:t==null||ce(e,t)}function Ti(e,t){return!e||e.type!=="Decorator"?!1:t==null||ce(e,t)}function Qu(e,t){return!e||e.type!=="DoExpression"?!1:t==null||ce(e,t)}function Ul(e,t){return!e||e.type!=="ExportDefaultSpecifier"?!1:t==null||ce(e,t)}function n0(e,t){return!e||e.type!=="RecordExpression"?!1:t==null||ce(e,t)}function Np(e,t){return!e||e.type!=="TupleExpression"?!1:t==null||ce(e,t)}function my(e,t){return!e||e.type!=="DecimalLiteral"?!1:t==null||ce(e,t)}function lj(e,t){return!e||e.type!=="ModuleExpression"?!1:t==null||ce(e,t)}function dj(e,t){return!e||e.type!=="TopicReference"?!1:t==null||ce(e,t)}function to(e,t){return!e||e.type!=="PipelineTopicExpression"?!1:t==null||ce(e,t)}function Zk(e,t){return!e||e.type!=="PipelineBareFunction"?!1:t==null||ce(e,t)}function e_(e,t){return!e||e.type!=="PipelinePrimaryTopicReference"?!1:t==null||ce(e,t)}function yy(e,t){return!e||e.type!=="TSParameterProperty"?!1:t==null||ce(e,t)}function Ab(e,t){return!e||e.type!=="TSDeclareFunction"?!1:t==null||ce(e,t)}function s0(e,t){return!e||e.type!=="TSDeclareMethod"?!1:t==null||ce(e,t)}function cj(e,t){return!e||e.type!=="TSQualifiedName"?!1:t==null||ce(e,t)}function t_(e,t){return!e||e.type!=="TSCallSignatureDeclaration"?!1:t==null||ce(e,t)}function r_(e,t){return!e||e.type!=="TSConstructSignatureDeclaration"?!1:t==null||ce(e,t)}function a_(e,t){return!e||e.type!=="TSPropertySignature"?!1:t==null||ce(e,t)}function Lp(e,t){return!e||e.type!=="TSMethodSignature"?!1:t==null||ce(e,t)}function Gl(e,t){return!e||e.type!=="TSIndexSignature"?!1:t==null||ce(e,t)}function Ey(e,t){return!e||e.type!=="TSAnyKeyword"?!1:t==null||ce(e,t)}function n_(e,t){return!e||e.type!=="TSBooleanKeyword"?!1:t==null||ce(e,t)}function s_(e,t){return!e||e.type!=="TSBigIntKeyword"?!1:t==null||ce(e,t)}function i_(e,t){return!e||e.type!=="TSIntrinsicKeyword"?!1:t==null||ce(e,t)}function o_(e,t){return!e||e.type!=="TSNeverKeyword"?!1:t==null||ce(e,t)}function u_(e,t){return!e||e.type!=="TSNullKeyword"?!1:t==null||ce(e,t)}function i0(e,t){return!e||e.type!=="TSNumberKeyword"?!1:t==null||ce(e,t)}function Bt(e,t){return!e||e.type!=="TSObjectKeyword"?!1:t==null||ce(e,t)}function ur(e,t){return!e||e.type!=="TSStringKeyword"?!1:t==null||ce(e,t)}function Wt(e,t){return!e||e.type!=="TSSymbolKeyword"?!1:t==null||ce(e,t)}function la(e,t){return!e||e.type!=="TSUndefinedKeyword"?!1:t==null||ce(e,t)}function bn(e,t){return!e||e.type!=="TSUnknownKeyword"?!1:t==null||ce(e,t)}function Ts(e,t){return!e||e.type!=="TSVoidKeyword"?!1:t==null||ce(e,t)}function mo(e,t){return!e||e.type!=="TSThisType"?!1:t==null||ce(e,t)}function Zs(e,t){return!e||e.type!=="TSFunctionType"?!1:t==null||ce(e,t)}function Fy(e,t){return!e||e.type!=="TSConstructorType"?!1:t==null||ce(e,t)}function vy(e,t){return!e||e.type!=="TSTypeReference"?!1:t==null||ce(e,t)}function fl(e,t){return!e||e.type!=="TSTypePredicate"?!1:t==null||ce(e,t)}function fj(e,t){return!e||e.type!=="TSTypeQuery"?!1:t==null||ce(e,t)}function A_(e,t){return!e||e.type!=="TSTypeLiteral"?!1:t==null||ce(e,t)}function Cf(e,t){return!e||e.type!=="TSArrayType"?!1:t==null||ce(e,t)}function pj(e,t){return!e||e.type!=="TSTupleType"?!1:t==null||ce(e,t)}function xj(e,t){return!e||e.type!=="TSOptionalType"?!1:t==null||ce(e,t)}function Us(e,t){return!e||e.type!=="TSRestType"?!1:t==null||ce(e,t)}function l_(e,t){return!e||e.type!=="TSNamedTupleMember"?!1:t==null||ce(e,t)}function Cy(e,t){return!e||e.type!=="TSUnionType"?!1:t==null||ce(e,t)}function Dj(e,t){return!e||e.type!=="TSIntersectionType"?!1:t==null||ce(e,t)}function d_(e,t){return!e||e.type!=="TSConditionalType"?!1:t==null||ce(e,t)}function c_(e,t){return!e||e.type!=="TSInferType"?!1:t==null||ce(e,t)}function f_(e,t){return!e||e.type!=="TSParenthesizedType"?!1:t==null||ce(e,t)}function hj(e,t){return!e||e.type!=="TSTypeOperator"?!1:t==null||ce(e,t)}function o0(e,t){return!e||e.type!=="TSIndexedAccessType"?!1:t==null||ce(e,t)}function jj(e,t){return!e||e.type!=="TSMappedType"?!1:t==null||ce(e,t)}function lb(e,t){return!e||e.type!=="TSLiteralType"?!1:t==null||ce(e,t)}function gj(e,t){return!e||e.type!=="TSExpressionWithTypeArguments"?!1:t==null||ce(e,t)}function db(e,t){return!e||e.type!=="TSInterfaceDeclaration"?!1:t==null||ce(e,t)}function by(e,t){return!e||e.type!=="TSInterfaceBody"?!1:t==null||ce(e,t)}function mj(e,t){return!e||e.type!=="TSTypeAliasDeclaration"?!1:t==null||ce(e,t)}function cb(e,t){return!e||e.type!=="TSInstantiationExpression"?!1:t==null||ce(e,t)}function Mp(e,t){return!e||e.type!=="TSAsExpression"?!1:t==null||ce(e,t)}function u0(e,t){return!e||e.type!=="TSSatisfiesExpression"?!1:t==null||ce(e,t)}function BD(e,t){return!e||e.type!=="TSTypeAssertion"?!1:t==null||ce(e,t)}function fb(e,t){return!e||e.type!=="TSEnumDeclaration"?!1:t==null||ce(e,t)}function p_(e,t){return!e||e.type!=="TSEnumMember"?!1:t==null||ce(e,t)}function x_(e,t){return!e||e.type!=="TSModuleDeclaration"?!1:t==null||ce(e,t)}function RD(e,t){return!e||e.type!=="TSModuleBlock"?!1:t==null||ce(e,t)}function yj(e,t){return!e||e.type!=="TSImportType"?!1:t==null||ce(e,t)}function By(e,t){return!e||e.type!=="TSImportEqualsDeclaration"?!1:t==null||ce(e,t)}function D_(e,t){return!e||e.type!=="TSExternalModuleReference"?!1:t==null||ce(e,t)}function Ry(e,t){return!e||e.type!=="TSNonNullExpression"?!1:t==null||ce(e,t)}function h_(e,t){return!e||e.type!=="TSExportAssignment"?!1:t==null||ce(e,t)}function j_(e,t){return!e||e.type!=="TSNamespaceExportDeclaration"?!1:t==null||ce(e,t)}function ro(e,t){return!e||e.type!=="TSTypeAnnotation"?!1:t==null||ce(e,t)}function lu(e,t){return!e||e.type!=="TSTypeParameterInstantiation"?!1:t==null||ce(e,t)}function g_(e,t){return!e||e.type!=="TSTypeParameterDeclaration"?!1:t==null||ce(e,t)}function m_(e,t){return!e||e.type!=="TSTypeParameter"?!1:t==null||ce(e,t)}function pb(e,t){if(!e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"InterpreterDirective":case"Directive":case"DirectiveLiteral":case"BlockStatement":case"BreakStatement":case"CallExpression":case"CatchClause":case"ConditionalExpression":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"File":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Identifier":case"IfStatement":case"LabeledStatement":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"Program":case"ObjectExpression":case"ObjectMethod":case"ObjectProperty":case"RestElement":case"ReturnStatement":case"SequenceExpression":case"ParenthesizedExpression":case"SwitchCase":case"SwitchStatement":case"ThisExpression":case"ThrowStatement":case"TryStatement":case"UnaryExpression":case"UpdateExpression":case"VariableDeclaration":case"VariableDeclarator":case"WhileStatement":case"WithStatement":case"AssignmentPattern":case"ArrayPattern":case"ArrowFunctionExpression":case"ClassBody":case"ClassExpression":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportSpecifier":case"ForOfStatement":case"ImportDeclaration":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ImportExpression":case"MetaProperty":case"ClassMethod":case"ObjectPattern":case"SpreadElement":case"Super":case"TaggedTemplateExpression":case"TemplateElement":case"TemplateLiteral":case"YieldExpression":case"AwaitExpression":case"Import":case"BigIntLiteral":case"ExportNamespaceSpecifier":case"OptionalMemberExpression":case"OptionalCallExpression":case"ClassProperty":case"ClassAccessorProperty":case"ClassPrivateProperty":case"ClassPrivateMethod":case"PrivateName":case"StaticBlock":break;case"Placeholder":switch(e.expectedNode){case"Identifier":case"StringLiteral":case"BlockStatement":case"ClassBody":break;default:return!1}break;default:return!1}return t==null||ce(e,t)}function jd(e,t){if(!e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ParenthesizedExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":case"ArrowFunctionExpression":case"ClassExpression":case"ImportExpression":case"MetaProperty":case"Super":case"TaggedTemplateExpression":case"TemplateLiteral":case"YieldExpression":case"AwaitExpression":case"Import":case"BigIntLiteral":case"OptionalMemberExpression":case"OptionalCallExpression":case"TypeCastExpression":case"JSXElement":case"JSXFragment":case"BindExpression":case"DoExpression":case"RecordExpression":case"TupleExpression":case"DecimalLiteral":case"ModuleExpression":case"TopicReference":case"PipelineTopicExpression":case"PipelineBareFunction":case"PipelinePrimaryTopicReference":case"TSInstantiationExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(e.expectedNode){case"Expression":case"Identifier":case"StringLiteral":break;default:return!1}break;default:return!1}return t==null||ce(e,t)}function SD(e,t){if(!e)return!1;switch(e.type){case"BinaryExpression":case"LogicalExpression":break;default:return!1}return t==null||ce(e,t)}function Up(e,t){if(!e)return!1;switch(e.type){case"BlockStatement":case"CatchClause":case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Program":case"ObjectMethod":case"SwitchStatement":case"WhileStatement":case"ArrowFunctionExpression":case"ClassExpression":case"ClassDeclaration":case"ForOfStatement":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;case"Placeholder":if(e.expectedNode==="BlockStatement")break;default:return!1}return t==null||ce(e,t)}function Sy(e,t){if(!e)return!1;switch(e.type){case"BlockStatement":case"CatchClause":case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Program":case"ObjectMethod":case"SwitchStatement":case"WhileStatement":case"ArrowFunctionExpression":case"ForOfStatement":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;case"Placeholder":if(e.expectedNode==="BlockStatement")break;default:return!1}return t==null||ce(e,t)}function Gp(e,t){if(!e)return!1;switch(e.type){case"BlockStatement":case"Program":case"TSModuleBlock":break;case"Placeholder":if(e.expectedNode==="BlockStatement")break;default:return!1}return t==null||ce(e,t)}function Tu(e,t){if(!e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ForOfStatement":case"ImportDeclaration":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":case"EnumDeclaration":case"TSDeclareFunction":case"TSInterfaceDeclaration":case"TSTypeAliasDeclaration":case"TSEnumDeclaration":case"TSModuleDeclaration":case"TSImportEqualsDeclaration":case"TSExportAssignment":case"TSNamespaceExportDeclaration":break;case"Placeholder":switch(e.expectedNode){case"Statement":case"Declaration":case"BlockStatement":break;default:return!1}break;default:return!1}return t==null||ce(e,t)}function kD(e,t){if(!e)return!1;switch(e.type){case"BreakStatement":case"ContinueStatement":case"ReturnStatement":case"ThrowStatement":case"YieldExpression":case"AwaitExpression":break;default:return!1}return t==null||ce(e,t)}function Ej(e,t){if(!e)return!1;switch(e.type){case"BreakStatement":case"ContinueStatement":case"ReturnStatement":case"ThrowStatement":break;default:return!1}return t==null||ce(e,t)}function qp(e,t){if(!e)return!1;switch(e.type){case"ConditionalExpression":case"IfStatement":break;default:return!1}return t==null||ce(e,t)}function y_(e,t){if(!e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":case"ForOfStatement":break;default:return!1}return t==null||ce(e,t)}function E_(e,t){if(!e)return!1;switch(e.type){case"DoWhileStatement":case"WhileStatement":break;default:return!1}return t==null||ce(e,t)}function F_(e,t){if(!e)return!1;switch(e.type){case"ExpressionStatement":case"ParenthesizedExpression":case"TypeCastExpression":break;default:return!1}return t==null||ce(e,t)}function xb(e,t){if(!e)return!1;switch(e.type){case"ForInStatement":case"ForStatement":case"ForOfStatement":break;default:return!1}return t==null||ce(e,t)}function _D(e,t){if(!e)return!1;switch(e.type){case"ForInStatement":case"ForOfStatement":break;default:return!1}return t==null||ce(e,t)}function Ho(e,t){if(!e)return!1;switch(e.type){case"FunctionDeclaration":case"FunctionExpression":case"ObjectMethod":case"ArrowFunctionExpression":case"ClassMethod":case"ClassPrivateMethod":break;default:return!1}return t==null||ce(e,t)}function TD(e,t){if(!e)return!1;switch(e.type){case"FunctionDeclaration":case"FunctionExpression":case"ObjectMethod":case"ArrowFunctionExpression":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;default:return!1}return t==null||ce(e,t)}function wD(e,t){if(!e)return!1;switch(e.type){case"FunctionDeclaration":case"FunctionExpression":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"ArrowFunctionExpression":case"BigIntLiteral":case"DecimalLiteral":break;case"Placeholder":if(e.expectedNode==="StringLiteral")break;default:return!1}return t==null||ce(e,t)}function Be(e,t){if(!e)return!1;switch(e.type){case"FunctionDeclaration":case"VariableDeclaration":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ImportDeclaration":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":case"EnumDeclaration":case"TSDeclareFunction":case"TSInterfaceDeclaration":case"TSTypeAliasDeclaration":case"TSEnumDeclaration":case"TSModuleDeclaration":break;case"Placeholder":if(e.expectedNode==="Declaration")break;default:return!1}return t==null||ce(e,t)}function Hp(e,t){if(!e)return!1;switch(e.type){case"Identifier":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(e.expectedNode){case"Pattern":case"Identifier":break;default:return!1}break;default:return!1}return t==null||ce(e,t)}function Fj(e,t){if(!e)return!1;switch(e.type){case"Identifier":case"MemberExpression":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"TSParameterProperty":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(e.expectedNode){case"Pattern":case"Identifier":break;default:return!1}break;default:return!1}return t==null||ce(e,t)}function pl(e,t){if(!e)return!1;switch(e.type){case"Identifier":case"TSQualifiedName":break;case"Placeholder":if(e.expectedNode==="Identifier")break;default:return!1}return t==null||ce(e,t)}function za(e,t){if(!e)return!1;switch(e.type){case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"TemplateLiteral":case"BigIntLiteral":case"DecimalLiteral":break;case"Placeholder":if(e.expectedNode==="StringLiteral")break;default:return!1}return t==null||ce(e,t)}function v_(e,t){if(!e)return!1;switch(e.type){case"ObjectMethod":case"ObjectProperty":case"ObjectTypeInternalSlot":case"ObjectTypeCallProperty":case"ObjectTypeIndexer":case"ObjectTypeProperty":case"ObjectTypeSpreadProperty":break;default:return!1}return t==null||ce(e,t)}function PD(e,t){if(!e)return!1;switch(e.type){case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":break;default:return!1}return t==null||ce(e,t)}function C_(e,t){if(!e)return!1;switch(e.type){case"ObjectMethod":case"ObjectProperty":break;default:return!1}return t==null||ce(e,t)}function A0(e,t){if(!e)return!1;switch(e.type){case"ObjectProperty":case"ClassProperty":case"ClassAccessorProperty":case"ClassPrivateProperty":break;default:return!1}return t==null||ce(e,t)}function b_(e,t){if(!e)return!1;switch(e.type){case"UnaryExpression":case"SpreadElement":break;default:return!1}return t==null||ce(e,t)}function Ju(e,t){if(!e)return!1;switch(e.type){case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":break;case"Placeholder":if(e.expectedNode==="Pattern")break;default:return!1}return t==null||ce(e,t)}function Vp(e,t){if(!e)return!1;switch(e.type){case"ClassExpression":case"ClassDeclaration":break;default:return!1}return t==null||ce(e,t)}function Db(e,t){if(!e)return!1;switch(e.type){case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ImportDeclaration":break;default:return!1}return t==null||ce(e,t)}function Kp(e,t){if(!e)return!1;switch(e.type){case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":break;default:return!1}return t==null||ce(e,t)}function gd(e,t){if(!e)return!1;switch(e.type){case"ExportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":break;default:return!1}return t==null||ce(e,t)}function B_(e,t){if(!e)return!1;switch(e.type){case"ClassAccessorProperty":break;default:return!1}return t==null||ce(e,t)}function R_(e,t){if(!e)return!1;switch(e.type){case"ClassPrivateProperty":case"ClassPrivateMethod":case"PrivateName":break;default:return!1}return t==null||ce(e,t)}function ky(e,t){if(!e)return!1;switch(e.type){case"AnyTypeAnnotation":case"ArrayTypeAnnotation":case"BooleanTypeAnnotation":case"BooleanLiteralTypeAnnotation":case"NullLiteralTypeAnnotation":case"ClassImplements":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"DeclaredPredicate":case"ExistsTypeAnnotation":case"FunctionTypeAnnotation":case"FunctionTypeParam":case"GenericTypeAnnotation":case"InferredPredicate":case"InterfaceExtends":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":case"IntersectionTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NullableTypeAnnotation":case"NumberLiteralTypeAnnotation":case"NumberTypeAnnotation":case"ObjectTypeAnnotation":case"ObjectTypeInternalSlot":case"ObjectTypeCallProperty":case"ObjectTypeIndexer":case"ObjectTypeProperty":case"ObjectTypeSpreadProperty":case"OpaqueType":case"QualifiedTypeIdentifier":case"StringLiteralTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"TupleTypeAnnotation":case"TypeofTypeAnnotation":case"TypeAlias":case"TypeAnnotation":case"TypeCastExpression":case"TypeParameter":case"TypeParameterDeclaration":case"TypeParameterInstantiation":case"UnionTypeAnnotation":case"Variance":case"VoidTypeAnnotation":case"EnumDeclaration":case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":case"IndexedAccessType":case"OptionalIndexedAccessType":break;default:return!1}return t==null||ce(e,t)}function hb(e,t){if(!e)return!1;switch(e.type){case"AnyTypeAnnotation":case"ArrayTypeAnnotation":case"BooleanTypeAnnotation":case"BooleanLiteralTypeAnnotation":case"NullLiteralTypeAnnotation":case"ExistsTypeAnnotation":case"FunctionTypeAnnotation":case"GenericTypeAnnotation":case"InterfaceTypeAnnotation":case"IntersectionTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NullableTypeAnnotation":case"NumberLiteralTypeAnnotation":case"NumberTypeAnnotation":case"ObjectTypeAnnotation":case"StringLiteralTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"TupleTypeAnnotation":case"TypeofTypeAnnotation":case"UnionTypeAnnotation":case"VoidTypeAnnotation":case"IndexedAccessType":case"OptionalIndexedAccessType":break;default:return!1}return t==null||ce(e,t)}function _y(e,t){if(!e)return!1;switch(e.type){case"AnyTypeAnnotation":case"BooleanTypeAnnotation":case"NullLiteralTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NumberTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"VoidTypeAnnotation":break;default:return!1}return t==null||ce(e,t)}function nc(e,t){if(!e)return!1;switch(e.type){case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":break;default:return!1}return t==null||ce(e,t)}function S_(e,t){if(!e)return!1;switch(e.type){case"DeclaredPredicate":case"InferredPredicate":break;default:return!1}return t==null||ce(e,t)}function k_(e,t){if(!e)return!1;switch(e.type){case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":break;default:return!1}return t==null||ce(e,t)}function __(e,t){if(!e)return!1;switch(e.type){case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":break;default:return!1}return t==null||ce(e,t)}function T_(e,t){if(!e)return!1;switch(e.type){case"JSXAttribute":case"JSXClosingElement":case"JSXElement":case"JSXEmptyExpression":case"JSXExpressionContainer":case"JSXSpreadChild":case"JSXIdentifier":case"JSXMemberExpression":case"JSXNamespacedName":case"JSXOpeningElement":case"JSXSpreadAttribute":case"JSXText":case"JSXFragment":case"JSXOpeningFragment":case"JSXClosingFragment":break;default:return!1}return t==null||ce(e,t)}function w_(e,t){if(!e)return!1;switch(e.type){case"Noop":case"Placeholder":case"V8IntrinsicIdentifier":break;default:return!1}return t==null||ce(e,t)}function l0(e,t){if(!e)return!1;switch(e.type){case"TSParameterProperty":case"TSDeclareFunction":case"TSDeclareMethod":case"TSQualifiedName":case"TSCallSignatureDeclaration":case"TSConstructSignatureDeclaration":case"TSPropertySignature":case"TSMethodSignature":case"TSIndexSignature":case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSFunctionType":case"TSConstructorType":case"TSTypeReference":case"TSTypePredicate":case"TSTypeQuery":case"TSTypeLiteral":case"TSArrayType":case"TSTupleType":case"TSOptionalType":case"TSRestType":case"TSNamedTupleMember":case"TSUnionType":case"TSIntersectionType":case"TSConditionalType":case"TSInferType":case"TSParenthesizedType":case"TSTypeOperator":case"TSIndexedAccessType":case"TSMappedType":case"TSLiteralType":case"TSExpressionWithTypeArguments":case"TSInterfaceDeclaration":case"TSInterfaceBody":case"TSTypeAliasDeclaration":case"TSInstantiationExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSEnumDeclaration":case"TSEnumMember":case"TSModuleDeclaration":case"TSModuleBlock":case"TSImportType":case"TSImportEqualsDeclaration":case"TSExternalModuleReference":case"TSNonNullExpression":case"TSExportAssignment":case"TSNamespaceExportDeclaration":case"TSTypeAnnotation":case"TSTypeParameterInstantiation":case"TSTypeParameterDeclaration":case"TSTypeParameter":break;default:return!1}return t==null||ce(e,t)}function P_(e,t){if(!e)return!1;switch(e.type){case"TSCallSignatureDeclaration":case"TSConstructSignatureDeclaration":case"TSPropertySignature":case"TSMethodSignature":case"TSIndexSignature":break;default:return!1}return t==null||ce(e,t)}function jb(e,t){if(!e)return!1;switch(e.type){case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSFunctionType":case"TSConstructorType":case"TSTypeReference":case"TSTypePredicate":case"TSTypeQuery":case"TSTypeLiteral":case"TSArrayType":case"TSTupleType":case"TSOptionalType":case"TSRestType":case"TSUnionType":case"TSIntersectionType":case"TSConditionalType":case"TSInferType":case"TSParenthesizedType":case"TSTypeOperator":case"TSIndexedAccessType":case"TSMappedType":case"TSLiteralType":case"TSExpressionWithTypeArguments":case"TSImportType":break;default:return!1}return t==null||ce(e,t)}function xl(e,t){if(!e)return!1;switch(e.type){case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSLiteralType":break;default:return!1}return t==null||ce(e,t)}function I_(e,t){return er("isNumberLiteral","isNumericLiteral"),!e||e.type!=="NumberLiteral"?!1:t==null||ce(e,t)}function O_(e,t){return er("isRegexLiteral","isRegExpLiteral"),!e||e.type!=="RegexLiteral"?!1:t==null||ce(e,t)}function $_(e,t){return er("isRestProperty","isRestElement"),!e||e.type!=="RestProperty"?!1:t==null||ce(e,t)}function N_(e,t){return er("isSpreadProperty","isSpreadElement"),!e||e.type!=="SpreadProperty"?!1:t==null||ce(e,t)}function L_(e,t){return er("isModuleDeclaration","isImportOrExportDeclaration"),Db(e,t)}function Wp(e,t,n){if(!Gt(e))return!1;var i=Array.isArray(t)?t:t.split("."),o=[],s;for(s=e;Gt(s);s=s.object)o.push(s.property);if(o.push(s),o.length<i.length||!n&&o.length>i.length)return!1;for(var A=0,d=o.length-1;A<i.length;A++,d--){var c=o[d],f=void 0;if(Ut(c))f=c.name;else if(Br(c))f=c.value;else if(nt(c))f="this";else return!1;if(i[A]!==f)return!1}return!0}function ID(e,t){var n=e.split(".");return function(i){return Wp(i,n,t)}}var M_=ID("React.Component");function U_(e){return!!e&&/^[a-z]/.test(e)}var ql=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{};function zp(){throw new Error("setTimeout has not been defined")}function OD(){throw new Error("clearTimeout has not been defined")}var d0=zp,sc=OD;typeof ql.setTimeout=="function"&&(d0=setTimeout),typeof ql.clearTimeout=="function"&&(sc=clearTimeout);function gb(e){if(d0===setTimeout)return setTimeout(e,0);if((d0===zp||!d0)&&setTimeout)return d0=setTimeout,setTimeout(e,0);try{return d0(e,0)}catch{try{return d0.call(null,e,0)}catch{return d0.call(this,e,0)}}}function ic(e){if(sc===clearTimeout)return clearTimeout(e);if((sc===OD||!sc)&&clearTimeout)return sc=clearTimeout,clearTimeout(e);try{return sc(e)}catch{try{return sc.call(null,e)}catch{return sc.call(this,e)}}}var Hl=[],Dl=!1,Bo,vj=-1;function mb(){!Dl||!Bo||(Dl=!1,Bo.length?Hl=Bo.concat(Hl):vj=-1,Hl.length&&Ty())}function Ty(){if(!Dl){var e=gb(mb);Dl=!0;for(var t=Hl.length;t;){for(Bo=Hl,Hl=[];++vj<t;)Bo&&Bo[vj].run();vj=-1,t=Hl.length}Bo=null,Dl=!1,ic(e)}}function $D(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Hl.push(new oc(e,t)),Hl.length===1&&!Dl&&gb(Ty)}function oc(e,t){this.fun=e,this.array=t}oc.prototype.run=function(){this.fun.apply(null,this.array)};var yb="browser",G_="browser",Cj=!0,q_={},Eb=[],Vo="",wy={},Fb={},md={};function uc(){}var bj=uc,bf=uc,vb=uc,wu=uc,Py=uc,H_=uc,V_=uc;function K_(e){throw new Error("process.binding is not supported")}function Iy(){return"/"}function W_(e){throw new Error("process.chdir is not supported")}function ND(){return 0}var Bf=ql.performance||{},z_=Bf.now||Bf.mozNow||Bf.msNow||Bf.oNow||Bf.webkitNow||function(){return new Date().getTime()};function X_(e){var t=z_.call(Bf)*.001,n=Math.floor(t),i=Math.floor(t%1*1e9);return e&&(n=n-e[0],i=i-e[1],i<0&&(n--,i+=1e9)),[n,i]}var LD=new Date;function Y_(){var e=new Date,t=e-LD;return t/1e3}var zr={nextTick:$D,title:yb,browser:Cj,env:q_,argv:Eb,version:Vo,versions:wy,on:bj,addListener:bf,once:vb,off:wu,removeListener:Py,removeAllListeners:H_,emit:V_,binding:K_,cwd:Iy,chdir:W_,umask:ND,hrtime:X_,platform:G_,release:Fb,config:md,uptime:Y_},Zu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function c0(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var o=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,o.get?o:{enumerable:!0,get:function(){return e[i]}})}),n}var Oy,Cb;function bb(){if(Cb)return Oy;Cb=1;var e=null;function t(n){if(e!==null&&typeof e.property){var i=e;return e=t.prototype=null,i}return e=t.prototype=n??Object.create(null),new t}return t(),Oy=function(i){return t(i)},Oy}function Bb(e){return e==null?!1:e&&e!=="false"&&e!=="0"}var yd=(Bb(zr.env.BABEL_8_BREAKING),bb());function Bj(e,t){if(e===t)return!0;if(e==null||Qp[t])return!1;var n=ra[t];if(n){if(n[0]===e)return!0;for(var i=je(n),o;!(o=i()).done;){var s=o.value;if(e===s)return!0}}return!1}function Rj(e,t){if(e===t)return!0;var n=fc[e];if(n)for(var i=je(n),o;!(o=i()).done;){var s=o.value;if(t===s)return!0}return!1}function ao(e,t,n){if(!t)return!1;var i=Bj(t.type,e);return i?typeof n>"u"?!0:ce(t,n):!n&&t.type==="Placeholder"&&e in ra?Rj(t.expectedNode,e):!1}var Sj="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",$y="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",kj=new RegExp("["+Sj+"]"),Q_=new RegExp("["+Sj+$y+"]");Sj=$y=null;var Ny=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],Rb=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function Ly(e,t){for(var n=65536,i=0,o=t.length;i<o;i+=2){if(n+=t[i],n>e)return!1;if(n+=t[i+1],n>=e)return!0}return!1}function Vl(e){return e<65?e===36:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&kj.test(String.fromCharCode(e)):Ly(e,Ny)}function f0(e){return e<48?e===36:e<58?!0:e<65?!1:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&Q_.test(String.fromCharCode(e)):Ly(e,Ny)||Ly(e,Rb)}function MD(e){for(var t=!0,n=0;n<e.length;n++){var i=e.charCodeAt(n);if((i&64512)===55296&&n+1<e.length){var o=e.charCodeAt(++n);(o&64512)===56320&&(i=65536+((i&1023)<<10)+(o&1023))}if(t){if(t=!1,!Vl(i))return!1}else if(!f0(i))return!1}return!t}var _j={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},My=new Set(_j.keyword),J_=new Set(_j.strict),Uy=new Set(_j.strictBind);function Un(e,t){return t&&e==="await"||e==="enum"}function Tj(e,t){return Un(e,t)||J_.has(e)}function Sb(e){return Uy.has(e)}function Xp(e,t){return Tj(e,t)||Sb(e)}function UD(e){return My.has(e)}function p0(e,t){return t===void 0&&(t=!0),typeof e!="string"||t&&(UD(e)||Tj(e,!0))?!1:MD(e)}var Z_=function(t){return t>=48&&t<=57},$A={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},wj={bin:function(t){return t===48||t===49},oct:function(t){return t>=48&&t<=55},dec:function(t){return t>=48&&t<=57},hex:function(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}};function Yp(e,t,n,i,o,s){for(var A=n,d=i,c=o,f="",x=null,g=n,m=t.length;;){if(n>=m){s.unterminated(A,d,c),f+=t.slice(g,n);break}var B=t.charCodeAt(n);if(Gy(e,B,t,n)){f+=t.slice(g,n);break}if(B===92){f+=t.slice(g,n);var b=kb(t,n,i,o,e==="template",s);b.ch===null&&!x?x={pos:n,lineStart:i,curLine:o}:f+=b.ch,n=b.pos,i=b.lineStart,o=b.curLine,g=n}else B===8232||B===8233?(++n,++o,i=n):B===10||B===13?e==="template"?(f+=t.slice(g,n)+`
`,++n,B===13&&t.charCodeAt(n)===10&&++n,++o,g=i=n):s.unterminated(A,d,c):++n}return{pos:n,str:f,firstInvalidLoc:x,lineStart:i,curLine:o,containsInvalid:!!x}}function Gy(e,t,n,i){return e==="template"?t===96||t===36&&n.charCodeAt(i+1)===123:t===(e==="double"?34:39)}function kb(e,t,n,i,o,s){var A=!o;t++;var d=function(M){return{pos:t,ch:M,lineStart:n,curLine:i}},c=e.charCodeAt(t++);switch(c){case 110:return d(`
`);case 114:return d("\r");case 120:{var f,x=Pj(e,t,n,i,2,!1,A,s);return f=x.code,t=x.pos,d(f===null?null:String.fromCharCode(f))}case 117:{var g,m=Ac(e,t,n,i,A,s);return g=m.code,t=m.pos,d(g===null?null:String.fromCodePoint(g))}case 116:return d(" ");case 98:return d("\b");case 118:return d("\v");case 102:return d("\f");case 13:e.charCodeAt(t)===10&&++t;case 10:n=t,++i;case 8232:case 8233:return d("");case 56:case 57:if(o)return d(null);s.strictNumericEscape(t-1,n,i);default:if(c>=48&&c<=55){var B=t-1,b=/^[0-7]+/.exec(e.slice(B,t+2)),_=b[0],C=parseInt(_,8);C>255&&(_=_.slice(0,-1),C=parseInt(_,8)),t+=_.length-1;var w=e.charCodeAt(t);if(_!=="0"||w===56||w===57){if(o)return d(null);s.strictNumericEscape(B,n,i)}return d(String.fromCharCode(C))}return d(String.fromCharCode(c))}}function Pj(e,t,n,i,o,s,A,d){var c=t,f,x=eA(e,t,n,i,16,o,s,!1,d,!A);return f=x.n,t=x.pos,f===null&&(A?d.invalidEscapeSequence(c,n,i):t=c-1),{code:f,pos:t}}function eA(e,t,n,i,o,s,A,d,c,f){for(var x=t,g=o===16?$A.hex:$A.decBinOct,m=o===16?wj.hex:o===10?wj.dec:o===8?wj.oct:wj.bin,B=!1,b=0,_=0,C=s??1/0;_<C;++_){var w=e.charCodeAt(t),P=void 0;if(w===95&&d!=="bail"){var M=e.charCodeAt(t-1),N=e.charCodeAt(t+1);if(d){if(Number.isNaN(N)||!m(N)||g.has(M)||g.has(N)){if(f)return{n:null,pos:t};c.unexpectedNumericSeparator(t,n,i)}}else{if(f)return{n:null,pos:t};c.numericSeparatorInEscapeSequence(t,n,i)}++t;continue}if(w>=97?P=w-97+10:w>=65?P=w-65+10:Z_(w)?P=w-48:P=1/0,P>=o){if(P<=9&&f)return{n:null,pos:t};if(P<=9&&c.invalidDigit(t,n,i,o))P=0;else if(A)P=0,B=!0;else break}++t,b=b*o+P}return t===x||s!=null&&t-x!==s||B?{n:null,pos:t}:{n:b,pos:t}}function Ac(e,t,n,i,o,s){var A=e.charCodeAt(t),d;if(A===123){++t;var c=Pj(e,t,n,i,e.indexOf("}",t)-t,!0,o,s);if(d=c.code,t=c.pos,++t,d!==null&&d>1114111)if(o)s.invalidCodePoint(t,n,i);else return{code:null,pos:t}}else{var f=Pj(e,t,n,i,4,!1,o,s);d=f.code,t=f.pos}return{code:d,pos:t}}var Ij=["consequent","body","alternate"],_b=["body","expressions"],Oj=["left","init"],$j=["leadingComments","trailingComments","innerComments"],lc=["||","&&","??"],qy=["++","--"],GD=[">","<",">=","<="],qD=["==","===","!=","!=="],dc=[].concat(qD,["in","instanceof"]),Hy=[].concat(K(dc),GD),Kl=["-","/","%","*","**","&","|",">>",">>>","<<","^"],Vy=["+"].concat(Kl,K(Hy),["|>"]),Ky=["=","+="].concat(K(Kl.map(function(e){return e+"="})),K(lc.map(function(e){return e+"="}))),HD=["delete","!"],Wy=["+","-","~"],zy=["typeof"],Tb=["void","throw"].concat(HD,Wy,zy),Nj={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]},VD=Symbol.for("var used to be block scoped"),Xy=Symbol.for("should not be considered a local binding"),tA={},Qp={},ra={},du={},Lj={},KD={},Jp={};function cc(e){return Array.isArray(e)?"array":e===null?"null":typeof e}function cs(e){return{validate:e}}function Mj(e){return typeof e=="string"?tt(e):tt.apply(void 0,K(e))}function $r(e){return cs(Mj(e))}function Gs(e){return{validate:e,optional:!0}}function hn(e){return{validate:Mj(e),optional:!0}}function WD(e){return pa(rr("array"),Ja(e))}function Ko(e){return WD(Mj(e))}function NA(e){return cs(Ko(e))}function Ja(e){function t(n,i,o){if(Array.isArray(o))for(var s=0;s<o.length;s++){var A=i+"["+s+"]",d=o[s];e(n,A,d),zr.env.BABEL_TYPES_8_BREAKING&&Vj(n,A,d)}}return t.each=e,t}function as(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];function i(o,s,A){if(!t.includes(A))throw new TypeError("Property "+s+" expected value to be one of "+JSON.stringify(t)+" but got "+JSON.stringify(A))}return i.oneOf=t,i}function tt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];function i(o,s,A){for(var d=je(t),c;!(c=d()).done;){var f=c.value;if(ao(f,A)){Vj(o,s,A);return}}throw new TypeError("Property "+s+" of "+o.type+" expected node to be of a type "+JSON.stringify(t)+" but instead got "+JSON.stringify(A?.type))}return i.oneOfNodeTypes=t,i}function zD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];function i(o,s,A){for(var d=je(t),c;!(c=d()).done;){var f=c.value;if(cc(A)===f||ao(f,A)){Vj(o,s,A);return}}throw new TypeError("Property "+s+" of "+o.type+" expected node to be of a type "+JSON.stringify(t)+" but instead got "+JSON.stringify(A?.type))}return i.oneOfNodeOrValueTypes=t,i}function rr(e){function t(n,i,o){var s=cc(o)===e;if(!s)throw new TypeError("Property "+i+" expected type of "+e+" but got "+cc(o))}return t.type=e,t}function Uj(e){function t(n,i,o){for(var s=[],A=0,d=Object.keys(e);A<d.length;A++){var c=d[A];try{Lb(n,c,o[c],e[c])}catch(f){if(f instanceof TypeError){s.push(f.message);continue}throw f}}if(s.length)throw new TypeError("Property "+i+" of "+n.type+` expected to have the following:
`+s.join(`
`))}return t.shapeOf=e,t}function wb(){function e(t){for(var n,i=t;t;){var o=i,s=o.type;if(s==="OptionalCallExpression"){if(i.optional)return;i=i.callee;continue}if(s==="OptionalMemberExpression"){if(i.optional)return;i=i.object;continue}break}throw new TypeError("Non-optional "+t.type+" must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from "+((n=i)==null?void 0:n.type))}return e}function pa(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];function i(){for(var o=je(t),s;!(s=o()).done;){var A=s.value;A.apply(void 0,arguments)}}if(i.chainOf=t,t.length>=2&&"type"in t[0]&&t[0].type==="array"&&!("each"in t[1]))throw new Error('An assertValueType("array") validator can only be followed by an assertEach(...) validator.');return i}var Gj=["aliases","builder","deprecatedAlias","fields","inherits","visitor","validate"],Pb=["default","optional","deprecated","validate"],XD={};function YD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(i,o){var s;o===void 0&&(o={});var A=o.aliases;if(!A){var d,c;o.inherits&&(A=(d=XD[o.inherits].aliases)==null?void 0:d.slice()),(c=A)!=null||(A=[]),o.aliases=A}var f=t.filter(function(x){return!A.includes(x)});(s=A).unshift.apply(s,K(f)),cu(i,o)}}function cu(e,t){t===void 0&&(t={});var n=t.inherits&&XD[t.inherits]||{},i=t.fields;if(!i&&(i={},n.fields))for(var o=Object.getOwnPropertyNames(n.fields),s=je(o),A;!(A=s()).done;){var d=A.value,c=n.fields[d],f=c.default;if(Array.isArray(f)?f.length>0:f&&typeof f=="object")throw new Error("field defaults can only be primitives or empty arrays currently");i[d]={default:Array.isArray(f)?[]:f,optional:c.optional,deprecated:c.deprecated,validate:c.validate}}for(var x=t.visitor||n.visitor||[],g=t.aliases||n.aliases||[],m=t.builder||n.builder||t.visitor||[],B=0,b=Object.keys(t);B<b.length;B++){var _=b[B];if(!Gj.includes(_))throw new Error('Unknown type option "'+_+'" on '+e)}t.deprecatedAlias&&(KD[t.deprecatedAlias]=e);for(var C=je(x.concat(m)),w;!(w=C()).done;){var P=w.value;i[P]=i[P]||{}}for(var M=0,N=Object.keys(i);M<N.length;M++){var q=N[M],V=i[q];V.default!==void 0&&!m.includes(q)&&(V.optional=!0),V.default===void 0?V.default=null:!V.validate&&V.default!=null&&(V.validate=rr(cc(V.default)));for(var U=0,te=Object.keys(V);U<te.length;U++){var ae=te[U];if(!Pb.includes(ae))throw new Error('Unknown field key "'+ae+'" on '+e+"."+q)}}tA[e]=t.visitor=x,Lj[e]=t.builder=m,du[e]=t.fields=i,Qp[e]=t.aliases=g,g.forEach(function(se){ra[se]=ra[se]||[],ra[se].push(e)}),t.validate&&(Jp[e]=t.validate),XD[e]=t}var Pr=YD("Standardized");Pr("ArrayExpression",{fields:{elements:{validate:pa(rr("array"),Ja(zD("null","Expression","SpreadElement"))),default:zr.env.BABEL_TYPES_8_BREAKING?void 0:[]}},visitor:["elements"],aliases:["Expression"]}),Pr("AssignmentExpression",{fields:{operator:{validate:function(){if(!zr.env.BABEL_TYPES_8_BREAKING)return rr("string");var e=as.apply(void 0,K(Ky)),t=as("=");return function(n,i,o){var s=ao("Pattern",n.left)?t:e;s(n,i,o)}}()},left:{validate:zr.env.BABEL_TYPES_8_BREAKING?tt("Identifier","MemberExpression","OptionalMemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):tt("LVal","OptionalMemberExpression")},right:{validate:tt("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]}),Pr("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:as.apply(void 0,K(Vy))},left:{validate:function(){var e=tt("Expression"),t=tt("Expression","PrivateName"),n=Object.assign(function(i,o,s){var A=i.operator==="in"?t:e;A(i,o,s)},{oneOfNodeTypes:["Expression","PrivateName"]});return n}()},right:{validate:tt("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]}),Pr("InterpreterDirective",{builder:["value"],fields:{value:{validate:rr("string")}}}),Pr("Directive",{visitor:["value"],fields:{value:{validate:tt("DirectiveLiteral")}}}),Pr("DirectiveLiteral",{builder:["value"],fields:{value:{validate:rr("string")}}}),Pr("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:pa(rr("array"),Ja(tt("Directive"))),default:[]},body:{validate:pa(rr("array"),Ja(tt("Statement")))}},aliases:["Scopable","BlockParent","Block","Statement"]}),Pr("BreakStatement",{visitor:["label"],fields:{label:{validate:tt("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),Pr("CallExpression",{visitor:["callee","arguments","typeParameters","typeArguments"],builder:["callee","arguments"],aliases:["Expression"],fields:Object.assign({callee:{validate:tt("Expression","Super","V8IntrinsicIdentifier")},arguments:{validate:pa(rr("array"),Ja(tt("Expression","SpreadElement","ArgumentPlaceholder")))}},zr.env.BABEL_TYPES_8_BREAKING?{}:{optional:{validate:as(!0,!1),optional:!0}},{typeArguments:{validate:tt("TypeParameterInstantiation"),optional:!0},typeParameters:{validate:tt("TSTypeParameterInstantiation"),optional:!0}})}),Pr("CatchClause",{visitor:["param","body"],fields:{param:{validate:tt("Identifier","ArrayPattern","ObjectPattern"),optional:!0},body:{validate:tt("BlockStatement")}},aliases:["Scopable","BlockParent"]}),Pr("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:tt("Expression")},consequent:{validate:tt("Expression")},alternate:{validate:tt("Expression")}},aliases:["Expression","Conditional"]}),Pr("ContinueStatement",{visitor:["label"],fields:{label:{validate:tt("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),Pr("DebuggerStatement",{aliases:["Statement"]}),Pr("DoWhileStatement",{visitor:["test","body"],fields:{test:{validate:tt("Expression")},body:{validate:tt("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]}),Pr("EmptyStatement",{aliases:["Statement"]}),Pr("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:tt("Expression")}},aliases:["Statement","ExpressionWrapper"]}),Pr("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:tt("Program")},comments:{validate:zr.env.BABEL_TYPES_8_BREAKING?Ja(tt("CommentBlock","CommentLine")):Object.assign(function(){},{each:{oneOfNodeTypes:["CommentBlock","CommentLine"]}}),optional:!0},tokens:{validate:Ja(Object.assign(function(){},{type:"any"})),optional:!0}}}),Pr("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:zr.env.BABEL_TYPES_8_BREAKING?tt("VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):tt("VariableDeclaration","LVal")},right:{validate:tt("Expression")},body:{validate:tt("Statement")}}}),Pr("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:tt("VariableDeclaration","Expression"),optional:!0},test:{validate:tt("Expression"),optional:!0},update:{validate:tt("Expression"),optional:!0},body:{validate:tt("Statement")}}});var Zp=function(){return{params:{validate:pa(rr("array"),Ja(tt("Identifier","Pattern","RestElement")))},generator:{default:!1},async:{default:!1}}},Rf=function(){return{returnType:{validate:tt("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},typeParameters:{validate:tt("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0}}},Ib=function(){return Object.assign({},Zp(),{declare:{validate:rr("boolean"),optional:!0},id:{validate:tt("Identifier"),optional:!0}})};Pr("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","params","body","returnType","typeParameters"],fields:Object.assign({},Ib(),Rf(),{body:{validate:tt("BlockStatement")},predicate:{validate:tt("DeclaredPredicate","InferredPredicate"),optional:!0}}),aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"],validate:function(){if(!zr.env.BABEL_TYPES_8_BREAKING)return function(){};var e=tt("Identifier");return function(t,n,i){ao("ExportDefaultDeclaration",t)||e(i,"id",i.id)}}()}),Pr("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},Zp(),Rf(),{id:{validate:tt("Identifier"),optional:!0},body:{validate:tt("BlockStatement")},predicate:{validate:tt("DeclaredPredicate","InferredPredicate"),optional:!0}})});var ex=function(){return{typeAnnotation:{validate:tt("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},optional:{validate:rr("boolean"),optional:!0},decorators:{validate:pa(rr("array"),Ja(tt("Decorator"))),optional:!0}}};Pr("Identifier",{builder:["name"],visitor:["typeAnnotation","decorators"],aliases:["Expression","PatternLike","LVal","TSEntityName"],fields:Object.assign({},ex(),{name:{validate:pa(rr("string"),Object.assign(function(e,t,n){if(zr.env.BABEL_TYPES_8_BREAKING&&!p0(n,!1))throw new TypeError('"'+n+'" is not a valid identifier name')},{type:"string"}))}}),validate:function(t,n,i){if(zr.env.BABEL_TYPES_8_BREAKING){var o=/\.(\w+)$/.exec(n);if(o){var s=J(o,2),A=s[1],d={computed:!1};if(A==="property"){if(ao("MemberExpression",t,d)||ao("OptionalMemberExpression",t,d))return}else if(A==="key"){if(ao("Property",t,d)||ao("Method",t,d))return}else if(A==="exported"){if(ao("ExportSpecifier",t))return}else if(A==="imported"){if(ao("ImportSpecifier",t,{imported:i}))return}else if(A==="meta"&&ao("MetaProperty",t,{meta:i}))return;if((UD(i.name)||Un(i.name,!1))&&i.name!=="this")throw new TypeError('"'+i.name+'" is not a valid identifier')}}}}),Pr("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:tt("Expression")},consequent:{validate:tt("Statement")},alternate:{optional:!0,validate:tt("Statement")}}}),Pr("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:tt("Identifier")},body:{validate:tt("Statement")}}}),Pr("StringLiteral",{builder:["value"],fields:{value:{validate:rr("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),Pr("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:pa(rr("number"),Object.assign(function(e,t,n){},{type:"number"}))}},aliases:["Expression","Pureish","Literal","Immutable"]}),Pr("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),Pr("BooleanLiteral",{builder:["value"],fields:{value:{validate:rr("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),Pr("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Pureish","Literal"],fields:{pattern:{validate:rr("string")},flags:{validate:pa(rr("string"),Object.assign(function(e,t,n){if(zr.env.BABEL_TYPES_8_BREAKING){var i=/[^gimsuy]/.exec(n);if(i)throw new TypeError('"'+i[0]+'" is not a valid RegExp flag')}},{type:"string"})),default:""}}}),Pr("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:as.apply(void 0,K(lc))},left:{validate:tt("Expression")},right:{validate:tt("Expression")}}}),Pr("MemberExpression",{builder:["object","property","computed"].concat(K(zr.env.BABEL_TYPES_8_BREAKING?[]:["optional"])),visitor:["object","property"],aliases:["Expression","LVal"],fields:Object.assign({object:{validate:tt("Expression","Super")},property:{validate:function(){var e=tt("Identifier","PrivateName"),t=tt("Expression"),n=function(o,s,A){var d=o.computed?t:e;d(o,s,A)};return n.oneOfNodeTypes=["Expression","Identifier","PrivateName"],n}()},computed:{default:!1}},zr.env.BABEL_TYPES_8_BREAKING?{}:{optional:{validate:as(!0,!1),optional:!0}})}),Pr("NewExpression",{inherits:"CallExpression"}),Pr("Program",{visitor:["directives","body"],builder:["body","directives","sourceType","interpreter"],fields:{sourceType:{validate:as("script","module"),default:"script"},interpreter:{validate:tt("InterpreterDirective"),default:null,optional:!0},directives:{validate:pa(rr("array"),Ja(tt("Directive"))),default:[]},body:{validate:pa(rr("array"),Ja(tt("Statement")))}},aliases:["Scopable","BlockParent","Block"]}),Pr("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:pa(rr("array"),Ja(tt("ObjectMethod","ObjectProperty","SpreadElement")))}}}),Pr("ObjectMethod",{builder:["kind","key","params","body","computed","generator","async"],fields:Object.assign({},Zp(),Rf(),{kind:Object.assign({validate:as("method","get","set")},zr.env.BABEL_TYPES_8_BREAKING?{}:{default:"method"}),computed:{default:!1},key:{validate:function(){var e=tt("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),t=tt("Expression"),n=function(o,s,A){var d=o.computed?t:e;d(o,s,A)};return n.oneOfNodeTypes=["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral"],n}()},decorators:{validate:pa(rr("array"),Ja(tt("Decorator"))),optional:!0},body:{validate:tt("BlockStatement")}}),visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]}),Pr("ObjectProperty",{builder:["key","value","computed","shorthand"].concat(K(zr.env.BABEL_TYPES_8_BREAKING?[]:["decorators"])),fields:{computed:{default:!1},key:{validate:function(){var e=tt("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName"),t=tt("Expression"),n=Object.assign(function(i,o,s){var A=i.computed?t:e;A(i,o,s)},{oneOfNodeTypes:["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName"]});return n}()},value:{validate:tt("Expression","PatternLike")},shorthand:{validate:pa(rr("boolean"),Object.assign(function(e,t,n){if(zr.env.BABEL_TYPES_8_BREAKING&&n&&e.computed)throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true")},{type:"boolean"}),function(e,t,n){if(zr.env.BABEL_TYPES_8_BREAKING&&n&&!ao("Identifier",e.key))throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier")}),default:!1},decorators:{validate:pa(rr("array"),Ja(tt("Decorator"))),optional:!0}},visitor:["key","value","decorators"],aliases:["UserWhitespacable","Property","ObjectMember"],validate:function(){var e=tt("Identifier","Pattern","TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"),t=tt("Expression");return function(n,i,o){if(zr.env.BABEL_TYPES_8_BREAKING){var s=ao("ObjectPattern",n)?e:t;s(o,"value",o.value)}}}()}),Pr("RestElement",{visitor:["argument","typeAnnotation"],builder:["argument"],aliases:["LVal","PatternLike"],deprecatedAlias:"RestProperty",fields:Object.assign({},ex(),{argument:{validate:zr.env.BABEL_TYPES_8_BREAKING?tt("Identifier","ArrayPattern","ObjectPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):tt("LVal")}}),validate:function(t,n){if(zr.env.BABEL_TYPES_8_BREAKING){var i=/(\w+)\[(\d+)\]/.exec(n);if(!i)throw new Error("Internal Babel error: malformed key.");var o=i,s=J(o,3),A=s[1],d=s[2];if(t[A].length>+d+1)throw new TypeError("RestElement must be last element of "+A)}}}),Pr("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:tt("Expression"),optional:!0}}}),Pr("SequenceExpression",{visitor:["expressions"],fields:{expressions:{validate:pa(rr("array"),Ja(tt("Expression")))}},aliases:["Expression"]}),Pr("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:tt("Expression")}}}),Pr("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:tt("Expression"),optional:!0},consequent:{validate:pa(rr("array"),Ja(tt("Statement")))}}}),Pr("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:tt("Expression")},cases:{validate:pa(rr("array"),Ja(tt("SwitchCase")))}}}),Pr("ThisExpression",{aliases:["Expression"]}),Pr("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:tt("Expression")}}}),Pr("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{block:{validate:pa(tt("BlockStatement"),Object.assign(function(e){if(zr.env.BABEL_TYPES_8_BREAKING&&!e.handler&&!e.finalizer)throw new TypeError("TryStatement expects either a handler or finalizer, or both")},{oneOfNodeTypes:["BlockStatement"]}))},handler:{optional:!0,validate:tt("CatchClause")},finalizer:{optional:!0,validate:tt("BlockStatement")}}}),Pr("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:tt("Expression")},operator:{validate:as.apply(void 0,K(Tb))}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),Pr("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:zr.env.BABEL_TYPES_8_BREAKING?tt("Identifier","MemberExpression"):tt("Expression")},operator:{validate:as.apply(void 0,K(qy))}},visitor:["argument"],aliases:["Expression"]}),Pr("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{declare:{validate:rr("boolean"),optional:!0},kind:{validate:as("var","let","const","using","await using")},declarations:{validate:pa(rr("array"),Ja(tt("VariableDeclarator")))}},validate:function(t,n,i){if(zr.env.BABEL_TYPES_8_BREAKING&&ao("ForXStatement",t,{left:i})&&i.declarations.length!==1)throw new TypeError("Exactly one VariableDeclarator is required in the VariableDeclaration of a "+t.type)}}),Pr("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:function(){if(!zr.env.BABEL_TYPES_8_BREAKING)return tt("LVal");var e=tt("Identifier","ArrayPattern","ObjectPattern"),t=tt("Identifier");return function(n,i,o){var s=n.init?e:t;s(n,i,o)}}()},definite:{optional:!0,validate:rr("boolean")},init:{optional:!0,validate:tt("Expression")}}}),Pr("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:tt("Expression")},body:{validate:tt("Statement")}}}),Pr("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{validate:tt("Expression")},body:{validate:tt("Statement")}}}),Pr("AssignmentPattern",{visitor:["left","right","decorators"],builder:["left","right"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},ex(),{left:{validate:tt("Identifier","ObjectPattern","ArrayPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:tt("Expression")},decorators:{validate:pa(rr("array"),Ja(tt("Decorator"))),optional:!0}})}),Pr("ArrayPattern",{visitor:["elements","typeAnnotation"],builder:["elements"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},ex(),{elements:{validate:pa(rr("array"),Ja(zD("null","PatternLike","LVal")))}})}),Pr("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["params","body","returnType","typeParameters"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},Zp(),Rf(),{expression:{validate:rr("boolean")},body:{validate:tt("BlockStatement","Expression")},predicate:{validate:tt("DeclaredPredicate","InferredPredicate"),optional:!0}})}),Pr("ClassBody",{visitor:["body"],fields:{body:{validate:pa(rr("array"),Ja(tt("ClassMethod","ClassPrivateMethod","ClassProperty","ClassPrivateProperty","ClassAccessorProperty","TSDeclareMethod","TSIndexSignature","StaticBlock")))}}}),Pr("ClassExpression",{builder:["id","superClass","body","decorators"],visitor:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Expression"],fields:{id:{validate:tt("Identifier"),optional:!0},typeParameters:{validate:tt("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:tt("ClassBody")},superClass:{optional:!0,validate:tt("Expression")},superTypeParameters:{validate:tt("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:pa(rr("array"),Ja(tt("TSExpressionWithTypeArguments","ClassImplements"))),optional:!0},decorators:{validate:pa(rr("array"),Ja(tt("Decorator"))),optional:!0},mixins:{validate:tt("InterfaceExtends"),optional:!0}}}),Pr("ClassDeclaration",{inherits:"ClassExpression",aliases:["Scopable","Class","Statement","Declaration"],fields:{id:{validate:tt("Identifier"),optional:!0},typeParameters:{validate:tt("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:tt("ClassBody")},superClass:{optional:!0,validate:tt("Expression")},superTypeParameters:{validate:tt("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:pa(rr("array"),Ja(tt("TSExpressionWithTypeArguments","ClassImplements"))),optional:!0},decorators:{validate:pa(rr("array"),Ja(tt("Decorator"))),optional:!0},mixins:{validate:tt("InterfaceExtends"),optional:!0},declare:{validate:rr("boolean"),optional:!0},abstract:{validate:rr("boolean"),optional:!0}},validate:function(){var e=tt("Identifier");return function(t,n,i){zr.env.BABEL_TYPES_8_BREAKING&&(ao("ExportDefaultDeclaration",t)||e(i,"id",i.id))}}()}),Pr("ExportAllDeclaration",{builder:["source"],visitor:["source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{source:{validate:tt("StringLiteral")},exportKind:Gs(as("type","value")),attributes:{optional:!0,validate:pa(rr("array"),Ja(tt("ImportAttribute")))},assertions:{optional:!0,validate:pa(rr("array"),Ja(tt("ImportAttribute")))}}}),Pr("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:{validate:tt("TSDeclareFunction","FunctionDeclaration","ClassDeclaration","Expression")},exportKind:Gs(as("value"))}}),Pr("ExportNamedDeclaration",{builder:["declaration","specifiers","source"],visitor:["declaration","specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:{optional:!0,validate:pa(tt("Declaration"),Object.assign(function(e,t,n){if(zr.env.BABEL_TYPES_8_BREAKING&&n&&e.specifiers.length)throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration")},{oneOfNodeTypes:["Declaration"]}),function(e,t,n){if(zr.env.BABEL_TYPES_8_BREAKING&&n&&e.source)throw new TypeError("Cannot export a declaration from a source")})},attributes:{optional:!0,validate:pa(rr("array"),Ja(tt("ImportAttribute")))},assertions:{optional:!0,validate:pa(rr("array"),Ja(tt("ImportAttribute")))},specifiers:{default:[],validate:pa(rr("array"),Ja(function(){var e=tt("ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"),t=tt("ExportSpecifier");return zr.env.BABEL_TYPES_8_BREAKING?function(n,i,o){var s=n.source?e:t;s(n,i,o)}:e}()))},source:{validate:tt("StringLiteral"),optional:!0},exportKind:Gs(as("type","value"))}}),Pr("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:tt("Identifier")},exported:{validate:tt("Identifier","StringLiteral")},exportKind:{validate:as("type","value"),optional:!0}}}),Pr("ForOfStatement",{visitor:["left","right","body"],builder:["left","right","body","await"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:function(){if(!zr.env.BABEL_TYPES_8_BREAKING)return tt("VariableDeclaration","LVal");var e=tt("VariableDeclaration"),t=tt("Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression");return function(n,i,o){ao("VariableDeclaration",o)?e(n,i,o):t(n,i,o)}}()},right:{validate:tt("Expression")},body:{validate:tt("Statement")},await:{default:!1}}}),Pr("ImportDeclaration",{builder:["specifiers","source"],visitor:["specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration"],fields:{attributes:{optional:!0,validate:pa(rr("array"),Ja(tt("ImportAttribute")))},assertions:{optional:!0,validate:pa(rr("array"),Ja(tt("ImportAttribute")))},module:{optional:!0,validate:rr("boolean")},phase:{default:null,validate:as("source","defer")},specifiers:{validate:pa(rr("array"),Ja(tt("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier")))},source:{validate:tt("StringLiteral")},importKind:{validate:as("type","typeof","value"),optional:!0}}}),Pr("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:tt("Identifier")}}}),Pr("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:tt("Identifier")}}}),Pr("ImportSpecifier",{visitor:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:tt("Identifier")},imported:{validate:tt("Identifier","StringLiteral")},importKind:{validate:as("type","typeof","value"),optional:!0}}}),Pr("ImportExpression",{visitor:["source","options"],aliases:["Expression"],fields:{phase:{default:null,validate:as("source","defer")},source:{validate:tt("Expression")},options:{validate:tt("Expression"),optional:!0}}}),Pr("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:pa(tt("Identifier"),Object.assign(function(e,t,n){if(zr.env.BABEL_TYPES_8_BREAKING){var i;switch(n.name){case"function":i="sent";break;case"new":i="target";break;case"import":i="meta";break}if(!ao("Identifier",e.property,{name:i}))throw new TypeError("Unrecognised MetaProperty")}},{oneOfNodeTypes:["Identifier"]}))},property:{validate:tt("Identifier")}}});var Yy=function(){return{abstract:{validate:rr("boolean"),optional:!0},accessibility:{validate:as("public","private","protected"),optional:!0},static:{default:!1},override:{default:!1},computed:{default:!1},optional:{validate:rr("boolean"),optional:!0},key:{validate:pa(function(){var t=tt("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),n=tt("Expression");return function(i,o,s){var A=i.computed?n:t;A(i,o,s)}}(),tt("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression"))}}},Qy=function(){return Object.assign({},Zp(),Yy(),{params:{validate:pa(rr("array"),Ja(tt("Identifier","Pattern","RestElement","TSParameterProperty")))},kind:{validate:as("get","set","method","constructor"),default:"method"},access:{validate:pa(rr("string"),as("public","private","protected")),optional:!0},decorators:{validate:pa(rr("array"),Ja(tt("Decorator"))),optional:!0}})};Pr("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static","generator","async"],visitor:["key","params","body","decorators","returnType","typeParameters"],fields:Object.assign({},Qy(),Rf(),{body:{validate:tt("BlockStatement")}})}),Pr("ObjectPattern",{visitor:["properties","typeAnnotation","decorators"],builder:["properties"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},ex(),{properties:{validate:pa(rr("array"),Ja(tt("RestElement","ObjectProperty")))}})}),Pr("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],deprecatedAlias:"SpreadProperty",fields:{argument:{validate:tt("Expression")}}}),Pr("Super",{aliases:["Expression"]}),Pr("TaggedTemplateExpression",{visitor:["tag","quasi","typeParameters"],builder:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:tt("Expression")},quasi:{validate:tt("TemplateLiteral")},typeParameters:{validate:tt("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),Pr("TemplateElement",{builder:["value","tail"],fields:{value:{validate:pa(Uj({raw:{validate:rr("string")},cooked:{validate:rr("string"),optional:!0}}),function(t){var n=t.value.raw,i=!1,o=function(){throw new Error("Internal @babel/types error.")},s=Yp("template",n,0,0,0,{unterminated:function(){i=!0},strictNumericEscape:o,invalidEscapeSequence:o,numericSeparatorInEscapeSequence:o,unexpectedNumericSeparator:o,invalidDigit:o,invalidCodePoint:o}),A=s.str,d=s.firstInvalidLoc;if(!i)throw new Error("Invalid raw");t.value.cooked=d?null:A})},tail:{default:!1}}}),Pr("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:{validate:pa(rr("array"),Ja(tt("TemplateElement")))},expressions:{validate:pa(rr("array"),Ja(tt("Expression","TSType")),function(e,t,n){if(e.quasis.length!==n.length+1)throw new TypeError("Number of "+e.type+` quasis should be exactly one more than the number of expressions.
Expected `+(n.length+1)+" quasis but got "+e.quasis.length)})}}}),Pr("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:pa(rr("boolean"),Object.assign(function(e,t,n){if(zr.env.BABEL_TYPES_8_BREAKING&&n&&!e.argument)throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument")},{type:"boolean"})),default:!1},argument:{optional:!0,validate:tt("Expression")}}}),Pr("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:tt("Expression")}}}),Pr("Import",{aliases:["Expression"]}),Pr("BigIntLiteral",{builder:["value"],fields:{value:{validate:rr("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),Pr("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:tt("Identifier")}}}),Pr("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],fields:{object:{validate:tt("Expression")},property:{validate:function(){var e=tt("Identifier"),t=tt("Expression"),n=Object.assign(function(i,o,s){var A=i.computed?t:e;A(i,o,s)},{oneOfNodeTypes:["Expression","Identifier"]});return n}()},computed:{default:!1},optional:{validate:zr.env.BABEL_TYPES_8_BREAKING?pa(rr("boolean"),wb()):rr("boolean")}}}),Pr("OptionalCallExpression",{visitor:["callee","arguments","typeParameters","typeArguments"],builder:["callee","arguments","optional"],aliases:["Expression"],fields:{callee:{validate:tt("Expression")},arguments:{validate:pa(rr("array"),Ja(tt("Expression","SpreadElement","ArgumentPlaceholder")))},optional:{validate:zr.env.BABEL_TYPES_8_BREAKING?pa(rr("boolean"),wb()):rr("boolean")},typeArguments:{validate:tt("TypeParameterInstantiation"),optional:!0},typeParameters:{validate:tt("TSTypeParameterInstantiation"),optional:!0}}}),Pr("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property"],fields:Object.assign({},Yy(),{value:{validate:tt("Expression"),optional:!0},definite:{validate:rr("boolean"),optional:!0},typeAnnotation:{validate:tt("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:pa(rr("array"),Ja(tt("Decorator"))),optional:!0},readonly:{validate:rr("boolean"),optional:!0},declare:{validate:rr("boolean"),optional:!0},variance:{validate:tt("Variance"),optional:!0}})}),Pr("ClassAccessorProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property","Accessor"],fields:Object.assign({},Yy(),{key:{validate:pa(function(){var e=tt("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"),t=tt("Expression");return function(n,i,o){var s=n.computed?t:e;s(n,i,o)}}(),tt("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression","PrivateName"))},value:{validate:tt("Expression"),optional:!0},definite:{validate:rr("boolean"),optional:!0},typeAnnotation:{validate:tt("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:pa(rr("array"),Ja(tt("Decorator"))),optional:!0},readonly:{validate:rr("boolean"),optional:!0},declare:{validate:rr("boolean"),optional:!0},variance:{validate:tt("Variance"),optional:!0}})}),Pr("ClassPrivateProperty",{visitor:["key","value","decorators","typeAnnotation"],builder:["key","value","decorators","static"],aliases:["Property","Private"],fields:{key:{validate:tt("PrivateName")},value:{validate:tt("Expression"),optional:!0},typeAnnotation:{validate:tt("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:pa(rr("array"),Ja(tt("Decorator"))),optional:!0},static:{validate:rr("boolean"),default:!1},readonly:{validate:rr("boolean"),optional:!0},definite:{validate:rr("boolean"),optional:!0},variance:{validate:tt("Variance"),optional:!0}}}),Pr("ClassPrivateMethod",{builder:["kind","key","params","body","static"],visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["Function","Scopable","BlockParent","FunctionParent","Method","Private"],fields:Object.assign({},Qy(),Rf(),{kind:{validate:as("get","set","method"),default:"method"},key:{validate:tt("PrivateName")},body:{validate:tt("BlockStatement")}})}),Pr("PrivateName",{visitor:["id"],aliases:["Private"],fields:{id:{validate:tt("Identifier")}}}),Pr("StaticBlock",{visitor:["body"],fields:{body:{validate:pa(rr("array"),Ja(tt("Statement")))}},aliases:["Scopable","BlockParent","FunctionParent"]});var ia=YD("Flow"),QD=function(t){var n=t==="DeclareClass";ia(t,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends"].concat(K(n?["mixins","implements"]:[]),["body"]),aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({id:$r("Identifier"),typeParameters:hn("TypeParameterDeclaration"),extends:Gs(Ko("InterfaceExtends"))},n?{mixins:Gs(Ko("InterfaceExtends")),implements:Gs(Ko("ClassImplements"))}:{},{body:$r("ObjectTypeAnnotation")})})};ia("AnyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),ia("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["FlowType"],fields:{elementType:$r("FlowType")}}),ia("BooleanTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),ia("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:cs(rr("boolean"))}}),ia("NullLiteralTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),ia("ClassImplements",{visitor:["id","typeParameters"],fields:{id:$r("Identifier"),typeParameters:hn("TypeParameterInstantiation")}}),QD("DeclareClass"),ia("DeclareFunction",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:$r("Identifier"),predicate:hn("DeclaredPredicate")}}),QD("DeclareInterface"),ia("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:$r(["Identifier","StringLiteral"]),body:$r("BlockStatement"),kind:Gs(as("CommonJS","ES"))}}),ia("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:$r("TypeAnnotation")}}),ia("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:$r("Identifier"),typeParameters:hn("TypeParameterDeclaration"),right:$r("FlowType")}}),ia("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:$r("Identifier"),typeParameters:hn("TypeParameterDeclaration"),supertype:hn("FlowType"),impltype:hn("FlowType")}}),ia("DeclareVariable",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:$r("Identifier")}}),ia("DeclareExportDeclaration",{visitor:["declaration","specifiers","source"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{declaration:hn("Flow"),specifiers:Gs(Ko(["ExportSpecifier","ExportNamespaceSpecifier"])),source:hn("StringLiteral"),default:Gs(rr("boolean"))}}),ia("DeclareExportAllDeclaration",{visitor:["source"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{source:$r("StringLiteral"),exportKind:Gs(as("type","value"))}}),ia("DeclaredPredicate",{visitor:["value"],aliases:["FlowPredicate"],fields:{value:$r("Flow")}}),ia("ExistsTypeAnnotation",{aliases:["FlowType"]}),ia("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["FlowType"],fields:{typeParameters:hn("TypeParameterDeclaration"),params:cs(Ko("FunctionTypeParam")),rest:hn("FunctionTypeParam"),this:hn("FunctionTypeParam"),returnType:$r("FlowType")}}),ia("FunctionTypeParam",{visitor:["name","typeAnnotation"],fields:{name:hn("Identifier"),typeAnnotation:$r("FlowType"),optional:Gs(rr("boolean"))}}),ia("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["FlowType"],fields:{id:$r(["Identifier","QualifiedTypeIdentifier"]),typeParameters:hn("TypeParameterInstantiation")}}),ia("InferredPredicate",{aliases:["FlowPredicate"]}),ia("InterfaceExtends",{visitor:["id","typeParameters"],fields:{id:$r(["Identifier","QualifiedTypeIdentifier"]),typeParameters:hn("TypeParameterInstantiation")}}),QD("InterfaceDeclaration"),ia("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["FlowType"],fields:{extends:Gs(Ko("InterfaceExtends")),body:$r("ObjectTypeAnnotation")}}),ia("IntersectionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:cs(Ko("FlowType"))}}),ia("MixedTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),ia("EmptyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),ia("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["FlowType"],fields:{typeAnnotation:$r("FlowType")}}),ia("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:cs(rr("number"))}}),ia("NumberTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),ia("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties","internalSlots"],aliases:["FlowType"],builder:["properties","indexers","callProperties","internalSlots","exact"],fields:{properties:cs(Ko(["ObjectTypeProperty","ObjectTypeSpreadProperty"])),indexers:{validate:Ko("ObjectTypeIndexer"),optional:!0,default:[]},callProperties:{validate:Ko("ObjectTypeCallProperty"),optional:!0,default:[]},internalSlots:{validate:Ko("ObjectTypeInternalSlot"),optional:!0,default:[]},exact:{validate:rr("boolean"),default:!1},inexact:Gs(rr("boolean"))}}),ia("ObjectTypeInternalSlot",{visitor:["id","value"],builder:["id","value","optional","static","method"],aliases:["UserWhitespacable"],fields:{id:$r("Identifier"),value:$r("FlowType"),optional:cs(rr("boolean")),static:cs(rr("boolean")),method:cs(rr("boolean"))}}),ia("ObjectTypeCallProperty",{visitor:["value"],aliases:["UserWhitespacable"],fields:{value:$r("FlowType"),static:cs(rr("boolean"))}}),ia("ObjectTypeIndexer",{visitor:["id","key","value","variance"],aliases:["UserWhitespacable"],fields:{id:hn("Identifier"),key:$r("FlowType"),value:$r("FlowType"),static:cs(rr("boolean")),variance:hn("Variance")}}),ia("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["UserWhitespacable"],fields:{key:$r(["Identifier","StringLiteral"]),value:$r("FlowType"),kind:cs(as("init","get","set")),static:cs(rr("boolean")),proto:cs(rr("boolean")),optional:cs(rr("boolean")),variance:hn("Variance"),method:cs(rr("boolean"))}}),ia("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["UserWhitespacable"],fields:{argument:$r("FlowType")}}),ia("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:$r("Identifier"),typeParameters:hn("TypeParameterDeclaration"),supertype:hn("FlowType"),impltype:$r("FlowType")}}),ia("QualifiedTypeIdentifier",{visitor:["id","qualification"],fields:{id:$r("Identifier"),qualification:$r(["Identifier","QualifiedTypeIdentifier"])}}),ia("StringLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:cs(rr("string"))}}),ia("StringTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),ia("SymbolTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),ia("ThisTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),ia("TupleTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:cs(Ko("FlowType"))}}),ia("TypeofTypeAnnotation",{visitor:["argument"],aliases:["FlowType"],fields:{argument:$r("FlowType")}}),ia("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:$r("Identifier"),typeParameters:hn("TypeParameterDeclaration"),right:$r("FlowType")}}),ia("TypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:$r("FlowType")}}),ia("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["ExpressionWrapper","Expression"],fields:{expression:$r("Expression"),typeAnnotation:$r("TypeAnnotation")}}),ia("TypeParameter",{visitor:["bound","default","variance"],fields:{name:cs(rr("string")),bound:hn("TypeAnnotation"),default:hn("FlowType"),variance:hn("Variance")}}),ia("TypeParameterDeclaration",{visitor:["params"],fields:{params:cs(Ko("TypeParameter"))}}),ia("TypeParameterInstantiation",{visitor:["params"],fields:{params:cs(Ko("FlowType"))}}),ia("UnionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:cs(Ko("FlowType"))}}),ia("Variance",{builder:["kind"],fields:{kind:cs(as("minus","plus"))}}),ia("VoidTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),ia("EnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{id:$r("Identifier"),body:$r(["EnumBooleanBody","EnumNumberBody","EnumStringBody","EnumSymbolBody"])}}),ia("EnumBooleanBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:cs(rr("boolean")),members:NA("EnumBooleanMember"),hasUnknownMembers:cs(rr("boolean"))}}),ia("EnumNumberBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:cs(rr("boolean")),members:NA("EnumNumberMember"),hasUnknownMembers:cs(rr("boolean"))}}),ia("EnumStringBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:cs(rr("boolean")),members:NA(["EnumStringMember","EnumDefaultedMember"]),hasUnknownMembers:cs(rr("boolean"))}}),ia("EnumSymbolBody",{aliases:["EnumBody"],visitor:["members"],fields:{members:NA("EnumDefaultedMember"),hasUnknownMembers:cs(rr("boolean"))}}),ia("EnumBooleanMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:$r("Identifier"),init:$r("BooleanLiteral")}}),ia("EnumNumberMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:$r("Identifier"),init:$r("NumericLiteral")}}),ia("EnumStringMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:$r("Identifier"),init:$r("StringLiteral")}}),ia("EnumDefaultedMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:$r("Identifier")}}),ia("IndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:$r("FlowType"),indexType:$r("FlowType")}}),ia("OptionalIndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:$r("FlowType"),indexType:$r("FlowType"),optional:cs(rr("boolean"))}});var Wo=YD("JSX");Wo("JSXAttribute",{visitor:["name","value"],aliases:["Immutable"],fields:{name:{validate:tt("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:tt("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}}),Wo("JSXClosingElement",{visitor:["name"],aliases:["Immutable"],fields:{name:{validate:tt("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")}}}),Wo("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["Immutable","Expression"],fields:Object.assign({openingElement:{validate:tt("JSXOpeningElement")},closingElement:{optional:!0,validate:tt("JSXClosingElement")},children:{validate:pa(rr("array"),Ja(tt("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))}},{selfClosing:{validate:rr("boolean"),optional:!0}})}),Wo("JSXEmptyExpression",{}),Wo("JSXExpressionContainer",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:tt("Expression","JSXEmptyExpression")}}}),Wo("JSXSpreadChild",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:tt("Expression")}}}),Wo("JSXIdentifier",{builder:["name"],fields:{name:{validate:rr("string")}}}),Wo("JSXMemberExpression",{visitor:["object","property"],fields:{object:{validate:tt("JSXMemberExpression","JSXIdentifier")},property:{validate:tt("JSXIdentifier")}}}),Wo("JSXNamespacedName",{visitor:["namespace","name"],fields:{namespace:{validate:tt("JSXIdentifier")},name:{validate:tt("JSXIdentifier")}}}),Wo("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["Immutable"],fields:{name:{validate:tt("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")},selfClosing:{default:!1},attributes:{validate:pa(rr("array"),Ja(tt("JSXAttribute","JSXSpreadAttribute")))},typeParameters:{validate:tt("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),Wo("JSXSpreadAttribute",{visitor:["argument"],fields:{argument:{validate:tt("Expression")}}}),Wo("JSXText",{aliases:["Immutable"],builder:["value"],fields:{value:{validate:rr("string")}}}),Wo("JSXFragment",{builder:["openingFragment","closingFragment","children"],visitor:["openingFragment","children","closingFragment"],aliases:["Immutable","Expression"],fields:{openingFragment:{validate:tt("JSXOpeningFragment")},closingFragment:{validate:tt("JSXClosingFragment")},children:{validate:pa(rr("array"),Ja(tt("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))}}}),Wo("JSXOpeningFragment",{aliases:["Immutable"]}),Wo("JSXClosingFragment",{aliases:["Immutable"]});for(var JD=["Identifier","StringLiteral","Expression","Statement","Declaration","BlockStatement","ClassBody","Pattern"],fc={Declaration:["Statement"],Pattern:["PatternLike","LVal"]},x0=0,Za=JD;x0<Za.length;x0++){var ZD=Za[x0],eh=Qp[ZD];eh!=null&&eh.length&&(fc[ZD]=eh)}var Wl={};Object.keys(fc).forEach(function(e){fc[e].forEach(function(t){hasOwnProperty.call(Wl,t)||(Wl[t]=[]),Wl[t].push(e)})});var Jy=YD("Miscellaneous");Jy("Noop",{visitor:[]}),Jy("Placeholder",{visitor:[],builder:["expectedNode","name"],fields:{name:{validate:tt("Identifier")},expectedNode:{validate:as.apply(void 0,K(JD))}}}),Jy("V8IntrinsicIdentifier",{builder:["name"],fields:{name:{validate:rr("string")}}}),cu("ArgumentPlaceholder",{}),cu("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:zr.env.BABEL_TYPES_8_BREAKING?{object:{validate:tt("Expression")},callee:{validate:tt("Expression")}}:{object:{validate:Object.assign(function(){},{oneOfNodeTypes:["Expression"]})},callee:{validate:Object.assign(function(){},{oneOfNodeTypes:["Expression"]})}}}),cu("ImportAttribute",{visitor:["key","value"],fields:{key:{validate:tt("Identifier","StringLiteral")},value:{validate:tt("StringLiteral")}}}),cu("Decorator",{visitor:["expression"],fields:{expression:{validate:tt("Expression")}}}),cu("DoExpression",{visitor:["body"],builder:["body","async"],aliases:["Expression"],fields:{body:{validate:tt("BlockStatement")},async:{validate:rr("boolean"),default:!1}}}),cu("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:tt("Identifier")}}}),cu("RecordExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:pa(rr("array"),Ja(tt("ObjectProperty","SpreadElement")))}}}),cu("TupleExpression",{fields:{elements:{validate:pa(rr("array"),Ja(tt("Expression","SpreadElement"))),default:[]}},visitor:["elements"],aliases:["Expression"]}),cu("DecimalLiteral",{builder:["value"],fields:{value:{validate:rr("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),cu("ModuleExpression",{visitor:["body"],fields:{body:{validate:tt("Program")}},aliases:["Expression"]}),cu("TopicReference",{aliases:["Expression"]}),cu("PipelineTopicExpression",{builder:["expression"],visitor:["expression"],fields:{expression:{validate:tt("Expression")}},aliases:["Expression"]}),cu("PipelineBareFunction",{builder:["callee"],visitor:["callee"],fields:{callee:{validate:tt("Expression")}},aliases:["Expression"]}),cu("PipelinePrimaryTopicReference",{aliases:["Expression"]});var Ga=YD("TypeScript"),Pu=rr("boolean"),zo=function(){return{returnType:{validate:tt("TSTypeAnnotation","Noop"),optional:!0},typeParameters:{validate:tt("TSTypeParameterDeclaration","Noop"),optional:!0}}};Ga("TSParameterProperty",{aliases:["LVal"],visitor:["parameter"],fields:{accessibility:{validate:as("public","private","protected"),optional:!0},readonly:{validate:rr("boolean"),optional:!0},parameter:{validate:tt("Identifier","AssignmentPattern")},override:{validate:rr("boolean"),optional:!0},decorators:{validate:pa(rr("array"),Ja(tt("Decorator"))),optional:!0}}}),Ga("TSDeclareFunction",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","params","returnType"],fields:Object.assign({},Ib(),zo())}),Ga("TSDeclareMethod",{visitor:["decorators","key","typeParameters","params","returnType"],fields:Object.assign({},Qy(),zo())}),Ga("TSQualifiedName",{aliases:["TSEntityName"],visitor:["left","right"],fields:{left:$r("TSEntityName"),right:$r("Identifier")}});var qj=function(){var t;return t={typeParameters:hn("TSTypeParameterDeclaration")},t.parameters=NA(["ArrayPattern","Identifier","ObjectPattern","RestElement"]),t.typeAnnotation=hn("TSTypeAnnotation"),t},Ob={aliases:["TSTypeElement"],visitor:["typeParameters","parameters","typeAnnotation"],fields:qj()};Ga("TSCallSignatureDeclaration",Ob),Ga("TSConstructSignatureDeclaration",Ob);var Zy=function(){return{key:$r("Expression"),computed:{default:!1},optional:Gs(Pu)}};Ga("TSPropertySignature",{aliases:["TSTypeElement"],visitor:["key","typeAnnotation"],fields:Object.assign({},Zy(),{readonly:Gs(Pu),typeAnnotation:hn("TSTypeAnnotation"),kind:{validate:as("get","set")}})}),Ga("TSMethodSignature",{aliases:["TSTypeElement"],visitor:["key","typeParameters","parameters","typeAnnotation"],fields:Object.assign({},qj(),Zy(),{kind:{validate:as("method","get","set")}})}),Ga("TSIndexSignature",{aliases:["TSTypeElement"],visitor:["parameters","typeAnnotation"],fields:{readonly:Gs(Pu),static:Gs(Pu),parameters:NA("Identifier"),typeAnnotation:hn("TSTypeAnnotation")}});for(var e4=["TSAnyKeyword","TSBooleanKeyword","TSBigIntKeyword","TSIntrinsicKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword"],Hj=0,$b=e4;Hj<$b.length;Hj++){var t4=$b[Hj];Ga(t4,{aliases:["TSType","TSBaseType"],visitor:[],fields:{}})}Ga("TSThisType",{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});var Nb={aliases:["TSType"],visitor:["typeParameters","parameters","typeAnnotation"]};Ga("TSFunctionType",Object.assign({},Nb,{fields:qj()})),Ga("TSConstructorType",Object.assign({},Nb,{fields:Object.assign({},qj(),{abstract:Gs(Pu)})})),Ga("TSTypeReference",{aliases:["TSType"],visitor:["typeName","typeParameters"],fields:{typeName:$r("TSEntityName"),typeParameters:hn("TSTypeParameterInstantiation")}}),Ga("TSTypePredicate",{aliases:["TSType"],visitor:["parameterName","typeAnnotation"],builder:["parameterName","typeAnnotation","asserts"],fields:{parameterName:$r(["Identifier","TSThisType"]),typeAnnotation:hn("TSTypeAnnotation"),asserts:Gs(Pu)}}),Ga("TSTypeQuery",{aliases:["TSType"],visitor:["exprName","typeParameters"],fields:{exprName:$r(["TSEntityName","TSImportType"]),typeParameters:hn("TSTypeParameterInstantiation")}}),Ga("TSTypeLiteral",{aliases:["TSType"],visitor:["members"],fields:{members:NA("TSTypeElement")}}),Ga("TSArrayType",{aliases:["TSType"],visitor:["elementType"],fields:{elementType:$r("TSType")}}),Ga("TSTupleType",{aliases:["TSType"],visitor:["elementTypes"],fields:{elementTypes:NA(["TSType","TSNamedTupleMember"])}}),Ga("TSOptionalType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:$r("TSType")}}),Ga("TSRestType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:$r("TSType")}}),Ga("TSNamedTupleMember",{visitor:["label","elementType"],builder:["label","elementType","optional"],fields:{label:$r("Identifier"),optional:{validate:Pu,default:!1},elementType:$r("TSType")}});var Ed={aliases:["TSType"],visitor:["types"],fields:{types:NA("TSType")}};Ga("TSUnionType",Ed),Ga("TSIntersectionType",Ed),Ga("TSConditionalType",{aliases:["TSType"],visitor:["checkType","extendsType","trueType","falseType"],fields:{checkType:$r("TSType"),extendsType:$r("TSType"),trueType:$r("TSType"),falseType:$r("TSType")}}),Ga("TSInferType",{aliases:["TSType"],visitor:["typeParameter"],fields:{typeParameter:$r("TSTypeParameter")}}),Ga("TSParenthesizedType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:$r("TSType")}}),Ga("TSTypeOperator",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{operator:cs(rr("string")),typeAnnotation:$r("TSType")}}),Ga("TSIndexedAccessType",{aliases:["TSType"],visitor:["objectType","indexType"],fields:{objectType:$r("TSType"),indexType:$r("TSType")}}),Ga("TSMappedType",{aliases:["TSType"],visitor:["typeParameter","typeAnnotation","nameType"],fields:{readonly:Gs(as(!0,!1,"+","-")),typeParameter:$r("TSTypeParameter"),optional:Gs(as(!0,!1,"+","-")),typeAnnotation:hn("TSType"),nameType:hn("TSType")}}),Ga("TSLiteralType",{aliases:["TSType","TSBaseType"],visitor:["literal"],fields:{literal:{validate:function(){var e=tt("NumericLiteral","BigIntLiteral"),t=as("-"),n=tt("NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral");function i(o,s,A){ao("UnaryExpression",A)?(t(A,"operator",A.operator),e(A,"argument",A.argument)):n(o,s,A)}return i.oneOfNodeTypes=["NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral","UnaryExpression"],i}()}}}),Ga("TSExpressionWithTypeArguments",{aliases:["TSType"],visitor:["expression","typeParameters"],fields:{expression:$r("TSEntityName"),typeParameters:hn("TSTypeParameterInstantiation")}}),Ga("TSInterfaceDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","extends","body"],fields:{declare:Gs(Pu),id:$r("Identifier"),typeParameters:hn("TSTypeParameterDeclaration"),extends:Gs(Ko("TSExpressionWithTypeArguments")),body:$r("TSInterfaceBody")}}),Ga("TSInterfaceBody",{visitor:["body"],fields:{body:NA("TSTypeElement")}}),Ga("TSTypeAliasDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","typeAnnotation"],fields:{declare:Gs(Pu),id:$r("Identifier"),typeParameters:hn("TSTypeParameterDeclaration"),typeAnnotation:$r("TSType")}}),Ga("TSInstantiationExpression",{aliases:["Expression"],visitor:["expression","typeParameters"],fields:{expression:$r("Expression"),typeParameters:hn("TSTypeParameterInstantiation")}});var fu={aliases:["Expression","LVal","PatternLike"],visitor:["expression","typeAnnotation"],fields:{expression:$r("Expression"),typeAnnotation:$r("TSType")}};Ga("TSAsExpression",fu),Ga("TSSatisfiesExpression",fu),Ga("TSTypeAssertion",{aliases:["Expression","LVal","PatternLike"],visitor:["typeAnnotation","expression"],fields:{typeAnnotation:$r("TSType"),expression:$r("Expression")}}),Ga("TSEnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","members"],fields:{declare:Gs(Pu),const:Gs(Pu),id:$r("Identifier"),members:NA("TSEnumMember"),initializer:hn("Expression")}}),Ga("TSEnumMember",{visitor:["id","initializer"],fields:{id:$r(["Identifier","StringLiteral"]),initializer:hn("Expression")}}),Ga("TSModuleDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{declare:Gs(Pu),global:Gs(Pu),id:$r(["Identifier","StringLiteral"]),body:$r(["TSModuleBlock","TSModuleDeclaration"])}}),Ga("TSModuleBlock",{aliases:["Scopable","Block","BlockParent","FunctionParent"],visitor:["body"],fields:{body:NA("Statement")}}),Ga("TSImportType",{aliases:["TSType"],visitor:["argument","qualifier","typeParameters"],fields:{argument:$r("StringLiteral"),qualifier:hn("TSEntityName"),typeParameters:hn("TSTypeParameterInstantiation"),options:{validate:tt("Expression"),optional:!0}}}),Ga("TSImportEqualsDeclaration",{aliases:["Statement"],visitor:["id","moduleReference"],fields:{isExport:cs(Pu),id:$r("Identifier"),moduleReference:$r(["TSEntityName","TSExternalModuleReference"]),importKind:{validate:as("type","value"),optional:!0}}}),Ga("TSExternalModuleReference",{visitor:["expression"],fields:{expression:$r("StringLiteral")}}),Ga("TSNonNullExpression",{aliases:["Expression","LVal","PatternLike"],visitor:["expression"],fields:{expression:$r("Expression")}}),Ga("TSExportAssignment",{aliases:["Statement"],visitor:["expression"],fields:{expression:$r("Expression")}}),Ga("TSNamespaceExportDeclaration",{aliases:["Statement"],visitor:["id"],fields:{id:$r("Identifier")}}),Ga("TSTypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:{validate:tt("TSType")}}}),Ga("TSTypeParameterInstantiation",{visitor:["params"],fields:{params:{validate:pa(rr("array"),Ja(tt("TSType")))}}}),Ga("TSTypeParameterDeclaration",{visitor:["params"],fields:{params:{validate:pa(rr("array"),Ja(tt("TSTypeParameter")))}}}),Ga("TSTypeParameter",{builder:["constraint","default","name"],visitor:["constraint","default"],fields:{name:{validate:rr("string")},in:{validate:rr("boolean"),optional:!0},out:{validate:rr("boolean"),optional:!0},const:{validate:rr("boolean"),optional:!0},constraint:{validate:tt("TSType"),optional:!0},default:{validate:tt("TSType"),optional:!0}}});var tx={ModuleDeclaration:"ImportOrExportDeclaration"};Object.keys(tx).forEach(function(e){ra[e]=ra[tx[e]]}),yd(tA),yd(Qp),yd(ra),yd(du),yd(Lj),yd(KD),yd(fc),yd(Wl);var th=[].concat(Object.keys(tA),Object.keys(ra),Object.keys(KD));function Sf(e,t,n){if(e){var i=du[e.type];if(i){var o=i[t];Lb(e,t,n,o),Vj(e,t,n)}}}function Lb(e,t,n,i){i!=null&&i.validate&&(i.optional&&n==null||i.validate(e,t,n))}function Vj(e,t,n){if(n!=null){var i=Jp[n.type];i&&i(e,t,n)}}function ct(e){for(var t=Lj[e.type],n=je(t),i;!(i=n()).done;){var o=i.value;Sf(e,o,e[o])}return e}function js(e){return e===void 0&&(e=[]),ct({type:"ArrayExpression",elements:e})}function Xr(e,t,n){return ct({type:"AssignmentExpression",operator:e,left:t,right:n})}function wi(e,t,n){return ct({type:"BinaryExpression",operator:e,left:t,right:n})}function eE(e){return ct({type:"InterpreterDirective",value:e})}function rx(e){return ct({type:"Directive",value:e})}function ax(e){return ct({type:"DirectiveLiteral",value:e})}function Tn(e,t){return t===void 0&&(t=[]),ct({type:"BlockStatement",body:e,directives:t})}function tE(e){return e===void 0&&(e=null),ct({type:"BreakStatement",label:e})}function Nt(e,t){return ct({type:"CallExpression",callee:e,arguments:t})}function Kj(e,t){return e===void 0&&(e=null),ct({type:"CatchClause",param:e,body:t})}function rA(e,t,n){return ct({type:"ConditionalExpression",test:e,consequent:t,alternate:n})}function nx(e){return e===void 0&&(e=null),ct({type:"ContinueStatement",label:e})}function Wj(){return{type:"DebuggerStatement"}}function rE(e,t){return ct({type:"DoWhileStatement",test:e,body:t})}function zj(){return{type:"EmptyStatement"}}function Mr(e){return ct({type:"ExpressionStatement",expression:e})}function Xj(e,t,n){return t===void 0&&(t=null),n===void 0&&(n=null),ct({type:"File",program:e,comments:t,tokens:n})}function zl(e,t,n){return ct({type:"ForInStatement",left:e,right:t,body:n})}function pc(e,t,n,i){return e===void 0&&(e=null),t===void 0&&(t=null),n===void 0&&(n=null),ct({type:"ForStatement",init:e,test:t,update:n,body:i})}function Yj(e,t,n,i,o){return e===void 0&&(e=null),i===void 0&&(i=!1),o===void 0&&(o=!1),ct({type:"FunctionDeclaration",id:e,params:t,body:n,generator:i,async:o})}function Ro(e,t,n,i,o){return e===void 0&&(e=null),i===void 0&&(i=!1),o===void 0&&(o=!1),ct({type:"FunctionExpression",id:e,params:t,body:n,generator:i,async:o})}function He(e){return ct({type:"Identifier",name:e})}function Mb(e,t,n){return n===void 0&&(n=null),ct({type:"IfStatement",test:e,consequent:t,alternate:n})}function sx(e,t){return ct({type:"LabeledStatement",label:e,body:t})}function Vr(e){return ct({type:"StringLiteral",value:e})}function Bn(e){return ct({type:"NumericLiteral",value:e})}function Xo(){return{type:"NullLiteral"}}function no(e){return ct({type:"BooleanLiteral",value:e})}function Qj(e,t){return t===void 0&&(t=""),ct({type:"RegExpLiteral",pattern:e,flags:t})}function hl(e,t,n){return ct({type:"LogicalExpression",operator:e,left:t,right:n})}function wr(e,t,n,i){return n===void 0&&(n=!1),i===void 0&&(i=null),ct({type:"MemberExpression",object:e,property:t,computed:n,optional:i})}function rh(e,t){return ct({type:"NewExpression",callee:e,arguments:t})}function Jj(e,t,n,i){return t===void 0&&(t=[]),n===void 0&&(n="script"),i===void 0&&(i=null),ct({type:"Program",body:e,directives:t,sourceType:n,interpreter:i})}function ws(e){return ct({type:"ObjectExpression",properties:e})}function Zj(e,t,n,i,o,s,A){return e===void 0&&(e="method"),o===void 0&&(o=!1),s===void 0&&(s=!1),A===void 0&&(A=!1),ct({type:"ObjectMethod",kind:e,key:t,params:n,body:i,computed:o,generator:s,async:A})}function Pi(e,t,n,i,o){return n===void 0&&(n=!1),i===void 0&&(i=!1),o===void 0&&(o=null),ct({type:"ObjectProperty",key:e,value:t,computed:n,shorthand:i,decorators:o})}function xc(e){return ct({type:"RestElement",argument:e})}function qi(e){return e===void 0&&(e=null),ct({type:"ReturnStatement",argument:e})}function rn(e){return ct({type:"SequenceExpression",expressions:e})}function aE(e){return ct({type:"ParenthesizedExpression",expression:e})}function Ub(e,t){return e===void 0&&(e=null),ct({type:"SwitchCase",test:e,consequent:t})}function Gb(e,t){return ct({type:"SwitchStatement",discriminant:e,cases:t})}function An(){return{type:"ThisExpression"}}function nE(e){return ct({type:"ThrowStatement",argument:e})}function qb(e,t,n){return t===void 0&&(t=null),n===void 0&&(n=null),ct({type:"TryStatement",block:e,handler:t,finalizer:n})}function Ps(e,t,n){return n===void 0&&(n=!0),ct({type:"UnaryExpression",operator:e,argument:t,prefix:n})}function eg(e,t,n){return n===void 0&&(n=!1),ct({type:"UpdateExpression",operator:e,argument:t,prefix:n})}function an(e,t){return ct({type:"VariableDeclaration",kind:e,declarations:t})}function ba(e,t){return t===void 0&&(t=null),ct({type:"VariableDeclarator",id:e,init:t})}function sE(e,t){return ct({type:"WhileStatement",test:e,body:t})}function Hb(e,t){return ct({type:"WithStatement",object:e,body:t})}function Vb(e,t){return ct({type:"AssignmentPattern",left:e,right:t})}function D0(e){return ct({type:"ArrayPattern",elements:e})}function Xl(e,t,n){return n===void 0&&(n=!1),ct({type:"ArrowFunctionExpression",params:e,body:t,async:n,expression:null})}function tg(e){return ct({type:"ClassBody",body:e})}function iE(e,t,n,i){return e===void 0&&(e=null),t===void 0&&(t=null),i===void 0&&(i=null),ct({type:"ClassExpression",id:e,superClass:t,body:n,decorators:i})}function Kb(e,t,n,i){return e===void 0&&(e=null),t===void 0&&(t=null),i===void 0&&(i=null),ct({type:"ClassDeclaration",id:e,superClass:t,body:n,decorators:i})}function Wb(e){return ct({type:"ExportAllDeclaration",source:e})}function zb(e){return ct({type:"ExportDefaultDeclaration",declaration:e})}function LA(e,t,n){return e===void 0&&(e=null),t===void 0&&(t=[]),n===void 0&&(n=null),ct({type:"ExportNamedDeclaration",declaration:e,specifiers:t,source:n})}function jl(e,t){return ct({type:"ExportSpecifier",local:e,exported:t})}function Xb(e,t,n,i){return i===void 0&&(i=!1),ct({type:"ForOfStatement",left:e,right:t,body:n,await:i})}function rg(e,t){return ct({type:"ImportDeclaration",specifiers:e,source:t})}function oE(e){return ct({type:"ImportDefaultSpecifier",local:e})}function ag(e){return ct({type:"ImportNamespaceSpecifier",local:e})}function ah(e,t){return ct({type:"ImportSpecifier",local:e,imported:t})}function Yb(e,t){return t===void 0&&(t=null),ct({type:"ImportExpression",source:e,options:t})}function uE(e,t){return ct({type:"MetaProperty",meta:e,property:t})}function kf(e,t,n,i,o,s,A,d){return e===void 0&&(e="method"),o===void 0&&(o=!1),s===void 0&&(s=!1),A===void 0&&(A=!1),d===void 0&&(d=!1),ct({type:"ClassMethod",kind:e,key:t,params:n,body:i,computed:o,static:s,generator:A,async:d})}function nh(e){return ct({type:"ObjectPattern",properties:e})}function _f(e){return ct({type:"SpreadElement",argument:e})}function sh(){return{type:"Super"}}function Qb(e,t){return ct({type:"TaggedTemplateExpression",tag:e,quasi:t})}function ng(e,t){return t===void 0&&(t=!1),ct({type:"TemplateElement",value:e,tail:t})}function AE(e,t){return ct({type:"TemplateLiteral",quasis:e,expressions:t})}function h0(e,t){return e===void 0&&(e=null),t===void 0&&(t=!1),ct({type:"YieldExpression",argument:e,delegate:t})}function Yl(e){return ct({type:"AwaitExpression",argument:e})}function Jb(){return{type:"Import"}}function Zb(e){return ct({type:"BigIntLiteral",value:e})}function e2(e){return ct({type:"ExportNamespaceSpecifier",exported:e})}function sg(e,t,n,i){return n===void 0&&(n=!1),ct({type:"OptionalMemberExpression",object:e,property:t,computed:n,optional:i})}function ih(e,t,n){return ct({type:"OptionalCallExpression",callee:e,arguments:t,optional:n})}function oh(e,t,n,i,o,s){return t===void 0&&(t=null),n===void 0&&(n=null),i===void 0&&(i=null),o===void 0&&(o=!1),s===void 0&&(s=!1),ct({type:"ClassProperty",key:e,value:t,typeAnnotation:n,decorators:i,computed:o,static:s})}function t2(e,t,n,i,o,s){return t===void 0&&(t=null),n===void 0&&(n=null),i===void 0&&(i=null),o===void 0&&(o=!1),s===void 0&&(s=!1),ct({type:"ClassAccessorProperty",key:e,value:t,typeAnnotation:n,decorators:i,computed:o,static:s})}function ig(e,t,n,i){return t===void 0&&(t=null),n===void 0&&(n=null),i===void 0&&(i=!1),ct({type:"ClassPrivateProperty",key:e,value:t,decorators:n,static:i})}function j0(e,t,n,i,o){return e===void 0&&(e="method"),o===void 0&&(o=!1),ct({type:"ClassPrivateMethod",kind:e,key:t,params:n,body:i,static:o})}function lE(e){return ct({type:"PrivateName",id:e})}function Dc(e){return ct({type:"StaticBlock",body:e})}function uh(){return{type:"AnyTypeAnnotation"}}function dE(e){return ct({type:"ArrayTypeAnnotation",elementType:e})}function og(){return{type:"BooleanTypeAnnotation"}}function r2(e){return ct({type:"BooleanLiteralTypeAnnotation",value:e})}function cE(){return{type:"NullLiteralTypeAnnotation"}}function a2(e,t){return t===void 0&&(t=null),ct({type:"ClassImplements",id:e,typeParameters:t})}function n2(e,t,n,i){return t===void 0&&(t=null),n===void 0&&(n=null),ct({type:"DeclareClass",id:e,typeParameters:t,extends:n,body:i})}function s2(e){return ct({type:"DeclareFunction",id:e})}function i2(e,t,n,i){return t===void 0&&(t=null),n===void 0&&(n=null),ct({type:"DeclareInterface",id:e,typeParameters:t,extends:n,body:i})}function o2(e,t,n){return n===void 0&&(n=null),ct({type:"DeclareModule",id:e,body:t,kind:n})}function u2(e){return ct({type:"DeclareModuleExports",typeAnnotation:e})}function A2(e,t,n){return t===void 0&&(t=null),ct({type:"DeclareTypeAlias",id:e,typeParameters:t,right:n})}function l2(e,t,n){return t===void 0&&(t=null),n===void 0&&(n=null),ct({type:"DeclareOpaqueType",id:e,typeParameters:t,supertype:n})}function d2(e){return ct({type:"DeclareVariable",id:e})}function c2(e,t,n){return e===void 0&&(e=null),t===void 0&&(t=null),n===void 0&&(n=null),ct({type:"DeclareExportDeclaration",declaration:e,specifiers:t,source:n})}function f2(e){return ct({type:"DeclareExportAllDeclaration",source:e})}function fE(e){return ct({type:"DeclaredPredicate",value:e})}function pE(){return{type:"ExistsTypeAnnotation"}}function p2(e,t,n,i){return e===void 0&&(e=null),n===void 0&&(n=null),ct({type:"FunctionTypeAnnotation",typeParameters:e,params:t,rest:n,returnType:i})}function x2(e,t){return e===void 0&&(e=null),ct({type:"FunctionTypeParam",name:e,typeAnnotation:t})}function ix(e,t){return t===void 0&&(t=null),ct({type:"GenericTypeAnnotation",id:e,typeParameters:t})}function D2(){return{type:"InferredPredicate"}}function Ah(e,t){return t===void 0&&(t=null),ct({type:"InterfaceExtends",id:e,typeParameters:t})}function h2(e,t,n,i){return t===void 0&&(t=null),n===void 0&&(n=null),ct({type:"InterfaceDeclaration",id:e,typeParameters:t,extends:n,body:i})}function j2(e,t){return e===void 0&&(e=null),ct({type:"InterfaceTypeAnnotation",extends:e,body:t})}function g2(e){return ct({type:"IntersectionTypeAnnotation",types:e})}function m2(){return{type:"MixedTypeAnnotation"}}function y2(){return{type:"EmptyTypeAnnotation"}}function E2(e){return ct({type:"NullableTypeAnnotation",typeAnnotation:e})}function F2(e){return ct({type:"NumberLiteralTypeAnnotation",value:e})}function lh(){return{type:"NumberTypeAnnotation"}}function v2(e,t,n,i,o){return t===void 0&&(t=[]),n===void 0&&(n=[]),i===void 0&&(i=[]),o===void 0&&(o=!1),ct({type:"ObjectTypeAnnotation",properties:e,indexers:t,callProperties:n,internalSlots:i,exact:o})}function C2(e,t,n,i,o){return ct({type:"ObjectTypeInternalSlot",id:e,value:t,optional:n,static:i,method:o})}function b2(e){return ct({type:"ObjectTypeCallProperty",value:e,static:null})}function dh(e,t,n,i){return e===void 0&&(e=null),i===void 0&&(i=null),ct({type:"ObjectTypeIndexer",id:e,key:t,value:n,variance:i,static:null})}function B2(e,t,n){return n===void 0&&(n=null),ct({type:"ObjectTypeProperty",key:e,value:t,variance:n,kind:null,method:null,optional:null,proto:null,static:null})}function xE(e){return ct({type:"ObjectTypeSpreadProperty",argument:e})}function DE(e,t,n,i){return t===void 0&&(t=null),n===void 0&&(n=null),ct({type:"OpaqueType",id:e,typeParameters:t,supertype:n,impltype:i})}function ug(e,t){return ct({type:"QualifiedTypeIdentifier",id:e,qualification:t})}function hE(e){return ct({type:"StringLiteralTypeAnnotation",value:e})}function ox(){return{type:"StringTypeAnnotation"}}function jE(){return{type:"SymbolTypeAnnotation"}}function gE(){return{type:"ThisTypeAnnotation"}}function mE(e){return ct({type:"TupleTypeAnnotation",types:e})}function R2(e){return ct({type:"TypeofTypeAnnotation",argument:e})}function S2(e,t,n){return t===void 0&&(t=null),ct({type:"TypeAlias",id:e,typeParameters:t,right:n})}function ch(e){return ct({type:"TypeAnnotation",typeAnnotation:e})}function fh(e,t){return ct({type:"TypeCastExpression",expression:e,typeAnnotation:t})}function k2(e,t,n){return e===void 0&&(e=null),t===void 0&&(t=null),n===void 0&&(n=null),ct({type:"TypeParameter",bound:e,default:t,variance:n,name:null})}function _2(e){return ct({type:"TypeParameterDeclaration",params:e})}function Ag(e){return ct({type:"TypeParameterInstantiation",params:e})}function ph(e){return ct({type:"UnionTypeAnnotation",types:e})}function T2(e){return ct({type:"Variance",kind:e})}function ux(){return{type:"VoidTypeAnnotation"}}function w2(e,t){return ct({type:"EnumDeclaration",id:e,body:t})}function P2(e){return ct({type:"EnumBooleanBody",members:e,explicitType:null,hasUnknownMembers:null})}function I2(e){return ct({type:"EnumNumberBody",members:e,explicitType:null,hasUnknownMembers:null})}function O2(e){return ct({type:"EnumStringBody",members:e,explicitType:null,hasUnknownMembers:null})}function $2(e){return ct({type:"EnumSymbolBody",members:e,hasUnknownMembers:null})}function N2(e){return ct({type:"EnumBooleanMember",id:e,init:null})}function L2(e,t){return ct({type:"EnumNumberMember",id:e,init:t})}function M2(e,t){return ct({type:"EnumStringMember",id:e,init:t})}function U2(e){return ct({type:"EnumDefaultedMember",id:e})}function G2(e,t){return ct({type:"IndexedAccessType",objectType:e,indexType:t})}function gl(e,t){return ct({type:"OptionalIndexedAccessType",objectType:e,indexType:t,optional:null})}function Tf(e,t){return t===void 0&&(t=null),ct({type:"JSXAttribute",name:e,value:t})}function yE(e){return ct({type:"JSXClosingElement",name:e})}function hc(e,t,n,i){return t===void 0&&(t=null),i===void 0&&(i=null),ct({type:"JSXElement",openingElement:e,closingElement:t,children:n,selfClosing:i})}function yn(){return{type:"JSXEmptyExpression"}}function Fd(e){return ct({type:"JSXExpressionContainer",expression:e})}function pu(e){return ct({type:"JSXSpreadChild",expression:e})}function Ns(e){return ct({type:"JSXIdentifier",name:e})}function lg(e,t){return ct({type:"JSXMemberExpression",object:e,property:t})}function vd(e,t){return ct({type:"JSXNamespacedName",namespace:e,name:t})}function EE(e,t,n){return n===void 0&&(n=!1),ct({type:"JSXOpeningElement",name:e,attributes:t,selfClosing:n})}function FE(e){return ct({type:"JSXSpreadAttribute",argument:e})}function vE(e){return ct({type:"JSXText",value:e})}function CE(e,t,n){return ct({type:"JSXFragment",openingFragment:e,closingFragment:t,children:n})}function bE(){return{type:"JSXOpeningFragment"}}function xh(){return{type:"JSXClosingFragment"}}function q2(){return{type:"Noop"}}function Cd(e,t){return ct({type:"Placeholder",expectedNode:e,name:t})}function BE(e){return ct({type:"V8IntrinsicIdentifier",name:e})}function Dh(){return{type:"ArgumentPlaceholder"}}function vi(e,t){return ct({type:"BindExpression",object:e,callee:t})}function Ii(e,t){return ct({type:"ImportAttribute",key:e,value:t})}function RE(e){return ct({type:"Decorator",expression:e})}function H2(e,t){return t===void 0&&(t=!1),ct({type:"DoExpression",body:e,async:t})}function V2(e){return ct({type:"ExportDefaultSpecifier",exported:e})}function K2(e){return ct({type:"RecordExpression",properties:e})}function W2(e){return e===void 0&&(e=[]),ct({type:"TupleExpression",elements:e})}function z2(e){return ct({type:"DecimalLiteral",value:e})}function X2(e){return ct({type:"ModuleExpression",body:e})}function SE(){return{type:"TopicReference"}}function Ax(e){return ct({type:"PipelineTopicExpression",expression:e})}function dg(e){return ct({type:"PipelineBareFunction",callee:e})}function Y2(){return{type:"PipelinePrimaryTopicReference"}}function cg(e){return ct({type:"TSParameterProperty",parameter:e})}function lx(e,t,n,i){return e===void 0&&(e=null),t===void 0&&(t=null),i===void 0&&(i=null),ct({type:"TSDeclareFunction",id:e,typeParameters:t,params:n,returnType:i})}function Iu(e,t,n,i,o){return e===void 0&&(e=null),n===void 0&&(n=null),o===void 0&&(o=null),ct({type:"TSDeclareMethod",decorators:e,key:t,typeParameters:n,params:i,returnType:o})}function g0(e,t){return ct({type:"TSQualifiedName",left:e,right:t})}function kE(e,t,n){return e===void 0&&(e=null),n===void 0&&(n=null),ct({type:"TSCallSignatureDeclaration",typeParameters:e,parameters:t,typeAnnotation:n})}function _E(e,t,n){return e===void 0&&(e=null),n===void 0&&(n=null),ct({type:"TSConstructSignatureDeclaration",typeParameters:e,parameters:t,typeAnnotation:n})}function TE(e,t){return t===void 0&&(t=null),ct({type:"TSPropertySignature",key:e,typeAnnotation:t,kind:null})}function wE(e,t,n,i){return t===void 0&&(t=null),i===void 0&&(i=null),ct({type:"TSMethodSignature",key:e,typeParameters:t,parameters:n,typeAnnotation:i,kind:null})}function PE(e,t){return t===void 0&&(t=null),ct({type:"TSIndexSignature",parameters:e,typeAnnotation:t})}function fg(){return{type:"TSAnyKeyword"}}function Ql(){return{type:"TSBooleanKeyword"}}function kn(){return{type:"TSBigIntKeyword"}}function pg(){return{type:"TSIntrinsicKeyword"}}function aA(){return{type:"TSNeverKeyword"}}function xg(){return{type:"TSNullKeyword"}}function IE(){return{type:"TSNumberKeyword"}}function vs(){return{type:"TSObjectKeyword"}}function OE(){return{type:"TSStringKeyword"}}function Dg(){return{type:"TSSymbolKeyword"}}function dx(){return{type:"TSUndefinedKeyword"}}function $E(){return{type:"TSUnknownKeyword"}}function NE(){return{type:"TSVoidKeyword"}}function LE(){return{type:"TSThisType"}}function ME(e,t,n){return e===void 0&&(e=null),n===void 0&&(n=null),ct({type:"TSFunctionType",typeParameters:e,parameters:t,typeAnnotation:n})}function UE(e,t,n){return e===void 0&&(e=null),n===void 0&&(n=null),ct({type:"TSConstructorType",typeParameters:e,parameters:t,typeAnnotation:n})}function GE(e,t){return t===void 0&&(t=null),ct({type:"TSTypeReference",typeName:e,typeParameters:t})}function qE(e,t,n){return t===void 0&&(t=null),n===void 0&&(n=null),ct({type:"TSTypePredicate",parameterName:e,typeAnnotation:t,asserts:n})}function HE(e,t){return t===void 0&&(t=null),ct({type:"TSTypeQuery",exprName:e,typeParameters:t})}function VE(e){return ct({type:"TSTypeLiteral",members:e})}function KE(e){return ct({type:"TSArrayType",elementType:e})}function WE(e){return ct({type:"TSTupleType",elementTypes:e})}function zE(e){return ct({type:"TSOptionalType",typeAnnotation:e})}function XE(e){return ct({type:"TSRestType",typeAnnotation:e})}function hh(e,t,n){return n===void 0&&(n=!1),ct({type:"TSNamedTupleMember",label:e,elementType:t,optional:n})}function hg(e){return ct({type:"TSUnionType",types:e})}function jh(e){return ct({type:"TSIntersectionType",types:e})}function YE(e,t,n,i){return ct({type:"TSConditionalType",checkType:e,extendsType:t,trueType:n,falseType:i})}function QE(e){return ct({type:"TSInferType",typeParameter:e})}function JE(e){return ct({type:"TSParenthesizedType",typeAnnotation:e})}function fo(e){return ct({type:"TSTypeOperator",typeAnnotation:e,operator:null})}function xu(e,t){return ct({type:"TSIndexedAccessType",objectType:e,indexType:t})}function ZE(e,t,n){return t===void 0&&(t=null),n===void 0&&(n=null),ct({type:"TSMappedType",typeParameter:e,typeAnnotation:t,nameType:n})}function eF(e){return ct({type:"TSLiteralType",literal:e})}function tF(e,t){return t===void 0&&(t=null),ct({type:"TSExpressionWithTypeArguments",expression:e,typeParameters:t})}function jg(e,t,n,i){return t===void 0&&(t=null),n===void 0&&(n=null),ct({type:"TSInterfaceDeclaration",id:e,typeParameters:t,extends:n,body:i})}function rF(e){return ct({type:"TSInterfaceBody",body:e})}function aF(e,t,n){return t===void 0&&(t=null),ct({type:"TSTypeAliasDeclaration",id:e,typeParameters:t,typeAnnotation:n})}function nF(e,t){return t===void 0&&(t=null),ct({type:"TSInstantiationExpression",expression:e,typeParameters:t})}function gg(e,t){return ct({type:"TSAsExpression",expression:e,typeAnnotation:t})}function sF(e,t){return ct({type:"TSSatisfiesExpression",expression:e,typeAnnotation:t})}function iF(e,t){return ct({type:"TSTypeAssertion",typeAnnotation:e,expression:t})}function oF(e,t){return ct({type:"TSEnumDeclaration",id:e,members:t})}function mg(e,t){return t===void 0&&(t=null),ct({type:"TSEnumMember",id:e,initializer:t})}function yg(e,t){return ct({type:"TSModuleDeclaration",id:e,body:t})}function uF(e){return ct({type:"TSModuleBlock",body:e})}function AF(e,t,n){return t===void 0&&(t=null),n===void 0&&(n=null),ct({type:"TSImportType",argument:e,qualifier:t,typeParameters:n})}function lF(e,t){return ct({type:"TSImportEqualsDeclaration",id:e,moduleReference:t,isExport:null})}function dF(e){return ct({type:"TSExternalModuleReference",expression:e})}function m0(e){return ct({type:"TSNonNullExpression",expression:e})}function cF(e){return ct({type:"TSExportAssignment",expression:e})}function fF(e){return ct({type:"TSNamespaceExportDeclaration",id:e})}function pF(e){return ct({type:"TSTypeAnnotation",typeAnnotation:e})}function xF(e){return ct({type:"TSTypeParameterInstantiation",params:e})}function DF(e){return ct({type:"TSTypeParameterDeclaration",params:e})}function Eg(e,t,n){return e===void 0&&(e=null),t===void 0&&(t=null),ct({type:"TSTypeParameter",constraint:e,default:t,name:n})}function hF(e){return er("NumberLiteral","NumericLiteral","The node type "),Bn(e)}function Q2(e,t){return t===void 0&&(t=""),er("RegexLiteral","RegExpLiteral","The node type "),Qj(e,t)}function J2(e){return er("RestProperty","RestElement","The node type "),xc(e)}function Z2(e){return er("SpreadProperty","SpreadElement","The node type "),_f(e)}function r4(e,t){for(var n=e.value.split(/\r\n|\n|\r/),i=0,o=0;o<n.length;o++)/[^ \t]/.exec(n[o])&&(i=o);for(var s="",A=0;A<n.length;A++){var d=n[A],c=A===0,f=A===n.length-1,x=A===i,g=d.replace(/\t/g," ");c||(g=g.replace(/^[ ]+/,"")),f||(g=g.replace(/[ ]+$/,"")),g&&(x||(g+=" "),s+=g)}s&&t.push(di(Vr(s),e))}function a4(e){for(var t=[],n=0;n<e.children.length;n++){var i=e.children[n];if(G(i)){r4(i,t);continue}OA(i)&&(i=i.expression),!vf(i)&&t.push(i)}return t}function e8(e){return!!(e&&tA[e.type])}function n4(e){if(!e8(e)){var t,n=(t=e?.type)!=null?t:JSON.stringify(e);throw new TypeError('Not a valid node of type "'+n+'"')}}function Le(e,t,n){if(!ao(e,t,n))throw new Error('Expected type "'+e+'" with option '+JSON.stringify(n)+", "+('but instead got "'+t.type+'".'))}function s4(e,t){Le("ArrayExpression",e,t)}function i4(e,t){Le("AssignmentExpression",e,t)}function o4(e,t){Le("BinaryExpression",e,t)}function u4(e,t){Le("InterpreterDirective",e,t)}function A4(e,t){Le("Directive",e,t)}function l4(e,t){Le("DirectiveLiteral",e,t)}function d4(e,t){Le("BlockStatement",e,t)}function c4(e,t){Le("BreakStatement",e,t)}function f4(e,t){Le("CallExpression",e,t)}function p4(e,t){Le("CatchClause",e,t)}function x4(e,t){Le("ConditionalExpression",e,t)}function D4(e,t){Le("ContinueStatement",e,t)}function h4(e,t){Le("DebuggerStatement",e,t)}function j4(e,t){Le("DoWhileStatement",e,t)}function g4(e,t){Le("EmptyStatement",e,t)}function t8(e,t){Le("ExpressionStatement",e,t)}function m4(e,t){Le("File",e,t)}function jF(e,t){Le("ForInStatement",e,t)}function r8(e,t){Le("ForStatement",e,t)}function a8(e,t){Le("FunctionDeclaration",e,t)}function y4(e,t){Le("FunctionExpression",e,t)}function gF(e,t){Le("Identifier",e,t)}function E4(e,t){Le("IfStatement",e,t)}function mF(e,t){Le("LabeledStatement",e,t)}function F4(e,t){Le("StringLiteral",e,t)}function v4(e,t){Le("NumericLiteral",e,t)}function C4(e,t){Le("NullLiteral",e,t)}function nA(e,t){Le("BooleanLiteral",e,t)}function yF(e,t){Le("RegExpLiteral",e,t)}function b4(e,t){Le("LogicalExpression",e,t)}function B4(e,t){Le("MemberExpression",e,t)}function R4(e,t){Le("NewExpression",e,t)}function S4(e,t){Le("Program",e,t)}function EF(e,t){Le("ObjectExpression",e,t)}function k4(e,t){Le("ObjectMethod",e,t)}function FF(e,t){Le("ObjectProperty",e,t)}function n8(e,t){Le("RestElement",e,t)}function _4(e,t){Le("ReturnStatement",e,t)}function T4(e,t){Le("SequenceExpression",e,t)}function w4(e,t){Le("ParenthesizedExpression",e,t)}function s8(e,t){Le("SwitchCase",e,t)}function P4(e,t){Le("SwitchStatement",e,t)}function I4(e,t){Le("ThisExpression",e,t)}function O4(e,t){Le("ThrowStatement",e,t)}function vF(e,t){Le("TryStatement",e,t)}function CF(e,t){Le("UnaryExpression",e,t)}function $4(e,t){Le("UpdateExpression",e,t)}function N4(e,t){Le("VariableDeclaration",e,t)}function L4(e,t){Le("VariableDeclarator",e,t)}function M4(e,t){Le("WhileStatement",e,t)}function U4(e,t){Le("WithStatement",e,t)}function G4(e,t){Le("AssignmentPattern",e,t)}function q4(e,t){Le("ArrayPattern",e,t)}function H4(e,t){Le("ArrowFunctionExpression",e,t)}function V4(e,t){Le("ClassBody",e,t)}function K4(e,t){Le("ClassExpression",e,t)}function W4(e,t){Le("ClassDeclaration",e,t)}function z4(e,t){Le("ExportAllDeclaration",e,t)}function X4(e,t){Le("ExportDefaultDeclaration",e,t)}function Y4(e,t){Le("ExportNamedDeclaration",e,t)}function Q4(e,t){Le("ExportSpecifier",e,t)}function J4(e,t){Le("ForOfStatement",e,t)}function Z4(e,t){Le("ImportDeclaration",e,t)}function eT(e,t){Le("ImportDefaultSpecifier",e,t)}function tT(e,t){Le("ImportNamespaceSpecifier",e,t)}function rT(e,t){Le("ImportSpecifier",e,t)}function aT(e,t){Le("ImportExpression",e,t)}function h(e,t){Le("MetaProperty",e,t)}function E(e,t){Le("ClassMethod",e,t)}function I(e,t){Le("ObjectPattern",e,t)}function Q(e,t){Le("SpreadElement",e,t)}function he(e,t){Le("Super",e,t)}function Ie(e,t){Le("TaggedTemplateExpression",e,t)}function Qe(e,t){Le("TemplateElement",e,t)}function Dt(e,t){Le("TemplateLiteral",e,t)}function kt(e,t){Le("YieldExpression",e,t)}function fr(e,t){Le("AwaitExpression",e,t)}function pr(e,t){Le("Import",e,t)}function Cr(e,t){Le("BigIntLiteral",e,t)}function aa(e,t){Le("ExportNamespaceSpecifier",e,t)}function Ba(e,t){Le("OptionalMemberExpression",e,t)}function on(e,t){Le("OptionalCallExpression",e,t)}function Wn(e,t){Le("ClassProperty",e,t)}function un(e,t){Le("ClassAccessorProperty",e,t)}function is(e,t){Le("ClassPrivateProperty",e,t)}function fs(e,t){Le("ClassPrivateMethod",e,t)}function MA(e,t){Le("PrivateName",e,t)}function Ou(e,t){Le("StaticBlock",e,t)}function UA(e,t){Le("AnyTypeAnnotation",e,t)}function so(e,t){Le("ArrayTypeAnnotation",e,t)}function Jl(e,t){Le("BooleanTypeAnnotation",e,t)}function jc(e,t){Le("BooleanLiteralTypeAnnotation",e,t)}function i8(e,t){Le("NullLiteralTypeAnnotation",e,t)}function Vve(e,t){Le("ClassImplements",e,t)}function Kve(e,t){Le("DeclareClass",e,t)}function Wve(e,t){Le("DeclareFunction",e,t)}function zve(e,t){Le("DeclareInterface",e,t)}function Xve(e,t){Le("DeclareModule",e,t)}function Yve(e,t){Le("DeclareModuleExports",e,t)}function Qve(e,t){Le("DeclareTypeAlias",e,t)}function Jve(e,t){Le("DeclareOpaqueType",e,t)}function Zve(e,t){Le("DeclareVariable",e,t)}function eCe(e,t){Le("DeclareExportDeclaration",e,t)}function tCe(e,t){Le("DeclareExportAllDeclaration",e,t)}function rCe(e,t){Le("DeclaredPredicate",e,t)}function aCe(e,t){Le("ExistsTypeAnnotation",e,t)}function nCe(e,t){Le("FunctionTypeAnnotation",e,t)}function sCe(e,t){Le("FunctionTypeParam",e,t)}function iCe(e,t){Le("GenericTypeAnnotation",e,t)}function oCe(e,t){Le("InferredPredicate",e,t)}function uCe(e,t){Le("InterfaceExtends",e,t)}function ACe(e,t){Le("InterfaceDeclaration",e,t)}function lCe(e,t){Le("InterfaceTypeAnnotation",e,t)}function dCe(e,t){Le("IntersectionTypeAnnotation",e,t)}function cCe(e,t){Le("MixedTypeAnnotation",e,t)}function fCe(e,t){Le("EmptyTypeAnnotation",e,t)}function pCe(e,t){Le("NullableTypeAnnotation",e,t)}function xCe(e,t){Le("NumberLiteralTypeAnnotation",e,t)}function DCe(e,t){Le("NumberTypeAnnotation",e,t)}function hCe(e,t){Le("ObjectTypeAnnotation",e,t)}function jCe(e,t){Le("ObjectTypeInternalSlot",e,t)}function gCe(e,t){Le("ObjectTypeCallProperty",e,t)}function mCe(e,t){Le("ObjectTypeIndexer",e,t)}function yCe(e,t){Le("ObjectTypeProperty",e,t)}function ECe(e,t){Le("ObjectTypeSpreadProperty",e,t)}function FCe(e,t){Le("OpaqueType",e,t)}function vCe(e,t){Le("QualifiedTypeIdentifier",e,t)}function CCe(e,t){Le("StringLiteralTypeAnnotation",e,t)}function bCe(e,t){Le("StringTypeAnnotation",e,t)}function BCe(e,t){Le("SymbolTypeAnnotation",e,t)}function RCe(e,t){Le("ThisTypeAnnotation",e,t)}function SCe(e,t){Le("TupleTypeAnnotation",e,t)}function kCe(e,t){Le("TypeofTypeAnnotation",e,t)}function _Ce(e,t){Le("TypeAlias",e,t)}function TCe(e,t){Le("TypeAnnotation",e,t)}function wCe(e,t){Le("TypeCastExpression",e,t)}function PCe(e,t){Le("TypeParameter",e,t)}function ICe(e,t){Le("TypeParameterDeclaration",e,t)}function OCe(e,t){Le("TypeParameterInstantiation",e,t)}function $Ce(e,t){Le("UnionTypeAnnotation",e,t)}function NCe(e,t){Le("Variance",e,t)}function LCe(e,t){Le("VoidTypeAnnotation",e,t)}function MCe(e,t){Le("EnumDeclaration",e,t)}function UCe(e,t){Le("EnumBooleanBody",e,t)}function GCe(e,t){Le("EnumNumberBody",e,t)}function qCe(e,t){Le("EnumStringBody",e,t)}function HCe(e,t){Le("EnumSymbolBody",e,t)}function VCe(e,t){Le("EnumBooleanMember",e,t)}function KCe(e,t){Le("EnumNumberMember",e,t)}function WCe(e,t){Le("EnumStringMember",e,t)}function zCe(e,t){Le("EnumDefaultedMember",e,t)}function XCe(e,t){Le("IndexedAccessType",e,t)}function YCe(e,t){Le("OptionalIndexedAccessType",e,t)}function QCe(e,t){Le("JSXAttribute",e,t)}function JCe(e,t){Le("JSXClosingElement",e,t)}function ZCe(e,t){Le("JSXElement",e,t)}function ebe(e,t){Le("JSXEmptyExpression",e,t)}function tbe(e,t){Le("JSXExpressionContainer",e,t)}function rbe(e,t){Le("JSXSpreadChild",e,t)}function abe(e,t){Le("JSXIdentifier",e,t)}function nbe(e,t){Le("JSXMemberExpression",e,t)}function sbe(e,t){Le("JSXNamespacedName",e,t)}function ibe(e,t){Le("JSXOpeningElement",e,t)}function obe(e,t){Le("JSXSpreadAttribute",e,t)}function ube(e,t){Le("JSXText",e,t)}function Abe(e,t){Le("JSXFragment",e,t)}function lbe(e,t){Le("JSXOpeningFragment",e,t)}function dbe(e,t){Le("JSXClosingFragment",e,t)}function cbe(e,t){Le("Noop",e,t)}function fbe(e,t){Le("Placeholder",e,t)}function pbe(e,t){Le("V8IntrinsicIdentifier",e,t)}function xbe(e,t){Le("ArgumentPlaceholder",e,t)}function Dbe(e,t){Le("BindExpression",e,t)}function hbe(e,t){Le("ImportAttribute",e,t)}function jbe(e,t){Le("Decorator",e,t)}function gbe(e,t){Le("DoExpression",e,t)}function mbe(e,t){Le("ExportDefaultSpecifier",e,t)}function ybe(e,t){Le("RecordExpression",e,t)}function Ebe(e,t){Le("TupleExpression",e,t)}function Fbe(e,t){Le("DecimalLiteral",e,t)}function vbe(e,t){Le("ModuleExpression",e,t)}function Cbe(e,t){Le("TopicReference",e,t)}function bbe(e,t){Le("PipelineTopicExpression",e,t)}function Bbe(e,t){Le("PipelineBareFunction",e,t)}function Rbe(e,t){Le("PipelinePrimaryTopicReference",e,t)}function Sbe(e,t){Le("TSParameterProperty",e,t)}function kbe(e,t){Le("TSDeclareFunction",e,t)}function _be(e,t){Le("TSDeclareMethod",e,t)}function Tbe(e,t){Le("TSQualifiedName",e,t)}function wbe(e,t){Le("TSCallSignatureDeclaration",e,t)}function Pbe(e,t){Le("TSConstructSignatureDeclaration",e,t)}function Ibe(e,t){Le("TSPropertySignature",e,t)}function Obe(e,t){Le("TSMethodSignature",e,t)}function $be(e,t){Le("TSIndexSignature",e,t)}function Nbe(e,t){Le("TSAnyKeyword",e,t)}function Lbe(e,t){Le("TSBooleanKeyword",e,t)}function Mbe(e,t){Le("TSBigIntKeyword",e,t)}function Ube(e,t){Le("TSIntrinsicKeyword",e,t)}function Gbe(e,t){Le("TSNeverKeyword",e,t)}function qbe(e,t){Le("TSNullKeyword",e,t)}function Hbe(e,t){Le("TSNumberKeyword",e,t)}function Vbe(e,t){Le("TSObjectKeyword",e,t)}function Kbe(e,t){Le("TSStringKeyword",e,t)}function Wbe(e,t){Le("TSSymbolKeyword",e,t)}function zbe(e,t){Le("TSUndefinedKeyword",e,t)}function Xbe(e,t){Le("TSUnknownKeyword",e,t)}function Ybe(e,t){Le("TSVoidKeyword",e,t)}function Qbe(e,t){Le("TSThisType",e,t)}function Jbe(e,t){Le("TSFunctionType",e,t)}function Zbe(e,t){Le("TSConstructorType",e,t)}function e2e(e,t){Le("TSTypeReference",e,t)}function t2e(e,t){Le("TSTypePredicate",e,t)}function r2e(e,t){Le("TSTypeQuery",e,t)}function a2e(e,t){Le("TSTypeLiteral",e,t)}function n2e(e,t){Le("TSArrayType",e,t)}function s2e(e,t){Le("TSTupleType",e,t)}function i2e(e,t){Le("TSOptionalType",e,t)}function o2e(e,t){Le("TSRestType",e,t)}function u2e(e,t){Le("TSNamedTupleMember",e,t)}function A2e(e,t){Le("TSUnionType",e,t)}function l2e(e,t){Le("TSIntersectionType",e,t)}function d2e(e,t){Le("TSConditionalType",e,t)}function c2e(e,t){Le("TSInferType",e,t)}function f2e(e,t){Le("TSParenthesizedType",e,t)}function p2e(e,t){Le("TSTypeOperator",e,t)}function x2e(e,t){Le("TSIndexedAccessType",e,t)}function D2e(e,t){Le("TSMappedType",e,t)}function h2e(e,t){Le("TSLiteralType",e,t)}function j2e(e,t){Le("TSExpressionWithTypeArguments",e,t)}function g2e(e,t){Le("TSInterfaceDeclaration",e,t)}function m2e(e,t){Le("TSInterfaceBody",e,t)}function y2e(e,t){Le("TSTypeAliasDeclaration",e,t)}function E2e(e,t){Le("TSInstantiationExpression",e,t)}function F2e(e,t){Le("TSAsExpression",e,t)}function v2e(e,t){Le("TSSatisfiesExpression",e,t)}function C2e(e,t){Le("TSTypeAssertion",e,t)}function b2e(e,t){Le("TSEnumDeclaration",e,t)}function B2e(e,t){Le("TSEnumMember",e,t)}function R2e(e,t){Le("TSModuleDeclaration",e,t)}function S2e(e,t){Le("TSModuleBlock",e,t)}function k2e(e,t){Le("TSImportType",e,t)}function _2e(e,t){Le("TSImportEqualsDeclaration",e,t)}function T2e(e,t){Le("TSExternalModuleReference",e,t)}function w2e(e,t){Le("TSNonNullExpression",e,t)}function P2e(e,t){Le("TSExportAssignment",e,t)}function I2e(e,t){Le("TSNamespaceExportDeclaration",e,t)}function O2e(e,t){Le("TSTypeAnnotation",e,t)}function $2e(e,t){Le("TSTypeParameterInstantiation",e,t)}function N2e(e,t){Le("TSTypeParameterDeclaration",e,t)}function L2e(e,t){Le("TSTypeParameter",e,t)}function M2e(e,t){Le("Standardized",e,t)}function oX(e,t){Le("Expression",e,t)}function U2e(e,t){Le("Binary",e,t)}function G2e(e,t){Le("Scopable",e,t)}function q2e(e,t){Le("BlockParent",e,t)}function H2e(e,t){Le("Block",e,t)}function V2e(e,t){Le("Statement",e,t)}function K2e(e,t){Le("Terminatorless",e,t)}function W2e(e,t){Le("CompletionStatement",e,t)}function z2e(e,t){Le("Conditional",e,t)}function X2e(e,t){Le("Loop",e,t)}function Y2e(e,t){Le("While",e,t)}function Q2e(e,t){Le("ExpressionWrapper",e,t)}function J2e(e,t){Le("For",e,t)}function Z2e(e,t){Le("ForXStatement",e,t)}function e8e(e,t){Le("Function",e,t)}function t8e(e,t){Le("FunctionParent",e,t)}function r8e(e,t){Le("Pureish",e,t)}function a8e(e,t){Le("Declaration",e,t)}function n8e(e,t){Le("PatternLike",e,t)}function s8e(e,t){Le("LVal",e,t)}function i8e(e,t){Le("TSEntityName",e,t)}function o8e(e,t){Le("Literal",e,t)}function u8e(e,t){Le("Immutable",e,t)}function A8e(e,t){Le("UserWhitespacable",e,t)}function l8e(e,t){Le("Method",e,t)}function d8e(e,t){Le("ObjectMember",e,t)}function c8e(e,t){Le("Property",e,t)}function f8e(e,t){Le("UnaryLike",e,t)}function p8e(e,t){Le("Pattern",e,t)}function x8e(e,t){Le("Class",e,t)}function D8e(e,t){Le("ImportOrExportDeclaration",e,t)}function h8e(e,t){Le("ExportDeclaration",e,t)}function j8e(e,t){Le("ModuleSpecifier",e,t)}function g8e(e,t){Le("Accessor",e,t)}function m8e(e,t){Le("Private",e,t)}function y8e(e,t){Le("Flow",e,t)}function E8e(e,t){Le("FlowType",e,t)}function F8e(e,t){Le("FlowBaseAnnotation",e,t)}function v8e(e,t){Le("FlowDeclaration",e,t)}function C8e(e,t){Le("FlowPredicate",e,t)}function b8e(e,t){Le("EnumBody",e,t)}function B8e(e,t){Le("EnumMember",e,t)}function R8e(e,t){Le("JSX",e,t)}function S8e(e,t){Le("Miscellaneous",e,t)}function k8e(e,t){Le("TypeScript",e,t)}function _8e(e,t){Le("TSTypeElement",e,t)}function T8e(e,t){Le("TSType",e,t)}function w8e(e,t){Le("TSBaseType",e,t)}function P8e(e,t){er("assertNumberLiteral","assertNumericLiteral"),Le("NumberLiteral",e,t)}function I8e(e,t){er("assertRegexLiteral","assertRegExpLiteral"),Le("RegexLiteral",e,t)}function O8e(e,t){er("assertRestProperty","assertRestElement"),Le("RestProperty",e,t)}function $8e(e,t){er("assertSpreadProperty","assertSpreadElement"),Le("SpreadProperty",e,t)}function N8e(e,t){er("assertModuleDeclaration","assertImportOrExportDeclaration"),Le("ModuleDeclaration",e,t)}function uX(e){switch(e){case"string":return ox();case"number":return lh();case"undefined":return ux();case"boolean":return og();case"function":return ix(He("Function"));case"object":return ix(He("Object"));case"symbol":return ix(He("Symbol"));case"bigint":return uh()}throw new Error("Invalid typeof value: "+e)}function AX(e){return Ut(e)?e.name:e.id.name+"."+AX(e.qualification)}function nT(e){for(var t=Array.from(e),n=new Map,i=new Map,o=new Set,s=[],A=0;A<t.length;A++){var d=t[A];if(d&&!s.includes(d)){if(ln(d))return[d];if(_y(d)){i.set(d.type,d);continue}if(gf(d)){o.has(d.types)||(t.push.apply(t,K(d.types)),o.add(d.types));continue}if(cf(d)){var c=AX(d.id);if(n.has(c)){var f=n.get(c);if(f.typeParameters){if(d.typeParameters){var x;(x=f.typeParameters.params).push.apply(x,K(d.typeParameters.params)),f.typeParameters.params=nT(f.typeParameters.params)}}else f=d.typeParameters}else n.set(c,d);continue}s.push(d)}}for(var g=je(i),m;!(m=g()).done;){var B=J(m.value,2),b=B[1];s.push(b)}for(var _=je(n),C;!(C=_()).done;){var w=J(C.value,2),P=w[1];s.push(P)}return s}function o8(e){var t=nT(e);return t.length===1?t[0]:ph(t)}function lX(e){return Ut(e)?e.name:e.right.name+"."+lX(e.left)}function dX(e){for(var t=Array.from(e),n=new Map,i=new Map,o=new Set,s=[],A=0;A<t.length;A++){var d=t[A];if(d&&!s.includes(d)){if(Ey(d))return[d];if(xl(d)){i.set(d.type,d);continue}if(Cy(d)){o.has(d.types)||(t.push.apply(t,K(d.types)),o.add(d.types));continue}if(vy(d)&&d.typeParameters){var c=lX(d.typeName);if(n.has(c)){var f=n.get(c);if(f.typeParameters){if(d.typeParameters){var x;(x=f.typeParameters.params).push.apply(x,K(d.typeParameters.params)),f.typeParameters.params=dX(f.typeParameters.params)}}else f=d.typeParameters}else n.set(c,d);continue}s.push(d)}}for(var g=je(i),m;!(m=g()).done;){var B=J(m.value,2),b=B[1];s.push(b)}for(var _=je(n),C;!(C=_()).done;){var w=J(C.value,2),P=w[1];s.push(P)}return s}function cX(e){var t=e.map(function(i){return ro(i)?i.typeAnnotation:i}),n=dX(t);return n.length===1?n[0]:hg(n)}function Fg(){return Ps("void",Bn(0),!0)}var L8e={hasOwn:Function.call.bind(Object.prototype.hasOwnProperty)},wf=L8e.hasOwn;function fX(e,t,n,i){return e&&typeof e.type=="string"?xX(e,t,n,i):e}function pX(e,t,n,i){return Array.isArray(e)?e.map(function(o){return fX(o,t,n,i)}):fX(e,t,n,i)}function ke(e,t,n){return t===void 0&&(t=!0),n===void 0&&(n=!1),xX(e,t,n,new Map)}function xX(e,t,n,i){if(t===void 0&&(t=!0),n===void 0&&(n=!1),!e)return e;var o=e.type,s={type:e.type};if(Ut(e))s.name=e.name,wf(e,"optional")&&typeof e.optional=="boolean"&&(s.optional=e.optional),wf(e,"typeAnnotation")&&(s.typeAnnotation=t?pX(e.typeAnnotation,!0,n,i):e.typeAnnotation);else if(wf(du,o))for(var A=0,d=Object.keys(du[o]);A<d.length;A++){var c=d[A];wf(e,c)&&(t?s[c]=Tt(e)&&c==="comments"?u8(e.comments,t,n,i):pX(e[c],!0,n,i):s[c]=e[c])}else throw new Error('Unknown node type: "'+o+'"');return wf(e,"loc")&&(n?s.loc=null:s.loc=e.loc),wf(e,"leadingComments")&&(s.leadingComments=u8(e.leadingComments,t,n,i)),wf(e,"innerComments")&&(s.innerComments=u8(e.innerComments,t,n,i)),wf(e,"trailingComments")&&(s.trailingComments=u8(e.trailingComments,t,n,i)),wf(e,"extra")&&(s.extra=Object.assign({},e.extra)),s}function u8(e,t,n,i){return!e||!t?e:e.map(function(o){var s=i.get(o);if(s)return s;var A=o.type,d=o.value,c=o.loc,f={type:A,value:d,loc:c};return n&&(f.loc=null),i.set(o,f),f})}function DX(e){return ke(e,!1)}function M8e(e){return ke(e)}function U8e(e){return ke(e,!0,!0)}function G8e(e){return ke(e,!1,!0)}function sT(e,t,n){if(!n||!e)return e;var i=t+"Comments";if(e[i])if(t==="leading")e[i]=n.concat(e[i]);else{var o;(o=e[i]).push.apply(o,K(n))}else e[i]=n;return e}function bF(e,t,n,i){return sT(e,t,[{type:i?"CommentLine":"CommentBlock",value:n}])}function iT(e,t,n){t&&n&&(t[e]=Array.from(new Set([].concat(t[e],n[e]).filter(Boolean))))}function oT(e,t){iT("innerComments",e,t)}function A8(e,t){iT("leadingComments",e,t)}function uT(e,t){iT("trailingComments",e,t)}function cx(e,t){return uT(e,t),A8(e,t),oT(e,t),e}function AT(e){return $j.forEach(function(t){e[t]=null}),e}var q8e=ra.Standardized,H8e=ra.Expression,V8e=ra.Binary,K8e=ra.Scopable,W8e=ra.BlockParent,z8e=ra.Block,X8e=ra.Statement,Y8e=ra.Terminatorless,Q8e=ra.CompletionStatement,J8e=ra.Conditional,Z8e=ra.Loop,e3e=ra.While,t3e=ra.ExpressionWrapper,r3e=ra.For,a3e=ra.ForXStatement,hX=ra.Function,n3e=ra.FunctionParent,s3e=ra.Pureish,i3e=ra.Declaration,o3e=ra.PatternLike,u3e=ra.LVal,A3e=ra.TSEntityName,l3e=ra.Literal,d3e=ra.Immutable,c3e=ra.UserWhitespacable,f3e=ra.Method,p3e=ra.ObjectMember,x3e=ra.Property,D3e=ra.UnaryLike,h3e=ra.Pattern,j3e=ra.Class,jX=ra.ImportOrExportDeclaration,g3e=ra.ExportDeclaration,m3e=ra.ModuleSpecifier,y3e=ra.Accessor,E3e=ra.Private,F3e=ra.Flow,v3e=ra.FlowType,C3e=ra.FlowBaseAnnotation,b3e=ra.FlowDeclaration,B3e=ra.FlowPredicate,R3e=ra.EnumBody,S3e=ra.EnumMember,k3e=ra.JSX,_3e=ra.Miscellaneous,T3e=ra.TypeScript,w3e=ra.TSTypeElement,P3e=ra.TSType,I3e=ra.TSBaseType,O3e=jX;function l8(e,t){if(at(e))return e;var n=[];return xn(e)?n=[]:(Tu(e)||(Ho(t)?e=qi(e):e=Mr(e)),n=[e]),Tn(n)}function $3e(e,t){t===void 0&&(t="body");var n=l8(e[t],e);return e[t]=n,n}function vg(e){e=e+"";for(var t="",n=je(e),i;!(i=n()).done;){var o=i.value;t+=f0(o.codePointAt(0))?o:"-"}return t=t.replace(/^[-0-9]+/,""),t=t.replace(/[-\s]+(.)?/g,function(s,A){return A?A.toUpperCase():""}),p0(t)||(t="_"+t),t||"_"}function gX(e){return e=vg(e),(e==="eval"||e==="arguments")&&(e="_"+e),e}function y0(e,t){return t===void 0&&(t=e.key||e.property),!e.computed&&Ut(t)&&(t=Vr(t.name)),t}function Du(e){if(cn(e)&&(e=e.expression),jd(e))return e;if(Vp(e)?e.type="ClassExpression":Ho(e)&&(e.type="FunctionExpression"),!jd(e))throw new Error("cannot turn "+e.type+" to an expression");return e}function fx(e,t,n){if(e){var i=tA[e.type];if(i){n=n||{},t(e,n);for(var o=je(i),s;!(s=o()).done;){var A=s.value,d=e[A];if(Array.isArray(d))for(var c=je(d),f;!(f=c()).done;){var x=f.value;fx(x,t,n)}else fx(d,t,n)}}}}var mX=["tokens","start","end","loc","raw","rawValue"],N3e=[].concat(K($j),["comments"],mX);function lT(e,t){t===void 0&&(t={});for(var n=t.preserveComments?mX:N3e,i=je(n),o;!(o=i()).done;){var s=o.value;e[s]!=null&&(e[s]=void 0)}for(var A=0,d=Object.keys(e);A<d.length;A++){var c=d[A];c[0]==="_"&&e[c]!=null&&(e[c]=void 0)}for(var f=Object.getOwnPropertySymbols(e),x=je(f),g;!(g=x()).done;){var m=g.value;e[m]=null}}function dT(e,t){return fx(e,lT,t),e}function px(e,t){t===void 0&&(t=e.key);var n;return e.kind==="method"?px.increment()+"":(Ut(t)?n=t.name:Br(t)?n=JSON.stringify(t.value):n=JSON.stringify(dT(ke(t))),e.computed&&(n="["+n+"]"),e.static&&(n="static:"+n),n)}px.uid=0,px.increment=function(){return px.uid>=Number.MAX_SAFE_INTEGER?px.uid=0:px.uid++};function yX(e,t){if(Tu(e))return e;var n=!1,i;if(Vp(e))n=!0,i="ClassDeclaration";else if(Ho(e))n=!0,i="FunctionDeclaration";else if(zt(e))return Mr(e);if(n&&!e.id&&(i=!1),!i){if(t)return!1;throw new Error("cannot turn "+e.type+" to a statement")}return e.type=i,e}var L3e=Function.call.bind(Object.prototype.toString);function M3e(e){return L3e(e)==="[object RegExp]"}function U3e(e){if(typeof e!="object"||e===null||Object.prototype.toString.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function BF(e){if(e===void 0)return He("undefined");if(e===!0||e===!1)return no(e);if(e===null)return Xo();if(typeof e=="string")return Vr(e);if(typeof e=="number"){var t;if(Number.isFinite(e))t=Bn(Math.abs(e));else{var n;Number.isNaN(e)?n=Bn(0):n=Bn(1),t=wi("/",n,Bn(0))}return(e<0||Object.is(e,-0))&&(t=Ps("-",t)),t}if(M3e(e)){var i=e.source,o=/\/([a-z]+|)$/.exec(e.toString())[1];return Qj(i,o)}if(Array.isArray(e))return js(e.map(BF));if(U3e(e)){for(var s=[],A=0,d=Object.keys(e);A<d.length;A++){var c=d[A],f=void 0;p0(c)?f=He(c):f=Vr(c),s.push(Pi(f,BF(e[c])))}return ws(s)}throw new Error("don't know how to turn this value into a node")}function G3e(e,t,n){return n===void 0&&(n=!1),e.object=wr(e.object,e.property,e.computed),e.property=t,e.computed=!!n,e}function di(e,t){if(!e||!t)return e;for(var n=je(Nj.optional),i;!(i=n()).done;){var o=i.value;e[o]==null&&(e[o]=t[o])}for(var s=0,A=Object.keys(t);s<A.length;s++){var d=A[s];d[0]==="_"&&d!=="__clone"&&(e[d]=t[d])}for(var c=je(Nj.force),f;!(f=c()).done;){var x=f.value;e[x]=t[x]}return cx(e,t),e}function q3e(e,t){if(_i(e.object))throw new Error("Cannot prepend node to super property access (`super.foo`).");return e.object=wr(t,e.object),e}function ml(e,t,n,i){for(var o=[].concat(e),s=Object.create(null);o.length;){var A=o.shift();if(A&&!(i&&(zt(A)||Cn(A)||Qs(A)))){if(Ut(A)){if(t){var d=s[A.name]=s[A.name]||[];d.push(A)}else s[A.name]=A;continue}if(Kp(A)&&!ut(A)){Be(A.declaration)&&o.push(A.declaration);continue}if(n){if(Aa(A)){o.push(A.id);continue}if(Zr(A))continue}var c=ml.keys[A.type];if(c)for(var f=0;f<c.length;f++){var x=c[f],g=A[x];g&&(Array.isArray(g)?o.push.apply(o,K(g)):o.push(g))}}}return s}var H3e={DeclareClass:["id"],DeclareFunction:["id"],DeclareModule:["id"],DeclareVariable:["id"],DeclareInterface:["id"],DeclareTypeAlias:["id"],DeclareOpaqueType:["id"],InterfaceDeclaration:["id"],TypeAlias:["id"],OpaqueType:["id"],CatchClause:["param"],LabeledStatement:["label"],UnaryExpression:["argument"],AssignmentExpression:["left"],ImportSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDefaultSpecifier:["local"],ImportDeclaration:["specifiers"],ExportSpecifier:["exported"],ExportNamespaceSpecifier:["exported"],ExportDefaultSpecifier:["exported"],FunctionDeclaration:["id","params"],FunctionExpression:["id","params"],ArrowFunctionExpression:["params"],ObjectMethod:["params"],ClassMethod:["params"],ClassPrivateMethod:["params"],ForInStatement:["left"],ForOfStatement:["left"],ClassDeclaration:["id"],ClassExpression:["id"],RestElement:["argument"],UpdateExpression:["argument"],ObjectProperty:["value"],AssignmentPattern:["left"],ArrayPattern:["elements"],ObjectPattern:["properties"],VariableDeclaration:["declarations"],VariableDeclarator:["id"]};ml.keys=H3e;function d8(e,t){return ml(e,t,!0)}function cT(e,t,n){typeof t=="function"&&(t={enter:t});var i=t,o=i.enter,s=i.exit;fT(e,o,s,n,[])}function fT(e,t,n,i,o){var s=tA[e.type];if(s){t&&t(e,o,i);for(var A=je(s),d;!(d=A()).done;){var c=d.value,f=e[c];if(Array.isArray(f))for(var x=0;x<f.length;x++){var g=f[x];g&&(o.push({node:e,key:c,index:x}),fT(g,t,n,i,o),o.pop())}else f&&(o.push({node:e,key:c}),fT(f,t,n,i,o),o.pop())}n&&n(e,o,i)}}function EX(e,t,n){if(n&&e.type==="Identifier"&&t.type==="ObjectProperty"&&n.type==="ObjectExpression")return!1;var i=ml.keys[t.type];if(i)for(var o=0;o<i.length;o++){var s=i[o],A=t[s];if(Array.isArray(A)){if(A.includes(e))return!0}else if(A===e)return!0}return!1}function FX(e){return Mn(e)&&(e.kind!=="var"||e[VD])}function vX(e){return Aa(e)||We(e)||FX(e)}function V3e(e){return Bj(e.type,"Immutable")?!0:Ut(e)?e.name==="undefined":!1}function pT(e,t){if(typeof e!="object"||typeof t!="object"||e==null||t==null)return e===t;if(e.type!==t.type)return!1;for(var n=Object.keys(du[e.type]||e.type),i=tA[e.type],o=0,s=n;o<s.length;o++){var A=s[o],d=e[A],c=t[A];if(typeof d!=typeof c)return!1;if(!(d==null&&c==null)){if(d==null||c==null)return!1;if(Array.isArray(d)){if(!Array.isArray(c)||d.length!==c.length)return!1;for(var f=0;f<d.length;f++)if(!pT(d[f],c[f]))return!1;continue}if(typeof d=="object"&&!(i!=null&&i.includes(A))){for(var x=0,g=Object.keys(d);x<g.length;x++){var m=g[x];if(d[m]!==c[m])return!1}continue}if(!pT(d,c))return!1}}return!0}function Cg(e,t,n){switch(t.type){case"MemberExpression":case"OptionalMemberExpression":return t.property===e?!!t.computed:t.object===e;case"JSXMemberExpression":return t.object===e;case"VariableDeclarator":return t.init===e;case"ArrowFunctionExpression":return t.body===e;case"PrivateName":return!1;case"ClassMethod":case"ClassPrivateMethod":case"ObjectMethod":return t.key===e?!!t.computed:!1;case"ObjectProperty":return t.key===e?!!t.computed:!n||n.type!=="ObjectPattern";case"ClassProperty":case"ClassAccessorProperty":return t.key===e?!!t.computed:!0;case"ClassPrivateProperty":return t.key!==e;case"ClassDeclaration":case"ClassExpression":return t.superClass===e;case"AssignmentExpression":return t.right===e;case"AssignmentPattern":return t.right===e;case"LabeledStatement":return!1;case"CatchClause":return!1;case"RestElement":return!1;case"BreakStatement":case"ContinueStatement":return!1;case"FunctionDeclaration":case"FunctionExpression":return!1;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return!1;case"ExportSpecifier":return n!=null&&n.source?!1:t.local===e;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return!1;case"ImportAttribute":return!1;case"JSXAttribute":return!1;case"ObjectPattern":case"ArrayPattern":return!1;case"MetaProperty":return!1;case"ObjectTypeProperty":return t.key!==e;case"TSEnumMember":return t.id!==e;case"TSPropertySignature":return t.key===e?!!t.computed:!0}return!0}function CX(e,t){return at(e)&&(Ho(t)||Et(t))?!1:Ju(e)&&(Ho(t)||Et(t))?!0:Up(e)}function K3e(e){return Kn(e)||Ut(e.imported||e.exported,{name:"default"})}var W3e=new Set(["abstract","boolean","byte","char","double","enum","final","float","goto","implements","int","interface","long","native","package","private","protected","public","short","static","synchronized","throws","transient","volatile"]);function c8(e){return p0(e)&&!W3e.has(e)}function bX(e){return Mn(e,{kind:"var"})&&!e[VD]}var gc={isReactComponent:M_,isCompatTag:U_,buildChildren:a4},xT=Object.freeze({__proto__:null,ACCESSOR_TYPES:y3e,ALIAS_KEYS:Qp,ASSIGNMENT_OPERATORS:Ky,AnyTypeAnnotation:uh,ArgumentPlaceholder:Dh,ArrayExpression:js,ArrayPattern:D0,ArrayTypeAnnotation:dE,ArrowFunctionExpression:Xl,AssignmentExpression:Xr,AssignmentPattern:Vb,AwaitExpression:Yl,BINARY_OPERATORS:Vy,BINARY_TYPES:V8e,BLOCKPARENT_TYPES:W8e,BLOCK_SCOPED_SYMBOL:VD,BLOCK_TYPES:z8e,BOOLEAN_BINARY_OPERATORS:Hy,BOOLEAN_NUMBER_BINARY_OPERATORS:GD,BOOLEAN_UNARY_OPERATORS:HD,BUILDER_KEYS:Lj,BigIntLiteral:Zb,BinaryExpression:wi,BindExpression:vi,BlockStatement:Tn,BooleanLiteral:no,BooleanLiteralTypeAnnotation:r2,BooleanTypeAnnotation:og,BreakStatement:tE,CLASS_TYPES:j3e,COMMENT_KEYS:$j,COMPARISON_BINARY_OPERATORS:dc,COMPLETIONSTATEMENT_TYPES:Q8e,CONDITIONAL_TYPES:J8e,CallExpression:Nt,CatchClause:Kj,ClassAccessorProperty:t2,ClassBody:tg,ClassDeclaration:Kb,ClassExpression:iE,ClassImplements:a2,ClassMethod:kf,ClassPrivateMethod:j0,ClassPrivateProperty:ig,ClassProperty:oh,ConditionalExpression:rA,ContinueStatement:nx,DECLARATION_TYPES:i3e,DEPRECATED_ALIASES:tx,DEPRECATED_KEYS:KD,DebuggerStatement:Wj,DecimalLiteral:z2,DeclareClass:n2,DeclareExportAllDeclaration:f2,DeclareExportDeclaration:c2,DeclareFunction:s2,DeclareInterface:i2,DeclareModule:o2,DeclareModuleExports:u2,DeclareOpaqueType:l2,DeclareTypeAlias:A2,DeclareVariable:d2,DeclaredPredicate:fE,Decorator:RE,Directive:rx,DirectiveLiteral:ax,DoExpression:H2,DoWhileStatement:rE,ENUMBODY_TYPES:R3e,ENUMMEMBER_TYPES:S3e,EQUALITY_BINARY_OPERATORS:qD,EXPORTDECLARATION_TYPES:g3e,EXPRESSIONWRAPPER_TYPES:t3e,EXPRESSION_TYPES:H8e,EmptyStatement:zj,EmptyTypeAnnotation:y2,EnumBooleanBody:P2,EnumBooleanMember:N2,EnumDeclaration:w2,EnumDefaultedMember:U2,EnumNumberBody:I2,EnumNumberMember:L2,EnumStringBody:O2,EnumStringMember:M2,EnumSymbolBody:$2,ExistsTypeAnnotation:pE,ExportAllDeclaration:Wb,ExportDefaultDeclaration:zb,ExportDefaultSpecifier:V2,ExportNamedDeclaration:LA,ExportNamespaceSpecifier:e2,ExportSpecifier:jl,ExpressionStatement:Mr,FLATTENABLE_KEYS:_b,FLIPPED_ALIAS_KEYS:ra,FLOWBASEANNOTATION_TYPES:C3e,FLOWDECLARATION_TYPES:b3e,FLOWPREDICATE_TYPES:B3e,FLOWTYPE_TYPES:v3e,FLOW_TYPES:F3e,FORXSTATEMENT_TYPES:a3e,FOR_INIT_KEYS:Oj,FOR_TYPES:r3e,FUNCTIONPARENT_TYPES:n3e,FUNCTION_TYPES:hX,File:Xj,ForInStatement:zl,ForOfStatement:Xb,ForStatement:pc,FunctionDeclaration:Yj,FunctionExpression:Ro,FunctionTypeAnnotation:p2,FunctionTypeParam:x2,GenericTypeAnnotation:ix,IMMUTABLE_TYPES:d3e,IMPORTOREXPORTDECLARATION_TYPES:jX,INHERIT_KEYS:Nj,Identifier:He,IfStatement:Mb,Import:Jb,ImportAttribute:Ii,ImportDeclaration:rg,ImportDefaultSpecifier:oE,ImportExpression:Yb,ImportNamespaceSpecifier:ag,ImportSpecifier:ah,IndexedAccessType:G2,InferredPredicate:D2,InterfaceDeclaration:h2,InterfaceExtends:Ah,InterfaceTypeAnnotation:j2,InterpreterDirective:eE,IntersectionTypeAnnotation:g2,JSXAttribute:Tf,JSXClosingElement:yE,JSXClosingFragment:xh,JSXElement:hc,JSXEmptyExpression:yn,JSXExpressionContainer:Fd,JSXFragment:CE,JSXIdentifier:Ns,JSXMemberExpression:lg,JSXNamespacedName:vd,JSXOpeningElement:EE,JSXOpeningFragment:bE,JSXSpreadAttribute:FE,JSXSpreadChild:pu,JSXText:vE,JSX_TYPES:k3e,LITERAL_TYPES:l3e,LOGICAL_OPERATORS:lc,LOOP_TYPES:Z8e,LVAL_TYPES:u3e,LabeledStatement:sx,LogicalExpression:hl,METHOD_TYPES:f3e,MISCELLANEOUS_TYPES:_3e,MODULEDECLARATION_TYPES:O3e,MODULESPECIFIER_TYPES:m3e,MemberExpression:wr,MetaProperty:uE,MixedTypeAnnotation:m2,ModuleExpression:X2,NODE_FIELDS:du,NODE_PARENT_VALIDATIONS:Jp,NOT_LOCAL_BINDING:Xy,NUMBER_BINARY_OPERATORS:Kl,NUMBER_UNARY_OPERATORS:Wy,NewExpression:rh,Noop:q2,NullLiteral:Xo,NullLiteralTypeAnnotation:cE,NullableTypeAnnotation:E2,NumberLiteral:hF,NumberLiteralTypeAnnotation:F2,NumberTypeAnnotation:lh,NumericLiteral:Bn,OBJECTMEMBER_TYPES:p3e,ObjectExpression:ws,ObjectMethod:Zj,ObjectPattern:nh,ObjectProperty:Pi,ObjectTypeAnnotation:v2,ObjectTypeCallProperty:b2,ObjectTypeIndexer:dh,ObjectTypeInternalSlot:C2,ObjectTypeProperty:B2,ObjectTypeSpreadProperty:xE,OpaqueType:DE,OptionalCallExpression:ih,OptionalIndexedAccessType:gl,OptionalMemberExpression:sg,PATTERNLIKE_TYPES:o3e,PATTERN_TYPES:h3e,PLACEHOLDERS:JD,PLACEHOLDERS_ALIAS:fc,PLACEHOLDERS_FLIPPED_ALIAS:Wl,PRIVATE_TYPES:E3e,PROPERTY_TYPES:x3e,PUREISH_TYPES:s3e,ParenthesizedExpression:aE,PipelineBareFunction:dg,PipelinePrimaryTopicReference:Y2,PipelineTopicExpression:Ax,Placeholder:Cd,PrivateName:lE,Program:Jj,QualifiedTypeIdentifier:ug,RecordExpression:K2,RegExpLiteral:Qj,RegexLiteral:Q2,RestElement:xc,RestProperty:J2,ReturnStatement:qi,SCOPABLE_TYPES:K8e,STANDARDIZED_TYPES:q8e,STATEMENT_OR_BLOCK_KEYS:Ij,STATEMENT_TYPES:X8e,STRING_UNARY_OPERATORS:zy,SequenceExpression:rn,SpreadElement:_f,SpreadProperty:Z2,StaticBlock:Dc,StringLiteral:Vr,StringLiteralTypeAnnotation:hE,StringTypeAnnotation:ox,Super:sh,SwitchCase:Ub,SwitchStatement:Gb,SymbolTypeAnnotation:jE,TERMINATORLESS_TYPES:Y8e,TSAnyKeyword:fg,TSArrayType:KE,TSAsExpression:gg,TSBASETYPE_TYPES:I3e,TSBigIntKeyword:kn,TSBooleanKeyword:Ql,TSCallSignatureDeclaration:kE,TSConditionalType:YE,TSConstructSignatureDeclaration:_E,TSConstructorType:UE,TSDeclareFunction:lx,TSDeclareMethod:Iu,TSENTITYNAME_TYPES:A3e,TSEnumDeclaration:oF,TSEnumMember:mg,TSExportAssignment:cF,TSExpressionWithTypeArguments:tF,TSExternalModuleReference:dF,TSFunctionType:ME,TSImportEqualsDeclaration:lF,TSImportType:AF,TSIndexSignature:PE,TSIndexedAccessType:xu,TSInferType:QE,TSInstantiationExpression:nF,TSInterfaceBody:rF,TSInterfaceDeclaration:jg,TSIntersectionType:jh,TSIntrinsicKeyword:pg,TSLiteralType:eF,TSMappedType:ZE,TSMethodSignature:wE,TSModuleBlock:uF,TSModuleDeclaration:yg,TSNamedTupleMember:hh,TSNamespaceExportDeclaration:fF,TSNeverKeyword:aA,TSNonNullExpression:m0,TSNullKeyword:xg,TSNumberKeyword:IE,TSObjectKeyword:vs,TSOptionalType:zE,TSParameterProperty:cg,TSParenthesizedType:JE,TSPropertySignature:TE,TSQualifiedName:g0,TSRestType:XE,TSSatisfiesExpression:sF,TSStringKeyword:OE,TSSymbolKeyword:Dg,TSTYPEELEMENT_TYPES:w3e,TSTYPE_TYPES:P3e,TSThisType:LE,TSTupleType:WE,TSTypeAliasDeclaration:aF,TSTypeAnnotation:pF,TSTypeAssertion:iF,TSTypeLiteral:VE,TSTypeOperator:fo,TSTypeParameter:Eg,TSTypeParameterDeclaration:DF,TSTypeParameterInstantiation:xF,TSTypePredicate:qE,TSTypeQuery:HE,TSTypeReference:GE,TSUndefinedKeyword:dx,TSUnionType:hg,TSUnknownKeyword:$E,TSVoidKeyword:NE,TYPES:th,TYPESCRIPT_TYPES:T3e,TaggedTemplateExpression:Qb,TemplateElement:ng,TemplateLiteral:AE,ThisExpression:An,ThisTypeAnnotation:gE,ThrowStatement:nE,TopicReference:SE,TryStatement:qb,TupleExpression:W2,TupleTypeAnnotation:mE,TypeAlias:S2,TypeAnnotation:ch,TypeCastExpression:fh,TypeParameter:k2,TypeParameterDeclaration:_2,TypeParameterInstantiation:Ag,TypeofTypeAnnotation:R2,UNARYLIKE_TYPES:D3e,UNARY_OPERATORS:Tb,UPDATE_OPERATORS:qy,USERWHITESPACABLE_TYPES:c3e,UnaryExpression:Ps,UnionTypeAnnotation:ph,UpdateExpression:eg,V8IntrinsicIdentifier:BE,VISITOR_KEYS:tA,VariableDeclaration:an,VariableDeclarator:ba,Variance:T2,VoidTypeAnnotation:ux,WHILE_TYPES:e3e,WhileStatement:sE,WithStatement:Hb,YieldExpression:h0,__internal__deprecationWarning:er,addComment:bF,addComments:sT,anyTypeAnnotation:uh,appendToMemberExpression:G3e,argumentPlaceholder:Dh,arrayExpression:js,arrayPattern:D0,arrayTypeAnnotation:dE,arrowFunctionExpression:Xl,assertAccessor:g8e,assertAnyTypeAnnotation:UA,assertArgumentPlaceholder:xbe,assertArrayExpression:s4,assertArrayPattern:q4,assertArrayTypeAnnotation:so,assertArrowFunctionExpression:H4,assertAssignmentExpression:i4,assertAssignmentPattern:G4,assertAwaitExpression:fr,assertBigIntLiteral:Cr,assertBinary:U2e,assertBinaryExpression:o4,assertBindExpression:Dbe,assertBlock:H2e,assertBlockParent:q2e,assertBlockStatement:d4,assertBooleanLiteral:nA,assertBooleanLiteralTypeAnnotation:jc,assertBooleanTypeAnnotation:Jl,assertBreakStatement:c4,assertCallExpression:f4,assertCatchClause:p4,assertClass:x8e,assertClassAccessorProperty:un,assertClassBody:V4,assertClassDeclaration:W4,assertClassExpression:K4,assertClassImplements:Vve,assertClassMethod:E,assertClassPrivateMethod:fs,assertClassPrivateProperty:is,assertClassProperty:Wn,assertCompletionStatement:W2e,assertConditional:z2e,assertConditionalExpression:x4,assertContinueStatement:D4,assertDebuggerStatement:h4,assertDecimalLiteral:Fbe,assertDeclaration:a8e,assertDeclareClass:Kve,assertDeclareExportAllDeclaration:tCe,assertDeclareExportDeclaration:eCe,assertDeclareFunction:Wve,assertDeclareInterface:zve,assertDeclareModule:Xve,assertDeclareModuleExports:Yve,assertDeclareOpaqueType:Jve,assertDeclareTypeAlias:Qve,assertDeclareVariable:Zve,assertDeclaredPredicate:rCe,assertDecorator:jbe,assertDirective:A4,assertDirectiveLiteral:l4,assertDoExpression:gbe,assertDoWhileStatement:j4,assertEmptyStatement:g4,assertEmptyTypeAnnotation:fCe,assertEnumBody:b8e,assertEnumBooleanBody:UCe,assertEnumBooleanMember:VCe,assertEnumDeclaration:MCe,assertEnumDefaultedMember:zCe,assertEnumMember:B8e,assertEnumNumberBody:GCe,assertEnumNumberMember:KCe,assertEnumStringBody:qCe,assertEnumStringMember:WCe,assertEnumSymbolBody:HCe,assertExistsTypeAnnotation:aCe,assertExportAllDeclaration:z4,assertExportDeclaration:h8e,assertExportDefaultDeclaration:X4,assertExportDefaultSpecifier:mbe,assertExportNamedDeclaration:Y4,assertExportNamespaceSpecifier:aa,assertExportSpecifier:Q4,assertExpression:oX,assertExpressionStatement:t8,assertExpressionWrapper:Q2e,assertFile:m4,assertFlow:y8e,assertFlowBaseAnnotation:F8e,assertFlowDeclaration:v8e,assertFlowPredicate:C8e,assertFlowType:E8e,assertFor:J2e,assertForInStatement:jF,assertForOfStatement:J4,assertForStatement:r8,assertForXStatement:Z2e,assertFunction:e8e,assertFunctionDeclaration:a8,assertFunctionExpression:y4,assertFunctionParent:t8e,assertFunctionTypeAnnotation:nCe,assertFunctionTypeParam:sCe,assertGenericTypeAnnotation:iCe,assertIdentifier:gF,assertIfStatement:E4,assertImmutable:u8e,assertImport:pr,assertImportAttribute:hbe,assertImportDeclaration:Z4,assertImportDefaultSpecifier:eT,assertImportExpression:aT,assertImportNamespaceSpecifier:tT,assertImportOrExportDeclaration:D8e,assertImportSpecifier:rT,assertIndexedAccessType:XCe,assertInferredPredicate:oCe,assertInterfaceDeclaration:ACe,assertInterfaceExtends:uCe,assertInterfaceTypeAnnotation:lCe,assertInterpreterDirective:u4,assertIntersectionTypeAnnotation:dCe,assertJSX:R8e,assertJSXAttribute:QCe,assertJSXClosingElement:JCe,assertJSXClosingFragment:dbe,assertJSXElement:ZCe,assertJSXEmptyExpression:ebe,assertJSXExpressionContainer:tbe,assertJSXFragment:Abe,assertJSXIdentifier:abe,assertJSXMemberExpression:nbe,assertJSXNamespacedName:sbe,assertJSXOpeningElement:ibe,assertJSXOpeningFragment:lbe,assertJSXSpreadAttribute:obe,assertJSXSpreadChild:rbe,assertJSXText:ube,assertLVal:s8e,assertLabeledStatement:mF,assertLiteral:o8e,assertLogicalExpression:b4,assertLoop:X2e,assertMemberExpression:B4,assertMetaProperty:h,assertMethod:l8e,assertMiscellaneous:S8e,assertMixedTypeAnnotation:cCe,assertModuleDeclaration:N8e,assertModuleExpression:vbe,assertModuleSpecifier:j8e,assertNewExpression:R4,assertNode:n4,assertNoop:cbe,assertNullLiteral:C4,assertNullLiteralTypeAnnotation:i8,assertNullableTypeAnnotation:pCe,assertNumberLiteral:P8e,assertNumberLiteralTypeAnnotation:xCe,assertNumberTypeAnnotation:DCe,assertNumericLiteral:v4,assertObjectExpression:EF,assertObjectMember:d8e,assertObjectMethod:k4,assertObjectPattern:I,assertObjectProperty:FF,assertObjectTypeAnnotation:hCe,assertObjectTypeCallProperty:gCe,assertObjectTypeIndexer:mCe,assertObjectTypeInternalSlot:jCe,assertObjectTypeProperty:yCe,assertObjectTypeSpreadProperty:ECe,assertOpaqueType:FCe,assertOptionalCallExpression:on,assertOptionalIndexedAccessType:YCe,assertOptionalMemberExpression:Ba,assertParenthesizedExpression:w4,assertPattern:p8e,assertPatternLike:n8e,assertPipelineBareFunction:Bbe,assertPipelinePrimaryTopicReference:Rbe,assertPipelineTopicExpression:bbe,assertPlaceholder:fbe,assertPrivate:m8e,assertPrivateName:MA,assertProgram:S4,assertProperty:c8e,assertPureish:r8e,assertQualifiedTypeIdentifier:vCe,assertRecordExpression:ybe,assertRegExpLiteral:yF,assertRegexLiteral:I8e,assertRestElement:n8,assertRestProperty:O8e,assertReturnStatement:_4,assertScopable:G2e,assertSequenceExpression:T4,assertSpreadElement:Q,assertSpreadProperty:$8e,assertStandardized:M2e,assertStatement:V2e,assertStaticBlock:Ou,assertStringLiteral:F4,assertStringLiteralTypeAnnotation:CCe,assertStringTypeAnnotation:bCe,assertSuper:he,assertSwitchCase:s8,assertSwitchStatement:P4,assertSymbolTypeAnnotation:BCe,assertTSAnyKeyword:Nbe,assertTSArrayType:n2e,assertTSAsExpression:F2e,assertTSBaseType:w8e,assertTSBigIntKeyword:Mbe,assertTSBooleanKeyword:Lbe,assertTSCallSignatureDeclaration:wbe,assertTSConditionalType:d2e,assertTSConstructSignatureDeclaration:Pbe,assertTSConstructorType:Zbe,assertTSDeclareFunction:kbe,assertTSDeclareMethod:_be,assertTSEntityName:i8e,assertTSEnumDeclaration:b2e,assertTSEnumMember:B2e,assertTSExportAssignment:P2e,assertTSExpressionWithTypeArguments:j2e,assertTSExternalModuleReference:T2e,assertTSFunctionType:Jbe,assertTSImportEqualsDeclaration:_2e,assertTSImportType:k2e,assertTSIndexSignature:$be,assertTSIndexedAccessType:x2e,assertTSInferType:c2e,assertTSInstantiationExpression:E2e,assertTSInterfaceBody:m2e,assertTSInterfaceDeclaration:g2e,assertTSIntersectionType:l2e,assertTSIntrinsicKeyword:Ube,assertTSLiteralType:h2e,assertTSMappedType:D2e,assertTSMethodSignature:Obe,assertTSModuleBlock:S2e,assertTSModuleDeclaration:R2e,assertTSNamedTupleMember:u2e,assertTSNamespaceExportDeclaration:I2e,assertTSNeverKeyword:Gbe,assertTSNonNullExpression:w2e,assertTSNullKeyword:qbe,assertTSNumberKeyword:Hbe,assertTSObjectKeyword:Vbe,assertTSOptionalType:i2e,assertTSParameterProperty:Sbe,assertTSParenthesizedType:f2e,assertTSPropertySignature:Ibe,assertTSQualifiedName:Tbe,assertTSRestType:o2e,assertTSSatisfiesExpression:v2e,assertTSStringKeyword:Kbe,assertTSSymbolKeyword:Wbe,assertTSThisType:Qbe,assertTSTupleType:s2e,assertTSType:T8e,assertTSTypeAliasDeclaration:y2e,assertTSTypeAnnotation:O2e,assertTSTypeAssertion:C2e,assertTSTypeElement:_8e,assertTSTypeLiteral:a2e,assertTSTypeOperator:p2e,assertTSTypeParameter:L2e,assertTSTypeParameterDeclaration:N2e,assertTSTypeParameterInstantiation:$2e,assertTSTypePredicate:t2e,assertTSTypeQuery:r2e,assertTSTypeReference:e2e,assertTSUndefinedKeyword:zbe,assertTSUnionType:A2e,assertTSUnknownKeyword:Xbe,assertTSVoidKeyword:Ybe,assertTaggedTemplateExpression:Ie,assertTemplateElement:Qe,assertTemplateLiteral:Dt,assertTerminatorless:K2e,assertThisExpression:I4,assertThisTypeAnnotation:RCe,assertThrowStatement:O4,assertTopicReference:Cbe,assertTryStatement:vF,assertTupleExpression:Ebe,assertTupleTypeAnnotation:SCe,assertTypeAlias:_Ce,assertTypeAnnotation:TCe,assertTypeCastExpression:wCe,assertTypeParameter:PCe,assertTypeParameterDeclaration:ICe,assertTypeParameterInstantiation:OCe,assertTypeScript:k8e,assertTypeofTypeAnnotation:kCe,assertUnaryExpression:CF,assertUnaryLike:f8e,assertUnionTypeAnnotation:$Ce,assertUpdateExpression:$4,assertUserWhitespacable:A8e,assertV8IntrinsicIdentifier:pbe,assertVariableDeclaration:N4,assertVariableDeclarator:L4,assertVariance:NCe,assertVoidTypeAnnotation:LCe,assertWhile:Y2e,assertWhileStatement:M4,assertWithStatement:U4,assertYieldExpression:kt,assignmentExpression:Xr,assignmentPattern:Vb,awaitExpression:Yl,bigIntLiteral:Zb,binaryExpression:wi,bindExpression:vi,blockStatement:Tn,booleanLiteral:no,booleanLiteralTypeAnnotation:r2,booleanTypeAnnotation:og,breakStatement:tE,buildMatchMemberExpression:ID,buildUndefinedNode:Fg,callExpression:Nt,catchClause:Kj,classAccessorProperty:t2,classBody:tg,classDeclaration:Kb,classExpression:iE,classImplements:a2,classMethod:kf,classPrivateMethod:j0,classPrivateProperty:ig,classProperty:oh,clone:DX,cloneDeep:M8e,cloneDeepWithoutLoc:U8e,cloneNode:ke,cloneWithoutLoc:G8e,conditionalExpression:rA,continueStatement:nx,createFlowUnionType:o8,createTSUnionType:cX,createTypeAnnotationBasedOnTypeof:uX,createUnionTypeAnnotation:o8,debuggerStatement:Wj,decimalLiteral:z2,declareClass:n2,declareExportAllDeclaration:f2,declareExportDeclaration:c2,declareFunction:s2,declareInterface:i2,declareModule:o2,declareModuleExports:u2,declareOpaqueType:l2,declareTypeAlias:A2,declareVariable:d2,declaredPredicate:fE,decorator:RE,directive:rx,directiveLiteral:ax,doExpression:H2,doWhileStatement:rE,emptyStatement:zj,emptyTypeAnnotation:y2,ensureBlock:$3e,enumBooleanBody:P2,enumBooleanMember:N2,enumDeclaration:w2,enumDefaultedMember:U2,enumNumberBody:I2,enumNumberMember:L2,enumStringBody:O2,enumStringMember:M2,enumSymbolBody:$2,existsTypeAnnotation:pE,exportAllDeclaration:Wb,exportDefaultDeclaration:zb,exportDefaultSpecifier:V2,exportNamedDeclaration:LA,exportNamespaceSpecifier:e2,exportSpecifier:jl,expressionStatement:Mr,file:Xj,forInStatement:zl,forOfStatement:Xb,forStatement:pc,functionDeclaration:Yj,functionExpression:Ro,functionTypeAnnotation:p2,functionTypeParam:x2,genericTypeAnnotation:ix,getBindingIdentifiers:ml,getOuterBindingIdentifiers:d8,identifier:He,ifStatement:Mb,import:Jb,importAttribute:Ii,importDeclaration:rg,importDefaultSpecifier:oE,importExpression:Yb,importNamespaceSpecifier:ag,importSpecifier:ah,indexedAccessType:G2,inferredPredicate:D2,inheritInnerComments:oT,inheritLeadingComments:A8,inheritTrailingComments:uT,inherits:di,inheritsComments:cx,interfaceDeclaration:h2,interfaceExtends:Ah,interfaceTypeAnnotation:j2,interpreterDirective:eE,intersectionTypeAnnotation:g2,is:ao,isAccessor:B_,isAnyTypeAnnotation:ln,isArgumentPlaceholder:Ta,isArrayExpression:vt,isArrayPattern:lt,isArrayTypeAnnotation:Al,isArrowFunctionExpression:ee,isAssignmentExpression:zt,isAssignmentPattern:_a,isAwaitExpression:Nl,isBigIntLiteral:fd,isBinary:SD,isBinaryExpression:$t,isBindExpression:Wa,isBinding:EX,isBlock:Gp,isBlockParent:Sy,isBlockScoped:vX,isBlockStatement:at,isBooleanLiteral:yt,isBooleanLiteralTypeAnnotation:li,isBooleanTypeAnnotation:nf,isBreakStatement:Ft,isCallExpression:Jt,isCatchClause:Et,isClass:Vp,isClassAccessorProperty:Ui,isClassBody:De,isClassDeclaration:We,isClassExpression:me,isClassImplements:sf,isClassMethod:SA,isClassPrivateMethod:Qc,isClassPrivateProperty:pd,isClassProperty:TA,isCompletionStatement:Ej,isConditional:qp,isConditionalExpression:ya,isContinueStatement:Vt,isDebuggerStatement:Ln,isDecimalLiteral:my,isDeclaration:Be,isDeclareClass:Sp,isDeclareExportAllDeclaration:lf,isDeclareExportDeclaration:eo,isDeclareFunction:of,isDeclareInterface:uf,isDeclareModule:Jc,isDeclareModuleExports:Yu,isDeclareOpaqueType:Zc,isDeclareTypeAlias:Af,isDeclareVariable:vD,isDeclaredPredicate:e0,isDecorator:Ti,isDirective:Xe,isDirectiveLiteral:rt,isDoExpression:Qu,isDoWhileStatement:vn,isEmptyStatement:xn,isEmptyTypeAnnotation:pf,isEnumBody:k_,isEnumBooleanBody:rc,isEnumBooleanMember:co,isEnumDeclaration:Go,isEnumDefaultedMember:Fs,isEnumMember:__,isEnumNumberBody:qo,isEnumNumberMember:dl,isEnumStringBody:$p,isEnumStringMember:IA,isEnumSymbolBody:yf,isExistsTypeAnnotation:Jd,isExportAllDeclaration:ut,isExportDeclaration:Kp,isExportDefaultDeclaration:qt,isExportDefaultSpecifier:Ul,isExportNamedDeclaration:tr,isExportNamespaceSpecifier:Xc,isExportSpecifier:Lr,isExpression:jd,isExpressionStatement:cn,isExpressionWrapper:F_,isFile:Tt,isFlow:ky,isFlowBaseAnnotation:_y,isFlowDeclaration:nc,isFlowPredicate:S_,isFlowType:hb,isFor:xb,isForInStatement:jr,isForOfStatement:Ea,isForStatement:Ir,isForXStatement:_D,isFunction:Ho,isFunctionDeclaration:Aa,isFunctionExpression:Zr,isFunctionParent:TD,isFunctionTypeAnnotation:kp,isFunctionTypeParam:df,isGenericTypeAnnotation:cf,isIdentifier:Ut,isIfStatement:es,isImmutable:V3e,isImport:Au,isImportAttribute:Ws,isImportDeclaration:rs,isImportDefaultSpecifier:Kn,isImportExpression:Mi,isImportNamespaceSpecifier:Es,isImportOrExportDeclaration:Db,isImportSpecifier:Pa,isIndexedAccessType:_u,isInferredPredicate:Dd,isInterfaceDeclaration:Zd,isInterfaceExtends:_p,isInterfaceTypeAnnotation:Ml,isInterpreterDirective:cr,isIntersectionTypeAnnotation:ff,isJSX:T_,isJSXAttribute:cl,isJSXClosingElement:Ff,isJSXClosingFragment:dt,isJSXElement:ac,isJSXEmptyExpression:vf,isJSXExpressionContainer:OA,isJSXFragment:ie,isJSXIdentifier:L,isJSXMemberExpression:le,isJSXNamespacedName:Pe,isJSXOpeningElement:X,isJSXOpeningFragment:_e,isJSXSpreadAttribute:F,isJSXSpreadChild:re,isJSXText:G,isLVal:Fj,isLabeledStatement:Hr,isLet:FX,isLiteral:za,isLogicalExpression:be,isLoop:y_,isMemberExpression:Gt,isMetaProperty:bo,isMethod:PD,isMiscellaneous:w_,isMixedTypeAnnotation:ec,isModuleDeclaration:L_,isModuleExpression:lj,isModuleSpecifier:gd,isNewExpression:_r,isNode:e8,isNodesEquivalent:pT,isNoop:Pt,isNullLiteral:Sa,isNullLiteralTypeAnnotation:xd,isNullableTypeAnnotation:xf,isNumberLiteral:I_,isNumberLiteralTypeAnnotation:ll,isNumberTypeAnnotation:Df,isNumericLiteral:na,isObjectExpression:Tr,isObjectMember:C_,isObjectMethod:Dn,isObjectPattern:Ai,isObjectProperty:ka,isObjectTypeAnnotation:CD,isObjectTypeCallProperty:$s,isObjectTypeIndexer:Tp,isObjectTypeInternalSlot:Ua,isObjectTypeProperty:tc,isObjectTypeSpreadProperty:bD,isOpaqueType:t0,isOptionalCallExpression:Yc,isOptionalIndexedAccessType:Ef,isOptionalMemberExpression:_A,isParenthesizedExpression:Nr,isPattern:Ju,isPatternLike:Hp,isPipelineBareFunction:Zk,isPipelinePrimaryTopicReference:e_,isPipelineTopicExpression:to,isPlaceholder:nr,isPlaceholderType:Rj,isPrivate:R_,isPrivateName:Ia,isProgram:kr,isProperty:A0,isPureish:wD,isQualifiedTypeIdentifier:ku,isRecordExpression:n0,isReferenced:Cg,isRegExpLiteral:Kt,isRegexLiteral:O_,isRestElement:Wr,isRestProperty:$_,isReturnStatement:Fr,isScopable:Up,isScope:CX,isSequenceExpression:sa,isSpecifierDefault:K3e,isSpreadElement:ki,isSpreadProperty:N_,isStandardized:pb,isStatement:Tu,isStaticBlock:Ll,isStringLiteral:Br,isStringLiteralTypeAnnotation:hd,isStringTypeAnnotation:r0,isSuper:_i,isSwitchCase:Or,isSwitchStatement:it,isSymbolTypeAnnotation:wp,isTSAnyKeyword:Ey,isTSArrayType:Cf,isTSAsExpression:Mp,isTSBaseType:xl,isTSBigIntKeyword:s_,isTSBooleanKeyword:n_,isTSCallSignatureDeclaration:t_,isTSConditionalType:d_,isTSConstructSignatureDeclaration:r_,isTSConstructorType:Fy,isTSDeclareFunction:Ab,isTSDeclareMethod:s0,isTSEntityName:pl,isTSEnumDeclaration:fb,isTSEnumMember:p_,isTSExportAssignment:h_,isTSExpressionWithTypeArguments:gj,isTSExternalModuleReference:D_,isTSFunctionType:Zs,isTSImportEqualsDeclaration:By,isTSImportType:yj,isTSIndexSignature:Gl,isTSIndexedAccessType:o0,isTSInferType:c_,isTSInstantiationExpression:cb,isTSInterfaceBody:by,isTSInterfaceDeclaration:db,isTSIntersectionType:Dj,isTSIntrinsicKeyword:i_,isTSLiteralType:lb,isTSMappedType:jj,isTSMethodSignature:Lp,isTSModuleBlock:RD,isTSModuleDeclaration:x_,isTSNamedTupleMember:l_,isTSNamespaceExportDeclaration:j_,isTSNeverKeyword:o_,isTSNonNullExpression:Ry,isTSNullKeyword:u_,isTSNumberKeyword:i0,isTSObjectKeyword:Bt,isTSOptionalType:xj,isTSParameterProperty:yy,isTSParenthesizedType:f_,isTSPropertySignature:a_,isTSQualifiedName:cj,isTSRestType:Us,isTSSatisfiesExpression:u0,isTSStringKeyword:ur,isTSSymbolKeyword:Wt,isTSThisType:mo,isTSTupleType:pj,isTSType:jb,isTSTypeAliasDeclaration:mj,isTSTypeAnnotation:ro,isTSTypeAssertion:BD,isTSTypeElement:P_,isTSTypeLiteral:A_,isTSTypeOperator:hj,isTSTypeParameter:m_,isTSTypeParameterDeclaration:g_,isTSTypeParameterInstantiation:lu,isTSTypePredicate:fl,isTSTypeQuery:fj,isTSTypeReference:vy,isTSUndefinedKeyword:la,isTSUnionType:Cy,isTSUnknownKeyword:bn,isTSVoidKeyword:Ts,isTaggedTemplateExpression:zc,isTemplateElement:$l,isTemplateLiteral:go,isTerminatorless:kD,isThisExpression:nt,isThisTypeAnnotation:Js,isThrowStatement:Er,isTopicReference:dj,isTryStatement:or,isTupleExpression:Np,isTupleTypeAnnotation:wA,isType:Bj,isTypeAlias:hf,isTypeAnnotation:a0,isTypeCastExpression:Gi,isTypeParameter:jf,isTypeParameterDeclaration:Pp,isTypeParameterInstantiation:Ip,isTypeScript:l0,isTypeofTypeAnnotation:PA,isUnaryExpression:Cn,isUnaryLike:b_,isUnionTypeAnnotation:gf,isUpdateExpression:Qs,isUserWhitespacable:v_,isV8IntrinsicIdentifier:vr,isValidES3Identifier:c8,isValidIdentifier:p0,isVar:bX,isVariableDeclaration:Mn,isVariableDeclarator:jo,isVariance:Op,isVoidTypeAnnotation:mf,isWhile:E_,isWhileStatement:Vn,isWithStatement:Fi,isYieldExpression:kA,jSXAttribute:Tf,jSXClosingElement:yE,jSXClosingFragment:xh,jSXElement:hc,jSXEmptyExpression:yn,jSXExpressionContainer:Fd,jSXFragment:CE,jSXIdentifier:Ns,jSXMemberExpression:lg,jSXNamespacedName:vd,jSXOpeningElement:EE,jSXOpeningFragment:bE,jSXSpreadAttribute:FE,jSXSpreadChild:pu,jSXText:vE,jsxAttribute:Tf,jsxClosingElement:yE,jsxClosingFragment:xh,jsxElement:hc,jsxEmptyExpression:yn,jsxExpressionContainer:Fd,jsxFragment:CE,jsxIdentifier:Ns,jsxMemberExpression:lg,jsxNamespacedName:vd,jsxOpeningElement:EE,jsxOpeningFragment:bE,jsxSpreadAttribute:FE,jsxSpreadChild:pu,jsxText:vE,labeledStatement:sx,logicalExpression:hl,matchesPattern:Wp,memberExpression:wr,metaProperty:uE,mixedTypeAnnotation:m2,moduleExpression:X2,newExpression:rh,noop:q2,nullLiteral:Xo,nullLiteralTypeAnnotation:cE,nullableTypeAnnotation:E2,numberLiteral:hF,numberLiteralTypeAnnotation:F2,numberTypeAnnotation:lh,numericLiteral:Bn,objectExpression:ws,objectMethod:Zj,objectPattern:nh,objectProperty:Pi,objectTypeAnnotation:v2,objectTypeCallProperty:b2,objectTypeIndexer:dh,objectTypeInternalSlot:C2,objectTypeProperty:B2,objectTypeSpreadProperty:xE,opaqueType:DE,optionalCallExpression:ih,optionalIndexedAccessType:gl,optionalMemberExpression:sg,parenthesizedExpression:aE,pipelineBareFunction:dg,pipelinePrimaryTopicReference:Y2,pipelineTopicExpression:Ax,placeholder:Cd,prependToMemberExpression:q3e,privateName:lE,program:Jj,qualifiedTypeIdentifier:ug,react:gc,recordExpression:K2,regExpLiteral:Qj,regexLiteral:Q2,removeComments:AT,removeProperties:lT,removePropertiesDeep:dT,removeTypeDuplicates:nT,restElement:xc,restProperty:J2,returnStatement:qi,sequenceExpression:rn,shallowEqual:ce,spreadElement:_f,spreadProperty:Z2,staticBlock:Dc,stringLiteral:Vr,stringLiteralTypeAnnotation:hE,stringTypeAnnotation:ox,super:sh,switchCase:Ub,switchStatement:Gb,symbolTypeAnnotation:jE,tSAnyKeyword:fg,tSArrayType:KE,tSAsExpression:gg,tSBigIntKeyword:kn,tSBooleanKeyword:Ql,tSCallSignatureDeclaration:kE,tSConditionalType:YE,tSConstructSignatureDeclaration:_E,tSConstructorType:UE,tSDeclareFunction:lx,tSDeclareMethod:Iu,tSEnumDeclaration:oF,tSEnumMember:mg,tSExportAssignment:cF,tSExpressionWithTypeArguments:tF,tSExternalModuleReference:dF,tSFunctionType:ME,tSImportEqualsDeclaration:lF,tSImportType:AF,tSIndexSignature:PE,tSIndexedAccessType:xu,tSInferType:QE,tSInstantiationExpression:nF,tSInterfaceBody:rF,tSInterfaceDeclaration:jg,tSIntersectionType:jh,tSIntrinsicKeyword:pg,tSLiteralType:eF,tSMappedType:ZE,tSMethodSignature:wE,tSModuleBlock:uF,tSModuleDeclaration:yg,tSNamedTupleMember:hh,tSNamespaceExportDeclaration:fF,tSNeverKeyword:aA,tSNonNullExpression:m0,tSNullKeyword:xg,tSNumberKeyword:IE,tSObjectKeyword:vs,tSOptionalType:zE,tSParameterProperty:cg,tSParenthesizedType:JE,tSPropertySignature:TE,tSQualifiedName:g0,tSRestType:XE,tSSatisfiesExpression:sF,tSStringKeyword:OE,tSSymbolKeyword:Dg,tSThisType:LE,tSTupleType:WE,tSTypeAliasDeclaration:aF,tSTypeAnnotation:pF,tSTypeAssertion:iF,tSTypeLiteral:VE,tSTypeOperator:fo,tSTypeParameter:Eg,tSTypeParameterDeclaration:DF,tSTypeParameterInstantiation:xF,tSTypePredicate:qE,tSTypeQuery:HE,tSTypeReference:GE,tSUndefinedKeyword:dx,tSUnionType:hg,tSUnknownKeyword:$E,tSVoidKeyword:NE,taggedTemplateExpression:Qb,templateElement:ng,templateLiteral:AE,thisExpression:An,thisTypeAnnotation:gE,throwStatement:nE,toBindingIdentifierName:gX,toBlock:l8,toComputedKey:y0,toExpression:Du,toIdentifier:vg,toKeyAlias:px,toStatement:yX,topicReference:SE,traverse:cT,traverseFast:fx,tryStatement:qb,tsAnyKeyword:fg,tsArrayType:KE,tsAsExpression:gg,tsBigIntKeyword:kn,tsBooleanKeyword:Ql,tsCallSignatureDeclaration:kE,tsConditionalType:YE,tsConstructSignatureDeclaration:_E,tsConstructorType:UE,tsDeclareFunction:lx,tsDeclareMethod:Iu,tsEnumDeclaration:oF,tsEnumMember:mg,tsExportAssignment:cF,tsExpressionWithTypeArguments:tF,tsExternalModuleReference:dF,tsFunctionType:ME,tsImportEqualsDeclaration:lF,tsImportType:AF,tsIndexSignature:PE,tsIndexedAccessType:xu,tsInferType:QE,tsInstantiationExpression:nF,tsInterfaceBody:rF,tsInterfaceDeclaration:jg,tsIntersectionType:jh,tsIntrinsicKeyword:pg,tsLiteralType:eF,tsMappedType:ZE,tsMethodSignature:wE,tsModuleBlock:uF,tsModuleDeclaration:yg,tsNamedTupleMember:hh,tsNamespaceExportDeclaration:fF,tsNeverKeyword:aA,tsNonNullExpression:m0,tsNullKeyword:xg,tsNumberKeyword:IE,tsObjectKeyword:vs,tsOptionalType:zE,tsParameterProperty:cg,tsParenthesizedType:JE,tsPropertySignature:TE,tsQualifiedName:g0,tsRestType:XE,tsSatisfiesExpression:sF,tsStringKeyword:OE,tsSymbolKeyword:Dg,tsThisType:LE,tsTupleType:WE,tsTypeAliasDeclaration:aF,tsTypeAnnotation:pF,tsTypeAssertion:iF,tsTypeLiteral:VE,tsTypeOperator:fo,tsTypeParameter:Eg,tsTypeParameterDeclaration:DF,tsTypeParameterInstantiation:xF,tsTypePredicate:qE,tsTypeQuery:HE,tsTypeReference:GE,tsUndefinedKeyword:dx,tsUnionType:hg,tsUnknownKeyword:$E,tsVoidKeyword:NE,tupleExpression:W2,tupleTypeAnnotation:mE,typeAlias:S2,typeAnnotation:ch,typeCastExpression:fh,typeParameter:k2,typeParameterDeclaration:_2,typeParameterInstantiation:Ag,typeofTypeAnnotation:R2,unaryExpression:Ps,unionTypeAnnotation:ph,updateExpression:eg,v8IntrinsicIdentifier:BE,validate:Sf,valueToNode:BF,variableDeclaration:an,variableDeclarator:ba,variance:T2,voidTypeAnnotation:ux,whileStatement:sE,withStatement:Hb,yieldExpression:h0}),z3e=t8;function DT(e){return{code:function(n){return`/* @babel/template */;
`+n},validate:function(){},unwrap:function(n){return e(n.program.body.slice(1))}}}var X3e=DT(function(e){return e.length>1?e:e[0]}),Y3e=DT(function(e){return e}),Q3e=DT(function(e){if(e.length===0)throw new Error("Found nothing to return.");if(e.length>1)throw new Error("Found multiple statements but wanted one");return e[0]}),BX={code:function(t){return`(
`+t+`
)`},validate:function(t){if(t.program.body.length>1)throw new Error("Found multiple statements but wanted one");if(BX.unwrap(t).start===0)throw new Error("Parse result included parens.")},unwrap:function(t){var n=t.program,i=J(n.body,1),o=i[0];return z3e(o),o.expression}},J3e={code:function(t){return t},validate:function(){},unwrap:function(t){return t.program}},Z3e=["placeholderWhitelist","placeholderPattern","preserveComments","syntacticPlaceholders"];function RF(e,t){var n=t.placeholderWhitelist,i=n===void 0?e.placeholderWhitelist:n,o=t.placeholderPattern,s=o===void 0?e.placeholderPattern:o,A=t.preserveComments,d=A===void 0?e.preserveComments:A,c=t.syntacticPlaceholders,f=c===void 0?e.syntacticPlaceholders:c;return{parser:Object.assign({},e.parser,t.parser),placeholderWhitelist:i,placeholderPattern:s,preserveComments:d,syntacticPlaceholders:f}}function SF(e){if(e!=null&&typeof e!="object")throw new Error("Unknown template options.");var t=e||{},n=t.placeholderWhitelist,i=t.placeholderPattern,o=t.preserveComments,s=t.syntacticPlaceholders,A=R(t,Z3e);if(n!=null&&!(n instanceof Set))throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined");if(i!=null&&!(i instanceof RegExp)&&i!==!1)throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined");if(o!=null&&typeof o!="boolean")throw new Error("'.preserveComments' must be a boolean, null, or undefined");if(s!=null&&typeof s!="boolean")throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined");if(s===!0&&(n!=null||i!=null))throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");return{parser:A,placeholderWhitelist:n||void 0,placeholderPattern:i??void 0,preserveComments:o??void 0,syntacticPlaceholders:s??void 0}}function RX(e){if(Array.isArray(e))return e.reduce(function(t,n,i){return t["$"+i]=n,t},{});if(typeof e=="object"||e==null)return e||void 0;throw new Error("Template replacements must be an array, object, null, or undefined")}var xx=T(function(t,n,i){this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=n,this.index=i}),f8=T(function(t,n){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=n});function GA(e,t){var n=e.line,i=e.column,o=e.index;return new xx(n,i+t,o+t)}var SX="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",e7e={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:SX},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:SX}},kX={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},p8=function(t){return t.type==="UpdateExpression"?kX.UpdateExpression[""+t.prefix]:kX[t.type]},t7e={AccessorIsGenerator:function(t){var n=t.kind;return"A "+n+"ter cannot be a generator."},ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:function(t){var n=t.kind;return"Missing initializer in "+n+" declaration."},DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:function(t){var n=t.exportName;return"`"+n+"` has already been exported. Exported identifiers must be unique."},DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:function(t){var n=t.phase;return"'import."+n+"(...)' can only be parsed when using the 'createImportExpressions' option."},ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:function(t){var n=t.localName,i=t.exportName;return"A string literal cannot be used as an exported binding without `from`.\n- Did you mean `export { '"+n+"' as '"+i+"' } from 'some-module'`?"},ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:function(t){var n=t.type;return"'"+(n==="ForInStatement"?"for-in":"for-of")+"' loop variable declaration may not have an initializer."},ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:function(t){var n=t.type;return"Unsyntactic "+(n==="BreakStatement"?"break":"continue")+"."},IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.",ImportBindingIsString:function(t){var n=t.importName;return'A string literal cannot be used as an imported binding.\n- Did you mean `import { "'+n+'" as foo }`?'},ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:function(t){var n=t.maxArgumentCount;return"`import()` requires exactly "+(n===1?"one argument":"one or two arguments")+"."},ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:function(t){var n=t.radix;return"Expected number in radix "+n+"."},InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:function(t){var n=t.reservedWord;return"Escape sequence in keyword "+n+"."},InvalidIdentifier:function(t){var n=t.identifierName;return"Invalid identifier "+n+"."},InvalidLhs:function(t){var n=t.ancestor;return"Invalid left-hand side in "+p8(n)+"."},InvalidLhsBinding:function(t){var n=t.ancestor;return"Binding invalid left-hand side in "+p8(n)+"."},InvalidLhsOptionalChaining:function(t){var n=t.ancestor;return"Invalid optional chaining in the left-hand side of "+p8(n)+"."},InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:function(t){var n=t.unexpected;return"Unexpected character '"+n+"'."},InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:function(t){var n=t.identifierName;return"Private name #"+n+" is not defined."},InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:function(t){var n=t.labelName;return"Label '"+n+"' is already declared."},LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:function(t){var n=t.missingPlugin;return"This experimental syntax requires enabling the parser plugin: "+n.map(function(i){return JSON.stringify(i)}).join(", ")+"."},MissingOneOfPlugins:function(t){var n=t.missingPlugin;return"This experimental syntax requires enabling one of the following parser plugin(s): "+n.map(function(i){return JSON.stringify(i)}).join(", ")+"."},MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:function(t){var n=t.key;return'Duplicate key "'+n+'" is not allowed in module attributes.'},ModuleExportNameHasLoneSurrogate:function(t){var n=t.surrogateCharCode;return"An export name cannot include a lone surrogate, found '\\u"+n.toString(16)+"'."},ModuleExportUndefined:function(t){var n=t.localName;return"Export '"+n+"' is not defined."},MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:function(t){var n=t.identifierName;return"Private names are only allowed in property accesses (`obj.#"+n+"`) or in `in` expressions (`#"+n+" in obj`)."},PrivateNameRedeclaration:function(t){var n=t.identifierName;return"Duplicate private name #"+n+"."},RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:function(t){var n=t.keyword;return"Unexpected keyword '"+n+"'."},UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:function(t){var n=t.reservedWord;return"Unexpected reserved word '"+n+"'."},UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:function(t){var n=t.expected,i=t.unexpected;return"Unexpected token"+(i?" '"+i+"'.":"")+(n?', expected "'+n+'"':"")},UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:function(t){var n=t.target,i=t.onlyValidPropertyName;return"The only valid meta property for "+n+" is "+n+"."+i+"."},UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:function(t){var n=t.identifierName;return"Identifier '"+n+"' has already been declared."},YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},r7e={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:function(t){var n=t.referenceName;return"Assigning to '"+n+"' in strict mode."},StrictEvalArgumentsBinding:function(t){var n=t.bindingName;return"Binding '"+n+"' in strict mode."},StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},a7e=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),n7e={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:function(t){var n=t.token;return"Invalid topic token "+n+". In order to use "+n+' as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "'+n+'" }.'},PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:function(t){var n=t.type;return"Hack-style pipe body cannot be an unparenthesized "+p8({type:n})+"; please wrap it in parentheses."},PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'},_X,s7e=["toMessage"],i7e=["message"];function TX(e,t,n){Object.defineProperty(e,t,{enumerable:!1,configurable:!0,value:n})}function o7e(e){var t=e.toMessage,n=R(e,s7e);return function i(o,s){var A=new SyntaxError;return Object.assign(A,n,{loc:o,pos:o.index}),"missingPlugin"in s&&Object.assign(A,{missingPlugin:s.missingPlugin}),TX(A,"clone",function(c){var f;c===void 0&&(c={});var x=(f=c.loc)!=null?f:o,g=x.line,m=x.column,B=x.index;return i(new xx(g,m,B),Object.assign({},s,c.details))}),TX(A,"details",s),Object.defineProperty(A,"message",{configurable:!0,get:function(){var c=t(s)+" ("+o.line+":"+o.column+")";return this.message=c,c},set:function(c){Object.defineProperty(this,"message",{value:c,writable:!0})}}),A}}function Pf(e,t){if(Array.isArray(e))return function(A){return Pf(A,e[0])};for(var n={},i=function(){var d=s[o],c=e[d],f=typeof c=="string"?{message:function(){return c}}:typeof c=="function"?{message:c}:c,x=f.message,g=R(f,i7e),m=typeof x=="string"?function(){return x}:x;n[d]=o7e(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:d,toMessage:m},t?{syntaxPlugin:t}:{},g))},o=0,s=Object.keys(e);o<s.length;o++)i();return n}var ft=Object.assign({},Pf(e7e),Pf(t7e),Pf(r7e),Pf(_X||(_X=H(["pipelineOperator"])))(n7e)),u7e=Object.defineProperty,wX=function(t,n){t&&u7e(t,n,{enumerable:!1,value:t[n]})};function kF(e){return wX(e.loc.start,"index"),wX(e.loc.end,"index"),e}var A7e=function(e){return function(t){function n(){return t.apply(this,arguments)||this}ue(n,t);var i=n.prototype;return i.parse=function(){var s=kF(t.prototype.parse.call(this));return this.options.tokens&&(s.tokens=s.tokens.map(kF)),s},i.parseRegExpLiteral=function(s){var A=s.pattern,d=s.flags,c=null;try{c=new RegExp(A,d)}catch{}var f=this.estreeParseLiteral(c);return f.regex={pattern:A,flags:d},f},i.parseBigIntLiteral=function(s){var A;try{A=BigInt(s)}catch{A=null}var d=this.estreeParseLiteral(A);return d.bigint=String(d.value||s),d},i.parseDecimalLiteral=function(s){var A=null,d=this.estreeParseLiteral(A);return d.decimal=String(d.value||s),d},i.estreeParseLiteral=function(s){return this.parseLiteral(s,"Literal")},i.parseStringLiteral=function(s){return this.estreeParseLiteral(s)},i.parseNumericLiteral=function(s){return this.estreeParseLiteral(s)},i.parseNullLiteral=function(){return this.estreeParseLiteral(null)},i.parseBooleanLiteral=function(s){return this.estreeParseLiteral(s)},i.directiveToStmt=function(s){var A=s.value;delete s.value,A.type="Literal",A.raw=A.extra.raw,A.value=A.extra.expressionValue;var d=s;return d.type="ExpressionStatement",d.expression=A,d.directive=A.extra.rawValue,delete A.extra,d},i.initFunction=function(s,A){t.prototype.initFunction.call(this,s,A),s.expression=!1},i.checkDeclaration=function(s){s!=null&&this.isObjectProperty(s)?this.checkDeclaration(s.value):t.prototype.checkDeclaration.call(this,s)},i.getObjectOrClassMethodParams=function(s){return s.value.params},i.isValidDirective=function(s){var A;return s.type==="ExpressionStatement"&&s.expression.type==="Literal"&&typeof s.expression.value=="string"&&!((A=s.expression.extra)!=null&&A.parenthesized)},i.parseBlockBody=function(s,A,d,c,f){var x=this;t.prototype.parseBlockBody.call(this,s,A,d,c,f);var g=s.directives.map(function(m){return x.directiveToStmt(m)});s.body=g.concat(s.body),delete s.directives},i.pushClassMethod=function(s,A,d,c,f,x){this.parseMethod(A,d,c,f,x,"ClassMethod",!0),A.typeParameters&&(A.value.typeParameters=A.typeParameters,delete A.typeParameters),s.body.push(A)},i.parsePrivateName=function(){var s=t.prototype.parsePrivateName.call(this);return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(s):s},i.convertPrivateNameToPrivateIdentifier=function(s){var A=t.prototype.getPrivateNameSV.call(this,s);return s=s,delete s.id,s.name=A,s.type="PrivateIdentifier",s},i.isPrivateName=function(s){return this.getPluginOption("estree","classFeatures")?s.type==="PrivateIdentifier":t.prototype.isPrivateName.call(this,s)},i.getPrivateNameSV=function(s){return this.getPluginOption("estree","classFeatures")?s.name:t.prototype.getPrivateNameSV.call(this,s)},i.parseLiteral=function(s,A){var d=t.prototype.parseLiteral.call(this,s,A);return d.raw=d.extra.raw,delete d.extra,d},i.parseFunctionBody=function(s,A,d){d===void 0&&(d=!1),t.prototype.parseFunctionBody.call(this,s,A,d),s.expression=s.body.type!=="BlockStatement"},i.parseMethod=function(s,A,d,c,f,x,g){g===void 0&&(g=!1);var m=this.startNode();return m.kind=s.kind,m=t.prototype.parseMethod.call(this,m,A,d,c,f,x,g),m.type="FunctionExpression",delete m.kind,s.value=m,x==="ClassPrivateMethod"&&(s.computed=!1),this.finishNode(s,"MethodDefinition")},i.nameIsConstructor=function(s){return s.type==="Literal"?s.value==="constructor":t.prototype.nameIsConstructor.call(this,s)},i.parseClassProperty=function(){for(var s,A=arguments.length,d=new Array(A),c=0;c<A;c++)d[c]=arguments[c];var f=(s=t.prototype.parseClassProperty).call.apply(s,[this].concat(d));return this.getPluginOption("estree","classFeatures")&&(f.type="PropertyDefinition"),f},i.parseClassPrivateProperty=function(){for(var s,A=arguments.length,d=new Array(A),c=0;c<A;c++)d[c]=arguments[c];var f=(s=t.prototype.parseClassPrivateProperty).call.apply(s,[this].concat(d));return this.getPluginOption("estree","classFeatures")&&(f.type="PropertyDefinition",f.computed=!1),f},i.parseObjectMethod=function(s,A,d,c,f){var x=t.prototype.parseObjectMethod.call(this,s,A,d,c,f);return x&&(x.type="Property",x.kind==="method"&&(x.kind="init"),x.shorthand=!1),x},i.parseObjectProperty=function(s,A,d,c){var f=t.prototype.parseObjectProperty.call(this,s,A,d,c);return f&&(f.kind="init",f.type="Property"),f},i.isValidLVal=function(s,A,d){return s==="Property"?"value":t.prototype.isValidLVal.call(this,s,A,d)},i.isAssignable=function(s,A){return s!=null&&this.isObjectProperty(s)?this.isAssignable(s.value,A):t.prototype.isAssignable.call(this,s,A)},i.toAssignable=function(s,A){if(A===void 0&&(A=!1),s!=null&&this.isObjectProperty(s)){var d=s.key,c=s.value;this.isPrivateName(d)&&this.classScope.usePrivateName(this.getPrivateNameSV(d),d.loc.start),this.toAssignable(c,A)}else t.prototype.toAssignable.call(this,s,A)},i.toAssignableObjectExpressionProp=function(s,A,d){s.type==="Property"&&(s.kind==="get"||s.kind==="set")?this.raise(ft.PatternHasAccessor,s.key):s.type==="Property"&&s.method?this.raise(ft.PatternHasMethod,s.key):t.prototype.toAssignableObjectExpressionProp.call(this,s,A,d)},i.finishCallExpression=function(s,A){var d=t.prototype.finishCallExpression.call(this,s,A);if(d.callee.type==="Import"){if(d.type="ImportExpression",d.source=d.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")){var c,f;d.options=(c=d.arguments[1])!=null?c:null,d.attributes=(f=d.arguments[1])!=null?f:null}delete d.arguments,delete d.callee}return d},i.toReferencedArguments=function(s){s.type!=="ImportExpression"&&t.prototype.toReferencedArguments.call(this,s)},i.parseExport=function(s,A){var d=this.state.lastTokStartLoc,c=t.prototype.parseExport.call(this,s,A);switch(c.type){case"ExportAllDeclaration":c.exported=null;break;case"ExportNamedDeclaration":c.specifiers.length===1&&c.specifiers[0].type==="ExportNamespaceSpecifier"&&(c.type="ExportAllDeclaration",c.exported=c.specifiers[0].exported,delete c.specifiers);case"ExportDefaultDeclaration":{var f,x=c.declaration;x?.type==="ClassDeclaration"&&((f=x.decorators)==null?void 0:f.length)>0&&x.start===c.start&&this.resetStartLocation(c,d)}break}return c},i.parseSubscript=function(s,A,d,c){var f=t.prototype.parseSubscript.call(this,s,A,d,c);if(c.optionalChainMember){if((f.type==="OptionalMemberExpression"||f.type==="OptionalCallExpression")&&(f.type=f.type.substring(8)),c.stop){var x=this.startNodeAtNode(f);return x.expression=f,this.finishNode(x,"ChainExpression")}}else(f.type==="MemberExpression"||f.type==="CallExpression")&&(f.optional=!1);return f},i.isOptionalMemberExpression=function(s){return s.type==="ChainExpression"?s.expression.type==="MemberExpression":t.prototype.isOptionalMemberExpression.call(this,s)},i.hasPropertyAsPrivateName=function(s){return s.type==="ChainExpression"&&(s=s.expression),t.prototype.hasPropertyAsPrivateName.call(this,s)},i.isObjectProperty=function(s){return s.type==="Property"&&s.kind==="init"&&!s.method},i.isObjectMethod=function(s){return s.type==="Property"&&(s.method||s.kind==="get"||s.kind==="set")},i.finishNodeAt=function(s,A,d){return kF(t.prototype.finishNodeAt.call(this,s,A,d))},i.resetStartLocation=function(s,A){t.prototype.resetStartLocation.call(this,s,A),kF(s)},i.resetEndLocation=function(s,A){A===void 0&&(A=this.state.lastTokEndLoc),t.prototype.resetEndLocation.call(this,s,A),kF(s)},T(n)}(e)},_F=T(function(t,n){this.token=void 0,this.preserveSpace=void 0,this.token=t,this.preserveSpace=!!n}),ei={brace:new _F("{"),j_oTag:new _F("<tag"),j_cTag:new _F("</tag"),j_expr:new _F("<tag>...</tag>",!0)};ei.template=new _F("`",!0);var os=!0,ta=!0,hT=!0,TF=!0,Dx=!0,l7e=!0,PX=T(function(t,n){n===void 0&&(n={}),this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=t,this.keyword=n.keyword,this.beforeExpr=!!n.beforeExpr,this.startsExpr=!!n.startsExpr,this.rightAssociative=!!n.rightAssociative,this.isLoop=!!n.isLoop,this.isAssign=!!n.isAssign,this.prefix=!!n.prefix,this.postfix=!!n.postfix,this.binop=n.binop!=null?n.binop:null,this.updateContext=null}),jT=new Map;function gs(e,t){t===void 0&&(t={}),t.keyword=e;var n=Na(e,t);return jT.set(e,n),n}function qA(e,t){return Na(e,{beforeExpr:os,binop:t})}var wF=-1,If=[],gT=[],mT=[],yT=[],ET=[],FT=[];function Na(e,t){var n,i,o,s;return t===void 0&&(t={}),++wF,gT.push(e),mT.push((n=t.binop)!=null?n:-1),yT.push((i=t.beforeExpr)!=null?i:!1),ET.push((o=t.startsExpr)!=null?o:!1),FT.push((s=t.prefix)!=null?s:!1),If.push(new PX(e,t)),wF}function us(e,t){var n,i,o,s;return t===void 0&&(t={}),++wF,jT.set(e,wF),gT.push(e),mT.push((n=t.binop)!=null?n:-1),yT.push((i=t.beforeExpr)!=null?i:!1),ET.push((o=t.startsExpr)!=null?o:!1),FT.push((s=t.prefix)!=null?s:!1),If.push(new PX("name",t)),wF}var d7e={bracketL:Na("[",{beforeExpr:os,startsExpr:ta}),bracketHashL:Na("#[",{beforeExpr:os,startsExpr:ta}),bracketBarL:Na("[|",{beforeExpr:os,startsExpr:ta}),bracketR:Na("]"),bracketBarR:Na("|]"),braceL:Na("{",{beforeExpr:os,startsExpr:ta}),braceBarL:Na("{|",{beforeExpr:os,startsExpr:ta}),braceHashL:Na("#{",{beforeExpr:os,startsExpr:ta}),braceR:Na("}"),braceBarR:Na("|}"),parenL:Na("(",{beforeExpr:os,startsExpr:ta}),parenR:Na(")"),comma:Na(",",{beforeExpr:os}),semi:Na(";",{beforeExpr:os}),colon:Na(":",{beforeExpr:os}),doubleColon:Na("::",{beforeExpr:os}),dot:Na("."),question:Na("?",{beforeExpr:os}),questionDot:Na("?."),arrow:Na("=>",{beforeExpr:os}),template:Na("template"),ellipsis:Na("...",{beforeExpr:os}),backQuote:Na("`",{startsExpr:ta}),dollarBraceL:Na("${",{beforeExpr:os,startsExpr:ta}),templateTail:Na("...`",{startsExpr:ta}),templateNonTail:Na("...${",{beforeExpr:os,startsExpr:ta}),at:Na("@"),hash:Na("#",{startsExpr:ta}),interpreterDirective:Na("#!..."),eq:Na("=",{beforeExpr:os,isAssign:TF}),assign:Na("_=",{beforeExpr:os,isAssign:TF}),slashAssign:Na("_=",{beforeExpr:os,isAssign:TF}),xorAssign:Na("_=",{beforeExpr:os,isAssign:TF}),moduloAssign:Na("_=",{beforeExpr:os,isAssign:TF}),incDec:Na("++/--",{prefix:Dx,postfix:l7e,startsExpr:ta}),bang:Na("!",{beforeExpr:os,prefix:Dx,startsExpr:ta}),tilde:Na("~",{beforeExpr:os,prefix:Dx,startsExpr:ta}),doubleCaret:Na("^^",{startsExpr:ta}),doubleAt:Na("@@",{startsExpr:ta}),pipeline:qA("|>",0),nullishCoalescing:qA("??",1),logicalOR:qA("||",1),logicalAND:qA("&&",2),bitwiseOR:qA("|",3),bitwiseXOR:qA("^",4),bitwiseAND:qA("&",5),equality:qA("==/!=/===/!==",6),lt:qA("</>/<=/>=",7),gt:qA("</>/<=/>=",7),relational:qA("</>/<=/>=",7),bitShift:qA("<</>>/>>>",8),bitShiftL:qA("<</>>/>>>",8),bitShiftR:qA("<</>>/>>>",8),plusMin:Na("+/-",{beforeExpr:os,binop:9,prefix:Dx,startsExpr:ta}),modulo:Na("%",{binop:10,startsExpr:ta}),star:Na("*",{binop:10}),slash:qA("/",10),exponent:Na("**",{beforeExpr:os,binop:11,rightAssociative:!0}),_in:gs("in",{beforeExpr:os,binop:7}),_instanceof:gs("instanceof",{beforeExpr:os,binop:7}),_break:gs("break"),_case:gs("case",{beforeExpr:os}),_catch:gs("catch"),_continue:gs("continue"),_debugger:gs("debugger"),_default:gs("default",{beforeExpr:os}),_else:gs("else",{beforeExpr:os}),_finally:gs("finally"),_function:gs("function",{startsExpr:ta}),_if:gs("if"),_return:gs("return",{beforeExpr:os}),_switch:gs("switch"),_throw:gs("throw",{beforeExpr:os,prefix:Dx,startsExpr:ta}),_try:gs("try"),_var:gs("var"),_const:gs("const"),_with:gs("with"),_new:gs("new",{beforeExpr:os,startsExpr:ta}),_this:gs("this",{startsExpr:ta}),_super:gs("super",{startsExpr:ta}),_class:gs("class",{startsExpr:ta}),_extends:gs("extends",{beforeExpr:os}),_export:gs("export"),_import:gs("import",{startsExpr:ta}),_null:gs("null",{startsExpr:ta}),_true:gs("true",{startsExpr:ta}),_false:gs("false",{startsExpr:ta}),_typeof:gs("typeof",{beforeExpr:os,prefix:Dx,startsExpr:ta}),_void:gs("void",{beforeExpr:os,prefix:Dx,startsExpr:ta}),_delete:gs("delete",{beforeExpr:os,prefix:Dx,startsExpr:ta}),_do:gs("do",{isLoop:hT,beforeExpr:os}),_for:gs("for",{isLoop:hT}),_while:gs("while",{isLoop:hT}),_as:us("as",{startsExpr:ta}),_assert:us("assert",{startsExpr:ta}),_async:us("async",{startsExpr:ta}),_await:us("await",{startsExpr:ta}),_defer:us("defer",{startsExpr:ta}),_from:us("from",{startsExpr:ta}),_get:us("get",{startsExpr:ta}),_let:us("let",{startsExpr:ta}),_meta:us("meta",{startsExpr:ta}),_of:us("of",{startsExpr:ta}),_sent:us("sent",{startsExpr:ta}),_set:us("set",{startsExpr:ta}),_source:us("source",{startsExpr:ta}),_static:us("static",{startsExpr:ta}),_using:us("using",{startsExpr:ta}),_yield:us("yield",{startsExpr:ta}),_asserts:us("asserts",{startsExpr:ta}),_checks:us("checks",{startsExpr:ta}),_exports:us("exports",{startsExpr:ta}),_global:us("global",{startsExpr:ta}),_implements:us("implements",{startsExpr:ta}),_intrinsic:us("intrinsic",{startsExpr:ta}),_infer:us("infer",{startsExpr:ta}),_is:us("is",{startsExpr:ta}),_mixins:us("mixins",{startsExpr:ta}),_proto:us("proto",{startsExpr:ta}),_require:us("require",{startsExpr:ta}),_satisfies:us("satisfies",{startsExpr:ta}),_keyof:us("keyof",{startsExpr:ta}),_readonly:us("readonly",{startsExpr:ta}),_unique:us("unique",{startsExpr:ta}),_abstract:us("abstract",{startsExpr:ta}),_declare:us("declare",{startsExpr:ta}),_enum:us("enum",{startsExpr:ta}),_module:us("module",{startsExpr:ta}),_namespace:us("namespace",{startsExpr:ta}),_interface:us("interface",{startsExpr:ta}),_type:us("type",{startsExpr:ta}),_opaque:us("opaque",{startsExpr:ta}),name:Na("name",{startsExpr:ta}),string:Na("string",{startsExpr:ta}),num:Na("num",{startsExpr:ta}),bigint:Na("bigint",{startsExpr:ta}),decimal:Na("decimal",{startsExpr:ta}),regexp:Na("regexp",{startsExpr:ta}),privateName:Na("#name",{startsExpr:ta}),eof:Na("eof"),jsxName:Na("jsxName"),jsxText:Na("jsxText",{beforeExpr:!0}),jsxTagStart:Na("jsxTagStart",{startsExpr:!0}),jsxTagEnd:Na("jsxTagEnd"),placeholder:Na("%%",{startsExpr:!0})};function Ls(e){return e>=93&&e<=132}function c7e(e){return e<=92}function mc(e){return e>=58&&e<=132}function IX(e){return e>=58&&e<=136}function f7e(e){return yT[e]}function vT(e){return ET[e]}function p7e(e){return e>=29&&e<=33}function OX(e){return e>=129&&e<=131}function x7e(e){return e>=90&&e<=92}function CT(e){return e>=58&&e<=92}function D7e(e){return e>=39&&e<=59}function h7e(e){return e===34}function j7e(e){return FT[e]}function g7e(e){return e>=121&&e<=123}function m7e(e){return e>=124&&e<=130}function hx(e){return gT[e]}function x8(e){return mT[e]}function y7e(e){return e===57}function D8(e){return e>=24&&e<=25}function Of(e){return If[e]}If[8].updateContext=function(e){e.pop()},If[5].updateContext=If[7].updateContext=If[23].updateContext=function(e){e.push(ei.brace)},If[22].updateContext=function(e){e[e.length-1]===ei.template?e.pop():e.push(ei.template)},If[142].updateContext=function(e){e.push(ei.j_expr,ei.j_oTag)};function E7e(e,t,n){return e===64&&t===64&&Vl(n)}var F7e=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function v7e(e){return F7e.has(e)}var fn={OTHER:0,PROGRAM:1,FUNCTION:2,ARROW:4,SIMPLE_CATCH:8,SUPER:16,DIRECT_SUPER:32,CLASS:64,STATIC_BLOCK:128,TS_MODULE:256,VAR:387},wa={KIND_VALUE:1,KIND_TYPE:2,SCOPE_VAR:4,SCOPE_LEXICAL:8,SCOPE_FUNCTION:16,SCOPE_OUTSIDE:32,FLAG_NONE:64,FLAG_CLASS:128,FLAG_TS_ENUM:256,FLAG_TS_CONST_ENUM:512,FLAG_TS_EXPORT_ONLY:1024,FLAG_FLOW_DECLARE_FN:2048,FLAG_TS_IMPORT:4096,FLAG_NO_LET_IN_LEXICAL:8192,TYPE_CLASS:8331,TYPE_LEXICAL:8201,TYPE_CATCH_PARAM:9,TYPE_VAR:5,TYPE_FUNCTION:17,TYPE_TS_INTERFACE:130,TYPE_TS_TYPE:2,TYPE_TS_ENUM:8459,TYPE_TS_AMBIENT:1024,TYPE_NONE:64,TYPE_OUTSIDE:65,TYPE_TS_CONST_ENUM:8971,TYPE_TS_NAMESPACE:1024,TYPE_TS_TYPE_IMPORT:4098,TYPE_TS_VALUE_IMPORT:4096,TYPE_FLOW_DECLARE_FN:2048},bd={OTHER:0,FLAG_STATIC:4,KIND_GETTER:2,KIND_SETTER:1,KIND_ACCESSOR:3,STATIC_GETTER:6,STATIC_SETTER:5,INSTANCE_GETTER:2,INSTANCE_SETTER:1},E0={Var:1,Lexical:2,Function:4},bT=T(function(t){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=t}),BT=function(){function e(n,i){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=n,this.inModule=i}var t=e.prototype;return t.createScope=function(i){return new bT(i)},t.enter=function(i){this.scopeStack.push(this.createScope(i))},t.exit=function(){var i=this.scopeStack.pop();return i.flags},t.treatFunctionsAsVarInScope=function(i){return!!(i.flags&(fn.FUNCTION|fn.STATIC_BLOCK)||!this.parser.inModule&&i.flags&fn.PROGRAM)},t.declareName=function(i,o,s){var A=this.currentScope();if(o&wa.SCOPE_LEXICAL||o&wa.SCOPE_FUNCTION){this.checkRedeclarationInScope(A,i,o,s);var d=A.names.get(i)||0;o&wa.SCOPE_FUNCTION?d=d|E0.Function:(A.firstLexicalName||(A.firstLexicalName=i),d=d|E0.Lexical),A.names.set(i,d),o&wa.SCOPE_LEXICAL&&this.maybeExportDefined(A,i)}else if(o&wa.SCOPE_VAR)for(var c=this.scopeStack.length-1;c>=0&&(A=this.scopeStack[c],this.checkRedeclarationInScope(A,i,o,s),A.names.set(i,(A.names.get(i)||0)|E0.Var),this.maybeExportDefined(A,i),!(A.flags&fn.VAR));--c);this.parser.inModule&&A.flags&fn.PROGRAM&&this.undefinedExports.delete(i)},t.maybeExportDefined=function(i,o){this.parser.inModule&&i.flags&fn.PROGRAM&&this.undefinedExports.delete(o)},t.checkRedeclarationInScope=function(i,o,s,A){this.isRedeclaredInScope(i,o,s)&&this.parser.raise(ft.VarRedeclaration,A,{identifierName:o})},t.isRedeclaredInScope=function(i,o,s){if(!(s&wa.KIND_VALUE))return!1;if(s&wa.SCOPE_LEXICAL)return i.names.has(o);var A=i.names.get(o);return s&wa.SCOPE_FUNCTION?(A&E0.Lexical)>0||!this.treatFunctionsAsVarInScope(i)&&(A&E0.Var)>0:(A&E0.Lexical)>0&&!(i.flags&fn.SIMPLE_CATCH&&i.firstLexicalName===o)||!this.treatFunctionsAsVarInScope(i)&&(A&E0.Function)>0},t.checkLocalExport=function(i){var o=i.name,s=this.scopeStack[0];s.names.has(o)||this.undefinedExports.set(o,i.loc.start)},t.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},t.currentVarScopeFlags=function(){for(var i=this.scopeStack.length-1;;i--){var o=this.scopeStack[i].flags;if(o&fn.VAR)return o}},t.currentThisScopeFlags=function(){for(var i=this.scopeStack.length-1;;i--){var o=this.scopeStack[i].flags;if(o&(fn.VAR|fn.CLASS)&&!(o&fn.ARROW))return o}},T(e,[{key:"inTopLevel",get:function(){return(this.currentScope().flags&fn.PROGRAM)>0}},{key:"inFunction",get:function(){return(this.currentVarScopeFlags()&fn.FUNCTION)>0}},{key:"allowSuper",get:function(){return(this.currentThisScopeFlags()&fn.SUPER)>0}},{key:"allowDirectSuper",get:function(){return(this.currentThisScopeFlags()&fn.DIRECT_SUPER)>0}},{key:"inClass",get:function(){return(this.currentThisScopeFlags()&fn.CLASS)>0}},{key:"inClassAndNotInNonArrowFunction",get:function(){var i=this.currentThisScopeFlags();return(i&fn.CLASS)>0&&(i&fn.FUNCTION)===0}},{key:"inStaticBlock",get:function(){for(var i=this.scopeStack.length-1;;i--){var o=this.scopeStack[i].flags;if(o&fn.STATIC_BLOCK)return!0;if(o&(fn.VAR|fn.CLASS))return!1}}},{key:"inNonArrowFunction",get:function(){return(this.currentThisScopeFlags()&fn.FUNCTION)>0}},{key:"treatFunctionsAsVar",get:function(){return this.treatFunctionsAsVarInScope(this.currentScope())}}])}(),C7e=function(e){function t(){for(var n,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=e.call.apply(e,[this].concat(o))||this,n.declareFunctions=new Set,n}return ue(t,e),T(t)}(bT),b7e=function(e){function t(){return e.apply(this,arguments)||this}ue(t,e);var n=t.prototype;return n.createScope=function(o){return new C7e(o)},n.declareName=function(o,s,A){var d=this.currentScope();if(s&wa.FLAG_FLOW_DECLARE_FN){this.checkRedeclarationInScope(d,o,s,A),this.maybeExportDefined(d,o),d.declareFunctions.add(o);return}e.prototype.declareName.call(this,o,s,A)},n.isRedeclaredInScope=function(o,s,A){if(e.prototype.isRedeclaredInScope.call(this,o,s,A))return!0;if(A&wa.FLAG_FLOW_DECLARE_FN&&!o.declareFunctions.has(s)){var d=o.names.get(s);return(d&E0.Function)>0||(d&E0.Lexical)>0}return!1},n.checkLocalExport=function(o){this.scopeStack[0].declareFunctions.has(o.name)||e.prototype.checkLocalExport.call(this,o)},T(t)}(BT),B7e=function(){function e(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}var t=e.prototype;return t.hasPlugin=function(i){if(typeof i=="string")return this.plugins.has(i);var o=i[0],s=i[1];if(!this.hasPlugin(o))return!1;for(var A=this.plugins.get(o),d=0,c=Object.keys(s);d<c.length;d++){var f=c[d];if(A?.[f]!==s[f])return!1}return!0},t.getPluginOption=function(i,o){var s;return(s=this.plugins.get(i))==null?void 0:s[o]},T(e)}();function $X(e,t){if(e.trailingComments===void 0)e.trailingComments=t;else{var n;(n=e.trailingComments).unshift.apply(n,t)}}function R7e(e,t){if(e.leadingComments===void 0)e.leadingComments=t;else{var n;(n=e.leadingComments).unshift.apply(n,t)}}function PF(e,t){if(e.innerComments===void 0)e.innerComments=t;else{var n;(n=e.innerComments).unshift.apply(n,t)}}function IF(e,t,n){for(var i=null,o=t.length;i===null&&o>0;)i=t[--o];i===null||i.start>n.start?PF(e,n.comments):$X(i,n.comments)}var S7e=function(e){function t(){return e.apply(this,arguments)||this}ue(t,e);var n=t.prototype;return n.addComment=function(o){this.filename&&(o.loc.filename=this.filename);var s=this.state.commentsLen;this.comments.length!==s&&(this.comments.length=s),this.comments.push(o),this.state.commentsLen++},n.processComment=function(o){var s=this.state.commentStack,A=s.length;if(A!==0){var d=A-1,c=s[d];c.start===o.end&&(c.leadingNode=o,d--);for(var f=o.start;d>=0;d--){var x=s[d],g=x.end;if(g>f)x.containingNode=o,this.finalizeComment(x),s.splice(d,1);else{g===f&&(x.trailingNode=o);break}}}},n.finalizeComment=function(o){var s=o.comments;if(o.leadingNode!==null||o.trailingNode!==null)o.leadingNode!==null&&$X(o.leadingNode,s),o.trailingNode!==null&&R7e(o.trailingNode,s);else{var A=o.containingNode,d=o.start;if(this.input.charCodeAt(d-1)===44)switch(A.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":IF(A,A.properties,o);break;case"CallExpression":case"OptionalCallExpression":IF(A,A.arguments,o);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":IF(A,A.params,o);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":IF(A,A.elements,o);break;case"ExportNamedDeclaration":case"ImportDeclaration":IF(A,A.specifiers,o);break;default:PF(A,s)}else PF(A,s)}},n.finalizeRemainingComments=function(){for(var o=this.state.commentStack,s=o.length-1;s>=0;s--)this.finalizeComment(o[s]);this.state.commentStack=[]},n.resetPreviousNodeTrailingComments=function(o){var s=this.state.commentStack,A=s.length;if(A!==0){var d=s[A-1];d.leadingNode===o&&(d.leadingNode=null)}},n.resetPreviousIdentifierLeadingComments=function(o){var s=this.state.commentStack,A=s.length;A!==0&&(s[A-1].trailingNode===o?s[A-1].trailingNode=null:A>=2&&s[A-2].trailingNode===o&&(s[A-2].trailingNode=null))},n.takeSurroundingComments=function(o,s,A){var d=this.state.commentStack,c=d.length;if(c!==0)for(var f=c-1;f>=0;f--){var x=d[f],g=x.end,m=x.start;if(m===A)x.leadingNode=o;else if(g===s)x.trailingNode=o;else if(g<s)break}},T(t)}(B7e),NX=/\r\n?|[\n\u2028\u2029]/,h8=new RegExp(NX.source,"g");function OF(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}var RT=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,j8=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g,LX=new RegExp("(?=("+j8.source+"))\\1"+/(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source,"y");function k7e(e){switch(e){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var $F={Loop:1,Switch:2},_7e=function(){function e(){this.flags=1024,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.labels=[],this.commentsLen=0,this.commentStack=[],this.pos=0,this.type=139,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[ei.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}var t=e.prototype;return t.init=function(i){var o=i.strictMode,s=i.sourceType,A=i.startLine,d=i.startColumn;this.strict=o===!1?!1:o===!0?!0:s==="module",this.curLine=A,this.lineStart=-d,this.startLoc=this.endLoc=new xx(A,d,0)},t.curPosition=function(){return new xx(this.curLine,this.pos-this.lineStart,this.pos)},t.clone=function(){var i=new e;return i.flags=this.flags,i.curLine=this.curLine,i.lineStart=this.lineStart,i.startLoc=this.startLoc,i.endLoc=this.endLoc,i.errors=this.errors.slice(),i.potentialArrowAt=this.potentialArrowAt,i.noArrowAt=this.noArrowAt.slice(),i.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),i.topicContext=this.topicContext,i.labels=this.labels.slice(),i.commentsLen=this.commentsLen,i.commentStack=this.commentStack.slice(),i.pos=this.pos,i.type=this.type,i.value=this.value,i.start=this.start,i.end=this.end,i.lastTokEndLoc=this.lastTokEndLoc,i.lastTokStartLoc=this.lastTokStartLoc,i.context=this.context.slice(),i.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,i.strictErrors=this.strictErrors,i.tokensLength=this.tokensLength,i},T(e,[{key:"strict",get:function(){return(this.flags&1)>0},set:function(i){i?this.flags|=1:this.flags&=-2}},{key:"maybeInArrowParameters",get:function(){return(this.flags&2)>0},set:function(i){i?this.flags|=2:this.flags&=-3}},{key:"inType",get:function(){return(this.flags&4)>0},set:function(i){i?this.flags|=4:this.flags&=-5}},{key:"noAnonFunctionType",get:function(){return(this.flags&8)>0},set:function(i){i?this.flags|=8:this.flags&=-9}},{key:"hasFlowComment",get:function(){return(this.flags&16)>0},set:function(i){i?this.flags|=16:this.flags&=-17}},{key:"isAmbientContext",get:function(){return(this.flags&32)>0},set:function(i){i?this.flags|=32:this.flags&=-33}},{key:"inAbstractClass",get:function(){return(this.flags&64)>0},set:function(i){i?this.flags|=64:this.flags&=-65}},{key:"inDisallowConditionalTypesContext",get:function(){return(this.flags&128)>0},set:function(i){i?this.flags|=128:this.flags&=-129}},{key:"soloAwait",get:function(){return(this.flags&256)>0},set:function(i){i?this.flags|=256:this.flags&=-257}},{key:"inFSharpPipelineDirectBody",get:function(){return(this.flags&512)>0},set:function(i){i?this.flags|=512:this.flags&=-513}},{key:"canStartJSXElement",get:function(){return(this.flags&1024)>0},set:function(i){i?this.flags|=1024:this.flags&=-1025}},{key:"containsEsc",get:function(){return(this.flags&2048)>0},set:function(i){i?this.flags|=2048:this.flags&=-2049}}])}();function NF(e,t,n){return new xx(n,e-t,e)}var T7e=new Set([103,109,115,105,121,117,100,118]),jx=T(function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new f8(t.startLoc,t.endLoc)}),w7e=function(e){function t(i,o){var s;return s=e.call(this)||this,s.isLookahead=void 0,s.tokens=[],s.errorHandlers_readInt={invalidDigit:function(d,c,f,x){return s.options.errorRecovery?(s.raise(ft.InvalidDigit,NF(d,c,f),{radix:x}),!0):!1},numericSeparatorInEscapeSequence:s.errorBuilder(ft.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:s.errorBuilder(ft.UnexpectedNumericSeparator)},s.errorHandlers_readCodePoint=Object.assign({},s.errorHandlers_readInt,{invalidEscapeSequence:s.errorBuilder(ft.InvalidEscapeSequence),invalidCodePoint:s.errorBuilder(ft.InvalidCodePoint)}),s.errorHandlers_readStringContents_string=Object.assign({},s.errorHandlers_readCodePoint,{strictNumericEscape:function(d,c,f){s.recordStrictModeErrors(ft.StrictNumericEscape,NF(d,c,f))},unterminated:function(d,c,f){throw s.raise(ft.UnterminatedString,NF(d-1,c,f))}}),s.errorHandlers_readStringContents_template=Object.assign({},s.errorHandlers_readCodePoint,{strictNumericEscape:s.errorBuilder(ft.StrictNumericEscape),unterminated:function(d,c,f){throw s.raise(ft.UnterminatedTemplate,NF(d,c,f))}}),s.state=new _7e,s.state.init(i),s.input=o,s.length=o.length,s.comments=[],s.isLookahead=!1,s}ue(t,e);var n=t.prototype;return n.pushToken=function(o){this.tokens.length=this.state.tokensLength,this.tokens.push(o),++this.state.tokensLength},n.next=function(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new jx(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()},n.eat=function(o){return this.match(o)?(this.next(),!0):!1},n.match=function(o){return this.state.type===o},n.createLookaheadState=function(o){return{pos:o.pos,value:null,type:o.type,start:o.start,end:o.end,context:[this.curContext()],inType:o.inType,startLoc:o.startLoc,lastTokEndLoc:o.lastTokEndLoc,curLine:o.curLine,lineStart:o.lineStart,curPosition:o.curPosition}},n.lookahead=function(){var o=this.state;this.state=this.createLookaheadState(o),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;var s=this.state;return this.state=o,s},n.nextTokenStart=function(){return this.nextTokenStartSince(this.state.pos)},n.nextTokenStartSince=function(o){return RT.lastIndex=o,RT.test(this.input)?RT.lastIndex:o},n.lookaheadCharCode=function(){return this.input.charCodeAt(this.nextTokenStart())},n.nextTokenInLineStart=function(){return this.nextTokenInLineStartSince(this.state.pos)},n.nextTokenInLineStartSince=function(o){return j8.lastIndex=o,j8.test(this.input)?j8.lastIndex:o},n.lookaheadInLineCharCode=function(){return this.input.charCodeAt(this.nextTokenInLineStart())},n.codePointAtPos=function(o){var s=this.input.charCodeAt(o);if((s&64512)===55296&&++o<this.input.length){var A=this.input.charCodeAt(o);(A&64512)===56320&&(s=65536+((s&1023)<<10)+(A&1023))}return s},n.setStrict=function(o){var s=this;this.state.strict=o,o&&(this.state.strictErrors.forEach(function(A){var d=A[0],c=A[1];return s.raise(d,c)}),this.state.strictErrors.clear())},n.curContext=function(){return this.state.context[this.state.context.length-1]},n.nextToken=function(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(139);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))},n.skipBlockComment=function(o){var s;this.isLookahead||(s=this.state.curPosition());var A=this.state.pos,d=this.input.indexOf(o,A+2);if(d===-1)throw this.raise(ft.UnterminatedComment,this.state.curPosition());for(this.state.pos=d+o.length,h8.lastIndex=A+2;h8.test(this.input)&&h8.lastIndex<=d;)++this.state.curLine,this.state.lineStart=h8.lastIndex;if(!this.isLookahead){var c={type:"CommentBlock",value:this.input.slice(A+2,d),start:A,end:d+o.length,loc:new f8(s,this.state.curPosition())};return this.options.tokens&&this.pushToken(c),c}},n.skipLineComment=function(o){var s=this.state.pos,A;this.isLookahead||(A=this.state.curPosition());var d=this.input.charCodeAt(this.state.pos+=o);if(this.state.pos<this.length)for(;!OF(d)&&++this.state.pos<this.length;)d=this.input.charCodeAt(this.state.pos);if(!this.isLookahead){var c=this.state.pos,f=this.input.slice(s+o,c),x={type:"CommentLine",value:f,start:s,end:c,loc:new f8(A,this.state.curPosition())};return this.options.tokens&&this.pushToken(x),x}},n.skipSpace=function(){var o=this.state.pos,s=[];e:for(;this.state.pos<this.length;){var A=this.input.charCodeAt(this.state.pos);switch(A){case 32:case 160:case 9:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{var d=this.skipBlockComment("*/");d!==void 0&&(this.addComment(d),this.options.attachComment&&s.push(d));break}case 47:{var c=this.skipLineComment(2);c!==void 0&&(this.addComment(c),this.options.attachComment&&s.push(c));break}default:break e}break;default:if(k7e(A))++this.state.pos;else if(A===45&&!this.inModule&&this.options.annexB){var f=this.state.pos;if(this.input.charCodeAt(f+1)===45&&this.input.charCodeAt(f+2)===62&&(o===0||this.state.lineStart>o)){var x=this.skipLineComment(3);x!==void 0&&(this.addComment(x),this.options.attachComment&&s.push(x))}else break e}else if(A===60&&!this.inModule&&this.options.annexB){var g=this.state.pos;if(this.input.charCodeAt(g+1)===33&&this.input.charCodeAt(g+2)===45&&this.input.charCodeAt(g+3)===45){var m=this.skipLineComment(4);m!==void 0&&(this.addComment(m),this.options.attachComment&&s.push(m))}else break e}else break e}}if(s.length>0){var B=this.state.pos,b={start:o,end:B,comments:s,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(b)}},n.finishToken=function(o,s){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var A=this.state.type;this.state.type=o,this.state.value=s,this.isLookahead||this.updateContext(A)},n.replaceToken=function(o){this.state.type=o,this.updateContext()},n.readToken_numberSign=function(){if(!(this.state.pos===0&&this.readToken_interpreter())){var o=this.state.pos+1,s=this.codePointAtPos(o);if(s>=48&&s<=57)throw this.raise(ft.UnexpectedDigitAfterHash,this.state.curPosition());if(s===123||s===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(s===123?ft.RecordExpressionHashIncorrectStartSyntaxType:ft.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,s===123?this.finishToken(7):this.finishToken(1)}else Vl(s)?(++this.state.pos,this.finishToken(138,this.readWord1(s))):s===92?(++this.state.pos,this.finishToken(138,this.readWord1())):this.finishOp(27,1)}},n.readToken_dot=function(){var o=this.input.charCodeAt(this.state.pos+1);if(o>=48&&o<=57){this.readNumber(!0);return}o===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))},n.readToken_slash=function(){var o=this.input.charCodeAt(this.state.pos+1);o===61?this.finishOp(31,2):this.finishOp(56,1)},n.readToken_interpreter=function(){if(this.state.pos!==0||this.length<2)return!1;var o=this.input.charCodeAt(this.state.pos+1);if(o!==33)return!1;var s=this.state.pos;for(this.state.pos+=1;!OF(o)&&++this.state.pos<this.length;)o=this.input.charCodeAt(this.state.pos);var A=this.input.slice(s+2,this.state.pos);return this.finishToken(28,A),!0},n.readToken_mult_modulo=function(o){var s=o===42?55:54,A=1,d=this.input.charCodeAt(this.state.pos+1);o===42&&d===42&&(A++,d=this.input.charCodeAt(this.state.pos+2),s=57),d===61&&!this.state.inType&&(A++,s=o===37?33:30),this.finishOp(s,A)},n.readToken_pipe_amp=function(o){var s=this.input.charCodeAt(this.state.pos+1);if(s===o){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(o===124?41:42,2);return}if(o===124){if(s===62){this.finishOp(39,2);return}if(this.hasPlugin("recordAndTuple")&&s===125){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(ft.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin("recordAndTuple")&&s===93){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(ft.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(s===61){this.finishOp(30,2);return}this.finishOp(o===124?43:45,1)},n.readToken_caret=function(){var o=this.input.charCodeAt(this.state.pos+1);if(o===61&&!this.state.inType)this.finishOp(32,2);else if(o===94&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])){this.finishOp(37,2);var s=this.input.codePointAt(this.state.pos);s===94&&this.unexpected()}else this.finishOp(44,1)},n.readToken_atSign=function(){var o=this.input.charCodeAt(this.state.pos+1);o===64&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)},n.readToken_plus_min=function(o){var s=this.input.charCodeAt(this.state.pos+1);if(s===o){this.finishOp(34,2);return}s===61?this.finishOp(30,2):this.finishOp(53,1)},n.readToken_lt=function(){var o=this.state.pos,s=this.input.charCodeAt(o+1);if(s===60){if(this.input.charCodeAt(o+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(s===61){this.finishOp(49,2);return}this.finishOp(47,1)},n.readToken_gt=function(){var o=this.state.pos,s=this.input.charCodeAt(o+1);if(s===62){var A=this.input.charCodeAt(o+2)===62?3:2;if(this.input.charCodeAt(o+A)===61){this.finishOp(30,A+1);return}this.finishOp(52,A);return}if(s===61){this.finishOp(49,2);return}this.finishOp(48,1)},n.readToken_eq_excl=function(o){var s=this.input.charCodeAt(this.state.pos+1);if(s===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(o===61&&s===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(o===61?29:35,1)},n.readToken_question=function(){var o=this.input.charCodeAt(this.state.pos+1),s=this.input.charCodeAt(this.state.pos+2);o===63?s===61?this.finishOp(30,3):this.finishOp(40,2):o===46&&!(s>=48&&s<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))},n.getTokenFromCode=function(o){switch(o){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(ft.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(ft.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{var s=this.input.charCodeAt(this.state.pos+1);if(s===120||s===88){this.readRadixNumber(16);return}if(s===111||s===79){this.readRadixNumber(8);return}if(s===98||s===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(o);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(o);return;case 124:case 38:this.readToken_pipe_amp(o);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(o);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(o);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(Vl(o)){this.readWord(o);return}}throw this.raise(ft.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(o)})},n.finishOp=function(o,s){var A=this.input.slice(this.state.pos,this.state.pos+s);this.state.pos+=s,this.finishToken(o,A)},n.readRegexp=function(){for(var o=this.state.startLoc,s=this.state.start+1,A,d,c=this.state.pos;;++c){if(c>=this.length)throw this.raise(ft.UnterminatedRegExp,GA(o,1));var f=this.input.charCodeAt(c);if(OF(f))throw this.raise(ft.UnterminatedRegExp,GA(o,1));if(A)A=!1;else{if(f===91)d=!0;else if(f===93&&d)d=!1;else if(f===47&&!d)break;A=f===92}}var x=this.input.slice(s,c);++c;for(var g="",m=function(){return GA(o,c+2-s)};c<this.length;){var B=this.codePointAtPos(c),b=String.fromCharCode(B);if(T7e.has(B))B===118?g.includes("u")&&this.raise(ft.IncompatibleRegExpUVFlags,m()):B===117&&g.includes("v")&&this.raise(ft.IncompatibleRegExpUVFlags,m()),g.includes(b)&&this.raise(ft.DuplicateRegExpFlags,m());else if(f0(B)||B===92)this.raise(ft.MalformedRegExpFlags,m());else break;++c,g+=b}this.state.pos=c,this.finishToken(137,{pattern:x,flags:g})},n.readInt=function(o,s,A,d){A===void 0&&(A=!1),d===void 0&&(d=!0);var c=eA(this.input,this.state.pos,this.state.lineStart,this.state.curLine,o,s,A,d,this.errorHandlers_readInt,!1),f=c.n,x=c.pos;return this.state.pos=x,f},n.readRadixNumber=function(o){var s=this.state.curPosition(),A=!1;this.state.pos+=2;var d=this.readInt(o);d==null&&this.raise(ft.InvalidDigit,GA(s,2),{radix:o});var c=this.input.charCodeAt(this.state.pos);if(c===110)++this.state.pos,A=!0;else if(c===109)throw this.raise(ft.InvalidDecimal,s);if(Vl(this.codePointAtPos(this.state.pos)))throw this.raise(ft.NumberIdentifier,this.state.curPosition());if(A){var f=this.input.slice(s.index,this.state.pos).replace(/[_n]/g,"");this.finishToken(135,f);return}this.finishToken(134,d)},n.readNumber=function(o){var s=this.state.pos,A=this.state.curPosition(),d=!1,c=!1,f=!1,x=!1,g=!1;!o&&this.readInt(10)===null&&this.raise(ft.InvalidNumber,this.state.curPosition());var m=this.state.pos-s>=2&&this.input.charCodeAt(s)===48;if(m){var B=this.input.slice(s,this.state.pos);if(this.recordStrictModeErrors(ft.StrictOctalLiteral,A),!this.state.strict){var b=B.indexOf("_");b>0&&this.raise(ft.ZeroDigitNumericSeparator,GA(A,b))}g=m&&!/[89]/.test(B)}var _=this.input.charCodeAt(this.state.pos);if(_===46&&!g&&(++this.state.pos,this.readInt(10),d=!0,_=this.input.charCodeAt(this.state.pos)),(_===69||_===101)&&!g&&(_=this.input.charCodeAt(++this.state.pos),(_===43||_===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(ft.InvalidOrMissingExponent,A),d=!0,x=!0,_=this.input.charCodeAt(this.state.pos)),_===110&&((d||m)&&this.raise(ft.InvalidBigIntLiteral,A),++this.state.pos,c=!0),_===109&&(this.expectPlugin("decimal",this.state.curPosition()),(x||m)&&this.raise(ft.InvalidDecimal,A),++this.state.pos,f=!0),Vl(this.codePointAtPos(this.state.pos)))throw this.raise(ft.NumberIdentifier,this.state.curPosition());var C=this.input.slice(s,this.state.pos).replace(/[_mn]/g,"");if(c){this.finishToken(135,C);return}if(f){this.finishToken(136,C);return}var w=g?parseInt(C,8):parseFloat(C);this.finishToken(134,w)},n.readCodePoint=function(o){var s=Ac(this.input,this.state.pos,this.state.lineStart,this.state.curLine,o,this.errorHandlers_readCodePoint),A=s.code,d=s.pos;return this.state.pos=d,A},n.readString=function(o){var s=Yp(o===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string),A=s.str,d=s.pos,c=s.curLine,f=s.lineStart;this.state.pos=d+1,this.state.lineStart=f,this.state.curLine=c,this.finishToken(133,A)},n.readTemplateContinuation=function(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()},n.readTemplateToken=function(){var o=this.input[this.state.pos],s=Yp("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template),A=s.str,d=s.firstInvalidLoc,c=s.pos,f=s.curLine,x=s.lineStart;this.state.pos=c+1,this.state.lineStart=x,this.state.curLine=f,d&&(this.state.firstInvalidTemplateEscapePos=new xx(d.curLine,d.pos-d.lineStart,d.pos)),this.input.codePointAt(c)===96?this.finishToken(24,d?null:o+A+"`"):(this.state.pos++,this.finishToken(25,d?null:o+A+"${"))},n.recordStrictModeErrors=function(o,s){var A=s.index;this.state.strict&&!this.state.strictErrors.has(A)?this.raise(o,s):this.state.strictErrors.set(A,[o,s])},n.readWord1=function(o){this.state.containsEsc=!1;var s="",A=this.state.pos,d=this.state.pos;for(o!==void 0&&(this.state.pos+=o<=65535?1:2);this.state.pos<this.length;){var c=this.codePointAtPos(this.state.pos);if(f0(c))this.state.pos+=c<=65535?1:2;else if(c===92){this.state.containsEsc=!0,s+=this.input.slice(d,this.state.pos);var f=this.state.curPosition(),x=this.state.pos===A?Vl:f0;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(ft.MissingUnicodeEscape,this.state.curPosition()),d=this.state.pos-1;continue}++this.state.pos;var g=this.readCodePoint(!0);g!==null&&(x(g)||this.raise(ft.EscapedCharNotAnIdentifier,f),s+=String.fromCodePoint(g)),d=this.state.pos}else break}return s+this.input.slice(d,this.state.pos)},n.readWord=function(o){var s=this.readWord1(o),A=jT.get(s);A!==void 0?this.finishToken(A,hx(A)):this.finishToken(132,s)},n.checkKeywordEscapes=function(){var o=this.state.type;CT(o)&&this.state.containsEsc&&this.raise(ft.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:hx(o)})},n.raise=function(o,s,A){A===void 0&&(A={});var d=s instanceof xx?s:s.loc.start,c=o(d,A);if(!this.options.errorRecovery)throw c;return this.isLookahead||this.state.errors.push(c),c},n.raiseOverwrite=function(o,s,A){A===void 0&&(A={});for(var d=s instanceof xx?s:s.loc.start,c=d.index,f=this.state.errors,x=f.length-1;x>=0;x--){var g=f[x];if(g.loc.index===c)return f[x]=o(d,A);if(g.loc.index<c)break}return this.raise(o,s,A)},n.updateContext=function(o){},n.unexpected=function(o,s){throw this.raise(ft.UnexpectedToken,o??this.state.startLoc,{expected:s?hx(s):null})},n.expectPlugin=function(o,s){if(this.hasPlugin(o))return!0;throw this.raise(ft.MissingPlugin,s??this.state.startLoc,{missingPlugin:[o]})},n.expectOnePlugin=function(o){var s=this;if(!o.some(function(A){return s.hasPlugin(A)}))throw this.raise(ft.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:o})},n.errorBuilder=function(o){var s=this;return function(A,d,c){s.raise(o,NF(A,d,c))}},T(t)}(S7e),P7e=T(function(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}),I7e=function(){function e(n){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=n}var t=e.prototype;return t.current=function(){return this.stack[this.stack.length-1]},t.enter=function(){this.stack.push(new P7e)},t.exit=function(){for(var i=this.stack.pop(),o=this.current(),s=0,A=Array.from(i.undefinedPrivateNames);s<A.length;s++){var d=A[s],c=d[0],f=d[1];o?o.undefinedPrivateNames.has(c)||o.undefinedPrivateNames.set(c,f):this.parser.raise(ft.InvalidPrivateFieldResolution,f,{identifierName:c})}},t.declarePrivateName=function(i,o,s){var A=this.current(),d=A.privateNames,c=A.loneAccessors,f=A.undefinedPrivateNames,x=d.has(i);if(o&bd.KIND_ACCESSOR){var g=x&&c.get(i);if(g){var m=g&bd.FLAG_STATIC,B=o&bd.FLAG_STATIC,b=g&bd.KIND_ACCESSOR,_=o&bd.KIND_ACCESSOR;x=b===_||m!==B,x||c.delete(i)}else x||c.set(i,o)}x&&this.parser.raise(ft.PrivateNameRedeclaration,s,{identifierName:i}),d.add(i),f.delete(i)},t.usePrivateName=function(i,o){for(var s,A=0,d=this.stack;A<d.length;A++)if(s=d[A],s.privateNames.has(i))return;s?s.undefinedPrivateNames.set(i,o):this.parser.raise(ft.InvalidPrivateFieldResolution,o,{identifierName:i})},T(e)}(),g8=function(){function e(n){n===void 0&&(n=0),this.type=n}var t=e.prototype;return t.canBeArrowParameterDeclaration=function(){return this.type===2||this.type===1},t.isCertainlyParameterDeclaration=function(){return this.type===3},T(e)}(),MX=function(e){function t(i){var o;return o=e.call(this,i)||this,o.declarationErrors=new Map,o}ue(t,e);var n=t.prototype;return n.recordDeclarationError=function(o,s){var A=s.index;this.declarationErrors.set(A,[o,s])},n.clearDeclarationError=function(o){this.declarationErrors.delete(o)},n.iterateErrors=function(o){this.declarationErrors.forEach(o)},T(t)}(g8),O7e=function(){function e(n){this.parser=void 0,this.stack=[new g8],this.parser=n}var t=e.prototype;return t.enter=function(i){this.stack.push(i)},t.exit=function(){this.stack.pop()},t.recordParameterInitializerError=function(i,o){for(var s=o.loc.start,A=this.stack,d=A.length-1,c=A[d];!c.isCertainlyParameterDeclaration();){if(c.canBeArrowParameterDeclaration())c.recordDeclarationError(i,s);else return;c=A[--d]}this.parser.raise(i,s)},t.recordArrowParameterBindingError=function(i,o){var s=this.stack,A=s[s.length-1],d=o.loc.start;if(A.isCertainlyParameterDeclaration())this.parser.raise(i,d);else if(A.canBeArrowParameterDeclaration())A.recordDeclarationError(i,d);else return},t.recordAsyncArrowParametersError=function(i){for(var o=this.stack,s=o.length-1,A=o[s];A.canBeArrowParameterDeclaration();)A.type===2&&A.recordDeclarationError(ft.AwaitBindingIdentifier,i),A=o[--s]},t.validateAsPattern=function(){var i=this,o=this.stack,s=o[o.length-1];s.canBeArrowParameterDeclaration()&&s.iterateErrors(function(A){var d=A[0],c=A[1];i.parser.raise(d,c);for(var f=o.length-2,x=o[f];x.canBeArrowParameterDeclaration();)x.clearDeclarationError(c.index),x=o[--f]})},T(e)}();function $7e(){return new g8(3)}function N7e(){return new MX(1)}function L7e(){return new MX(2)}function UX(){return new g8}var So={PARAM:0,PARAM_YIELD:1,PARAM_AWAIT:2,PARAM_RETURN:4,PARAM_IN:8},M7e=function(){function e(){this.stacks=[]}var t=e.prototype;return t.enter=function(i){this.stacks.push(i)},t.exit=function(){this.stacks.pop()},t.currentFlags=function(){return this.stacks[this.stacks.length-1]},T(e,[{key:"hasAwait",get:function(){return(this.currentFlags()&So.PARAM_AWAIT)>0}},{key:"hasYield",get:function(){return(this.currentFlags()&So.PARAM_YIELD)>0}},{key:"hasReturn",get:function(){return(this.currentFlags()&So.PARAM_RETURN)>0}},{key:"hasIn",get:function(){return(this.currentFlags()&So.PARAM_IN)>0}}])}();function m8(e,t){return(e?So.PARAM_AWAIT:0)|(t?So.PARAM_YIELD:0)}var U7e=function(e){function t(){return e.apply(this,arguments)||this}ue(t,e);var n=t.prototype;return n.addExtra=function(o,s,A,d){if(d===void 0&&(d=!0),!!o){var c=o.extra=o.extra||{};d?c[s]=A:Object.defineProperty(c,s,{enumerable:d,value:A})}},n.isContextual=function(o){return this.state.type===o&&!this.state.containsEsc},n.isUnparsedContextual=function(o,s){var A=o+s.length;if(this.input.slice(o,A)===s){var d=this.input.charCodeAt(A);return!(f0(d)||(d&64512)===55296)}return!1},n.isLookaheadContextual=function(o){var s=this.nextTokenStart();return this.isUnparsedContextual(s,o)},n.eatContextual=function(o){return this.isContextual(o)?(this.next(),!0):!1},n.expectContextual=function(o,s){if(!this.eatContextual(o)){if(s!=null)throw this.raise(s,this.state.startLoc);this.unexpected(null,o)}},n.canInsertSemicolon=function(){return this.match(139)||this.match(8)||this.hasPrecedingLineBreak()},n.hasPrecedingLineBreak=function(){return NX.test(this.input.slice(this.state.lastTokEndLoc.index,this.state.start))},n.hasFollowingLineBreak=function(){return LX.lastIndex=this.state.end,LX.test(this.input)},n.isLineTerminator=function(){return this.eat(13)||this.canInsertSemicolon()},n.semicolon=function(o){o===void 0&&(o=!0),!(o?this.isLineTerminator():this.eat(13))&&this.raise(ft.MissingSemicolon,this.state.lastTokEndLoc)},n.expect=function(o,s){this.eat(o)||this.unexpected(s,o)},n.tryParse=function(o,s){s===void 0&&(s=this.state.clone());var A={node:null};try{var d=o(function(x){throw x===void 0&&(x=null),A.node=x,A});if(this.state.errors.length>s.errors.length){var c=this.state;return this.state=s,this.state.tokensLength=c.tokensLength,{node:d,error:c.errors[s.errors.length],thrown:!1,aborted:!1,failState:c}}return{node:d,error:null,thrown:!1,aborted:!1,failState:null}}catch(x){var f=this.state;if(this.state=s,x instanceof SyntaxError)return{node:null,error:x,thrown:!0,aborted:!1,failState:f};if(x===A)return{node:A.node,error:null,thrown:!1,aborted:!0,failState:f};throw x}},n.checkExpressionErrors=function(o,s){if(!o)return!1;var A=o.shorthandAssignLoc,d=o.doubleProtoLoc,c=o.privateKeyLoc,f=o.optionalParametersLoc,x=!!A||!!d||!!f||!!c;if(!s)return x;A!=null&&this.raise(ft.InvalidCoverInitializedName,A),d!=null&&this.raise(ft.DuplicateProto,d),c!=null&&this.raise(ft.UnexpectedPrivateField,c),f!=null&&this.unexpected(f)},n.isLiteralPropertyName=function(){return IX(this.state.type)},n.isPrivateName=function(o){return o.type==="PrivateName"},n.getPrivateNameSV=function(o){return o.id.name},n.hasPropertyAsPrivateName=function(o){return(o.type==="MemberExpression"||o.type==="OptionalMemberExpression")&&this.isPrivateName(o.property)},n.isObjectProperty=function(o){return o.type==="ObjectProperty"},n.isObjectMethod=function(o){return o.type==="ObjectMethod"},n.initializeScopes=function(o){var s=this;o===void 0&&(o=this.options.sourceType==="module");var A=this.state.labels;this.state.labels=[];var d=this.exportedIdentifiers;this.exportedIdentifiers=new Set;var c=this.inModule;this.inModule=o;var f=this.scope,x=this.getScopeHandler();this.scope=new x(this,o);var g=this.prodParam;this.prodParam=new M7e;var m=this.classScope;this.classScope=new I7e(this);var B=this.expressionScope;return this.expressionScope=new O7e(this),function(){s.state.labels=A,s.exportedIdentifiers=d,s.inModule=c,s.scope=f,s.prodParam=g,s.classScope=m,s.expressionScope=B}},n.enterInitialScopes=function(){var o=So.PARAM;this.inModule&&(o|=So.PARAM_AWAIT),this.scope.enter(fn.PROGRAM),this.prodParam.enter(o)},n.checkDestructuringPrivate=function(o){var s=o.privateKeyLoc;s!==null&&this.expectPlugin("destructuringPrivate",s)},T(t)}(w7e),y8=T(function(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}),E8=T(function(t,n,i){this.type="",this.start=n,this.end=0,this.loc=new f8(i),t!=null&&t.options.ranges&&(this.range=[n,0]),t!=null&&t.filename&&(this.loc.filename=t.filename)}),ST=E8.prototype;ST.__clone=function(){for(var e=new E8(void 0,this.start,this.loc.start),t=Object.keys(this),n=0,i=t.length;n<i;n++){var o=t[n];o!=="leadingComments"&&o!=="trailingComments"&&o!=="innerComments"&&(e[o]=this[o])}return e};function G7e(e){return $f(e)}function $f(e){var t=e.type,n=e.start,i=e.end,o=e.loc,s=e.range,A=e.extra,d=e.name,c=Object.create(ST);return c.type=t,c.start=n,c.end=i,c.loc=o,c.range=s,c.extra=A,c.name=d,t==="Placeholder"&&(c.expectedNode=e.expectedNode),c}function q7e(e){var t=e.type,n=e.start,i=e.end,o=e.loc,s=e.range,A=e.extra;if(t==="Placeholder")return G7e(e);var d=Object.create(ST);return d.type=t,d.start=n,d.end=i,d.loc=o,d.range=s,e.raw!==void 0?d.raw=e.raw:d.extra=A,d.value=e.value,d}var H7e=function(e){function t(){return e.apply(this,arguments)||this}ue(t,e);var n=t.prototype;return n.startNode=function(){var o=this.state.startLoc;return new E8(this,o.index,o)},n.startNodeAt=function(o){return new E8(this,o.index,o)},n.startNodeAtNode=function(o){return this.startNodeAt(o.loc.start)},n.finishNode=function(o,s){return this.finishNodeAt(o,s,this.state.lastTokEndLoc)},n.finishNodeAt=function(o,s,A){return o.type=s,o.end=A.index,o.loc.end=A,this.options.ranges&&(o.range[1]=A.index),this.options.attachComment&&this.processComment(o),o},n.resetStartLocation=function(o,s){o.start=s.index,o.loc.start=s,this.options.ranges&&(o.range[0]=s.index)},n.resetEndLocation=function(o,s){s===void 0&&(s=this.state.lastTokEndLoc),o.end=s.index,o.loc.end=s,this.options.ranges&&(o.range[1]=s.index)},n.resetStartLocationFromNode=function(o,s){this.resetStartLocation(o,s.loc.start)},T(t)}(U7e),GX,V7e=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),Xa=Pf(GX||(GX=H(["flow"])))({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:function(t){var n=t.reservedType;return"Cannot overwrite reserved type "+n+"."},DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:function(t){var n=t.memberName,i=t.enumName;return"Boolean enum members need to be initialized. Use either `"+n+" = true,` or `"+n+" = false,` in enum `"+i+"`."},EnumDuplicateMemberName:function(t){var n=t.memberName,i=t.enumName;return"Enum member names need to be unique, but the name `"+n+"` has already been used before in enum `"+i+"`."},EnumInconsistentMemberValues:function(t){var n=t.enumName;return"Enum `"+n+"` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers."},EnumInvalidExplicitType:function(t){var n=t.invalidEnumType,i=t.enumName;return"Enum type `"+n+"` is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `"+i+"`."},EnumInvalidExplicitTypeUnknownSupplied:function(t){var n=t.enumName;return"Supplied enum type is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `"+n+"`."},EnumInvalidMemberInitializerPrimaryType:function(t){var n=t.enumName,i=t.memberName,o=t.explicitType;return"Enum `"+n+"` has type `"+o+"`, so the initializer of `"+i+"` needs to be a "+o+" literal."},EnumInvalidMemberInitializerSymbolType:function(t){var n=t.enumName,i=t.memberName;return"Symbol enum members cannot be initialized. Use `"+i+",` in enum `"+n+"`."},EnumInvalidMemberInitializerUnknownType:function(t){var n=t.enumName,i=t.memberName;return"The enum member initializer for `"+i+"` needs to be a literal (either a boolean, number, or string) in enum `"+n+"`."},EnumInvalidMemberName:function(t){var n=t.enumName,i=t.memberName,o=t.suggestion;return"Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `"+i+"`, consider using `"+o+"`, in enum `"+n+"`."},EnumNumberMemberNotInitialized:function(t){var n=t.enumName,i=t.memberName;return"Number enum members need to be initialized, e.g. `"+i+" = 1` in enum `"+n+"`."},EnumStringMemberInconsistentlyInitialized:function(t){var n=t.enumName;return"String enum members need to consistently either all use initializers, or use no initializers, in enum `"+n+"`."},GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:function(t){var n=t.reservedType;return"Unexpected reserved type "+n+"."},UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:function(t){var n=t.unsupportedExportKind,i=t.suggestion;return"`declare export "+n+"` is not supported. Use `"+i+"` instead."},UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function K7e(e){return e.type==="DeclareExportAllDeclaration"||e.type==="DeclareExportDeclaration"&&(!e.declaration||e.declaration.type!=="TypeAlias"&&e.declaration.type!=="InterfaceDeclaration")}function qX(e){return e.importKind==="type"||e.importKind==="typeof"}var W7e={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function z7e(e,t){for(var n=[],i=[],o=0;o<e.length;o++)(t(e[o],o,e)?n:i).push(e[o]);return[n,i]}var X7e=/\*?\s*@((?:no)?flow)\b/,Y7e=function(e){return function(t){function n(){for(var o,s=arguments.length,A=new Array(s),d=0;d<s;d++)A[d]=arguments[d];return o=t.call.apply(t,[this].concat(A))||this,o.flowPragma=void 0,o}ue(n,t);var i=n.prototype;return i.getScopeHandler=function(){return b7e},i.shouldParseTypes=function(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"},i.shouldParseEnums=function(){return!!this.getPluginOption("flow","enums")},i.finishToken=function(s,A){s!==133&&s!==13&&s!==28&&this.flowPragma===void 0&&(this.flowPragma=null),t.prototype.finishToken.call(this,s,A)},i.addComment=function(s){if(this.flowPragma===void 0){var A=X7e.exec(s.value);if(A)if(A[1]==="flow")this.flowPragma="flow";else if(A[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}t.prototype.addComment.call(this,s)},i.flowParseTypeInitialiser=function(s){var A=this.state.inType;this.state.inType=!0,this.expect(s||14);var d=this.flowParseType();return this.state.inType=A,d},i.flowParsePredicate=function(){var s=this.startNode(),A=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>A.index+1&&this.raise(Xa.UnexpectedSpaceBetweenModuloChecks,A),this.eat(10)?(s.value=t.prototype.parseExpression.call(this),this.expect(11),this.finishNode(s,"DeclaredPredicate")):this.finishNode(s,"InferredPredicate")},i.flowParseTypeAndPredicateInitialiser=function(){var s=this.state.inType;this.state.inType=!0,this.expect(14);var A=null,d=null;return this.match(54)?(this.state.inType=s,d=this.flowParsePredicate()):(A=this.flowParseType(),this.state.inType=s,this.match(54)&&(d=this.flowParsePredicate())),[A,d]},i.flowParseDeclareClass=function(s){return this.next(),this.flowParseInterfaceish(s,!0),this.finishNode(s,"DeclareClass")},i.flowParseDeclareFunction=function(s){this.next();var A=s.id=this.parseIdentifier(),d=this.startNode(),c=this.startNode();this.match(47)?d.typeParameters=this.flowParseTypeParameterDeclaration():d.typeParameters=null,this.expect(10);var f=this.flowParseFunctionTypeParams();d.params=f.params,d.rest=f.rest,d.this=f._this,this.expect(11);var x=this.flowParseTypeAndPredicateInitialiser();return d.returnType=x[0],s.predicate=x[1],c.typeAnnotation=this.finishNode(d,"FunctionTypeAnnotation"),A.typeAnnotation=this.finishNode(c,"TypeAnnotation"),this.resetEndLocation(A),this.semicolon(),this.scope.declareName(s.id.name,wa.TYPE_FLOW_DECLARE_FN,s.id.loc.start),this.finishNode(s,"DeclareFunction")},i.flowParseDeclare=function(s,A){if(this.match(80))return this.flowParseDeclareClass(s);if(this.match(68))return this.flowParseDeclareFunction(s);if(this.match(74))return this.flowParseDeclareVariable(s);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(s):(A&&this.raise(Xa.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(s));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(s);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(s);if(this.isContextual(129))return this.flowParseDeclareInterface(s);if(this.match(82))return this.flowParseDeclareExportDeclaration(s,A);this.unexpected()},i.flowParseDeclareVariable=function(s){return this.next(),s.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(s.id.name,wa.TYPE_VAR,s.id.loc.start),this.semicolon(),this.finishNode(s,"DeclareVariable")},i.flowParseDeclareModule=function(s){var A=this;this.scope.enter(fn.OTHER),this.match(133)?s.id=t.prototype.parseExprAtom.call(this):s.id=this.parseIdentifier();var d=s.body=this.startNode(),c=d.body=[];for(this.expect(5);!this.match(8);){var f=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(Xa.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),t.prototype.parseImport.call(this,f)):(this.expectContextual(125,Xa.UnsupportedStatementInDeclareModule),f=this.flowParseDeclare(f,!0)),c.push(f)}this.scope.exit(),this.expect(8),this.finishNode(d,"BlockStatement");var x=null,g=!1;return c.forEach(function(m){K7e(m)?(x==="CommonJS"&&A.raise(Xa.AmbiguousDeclareModuleKind,m),x="ES"):m.type==="DeclareModuleExports"&&(g&&A.raise(Xa.DuplicateDeclareModuleExports,m),x==="ES"&&A.raise(Xa.AmbiguousDeclareModuleKind,m),x="CommonJS",g=!0)}),s.kind=x||"CommonJS",this.finishNode(s,"DeclareModule")},i.flowParseDeclareExportDeclaration=function(s,A){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?s.declaration=this.flowParseDeclare(this.startNode()):(s.declaration=this.flowParseType(),this.semicolon()),s.default=!0,this.finishNode(s,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!A){var d=this.state.value;throw this.raise(Xa.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:d,suggestion:W7e[d]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return s.declaration=this.flowParseDeclare(this.startNode()),s.default=!1,this.finishNode(s,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return s=this.parseExport(s,null),s.type==="ExportNamedDeclaration"&&(s.type="ExportDeclaration",s.default=!1,delete s.exportKind),s.type="Declare"+s.type,s;this.unexpected()},i.flowParseDeclareModuleExports=function(s){return this.next(),this.expectContextual(111),s.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(s,"DeclareModuleExports")},i.flowParseDeclareTypeAlias=function(s){this.next();var A=this.flowParseTypeAlias(s);return A.type="DeclareTypeAlias",A},i.flowParseDeclareOpaqueType=function(s){this.next();var A=this.flowParseOpaqueType(s,!0);return A.type="DeclareOpaqueType",A},i.flowParseDeclareInterface=function(s){return this.next(),this.flowParseInterfaceish(s,!1),this.finishNode(s,"DeclareInterface")},i.flowParseInterfaceish=function(s,A){if(s.id=this.flowParseRestrictedIdentifier(!A,!0),this.scope.declareName(s.id.name,A?wa.TYPE_FUNCTION:wa.TYPE_LEXICAL,s.id.loc.start),this.match(47)?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,s.extends=[],this.eat(81))do s.extends.push(this.flowParseInterfaceExtends());while(!A&&this.eat(12));if(A){if(s.implements=[],s.mixins=[],this.eatContextual(117))do s.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do s.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}s.body=this.flowParseObjectType({allowStatic:A,allowExact:!1,allowSpread:!1,allowProto:A,allowInexact:!1})},i.flowParseInterfaceExtends=function(){var s=this.startNode();return s.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?s.typeParameters=this.flowParseTypeParameterInstantiation():s.typeParameters=null,this.finishNode(s,"InterfaceExtends")},i.flowParseInterface=function(s){return this.flowParseInterfaceish(s,!1),this.finishNode(s,"InterfaceDeclaration")},i.checkNotUnderscore=function(s){s==="_"&&this.raise(Xa.UnexpectedReservedUnderscore,this.state.startLoc)},i.checkReservedType=function(s,A,d){V7e.has(s)&&this.raise(d?Xa.AssignReservedType:Xa.UnexpectedReservedType,A,{reservedType:s})},i.flowParseRestrictedIdentifier=function(s,A){return this.checkReservedType(this.state.value,this.state.startLoc,A),this.parseIdentifier(s)},i.flowParseTypeAlias=function(s){return s.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(s.id.name,wa.TYPE_LEXICAL,s.id.loc.start),this.match(47)?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,s.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(s,"TypeAlias")},i.flowParseOpaqueType=function(s,A){return this.expectContextual(130),s.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(s.id.name,wa.TYPE_LEXICAL,s.id.loc.start),this.match(47)?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,s.supertype=null,this.match(14)&&(s.supertype=this.flowParseTypeInitialiser(14)),s.impltype=null,A||(s.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(s,"OpaqueType")},i.flowParseTypeParameter=function(s){s===void 0&&(s=!1);var A=this.state.startLoc,d=this.startNode(),c=this.flowParseVariance(),f=this.flowParseTypeAnnotatableIdentifier();return d.name=f.name,d.variance=c,d.bound=f.typeAnnotation,this.match(29)?(this.eat(29),d.default=this.flowParseType()):s&&this.raise(Xa.MissingTypeParamDefault,A),this.finishNode(d,"TypeParameter")},i.flowParseTypeParameterDeclaration=function(){var s=this.state.inType,A=this.startNode();A.params=[],this.state.inType=!0,this.match(47)||this.match(142)?this.next():this.unexpected();var d=!1;do{var c=this.flowParseTypeParameter(d);A.params.push(c),c.default&&(d=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=s,this.finishNode(A,"TypeParameterDeclaration")},i.flowParseTypeParameterInstantiation=function(){var s=this.startNode(),A=this.state.inType;s.params=[],this.state.inType=!0,this.expect(47);var d=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)s.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=d,this.expect(48),this.state.inType=A,this.finishNode(s,"TypeParameterInstantiation")},i.flowParseTypeParameterInstantiationCallOrNew=function(){var s=this.startNode(),A=this.state.inType;for(s.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)s.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=A,this.finishNode(s,"TypeParameterInstantiation")},i.flowParseInterfaceType=function(){var s=this.startNode();if(this.expectContextual(129),s.extends=[],this.eat(81))do s.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return s.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(s,"InterfaceTypeAnnotation")},i.flowParseObjectPropertyKey=function(){return this.match(134)||this.match(133)?t.prototype.parseExprAtom.call(this):this.parseIdentifier(!0)},i.flowParseObjectTypeIndexer=function(s,A,d){return s.static=A,this.lookahead().type===14?(s.id=this.flowParseObjectPropertyKey(),s.key=this.flowParseTypeInitialiser()):(s.id=null,s.key=this.flowParseType()),this.expect(3),s.value=this.flowParseTypeInitialiser(),s.variance=d,this.finishNode(s,"ObjectTypeIndexer")},i.flowParseObjectTypeInternalSlot=function(s,A){return s.static=A,s.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(s.method=!0,s.optional=!1,s.value=this.flowParseObjectTypeMethodish(this.startNodeAt(s.loc.start))):(s.method=!1,this.eat(17)&&(s.optional=!0),s.value=this.flowParseTypeInitialiser()),this.finishNode(s,"ObjectTypeInternalSlot")},i.flowParseObjectTypeMethodish=function(s){for(s.params=[],s.rest=null,s.typeParameters=null,s.this=null,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(s.this=this.flowParseFunctionTypeParam(!0),s.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)s.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(s.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),s.returnType=this.flowParseTypeInitialiser(),this.finishNode(s,"FunctionTypeAnnotation")},i.flowParseObjectTypeCallProperty=function(s,A){var d=this.startNode();return s.static=A,s.value=this.flowParseObjectTypeMethodish(d),this.finishNode(s,"ObjectTypeCallProperty")},i.flowParseObjectType=function(s){var A=s.allowStatic,d=s.allowExact,c=s.allowSpread,f=s.allowProto,x=s.allowInexact,g=this.state.inType;this.state.inType=!0;var m=this.startNode();m.callProperties=[],m.properties=[],m.indexers=[],m.internalSlots=[];var B,b,_=!1;for(d&&this.match(6)?(this.expect(6),B=9,b=!0):(this.expect(5),B=8,b=!1),m.exact=b;!this.match(B);){var C=!1,w=null,P=null,M=this.startNode();if(f&&this.isContextual(118)){var N=this.lookahead();N.type!==14&&N.type!==17&&(this.next(),w=this.state.startLoc,A=!1)}if(A&&this.isContextual(106)){var q=this.lookahead();q.type!==14&&q.type!==17&&(this.next(),C=!0)}var V=this.flowParseVariance();if(this.eat(0))w!=null&&this.unexpected(w),this.eat(0)?(V&&this.unexpected(V.loc.start),m.internalSlots.push(this.flowParseObjectTypeInternalSlot(M,C))):m.indexers.push(this.flowParseObjectTypeIndexer(M,C,V));else if(this.match(10)||this.match(47))w!=null&&this.unexpected(w),V&&this.unexpected(V.loc.start),m.callProperties.push(this.flowParseObjectTypeCallProperty(M,C));else{var U="init";if(this.isContextual(99)||this.isContextual(104)){var te=this.lookahead();IX(te.type)&&(U=this.state.value,this.next())}var ae=this.flowParseObjectTypeProperty(M,C,w,V,U,c,x??!b);ae===null?(_=!0,P=this.state.lastTokStartLoc):m.properties.push(ae)}this.flowObjectTypeSemicolon(),P&&!this.match(8)&&!this.match(9)&&this.raise(Xa.UnexpectedExplicitInexactInObject,P)}this.expect(B),c&&(m.inexact=_);var se=this.finishNode(m,"ObjectTypeAnnotation");return this.state.inType=g,se},i.flowParseObjectTypeProperty=function(s,A,d,c,f,x,g){if(this.eat(21)){var m=this.match(12)||this.match(13)||this.match(8)||this.match(9);return m?(x?g||this.raise(Xa.InexactInsideExact,this.state.lastTokStartLoc):this.raise(Xa.InexactInsideNonObject,this.state.lastTokStartLoc),c&&this.raise(Xa.InexactVariance,c),null):(x||this.raise(Xa.UnexpectedSpreadType,this.state.lastTokStartLoc),d!=null&&this.unexpected(d),c&&this.raise(Xa.SpreadVariance,c),s.argument=this.flowParseType(),this.finishNode(s,"ObjectTypeSpreadProperty"))}else{s.key=this.flowParseObjectPropertyKey(),s.static=A,s.proto=d!=null,s.kind=f;var B=!1;return this.match(47)||this.match(10)?(s.method=!0,d!=null&&this.unexpected(d),c&&this.unexpected(c.loc.start),s.value=this.flowParseObjectTypeMethodish(this.startNodeAt(s.loc.start)),(f==="get"||f==="set")&&this.flowCheckGetterSetterParams(s),!x&&s.key.name==="constructor"&&s.value.this&&this.raise(Xa.ThisParamBannedInConstructor,s.value.this)):(f!=="init"&&this.unexpected(),s.method=!1,this.eat(17)&&(B=!0),s.value=this.flowParseTypeInitialiser(),s.variance=c),s.optional=B,this.finishNode(s,"ObjectTypeProperty")}},i.flowCheckGetterSetterParams=function(s){var A=s.kind==="get"?0:1,d=s.value.params.length+(s.value.rest?1:0);s.value.this&&this.raise(s.kind==="get"?Xa.GetterMayNotHaveThisParam:Xa.SetterMayNotHaveThisParam,s.value.this),d!==A&&this.raise(s.kind==="get"?ft.BadGetterArity:ft.BadSetterArity,s),s.kind==="set"&&s.value.rest&&this.raise(ft.BadSetterRestParameter,s)},i.flowObjectTypeSemicolon=function(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()},i.flowParseQualifiedTypeIdentifier=function(s,A){var d;(d=s)!=null||(s=this.state.startLoc);for(var c=A||this.flowParseRestrictedIdentifier(!0);this.eat(16);){var f=this.startNodeAt(s);f.qualification=c,f.id=this.flowParseRestrictedIdentifier(!0),c=this.finishNode(f,"QualifiedTypeIdentifier")}return c},i.flowParseGenericType=function(s,A){var d=this.startNodeAt(s);return d.typeParameters=null,d.id=this.flowParseQualifiedTypeIdentifier(s,A),this.match(47)&&(d.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(d,"GenericTypeAnnotation")},i.flowParseTypeofType=function(){var s=this.startNode();return this.expect(87),s.argument=this.flowParsePrimaryType(),this.finishNode(s,"TypeofTypeAnnotation")},i.flowParseTupleType=function(){var s=this.startNode();for(s.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(s.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(s,"TupleTypeAnnotation")},i.flowParseFunctionTypeParam=function(s){var A=null,d=!1,c=null,f=this.startNode(),x=this.lookahead(),g=this.state.type===78;return x.type===14||x.type===17?(g&&!s&&this.raise(Xa.ThisParamMustBeFirst,f),A=this.parseIdentifier(g),this.eat(17)&&(d=!0,g&&this.raise(Xa.ThisParamMayNotBeOptional,f)),c=this.flowParseTypeInitialiser()):c=this.flowParseType(),f.name=A,f.optional=d,f.typeAnnotation=c,this.finishNode(f,"FunctionTypeParam")},i.reinterpretTypeAsFunctionTypeParam=function(s){var A=this.startNodeAt(s.loc.start);return A.name=null,A.optional=!1,A.typeAnnotation=s,this.finishNode(A,"FunctionTypeParam")},i.flowParseFunctionTypeParams=function(s){s===void 0&&(s=[]);var A=null,d=null;for(this.match(78)&&(d=this.flowParseFunctionTypeParam(!0),d.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)s.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(A=this.flowParseFunctionTypeParam(!1)),{params:s,rest:A,_this:d}},i.flowIdentToTypeAnnotation=function(s,A,d){switch(d.name){case"any":return this.finishNode(A,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(A,"BooleanTypeAnnotation");case"mixed":return this.finishNode(A,"MixedTypeAnnotation");case"empty":return this.finishNode(A,"EmptyTypeAnnotation");case"number":return this.finishNode(A,"NumberTypeAnnotation");case"string":return this.finishNode(A,"StringTypeAnnotation");case"symbol":return this.finishNode(A,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(d.name),this.flowParseGenericType(s,d)}},i.flowParsePrimaryType=function(){var s=this.state.startLoc,A=this.startNode(),d,c,f=!1,x=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,c=this.flowParseTupleType(),this.state.noAnonFunctionType=x,c;case 47:{var g=this.startNode();return g.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),d=this.flowParseFunctionTypeParams(),g.params=d.params,g.rest=d.rest,g.this=d._this,this.expect(11),this.expect(19),g.returnType=this.flowParseType(),this.finishNode(g,"FunctionTypeAnnotation")}case 10:{var m=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(Ls(this.state.type)||this.match(78)){var B=this.lookahead().type;f=B!==17&&B!==14}else f=!0;if(f){if(this.state.noAnonFunctionType=!1,c=this.flowParseType(),this.state.noAnonFunctionType=x,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),c;this.eat(12)}return c?d=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(c)]):d=this.flowParseFunctionTypeParams(),m.params=d.params,m.rest=d.rest,m.this=d._this,this.expect(11),this.expect(19),m.returnType=this.flowParseType(),m.typeParameters=null,this.finishNode(m,"FunctionTypeAnnotation")}case 133:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return A.value=this.match(85),this.next(),this.finishNode(A,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(134))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",A);if(this.match(135))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",A);throw this.raise(Xa.UnexpectedSubtractionOperand,this.state.startLoc)}this.unexpected();return;case 134:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 135:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(A,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(A,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(A,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(A,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(CT(this.state.type)){var b=hx(this.state.type);return this.next(),t.prototype.createIdentifier.call(this,A,b)}else if(Ls(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(s,A,this.parseIdentifier())}this.unexpected()},i.flowParsePostfixType=function(){for(var s=this.state.startLoc,A=this.flowParsePrimaryType(),d=!1;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){var c=this.startNodeAt(s),f=this.eat(18);d=d||f,this.expect(0),!f&&this.match(3)?(c.elementType=A,this.next(),A=this.finishNode(c,"ArrayTypeAnnotation")):(c.objectType=A,c.indexType=this.flowParseType(),this.expect(3),d?(c.optional=f,A=this.finishNode(c,"OptionalIndexedAccessType")):A=this.finishNode(c,"IndexedAccessType"))}return A},i.flowParsePrefixType=function(){var s=this.startNode();return this.eat(17)?(s.typeAnnotation=this.flowParsePrefixType(),this.finishNode(s,"NullableTypeAnnotation")):this.flowParsePostfixType()},i.flowParseAnonFunctionWithoutParens=function(){var s=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){var A=this.startNodeAt(s.loc.start);return A.params=[this.reinterpretTypeAsFunctionTypeParam(s)],A.rest=null,A.this=null,A.returnType=this.flowParseType(),A.typeParameters=null,this.finishNode(A,"FunctionTypeAnnotation")}return s},i.flowParseIntersectionType=function(){var s=this.startNode();this.eat(45);var A=this.flowParseAnonFunctionWithoutParens();for(s.types=[A];this.eat(45);)s.types.push(this.flowParseAnonFunctionWithoutParens());return s.types.length===1?A:this.finishNode(s,"IntersectionTypeAnnotation")},i.flowParseUnionType=function(){var s=this.startNode();this.eat(43);var A=this.flowParseIntersectionType();for(s.types=[A];this.eat(43);)s.types.push(this.flowParseIntersectionType());return s.types.length===1?A:this.finishNode(s,"UnionTypeAnnotation")},i.flowParseType=function(){var s=this.state.inType;this.state.inType=!0;var A=this.flowParseUnionType();return this.state.inType=s,A},i.flowParseTypeOrImplicitInstantiation=function(){if(this.state.type===132&&this.state.value==="_"){var s=this.state.startLoc,A=this.parseIdentifier();return this.flowParseGenericType(s,A)}else return this.flowParseType()},i.flowParseTypeAnnotation=function(){var s=this.startNode();return s.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(s,"TypeAnnotation")},i.flowParseTypeAnnotatableIdentifier=function(s){var A=s?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(A.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(A)),A},i.typeCastToParameter=function(s){return s.expression.typeAnnotation=s.typeAnnotation,this.resetEndLocation(s.expression,s.typeAnnotation.loc.end),s.expression},i.flowParseVariance=function(){var s=null;return this.match(53)?(s=this.startNode(),this.state.value==="+"?s.kind="plus":s.kind="minus",this.next(),this.finishNode(s,"Variance")):s},i.parseFunctionBody=function(s,A,d){var c=this;if(d===void 0&&(d=!1),A){this.forwardNoArrowParamsConversionAt(s,function(){return t.prototype.parseFunctionBody.call(c,s,!0,d)});return}t.prototype.parseFunctionBody.call(this,s,!1,d)},i.parseFunctionBodyAndFinish=function(s,A,d){if(d===void 0&&(d=!1),this.match(14)){var c=this.startNode(),f=this.flowParseTypeAndPredicateInitialiser();c.typeAnnotation=f[0],s.predicate=f[1],s.returnType=c.typeAnnotation?this.finishNode(c,"TypeAnnotation"):null}return t.prototype.parseFunctionBodyAndFinish.call(this,s,A,d)},i.parseStatementLike=function(s){if(this.state.strict&&this.isContextual(129)){var A=this.lookahead();if(mc(A.type)){var d=this.startNode();return this.next(),this.flowParseInterface(d)}}else if(this.shouldParseEnums()&&this.isContextual(126)){var c=this.startNode();return this.next(),this.flowParseEnumDeclaration(c)}var f=t.prototype.parseStatementLike.call(this,s);return this.flowPragma===void 0&&!this.isValidDirective(f)&&(this.flowPragma=null),f},i.parseExpressionStatement=function(s,A,d){if(A.type==="Identifier"){if(A.name==="declare"){if(this.match(80)||Ls(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(s)}else if(Ls(this.state.type)){if(A.name==="interface")return this.flowParseInterface(s);if(A.name==="type")return this.flowParseTypeAlias(s);if(A.name==="opaque")return this.flowParseOpaqueType(s,!1)}}return t.prototype.parseExpressionStatement.call(this,s,A,d)},i.shouldParseExportDeclaration=function(){var s=this.state.type;return OX(s)||this.shouldParseEnums()&&s===126?!this.state.containsEsc:t.prototype.shouldParseExportDeclaration.call(this)},i.isExportDefaultSpecifier=function(){var s=this.state.type;return OX(s)||this.shouldParseEnums()&&s===126?this.state.containsEsc:t.prototype.isExportDefaultSpecifier.call(this)},i.parseExportDefaultExpression=function(){if(this.shouldParseEnums()&&this.isContextual(126)){var s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}return t.prototype.parseExportDefaultExpression.call(this)},i.parseConditional=function(s,A,d){var c=this;if(!this.match(17))return s;if(this.state.maybeInArrowParameters){var f=this.lookaheadCharCode();if(f===44||f===61||f===58||f===41)return this.setOptionalParametersError(d),s}this.expect(17);var x=this.state.clone(),g=this.state.noArrowAt,m=this.startNodeAt(A),B=this.tryParseConditionalConsequent(),b=B.consequent,_=B.failed,C=this.getArrowLikeExpressions(b),w=C[0],P=C[1];if(_||P.length>0){var M=[].concat(g);if(P.length>0){this.state=x,this.state.noArrowAt=M;for(var N=0;N<P.length;N++)M.push(P[N].start);var q=this.tryParseConditionalConsequent();b=q.consequent,_=q.failed;var V=this.getArrowLikeExpressions(b);w=V[0],P=V[1]}if(_&&w.length>1&&this.raise(Xa.AmbiguousConditionalArrow,x.startLoc),_&&w.length===1){this.state=x,M.push(w[0].start),this.state.noArrowAt=M;var U=this.tryParseConditionalConsequent();b=U.consequent,_=U.failed}}return this.getArrowLikeExpressions(b,!0),this.state.noArrowAt=g,this.expect(14),m.test=s,m.consequent=b,m.alternate=this.forwardNoArrowParamsConversionAt(m,function(){return c.parseMaybeAssign(void 0,void 0)}),this.finishNode(m,"ConditionalExpression")},i.tryParseConditionalConsequent=function(){this.state.noArrowParamsConversionAt.push(this.state.start);var s=this.parseMaybeAssignAllowIn(),A=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:s,failed:A}},i.getArrowLikeExpressions=function(s,A){for(var d=this,c=[s],f=[];c.length!==0;){var x=c.pop();x.type==="ArrowFunctionExpression"&&x.body.type!=="BlockStatement"?(x.typeParameters||!x.returnType?this.finishArrowValidation(x):f.push(x),c.push(x.body)):x.type==="ConditionalExpression"&&(c.push(x.consequent),c.push(x.alternate))}return A?(f.forEach(function(g){return d.finishArrowValidation(g)}),[f,[]]):z7e(f,function(g){return g.params.every(function(m){return d.isAssignable(m,!0)})})},i.finishArrowValidation=function(s){var A;this.toAssignableList(s.params,(A=s.extra)==null?void 0:A.trailingCommaLoc,!1),this.scope.enter(fn.FUNCTION|fn.ARROW),t.prototype.checkParams.call(this,s,!1,!0),this.scope.exit()},i.forwardNoArrowParamsConversionAt=function(s,A){var d;return this.state.noArrowParamsConversionAt.includes(s.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),d=A(),this.state.noArrowParamsConversionAt.pop()):d=A(),d},i.parseParenItem=function(s,A){var d=t.prototype.parseParenItem.call(this,s,A);if(this.eat(17)&&(d.optional=!0,this.resetEndLocation(s)),this.match(14)){var c=this.startNodeAt(A);return c.expression=d,c.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(c,"TypeCastExpression")}return d},i.assertModuleNodeAllowed=function(s){s.type==="ImportDeclaration"&&(s.importKind==="type"||s.importKind==="typeof")||s.type==="ExportNamedDeclaration"&&s.exportKind==="type"||s.type==="ExportAllDeclaration"&&s.exportKind==="type"||t.prototype.assertModuleNodeAllowed.call(this,s)},i.parseExportDeclaration=function(s){if(this.isContextual(130)){s.exportKind="type";var A=this.startNode();return this.next(),this.match(5)?(s.specifiers=this.parseExportSpecifiers(!0),t.prototype.parseExportFrom.call(this,s),null):this.flowParseTypeAlias(A)}else if(this.isContextual(131)){s.exportKind="type";var d=this.startNode();return this.next(),this.flowParseOpaqueType(d,!1)}else if(this.isContextual(129)){s.exportKind="type";var c=this.startNode();return this.next(),this.flowParseInterface(c)}else if(this.shouldParseEnums()&&this.isContextual(126)){s.exportKind="value";var f=this.startNode();return this.next(),this.flowParseEnumDeclaration(f)}else return t.prototype.parseExportDeclaration.call(this,s)},i.eatExportStar=function(s){return t.prototype.eatExportStar.call(this,s)?!0:this.isContextual(130)&&this.lookahead().type===55?(s.exportKind="type",this.next(),this.next(),!0):!1},i.maybeParseExportNamespaceSpecifier=function(s){var A=this.state.startLoc,d=t.prototype.maybeParseExportNamespaceSpecifier.call(this,s);return d&&s.exportKind==="type"&&this.unexpected(A),d},i.parseClassId=function(s,A,d){t.prototype.parseClassId.call(this,s,A,d),this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration())},i.parseClassMember=function(s,A,d){var c=this.state.startLoc;if(this.isContextual(125)){if(t.prototype.parseClassMemberFromModifier.call(this,s,A))return;A.declare=!0}t.prototype.parseClassMember.call(this,s,A,d),A.declare&&(A.type!=="ClassProperty"&&A.type!=="ClassPrivateProperty"&&A.type!=="PropertyDefinition"?this.raise(Xa.DeclareClassElement,c):A.value&&this.raise(Xa.DeclareClassFieldInitializer,A.value))},i.isIterator=function(s){return s==="iterator"||s==="asyncIterator"},i.readIterator=function(){var s=t.prototype.readWord1.call(this),A="@@"+s;(!this.isIterator(s)||!this.state.inType)&&this.raise(ft.InvalidIdentifier,this.state.curPosition(),{identifierName:A}),this.finishToken(132,A)},i.getTokenFromCode=function(s){var A=this.input.charCodeAt(this.state.pos+1);s===123&&A===124?this.finishOp(6,2):this.state.inType&&(s===62||s===60)?this.finishOp(s===62?48:47,1):this.state.inType&&s===63?A===46?this.finishOp(18,2):this.finishOp(17,1):E7e(s,A,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):t.prototype.getTokenFromCode.call(this,s)},i.isAssignable=function(s,A){return s.type==="TypeCastExpression"?this.isAssignable(s.expression,A):t.prototype.isAssignable.call(this,s,A)},i.toAssignable=function(s,A){A===void 0&&(A=!1),!A&&s.type==="AssignmentExpression"&&s.left.type==="TypeCastExpression"&&(s.left=this.typeCastToParameter(s.left)),t.prototype.toAssignable.call(this,s,A)},i.toAssignableList=function(s,A,d){for(var c=0;c<s.length;c++){var f=s[c];f?.type==="TypeCastExpression"&&(s[c]=this.typeCastToParameter(f))}t.prototype.toAssignableList.call(this,s,A,d)},i.toReferencedList=function(s,A){for(var d=0;d<s.length;d++){var c,f=s[d];f&&f.type==="TypeCastExpression"&&!((c=f.extra)!=null&&c.parenthesized)&&(s.length>1||!A)&&this.raise(Xa.TypeCastInPattern,f.typeAnnotation)}return s},i.parseArrayLike=function(s,A,d,c){var f=t.prototype.parseArrayLike.call(this,s,A,d,c);return A&&!this.state.maybeInArrowParameters&&this.toReferencedList(f.elements),f},i.isValidLVal=function(s,A,d){return s==="TypeCastExpression"||t.prototype.isValidLVal.call(this,s,A,d)},i.parseClassProperty=function(s){return this.match(14)&&(s.typeAnnotation=this.flowParseTypeAnnotation()),t.prototype.parseClassProperty.call(this,s)},i.parseClassPrivateProperty=function(s){return this.match(14)&&(s.typeAnnotation=this.flowParseTypeAnnotation()),t.prototype.parseClassPrivateProperty.call(this,s)},i.isClassMethod=function(){return this.match(47)||t.prototype.isClassMethod.call(this)},i.isClassProperty=function(){return this.match(14)||t.prototype.isClassProperty.call(this)},i.isNonstaticConstructor=function(s){return!this.match(14)&&t.prototype.isNonstaticConstructor.call(this,s)},i.pushClassMethod=function(s,A,d,c,f,x){if(A.variance&&this.unexpected(A.variance.loc.start),delete A.variance,this.match(47)&&(A.typeParameters=this.flowParseTypeParameterDeclaration()),t.prototype.pushClassMethod.call(this,s,A,d,c,f,x),A.params&&f){var g=A.params;g.length>0&&this.isThisParam(g[0])&&this.raise(Xa.ThisParamBannedInConstructor,A)}else if(A.type==="MethodDefinition"&&f&&A.value.params){var m=A.value.params;m.length>0&&this.isThisParam(m[0])&&this.raise(Xa.ThisParamBannedInConstructor,A)}},i.pushClassPrivateMethod=function(s,A,d,c){A.variance&&this.unexpected(A.variance.loc.start),delete A.variance,this.match(47)&&(A.typeParameters=this.flowParseTypeParameterDeclaration()),t.prototype.pushClassPrivateMethod.call(this,s,A,d,c)},i.parseClassSuper=function(s){if(t.prototype.parseClassSuper.call(this,s),s.superClass&&this.match(47)&&(s.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(113)){this.next();var A=s.implements=[];do{var d=this.startNode();d.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?d.typeParameters=this.flowParseTypeParameterInstantiation():d.typeParameters=null,A.push(this.finishNode(d,"ClassImplements"))}while(this.eat(12))}},i.checkGetterSetterParams=function(s){t.prototype.checkGetterSetterParams.call(this,s);var A=this.getObjectOrClassMethodParams(s);if(A.length>0){var d=A[0];this.isThisParam(d)&&s.kind==="get"?this.raise(Xa.GetterMayNotHaveThisParam,d):this.isThisParam(d)&&this.raise(Xa.SetterMayNotHaveThisParam,d)}},i.parsePropertyNamePrefixOperator=function(s){s.variance=this.flowParseVariance()},i.parseObjPropValue=function(s,A,d,c,f,x,g){s.variance&&this.unexpected(s.variance.loc.start),delete s.variance;var m;this.match(47)&&!x&&(m=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());var B=t.prototype.parseObjPropValue.call(this,s,A,d,c,f,x,g);return m&&((B.value||B).typeParameters=m),B},i.parseAssignableListItemTypes=function(s){return this.eat(17)&&(s.type!=="Identifier"&&this.raise(Xa.PatternIsOptional,s),this.isThisParam(s)&&this.raise(Xa.ThisParamMayNotBeOptional,s),s.optional=!0),this.match(14)?s.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(s)&&this.raise(Xa.ThisParamAnnotationRequired,s),this.match(29)&&this.isThisParam(s)&&this.raise(Xa.ThisParamNoDefault,s),this.resetEndLocation(s),s},i.parseMaybeDefault=function(s,A){var d=t.prototype.parseMaybeDefault.call(this,s,A);return d.type==="AssignmentPattern"&&d.typeAnnotation&&d.right.start<d.typeAnnotation.start&&this.raise(Xa.TypeBeforeInitializer,d.typeAnnotation),d},i.checkImportReflection=function(s){t.prototype.checkImportReflection.call(this,s),s.module&&s.importKind!=="value"&&this.raise(Xa.ImportReflectionHasImportType,s.specifiers[0].loc.start)},i.parseImportSpecifierLocal=function(s,A,d){A.local=qX(s)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),s.specifiers.push(this.finishImportSpecifier(A,d))},i.isPotentialImportPhase=function(s){if(t.prototype.isPotentialImportPhase.call(this,s))return!0;if(this.isContextual(130)){if(!s)return!0;var A=this.lookaheadCharCode();return A===123||A===42}return!s&&this.isContextual(87)},i.applyImportPhase=function(s,A,d,c){if(t.prototype.applyImportPhase.call(this,s,A,d,c),A){if(!d&&this.match(65))return;s.exportKind=d==="type"?d:"value"}else d==="type"&&this.match(55)&&this.unexpected(),s.importKind=d==="type"||d==="typeof"?d:"value"},i.parseImportSpecifier=function(s,A,d,c,f){var x=s.imported,g=null;x.type==="Identifier"&&(x.name==="type"?g="type":x.name==="typeof"&&(g="typeof"));var m=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){var B=this.parseIdentifier(!0);g!==null&&!mc(this.state.type)?(s.imported=B,s.importKind=g,s.local=$f(B)):(s.imported=x,s.importKind=null,s.local=this.parseIdentifier())}else{if(g!==null&&mc(this.state.type))s.imported=this.parseIdentifier(!0),s.importKind=g;else{if(A)throw this.raise(ft.ImportBindingIsString,s,{importName:x.value});s.imported=x,s.importKind=null}this.eatContextual(93)?s.local=this.parseIdentifier():(m=!0,s.local=$f(s.imported))}var b=qX(s);return d&&b&&this.raise(Xa.ImportTypeShorthandOnlyInPureImport,s),(d||b)&&this.checkReservedType(s.local.name,s.local.loc.start,!0),m&&!d&&!b&&this.checkReservedWord(s.local.name,s.loc.start,!0,!0),this.finishImportSpecifier(s,"ImportSpecifier")},i.parseBindingAtom=function(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return t.prototype.parseBindingAtom.call(this)}},i.parseFunctionParams=function(s,A){var d=s.kind;d!=="get"&&d!=="set"&&this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),t.prototype.parseFunctionParams.call(this,s,A)},i.parseVarId=function(s,A){t.prototype.parseVarId.call(this,s,A),this.match(14)&&(s.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(s.id))},i.parseAsyncArrowFromCallExpression=function(s,A){if(this.match(14)){var d=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,s.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=d}return t.prototype.parseAsyncArrowFromCallExpression.call(this,s,A)},i.shouldParseAsyncArrow=function(){return this.match(14)||t.prototype.shouldParseAsyncArrow.call(this)},i.parseMaybeAssign=function(s,A){var d=this,c,f=null,x;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(f=this.state.clone(),x=this.tryParse(function(){return t.prototype.parseMaybeAssign.call(d,s,A)},f),!x.error)return x.node;var g=this.state.context,m=g[g.length-1];(m===ei.j_oTag||m===ei.j_expr)&&g.pop()}if((c=x)!=null&&c.error||this.match(47)){var B,b;f=f||this.state.clone();var _,C=this.tryParse(function(P){var M;_=d.flowParseTypeParameterDeclaration();var N=d.forwardNoArrowParamsConversionAt(_,function(){var V=t.prototype.parseMaybeAssign.call(d,s,A);return d.resetStartLocationFromNode(V,_),V});(M=N.extra)!=null&&M.parenthesized&&P();var q=d.maybeUnwrapTypeCastExpression(N);return q.type!=="ArrowFunctionExpression"&&P(),q.typeParameters=_,d.resetStartLocationFromNode(q,_),N},f),w=null;if(C.node&&this.maybeUnwrapTypeCastExpression(C.node).type==="ArrowFunctionExpression"){if(!C.error&&!C.aborted)return C.node.async&&this.raise(Xa.UnexpectedTypeParameterBeforeAsyncArrowFunction,_),C.node;w=C.node}if((B=x)!=null&&B.node)return this.state=x.failState,x.node;if(w)return this.state=C.failState,w;throw(b=x)!=null&&b.thrown?x.error:C.thrown?C.error:this.raise(Xa.UnexpectedTokenAfterTypeParameter,_)}return t.prototype.parseMaybeAssign.call(this,s,A)},i.parseArrow=function(s){var A=this;if(this.match(14)){var d=this.tryParse(function(){var c=A.state.noAnonFunctionType;A.state.noAnonFunctionType=!0;var f=A.startNode(),x=A.flowParseTypeAndPredicateInitialiser();return f.typeAnnotation=x[0],s.predicate=x[1],A.state.noAnonFunctionType=c,A.canInsertSemicolon()&&A.unexpected(),A.match(19)||A.unexpected(),f});if(d.thrown)return null;d.error&&(this.state=d.failState),s.returnType=d.node.typeAnnotation?this.finishNode(d.node,"TypeAnnotation"):null}return t.prototype.parseArrow.call(this,s)},i.shouldParseArrow=function(s){return this.match(14)||t.prototype.shouldParseArrow.call(this,s)},i.setArrowFunctionParameters=function(s,A){this.state.noArrowParamsConversionAt.includes(s.start)?s.params=A:t.prototype.setArrowFunctionParameters.call(this,s,A)},i.checkParams=function(s,A,d,c){if(c===void 0&&(c=!0),!(d&&this.state.noArrowParamsConversionAt.includes(s.start))){for(var f=0;f<s.params.length;f++)this.isThisParam(s.params[f])&&f>0&&this.raise(Xa.ThisParamMustBeFirst,s.params[f]);t.prototype.checkParams.call(this,s,A,d,c)}},i.parseParenAndDistinguishExpression=function(s){return t.prototype.parseParenAndDistinguishExpression.call(this,s&&!this.state.noArrowAt.includes(this.state.start))},i.parseSubscripts=function(s,A,d){var c=this;if(s.type==="Identifier"&&s.name==="async"&&this.state.noArrowAt.includes(A.index)){this.next();var f=this.startNodeAt(A);f.callee=s,f.arguments=t.prototype.parseCallExpressionArguments.call(this,11,!1),s=this.finishNode(f,"CallExpression")}else if(s.type==="Identifier"&&s.name==="async"&&this.match(47)){var x=this.state.clone(),g=this.tryParse(function(B){return c.parseAsyncArrowWithTypeParameters(A)||B()},x);if(!g.error&&!g.aborted)return g.node;var m=this.tryParse(function(){return t.prototype.parseSubscripts.call(c,s,A,d)},x);if(m.node&&!m.error)return m.node;if(g.node)return this.state=g.failState,g.node;if(m.node)return this.state=m.failState,m.node;throw g.error||m.error}return t.prototype.parseSubscripts.call(this,s,A,d)},i.parseSubscript=function(s,A,d,c){var f=this;if(this.match(18)&&this.isLookaheadToken_lt()){if(c.optionalChainMember=!0,d)return c.stop=!0,s;this.next();var x=this.startNodeAt(A);return x.callee=s,x.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),x.arguments=this.parseCallExpressionArguments(11,!1),x.optional=!0,this.finishCallExpression(x,!0)}else if(!d&&this.shouldParseTypes()&&this.match(47)){var g=this.startNodeAt(A);g.callee=s;var m=this.tryParse(function(){return g.typeArguments=f.flowParseTypeParameterInstantiationCallOrNew(),f.expect(10),g.arguments=t.prototype.parseCallExpressionArguments.call(f,11,!1),c.optionalChainMember&&(g.optional=!1),f.finishCallExpression(g,c.optionalChainMember)});if(m.node)return m.error&&(this.state=m.failState),m.node}return t.prototype.parseSubscript.call(this,s,A,d,c)},i.parseNewCallee=function(s){var A=this;t.prototype.parseNewCallee.call(this,s);var d=null;this.shouldParseTypes()&&this.match(47)&&(d=this.tryParse(function(){return A.flowParseTypeParameterInstantiationCallOrNew()}).node),s.typeArguments=d},i.parseAsyncArrowWithTypeParameters=function(s){var A=this.startNodeAt(s);if(this.parseFunctionParams(A,!1),!!this.parseArrow(A))return t.prototype.parseArrowExpression.call(this,A,void 0,!0)},i.readToken_mult_modulo=function(s){var A=this.input.charCodeAt(this.state.pos+1);if(s===42&&A===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}t.prototype.readToken_mult_modulo.call(this,s)},i.readToken_pipe_amp=function(s){var A=this.input.charCodeAt(this.state.pos+1);if(s===124&&A===125){this.finishOp(9,2);return}t.prototype.readToken_pipe_amp.call(this,s)},i.parseTopLevel=function(s,A){var d=t.prototype.parseTopLevel.call(this,s,A);return this.state.hasFlowComment&&this.raise(Xa.UnterminatedFlowComment,this.state.curPosition()),d},i.skipBlockComment=function(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(Xa.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();var s=this.skipFlowComment();s&&(this.state.pos+=s,this.state.hasFlowComment=!0);return}return t.prototype.skipBlockComment.call(this,this.state.hasFlowComment?"*-/":"*/")},i.skipFlowComment=function(){for(var s=this.state.pos,A=2;[32,9].includes(this.input.charCodeAt(s+A));)A++;var d=this.input.charCodeAt(A+s),c=this.input.charCodeAt(A+s+1);return d===58&&c===58?A+2:this.input.slice(A+s,A+s+12)==="flow-include"?A+12:d===58&&c!==58?A:!1},i.hasFlowCommentCompletion=function(){var s=this.input.indexOf("*/",this.state.pos);if(s===-1)throw this.raise(ft.UnterminatedComment,this.state.curPosition())},i.flowEnumErrorBooleanMemberNotInitialized=function(s,A){var d=A.enumName,c=A.memberName;this.raise(Xa.EnumBooleanMemberNotInitialized,s,{memberName:c,enumName:d})},i.flowEnumErrorInvalidMemberInitializer=function(s,A){return this.raise(A.explicitType?A.explicitType==="symbol"?Xa.EnumInvalidMemberInitializerSymbolType:Xa.EnumInvalidMemberInitializerPrimaryType:Xa.EnumInvalidMemberInitializerUnknownType,s,A)},i.flowEnumErrorNumberMemberNotInitialized=function(s,A){this.raise(Xa.EnumNumberMemberNotInitialized,s,A)},i.flowEnumErrorStringMemberInconsistentlyInitialized=function(s,A){this.raise(Xa.EnumStringMemberInconsistentlyInitialized,s,A)},i.flowEnumMemberInit=function(){var s=this,A=this.state.startLoc,d=function(){return s.match(12)||s.match(8)};switch(this.state.type){case 134:{var c=this.parseNumericLiteral(this.state.value);return d()?{type:"number",loc:c.loc.start,value:c}:{type:"invalid",loc:A}}case 133:{var f=this.parseStringLiteral(this.state.value);return d()?{type:"string",loc:f.loc.start,value:f}:{type:"invalid",loc:A}}case 85:case 86:{var x=this.parseBooleanLiteral(this.match(85));return d()?{type:"boolean",loc:x.loc.start,value:x}:{type:"invalid",loc:A}}default:return{type:"invalid",loc:A}}},i.flowEnumMemberRaw=function(){var s=this.state.startLoc,A=this.parseIdentifier(!0),d=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:s};return{id:A,init:d}},i.flowEnumCheckExplicitTypeMismatch=function(s,A,d){var c=A.explicitType;c!==null&&c!==d&&this.flowEnumErrorInvalidMemberInitializer(s,A)},i.flowEnumMembers=function(s){for(var A=s.enumName,d=s.explicitType,c=new Set,f={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},x=!1;!this.match(8);){if(this.eat(21)){x=!0;break}var g=this.startNode(),m=this.flowEnumMemberRaw(),B=m.id,b=m.init,_=B.name;if(_!==""){/^[a-z]/.test(_)&&this.raise(Xa.EnumInvalidMemberName,B,{memberName:_,suggestion:_[0].toUpperCase()+_.slice(1),enumName:A}),c.has(_)&&this.raise(Xa.EnumDuplicateMemberName,B,{memberName:_,enumName:A}),c.add(_);var C={enumName:A,explicitType:d,memberName:_};switch(g.id=B,b.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(b.loc,C,"boolean"),g.init=b.value,f.booleanMembers.push(this.finishNode(g,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(b.loc,C,"number"),g.init=b.value,f.numberMembers.push(this.finishNode(g,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(b.loc,C,"string"),g.init=b.value,f.stringMembers.push(this.finishNode(g,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(b.loc,C);case"none":switch(d){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(b.loc,C);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(b.loc,C);break;default:f.defaultedMembers.push(this.finishNode(g,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}}return{members:f,hasUnknownMembers:x}},i.flowEnumStringMembers=function(s,A,d){var c=d.enumName;if(s.length===0)return A;if(A.length===0)return s;if(A.length>s.length){for(var f=0;f<s.length;f++){var x=s[f];this.flowEnumErrorStringMemberInconsistentlyInitialized(x,{enumName:c})}return A}else{for(var g=0;g<A.length;g++){var m=A[g];this.flowEnumErrorStringMemberInconsistentlyInitialized(m,{enumName:c})}return s}},i.flowEnumParseExplicitType=function(s){var A=s.enumName;if(!this.eatContextual(102))return null;if(!Ls(this.state.type))throw this.raise(Xa.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:A});var d=this.state.value;return this.next(),d!=="boolean"&&d!=="number"&&d!=="string"&&d!=="symbol"&&this.raise(Xa.EnumInvalidExplicitType,this.state.startLoc,{enumName:A,invalidEnumType:d}),d},i.flowEnumBody=function(s,A){var d=this,c=A.name,f=A.loc.start,x=this.flowEnumParseExplicitType({enumName:c});this.expect(5);var g=this.flowEnumMembers({enumName:c,explicitType:x}),m=g.members,B=g.hasUnknownMembers;switch(s.hasUnknownMembers=B,x){case"boolean":return s.explicitType=!0,s.members=m.booleanMembers,this.expect(8),this.finishNode(s,"EnumBooleanBody");case"number":return s.explicitType=!0,s.members=m.numberMembers,this.expect(8),this.finishNode(s,"EnumNumberBody");case"string":return s.explicitType=!0,s.members=this.flowEnumStringMembers(m.stringMembers,m.defaultedMembers,{enumName:c}),this.expect(8),this.finishNode(s,"EnumStringBody");case"symbol":return s.members=m.defaultedMembers,this.expect(8),this.finishNode(s,"EnumSymbolBody");default:{var b=function(){return s.members=[],d.expect(8),d.finishNode(s,"EnumStringBody")};s.explicitType=!1;var _=m.booleanMembers.length,C=m.numberMembers.length,w=m.stringMembers.length,P=m.defaultedMembers.length;if(!_&&!C&&!w&&!P)return b();if(!_&&!C)return s.members=this.flowEnumStringMembers(m.stringMembers,m.defaultedMembers,{enumName:c}),this.expect(8),this.finishNode(s,"EnumStringBody");if(!C&&!w&&_>=P){for(var M=0,N=m.defaultedMembers;M<N.length;M++){var q=N[M];this.flowEnumErrorBooleanMemberNotInitialized(q.loc.start,{enumName:c,memberName:q.id.name})}return s.members=m.booleanMembers,this.expect(8),this.finishNode(s,"EnumBooleanBody")}else if(!_&&!w&&C>=P){for(var V=0,U=m.defaultedMembers;V<U.length;V++){var te=U[V];this.flowEnumErrorNumberMemberNotInitialized(te.loc.start,{enumName:c,memberName:te.id.name})}return s.members=m.numberMembers,this.expect(8),this.finishNode(s,"EnumNumberBody")}else return this.raise(Xa.EnumInconsistentMemberValues,f,{enumName:c}),b()}}},i.flowParseEnumDeclaration=function(s){var A=this.parseIdentifier();return s.id=A,s.body=this.flowEnumBody(this.startNode(),A),this.finishNode(s,"EnumDeclaration")},i.isLookaheadToken_lt=function(){var s=this.nextTokenStart();if(this.input.charCodeAt(s)===60){var A=this.input.charCodeAt(s+1);return A!==60&&A!==61}return!1},i.maybeUnwrapTypeCastExpression=function(s){return s.type==="TypeCastExpression"?s.expression:s},T(n)}(e)},Q7e={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},HX,gh=Pf(HX||(HX=H(["jsx"])))({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:function(t){var n=t.openingTagName;return"Expected corresponding JSX closing tag for <"+n+">."},MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:function(t){var n=t.unexpected,i=t.HTMLEntity;return"Unexpected token `"+n+"`. Did you mean `"+i+"` or `{'"+n+"'}`?"},UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function gx(e){return e?e.type==="JSXOpeningFragment"||e.type==="JSXClosingFragment":!1}function bg(e){if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return bg(e.object)+"."+bg(e.property);throw new Error("Node had unexpected type: "+e.type)}var J7e=function(e){return function(t){function n(){return t.apply(this,arguments)||this}ue(n,t);var i=n.prototype;return i.jsxReadToken=function(){for(var s="",A=this.state.pos;;){if(this.state.pos>=this.length)throw this.raise(gh.UnterminatedJsxContent,this.state.startLoc);var d=this.input.charCodeAt(this.state.pos);switch(d){case 60:case 123:if(this.state.pos===this.state.start){d===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(142)):t.prototype.getTokenFromCode.call(this,d);return}s+=this.input.slice(A,this.state.pos),this.finishToken(141,s);return;case 38:s+=this.input.slice(A,this.state.pos),s+=this.jsxReadEntity(),A=this.state.pos;break;case 62:case 125:default:OF(d)?(s+=this.input.slice(A,this.state.pos),s+=this.jsxReadNewLine(!0),A=this.state.pos):++this.state.pos}}},i.jsxReadNewLine=function(s){var A=this.input.charCodeAt(this.state.pos),d;return++this.state.pos,A===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,d=s?`
`:`\r
`):d=String.fromCharCode(A),++this.state.curLine,this.state.lineStart=this.state.pos,d},i.jsxReadString=function(s){for(var A="",d=++this.state.pos;;){if(this.state.pos>=this.length)throw this.raise(ft.UnterminatedString,this.state.startLoc);var c=this.input.charCodeAt(this.state.pos);if(c===s)break;c===38?(A+=this.input.slice(d,this.state.pos),A+=this.jsxReadEntity(),d=this.state.pos):OF(c)?(A+=this.input.slice(d,this.state.pos),A+=this.jsxReadNewLine(!1),d=this.state.pos):++this.state.pos}A+=this.input.slice(d,this.state.pos++),this.finishToken(133,A)},i.jsxReadEntity=function(){var s=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;var A=10;this.codePointAtPos(this.state.pos)===120&&(A=16,++this.state.pos);var d=this.readInt(A,void 0,!1,"bail");if(d!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(d)}else{for(var c=0,f=!1;c++<10&&this.state.pos<this.length&&!(f=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(f){var x=this.input.slice(s,this.state.pos),g=Q7e[x];if(++this.state.pos,g)return g}}return this.state.pos=s,"&"},i.jsxReadWord=function(){var s,A=this.state.pos;do s=this.input.charCodeAt(++this.state.pos);while(f0(s)||s===45);this.finishToken(140,this.input.slice(A,this.state.pos))},i.jsxParseIdentifier=function(){var s=this.startNode();return this.match(140)?s.name=this.state.value:CT(this.state.type)?s.name=hx(this.state.type):this.unexpected(),this.next(),this.finishNode(s,"JSXIdentifier")},i.jsxParseNamespacedName=function(){var s=this.state.startLoc,A=this.jsxParseIdentifier();if(!this.eat(14))return A;var d=this.startNodeAt(s);return d.namespace=A,d.name=this.jsxParseIdentifier(),this.finishNode(d,"JSXNamespacedName")},i.jsxParseElementName=function(){var s=this.state.startLoc,A=this.jsxParseNamespacedName();if(A.type==="JSXNamespacedName")return A;for(;this.eat(16);){var d=this.startNodeAt(s);d.object=A,d.property=this.jsxParseIdentifier(),A=this.finishNode(d,"JSXMemberExpression")}return A},i.jsxParseAttributeValue=function(){var s;switch(this.state.type){case 5:return s=this.startNode(),this.setContext(ei.brace),this.next(),s=this.jsxParseExpressionContainer(s,ei.j_oTag),s.expression.type==="JSXEmptyExpression"&&this.raise(gh.AttributeIsEmpty,s),s;case 142:case 133:return this.parseExprAtom();default:throw this.raise(gh.UnsupportedJsxValue,this.state.startLoc)}},i.jsxParseEmptyExpression=function(){var s=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(s,"JSXEmptyExpression",this.state.startLoc)},i.jsxParseSpreadChild=function(s){return this.next(),s.expression=this.parseExpression(),this.setContext(ei.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(s,"JSXSpreadChild")},i.jsxParseExpressionContainer=function(s,A){if(this.match(8))s.expression=this.jsxParseEmptyExpression();else{var d=this.parseExpression();s.expression=d}return this.setContext(A),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(s,"JSXExpressionContainer")},i.jsxParseAttribute=function(){var s=this.startNode();return this.match(5)?(this.setContext(ei.brace),this.next(),this.expect(21),s.argument=this.parseMaybeAssignAllowIn(),this.setContext(ei.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(s,"JSXSpreadAttribute")):(s.name=this.jsxParseNamespacedName(),s.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(s,"JSXAttribute"))},i.jsxParseOpeningElementAt=function(s){var A=this.startNodeAt(s);return this.eat(143)?this.finishNode(A,"JSXOpeningFragment"):(A.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(A))},i.jsxParseOpeningElementAfterName=function(s){for(var A=[];!this.match(56)&&!this.match(143);)A.push(this.jsxParseAttribute());return s.attributes=A,s.selfClosing=this.eat(56),this.expect(143),this.finishNode(s,"JSXOpeningElement")},i.jsxParseClosingElementAt=function(s){var A=this.startNodeAt(s);return this.eat(143)?this.finishNode(A,"JSXClosingFragment"):(A.name=this.jsxParseElementName(),this.expect(143),this.finishNode(A,"JSXClosingElement"))},i.jsxParseElementAt=function(s){var A=this.startNodeAt(s),d=[],c=this.jsxParseOpeningElementAt(s),f=null;if(!c.selfClosing){e:for(;;)switch(this.state.type){case 142:if(s=this.state.startLoc,this.next(),this.eat(56)){f=this.jsxParseClosingElementAt(s);break e}d.push(this.jsxParseElementAt(s));break;case 141:d.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{var x=this.startNode();this.setContext(ei.brace),this.next(),this.match(21)?d.push(this.jsxParseSpreadChild(x)):d.push(this.jsxParseExpressionContainer(x,ei.j_expr));break}default:this.unexpected()}gx(c)&&!gx(f)&&f!==null?this.raise(gh.MissingClosingTagFragment,f):!gx(c)&&gx(f)?this.raise(gh.MissingClosingTagElement,f,{openingTagName:bg(c.name)}):!gx(c)&&!gx(f)&&bg(f.name)!==bg(c.name)&&this.raise(gh.MissingClosingTagElement,f,{openingTagName:bg(c.name)})}if(gx(c)?(A.openingFragment=c,A.closingFragment=f):(A.openingElement=c,A.closingElement=f),A.children=d,this.match(47))throw this.raise(gh.UnwrappedAdjacentJSXElements,this.state.startLoc);return gx(c)?this.finishNode(A,"JSXFragment"):this.finishNode(A,"JSXElement")},i.jsxParseElement=function(){var s=this.state.startLoc;return this.next(),this.jsxParseElementAt(s)},i.setContext=function(s){var A=this.state.context;A[A.length-1]=s},i.parseExprAtom=function(s){return this.match(142)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(142),this.jsxParseElement()):t.prototype.parseExprAtom.call(this,s)},i.skipSpace=function(){var s=this.curContext();s.preserveSpace||t.prototype.skipSpace.call(this)},i.getTokenFromCode=function(s){var A=this.curContext();if(A===ei.j_expr){this.jsxReadToken();return}if(A===ei.j_oTag||A===ei.j_cTag){if(Vl(s)){this.jsxReadWord();return}if(s===62){++this.state.pos,this.finishToken(143);return}if((s===34||s===39)&&A===ei.j_oTag){this.jsxReadString(s);return}}if(s===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(142);return}t.prototype.getTokenFromCode.call(this,s)},i.updateContext=function(s){var A=this.state,d=A.context,c=A.type;if(c===56&&s===142)d.splice(-2,2,ei.j_cTag),this.state.canStartJSXElement=!1;else if(c===142)d.push(ei.j_oTag);else if(c===143){var f=d[d.length-1];f===ei.j_oTag&&s===56||f===ei.j_cTag?(d.pop(),this.state.canStartJSXElement=d[d.length-1]===ei.j_expr):(this.setContext(ei.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=f7e(c)},T(n)}(e)},Z7e=function(e){function t(){for(var n,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=e.call.apply(e,[this].concat(o))||this,n.tsNames=new Map,n}return ue(t,e),T(t)}(bT),eBe=function(e){function t(){for(var i,o=arguments.length,s=new Array(o),A=0;A<o;A++)s[A]=arguments[A];return i=e.call.apply(e,[this].concat(s))||this,i.importsStack=[],i}ue(t,e);var n=t.prototype;return n.createScope=function(o){return this.importsStack.push(new Set),new Z7e(o)},n.enter=function(o){o===fn.TS_MODULE&&this.importsStack.push(new Set),e.prototype.enter.call(this,o)},n.exit=function(){var o=e.prototype.exit.call(this);return o===fn.TS_MODULE&&this.importsStack.pop(),o},n.hasImport=function(o,s){var A=this.importsStack.length;if(this.importsStack[A-1].has(o))return!0;if(!s&&A>1){for(var d=0;d<A-1;d++)if(this.importsStack[d].has(o))return!0}return!1},n.declareName=function(o,s,A){if(s&wa.FLAG_TS_IMPORT){this.hasImport(o,!0)&&this.parser.raise(ft.VarRedeclaration,A,{identifierName:o}),this.importsStack[this.importsStack.length-1].add(o);return}var d=this.currentScope(),c=d.tsNames.get(o)||0;if(s&wa.FLAG_TS_EXPORT_ONLY){this.maybeExportDefined(d,o),d.tsNames.set(o,c|16);return}e.prototype.declareName.call(this,o,s,A),s&wa.KIND_TYPE&&(s&wa.KIND_VALUE||(this.checkRedeclarationInScope(d,o,s,A),this.maybeExportDefined(d,o)),c=c|1),s&wa.FLAG_TS_ENUM&&(c=c|2),s&wa.FLAG_TS_CONST_ENUM&&(c=c|4),s&wa.FLAG_CLASS&&(c=c|8),c&&d.tsNames.set(o,c)},n.isRedeclaredInScope=function(o,s,A){var d=o.tsNames.get(s);if((d&2)>0){if(A&wa.FLAG_TS_ENUM){var c=!!(A&wa.FLAG_TS_CONST_ENUM),f=(d&4)>0;return c!==f}return!0}return A&wa.FLAG_CLASS&&(d&8)>0?o.names.get(s)&E0.Lexical?!!(A&wa.KIND_VALUE):!1:A&wa.KIND_TYPE&&(d&1)>0?!0:e.prototype.isRedeclaredInScope.call(this,o,s,A)},n.checkLocalExport=function(o){var s=o.name;if(!this.hasImport(s)){for(var A=this.scopeStack.length,d=A-1;d>=0;d--){var c=this.scopeStack[d],f=c.tsNames.get(s);if((f&1)>0||(f&16)>0)return}e.prototype.checkLocalExport.call(this,o)}},T(t)}(BT),tBe=function(t,n){return hasOwnProperty.call(t,n)&&t[n]},rBe=function e(t){return t.type==="ParenthesizedExpression"?e(t.expression):t},mx={ALLOW_EMPTY:1,IS_FUNCTION_PARAMS:2,IS_CONSTRUCTOR_PARAMS:4},aBe=function(e){function t(){return e.apply(this,arguments)||this}ue(t,e);var n=t.prototype;return n.toAssignable=function(o,s){var A,d;s===void 0&&(s=!1);var c=void 0;switch((o.type==="ParenthesizedExpression"||(A=o.extra)!=null&&A.parenthesized)&&(c=rBe(o),s?c.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(ft.InvalidParenthesizedAssignment,o):c.type!=="MemberExpression"&&!this.isOptionalMemberExpression(c)&&this.raise(ft.InvalidParenthesizedAssignment,o):this.raise(ft.InvalidParenthesizedAssignment,o)),o.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":o.type="ObjectPattern";for(var f=0,x=o.properties.length,g=x-1;f<x;f++){var m,B=o.properties[f],b=f===g;this.toAssignableObjectExpressionProp(B,b,s),b&&B.type==="RestElement"&&(m=o.extra)!=null&&m.trailingCommaLoc&&this.raise(ft.RestTrailingComma,o.extra.trailingCommaLoc)}break;case"ObjectProperty":{var _=o.key,C=o.value;this.isPrivateName(_)&&this.classScope.usePrivateName(this.getPrivateNameSV(_),_.loc.start),this.toAssignable(C,s);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":o.type="ArrayPattern",this.toAssignableList(o.elements,(d=o.extra)==null?void 0:d.trailingCommaLoc,s);break;case"AssignmentExpression":o.operator!=="="&&this.raise(ft.MissingEqInAssignment,o.left.loc.end),o.type="AssignmentPattern",delete o.operator,this.toAssignable(o.left,s);break;case"ParenthesizedExpression":this.toAssignable(c,s);break}},n.toAssignableObjectExpressionProp=function(o,s,A){if(o.type==="ObjectMethod")this.raise(o.kind==="get"||o.kind==="set"?ft.PatternHasAccessor:ft.PatternHasMethod,o.key);else if(o.type==="SpreadElement"){o.type="RestElement";var d=o.argument;this.checkToRestConversion(d,!1),this.toAssignable(d,A),s||this.raise(ft.RestTrailingComma,o)}else this.toAssignable(o,A)},n.toAssignableList=function(o,s,A){for(var d=o.length-1,c=0;c<=d;c++){var f=o[c];if(f){if(f.type==="SpreadElement"){f.type="RestElement";var x=f.argument;this.checkToRestConversion(x,!0),this.toAssignable(x,A)}else this.toAssignable(f,A);f.type==="RestElement"&&(c<d?this.raise(ft.RestTrailingComma,f):s&&this.raise(ft.RestTrailingComma,s))}}},n.isAssignable=function(o,s){var A=this;switch(o.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{var d=o.properties.length-1;return o.properties.every(function(c,f){return c.type!=="ObjectMethod"&&(f===d||c.type!=="SpreadElement")&&A.isAssignable(c)})}case"ObjectProperty":return this.isAssignable(o.value);case"SpreadElement":return this.isAssignable(o.argument);case"ArrayExpression":return o.elements.every(function(c){return c===null||A.isAssignable(c)});case"AssignmentExpression":return o.operator==="=";case"ParenthesizedExpression":return this.isAssignable(o.expression);case"MemberExpression":case"OptionalMemberExpression":return!s;default:return!1}},n.toReferencedList=function(o,s){return o},n.toReferencedListDeep=function(o,s){this.toReferencedList(o,s);for(var A=0;A<o.length;A++){var d=o[A];d?.type==="ArrayExpression"&&this.toReferencedListDeep(d.elements)}},n.parseSpread=function(o){var s=this.startNode();return this.next(),s.argument=this.parseMaybeAssignAllowIn(o,void 0),this.finishNode(s,"SpreadElement")},n.parseRestBinding=function(){var o=this.startNode();return this.next(),o.argument=this.parseBindingAtom(),this.finishNode(o,"RestElement")},n.parseBindingAtom=function(){switch(this.state.type){case 0:{var o=this.startNode();return this.next(),o.elements=this.parseBindingList(3,93,mx.ALLOW_EMPTY),this.finishNode(o,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()},n.parseBindingList=function(o,s,A){for(var d=A&mx.ALLOW_EMPTY,c=[],f=!0;!this.eat(o);)if(f?f=!1:this.expect(12),d&&this.match(12))c.push(null);else{if(this.eat(o))break;if(this.match(21)){if(c.push(this.parseAssignableListItemTypes(this.parseRestBinding(),A)),!this.checkCommaAfterRest(s)){this.expect(o);break}}else{var x=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(ft.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)x.push(this.parseDecorator());c.push(this.parseAssignableListItem(A,x))}}return c},n.parseBindingRestProperty=function(o){return this.next(),o.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(o,"RestElement")},n.parseBindingProperty=function(){var o=this.state,s=o.type,A=o.startLoc;if(s===21)return this.parseBindingRestProperty(this.startNode());var d=this.startNode();return s===138?(this.expectPlugin("destructuringPrivate",A),this.classScope.usePrivateName(this.state.value,A),d.key=this.parsePrivateName()):this.parsePropertyName(d),d.method=!1,this.parseObjPropValue(d,A,!1,!1,!0,!1)},n.parseAssignableListItem=function(o,s){var A=this.parseMaybeDefault();this.parseAssignableListItemTypes(A,o);var d=this.parseMaybeDefault(A.loc.start,A);return s.length&&(A.decorators=s),d},n.parseAssignableListItemTypes=function(o,s){return o},n.parseMaybeDefault=function(o,s){var A,d;if((A=o)!=null||(o=this.state.startLoc),s=(d=s)!=null?d:this.parseBindingAtom(),!this.eat(29))return s;var c=this.startNodeAt(o);return c.left=s,c.right=this.parseMaybeAssignAllowIn(),this.finishNode(c,"AssignmentPattern")},n.isValidLVal=function(o,s,A){return tBe({AssignmentPattern:"left",RestElement:"argument",ObjectProperty:"value",ParenthesizedExpression:"expression",ArrayPattern:"elements",ObjectPattern:"properties"},o)},n.isOptionalMemberExpression=function(o){return o.type==="OptionalMemberExpression"},n.checkLVal=function(o,s){var A,d=s.in,c=s.binding,f=c===void 0?wa.TYPE_NONE:c,x=s.checkClashes,g=x===void 0?!1:x,m=s.strictModeChanged,B=m===void 0?!1:m,b=s.hasParenthesizedAncestor,_=b===void 0?!1:b,C=o.type;if(!this.isObjectMethod(o)){var w=this.isOptionalMemberExpression(o);if(w||C==="MemberExpression"){w&&(this.expectPlugin("optionalChainingAssign",o.loc.start),d.type!=="AssignmentExpression"&&this.raise(ft.InvalidLhsOptionalChaining,o,{ancestor:d})),f!==wa.TYPE_NONE&&this.raise(ft.InvalidPropertyBindingPattern,o);return}if(C==="Identifier"){this.checkIdentifier(o,f,B);var P=o.name;g&&(g.has(P)?this.raise(ft.ParamDupe,o):g.add(P));return}var M=this.isValidLVal(C,!(_||(A=o.extra)!=null&&A.parenthesized)&&d.type==="AssignmentExpression",f);if(M!==!0){if(M===!1){var N=f===wa.TYPE_NONE?ft.InvalidLhs:ft.InvalidLhsBinding;this.raise(N,o,{ancestor:d});return}for(var q=Array.isArray(M)?M:[M,C==="ParenthesizedExpression"],V=q[0],U=q[1],te=C==="ArrayPattern"||C==="ObjectPattern"?{type:C}:d,ae=0,se=[].concat(o[V]);ae<se.length;ae++){var ne=se[ae];ne&&this.checkLVal(ne,{in:te,binding:f,checkClashes:g,strictModeChanged:B,hasParenthesizedAncestor:U})}}}},n.checkIdentifier=function(o,s,A){A===void 0&&(A=!1),this.state.strict&&(A?Xp(o.name,this.inModule):Sb(o.name))&&(s===wa.TYPE_NONE?this.raise(ft.StrictEvalArguments,o,{referenceName:o.name}):this.raise(ft.StrictEvalArgumentsBinding,o,{bindingName:o.name})),s&wa.FLAG_NO_LET_IN_LEXICAL&&o.name==="let"&&this.raise(ft.LetInLexicalBinding,o),s&wa.TYPE_NONE||this.declareNameFromIdentifier(o,s)},n.declareNameFromIdentifier=function(o,s){this.scope.declareName(o.name,s,o.loc.start)},n.checkToRestConversion=function(o,s){switch(o.type){case"ParenthesizedExpression":this.checkToRestConversion(o.expression,s);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(s)break;default:this.raise(ft.InvalidRestAssignmentPattern,o)}},n.checkCommaAfterRest=function(o){return this.match(12)?(this.raise(this.lookaheadCharCode()===o?ft.RestTrailingComma:ft.ElementAfterRest,this.state.startLoc),!0):!1},T(t)}(H7e),VX,nBe=function(t,n){return hasOwnProperty.call(t,n)&&t[n]};function sBe(e){if(e==null)throw new Error("Unexpected "+e+" value.");return e}function KX(e){if(!e)throw new Error("Assert fail")}var ga=Pf(VX||(VX=H(["typescript"])))({AbstractMethodHasImplementation:function(t){var n=t.methodName;return"Method '"+n+"' cannot have an implementation because it is marked abstract."},AbstractPropertyHasInitializer:function(t){var n=t.propertyName;return"Property '"+n+"' cannot have an initializer because it is marked abstract."},AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:function(t){var n=t.kind;return"'declare' is not allowed in "+n+"ters."},DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:function(t){return t.modifier,"Accessibility modifier already seen."},DuplicateModifier:function(t){var n=t.modifier;return"Duplicate modifier: '"+n+"'."},EmptyHeritageClauseType:function(t){var n=t.token;return"'"+n+"' list cannot be empty."},EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:function(t){var n=t.modifiers;return"'"+n[0]+"' modifier cannot be used with '"+n[1]+"' modifier."},IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:function(t){var n=t.modifier;return"Index signatures cannot have an accessibility modifier ('"+n+"')."},IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:function(t){var n=t.modifier;return"'"+n+"' modifier cannot appear on a type member."},InvalidModifierOnTypeParameter:function(t){var n=t.modifier;return"'"+n+"' modifier cannot appear on a type parameter."},InvalidModifierOnTypeParameterPositions:function(t){var n=t.modifier;return"'"+n+"' modifier can only appear on a type parameter of a class, interface or type alias."},InvalidModifiersOrder:function(t){var n=t.orderedModifiers;return"'"+n[0]+"' modifier must precede '"+n[1]+"' modifier."},InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:function(t){var n=t.modifier;return"Private elements cannot have an accessibility modifier ('"+n+"')."},ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:function(t){var n=t.typeParameterName;return"Single type parameter "+n+" should have a trailing comma. Example usage: <"+n+",>."},StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:function(t){var n=t.type;return"Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got "+n+"."}});function iBe(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function WX(e){return e==="private"||e==="public"||e==="protected"}function oBe(e){return e==="in"||e==="out"}var uBe=function(e){return function(t){function n(){for(var o,s=arguments.length,A=new Array(s),d=0;d<s;d++)A[d]=arguments[d];return o=t.call.apply(t,[this].concat(A))||this,o.tsParseInOutModifiers=o.tsParseModifiers.bind(o,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:ga.InvalidModifierOnTypeParameter}),o.tsParseConstModifier=o.tsParseModifiers.bind(o,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:ga.InvalidModifierOnTypeParameterPositions}),o.tsParseInOutConstModifiers=o.tsParseModifiers.bind(o,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:ga.InvalidModifierOnTypeParameter}),o}ue(n,t);var i=n.prototype;return i.getScopeHandler=function(){return eBe},i.tsIsIdentifier=function(){return Ls(this.state.type)},i.tsTokenCanFollowModifier=function(){return(this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(138)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()},i.tsNextTokenCanFollowModifier=function(){return this.next(),this.tsTokenCanFollowModifier()},i.tsParseModifier=function(s,A){if(!(!Ls(this.state.type)&&this.state.type!==58&&this.state.type!==75)){var d=this.state.value;if(s.includes(d)){if(A&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return d}}},i.tsParseModifiers=function(s,A){for(var d=this,c=s.allowedModifiers,f=s.disallowedModifiers,x=s.stopOnStartOfClassStaticBlock,g=s.errorTemplate,m=g===void 0?ga.InvalidModifierOnTypeMember:g,B=function(P,M,N,q){M===N&&A[q]&&d.raise(ga.InvalidModifiersOrder,P,{orderedModifiers:[N,q]})},b=function(P,M,N,q){(A[N]&&M===q||A[q]&&M===N)&&d.raise(ga.IncompatibleModifiers,P,{modifiers:[N,q]})};;){var _=this.state.startLoc,C=this.tsParseModifier(c.concat(f??[]),x);if(!C)break;WX(C)?A.accessibility?this.raise(ga.DuplicateAccessibilityModifier,_,{modifier:C}):(B(_,C,C,"override"),B(_,C,C,"static"),B(_,C,C,"readonly"),A.accessibility=C):oBe(C)?(A[C]&&this.raise(ga.DuplicateModifier,_,{modifier:C}),A[C]=!0,B(_,C,"in","out")):(hasOwnProperty.call(A,C)?this.raise(ga.DuplicateModifier,_,{modifier:C}):(B(_,C,"static","readonly"),B(_,C,"static","override"),B(_,C,"override","readonly"),B(_,C,"abstract","override"),b(_,C,"declare","override"),b(_,C,"static","abstract")),A[C]=!0),f!=null&&f.includes(C)&&this.raise(m,_,{modifier:C})}},i.tsIsListTerminator=function(s){switch(s){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}},i.tsParseList=function(s,A){for(var d=[];!this.tsIsListTerminator(s);)d.push(A());return d},i.tsParseDelimitedList=function(s,A,d){return sBe(this.tsParseDelimitedListWorker(s,A,!0,d))},i.tsParseDelimitedListWorker=function(s,A,d,c){for(var f=[],x=-1;!this.tsIsListTerminator(s);){x=-1;var g=A();if(g==null)return;if(f.push(g),this.eat(12)){x=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(s))break;d&&this.expect(12);return}return c&&(c.value=x),f},i.tsParseBracketedList=function(s,A,d,c,f){c||(d?this.expect(0):this.expect(47));var x=this.tsParseDelimitedList(s,A,f);return d?this.expect(3):this.expect(48),x},i.tsParseImportType=function(){var s=this.startNode();return this.expect(83),this.expect(10),this.match(133)||this.raise(ga.UnsupportedImportTypeArgument,this.state.startLoc),s.argument=t.prototype.parseExprAtom.call(this),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(s.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(s.options=t.prototype.parseMaybeAssignAllowIn.call(this),this.eat(12))),this.expect(11),this.eat(16)&&(s.qualifier=this.tsParseEntityName()),this.match(47)&&(s.typeParameters=this.tsParseTypeArguments()),this.finishNode(s,"TSImportType")},i.tsParseEntityName=function(s){s===void 0&&(s=!0);for(var A=this.parseIdentifier(s);this.eat(16);){var d=this.startNodeAtNode(A);d.left=A,d.right=this.parseIdentifier(s),A=this.finishNode(d,"TSQualifiedName")}return A},i.tsParseTypeReference=function(){var s=this.startNode();return s.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(s.typeParameters=this.tsParseTypeArguments()),this.finishNode(s,"TSTypeReference")},i.tsParseThisTypePredicate=function(s){this.next();var A=this.startNodeAtNode(s);return A.parameterName=s,A.typeAnnotation=this.tsParseTypeAnnotation(!1),A.asserts=!1,this.finishNode(A,"TSTypePredicate")},i.tsParseThisTypeNode=function(){var s=this.startNode();return this.next(),this.finishNode(s,"TSThisType")},i.tsParseTypeQuery=function(){var s=this.startNode();return this.expect(87),this.match(83)?s.exprName=this.tsParseImportType():s.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(s.typeParameters=this.tsParseTypeArguments()),this.finishNode(s,"TSTypeQuery")},i.tsParseTypeParameter=function(s){var A=this.startNode();return s(A),A.name=this.tsParseTypeParameterName(),A.constraint=this.tsEatThenParseType(81),A.default=this.tsEatThenParseType(29),this.finishNode(A,"TSTypeParameter")},i.tsTryParseTypeParameters=function(s){if(this.match(47))return this.tsParseTypeParameters(s)},i.tsParseTypeParameters=function(s){var A=this.startNode();this.match(47)||this.match(142)?this.next():this.unexpected();var d={value:-1};return A.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,s),!1,!0,d),A.params.length===0&&this.raise(ga.EmptyTypeParameters,A),d.value!==-1&&this.addExtra(A,"trailingComma",d.value),this.finishNode(A,"TSTypeParameterDeclaration")},i.tsFillSignature=function(s,A){var d=s===19,c="parameters",f="typeAnnotation";A.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),A[c]=this.tsParseBindingListForSignature(),d?A[f]=this.tsParseTypeOrTypePredicateAnnotation(s):this.match(s)&&(A[f]=this.tsParseTypeOrTypePredicateAnnotation(s))},i.tsParseBindingListForSignature=function(){for(var s=t.prototype.parseBindingList.call(this,11,41,mx.IS_FUNCTION_PARAMS),A=0;A<s.length;A++){var d=s[A],c=d.type;(c==="AssignmentPattern"||c==="TSParameterProperty")&&this.raise(ga.UnsupportedSignatureParameterKind,d,{type:c})}return s},i.tsParseTypeMemberSemicolon=function(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)},i.tsParseSignatureMember=function(s,A){return this.tsFillSignature(14,A),this.tsParseTypeMemberSemicolon(),this.finishNode(A,s)},i.tsIsUnambiguouslyIndexSignature=function(){return this.next(),Ls(this.state.type)?(this.next(),this.match(14)):!1},i.tsTryParseIndexSignature=function(s){if(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))){this.expect(0);var A=this.parseIdentifier();A.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(A),this.expect(3),s.parameters=[A];var d=this.tsTryParseTypeAnnotation();return d&&(s.typeAnnotation=d),this.tsParseTypeMemberSemicolon(),this.finishNode(s,"TSIndexSignature")}},i.tsParsePropertyOrMethodSignature=function(s,A){this.eat(17)&&(s.optional=!0);var d=s;if(this.match(10)||this.match(47)){A&&this.raise(ga.ReadonlyForMethodSignature,s);var c=d;c.kind&&this.match(47)&&this.raise(ga.AccesorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,c),this.tsParseTypeMemberSemicolon();var f="parameters",x="typeAnnotation";if(c.kind==="get")c[f].length>0&&(this.raise(ft.BadGetterArity,this.state.curPosition()),this.isThisParam(c[f][0])&&this.raise(ga.AccesorCannotDeclareThisParameter,this.state.curPosition()));else if(c.kind==="set"){if(c[f].length!==1)this.raise(ft.BadSetterArity,this.state.curPosition());else{var g=c[f][0];this.isThisParam(g)&&this.raise(ga.AccesorCannotDeclareThisParameter,this.state.curPosition()),g.type==="Identifier"&&g.optional&&this.raise(ga.SetAccesorCannotHaveOptionalParameter,this.state.curPosition()),g.type==="RestElement"&&this.raise(ga.SetAccesorCannotHaveRestParameter,this.state.curPosition())}c[x]&&this.raise(ga.SetAccesorCannotHaveReturnType,c[x])}else c.kind="method";return this.finishNode(c,"TSMethodSignature")}else{var m=d;A&&(m.readonly=!0);var B=this.tsTryParseTypeAnnotation();return B&&(m.typeAnnotation=B),this.tsParseTypeMemberSemicolon(),this.finishNode(m,"TSPropertySignature")}},i.tsParseTypeMember=function(){var s=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",s);if(this.match(77)){var A=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",s):(s.key=this.createIdentifier(A,"new"),this.tsParsePropertyOrMethodSignature(s,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},s);var d=this.tsTryParseIndexSignature(s);return d||(t.prototype.parsePropertyName.call(this,s),!s.computed&&s.key.type==="Identifier"&&(s.key.name==="get"||s.key.name==="set")&&this.tsTokenCanFollowModifier()&&(s.kind=s.key.name,t.prototype.parsePropertyName.call(this,s)),this.tsParsePropertyOrMethodSignature(s,!!s.readonly))},i.tsParseTypeLiteral=function(){var s=this.startNode();return s.members=this.tsParseObjectTypeMembers(),this.finishNode(s,"TSTypeLiteral")},i.tsParseObjectTypeMembers=function(){this.expect(5);var s=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),s},i.tsIsStartOfMappedType=function(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))},i.tsParseMappedTypeParameter=function(){var s=this.startNode();return s.name=this.tsParseTypeParameterName(),s.constraint=this.tsExpectThenParseType(58),this.finishNode(s,"TSTypeParameter")},i.tsParseMappedType=function(){var s=this.startNode();return this.expect(5),this.match(53)?(s.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(s.readonly=!0),this.expect(0),s.typeParameter=this.tsParseMappedTypeParameter(),s.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(s.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(s.optional=!0),s.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(s,"TSMappedType")},i.tsParseTupleType=function(){var s=this,A=this.startNode();A.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);var d=!1;return A.elementTypes.forEach(function(c){var f=c.type;d&&f!=="TSRestType"&&f!=="TSOptionalType"&&!(f==="TSNamedTupleMember"&&c.optional)&&s.raise(ga.OptionalTypeBeforeRequired,c),d||(d=f==="TSNamedTupleMember"&&c.optional||f==="TSOptionalType")}),this.finishNode(A,"TSTupleType")},i.tsParseTupleElementType=function(){var s=this.state.startLoc,A=this.eat(21),d,c,f,x,g=mc(this.state.type),m=g?this.lookaheadCharCode():null;if(m===58)d=!0,f=!1,c=this.parseIdentifier(!0),this.expect(14),x=this.tsParseType();else if(m===63){f=!0;var B=this.state.startLoc,b=this.state.value,_=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(d=!0,c=this.createIdentifier(this.startNodeAt(B),b),this.expect(17),this.expect(14),x=this.tsParseType()):(d=!1,x=_,this.expect(17))}else x=this.tsParseType(),f=this.eat(17),d=this.eat(14);if(d){var C;c?(C=this.startNodeAtNode(c),C.optional=f,C.label=c,C.elementType=x,this.eat(17)&&(C.optional=!0,this.raise(ga.TupleOptionalAfterType,this.state.lastTokStartLoc))):(C=this.startNodeAtNode(x),C.optional=f,this.raise(ga.InvalidTupleMemberLabel,x),C.label=x,C.elementType=this.tsParseType()),x=this.finishNode(C,"TSNamedTupleMember")}else if(f){var w=this.startNodeAtNode(x);w.typeAnnotation=x,x=this.finishNode(w,"TSOptionalType")}if(A){var P=this.startNodeAt(s);P.typeAnnotation=x,x=this.finishNode(P,"TSRestType")}return x},i.tsParseParenthesizedType=function(){var s=this.startNode();return this.expect(10),s.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(s,"TSParenthesizedType")},i.tsParseFunctionOrConstructorType=function(s,A){var d=this,c=this.startNode();return s==="TSConstructorType"&&(c.abstract=!!A,A&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(function(){return d.tsFillSignature(19,c)}),this.finishNode(c,s)},i.tsParseLiteralTypeNode=function(){var s=this.startNode();switch(this.state.type){case 134:case 135:case 133:case 85:case 86:s.literal=t.prototype.parseExprAtom.call(this);break;default:this.unexpected()}return this.finishNode(s,"TSLiteralType")},i.tsParseTemplateLiteralType=function(){var s=this.startNode();return s.literal=t.prototype.parseTemplate.call(this,!1),this.finishNode(s,"TSLiteralType")},i.parseTemplateSubstitution=function(){return this.state.inType?this.tsParseType():t.prototype.parseTemplateSubstitution.call(this)},i.tsParseThisTypeOrThisTypePredicate=function(){var s=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(s):s},i.tsParseNonArrayType=function(){switch(this.state.type){case 133:case 134:case 135:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){var s=this.startNode(),A=this.lookahead();return A.type!==134&&A.type!==135&&this.unexpected(),s.literal=this.parseMaybeUnary(),this.finishNode(s,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{var d=this.state.type;if(Ls(d)||d===88||d===84){var c=d===88?"TSVoidKeyword":d===84?"TSNullKeyword":iBe(this.state.value);if(c!==void 0&&this.lookaheadCharCode()!==46){var f=this.startNode();return this.next(),this.finishNode(f,c)}return this.tsParseTypeReference()}}}this.unexpected()},i.tsParseArrayTypeOrHigher=function(){for(var s=this.tsParseNonArrayType();!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){var A=this.startNodeAtNode(s);A.elementType=s,this.expect(3),s=this.finishNode(A,"TSArrayType")}else{var d=this.startNodeAtNode(s);d.objectType=s,d.indexType=this.tsParseType(),this.expect(3),s=this.finishNode(d,"TSIndexedAccessType")}return s},i.tsParseTypeOperator=function(){var s=this.startNode(),A=this.state.value;return this.next(),s.operator=A,s.typeAnnotation=this.tsParseTypeOperatorOrHigher(),A==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(s),this.finishNode(s,"TSTypeOperator")},i.tsCheckTypeAnnotationForReadOnly=function(s){switch(s.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(ga.UnexpectedReadonly,s)}},i.tsParseInferType=function(){var s=this,A=this.startNode();this.expectContextual(115);var d=this.startNode();return d.name=this.tsParseTypeParameterName(),d.constraint=this.tsTryParse(function(){return s.tsParseConstraintForInferType()}),A.typeParameter=this.finishNode(d,"TSTypeParameter"),this.finishNode(A,"TSInferType")},i.tsParseConstraintForInferType=function(){var s=this;if(this.eat(81)){var A=this.tsInDisallowConditionalTypesContext(function(){return s.tsParseType()});if(this.state.inDisallowConditionalTypesContext||!this.match(17))return A}},i.tsParseTypeOperatorOrHigher=function(){var s=this,A=g7e(this.state.type)&&!this.state.containsEsc;return A?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(function(){return s.tsParseArrayTypeOrHigher()})},i.tsParseUnionOrIntersectionType=function(s,A,d){var c=this.startNode(),f=this.eat(d),x=[];do x.push(A());while(this.eat(d));return x.length===1&&!f?x[0]:(c.types=x,this.finishNode(c,s))},i.tsParseIntersectionTypeOrHigher=function(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)},i.tsParseUnionTypeOrHigher=function(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)},i.tsIsStartOfFunctionType=function(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))},i.tsSkipParameterStart=function(){if(Ls(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){var s=this.state.errors,A=s.length;try{return this.parseObjectLike(8,!0),s.length===A}catch{return!1}}if(this.match(0)){this.next();var d=this.state.errors,c=d.length;try{return t.prototype.parseBindingList.call(this,3,93,mx.ALLOW_EMPTY),d.length===c}catch{return!1}}return!1},i.tsIsUnambiguouslyStartOfFunctionType=function(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))},i.tsParseTypeOrTypePredicateAnnotation=function(s){var A=this;return this.tsInType(function(){var d=A.startNode();A.expect(s);var c=A.startNode(),f=!!A.tsTryParse(A.tsParseTypePredicateAsserts.bind(A));if(f&&A.match(78)){var x=A.tsParseThisTypeOrThisTypePredicate();return x.type==="TSThisType"?(c.parameterName=x,c.asserts=!0,c.typeAnnotation=null,x=A.finishNode(c,"TSTypePredicate")):(A.resetStartLocationFromNode(x,c),x.asserts=!0),d.typeAnnotation=x,A.finishNode(d,"TSTypeAnnotation")}var g=A.tsIsIdentifier()&&A.tsTryParse(A.tsParseTypePredicatePrefix.bind(A));if(!g)return f?(c.parameterName=A.parseIdentifier(),c.asserts=f,c.typeAnnotation=null,d.typeAnnotation=A.finishNode(c,"TSTypePredicate"),A.finishNode(d,"TSTypeAnnotation")):A.tsParseTypeAnnotation(!1,d);var m=A.tsParseTypeAnnotation(!1);return c.parameterName=g,c.typeAnnotation=m,c.asserts=f,d.typeAnnotation=A.finishNode(c,"TSTypePredicate"),A.finishNode(d,"TSTypeAnnotation")})},i.tsTryParseTypeOrTypePredicateAnnotation=function(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)},i.tsTryParseTypeAnnotation=function(){if(this.match(14))return this.tsParseTypeAnnotation()},i.tsTryParseType=function(){return this.tsEatThenParseType(14)},i.tsParseTypePredicatePrefix=function(){var s=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),s},i.tsParseTypePredicateAsserts=function(){if(this.state.type!==109)return!1;var s=this.state.containsEsc;return this.next(),!Ls(this.state.type)&&!this.match(78)?!1:(s&&this.raise(ft.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)},i.tsParseTypeAnnotation=function(s,A){var d=this;return s===void 0&&(s=!0),A===void 0&&(A=this.startNode()),this.tsInType(function(){s&&d.expect(14),A.typeAnnotation=d.tsParseType()}),this.finishNode(A,"TSTypeAnnotation")},i.tsParseType=function(){var s=this;KX(this.state.inType);var A=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return A;var d=this.startNodeAtNode(A);return d.checkType=A,d.extendsType=this.tsInDisallowConditionalTypesContext(function(){return s.tsParseNonConditionalType()}),this.expect(17),d.trueType=this.tsInAllowConditionalTypesContext(function(){return s.tsParseType()}),this.expect(14),d.falseType=this.tsInAllowConditionalTypesContext(function(){return s.tsParseType()}),this.finishNode(d,"TSConditionalType")},i.isAbstractConstructorSignature=function(){return this.isContextual(124)&&this.lookahead().type===77},i.tsParseNonConditionalType=function(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()},i.tsParseTypeAssertion=function(){var s=this;this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(ga.ReservedTypeAssertion,this.state.startLoc);var A=this.startNode();return A.typeAnnotation=this.tsInType(function(){return s.next(),s.match(75)?s.tsParseTypeReference():s.tsParseType()}),this.expect(48),A.expression=this.parseMaybeUnary(),this.finishNode(A,"TSTypeAssertion")},i.tsParseHeritageClause=function(s){var A=this,d=this.state.startLoc,c=this.tsParseDelimitedList("HeritageClauseElement",function(){var f=A.startNode();return f.expression=A.tsParseEntityName(),A.match(47)&&(f.typeParameters=A.tsParseTypeArguments()),A.finishNode(f,"TSExpressionWithTypeArguments")});return c.length||this.raise(ga.EmptyHeritageClauseType,d,{token:s}),c},i.tsParseInterfaceDeclaration=function(s,A){if(A===void 0&&(A={}),this.hasFollowingLineBreak())return null;this.expectContextual(129),A.declare&&(s.declare=!0),Ls(this.state.type)?(s.id=this.parseIdentifier(),this.checkIdentifier(s.id,wa.TYPE_TS_INTERFACE)):(s.id=null,this.raise(ga.MissingInterfaceName,this.state.startLoc)),s.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(s.extends=this.tsParseHeritageClause("extends"));var d=this.startNode();return d.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),s.body=this.finishNode(d,"TSInterfaceBody"),this.finishNode(s,"TSInterfaceDeclaration")},i.tsParseTypeAliasDeclaration=function(s){var A=this;return s.id=this.parseIdentifier(),this.checkIdentifier(s.id,wa.TYPE_TS_TYPE),s.typeAnnotation=this.tsInType(function(){if(s.typeParameters=A.tsTryParseTypeParameters(A.tsParseInOutModifiers),A.expect(29),A.isContextual(114)&&A.lookahead().type!==16){var d=A.startNode();return A.next(),A.finishNode(d,"TSIntrinsicKeyword")}return A.tsParseType()}),this.semicolon(),this.finishNode(s,"TSTypeAliasDeclaration")},i.tsInNoContext=function(s){var A=this.state.context;this.state.context=[A[0]];try{return s()}finally{this.state.context=A}},i.tsInType=function(s){var A=this.state.inType;this.state.inType=!0;try{return s()}finally{this.state.inType=A}},i.tsInDisallowConditionalTypesContext=function(s){var A=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return s()}finally{this.state.inDisallowConditionalTypesContext=A}},i.tsInAllowConditionalTypesContext=function(s){var A=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return s()}finally{this.state.inDisallowConditionalTypesContext=A}},i.tsEatThenParseType=function(s){if(this.match(s))return this.tsNextThenParseType()},i.tsExpectThenParseType=function(s){var A=this;return this.tsInType(function(){return A.expect(s),A.tsParseType()})},i.tsNextThenParseType=function(){var s=this;return this.tsInType(function(){return s.next(),s.tsParseType()})},i.tsParseEnumMember=function(){var s=this.startNode();return s.id=this.match(133)?t.prototype.parseStringLiteral.call(this,this.state.value):this.parseIdentifier(!0),this.eat(29)&&(s.initializer=t.prototype.parseMaybeAssignAllowIn.call(this)),this.finishNode(s,"TSEnumMember")},i.tsParseEnumDeclaration=function(s,A){return A===void 0&&(A={}),A.const&&(s.const=!0),A.declare&&(s.declare=!0),this.expectContextual(126),s.id=this.parseIdentifier(),this.checkIdentifier(s.id,s.const?wa.TYPE_TS_CONST_ENUM:wa.TYPE_TS_ENUM),this.expect(5),s.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(s,"TSEnumDeclaration")},i.tsParseModuleBlock=function(){var s=this.startNode();return this.scope.enter(fn.OTHER),this.expect(5),t.prototype.parseBlockOrModuleBlockBody.call(this,s.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(s,"TSModuleBlock")},i.tsParseModuleOrNamespaceDeclaration=function(s,A){if(A===void 0&&(A=!1),s.id=this.parseIdentifier(),A||this.checkIdentifier(s.id,wa.TYPE_TS_NAMESPACE),this.eat(16)){var d=this.startNode();this.tsParseModuleOrNamespaceDeclaration(d,!0),s.body=d}else this.scope.enter(fn.TS_MODULE),this.prodParam.enter(So.PARAM),s.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(s,"TSModuleDeclaration")},i.tsParseAmbientExternalModuleDeclaration=function(s){return this.isContextual(112)?(s.global=!0,s.id=this.parseIdentifier()):this.match(133)?s.id=t.prototype.parseStringLiteral.call(this,this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(fn.TS_MODULE),this.prodParam.enter(So.PARAM),s.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(s,"TSModuleDeclaration")},i.tsParseImportEqualsDeclaration=function(s,A,d){s.isExport=d||!1,s.id=A||this.parseIdentifier(),this.checkIdentifier(s.id,wa.TYPE_TS_VALUE_IMPORT),this.expect(29);var c=this.tsParseModuleReference();return s.importKind==="type"&&c.type!=="TSExternalModuleReference"&&this.raise(ga.ImportAliasHasImportType,c),s.moduleReference=c,this.semicolon(),this.finishNode(s,"TSImportEqualsDeclaration")},i.tsIsExternalModuleReference=function(){return this.isContextual(119)&&this.lookaheadCharCode()===40},i.tsParseModuleReference=function(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)},i.tsParseExternalModuleReference=function(){var s=this.startNode();return this.expectContextual(119),this.expect(10),this.match(133)||this.unexpected(),s.expression=t.prototype.parseExprAtom.call(this),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(s,"TSExternalModuleReference")},i.tsLookAhead=function(s){var A=this.state.clone(),d=s();return this.state=A,d},i.tsTryParseAndCatch=function(s){var A=this.tryParse(function(d){return s()||d()});if(!(A.aborted||!A.node))return A.error&&(this.state=A.failState),A.node},i.tsTryParse=function(s){var A=this.state.clone(),d=s();if(d!==void 0&&d!==!1)return d;this.state=A},i.tsTryParseDeclare=function(s){var A=this;if(!this.isLineTerminator()){var d=this.state.type,c;return this.isContextual(100)&&(d=74,c="let"),this.tsInAmbientContext(function(){switch(d){case 68:return s.declare=!0,t.prototype.parseFunctionStatement.call(A,s,!1,!1);case 80:return s.declare=!0,A.parseClass(s,!0,!1);case 126:return A.tsParseEnumDeclaration(s,{declare:!0});case 112:return A.tsParseAmbientExternalModuleDeclaration(s);case 75:case 74:return!A.match(75)||!A.isLookaheadContextual("enum")?(s.declare=!0,A.parseVarStatement(s,c||A.state.value,!0)):(A.expect(75),A.tsParseEnumDeclaration(s,{const:!0,declare:!0}));case 129:{var f=A.tsParseInterfaceDeclaration(s,{declare:!0});if(f)return f}default:if(Ls(d))return A.tsParseDeclaration(s,A.state.value,!0,null)}})}},i.tsTryParseExportDeclaration=function(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)},i.tsParseExpressionStatement=function(s,A,d){switch(A.name){case"declare":{var c=this.tsTryParseDeclare(s);return c&&(c.declare=!0),c}case"global":if(this.match(5)){this.scope.enter(fn.TS_MODULE),this.prodParam.enter(So.PARAM);var f=s;return f.global=!0,f.id=A,f.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(f,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(s,A.name,!1,d)}},i.tsParseDeclaration=function(s,A,d,c){switch(A){case"abstract":if(this.tsCheckLineTerminator(d)&&(this.match(80)||Ls(this.state.type)))return this.tsParseAbstractDeclaration(s,c);break;case"module":if(this.tsCheckLineTerminator(d)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(s);if(Ls(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(s)}break;case"namespace":if(this.tsCheckLineTerminator(d)&&Ls(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(s);break;case"type":if(this.tsCheckLineTerminator(d)&&Ls(this.state.type))return this.tsParseTypeAliasDeclaration(s);break}},i.tsCheckLineTerminator=function(s){return s?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()},i.tsTryParseGenericAsyncArrowFunction=function(s){var A=this;if(this.match(47)){var d=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;var c=this.tsTryParseAndCatch(function(){var f=A.startNodeAt(s);return f.typeParameters=A.tsParseTypeParameters(A.tsParseConstModifier),t.prototype.parseFunctionParams.call(A,f),f.returnType=A.tsTryParseTypeOrTypePredicateAnnotation(),A.expect(19),f});if(this.state.maybeInArrowParameters=d,!!c)return t.prototype.parseArrowExpression.call(this,c,null,!0)}},i.tsParseTypeArgumentsInExpression=function(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()},i.tsParseTypeArguments=function(){var s=this,A=this.startNode();return A.params=this.tsInType(function(){return s.tsInNoContext(function(){return s.expect(47),s.tsParseDelimitedList("TypeParametersOrArguments",s.tsParseType.bind(s))})}),A.params.length===0?this.raise(ga.EmptyTypeArguments,A):!this.state.inType&&this.curContext()===ei.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(A,"TSTypeParameterInstantiation")},i.tsIsDeclarationStart=function(){return m7e(this.state.type)},i.isExportDefaultSpecifier=function(){return this.tsIsDeclarationStart()?!1:t.prototype.isExportDefaultSpecifier.call(this)},i.parseAssignableListItem=function(s,A){var d=this.state.startLoc,c={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},c);var f=c.accessibility,x=c.override,g=c.readonly;!(s&mx.IS_CONSTRUCTOR_PARAMS)&&(f||g||x)&&this.raise(ga.UnexpectedParameterModifier,d);var m=this.parseMaybeDefault();this.parseAssignableListItemTypes(m,s);var B=this.parseMaybeDefault(m.loc.start,m);if(f||g||x){var b=this.startNodeAt(d);return A.length&&(b.decorators=A),f&&(b.accessibility=f),g&&(b.readonly=g),x&&(b.override=x),B.type!=="Identifier"&&B.type!=="AssignmentPattern"&&this.raise(ga.UnsupportedParameterPropertyKind,b),b.parameter=B,this.finishNode(b,"TSParameterProperty")}return A.length&&(m.decorators=A),B},i.isSimpleParameter=function(s){return s.type==="TSParameterProperty"&&t.prototype.isSimpleParameter.call(this,s.parameter)||t.prototype.isSimpleParameter.call(this,s)},i.tsDisallowOptionalPattern=function(s){for(var A=0,d=s.params;A<d.length;A++){var c=d[A];c.type!=="Identifier"&&c.optional&&!this.state.isAmbientContext&&this.raise(ga.PatternIsOptional,c)}},i.setArrowFunctionParameters=function(s,A,d){t.prototype.setArrowFunctionParameters.call(this,s,A,d),this.tsDisallowOptionalPattern(s)},i.parseFunctionBodyAndFinish=function(s,A,d){d===void 0&&(d=!1),this.match(14)&&(s.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));var c=A==="FunctionDeclaration"?"TSDeclareFunction":A==="ClassMethod"||A==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return c&&!this.match(5)&&this.isLineTerminator()?this.finishNode(s,c):c==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(ga.DeclareFunctionHasImplementation,s),s.declare)?t.prototype.parseFunctionBodyAndFinish.call(this,s,c,d):(this.tsDisallowOptionalPattern(s),t.prototype.parseFunctionBodyAndFinish.call(this,s,A,d))},i.registerFunctionStatementId=function(s){!s.body&&s.id?this.checkIdentifier(s.id,wa.TYPE_TS_AMBIENT):t.prototype.registerFunctionStatementId.call(this,s)},i.tsCheckForInvalidTypeCasts=function(s){var A=this;s.forEach(function(d){d?.type==="TSTypeCastExpression"&&A.raise(ga.UnexpectedTypeAnnotation,d.typeAnnotation)})},i.toReferencedList=function(s,A){return this.tsCheckForInvalidTypeCasts(s),s},i.parseArrayLike=function(s,A,d,c){var f=t.prototype.parseArrayLike.call(this,s,A,d,c);return f.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(f.elements),f},i.parseSubscript=function(s,A,d,c){var f=this;if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();var x=this.startNodeAt(A);return x.expression=s,this.finishNode(x,"TSNonNullExpression")}var g=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(d)return c.stop=!0,s;c.optionalChainMember=g=!0,this.next()}if(this.match(47)||this.match(51)){var m,B=this.tsTryParseAndCatch(function(){if(!d&&f.atPossibleAsyncArrow(s)){var b=f.tsTryParseGenericAsyncArrowFunction(A);if(b)return b}var _=f.tsParseTypeArgumentsInExpression();if(_){if(g&&!f.match(10)){m=f.state.curPosition();return}if(D8(f.state.type)){var C=t.prototype.parseTaggedTemplateExpression.call(f,s,A,c);return C.typeParameters=_,C}if(!d&&f.eat(10)){var w=f.startNodeAt(A);return w.callee=s,w.arguments=f.parseCallExpressionArguments(11,!1),f.tsCheckForInvalidTypeCasts(w.arguments),w.typeParameters=_,c.optionalChainMember&&(w.optional=g),f.finishCallExpression(w,c.optionalChainMember)}var P=f.state.type;if(!(P===48||P===52||P!==10&&vT(P)&&!f.hasPrecedingLineBreak())){var M=f.startNodeAt(A);return M.expression=s,M.typeParameters=_,f.finishNode(M,"TSInstantiationExpression")}}});if(m&&this.unexpected(m,10),B)return B.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(ga.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),B}return t.prototype.parseSubscript.call(this,s,A,d,c)},i.parseNewCallee=function(s){var A;t.prototype.parseNewCallee.call(this,s);var d=s.callee;d.type==="TSInstantiationExpression"&&!((A=d.extra)!=null&&A.parenthesized)&&(s.typeParameters=d.typeParameters,s.callee=d.expression)},i.parseExprOp=function(s,A,d){var c=this,f;if(x8(58)>d&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(f=this.isContextual(120)))){var x=this.startNodeAt(A);return x.expression=s,x.typeAnnotation=this.tsInType(function(){return c.next(),c.match(75)?(f&&c.raise(ft.UnexpectedKeyword,c.state.startLoc,{keyword:"const"}),c.tsParseTypeReference()):c.tsParseType()}),this.finishNode(x,f?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(x,A,d)}return t.prototype.parseExprOp.call(this,s,A,d)},i.checkReservedWord=function(s,A,d,c){this.state.isAmbientContext||t.prototype.checkReservedWord.call(this,s,A,d,c)},i.checkImportReflection=function(s){t.prototype.checkImportReflection.call(this,s),s.module&&s.importKind!=="value"&&this.raise(ga.ImportReflectionHasImportType,s.specifiers[0].loc.start)},i.checkDuplicateExports=function(){},i.isPotentialImportPhase=function(s){if(t.prototype.isPotentialImportPhase.call(this,s))return!0;if(this.isContextual(130)){var A=this.lookaheadCharCode();return s?A===123||A===42:A!==61}return!s&&this.isContextual(87)},i.applyImportPhase=function(s,A,d,c){t.prototype.applyImportPhase.call(this,s,A,d,c),A?s.exportKind=d==="type"?"type":"value":s.importKind=d==="type"||d==="typeof"?d:"value"},i.parseImport=function(s){if(this.match(133))return s.importKind="value",t.prototype.parseImport.call(this,s);var A;if(Ls(this.state.type)&&this.lookaheadCharCode()===61)return s.importKind="value",this.tsParseImportEqualsDeclaration(s);if(this.isContextual(130)){var d=this.parseMaybeImportPhase(s,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(s,d);A=t.prototype.parseImportSpecifiersAndAfter.call(this,s,d)}else A=t.prototype.parseImport.call(this,s);return A.importKind==="type"&&A.specifiers.length>1&&A.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(ga.TypeImportCannotSpecifyDefaultAndNamed,A),A},i.parseExport=function(s,A){if(this.match(83)){this.next();var d=s,c=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?c=this.parseMaybeImportPhase(d,!1):d.importKind="value",this.tsParseImportEqualsDeclaration(d,c,!0)}else if(this.eat(29)){var f=s;return f.expression=t.prototype.parseExpression.call(this),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(f,"TSExportAssignment")}else if(this.eatContextual(93)){var x=s;return this.expectContextual(128),x.id=this.parseIdentifier(),this.semicolon(),this.finishNode(x,"TSNamespaceExportDeclaration")}else return t.prototype.parseExport.call(this,s,A)},i.isAbstractClass=function(){return this.isContextual(124)&&this.lookahead().type===80},i.parseExportDefaultExpression=function(){if(this.isAbstractClass()){var s=this.startNode();return this.next(),s.abstract=!0,this.parseClass(s,!0,!0)}if(this.match(129)){var A=this.tsParseInterfaceDeclaration(this.startNode());if(A)return A}return t.prototype.parseExportDefaultExpression.call(this)},i.parseVarStatement=function(s,A,d){d===void 0&&(d=!1);var c=this.state.isAmbientContext,f=t.prototype.parseVarStatement.call(this,s,A,d||c);if(!c)return f;for(var x=0,g=f.declarations;x<g.length;x++){var m=g[x],B=m.id,b=m.init;b&&(A!=="const"||B.typeAnnotation?this.raise(ga.InitializerNotAllowedInAmbientContext,b):lBe(b,this.hasPlugin("estree"))||this.raise(ga.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,b))}return f},i.parseStatementContent=function(s,A){if(this.match(75)&&this.isLookaheadContextual("enum")){var d=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(d,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){var c=this.tsParseInterfaceDeclaration(this.startNode());if(c)return c}return t.prototype.parseStatementContent.call(this,s,A)},i.parseAccessModifier=function(){return this.tsParseModifier(["public","protected","private"])},i.tsHasSomeModifiers=function(s,A){return A.some(function(d){return WX(d)?s.accessibility===d:!!s[d]})},i.tsIsStartOfStaticBlocks=function(){return this.isContextual(106)&&this.lookaheadCharCode()===123},i.parseClassMember=function(s,A,d){var c=this,f=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:f,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:ga.InvalidModifierOnTypeParameterPositions},A);var x=function(){c.tsIsStartOfStaticBlocks()?(c.next(),c.next(),c.tsHasSomeModifiers(A,f)&&c.raise(ga.StaticBlockCannotHaveModifier,c.state.curPosition()),t.prototype.parseClassStaticBlock.call(c,s,A)):c.parseClassMemberWithIsStatic(s,A,d,!!A.static)};A.declare?this.tsInAmbientContext(x):x()},i.parseClassMemberWithIsStatic=function(s,A,d,c){var f=this.tsTryParseIndexSignature(A);if(f){s.body.push(f),A.abstract&&this.raise(ga.IndexSignatureHasAbstract,A),A.accessibility&&this.raise(ga.IndexSignatureHasAccessibility,A,{modifier:A.accessibility}),A.declare&&this.raise(ga.IndexSignatureHasDeclare,A),A.override&&this.raise(ga.IndexSignatureHasOverride,A);return}!this.state.inAbstractClass&&A.abstract&&this.raise(ga.NonAbstractClassHasAbstractMethod,A),A.override&&(d.hadSuperClass||this.raise(ga.OverrideNotInSubClass,A)),t.prototype.parseClassMemberWithIsStatic.call(this,s,A,d,c)},i.parsePostMemberNameModifiers=function(s){var A=this.eat(17);A&&(s.optional=!0),s.readonly&&this.match(10)&&this.raise(ga.ClassMethodHasReadonly,s),s.declare&&this.match(10)&&this.raise(ga.ClassMethodHasDeclare,s)},i.parseExpressionStatement=function(s,A,d){var c=A.type==="Identifier"?this.tsParseExpressionStatement(s,A,d):void 0;return c||t.prototype.parseExpressionStatement.call(this,s,A,d)},i.shouldParseExportDeclaration=function(){return this.tsIsDeclarationStart()?!0:t.prototype.shouldParseExportDeclaration.call(this)},i.parseConditional=function(s,A,d){var c=this;if(!this.state.maybeInArrowParameters||!this.match(17))return t.prototype.parseConditional.call(this,s,A,d);var f=this.tryParse(function(){return t.prototype.parseConditional.call(c,s,A)});return f.node?(f.error&&(this.state=f.failState),f.node):(f.error&&t.prototype.setOptionalParametersError.call(this,d,f.error),s)},i.parseParenItem=function(s,A){var d=t.prototype.parseParenItem.call(this,s,A);if(this.eat(17)&&(d.optional=!0,this.resetEndLocation(s)),this.match(14)){var c=this.startNodeAt(A);return c.expression=s,c.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(c,"TSTypeCastExpression")}return s},i.parseExportDeclaration=function(s){var A=this;if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(function(){return A.parseExportDeclaration(s)});var d=this.state.startLoc,c=this.eatContextual(125);if(c&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(ga.ExpectedAmbientAfterExportDeclare,this.state.startLoc);var f=Ls(this.state.type),x=f&&this.tsTryParseExportDeclaration()||t.prototype.parseExportDeclaration.call(this,s);return x?((x.type==="TSInterfaceDeclaration"||x.type==="TSTypeAliasDeclaration"||c)&&(s.exportKind="type"),c&&(this.resetStartLocation(x,d),x.declare=!0),x):null},i.parseClassId=function(s,A,d,c){if(!((!A||d)&&this.isContextual(113))){t.prototype.parseClassId.call(this,s,A,d,s.declare?wa.TYPE_TS_AMBIENT:wa.TYPE_CLASS);var f=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);f&&(s.typeParameters=f)}},i.parseClassPropertyAnnotation=function(s){s.optional||(this.eat(35)?s.definite=!0:this.eat(17)&&(s.optional=!0));var A=this.tsTryParseTypeAnnotation();A&&(s.typeAnnotation=A)},i.parseClassProperty=function(s){if(this.parseClassPropertyAnnotation(s),this.state.isAmbientContext&&!(s.readonly&&!s.typeAnnotation)&&this.match(29)&&this.raise(ga.DeclareClassFieldHasInitializer,this.state.startLoc),s.abstract&&this.match(29)){var A=s.key;this.raise(ga.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:A.type==="Identifier"&&!s.computed?A.name:"["+this.input.slice(A.start,A.end)+"]"})}return t.prototype.parseClassProperty.call(this,s)},i.parseClassPrivateProperty=function(s){return s.abstract&&this.raise(ga.PrivateElementHasAbstract,s),s.accessibility&&this.raise(ga.PrivateElementHasAccessibility,s,{modifier:s.accessibility}),this.parseClassPropertyAnnotation(s),t.prototype.parseClassPrivateProperty.call(this,s)},i.parseClassAccessorProperty=function(s){return this.parseClassPropertyAnnotation(s),s.optional&&this.raise(ga.AccessorCannotBeOptional,s),t.prototype.parseClassAccessorProperty.call(this,s)},i.pushClassMethod=function(s,A,d,c,f,x){var g=this.tsTryParseTypeParameters(this.tsParseConstModifier);g&&f&&this.raise(ga.ConstructorHasTypeParameters,g);var m=A.declare,B=m===void 0?!1:m,b=A.kind;B&&(b==="get"||b==="set")&&this.raise(ga.DeclareAccessor,A,{kind:b}),g&&(A.typeParameters=g),t.prototype.pushClassMethod.call(this,s,A,d,c,f,x)},i.pushClassPrivateMethod=function(s,A,d,c){var f=this.tsTryParseTypeParameters(this.tsParseConstModifier);f&&(A.typeParameters=f),t.prototype.pushClassPrivateMethod.call(this,s,A,d,c)},i.declareClassPrivateMethodInScope=function(s,A){s.type!=="TSDeclareMethod"&&(s.type==="MethodDefinition"&&!hasOwnProperty.call(s.value,"body")||t.prototype.declareClassPrivateMethodInScope.call(this,s,A))},i.parseClassSuper=function(s){t.prototype.parseClassSuper.call(this,s),s.superClass&&(this.match(47)||this.match(51))&&(s.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(s.implements=this.tsParseHeritageClause("implements"))},i.parseObjPropValue=function(s,A,d,c,f,x,g){var m=this.tsTryParseTypeParameters(this.tsParseConstModifier);return m&&(s.typeParameters=m),t.prototype.parseObjPropValue.call(this,s,A,d,c,f,x,g)},i.parseFunctionParams=function(s,A){var d=this.tsTryParseTypeParameters(this.tsParseConstModifier);d&&(s.typeParameters=d),t.prototype.parseFunctionParams.call(this,s,A)},i.parseVarId=function(s,A){t.prototype.parseVarId.call(this,s,A),s.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(s.definite=!0);var d=this.tsTryParseTypeAnnotation();d&&(s.id.typeAnnotation=d,this.resetEndLocation(s.id))},i.parseAsyncArrowFromCallExpression=function(s,A){return this.match(14)&&(s.returnType=this.tsParseTypeAnnotation()),t.prototype.parseAsyncArrowFromCallExpression.call(this,s,A)},i.parseMaybeAssign=function(s,A){var d=this,c,f,x,g,m,B,b,_;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(B=this.state.clone(),b=this.tryParse(function(){return t.prototype.parseMaybeAssign.call(d,s,A)},B),!b.error)return b.node;var C=this.state.context,w=C[C.length-1];(w===ei.j_oTag||w===ei.j_expr)&&C.pop()}if(!((c=b)!=null&&c.error)&&!this.match(47))return t.prototype.parseMaybeAssign.call(this,s,A);(!B||B===this.state)&&(B=this.state.clone());var P,M=this.tryParse(function(N){var q,V;P=d.tsParseTypeParameters(d.tsParseConstModifier);var U=t.prototype.parseMaybeAssign.call(d,s,A);return(U.type!=="ArrowFunctionExpression"||(q=U.extra)!=null&&q.parenthesized)&&N(),((V=P)==null?void 0:V.params.length)!==0&&d.resetStartLocationFromNode(U,P),U.typeParameters=P,U},B);if(!M.error&&!M.aborted)return P&&this.reportReservedArrowTypeParam(P),M.node;if(!b&&(KX(!this.hasPlugin("jsx")),_=this.tryParse(function(){return t.prototype.parseMaybeAssign.call(d,s,A)},B),!_.error))return _.node;if((f=b)!=null&&f.node)return this.state=b.failState,b.node;if(M.node)return this.state=M.failState,P&&this.reportReservedArrowTypeParam(P),M.node;if((x=_)!=null&&x.node)return this.state=_.failState,_.node;throw((g=b)==null?void 0:g.error)||M.error||((m=_)==null?void 0:m.error)},i.reportReservedArrowTypeParam=function(s){var A;s.params.length===1&&!s.params[0].constraint&&!((A=s.extra)!=null&&A.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(ga.ReservedArrowTypeParam,s)},i.parseMaybeUnary=function(s,A){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():t.prototype.parseMaybeUnary.call(this,s,A)},i.parseArrow=function(s){var A=this;if(this.match(14)){var d=this.tryParse(function(c){var f=A.tsParseTypeOrTypePredicateAnnotation(14);return(A.canInsertSemicolon()||!A.match(19))&&c(),f});if(d.aborted)return;d.thrown||(d.error&&(this.state=d.failState),s.returnType=d.node)}return t.prototype.parseArrow.call(this,s)},i.parseAssignableListItemTypes=function(s,A){if(!(A&mx.IS_FUNCTION_PARAMS))return s;this.eat(17)&&(s.optional=!0);var d=this.tsTryParseTypeAnnotation();return d&&(s.typeAnnotation=d),this.resetEndLocation(s),s},i.isAssignable=function(s,A){switch(s.type){case"TSTypeCastExpression":return this.isAssignable(s.expression,A);case"TSParameterProperty":return!0;default:return t.prototype.isAssignable.call(this,s,A)}},i.toAssignable=function(s,A){switch(A===void 0&&(A=!1),s.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(s,A);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":A?this.expressionScope.recordArrowParameterBindingError(ga.UnexpectedTypeCastInParameter,s):this.raise(ga.UnexpectedTypeCastInParameter,s),this.toAssignable(s.expression,A);break;case"AssignmentExpression":!A&&s.left.type==="TSTypeCastExpression"&&(s.left=this.typeCastToParameter(s.left));default:t.prototype.toAssignable.call(this,s,A)}},i.toAssignableParenthesizedExpression=function(s,A){switch(s.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(s.expression,A);break;default:t.prototype.toAssignable.call(this,s,A)}},i.checkToRestConversion=function(s,A){switch(s.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(s.expression,!1);break;default:t.prototype.checkToRestConversion.call(this,s,A)}},i.isValidLVal=function(s,A,d){return nBe({TSTypeCastExpression:!0,TSParameterProperty:"parameter",TSNonNullExpression:"expression",TSInstantiationExpression:"expression",TSAsExpression:(d!==wa.TYPE_NONE||!A)&&["expression",!0],TSSatisfiesExpression:(d!==wa.TYPE_NONE||!A)&&["expression",!0],TSTypeAssertion:(d!==wa.TYPE_NONE||!A)&&["expression",!0]},s)||t.prototype.isValidLVal.call(this,s,A,d)},i.parseBindingAtom=function(){return this.state.type===78?this.parseIdentifier(!0):t.prototype.parseBindingAtom.call(this)},i.parseMaybeDecoratorArguments=function(s){if(this.match(47)||this.match(51)){var A=this.tsParseTypeArgumentsInExpression();if(this.match(10)){var d=t.prototype.parseMaybeDecoratorArguments.call(this,s);return d.typeParameters=A,d}this.unexpected(null,10)}return t.prototype.parseMaybeDecoratorArguments.call(this,s)},i.checkCommaAfterRest=function(s){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===s?(this.next(),!1):t.prototype.checkCommaAfterRest.call(this,s)},i.isClassMethod=function(){return this.match(47)||t.prototype.isClassMethod.call(this)},i.isClassProperty=function(){return this.match(35)||this.match(14)||t.prototype.isClassProperty.call(this)},i.parseMaybeDefault=function(s,A){var d=t.prototype.parseMaybeDefault.call(this,s,A);return d.type==="AssignmentPattern"&&d.typeAnnotation&&d.right.start<d.typeAnnotation.start&&this.raise(ga.TypeAnnotationAfterAssign,d.typeAnnotation),d},i.getTokenFromCode=function(s){if(this.state.inType){if(s===62){this.finishOp(48,1);return}if(s===60){this.finishOp(47,1);return}}t.prototype.getTokenFromCode.call(this,s)},i.reScan_lt_gt=function(){var s=this.state.type;s===47?(this.state.pos-=1,this.readToken_lt()):s===48&&(this.state.pos-=1,this.readToken_gt())},i.reScan_lt=function(){var s=this.state.type;return s===51?(this.state.pos-=2,this.finishOp(47,1),47):s},i.toAssignableList=function(s,A,d){for(var c=0;c<s.length;c++){var f=s[c];f?.type==="TSTypeCastExpression"&&(s[c]=this.typeCastToParameter(f))}t.prototype.toAssignableList.call(this,s,A,d)},i.typeCastToParameter=function(s){return s.expression.typeAnnotation=s.typeAnnotation,this.resetEndLocation(s.expression,s.typeAnnotation.loc.end),s.expression},i.shouldParseArrow=function(s){var A=this;return this.match(14)?s.every(function(d){return A.isAssignable(d,!0)}):t.prototype.shouldParseArrow.call(this,s)},i.shouldParseAsyncArrow=function(){return this.match(14)||t.prototype.shouldParseAsyncArrow.call(this)},i.canHaveLeadingDecorator=function(){return t.prototype.canHaveLeadingDecorator.call(this)||this.isAbstractClass()},i.jsxParseOpeningElementAfterName=function(s){var A=this;if(this.match(47)||this.match(51)){var d=this.tsTryParseAndCatch(function(){return A.tsParseTypeArgumentsInExpression()});d&&(s.typeParameters=d)}return t.prototype.jsxParseOpeningElementAfterName.call(this,s)},i.getGetterSetterExpectedParamCount=function(s){var A=t.prototype.getGetterSetterExpectedParamCount.call(this,s),d=this.getObjectOrClassMethodParams(s),c=d[0],f=c&&this.isThisParam(c);return f?A+1:A},i.parseCatchClauseParam=function(){var s=t.prototype.parseCatchClauseParam.call(this),A=this.tsTryParseTypeAnnotation();return A&&(s.typeAnnotation=A,this.resetEndLocation(s)),s},i.tsInAmbientContext=function(s){var A=this.state,d=A.isAmbientContext,c=A.strict;this.state.isAmbientContext=!0,this.state.strict=!1;try{return s()}finally{this.state.isAmbientContext=d,this.state.strict=c}},i.parseClass=function(s,A,d){var c=this.state.inAbstractClass;this.state.inAbstractClass=!!s.abstract;try{return t.prototype.parseClass.call(this,s,A,d)}finally{this.state.inAbstractClass=c}},i.tsParseAbstractDeclaration=function(s,A){if(this.match(80))return s.abstract=!0,this.maybeTakeDecorators(A,this.parseClass(s,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return s.abstract=!0,this.raise(ga.NonClassMethodPropertyHasAbstractModifer,s),this.tsParseInterfaceDeclaration(s)}else this.unexpected(null,80)},i.parseMethod=function(s,A,d,c,f,x,g){var m=t.prototype.parseMethod.call(this,s,A,d,c,f,x,g);if(m.abstract){var B=this.hasPlugin("estree")?!!m.value.body:!!m.body;if(B){var b=m.key;this.raise(ga.AbstractMethodHasImplementation,m,{methodName:b.type==="Identifier"&&!m.computed?b.name:"["+this.input.slice(b.start,b.end)+"]"})}}return m},i.tsParseTypeParameterName=function(){var s=this.parseIdentifier();return s.name},i.shouldParseAsAmbientContext=function(){return!!this.getPluginOption("typescript","dts")},i.parse=function(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),t.prototype.parse.call(this)},i.getExpression=function(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),t.prototype.getExpression.call(this)},i.parseExportSpecifier=function(s,A,d,c){return!A&&c?(this.parseTypeOnlyImportExportSpecifier(s,!1,d),this.finishNode(s,"ExportSpecifier")):(s.exportKind="value",t.prototype.parseExportSpecifier.call(this,s,A,d,c))},i.parseImportSpecifier=function(s,A,d,c,f){return!A&&c?(this.parseTypeOnlyImportExportSpecifier(s,!0,d),this.finishNode(s,"ImportSpecifier")):(s.importKind="value",t.prototype.parseImportSpecifier.call(this,s,A,d,c,d?wa.TYPE_TS_TYPE_IMPORT:wa.TYPE_TS_VALUE_IMPORT))},i.parseTypeOnlyImportExportSpecifier=function(s,A,d){var c=A?"imported":"local",f=A?"local":"exported",x=s[c],g,m=!1,B=!0,b=x.loc.start;if(this.isContextual(93)){var _=this.parseIdentifier();if(this.isContextual(93)){var C=this.parseIdentifier();mc(this.state.type)?(m=!0,x=_,g=A?this.parseIdentifier():this.parseModuleExportName(),B=!1):(g=C,B=!1)}else mc(this.state.type)?(B=!1,g=A?this.parseIdentifier():this.parseModuleExportName()):(m=!0,x=_)}else mc(this.state.type)&&(m=!0,A?(x=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(x.name,x.loc.start,!0,!0)):x=this.parseModuleExportName());m&&d&&this.raise(A?ga.TypeModifierIsUsedInTypeImports:ga.TypeModifierIsUsedInTypeExports,b),s[c]=x,s[f]=g;var w=A?"importKind":"exportKind";s[w]=m?"type":"value",B&&this.eatContextual(93)&&(s[f]=A?this.parseIdentifier():this.parseModuleExportName()),s[f]||(s[f]=$f(s[c])),A&&this.checkIdentifier(s[f],m?wa.TYPE_TS_TYPE_IMPORT:wa.TYPE_TS_VALUE_IMPORT)},T(n)}(e)};function ABe(e){if(e.type!=="MemberExpression")return!1;var t=e.computed,n=e.property;return t&&n.type!=="StringLiteral"&&(n.type!=="TemplateLiteral"||n.expressions.length>0)?!1:XX(e.object)}function lBe(e,t){var n,i=e.type;if((n=e.extra)!=null&&n.parenthesized)return!1;if(t){if(i==="Literal"){var o=e.value;if(typeof o=="string"||typeof o=="boolean")return!0}}else if(i==="StringLiteral"||i==="BooleanLiteral")return!0;return!!(zX(e,t)||dBe(e,t)||i==="TemplateLiteral"&&e.expressions.length===0||ABe(e))}function zX(e,t){return t?e.type==="Literal"&&(typeof e.value=="number"||"bigint"in e):e.type==="NumericLiteral"||e.type==="BigIntLiteral"}function dBe(e,t){if(e.type==="UnaryExpression"){var n=e.operator,i=e.argument;if(n==="-"&&zX(i,t))return!0}return!1}function XX(e){return e.type==="Identifier"?!0:e.type!=="MemberExpression"||e.computed?!1:XX(e.object)}var YX,QX=Pf(YX||(YX=H(["placeholders"])))({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),cBe=function(e){return function(t){function n(){return t.apply(this,arguments)||this}ue(n,t);var i=n.prototype;return i.parsePlaceholder=function(s){if(this.match(144)){var A=this.startNode();return this.next(),this.assertNoSpace(),A.name=t.prototype.parseIdentifier.call(this,!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(A,s)}},i.finishPlaceholder=function(s,A){var d=s;return(!d.expectedNode||!d.type)&&(d=this.finishNode(d,"Placeholder")),d.expectedNode=A,d},i.getTokenFromCode=function(s){s===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(144,2):t.prototype.getTokenFromCode.call(this,s)},i.parseExprAtom=function(s){return this.parsePlaceholder("Expression")||t.prototype.parseExprAtom.call(this,s)},i.parseIdentifier=function(s){return this.parsePlaceholder("Identifier")||t.prototype.parseIdentifier.call(this,s)},i.checkReservedWord=function(s,A,d,c){s!==void 0&&t.prototype.checkReservedWord.call(this,s,A,d,c)},i.parseBindingAtom=function(){return this.parsePlaceholder("Pattern")||t.prototype.parseBindingAtom.call(this)},i.isValidLVal=function(s,A,d){return s==="Placeholder"||t.prototype.isValidLVal.call(this,s,A,d)},i.toAssignable=function(s,A){s&&s.type==="Placeholder"&&s.expectedNode==="Expression"?s.expectedNode="Pattern":t.prototype.toAssignable.call(this,s,A)},i.chStartsBindingIdentifier=function(s,A){if(t.prototype.chStartsBindingIdentifier.call(this,s,A))return!0;var d=this.lookahead();return d.type===144},i.verifyBreakContinue=function(s,A){s.label&&s.label.type==="Placeholder"||t.prototype.verifyBreakContinue.call(this,s,A)},i.parseExpressionStatement=function(s,A){var d;if(A.type!=="Placeholder"||(d=A.extra)!=null&&d.parenthesized)return t.prototype.parseExpressionStatement.call(this,s,A);if(this.match(14)){var c=s;return c.label=this.finishPlaceholder(A,"Identifier"),this.next(),c.body=t.prototype.parseStatementOrSloppyAnnexBFunctionDeclaration.call(this),this.finishNode(c,"LabeledStatement")}this.semicolon();var f=s;return f.name=A.name,this.finishPlaceholder(f,"Statement")},i.parseBlock=function(s,A,d){return this.parsePlaceholder("BlockStatement")||t.prototype.parseBlock.call(this,s,A,d)},i.parseFunctionId=function(s){return this.parsePlaceholder("Identifier")||t.prototype.parseFunctionId.call(this,s)},i.parseClass=function(s,A,d){var c=A?"ClassDeclaration":"ClassExpression";this.next();var f=this.state.strict,x=this.parsePlaceholder("Identifier");if(x)if(this.match(81)||this.match(144)||this.match(5))s.id=x;else{if(d||!A)return s.id=null,s.body=this.finishPlaceholder(x,"ClassBody"),this.finishNode(s,c);throw this.raise(QX.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(s,A,d);return t.prototype.parseClassSuper.call(this,s),s.body=this.parsePlaceholder("ClassBody")||t.prototype.parseClassBody.call(this,!!s.superClass,f),this.finishNode(s,c)},i.parseExport=function(s,A){var d=this.parsePlaceholder("Identifier");if(!d)return t.prototype.parseExport.call(this,s,A);var c=s;if(!this.isContextual(98)&&!this.match(12))return c.specifiers=[],c.source=null,c.declaration=this.finishPlaceholder(d,"Declaration"),this.finishNode(c,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");var f=this.startNode();return f.exported=d,c.specifiers=[this.finishNode(f,"ExportDefaultSpecifier")],t.prototype.parseExport.call(this,c,A)},i.isExportDefaultSpecifier=function(){if(this.match(65)){var s=this.nextTokenStart();if(this.isUnparsedContextual(s,"from")&&this.input.startsWith(hx(144),this.nextTokenStartSince(s+4)))return!0}return t.prototype.isExportDefaultSpecifier.call(this)},i.maybeParseExportDefaultSpecifier=function(s,A){var d;return(d=s.specifiers)!=null&&d.length?!0:t.prototype.maybeParseExportDefaultSpecifier.call(this,s,A)},i.checkExport=function(s){var A=s.specifiers;A!=null&&A.length&&(s.specifiers=A.filter(function(d){return d.exported.type==="Placeholder"})),t.prototype.checkExport.call(this,s),s.specifiers=A},i.parseImport=function(s){var A=this.parsePlaceholder("Identifier");if(!A)return t.prototype.parseImport.call(this,s);if(s.specifiers=[],!this.isContextual(98)&&!this.match(12))return s.source=this.finishPlaceholder(A,"StringLiteral"),this.semicolon(),this.finishNode(s,"ImportDeclaration");var d=this.startNodeAtNode(A);if(d.local=A,s.specifiers.push(this.finishNode(d,"ImportDefaultSpecifier")),this.eat(12)){var c=this.maybeParseStarImportSpecifier(s);c||this.parseNamedImportSpecifiers(s)}return this.expectContextual(98),s.source=this.parseImportSource(),this.semicolon(),this.finishNode(s,"ImportDeclaration")},i.parseImportSource=function(){return this.parsePlaceholder("StringLiteral")||t.prototype.parseImportSource.call(this)},i.assertNoSpace=function(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(QX.UnexpectedSpace,this.state.lastTokEndLoc)},T(n)}(e)},fBe=function(e){return function(t){function n(){return t.apply(this,arguments)||this}ue(n,t);var i=n.prototype;return i.parseV8Intrinsic=function(){if(this.match(54)){var s=this.state.startLoc,A=this.startNode();if(this.next(),Ls(this.state.type)){var d=this.parseIdentifierName(),c=this.createIdentifier(A,d);if(c.type="V8IntrinsicIdentifier",this.match(10))return c}this.unexpected(s)}},i.parseExprAtom=function(s){return this.parseV8Intrinsic()||t.prototype.parseExprAtom.call(this,s)},T(n)}(e)};function ko(e,t){var n=typeof t=="string"?[t,{}]:t,i=n[0],o=n[1],s=Object.keys(o),A=s.length===0;return e.some(function(d){if(typeof d=="string")return A&&d===i;var c=d[0],f=d[1];if(c!==i)return!1;for(var x=0;x<s.length;x++){var g=s[x];if(f[g]!==o[g])return!1}return!0})}function mh(e,t,n){var i=e.find(function(o){return Array.isArray(o)?o[0]===t:o===t});return i&&Array.isArray(i)&&i.length>1?i[1][n]:null}var JX=["minimal","fsharp","hack","smart"],ZX=["^^","@@","^","%","#"];function pBe(e){if(ko(e,"decorators")){if(ko(e,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");var t=mh(e,"decorators","decoratorsBeforeExport");if(t!=null&&typeof t!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");var n=mh(e,"decorators","allowCallParenthesized");if(n!=null&&typeof n!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(ko(e,"flow")&&ko(e,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(ko(e,"placeholders")&&ko(e,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(ko(e,"pipelineOperator")){var i=mh(e,"pipelineOperator","proposal");if(!JX.includes(i)){var o=JX.map(function(B){return'"'+B+'"'}).join(", ");throw new Error('"pipelineOperator" requires "proposal" option whose value must be one of: '+o+".")}var s=["recordAndTuple",{syntaxType:"hash"}],A=ko(e,s);if(i==="hack"){if(ko(e,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(ko(e,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");var d=mh(e,"pipelineOperator","topicToken");if(!ZX.includes(d)){var c=ZX.map(function(B){return'"'+B+'"'}).join(", ");throw new Error('"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: '+c+".")}if(d==="#"&&A)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `'+JSON.stringify(s)+"`.")}else if(i==="smart"&&A)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `'+JSON.stringify(s)+"`.")}if(ko(e,"moduleAttributes")){if(ko(e,"importAssertions")||ko(e,"importAttributes"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");var f=mh(e,"moduleAttributes","version");if(f!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(ko(e,"importAssertions")&&ko(e,"importAttributes"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(ko(e,"recordAndTuple")){var x=mh(e,"recordAndTuple","syntaxType");if(x!=null){var g=["hash","bar"];if(!g.includes(x))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+g.map(function(B){return"'"+B+"'"}).join(", "))}}if(ko(e,"asyncDoExpressions")&&!ko(e,"doExpressions")){var m=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw m.missingPlugins="doExpressions",m}if(ko(e,"optionalChainingAssign")&&mh(e,"optionalChainingAssign","version")!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}var eY={estree:A7e,jsx:J7e,flow:Y7e,typescript:uBe,v8intrinsic:fBe,placeholders:cBe},xBe=Object.keys(eY),kT={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};function DBe(e){if(e==null)return Object.assign({},kT);if(e.annexB!=null&&e.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(var t={},n=0,i=Object.keys(kT);n<i.length;n++){var o,s=i[n];t[s]=(o=e[s])!=null?o:kT[s]}return t}var hBe=function(e){function t(){return e.apply(this,arguments)||this}ue(t,e);var n=t.prototype;return n.checkProto=function(o,s,A,d){if(!(o.type==="SpreadElement"||this.isObjectMethod(o)||o.computed||o.shorthand)){var c=o.key,f=c.type==="Identifier"?c.name:c.value;if(f==="__proto__"){if(s){this.raise(ft.RecordNoProto,c);return}A.used&&(d?d.doubleProtoLoc===null&&(d.doubleProtoLoc=c.loc.start):this.raise(ft.DuplicateProto,c)),A.used=!0}}},n.shouldExitDescending=function(o,s){return o.type==="ArrowFunctionExpression"&&o.start===s},n.getExpression=function(){this.enterInitialScopes(),this.nextToken();var o=this.parseExpression();return this.match(139)||this.unexpected(),this.finalizeRemainingComments(),o.comments=this.comments,o.errors=this.state.errors,this.options.tokens&&(o.tokens=this.tokens),o},n.parseExpression=function(o,s){var A=this;return o?this.disallowInAnd(function(){return A.parseExpressionBase(s)}):this.allowInAnd(function(){return A.parseExpressionBase(s)})},n.parseExpressionBase=function(o){var s=this.state.startLoc,A=this.parseMaybeAssign(o);if(this.match(12)){var d=this.startNodeAt(s);for(d.expressions=[A];this.eat(12);)d.expressions.push(this.parseMaybeAssign(o));return this.toReferencedList(d.expressions),this.finishNode(d,"SequenceExpression")}return A},n.parseMaybeAssignDisallowIn=function(o,s){var A=this;return this.disallowInAnd(function(){return A.parseMaybeAssign(o,s)})},n.parseMaybeAssignAllowIn=function(o,s){var A=this;return this.allowInAnd(function(){return A.parseMaybeAssign(o,s)})},n.setOptionalParametersError=function(o,s){var A;o.optionalParametersLoc=(A=s?.loc)!=null?A:this.state.startLoc},n.parseMaybeAssign=function(o,s){var A=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){var d=this.parseYield();return s&&(d=s.call(this,d,A)),d}var c;o?c=!1:(o=new y8,c=!0);var f=this.state.type;(f===10||Ls(f))&&(this.state.potentialArrowAt=this.state.start);var x=this.parseMaybeConditional(o);if(s&&(x=s.call(this,x,A)),p7e(this.state.type)){var g=this.startNodeAt(A),m=this.state.value;if(g.operator=m,this.match(29)){this.toAssignable(x,!0),g.left=x;var B=A.index;o.doubleProtoLoc!=null&&o.doubleProtoLoc.index>=B&&(o.doubleProtoLoc=null),o.shorthandAssignLoc!=null&&o.shorthandAssignLoc.index>=B&&(o.shorthandAssignLoc=null),o.privateKeyLoc!=null&&o.privateKeyLoc.index>=B&&(this.checkDestructuringPrivate(o),o.privateKeyLoc=null)}else g.left=x;return this.next(),g.right=this.parseMaybeAssign(),this.checkLVal(x,{in:this.finishNode(g,"AssignmentExpression")}),g}else c&&this.checkExpressionErrors(o,!0);return x},n.parseMaybeConditional=function(o){var s=this.state.startLoc,A=this.state.potentialArrowAt,d=this.parseExprOps(o);return this.shouldExitDescending(d,A)?d:this.parseConditional(d,s,o)},n.parseConditional=function(o,s,A){if(this.eat(17)){var d=this.startNodeAt(s);return d.test=o,d.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),d.alternate=this.parseMaybeAssign(),this.finishNode(d,"ConditionalExpression")}return o},n.parseMaybeUnaryOrPrivate=function(o){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(o)},n.parseExprOps=function(o){var s=this.state.startLoc,A=this.state.potentialArrowAt,d=this.parseMaybeUnaryOrPrivate(o);return this.shouldExitDescending(d,A)?d:this.parseExprOp(d,s,-1)},n.parseExprOp=function(o,s,A){if(this.isPrivateName(o)){var d=this.getPrivateNameSV(o);(A>=x8(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(ft.PrivateInExpectedIn,o,{identifierName:d}),this.classScope.usePrivateName(d,o.loc.start)}var c=this.state.type;if(D7e(c)&&(this.prodParam.hasIn||!this.match(58))){var f=x8(c);if(f>A){if(c===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return o;this.checkPipelineAtInfixOperator(o,s)}var x=this.startNodeAt(s);x.left=o,x.operator=this.state.value;var g=c===41||c===42,m=c===40;if(m&&(f=x8(42)),this.next(),c===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(ft.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);x.right=this.parseExprOpRightExpr(c,f);var B=this.finishNode(x,g||m?"LogicalExpression":"BinaryExpression"),b=this.state.type;if(m&&(b===41||b===42)||g&&b===40)throw this.raise(ft.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(B,s,A)}}return o},n.parseExprOpRightExpr=function(o,s){var A=this,d=this.state.startLoc;switch(o){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(function(){return A.parseHackPipeBody()});case"smart":return this.withTopicBindingContext(function(){if(A.prodParam.hasYield&&A.isContextual(108))throw A.raise(ft.PipeBodyIsTighter,A.state.startLoc);return A.parseSmartPipelineBodyInStyle(A.parseExprOpBaseRightExpr(o,s),d)});case"fsharp":return this.withSoloAwaitPermittingContext(function(){return A.parseFSharpPipelineBody(s)})}default:return this.parseExprOpBaseRightExpr(o,s)}},n.parseExprOpBaseRightExpr=function(o,s){var A=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),A,y7e(o)?s-1:s)},n.parseHackPipeBody=function(){var o,s=this.state.startLoc,A=this.parseMaybeAssign(),d=a7e.has(A.type);return d&&!((o=A.extra)!=null&&o.parenthesized)&&this.raise(ft.PipeUnparenthesizedBody,s,{type:A.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(ft.PipeTopicUnused,s),A},n.checkExponentialAfterUnary=function(o){this.match(57)&&this.raise(ft.UnexpectedTokenUnaryExponentiation,o.argument)},n.parseMaybeUnary=function(o,s){var A=this.state.startLoc,d=this.isContextual(96);if(d&&this.isAwaitAllowed()){this.next();var c=this.parseAwait(A);return s||this.checkExponentialAfterUnary(c),c}var f=this.match(34),x=this.startNode();if(j7e(this.state.type)){x.operator=this.state.value,x.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");var g=this.match(89);if(this.next(),x.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(o,!0),this.state.strict&&g){var m=x.argument;m.type==="Identifier"?this.raise(ft.StrictDelete,x):this.hasPropertyAsPrivateName(m)&&this.raise(ft.DeletePrivateField,x)}if(!f)return s||this.checkExponentialAfterUnary(x),this.finishNode(x,"UnaryExpression")}var B=this.parseUpdate(x,f,o);if(d){var b=this.state.type,_=this.hasPlugin("v8intrinsic")?vT(b):vT(b)&&!this.match(54);if(_&&!this.isAmbiguousAwait())return this.raiseOverwrite(ft.AwaitNotInAsyncContext,A),this.parseAwait(A)}return B},n.parseUpdate=function(o,s,A){if(s){var d=o;return this.checkLVal(d.argument,{in:this.finishNode(d,"UpdateExpression")}),o}var c=this.state.startLoc,f=this.parseExprSubscripts(A);if(this.checkExpressionErrors(A,!1))return f;for(;h7e(this.state.type)&&!this.canInsertSemicolon();){var x=this.startNodeAt(c);x.operator=this.state.value,x.prefix=!1,x.argument=f,this.next(),this.checkLVal(f,{in:f=this.finishNode(x,"UpdateExpression")})}return f},n.parseExprSubscripts=function(o){var s=this.state.startLoc,A=this.state.potentialArrowAt,d=this.parseExprAtom(o);return this.shouldExitDescending(d,A)?d:this.parseSubscripts(d,s)},n.parseSubscripts=function(o,s,A){var d={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(o),stop:!1};do o=this.parseSubscript(o,s,A,d),d.maybeAsyncArrow=!1;while(!d.stop);return o},n.parseSubscript=function(o,s,A,d){var c=this.state.type;if(!A&&c===15)return this.parseBind(o,s,A,d);if(D8(c))return this.parseTaggedTemplateExpression(o,s,d);var f=!1;if(c===18){if(A&&(this.raise(ft.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return d.stop=!0,o;d.optionalChainMember=f=!0,this.next()}if(!A&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(o,s,d,f);var x=this.eat(0);return x||f||this.eat(16)?this.parseMember(o,s,d,x,f):(d.stop=!0,o)},n.parseMember=function(o,s,A,d,c){var f=this.startNodeAt(s);return f.object=o,f.computed=d,d?(f.property=this.parseExpression(),this.expect(3)):this.match(138)?(o.type==="Super"&&this.raise(ft.SuperPrivateField,s),this.classScope.usePrivateName(this.state.value,this.state.startLoc),f.property=this.parsePrivateName()):f.property=this.parseIdentifier(!0),A.optionalChainMember?(f.optional=c,this.finishNode(f,"OptionalMemberExpression")):this.finishNode(f,"MemberExpression")},n.parseBind=function(o,s,A,d){var c=this.startNodeAt(s);return c.object=o,this.next(),c.callee=this.parseNoCallExpr(),d.stop=!0,this.parseSubscripts(this.finishNode(c,"BindExpression"),s,A)},n.parseCoverCallAndAsyncArrowHead=function(o,s,A,d){var c=this.state.maybeInArrowParameters,f=null;this.state.maybeInArrowParameters=!0,this.next();var x=this.startNodeAt(s);x.callee=o;var g=A.maybeAsyncArrow,m=A.optionalChainMember;g&&(this.expressionScope.enter(L7e()),f=new y8),m&&(x.optional=d),d?x.arguments=this.parseCallExpressionArguments(11):x.arguments=this.parseCallExpressionArguments(11,o.type==="Import",o.type!=="Super",x,f);var B=this.finishCallExpression(x,m);return g&&this.shouldParseAsyncArrow()&&!d?(A.stop=!0,this.checkDestructuringPrivate(f),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),B=this.parseAsyncArrowFromCallExpression(this.startNodeAt(s),B)):(g&&(this.checkExpressionErrors(f,!0),this.expressionScope.exit()),this.toReferencedArguments(B)),this.state.maybeInArrowParameters=c,B},n.toReferencedArguments=function(o,s){this.toReferencedListDeep(o.arguments,s)},n.parseTaggedTemplateExpression=function(o,s,A){var d=this.startNodeAt(s);return d.tag=o,d.quasi=this.parseTemplate(!0),A.optionalChainMember&&this.raise(ft.OptionalChainingNoTemplate,s),this.finishNode(d,"TaggedTemplateExpression")},n.atPossibleAsyncArrow=function(o){return o.type==="Identifier"&&o.name==="async"&&this.state.lastTokEndLoc.index===o.end&&!this.canInsertSemicolon()&&o.end-o.start===5&&o.start===this.state.potentialArrowAt},n.expectImportAttributesPlugin=function(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")},n.finishCallExpression=function(o,s){if(o.callee.type==="Import")if(o.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),o.arguments.length===0||o.arguments.length>2)this.raise(ft.ImportCallArity,o,{maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(var A=0,d=o.arguments;A<d.length;A++){var c=d[A];c.type==="SpreadElement"&&this.raise(ft.ImportCallSpreadArgument,c)}return this.finishNode(o,s?"OptionalCallExpression":"CallExpression")},n.parseCallExpressionArguments=function(o,s,A,d,c){var f=[],x=!0,g=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(o);){if(x)x=!1;else if(this.expect(12),this.match(o)){s&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(ft.ImportCallArgumentTrailingComma,this.state.lastTokStartLoc),d&&this.addTrailingCommaExtraToNode(d),this.next();break}f.push(this.parseExprListItem(!1,c,A))}return this.state.inFSharpPipelineDirectBody=g,f},n.shouldParseAsyncArrow=function(){return this.match(19)&&!this.canInsertSemicolon()},n.parseAsyncArrowFromCallExpression=function(o,s){var A;return this.resetPreviousNodeTrailingComments(s),this.expect(19),this.parseArrowExpression(o,s.arguments,!0,(A=s.extra)==null?void 0:A.trailingCommaLoc),s.innerComments&&PF(o,s.innerComments),s.callee.trailingComments&&PF(o,s.callee.trailingComments),o},n.parseNoCallExpr=function(){var o=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),o,!0)},n.parseExprAtom=function(o){var s,A=null,d=this.state.type;switch(d){case 79:return this.parseSuper();case 83:return s=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(s):this.match(10)?this.options.createImportExpressions?this.parseImportCall(s):this.finishNode(s,"Import"):(this.raise(ft.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(s,"Import"));case 78:return s=this.startNode(),this.next(),this.finishNode(s,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 134:return this.parseNumericLiteral(this.state.value);case 135:return this.parseBigIntLiteral(this.state.value);case 136:return this.parseDecimalLiteral(this.state.value);case 133:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{var c=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(c)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,o);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,o);case 68:return this.parseFunctionOrFunctionSent();case 26:A=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(A,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{s=this.startNode(),this.next(),s.object=null;var f=s.callee=this.parseNoCallExpr();if(f.type==="MemberExpression")return this.finishNode(s,"BindExpression");throw this.raise(ft.UnsupportedBind,f)}case 138:return this.raise(ft.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{var x=this.getPluginOption("pipelineOperator","proposal");if(x)return this.parseTopicReference(x);this.unexpected();break}case 47:{var g=this.input.codePointAt(this.nextTokenStart());Vl(g)||g===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(Ls(d)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();var m=this.state.potentialArrowAt===this.state.start,B=this.state.containsEsc,b=this.parseIdentifier();if(!B&&b.name==="async"&&!this.canInsertSemicolon()){var _=this.state.type;if(_===68)return this.resetPreviousNodeTrailingComments(b),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(b));if(Ls(_))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(b)):b;if(_===90)return this.resetPreviousNodeTrailingComments(b),this.parseDo(this.startNodeAtNode(b),!0)}return m&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(b),[b],!1)):b}else this.unexpected()}},n.parseTopicReferenceThenEqualsSign=function(o,s){var A=this.getPluginOption("pipelineOperator","proposal");if(A)return this.state.type=o,this.state.value=s,this.state.pos--,this.state.end--,this.state.endLoc=GA(this.state.endLoc,-1),this.parseTopicReference(A);this.unexpected()},n.parseTopicReference=function(o){var s=this.startNode(),A=this.state.startLoc,d=this.state.type;return this.next(),this.finishTopicReference(s,A,o,d)},n.finishTopicReference=function(o,s,A,d){if(this.testTopicReferenceConfiguration(A,s,d)){var c=A==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(A==="smart"?ft.PrimaryTopicNotAllowed:ft.PipeTopicUnbound,s),this.registerTopicReference(),this.finishNode(o,c)}else throw this.raise(ft.PipeTopicUnconfiguredToken,s,{token:hx(d)})},n.testTopicReferenceConfiguration=function(o,s,A){switch(o){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:hx(A)}]);case"smart":return A===27;default:throw this.raise(ft.PipeTopicRequiresHackPipes,s)}},n.parseAsyncArrowUnaryFunction=function(o){this.prodParam.enter(m8(!0,this.prodParam.hasYield));var s=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(ft.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(o,s,!0)},n.parseDo=function(o,s){this.expectPlugin("doExpressions"),s&&this.expectPlugin("asyncDoExpressions"),o.async=s,this.next();var A=this.state.labels;return this.state.labels=[],s?(this.prodParam.enter(So.PARAM_AWAIT),o.body=this.parseBlock(),this.prodParam.exit()):o.body=this.parseBlock(),this.state.labels=A,this.finishNode(o,"DoExpression")},n.parseSuper=function(){var o=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(ft.SuperNotAllowed,o):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(ft.UnexpectedSuper,o),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(ft.UnsupportedSuper,o),this.finishNode(o,"Super")},n.parsePrivateName=function(){var o=this.startNode(),s=this.startNodeAt(GA(this.state.startLoc,1)),A=this.state.value;return this.next(),o.id=this.createIdentifier(s,A),this.finishNode(o,"PrivateName")},n.parseFunctionOrFunctionSent=function(){var o=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){var s=this.createIdentifier(this.startNodeAtNode(o),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(o,s,"sent")}return this.parseFunction(o)},n.parseMetaProperty=function(o,s,A){o.meta=s;var d=this.state.containsEsc;return o.property=this.parseIdentifier(!0),(o.property.name!==A||d)&&this.raise(ft.UnsupportedMetaProperty,o.property,{target:s.name,onlyValidPropertyName:A}),this.finishNode(o,"MetaProperty")},n.parseImportMetaProperty=function(o){var s=this.createIdentifier(this.startNodeAtNode(o),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(ft.ImportMetaOutsideModule,s),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){var A=this.isContextual(105);if(A||this.unexpected(),this.expectPlugin(A?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(ft.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),o.phase=A?"source":"defer",this.parseImportCall(o)}return this.parseMetaProperty(o,s,"meta")},n.parseLiteralAtNode=function(o,s,A){return this.addExtra(A,"rawValue",o),this.addExtra(A,"raw",this.input.slice(A.start,this.state.end)),A.value=o,this.next(),this.finishNode(A,s)},n.parseLiteral=function(o,s){var A=this.startNode();return this.parseLiteralAtNode(o,s,A)},n.parseStringLiteral=function(o){return this.parseLiteral(o,"StringLiteral")},n.parseNumericLiteral=function(o){return this.parseLiteral(o,"NumericLiteral")},n.parseBigIntLiteral=function(o){return this.parseLiteral(o,"BigIntLiteral")},n.parseDecimalLiteral=function(o){return this.parseLiteral(o,"DecimalLiteral")},n.parseRegExpLiteral=function(o){var s=this.startNode();return this.addExtra(s,"raw",this.input.slice(s.start,this.state.end)),s.pattern=o.pattern,s.flags=o.flags,this.next(),this.finishNode(s,"RegExpLiteral")},n.parseBooleanLiteral=function(o){var s=this.startNode();return s.value=o,this.next(),this.finishNode(s,"BooleanLiteral")},n.parseNullLiteral=function(){var o=this.startNode();return this.next(),this.finishNode(o,"NullLiteral")},n.parseParenAndDistinguishExpression=function(o){var s=this.state.startLoc,A;this.next(),this.expressionScope.enter(N7e());var d=this.state.maybeInArrowParameters,c=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;for(var f=this.state.startLoc,x=[],g=new y8,m=!0,B,b;!this.match(11);){if(m)m=!1;else if(this.expect(12,g.optionalParametersLoc===null?null:g.optionalParametersLoc),this.match(11)){b=this.state.startLoc;break}if(this.match(21)){var _=this.state.startLoc;if(B=this.state.startLoc,x.push(this.parseParenItem(this.parseRestBinding(),_)),!this.checkCommaAfterRest(41))break}else x.push(this.parseMaybeAssignAllowIn(g,this.parseParenItem))}var C=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=d,this.state.inFSharpPipelineDirectBody=c;var w=this.startNodeAt(s);return o&&this.shouldParseArrow(x)&&(w=this.parseArrow(w))?(this.checkDestructuringPrivate(g),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(w,x,!1),w):(this.expressionScope.exit(),x.length||this.unexpected(this.state.lastTokStartLoc),b&&this.unexpected(b),B&&this.unexpected(B),this.checkExpressionErrors(g,!0),this.toReferencedListDeep(x,!0),x.length>1?(A=this.startNodeAt(f),A.expressions=x,this.finishNode(A,"SequenceExpression"),this.resetEndLocation(A,C)):A=x[0],this.wrapParenthesis(s,A))},n.wrapParenthesis=function(o,s){if(!this.options.createParenthesizedExpressions)return this.addExtra(s,"parenthesized",!0),this.addExtra(s,"parenStart",o.index),this.takeSurroundingComments(s,o.index,this.state.lastTokEndLoc.index),s;var A=this.startNodeAt(o);return A.expression=s,this.finishNode(A,"ParenthesizedExpression")},n.shouldParseArrow=function(o){return!this.canInsertSemicolon()},n.parseArrow=function(o){if(this.eat(19))return o},n.parseParenItem=function(o,s){return o},n.parseNewOrNewTarget=function(){var o=this.startNode();if(this.next(),this.match(16)){var s=this.createIdentifier(this.startNodeAtNode(o),"new");this.next();var A=this.parseMetaProperty(o,s,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(ft.UnexpectedNewTarget,A),A}return this.parseNew(o)},n.parseNew=function(o){if(this.parseNewCallee(o),this.eat(10)){var s=this.parseExprList(11);this.toReferencedList(s),o.arguments=s}else o.arguments=[];return this.finishNode(o,"NewExpression")},n.parseNewCallee=function(o){var s=this.match(83),A=this.parseNoCallExpr();o.callee=A,s&&(A.type==="Import"||A.type==="ImportExpression")&&this.raise(ft.ImportCallNotNewExpression,A)},n.parseTemplateElement=function(o){var s=this.state,A=s.start,d=s.startLoc,c=s.end,f=s.value,x=A+1,g=this.startNodeAt(GA(d,1));f===null&&(o||this.raise(ft.InvalidEscapeSequenceTemplate,GA(this.state.firstInvalidTemplateEscapePos,1)));var m=this.match(24),B=m?-1:-2,b=c+B;g.value={raw:this.input.slice(x,b).replace(/\r\n?/g,`
`),cooked:f===null?null:f.slice(1,B)},g.tail=m,this.next();var _=this.finishNode(g,"TemplateElement");return this.resetEndLocation(_,GA(this.state.lastTokEndLoc,B)),_},n.parseTemplate=function(o){for(var s=this.startNode(),A=this.parseTemplateElement(o),d=[A],c=[];!A.tail;)c.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),d.push(A=this.parseTemplateElement(o));return s.expressions=c,s.quasis=d,this.finishNode(s,"TemplateLiteral")},n.parseTemplateSubstitution=function(){return this.parseExpression()},n.parseObjectLike=function(o,s,A,d){A&&this.expectPlugin("recordAndTuple");var c=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;var f=Object.create(null),x=!0,g=this.startNode();for(g.properties=[],this.next();!this.match(o);){if(x)x=!1;else if(this.expect(12),this.match(o)){this.addTrailingCommaExtraToNode(g);break}var m=void 0;s?m=this.parseBindingProperty():(m=this.parsePropertyDefinition(d),this.checkProto(m,A,f,d)),A&&!this.isObjectProperty(m)&&m.type!=="SpreadElement"&&this.raise(ft.InvalidRecordProperty,m),m.shorthand&&this.addExtra(m,"shorthand",!0),g.properties.push(m)}this.next(),this.state.inFSharpPipelineDirectBody=c;var B="ObjectExpression";return s?B="ObjectPattern":A&&(B="RecordExpression"),this.finishNode(g,B)},n.addTrailingCommaExtraToNode=function(o){this.addExtra(o,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(o,"trailingCommaLoc",this.state.lastTokStartLoc,!1)},n.maybeAsyncOrAccessorProp=function(o){return!o.computed&&o.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))},n.parsePropertyDefinition=function(o){var s=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(ft.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)s.push(this.parseDecorator());var A=this.startNode(),d=!1,c=!1,f;if(this.match(21))return s.length&&this.unexpected(),this.parseSpread();s.length&&(A.decorators=s,s=[]),A.method=!1,o&&(f=this.state.startLoc);var x=this.eat(55);this.parsePropertyNamePrefixOperator(A);var g=this.state.containsEsc;if(this.parsePropertyName(A,o),!x&&!g&&this.maybeAsyncOrAccessorProp(A)){var m=A.key,B=m.name;B==="async"&&!this.hasPrecedingLineBreak()&&(d=!0,this.resetPreviousNodeTrailingComments(m),x=this.eat(55),this.parsePropertyName(A)),(B==="get"||B==="set")&&(c=!0,this.resetPreviousNodeTrailingComments(m),A.kind=B,this.match(55)&&(x=!0,this.raise(ft.AccessorIsGenerator,this.state.curPosition(),{kind:B}),this.next()),this.parsePropertyName(A))}return this.parseObjPropValue(A,f,x,d,!1,c,o)},n.getGetterSetterExpectedParamCount=function(o){return o.kind==="get"?0:1},n.getObjectOrClassMethodParams=function(o){return o.params},n.checkGetterSetterParams=function(o){var s,A=this.getGetterSetterExpectedParamCount(o),d=this.getObjectOrClassMethodParams(o);d.length!==A&&this.raise(o.kind==="get"?ft.BadGetterArity:ft.BadSetterArity,o),o.kind==="set"&&((s=d[d.length-1])==null?void 0:s.type)==="RestElement"&&this.raise(ft.BadSetterRestParameter,o)},n.parseObjectMethod=function(o,s,A,d,c){if(c){var f=this.parseMethod(o,s,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(f),f}if(A||s||this.match(10))return d&&this.unexpected(),o.kind="method",o.method=!0,this.parseMethod(o,s,A,!1,!1,"ObjectMethod")},n.parseObjectProperty=function(o,s,A,d){if(o.shorthand=!1,this.eat(14))return o.value=A?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(d),this.finishNode(o,"ObjectProperty");if(!o.computed&&o.key.type==="Identifier"){if(this.checkReservedWord(o.key.name,o.key.loc.start,!0,!1),A)o.value=this.parseMaybeDefault(s,$f(o.key));else if(this.match(29)){var c=this.state.startLoc;d!=null?d.shorthandAssignLoc===null&&(d.shorthandAssignLoc=c):this.raise(ft.InvalidCoverInitializedName,c),o.value=this.parseMaybeDefault(s,$f(o.key))}else o.value=$f(o.key);return o.shorthand=!0,this.finishNode(o,"ObjectProperty")}},n.parseObjPropValue=function(o,s,A,d,c,f,x){var g=this.parseObjectMethod(o,A,d,c,f)||this.parseObjectProperty(o,s,c,x);return g||this.unexpected(),g},n.parsePropertyName=function(o,s){if(this.eat(0))o.computed=!0,o.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{var A=this.state,d=A.type,c=A.value,f;if(mc(d))f=this.parseIdentifier(!0);else switch(d){case 134:f=this.parseNumericLiteral(c);break;case 133:f=this.parseStringLiteral(c);break;case 135:f=this.parseBigIntLiteral(c);break;case 136:f=this.parseDecimalLiteral(c);break;case 138:{var x=this.state.startLoc;s!=null?s.privateKeyLoc===null&&(s.privateKeyLoc=x):this.raise(ft.UnexpectedPrivateField,x),f=this.parsePrivateName();break}default:this.unexpected()}o.key=f,d!==138&&(o.computed=!1)}},n.initFunction=function(o,s){o.id=null,o.generator=!1,o.async=s},n.parseMethod=function(o,s,A,d,c,f,x){x===void 0&&(x=!1),this.initFunction(o,A),o.generator=s,this.scope.enter(fn.FUNCTION|fn.SUPER|(x?fn.CLASS:0)|(c?fn.DIRECT_SUPER:0)),this.prodParam.enter(m8(A,o.generator)),this.parseFunctionParams(o,d);var g=this.parseFunctionBodyAndFinish(o,f,!0);return this.prodParam.exit(),this.scope.exit(),g},n.parseArrayLike=function(o,s,A,d){A&&this.expectPlugin("recordAndTuple");var c=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;var f=this.startNode();return this.next(),f.elements=this.parseExprList(o,!A,d,f),this.state.inFSharpPipelineDirectBody=c,this.finishNode(f,A?"TupleExpression":"ArrayExpression")},n.parseArrowExpression=function(o,s,A,d){this.scope.enter(fn.FUNCTION|fn.ARROW);var c=m8(A,!1);!this.match(5)&&this.prodParam.hasIn&&(c|=So.PARAM_IN),this.prodParam.enter(c),this.initFunction(o,A);var f=this.state.maybeInArrowParameters;return s&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(o,s,d)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(o,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=f,this.finishNode(o,"ArrowFunctionExpression")},n.setArrowFunctionParameters=function(o,s,A){this.toAssignableList(s,A,!1),o.params=s},n.parseFunctionBodyAndFinish=function(o,s,A){return A===void 0&&(A=!1),this.parseFunctionBody(o,!1,A),this.finishNode(o,s)},n.parseFunctionBody=function(o,s,A){var d=this;A===void 0&&(A=!1);var c=s&&!this.match(5);if(this.expressionScope.enter(UX()),c)o.body=this.parseMaybeAssign(),this.checkParams(o,!1,s,!1);else{var f=this.state.strict,x=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|So.PARAM_RETURN),o.body=this.parseBlock(!0,!1,function(g){var m=!d.isSimpleParamList(o.params);g&&m&&d.raise(ft.IllegalLanguageModeDirective,(o.kind==="method"||o.kind==="constructor")&&o.key?o.key.loc.end:o);var B=!f&&d.state.strict;d.checkParams(o,!d.state.strict&&!s&&!A&&!m,s,B),d.state.strict&&o.id&&d.checkIdentifier(o.id,wa.TYPE_OUTSIDE,B)}),this.prodParam.exit(),this.state.labels=x}this.expressionScope.exit()},n.isSimpleParameter=function(o){return o.type==="Identifier"},n.isSimpleParamList=function(o){for(var s=0,A=o.length;s<A;s++)if(!this.isSimpleParameter(o[s]))return!1;return!0},n.checkParams=function(o,s,A,d){d===void 0&&(d=!0);for(var c=!s&&new Set,f={type:"FormalParameters"},x=0,g=o.params;x<g.length;x++){var m=g[x];this.checkLVal(m,{in:f,binding:wa.TYPE_VAR,checkClashes:c,strictModeChanged:d})}},n.parseExprList=function(o,s,A,d){for(var c=[],f=!0;!this.eat(o);){if(f)f=!1;else if(this.expect(12),this.match(o)){d&&this.addTrailingCommaExtraToNode(d),this.next();break}c.push(this.parseExprListItem(s,A))}return c},n.parseExprListItem=function(o,s,A){var d;if(this.match(12))o||this.raise(ft.UnexpectedToken,this.state.curPosition(),{unexpected:","}),d=null;else if(this.match(21)){var c=this.state.startLoc;d=this.parseParenItem(this.parseSpread(s),c)}else if(this.match(17)){this.expectPlugin("partialApplication"),A||this.raise(ft.UnexpectedArgumentPlaceholder,this.state.startLoc);var f=this.startNode();this.next(),d=this.finishNode(f,"ArgumentPlaceholder")}else d=this.parseMaybeAssignAllowIn(s,this.parseParenItem);return d},n.parseIdentifier=function(o){var s=this.startNode(),A=this.parseIdentifierName(o);return this.createIdentifier(s,A)},n.createIdentifier=function(o,s){return o.name=s,o.loc.identifierName=s,this.finishNode(o,"Identifier")},n.parseIdentifierName=function(o){var s,A=this.state,d=A.startLoc,c=A.type;mc(c)?s=this.state.value:this.unexpected();var f=c7e(c);return o?f&&this.replaceToken(132):this.checkReservedWord(s,d,f,!1),this.next(),s},n.checkReservedWord=function(o,s,A,d){if(!(o.length>10)&&v7e(o)){if(A&&UD(o)){this.raise(ft.UnexpectedKeyword,s,{keyword:o});return}var c=this.state.strict?d?Xp:Tj:Un;if(c(o,this.inModule)){this.raise(ft.UnexpectedReservedWord,s,{reservedWord:o});return}else if(o==="yield"){if(this.prodParam.hasYield){this.raise(ft.YieldBindingIdentifier,s);return}}else if(o==="await"){if(this.prodParam.hasAwait){this.raise(ft.AwaitBindingIdentifier,s);return}if(this.scope.inStaticBlock){this.raise(ft.AwaitBindingIdentifierInStaticBlock,s);return}this.expressionScope.recordAsyncArrowParametersError(s)}else if(o==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(ft.ArgumentsInClass,s);return}}},n.isAwaitAllowed=function(){return!!(this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction)},n.parseAwait=function(o){var s=this.startNodeAt(o);return this.expressionScope.recordParameterInitializerError(ft.AwaitExpressionFormalParameter,s),this.eat(55)&&this.raise(ft.ObsoleteAwaitStar,s),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(s.argument=this.parseMaybeUnary(null,!0)),this.finishNode(s,"AwaitExpression")},n.isAmbiguousAwait=function(){if(this.hasPrecedingLineBreak())return!0;var o=this.state.type;return o===53||o===10||o===0||D8(o)||o===102&&!this.state.containsEsc||o===137||o===56||this.hasPlugin("v8intrinsic")&&o===54},n.parseYield=function(){var o=this.startNode();this.expressionScope.recordParameterInitializerError(ft.YieldInParameter,o),this.next();var s=!1,A=null;if(!this.hasPrecedingLineBreak())switch(s=this.eat(55),this.state.type){case 13:case 139:case 8:case 11:case 3:case 9:case 14:case 12:if(!s)break;default:A=this.parseMaybeAssign()}return o.delegate=s,o.argument=A,this.finishNode(o,"YieldExpression")},n.parseImportCall=function(o){return this.next(),o.source=this.parseMaybeAssignAllowIn(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(o.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(o.options=this.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.finishNode(o,"ImportExpression")},n.checkPipelineAtInfixOperator=function(o,s){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&o.type==="SequenceExpression"&&this.raise(ft.PipelineHeadSequenceExpression,s)},n.parseSmartPipelineBodyInStyle=function(o,s){if(this.isSimpleReference(o)){var A=this.startNodeAt(s);return A.callee=o,this.finishNode(A,"PipelineBareFunction")}else{var d=this.startNodeAt(s);return this.checkSmartPipeTopicBodyEarlyErrors(s),d.expression=o,this.finishNode(d,"PipelineTopicExpression")}},n.isSimpleReference=function(o){switch(o.type){case"MemberExpression":return!o.computed&&this.isSimpleReference(o.object);case"Identifier":return!0;default:return!1}},n.checkSmartPipeTopicBodyEarlyErrors=function(o){if(this.match(19))throw this.raise(ft.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(ft.PipelineTopicUnused,o)},n.withTopicBindingContext=function(o){var s=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return o()}finally{this.state.topicContext=s}},n.withSmartMixTopicForbiddingContext=function(o){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){var s=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return o()}finally{this.state.topicContext=s}}else return o()},n.withSoloAwaitPermittingContext=function(o){var s=this.state.soloAwait;this.state.soloAwait=!0;try{return o()}finally{this.state.soloAwait=s}},n.allowInAnd=function(o){var s=this.prodParam.currentFlags(),A=So.PARAM_IN&~s;if(A){this.prodParam.enter(s|So.PARAM_IN);try{return o()}finally{this.prodParam.exit()}}return o()},n.disallowInAnd=function(o){var s=this.prodParam.currentFlags(),A=So.PARAM_IN&s;if(A){this.prodParam.enter(s&~So.PARAM_IN);try{return o()}finally{this.prodParam.exit()}}return o()},n.registerTopicReference=function(){this.state.topicContext.maxTopicIndex=0},n.topicReferenceIsAllowedInCurrentContext=function(){return this.state.topicContext.maxNumOfResolvableTopics>=1},n.topicReferenceWasUsedInCurrentContext=function(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0},n.parseFSharpPipelineBody=function(o){var s=this.state.startLoc;this.state.potentialArrowAt=this.state.start;var A=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;var d=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),s,o);return this.state.inFSharpPipelineDirectBody=A,d},n.parseModuleExpression=function(){this.expectPlugin("moduleBlocks");var o=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);var s=this.startNodeAt(this.state.endLoc);this.next();var A=this.initializeScopes(!0);this.enterInitialScopes();try{o.body=this.parseProgram(s,8,"module")}finally{A()}return this.finishNode(o,"ModuleExpression")},n.parsePropertyNamePrefixOperator=function(o){},T(t)}(aBe),_T={kind:$F.Loop},jBe={kind:$F.Switch},yl={Expression:0,Declaration:1,HangingDeclaration:2,NullableId:4,Async:8},HA={StatementOnly:0,AllowImportExport:1,AllowDeclaration:2,AllowFunctionDeclaration:4,AllowLabeledFunction:8},gBe=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,TT=new RegExp("in(?:stanceof)?","y");function mBe(e,t){for(var n=0;n<e.length;n++){var i=e[n],o=i.type;if(typeof o=="number"){{if(o===138){var s=i.loc,A=i.start,d=i.value,c=i.end,f=A+1,x=GA(s.start,1);e.splice(n,1,new jx({type:Of(27),value:"#",start:A,end:f,startLoc:s.start,endLoc:x}),new jx({type:Of(132),value:d,start:f,end:c,startLoc:x,endLoc:s.end})),n++;continue}if(D8(o)){var g=i.loc,m=i.start,B=i.value,b=i.end,_=m+1,C=GA(g.start,1),w=void 0;t.charCodeAt(m)===96?w=new jx({type:Of(22),value:"`",start:m,end:_,startLoc:g.start,endLoc:C}):w=new jx({type:Of(8),value:"}",start:m,end:_,startLoc:g.start,endLoc:C});var P=void 0,M=void 0,N=void 0,q=void 0;o===24?(M=b-1,N=GA(g.end,-1),P=B===null?null:B.slice(1,-1),q=new jx({type:Of(22),value:"`",start:M,end:b,startLoc:N,endLoc:g.end})):(M=b-2,N=GA(g.end,-2),P=B===null?null:B.slice(1,-2),q=new jx({type:Of(23),value:"${",start:M,end:b,startLoc:N,endLoc:g.end})),e.splice(n,1,w,new jx({type:Of(20),value:P,start:_,end:M,startLoc:C,endLoc:N}),q),n+=2;continue}}i.type=Of(o)}}return e}var yBe=function(e){function t(){return e.apply(this,arguments)||this}ue(t,e);var n=t.prototype;return n.parseTopLevel=function(o,s){return o.program=this.parseProgram(s),o.comments=this.comments,this.options.tokens&&(o.tokens=mBe(this.tokens,this.input)),this.finishNode(o,"File")},n.parseProgram=function(o,s,A){if(s===void 0&&(s=139),A===void 0&&(A=this.options.sourceType),o.sourceType=A,o.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(o,!0,!0,s),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(var d=0,c=Array.from(this.scope.undefinedExports);d<c.length;d++){var f=c[d],x=f[0],g=f[1];this.raise(ft.ModuleExportUndefined,g,{localName:x})}var m;return s===139?m=this.finishNode(o,"Program"):m=this.finishNodeAt(o,"Program",GA(this.state.startLoc,-1)),m},n.stmtToDirective=function(o){var s=o;s.type="Directive",s.value=s.expression,delete s.expression;var A=s.value,d=A.value,c=this.input.slice(A.start,A.end),f=A.value=c.slice(1,-1);return this.addExtra(A,"raw",c),this.addExtra(A,"rawValue",f),this.addExtra(A,"expressionValue",d),A.type="DirectiveLiteral",s},n.parseInterpreterDirective=function(){if(!this.match(28))return null;var o=this.startNode();return o.value=this.state.value,this.next(),this.finishNode(o,"InterpreterDirective")},n.isLet=function(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1},n.chStartsBindingIdentifier=function(o,s){if(Vl(o)){if(TT.lastIndex=s,TT.test(this.input)){var A=this.codePointAtPos(TT.lastIndex);if(!f0(A)&&A!==92)return!1}return!0}else return o===92},n.chStartsBindingPattern=function(o){return o===91||o===123},n.hasFollowingBindingAtom=function(){var o=this.nextTokenStart(),s=this.codePointAtPos(o);return this.chStartsBindingPattern(s)||this.chStartsBindingIdentifier(s,o)},n.hasInLineFollowingBindingIdentifierOrBrace=function(){var o=this.nextTokenInLineStart(),s=this.codePointAtPos(o);return s===123||this.chStartsBindingIdentifier(s,o)},n.startsUsingForOf=function(){var o=this.lookahead(),s=o.type,A=o.containsEsc;if(s===102&&!A)return!1;if(Ls(s)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0},n.startsAwaitUsing=function(){var o=this.nextTokenInLineStart();if(this.isUnparsedContextual(o,"using")){o=this.nextTokenInLineStartSince(o+5);var s=this.codePointAtPos(o);if(this.chStartsBindingIdentifier(s,o))return this.expectPlugin("explicitResourceManagement"),!0}return!1},n.parseModuleItem=function(){return this.parseStatementLike(HA.AllowImportExport|HA.AllowDeclaration|HA.AllowFunctionDeclaration|HA.AllowLabeledFunction)},n.parseStatementListItem=function(){return this.parseStatementLike(HA.AllowDeclaration|HA.AllowFunctionDeclaration|(!this.options.annexB||this.state.strict?0:HA.AllowLabeledFunction))},n.parseStatementOrSloppyAnnexBFunctionDeclaration=function(o){o===void 0&&(o=!1);var s=HA.StatementOnly;return this.options.annexB&&!this.state.strict&&(s|=HA.AllowFunctionDeclaration,o&&(s|=HA.AllowLabeledFunction)),this.parseStatementLike(s)},n.parseStatement=function(){return this.parseStatementLike(HA.StatementOnly)},n.parseStatementLike=function(o){var s=null;return this.match(26)&&(s=this.parseDecorators(!0)),this.parseStatementContent(o,s)},n.parseStatementContent=function(o,s){var A=this.state.type,d=this.startNode(),c=!!(o&HA.AllowDeclaration),f=!!(o&HA.AllowFunctionDeclaration),x=o&HA.AllowImportExport;switch(A){case 60:return this.parseBreakContinueStatement(d,!0);case 63:return this.parseBreakContinueStatement(d,!1);case 64:return this.parseDebuggerStatement(d);case 90:return this.parseDoWhileStatement(d);case 91:return this.parseForStatement(d);case 68:if(this.lookaheadCharCode()===46)break;return f||this.raise(this.state.strict?ft.StrictFunction:this.options.annexB?ft.SloppyFunctionAnnexB:ft.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(d,!1,!c&&f);case 80:return c||this.unexpected(),this.parseClass(this.maybeTakeDecorators(s,d),!0);case 69:return this.parseIfStatement(d);case 70:return this.parseReturnStatement(d);case 71:return this.parseSwitchStatement(d);case 72:return this.parseThrowStatement(d);case 73:return this.parseTryStatement(d);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.isAwaitAllowed()?c||this.raise(ft.UnexpectedLexicalDeclaration,d):this.raise(ft.AwaitUsingNotInAsyncContext,d),this.next(),this.parseVarStatement(d,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(ft.UnexpectedUsingDeclaration,this.state.startLoc):c||this.raise(ft.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(d,"using");case 100:{if(this.state.containsEsc)break;var g=this.nextTokenStart(),m=this.codePointAtPos(g);if(m!==91&&(!c&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(m,g)&&m!==123))break}case 75:c||this.raise(ft.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{var B=this.state.value;return this.parseVarStatement(d,B)}case 92:return this.parseWhileStatement(d);case 76:return this.parseWithStatement(d);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(d);case 83:{var b=this.lookaheadCharCode();if(b===40||b===46)break}case 82:{!this.options.allowImportExportEverywhere&&!x&&this.raise(ft.UnexpectedImportExport,this.state.startLoc),this.next();var _;return A===83?(_=this.parseImport(d),_.type==="ImportDeclaration"&&(!_.importKind||_.importKind==="value")&&(this.sawUnambiguousESM=!0)):(_=this.parseExport(d,s),(_.type==="ExportNamedDeclaration"&&(!_.exportKind||_.exportKind==="value")||_.type==="ExportAllDeclaration"&&(!_.exportKind||_.exportKind==="value")||_.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(_),_}default:if(this.isAsyncFunction())return c||this.raise(ft.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(d,!0,!c&&f)}var C=this.state.value,w=this.parseExpression();return Ls(A)&&w.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(d,C,w,o):this.parseExpressionStatement(d,w,s)},n.assertModuleNodeAllowed=function(o){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(ft.ImportOutsideModule,o)},n.decoratorsEnabledBeforeExport=function(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1},n.maybeTakeDecorators=function(o,s,A){if(o){if(s.decorators&&s.decorators.length>0){var d;typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(ft.DecoratorsBeforeAfterExport,s.decorators[0]),(d=s.decorators).unshift.apply(d,o)}else s.decorators=o;this.resetStartLocationFromNode(s,o[0]),A&&this.resetStartLocationFromNode(A,s)}return s},n.canHaveLeadingDecorator=function(){return this.match(80)},n.parseDecorators=function(o){var s=[];do s.push(this.parseDecorator());while(this.match(26));if(this.match(82))o||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(ft.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(ft.UnexpectedLeadingDecorator,this.state.startLoc);return s},n.parseDecorator=function(){this.expectOnePlugin(["decorators","decorators-legacy"]);var o=this.startNode();if(this.next(),this.hasPlugin("decorators")){var s=this.state.startLoc,A;if(this.match(10)){var d=this.state.startLoc;this.next(),A=this.parseExpression(),this.expect(11),A=this.wrapParenthesis(d,A);var c=this.state.startLoc;o.expression=this.parseMaybeDecoratorArguments(A),this.getPluginOption("decorators","allowCallParenthesized")===!1&&o.expression!==A&&this.raise(ft.DecoratorArgumentsOutsideParentheses,c)}else{for(A=this.parseIdentifier(!1);this.eat(16);){var f=this.startNodeAt(s);f.object=A,this.match(138)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),f.property=this.parsePrivateName()):f.property=this.parseIdentifier(!0),f.computed=!1,A=this.finishNode(f,"MemberExpression")}o.expression=this.parseMaybeDecoratorArguments(A)}}else o.expression=this.parseExprSubscripts();return this.finishNode(o,"Decorator")},n.parseMaybeDecoratorArguments=function(o){if(this.eat(10)){var s=this.startNodeAtNode(o);return s.callee=o,s.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(s.arguments),this.finishNode(s,"CallExpression")}return o},n.parseBreakContinueStatement=function(o,s){return this.next(),this.isLineTerminator()?o.label=null:(o.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(o,s),this.finishNode(o,s?"BreakStatement":"ContinueStatement")},n.verifyBreakContinue=function(o,s){var A;for(A=0;A<this.state.labels.length;++A){var d=this.state.labels[A];if((o.label==null||d.name===o.label.name)&&(d.kind!=null&&(s||d.kind===$F.Loop)||o.label&&s))break}if(A===this.state.labels.length){var c=s?"BreakStatement":"ContinueStatement";this.raise(ft.IllegalBreakContinue,o,{type:c})}},n.parseDebuggerStatement=function(o){return this.next(),this.semicolon(),this.finishNode(o,"DebuggerStatement")},n.parseHeaderExpression=function(){this.expect(10);var o=this.parseExpression();return this.expect(11),o},n.parseDoWhileStatement=function(o){var s=this;return this.next(),this.state.labels.push(_T),o.body=this.withSmartMixTopicForbiddingContext(function(){return s.parseStatement()}),this.state.labels.pop(),this.expect(92),o.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(o,"DoWhileStatement")},n.parseForStatement=function(o){this.next(),this.state.labels.push(_T);var s=null;if(this.isAwaitAllowed()&&this.eatContextual(96)&&(s=this.state.lastTokStartLoc),this.scope.enter(fn.OTHER),this.expect(10),this.match(13))return s!==null&&this.unexpected(s),this.parseFor(o,null);var A=this.isContextual(100);{var d=this.isContextual(96)&&this.startsAwaitUsing(),c=d||this.isContextual(107)&&this.startsUsingForOf(),f=A&&this.hasFollowingBindingAtom()||c;if(this.match(74)||this.match(75)||f){var x=this.startNode(),g;d?(g="await using",this.isAwaitAllowed()||this.raise(ft.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):g=this.state.value,this.next(),this.parseVar(x,!0,g);var m=this.finishNode(x,"VariableDeclaration"),B=this.match(58);return B&&c&&this.raise(ft.ForInUsing,m),(B||this.isContextual(102))&&m.declarations.length===1?this.parseForIn(o,m,s):(s!==null&&this.unexpected(s),this.parseFor(o,m))}}var b=this.isContextual(95),_=new y8,C=this.parseExpression(!0,_),w=this.isContextual(102);if(w&&(A&&this.raise(ft.ForOfLet,C),s===null&&b&&C.type==="Identifier"&&this.raise(ft.ForOfAsync,C)),w||this.match(58)){this.checkDestructuringPrivate(_),this.toAssignable(C,!0);var P=w?"ForOfStatement":"ForInStatement";return this.checkLVal(C,{in:{type:P}}),this.parseForIn(o,C,s)}else this.checkExpressionErrors(_,!0);return s!==null&&this.unexpected(s),this.parseFor(o,C)},n.parseFunctionStatement=function(o,s,A){return this.next(),this.parseFunction(o,yl.Declaration|(A?yl.HangingDeclaration:0)|(s?yl.Async:0))},n.parseIfStatement=function(o){return this.next(),o.test=this.parseHeaderExpression(),o.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),o.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(o,"IfStatement")},n.parseReturnStatement=function(o){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(ft.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?o.argument=null:(o.argument=this.parseExpression(),this.semicolon()),this.finishNode(o,"ReturnStatement")},n.parseSwitchStatement=function(o){this.next(),o.discriminant=this.parseHeaderExpression();var s=o.cases=[];this.expect(5),this.state.labels.push(jBe),this.scope.enter(fn.OTHER);for(var A,d;!this.match(8);)if(this.match(61)||this.match(65)){var c=this.match(61);A&&this.finishNode(A,"SwitchCase"),s.push(A=this.startNode()),A.consequent=[],this.next(),c?A.test=this.parseExpression():(d&&this.raise(ft.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),d=!0,A.test=null),this.expect(14)}else A?A.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),A&&this.finishNode(A,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(o,"SwitchStatement")},n.parseThrowStatement=function(o){return this.next(),this.hasPrecedingLineBreak()&&this.raise(ft.NewlineAfterThrow,this.state.lastTokEndLoc),o.argument=this.parseExpression(),this.semicolon(),this.finishNode(o,"ThrowStatement")},n.parseCatchClauseParam=function(){var o=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&o.type==="Identifier"?fn.SIMPLE_CATCH:0),this.checkLVal(o,{in:{type:"CatchClause"},binding:wa.TYPE_CATCH_PARAM}),o},n.parseTryStatement=function(o){var s=this;if(this.next(),o.block=this.parseBlock(),o.handler=null,this.match(62)){var A=this.startNode();this.next(),this.match(10)?(this.expect(10),A.param=this.parseCatchClauseParam(),this.expect(11)):(A.param=null,this.scope.enter(fn.OTHER)),A.body=this.withSmartMixTopicForbiddingContext(function(){return s.parseBlock(!1,!1)}),this.scope.exit(),o.handler=this.finishNode(A,"CatchClause")}return o.finalizer=this.eat(67)?this.parseBlock():null,!o.handler&&!o.finalizer&&this.raise(ft.NoCatchOrFinally,o),this.finishNode(o,"TryStatement")},n.parseVarStatement=function(o,s,A){return A===void 0&&(A=!1),this.next(),this.parseVar(o,!1,s,A),this.semicolon(),this.finishNode(o,"VariableDeclaration")},n.parseWhileStatement=function(o){var s=this;return this.next(),o.test=this.parseHeaderExpression(),this.state.labels.push(_T),o.body=this.withSmartMixTopicForbiddingContext(function(){return s.parseStatement()}),this.state.labels.pop(),this.finishNode(o,"WhileStatement")},n.parseWithStatement=function(o){var s=this;return this.state.strict&&this.raise(ft.StrictWith,this.state.startLoc),this.next(),o.object=this.parseHeaderExpression(),o.body=this.withSmartMixTopicForbiddingContext(function(){return s.parseStatement()}),this.finishNode(o,"WithStatement")},n.parseEmptyStatement=function(o){return this.next(),this.finishNode(o,"EmptyStatement")},n.parseLabeledStatement=function(o,s,A,d){for(var c=0,f=this.state.labels;c<f.length;c++){var x=f[c];x.name===s&&this.raise(ft.LabelRedeclaration,A,{labelName:s})}for(var g=x7e(this.state.type)?$F.Loop:this.match(71)?$F.Switch:null,m=this.state.labels.length-1;m>=0;m--){var B=this.state.labels[m];if(B.statementStart===o.start)B.statementStart=this.state.start,B.kind=g;else break}return this.state.labels.push({name:s,kind:g,statementStart:this.state.start}),o.body=d&HA.AllowLabeledFunction?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),o.label=A,this.finishNode(o,"LabeledStatement")},n.parseExpressionStatement=function(o,s,A){return o.expression=s,this.semicolon(),this.finishNode(o,"ExpressionStatement")},n.parseBlock=function(o,s,A){o===void 0&&(o=!1),s===void 0&&(s=!0);var d=this.startNode();return o&&this.state.strictErrors.clear(),this.expect(5),s&&this.scope.enter(fn.OTHER),this.parseBlockBody(d,o,!1,8,A),s&&this.scope.exit(),this.finishNode(d,"BlockStatement")},n.isValidDirective=function(o){return o.type==="ExpressionStatement"&&o.expression.type==="StringLiteral"&&!o.expression.extra.parenthesized},n.parseBlockBody=function(o,s,A,d,c){var f=o.body=[],x=o.directives=[];this.parseBlockOrModuleBlockBody(f,s?x:void 0,A,d,c)},n.parseBlockOrModuleBlockBody=function(o,s,A,d,c){for(var f=this.state.strict,x=!1,g=!1;!this.match(d);){var m=A?this.parseModuleItem():this.parseStatementListItem();if(s&&!g){if(this.isValidDirective(m)){var B=this.stmtToDirective(m);s.push(B),!x&&B.value.value==="use strict"&&(x=!0,this.setStrict(!0));continue}g=!0,this.state.strictErrors.clear()}o.push(m)}c?.call(this,x),f||this.setStrict(!1),this.next()},n.parseFor=function(o,s){var A=this;return o.init=s,this.semicolon(!1),o.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),o.update=this.match(11)?null:this.parseExpression(),this.expect(11),o.body=this.withSmartMixTopicForbiddingContext(function(){return A.parseStatement()}),this.scope.exit(),this.state.labels.pop(),this.finishNode(o,"ForStatement")},n.parseForIn=function(o,s,A){var d=this,c=this.match(58);return this.next(),c?A!==null&&this.unexpected(A):o.await=A!==null,s.type==="VariableDeclaration"&&s.declarations[0].init!=null&&(!c||!this.options.annexB||this.state.strict||s.kind!=="var"||s.declarations[0].id.type!=="Identifier")&&this.raise(ft.ForInOfLoopInitializer,s,{type:c?"ForInStatement":"ForOfStatement"}),s.type==="AssignmentPattern"&&this.raise(ft.InvalidLhs,s,{ancestor:{type:"ForStatement"}}),o.left=s,o.right=c?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),o.body=this.withSmartMixTopicForbiddingContext(function(){return d.parseStatement()}),this.scope.exit(),this.state.labels.pop(),this.finishNode(o,c?"ForInStatement":"ForOfStatement")},n.parseVar=function(o,s,A,d){d===void 0&&(d=!1);var c=o.declarations=[];for(o.kind=A;;){var f=this.startNode();if(this.parseVarId(f,A),f.init=this.eat(29)?s?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,f.init===null&&!d&&(f.id.type!=="Identifier"&&!(s&&(this.match(58)||this.isContextual(102)))?this.raise(ft.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(A==="const"||A==="using"||A==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(ft.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:A})),c.push(this.finishNode(f,"VariableDeclarator")),!this.eat(12))break}return o},n.parseVarId=function(o,s){var A=this.parseBindingAtom();(s==="using"||s==="await using")&&(A.type==="ArrayPattern"||A.type==="ObjectPattern")&&this.raise(ft.UsingDeclarationHasBindingPattern,A.loc.start),this.checkLVal(A,{in:{type:"VariableDeclarator"},binding:s==="var"?wa.TYPE_VAR:wa.TYPE_LEXICAL}),o.id=A},n.parseAsyncFunctionExpression=function(o){return this.parseFunction(o,yl.Async)},n.parseFunction=function(o,s){var A=this;s===void 0&&(s=yl.Expression);var d=s&yl.HangingDeclaration,c=!!(s&yl.Declaration),f=c&&!(s&yl.NullableId),x=!!(s&yl.Async);this.initFunction(o,x),this.match(55)&&(d&&this.raise(ft.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),o.generator=!0),c&&(o.id=this.parseFunctionId(f));var g=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(fn.FUNCTION),this.prodParam.enter(m8(x,o.generator)),c||(o.id=this.parseFunctionId()),this.parseFunctionParams(o,!1),this.withSmartMixTopicForbiddingContext(function(){A.parseFunctionBodyAndFinish(o,c?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),c&&!d&&this.registerFunctionStatementId(o),this.state.maybeInArrowParameters=g,o},n.parseFunctionId=function(o){return o||Ls(this.state.type)?this.parseIdentifier():null},n.parseFunctionParams=function(o,s){this.expect(10),this.expressionScope.enter($7e()),o.params=this.parseBindingList(11,41,mx.IS_FUNCTION_PARAMS|(s?mx.IS_CONSTRUCTOR_PARAMS:0)),this.expressionScope.exit()},n.registerFunctionStatementId=function(o){o.id&&this.scope.declareName(o.id.name,!this.options.annexB||this.state.strict||o.generator||o.async?this.scope.treatFunctionsAsVar?wa.TYPE_VAR:wa.TYPE_LEXICAL:wa.TYPE_FUNCTION,o.id.loc.start)},n.parseClass=function(o,s,A){this.next();var d=this.state.strict;return this.state.strict=!0,this.parseClassId(o,s,A),this.parseClassSuper(o),o.body=this.parseClassBody(!!o.superClass,d),this.finishNode(o,s?"ClassDeclaration":"ClassExpression")},n.isClassProperty=function(){return this.match(29)||this.match(13)||this.match(8)},n.isClassMethod=function(){return this.match(10)},n.nameIsConstructor=function(o){return o.type==="Identifier"&&o.name==="constructor"||o.type==="StringLiteral"&&o.value==="constructor"},n.isNonstaticConstructor=function(o){return!o.computed&&!o.static&&this.nameIsConstructor(o.key)},n.parseClassBody=function(o,s){var A=this;this.classScope.enter();var d={hadConstructor:!1,hadSuperClass:o},c=[],f=this.startNode();if(f.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(function(){for(;!A.match(8);){if(A.eat(13)){if(c.length>0)throw A.raise(ft.DecoratorSemicolon,A.state.lastTokEndLoc);continue}if(A.match(26)){c.push(A.parseDecorator());continue}var x=A.startNode();c.length&&(x.decorators=c,A.resetStartLocationFromNode(x,c[0]),c=[]),A.parseClassMember(f,x,d),x.kind==="constructor"&&x.decorators&&x.decorators.length>0&&A.raise(ft.DecoratorConstructor,x)}}),this.state.strict=s,this.next(),c.length)throw this.raise(ft.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(f,"ClassBody")},n.parseClassMemberFromModifier=function(o,s){var A=this.parseIdentifier(!0);if(this.isClassMethod()){var d=s;return d.kind="method",d.computed=!1,d.key=A,d.static=!1,this.pushClassMethod(o,d,!1,!1,!1,!1),!0}else if(this.isClassProperty()){var c=s;return c.computed=!1,c.key=A,c.static=!1,o.body.push(this.parseClassProperty(c)),!0}return this.resetPreviousNodeTrailingComments(A),!1},n.parseClassMember=function(o,s,A){var d=this.isContextual(106);if(d){if(this.parseClassMemberFromModifier(o,s))return;if(this.eat(5)){this.parseClassStaticBlock(o,s);return}}this.parseClassMemberWithIsStatic(o,s,A,d)},n.parseClassMemberWithIsStatic=function(o,s,A,d){var c=s,f=s,x=s,g=s,m=s,B=c,b=c;if(s.static=d,this.parsePropertyNamePrefixOperator(s),this.eat(55)){B.kind="method";var _=this.match(138);if(this.parseClassElementName(B),_){this.pushClassPrivateMethod(o,f,!0,!1);return}this.isNonstaticConstructor(c)&&this.raise(ft.ConstructorIsGenerator,c.key),this.pushClassMethod(o,c,!0,!1,!1,!1);return}var C=!this.state.containsEsc&&Ls(this.state.type),w=this.parseClassElementName(s),P=C?w.name:null,M=this.isPrivateName(w),N=this.state.startLoc;if(this.parsePostMemberNameModifiers(b),this.isClassMethod()){if(B.kind="method",M){this.pushClassPrivateMethod(o,f,!1,!1);return}var q=this.isNonstaticConstructor(c),V=!1;q&&(c.kind="constructor",A.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(ft.DuplicateConstructor,w),q&&this.hasPlugin("typescript")&&s.override&&this.raise(ft.OverrideOnConstructor,w),A.hadConstructor=!0,V=A.hadSuperClass),this.pushClassMethod(o,c,!1,!1,q,V)}else if(this.isClassProperty())M?this.pushClassPrivateProperty(o,g):this.pushClassProperty(o,x);else if(P==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(w);var U=this.eat(55);b.optional&&this.unexpected(N),B.kind="method";var te=this.match(138);this.parseClassElementName(B),this.parsePostMemberNameModifiers(b),te?this.pushClassPrivateMethod(o,f,U,!0):(this.isNonstaticConstructor(c)&&this.raise(ft.ConstructorIsAsync,c.key),this.pushClassMethod(o,c,U,!0,!1,!1))}else if((P==="get"||P==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(w),B.kind=P;var ae=this.match(138);this.parseClassElementName(c),ae?this.pushClassPrivateMethod(o,f,!1,!1):(this.isNonstaticConstructor(c)&&this.raise(ft.ConstructorIsAccessor,c.key),this.pushClassMethod(o,c,!1,!1,!1,!1)),this.checkGetterSetterParams(c)}else if(P==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(w);var se=this.match(138);this.parseClassElementName(x),this.pushClassAccessorProperty(o,m,se)}else this.isLineTerminator()?M?this.pushClassPrivateProperty(o,g):this.pushClassProperty(o,x):this.unexpected()},n.parseClassElementName=function(o){var s=this.state,A=s.type,d=s.value;if((A===132||A===133)&&o.static&&d==="prototype"&&this.raise(ft.StaticPrototype,this.state.startLoc),A===138){d==="constructor"&&this.raise(ft.ConstructorClassPrivateField,this.state.startLoc);var c=this.parsePrivateName();return o.key=c,c}return this.parsePropertyName(o),o.key},n.parseClassStaticBlock=function(o,s){var A;this.scope.enter(fn.CLASS|fn.STATIC_BLOCK|fn.SUPER);var d=this.state.labels;this.state.labels=[],this.prodParam.enter(So.PARAM);var c=s.body=[];this.parseBlockOrModuleBlockBody(c,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=d,o.body.push(this.finishNode(s,"StaticBlock")),(A=s.decorators)!=null&&A.length&&this.raise(ft.DecoratorStaticBlock,s)},n.pushClassProperty=function(o,s){!s.computed&&this.nameIsConstructor(s.key)&&this.raise(ft.ConstructorClassField,s.key),o.body.push(this.parseClassProperty(s))},n.pushClassPrivateProperty=function(o,s){var A=this.parseClassPrivateProperty(s);o.body.push(A),this.classScope.declarePrivateName(this.getPrivateNameSV(A.key),bd.OTHER,A.key.loc.start)},n.pushClassAccessorProperty=function(o,s,A){!A&&!s.computed&&this.nameIsConstructor(s.key)&&this.raise(ft.ConstructorClassField,s.key);var d=this.parseClassAccessorProperty(s);o.body.push(d),A&&this.classScope.declarePrivateName(this.getPrivateNameSV(d.key),bd.OTHER,d.key.loc.start)},n.pushClassMethod=function(o,s,A,d,c,f){o.body.push(this.parseMethod(s,A,d,c,f,"ClassMethod",!0))},n.pushClassPrivateMethod=function(o,s,A,d){var c=this.parseMethod(s,A,d,!1,!1,"ClassPrivateMethod",!0);o.body.push(c);var f=c.kind==="get"?c.static?bd.STATIC_GETTER:bd.INSTANCE_GETTER:c.kind==="set"?c.static?bd.STATIC_SETTER:bd.INSTANCE_SETTER:bd.OTHER;this.declareClassPrivateMethodInScope(c,f)},n.declareClassPrivateMethodInScope=function(o,s){this.classScope.declarePrivateName(this.getPrivateNameSV(o.key),s,o.key.loc.start)},n.parsePostMemberNameModifiers=function(o){},n.parseClassPrivateProperty=function(o){return this.parseInitializer(o),this.semicolon(),this.finishNode(o,"ClassPrivateProperty")},n.parseClassProperty=function(o){return this.parseInitializer(o),this.semicolon(),this.finishNode(o,"ClassProperty")},n.parseClassAccessorProperty=function(o){return this.parseInitializer(o),this.semicolon(),this.finishNode(o,"ClassAccessorProperty")},n.parseInitializer=function(o){this.scope.enter(fn.CLASS|fn.SUPER),this.expressionScope.enter(UX()),this.prodParam.enter(So.PARAM),o.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()},n.parseClassId=function(o,s,A,d){if(d===void 0&&(d=wa.TYPE_CLASS),Ls(this.state.type))o.id=this.parseIdentifier(),s&&this.declareNameFromIdentifier(o.id,d);else if(A||!s)o.id=null;else throw this.raise(ft.MissingClassName,this.state.startLoc)},n.parseClassSuper=function(o){o.superClass=this.eat(81)?this.parseExprSubscripts():null},n.parseExport=function(o,s){var A=this.parseMaybeImportPhase(o,!0),d=this.maybeParseExportDefaultSpecifier(o,A),c=!d||this.eat(12),f=c&&this.eatExportStar(o),x=f&&this.maybeParseExportNamespaceSpecifier(o),g=c&&(!x||this.eat(12)),m=d||f;if(f&&!x){if(d&&this.unexpected(),s)throw this.raise(ft.UnsupportedDecoratorExport,o);return this.parseExportFrom(o,!0),this.finishNode(o,"ExportAllDeclaration")}var B=this.maybeParseExportNamedSpecifiers(o);d&&c&&!f&&!B&&this.unexpected(null,5),x&&g&&this.unexpected(null,98);var b;if(m||B){if(b=!1,s)throw this.raise(ft.UnsupportedDecoratorExport,o);this.parseExportFrom(o,m)}else b=this.maybeParseExportDeclaration(o);if(m||B||b){var _,C=o;if(this.checkExport(C,!0,!1,!!C.source),((_=C.declaration)==null?void 0:_.type)==="ClassDeclaration")this.maybeTakeDecorators(s,C.declaration,C);else if(s)throw this.raise(ft.UnsupportedDecoratorExport,o);return this.finishNode(C,"ExportNamedDeclaration")}if(this.eat(65)){var w=o,P=this.parseExportDefaultExpression();if(w.declaration=P,P.type==="ClassDeclaration")this.maybeTakeDecorators(s,P,w);else if(s)throw this.raise(ft.UnsupportedDecoratorExport,o);return this.checkExport(w,!0,!0),this.finishNode(w,"ExportDefaultDeclaration")}this.unexpected(null,5)},n.eatExportStar=function(o){return this.eat(55)},n.maybeParseExportDefaultSpecifier=function(o,s){if(s||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",s?.loc.start);var A=s||this.parseIdentifier(!0),d=this.startNodeAtNode(A);return d.exported=A,o.specifiers=[this.finishNode(d,"ExportDefaultSpecifier")],!0}return!1},n.maybeParseExportNamespaceSpecifier=function(o){if(this.isContextual(93)){var s,A;(A=(s=o).specifiers)!=null||(s.specifiers=[]);var d=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),d.exported=this.parseModuleExportName(),o.specifiers.push(this.finishNode(d,"ExportNamespaceSpecifier")),!0}return!1},n.maybeParseExportNamedSpecifiers=function(o){if(this.match(5)){var s,A=o;A.specifiers||(A.specifiers=[]);var d=A.exportKind==="type";return(s=A.specifiers).push.apply(s,this.parseExportSpecifiers(d)),A.source=null,A.declaration=null,this.hasPlugin("importAssertions")&&(A.assertions=[]),!0}return!1},n.maybeParseExportDeclaration=function(o){return this.shouldParseExportDeclaration()?(o.specifiers=[],o.source=null,this.hasPlugin("importAssertions")&&(o.assertions=[]),o.declaration=this.parseExportDeclaration(o),!0):!1},n.isAsyncFunction=function(){if(!this.isContextual(95))return!1;var o=this.nextTokenInLineStart();return this.isUnparsedContextual(o,"function")},n.parseExportDefaultExpression=function(){var o=this.startNode();if(this.match(68))return this.next(),this.parseFunction(o,yl.Declaration|yl.NullableId);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(o,yl.Declaration|yl.NullableId|yl.Async);if(this.match(80))return this.parseClass(o,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(ft.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(ft.UnsupportedDefaultExport,this.state.startLoc);var s=this.parseMaybeAssignAllowIn();return this.semicolon(),s},n.parseExportDeclaration=function(o){if(this.match(80)){var s=this.parseClass(this.startNode(),!0,!1);return s}return this.parseStatementListItem()},n.isExportDefaultSpecifier=function(){var o=this.state.type;if(Ls(o)){if(o===95&&!this.state.containsEsc||o===100)return!1;if((o===130||o===129)&&!this.state.containsEsc){var s=this.lookahead(),A=s.type;if(Ls(A)&&A!==98||A===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;var d=this.nextTokenStart(),c=this.isUnparsedContextual(d,"from");if(this.input.charCodeAt(d)===44||Ls(this.state.type)&&c)return!0;if(this.match(65)&&c){var f=this.input.charCodeAt(this.nextTokenStartSince(d+4));return f===34||f===39}return!1},n.parseExportFrom=function(o,s){this.eatContextual(98)?(o.source=this.parseImportSource(),this.checkExport(o),this.maybeParseImportAttributes(o),this.checkJSONModuleImport(o)):s&&this.unexpected(),this.semicolon()},n.shouldParseExportDeclaration=function(){var o=this.state.type;return o===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(ft.DecoratorBeforeExport,this.state.startLoc),!0):this.isContextual(107)?(this.raise(ft.UsingDeclarationExport,this.state.startLoc),!0):this.isContextual(96)&&this.startsAwaitUsing()?(this.raise(ft.UsingDeclarationExport,this.state.startLoc),!0):o===74||o===75||o===68||o===80||this.isLet()||this.isAsyncFunction()},n.checkExport=function(o,s,A,d){if(s){var c;if(A){if(this.checkDuplicateExports(o,"default"),this.hasPlugin("exportDefaultFrom")){var f,x=o.declaration;x.type==="Identifier"&&x.name==="from"&&x.end-x.start===4&&!((f=x.extra)!=null&&f.parenthesized)&&this.raise(ft.ExportDefaultFromAsIdentifier,x)}}else if((c=o.specifiers)!=null&&c.length)for(var g=0,m=o.specifiers;g<m.length;g++){var B=m[g],b=B.exported,_=b.type==="Identifier"?b.name:b.value;if(this.checkDuplicateExports(B,_),!d&&B.local){var C=B.local;C.type!=="Identifier"?this.raise(ft.ExportBindingIsString,B,{localName:C.value,exportName:_}):(this.checkReservedWord(C.name,C.loc.start,!0,!1),this.scope.checkLocalExport(C))}}else if(o.declaration){var w=o.declaration;if(w.type==="FunctionDeclaration"||w.type==="ClassDeclaration"){var P=w.id;if(!P)throw new Error("Assertion failure");this.checkDuplicateExports(o,P.name)}else if(w.type==="VariableDeclaration")for(var M=0,N=w.declarations;M<N.length;M++){var q=N[M];this.checkDeclaration(q.id)}}}},n.checkDeclaration=function(o){if(o.type==="Identifier")this.checkDuplicateExports(o,o.name);else if(o.type==="ObjectPattern")for(var s=0,A=o.properties;s<A.length;s++){var d=A[s];this.checkDeclaration(d)}else if(o.type==="ArrayPattern")for(var c=0,f=o.elements;c<f.length;c++){var x=f[c];x&&this.checkDeclaration(x)}else o.type==="ObjectProperty"?this.checkDeclaration(o.value):o.type==="RestElement"?this.checkDeclaration(o.argument):o.type==="AssignmentPattern"&&this.checkDeclaration(o.left)},n.checkDuplicateExports=function(o,s){this.exportedIdentifiers.has(s)&&(s==="default"?this.raise(ft.DuplicateDefaultExport,o):this.raise(ft.DuplicateExport,o,{exportName:s})),this.exportedIdentifiers.add(s)},n.parseExportSpecifiers=function(o){var s=[],A=!0;for(this.expect(5);!this.eat(8);){if(A)A=!1;else if(this.expect(12),this.eat(8))break;var d=this.isContextual(130),c=this.match(133),f=this.startNode();f.local=this.parseModuleExportName(),s.push(this.parseExportSpecifier(f,c,o,d))}return s},n.parseExportSpecifier=function(o,s,A,d){return this.eatContextual(93)?o.exported=this.parseModuleExportName():s?o.exported=q7e(o.local):o.exported||(o.exported=$f(o.local)),this.finishNode(o,"ExportSpecifier")},n.parseModuleExportName=function(){if(this.match(133)){var o=this.parseStringLiteral(this.state.value),s=gBe.exec(o.value);return s&&this.raise(ft.ModuleExportNameHasLoneSurrogate,o,{surrogateCharCode:s[0].charCodeAt(0)}),o}return this.parseIdentifier(!0)},n.isJSONModuleImport=function(o){return o.assertions!=null?o.assertions.some(function(s){var A=s.key,d=s.value;return d.value==="json"&&(A.type==="Identifier"?A.name==="type":A.value==="type")}):!1},n.checkImportReflection=function(o){var s=o.specifiers,A=s.length===1?s[0].type:null;if(o.phase==="source")A!=="ImportDefaultSpecifier"&&this.raise(ft.SourcePhaseImportRequiresDefault,s[0].loc.start);else if(o.phase==="defer")A!=="ImportNamespaceSpecifier"&&this.raise(ft.DeferImportRequiresNamespace,s[0].loc.start);else if(o.module){var d;A!=="ImportDefaultSpecifier"&&this.raise(ft.ImportReflectionNotBinding,s[0].loc.start),((d=o.assertions)==null?void 0:d.length)>0&&this.raise(ft.ImportReflectionHasAssertion,s[0].loc.start)}},n.checkJSONModuleImport=function(o){if(this.isJSONModuleImport(o)&&o.type!=="ExportAllDeclaration"){var s=o.specifiers;if(s!=null){var A=s.find(function(d){var c;if(d.type==="ExportSpecifier"?c=d.local:d.type==="ImportSpecifier"&&(c=d.imported),c!==void 0)return c.type==="Identifier"?c.name!=="default":c.value!=="default"});A!==void 0&&this.raise(ft.ImportJSONBindingNotDefault,A.loc.start)}}},n.isPotentialImportPhase=function(o){return o?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)},n.applyImportPhase=function(o,s,A,d){s||(A==="module"?(this.expectPlugin("importReflection",d),o.module=!0):this.hasPlugin("importReflection")&&(o.module=!1),A==="source"?(this.expectPlugin("sourcePhaseImports",d),o.phase="source"):A==="defer"?(this.expectPlugin("deferredImportEvaluation",d),o.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(o.phase=null))},n.parseMaybeImportPhase=function(o,s){if(!this.isPotentialImportPhase(s))return this.applyImportPhase(o,s,null),null;var A=this.parseIdentifier(!0),d=this.state.type,c=mc(d)?d!==98||this.lookaheadCharCode()===102:d!==12;return c?(this.resetPreviousIdentifierLeadingComments(A),this.applyImportPhase(o,s,A.name,A.loc.start),null):(this.applyImportPhase(o,s,null),A)},n.isPrecedingIdImportPhase=function(o){var s=this.state.type;return Ls(s)?s!==98||this.lookaheadCharCode()===102:s!==12},n.parseImport=function(o){return this.match(133)?this.parseImportSourceAndAttributes(o):this.parseImportSpecifiersAndAfter(o,this.parseMaybeImportPhase(o,!1))},n.parseImportSpecifiersAndAfter=function(o,s){o.specifiers=[];var A=this.maybeParseDefaultImportSpecifier(o,s),d=!A||this.eat(12),c=d&&this.maybeParseStarImportSpecifier(o);return d&&!c&&this.parseNamedImportSpecifiers(o),this.expectContextual(98),this.parseImportSourceAndAttributes(o)},n.parseImportSourceAndAttributes=function(o){var s;return(s=o.specifiers)!=null||(o.specifiers=[]),o.source=this.parseImportSource(),this.maybeParseImportAttributes(o),this.checkImportReflection(o),this.checkJSONModuleImport(o),this.semicolon(),this.finishNode(o,"ImportDeclaration")},n.parseImportSource=function(){return this.match(133)||this.unexpected(),this.parseExprAtom()},n.parseImportSpecifierLocal=function(o,s,A){s.local=this.parseIdentifier(),o.specifiers.push(this.finishImportSpecifier(s,A))},n.finishImportSpecifier=function(o,s,A){return A===void 0&&(A=wa.TYPE_LEXICAL),this.checkLVal(o.local,{in:{type:s},binding:A}),this.finishNode(o,s)},n.parseImportAttributes=function(){this.expect(5);var o=[],s=new Set;do{if(this.match(8))break;var A=this.startNode(),d=this.state.value;if(s.has(d)&&this.raise(ft.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:d}),s.add(d),this.match(133)?A.key=this.parseStringLiteral(d):A.key=this.parseIdentifier(!0),this.expect(14),!this.match(133))throw this.raise(ft.ModuleAttributeInvalidValue,this.state.startLoc);A.value=this.parseStringLiteral(this.state.value),o.push(this.finishNode(A,"ImportAttribute"))}while(this.eat(12));return this.expect(8),o},n.parseModuleAttributes=function(){var o=[],s=new Set;do{var A=this.startNode();if(A.key=this.parseIdentifier(!0),A.key.name!=="type"&&this.raise(ft.ModuleAttributeDifferentFromType,A.key),s.has(A.key.name)&&this.raise(ft.ModuleAttributesWithDuplicateKeys,A.key,{key:A.key.name}),s.add(A.key.name),this.expect(14),!this.match(133))throw this.raise(ft.ModuleAttributeInvalidValue,this.state.startLoc);A.value=this.parseStringLiteral(this.state.value),o.push(this.finishNode(A,"ImportAttribute"))}while(this.eat(12));return o},n.maybeParseImportAttributes=function(o){var s,A=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?s=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),s=this.parseImportAttributes()),A=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(this.getPluginOption("importAttributes","deprecatedAssertSyntax")!==!0&&this.raise(ft.ImportAttributesUseAssert,this.state.startLoc),this.addExtra(o,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),s=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))s=[];else if(this.hasPlugin("moduleAttributes"))s=[];else return;!A&&this.hasPlugin("importAssertions")?o.assertions=s:o.attributes=s},n.maybeParseDefaultImportSpecifier=function(o,s){if(s){var A=this.startNodeAtNode(s);return A.local=s,o.specifiers.push(this.finishImportSpecifier(A,"ImportDefaultSpecifier")),!0}else if(mc(this.state.type))return this.parseImportSpecifierLocal(o,this.startNode(),"ImportDefaultSpecifier"),!0;return!1},n.maybeParseStarImportSpecifier=function(o){if(this.match(55)){var s=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(o,s,"ImportNamespaceSpecifier"),!0}return!1},n.parseNamedImportSpecifiers=function(o){var s=!0;for(this.expect(5);!this.eat(8);){if(s)s=!1;else{if(this.eat(14))throw this.raise(ft.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}var A=this.startNode(),d=this.match(133),c=this.isContextual(130);A.imported=this.parseModuleExportName();var f=this.parseImportSpecifier(A,d,o.importKind==="type"||o.importKind==="typeof",c,void 0);o.specifiers.push(f)}},n.parseImportSpecifier=function(o,s,A,d,c){if(this.eatContextual(93))o.local=this.parseIdentifier();else{var f=o.imported;if(s)throw this.raise(ft.ImportBindingIsString,o,{importName:f.value});this.checkReservedWord(f.name,o.loc.start,!0,!0),o.local||(o.local=$f(f))}return this.finishImportSpecifier(o,"ImportSpecifier",c)},n.isThisParam=function(o){return o.type==="Identifier"&&o.name==="this"},T(t)}(hBe),tY=function(e){function t(i,o){var s;return i=DBe(i),s=e.call(this,i,o)||this,s.options=i,s.initializeScopes(),s.plugins=EBe(s.options.plugins),s.filename=i.sourceFilename,s}ue(t,e);var n=t.prototype;return n.getScopeHandler=function(){return BT},n.parse=function(){this.enterInitialScopes();var o=this.startNode(),s=this.startNode();return this.nextToken(),o.errors=null,this.parseTopLevel(o,s),o.errors=this.state.errors,o.comments.length=this.state.commentsLen,o},T(t)}(yBe);function EBe(e){for(var t=new Map,n=0;n<e.length;n++){var i=e[n],o=Array.isArray(i)?i:[i,{}],s=o[0],A=o[1];t.has(s)||t.set(s,A||{})}return t}function LF(e,t){var n;if(((n=t)==null?void 0:n.sourceType)==="unambiguous"){t=Object.assign({},t);try{t.sourceType="module";var i=MF(t,e),o=i.parse();if(i.sawUnambiguousESM)return o;if(i.ambiguousScriptDifferentAst)try{return t.sourceType="script",MF(t,e).parse()}catch{}else o.program.sourceType="script";return o}catch(s){try{return t.sourceType="script",MF(t,e).parse()}catch{}throw s}}else return MF(t,e).parse()}function FBe(e,t){var n=MF(t,e);return n.options.strictMode&&(n.state.strict=!0),n.getExpression()}function vBe(e){for(var t={},n=0,i=Object.keys(e);n<i.length;n++){var o=i[n];t[o]=Of(e[o])}return t}var rY=vBe(d7e);function MF(e,t){var n=tY;return e!=null&&e.plugins&&(pBe(e.plugins),n=CBe(e.plugins)),new n(e,t)}var aY={};function CBe(e){var t=xBe.filter(function(A){return ko(e,A)}),n=t.join("/"),i=aY[n];if(!i){i=tY;for(var o=0;o<t.length;o++){var s=t[o];i=eY[s](i)}aY[n]=i}return i}var bBe=Object.freeze({__proto__:null,parse:LF,parseExpression:FBe,tokTypes:rY}),UF={},nY;function sY(){return nY||(nY=1,Object.defineProperty(UF,"__esModule",{value:!0}),UF.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,UF.matchToToken=function(e){var t={type:"invalid",value:e[0],closed:void 0};return e[1]?(t.type="string",t.closed=!!(e[3]||e[4])):e[5]?t.type="comment":e[6]?(t.type="comment",t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}),UF}function BBe(e){return e==null?!1:e&&e!=="false"&&e!=="0"}var iY=(BBe(zr.env.BABEL_8_BREAKING),sY()),wT={exports:{}},Oi=String,oY=function(){return{isColorSupported:!1,reset:Oi,bold:Oi,dim:Oi,italic:Oi,underline:Oi,inverse:Oi,hidden:Oi,strikethrough:Oi,black:Oi,red:Oi,green:Oi,yellow:Oi,blue:Oi,magenta:Oi,cyan:Oi,white:Oi,gray:Oi,bgBlack:Oi,bgRed:Oi,bgGreen:Oi,bgYellow:Oi,bgBlue:Oi,bgMagenta:Oi,bgCyan:Oi,bgWhite:Oi}};wT.exports=oY();var F8=wT.exports.createColors=oY,uY=wT.exports,AY=typeof zr=="object"&&(zr.env.FORCE_COLOR==="0"||zr.env.FORCE_COLOR==="false")?F8(!1):uY,lY=function(t,n){return function(i){return t(n(i))}},RBe=new Set(["as","async","from","get","of","set"]);function SBe(e){return{keyword:e.cyan,capitalized:e.yellow,jsxIdentifier:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.gray,invalid:lY(lY(e.white,e.bgRed),e.bold)}}var kBe=/\r\n|[\n\r\u2028\u2029]/,_Be=/^[()[\]{}]$/,dY;{var TBe=/^[a-z][\w-]*$/i,wBe=function(t,n,i){if(t.type==="name"){if(UD(t.value)||Tj(t.value,!0)||RBe.has(t.value))return"keyword";if(TBe.test(t.value)&&(i[n-1]==="<"||i.slice(n-2,n)==="</"))return"jsxIdentifier";if(t.value[0]!==t.value[0].toLowerCase())return"capitalized"}return t.type==="punctuator"&&_Be.test(t.value)?"bracket":t.type==="invalid"&&(t.value==="@"||t.value==="#")?"punctuator":t.type};dY=D().mark(function e(t){var n,i;return D().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(!(n=iY.default.exec(t))){s.next=6;break}return i=iY.matchToToken(n),s.next=4,{type:wBe(i,n.index,t),value:i.value};case 4:s.next=0;break;case 6:case"end":return s.stop()}},e)})}function PBe(e,t){for(var n="",i=function(){var d=s.value,c=d.type,f=d.value,x=e[c];x?n+=f.split(kBe).map(function(g){return x(g)}).join(`
`):n+=f},o=je(dY(t)),s;!(s=o()).done;)i();return n}function cY(e){return AY.isColorSupported||e.forceColor}var PT=void 0;function IBe(e){if(e){var t;return(t=PT)!=null||(PT=F8(!0)),PT}return AY}function OBe(e,t){if(t===void 0&&(t={}),e!==""&&cY(t)){var n=SBe(IBe(t.forceColor));return PBe(n,e)}else return e}var $Be=typeof zr=="object"&&(zr.env.FORCE_COLOR==="0"||zr.env.FORCE_COLOR==="false")?F8(!1):uY,fY=function(t,n){return function(i){return t(n(i))}},IT=void 0;function NBe(e){if(e){var t;return(t=IT)!=null||(IT=F8(!0)),IT}return $Be}function LBe(e){return{gutter:e.gray,marker:fY(e.red,e.bold),message:fY(e.red,e.bold)}}var pY=/\r\n|[\n\r\u2028\u2029]/;function MBe(e,t,n){var i=Object.assign({column:0,line:-1},e.start),o=Object.assign({},i,e.end),s=n||{},A=s.linesAbove,d=A===void 0?2:A,c=s.linesBelow,f=c===void 0?3:c,x=i.line,g=i.column,m=o.line,B=o.column,b=Math.max(x-(d+1),0),_=Math.min(t.length,m+f);x===-1&&(b=0),m===-1&&(_=t.length);var C=m-x,w={};if(C)for(var P=0;P<=C;P++){var M=P+x;if(!g)w[M]=!0;else if(P===0){var N=t[M-1].length;w[M]=[g,N-g+1]}else if(P===C)w[M]=[0,B];else{var q=t[M-P].length;w[M]=[0,q]}}else g===B?g?w[x]=[g,0]:w[x]=!0:w[x]=[g,B-g];return{start:b,end:_,markerLines:w}}function v8(e,t,n){n===void 0&&(n={});var i=(n.highlightCode||n.forceColor)&&cY(n),o=NBe(n.forceColor),s=LBe(o),A=function(w,P){return i?w(P):P},d=e.split(pY),c=MBe(t,d,n),f=c.start,x=c.end,g=c.markerLines,m=t.start&&typeof t.start.column=="number",B=String(x).length,b=i?OBe(e,n):e,_=b.split(pY,x).slice(f,x).map(function(C,w){var P=f+1+w,M=(" "+P).slice(-B),N=" "+M+" |",q=g[P],V=!g[P+1];if(q){var U="";if(Array.isArray(q)){var te=C.slice(0,Math.max(q[0]-1,0)).replace(/[^\t]/g," "),ae=q[1]||1;U=[`
`,A(s.gutter,N.replace(/\d/g," "))," ",te,A(s.marker,"^").repeat(ae)].join(""),V&&n.message&&(U+=" "+A(s.message,n.message))}return[A(s.marker,">"),A(s.gutter,N),C.length>0?" "+C:"",U].join("")}else return" "+A(s.gutter,N)+(C.length>0?" "+C:"")}).join(`
`);return n.message&&!m&&(_=""+" ".repeat(B+1)+n.message+`
`+_),i?o.reset(_):_}var UBe=Jt,GBe=cn,qBe=Ho,HBe=Ut,VBe=L,KBe=_r,C8=nr,WBe=Tu,xY=Br,zBe=dT,XBe=cT,YBe=/^[_$A-Z0-9]+$/;function DY(e,t,n){var i=n.placeholderWhitelist,o=n.placeholderPattern,s=n.preserveComments,A=n.syntacticPlaceholders,d=ZBe(t,n.parser,A);zBe(d,{preserveComments:s}),e.validate(d);var c={syntactic:{placeholders:[],placeholderNames:new Set},legacy:{placeholders:[],placeholderNames:new Set},placeholderWhitelist:i,placeholderPattern:o,syntacticPlaceholders:A};return XBe(d,QBe,c),Object.assign({ast:d},c.syntactic.placeholders.length?c.syntactic:c.legacy)}function QBe(e,t,n){var i,o,s=n.syntactic.placeholders.length>0;if(C8(e)){if(n.syntacticPlaceholders===!1)throw new Error("%%foo%%-style placeholders can't be used when '.syntacticPlaceholders' is false.");o=e.name.name,s=!0}else{if(s||n.syntacticPlaceholders)return;if(HBe(e)||VBe(e))o=e.name;else if(xY(e))o=e.value;else return}if(s&&(n.placeholderPattern!=null||n.placeholderWhitelist!=null))throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");if(!(!s&&(n.placeholderPattern===!1||!(n.placeholderPattern||YBe).test(o))&&!((i=n.placeholderWhitelist)!=null&&i.has(o)))){t=t.slice();var A=t[t.length-1],d=A.node,c=A.key,f;xY(e)||C8(e,{expectedNode:"StringLiteral"})?f="string":KBe(d)&&c==="arguments"||UBe(d)&&c==="arguments"||qBe(d)&&c==="params"?f="param":GBe(d)&&!C8(e)?(f="statement",t=t.slice(0,-1)):WBe(e)&&C8(e)?f="statement":f="other";var x=s?n.syntactic:n.legacy,g=x.placeholders,m=x.placeholderNames;g.push({name:o,type:f,resolve:function(b){return JBe(b,t)},isDuplicate:m.has(o)}),m.add(o)}}function JBe(e,t){for(var n=e,i=0;i<t.length-1;i++){var o=t[i],s=o.key,A=o.index;A===void 0?n=n[s]:n=n[s][A]}var d=t[t.length-1],c=d.key,f=d.index;return{parent:n,key:c,index:f}}function ZBe(e,t,n){var i=(t.plugins||[]).slice();n!==!1&&i.push("placeholders"),t=Object.assign({allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,sourceType:"module"},t,{plugins:i});try{return LF(e,t)}catch(s){var o=s.loc;throw o&&(s.message+=`
`+v8(e,{start:o}),s.code="BABEL_TEMPLATE_PARSE_ERROR"),s}}var eRe=Tn,OT=ke,tRe=zj,$T=Mr,b8=He,hY=Tu,rRe=Br,aRe=Vr,jY=Sf;function gY(e,t){var n=OT(e.ast);return t&&(e.placeholders.forEach(function(i){if(!hasOwnProperty.call(t,i.name)){var o=i.name;throw new Error('Error: No substitution given for "'+o+`". If this is not meant to be a
placeholder you may want to consider passing one of the following options to @babel/template:
- { placeholderPattern: false, placeholderWhitelist: new Set(['`+o+`'])}
- { placeholderPattern: /^`+o+"$/ }")}}),Object.keys(t).forEach(function(i){if(!e.placeholderNames.has(i))throw new Error('Unknown substitution "'+i+'" given')})),e.placeholders.slice().reverse().forEach(function(i){try{nRe(i,n,t&&t[i.name]||null)}catch(o){throw o.message='@babel/template placeholder "'+i.name+'": '+o.message,o}}),n}function nRe(e,t,n){e.isDuplicate&&(Array.isArray(n)?n=n.map(function(c){return OT(c)}):typeof n=="object"&&(n=OT(n)));var i=e.resolve(t),o=i.parent,s=i.key,A=i.index;if(e.type==="string"){if(typeof n=="string"&&(n=aRe(n)),!n||!rRe(n))throw new Error("Expected string substitution")}else if(e.type==="statement")A===void 0?n?Array.isArray(n)?n=eRe(n):typeof n=="string"?n=$T(b8(n)):hY(n)||(n=$T(n)):n=tRe():n&&!Array.isArray(n)&&(typeof n=="string"&&(n=b8(n)),hY(n)||(n=$T(n)));else if(e.type==="param"){if(typeof n=="string"&&(n=b8(n)),A===void 0)throw new Error("Assertion failure.")}else if(typeof n=="string"&&(n=b8(n)),Array.isArray(n))throw new Error("Cannot replace single expression with an array.");if(A===void 0)jY(o,s,n),o[s]=n;else{var d=o[s].slice();e.type==="statement"||e.type==="param"?n==null?d.splice(A,1):Array.isArray(n)?d.splice.apply(d,[A,1].concat(K(n))):d[A]=n:d[A]=n,jY(o,s,d),o[s]=d}}function mY(e,t,n){t=e.code(t);var i;return function(o){var s=RX(o);return i||(i=DY(e,t,n)),e.unwrap(gY(i,s))}}function yY(e,t,n){var i=sRe(e,t,n),o=i.metadata,s=i.names;return function(A){var d={};return A.forEach(function(c,f){d[s[f]]=c}),function(c){var f=RX(c);return f&&Object.keys(f).forEach(function(x){if(hasOwnProperty.call(d,x))throw new Error("Unexpected replacement overlap.")}),e.unwrap(gY(o,f?Object.assign(f,d):d))}}}function sRe(e,t,n){var i="BABEL_TPL$",o=t.join("");do i="$$"+i;while(o.includes(i));var s=iRe(t,i),A=s.names,d=s.code,c=DY(e,e.code(d),{parser:n.parser,placeholderWhitelist:new Set(A.concat(n.placeholderWhitelist?Array.from(n.placeholderWhitelist):[])),placeholderPattern:n.placeholderPattern,preserveComments:n.preserveComments,syntacticPlaceholders:n.syntacticPlaceholders});return{metadata:c,names:A}}function iRe(e,t){for(var n=[],i=e[0],o=1;o<e.length;o++){var s=""+t+(o-1);n.push(s),i+=s+e[o]}return{names:n,code:i}}var EY=SF({placeholderPattern:!1});function Bg(e,t){var n=new WeakMap,i=new WeakMap,o=t||SF(null);return Object.assign(function(s){for(var A=arguments.length,d=new Array(A>1?A-1:0),c=1;c<A;c++)d[c-1]=arguments[c];if(typeof s=="string"){if(d.length>1)throw new Error("Unexpected extra params.");return FY(mY(e,s,RF(o,SF(d[0]))))}else if(Array.isArray(s)){var f=n.get(s);return f||(f=yY(e,s,o),n.set(s,f)),FY(f(d))}else if(typeof s=="object"&&s){if(d.length>0)throw new Error("Unexpected extra params.");return Bg(e,RF(o,SF(s)))}throw new Error("Unexpected template param "+typeof s)},{ast:function(A){for(var d=arguments.length,c=new Array(d>1?d-1:0),f=1;f<d;f++)c[f-1]=arguments[f];if(typeof A=="string"){if(c.length>1)throw new Error("Unexpected extra params.");return mY(e,A,RF(RF(o,SF(c[0])),EY))()}else if(Array.isArray(A)){var x=i.get(A);return x||(x=yY(e,A,RF(o,EY)),i.set(A,x)),x(c)()}throw new Error("Unexpected template param "+typeof A)}})}function FY(e){var t="";try{throw new Error}catch(n){n.stack&&(t=n.stack.split(`
`).slice(3).join(`
`))}return function(n){try{return e(n)}catch(i){throw i.stack+=`
=============
`+t,i}}}var B8=Bg(X3e),vY=Bg(Q3e),CY=Bg(Y3e),bY=Bg(BX),BY=Bg(J3e),Qt=Object.assign(B8.bind(void 0),{smart:B8,statement:vY,statements:CY,expression:bY,program:BY,ast:B8.ast}),oRe=Object.freeze({__proto__:null,default:Qt,expression:bY,program:BY,smart:B8,statement:vY,statements:CY});function mr(e,t,n){return Object.freeze({minVersion:e,ast:function(){return Qt.program.ast(t,{preserveComments:!0})},metadata:n})}var NT={__proto__:null,OverloadYield:mr("7.18.14","function _OverloadYield(e,d){this.v=e,this.k=d}",{globals:[],locals:{_OverloadYield:["body.0.id"]},exportBindingAssignments:[],exportName:"_OverloadYield",dependencies:{}}),applyDecoratedDescriptor:mr("7.0.0-beta.0",'function _applyDecoratedDescriptor(i,e,r,n,l){var a={};return Object.keys(n).forEach((function(i){a[i]=n[i]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=r.slice().reverse().reduce((function(r,n){return n(i,e,r)||r}),a),l&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(l):void 0,a.initializer=void 0),void 0===a.initializer?(Object.defineProperty(i,e,a),null):a}',{globals:["Object"],locals:{_applyDecoratedDescriptor:["body.0.id"]},exportBindingAssignments:[],exportName:"_applyDecoratedDescriptor",dependencies:{}}),applyDecs2311:mr("7.24.0",'function applyDecs2311(e,t,n,r,o,i){var a,c,u,s,f,l,p,d=Symbol.metadata||Symbol.for("Symbol.metadata"),m=Object.defineProperty,h=Object.create,y=[h(null),h(null)],v=t.length;function g(t,n,r){return function(o,i){n&&(i=o,o=e);for(var a=0;a<t.length;a++)i=t[a].apply(o,r?[i]:[]);return r?i:o}}function b(e,t,n,r){if("function"!=typeof e&&(r||void 0!==e))throw new TypeError(t+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return e}function applyDec(e,t,n,r,o,i,u,s,f,l,p){function d(e){if(!p(e))throw new TypeError("Attempted to access private element on non-instance")}var h=[].concat(t[0]),v=t[3],w=!u,D=1===o,S=3===o,j=4===o,E=2===o;function I(t,n,r){return function(o,i){return n&&(i=o,o=e),r&&r(o),P[t].call(o,i)}}if(!w){var P={},k=[],F=S?"get":j||D?"set":"value";if(f?(l||D?P={get:setFunctionName((function(){return v(this)}),r,"get"),set:function(e){t[4](this,e)}}:P[F]=v,l||setFunctionName(P[F],r,E?"":F)):l||(P=Object.getOwnPropertyDescriptor(e,r)),!l&&!f){if((c=y[+s][r])&&7!=(c^o))throw Error("Decorating two elements with the same name ("+P[F].name+") is not supported yet");y[+s][r]=o<3?1:o}}for(var N=e,O=h.length-1;O>=0;O-=n?2:1){var T=b(h[O],"A decorator","be",!0),z=n?h[O-1]:void 0,A={},H={kind:["field","accessor","method","getter","setter","class"][o],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw new TypeError("attempted to call addInitializer after decoration was finished");b(t,"An initializer","be",!0),i.push(t)}.bind(null,A)};if(w)c=T.call(z,N,H),A.v=1,b(c,"class decorators","return")&&(N=c);else if(H.static=s,H.private=f,c=H.access={has:f?p.bind():function(e){return r in e}},j||(c.get=f?E?function(e){return d(e),P.value}:I("get",0,d):function(e){return e[r]}),E||S||(c.set=f?I("set",0,d):function(e,t){e[r]=t}),N=T.call(z,D?{get:P.get,set:P.set}:P[F],H),A.v=1,D){if("object"==typeof N&&N)(c=b(N.get,"accessor.get"))&&(P.get=c),(c=b(N.set,"accessor.set"))&&(P.set=c),(c=b(N.init,"accessor.init"))&&k.unshift(c);else if(void 0!==N)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else b(N,(l?"field":"method")+" decorators","return")&&(l?k.unshift(N):P[F]=N)}return o<2&&u.push(g(k,s,1),g(i,s,0)),l||w||(f?D?u.splice(-1,0,I("get",s),I("set",s)):u.push(E?P[F]:b.call.bind(P[F])):m(e,r,P)),N}function w(e){return m(e,d,{configurable:!0,enumerable:!0,value:a})}return void 0!==i&&(a=i[d]),a=h(null==a?null:a),f=[],l=function(e){e&&f.push(g(e))},p=function(t,r){for(var i=0;i<n.length;i++){var a=n[i],c=a[1],l=7&c;if((8&c)==t&&!l==r){var p=a[2],d=!!a[3],m=16&c;applyDec(t?e:e.prototype,a,m,d?"#"+p:toPropertyKey(p),l,l<2?[]:t?s=s||[]:u=u||[],f,!!t,d,r,t&&d?function(t){return checkInRHS(t)===e}:o)}}},p(8,0),p(0,0),p(8,1),p(0,1),l(u),l(s),c=f,v||w(e),{e:c,get c(){var n=[];return v&&[w(e=applyDec(e,[t],r,e.name,5,n)),g(n,1)]}}}',{globals:["Symbol","Object","TypeError","Error"],locals:{applyDecs2311:["body.0.id"]},exportBindingAssignments:[],exportName:"applyDecs2311",dependencies:{checkInRHS:["body.0.body.body.5.argument.expressions.4.right.body.body.0.body.body.1.consequent.body.1.expression.arguments.10.consequent.body.body.0.argument.left.callee"],setFunctionName:["body.0.body.body.3.body.body.3.consequent.body.1.test.expressions.0.consequent.expressions.0.consequent.right.properties.0.value.callee","body.0.body.body.3.body.body.3.consequent.body.1.test.expressions.0.consequent.expressions.1.right.callee"],toPropertyKey:["body.0.body.body.5.argument.expressions.4.right.body.body.0.body.body.1.consequent.body.1.expression.arguments.3.alternate.callee"]}}),arrayLikeToArray:mr("7.9.0","function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}",{globals:["Array"],locals:{_arrayLikeToArray:["body.0.id"]},exportBindingAssignments:[],exportName:"_arrayLikeToArray",dependencies:{}}),arrayWithHoles:mr("7.0.0-beta.0","function _arrayWithHoles(r){if(Array.isArray(r))return r}",{globals:["Array"],locals:{_arrayWithHoles:["body.0.id"]},exportBindingAssignments:[],exportName:"_arrayWithHoles",dependencies:{}}),arrayWithoutHoles:mr("7.0.0-beta.0","function _arrayWithoutHoles(r){if(Array.isArray(r))return arrayLikeToArray(r)}",{globals:["Array"],locals:{_arrayWithoutHoles:["body.0.id"]},exportBindingAssignments:[],exportName:"_arrayWithoutHoles",dependencies:{arrayLikeToArray:["body.0.body.body.0.consequent.argument.callee"]}}),assertClassBrand:mr("7.24.0",'function _assertClassBrand(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}',{globals:["TypeError"],locals:{_assertClassBrand:["body.0.id"]},exportBindingAssignments:[],exportName:"_assertClassBrand",dependencies:{}}),assertThisInitialized:mr("7.0.0-beta.0",`function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}`,{globals:["ReferenceError"],locals:{_assertThisInitialized:["body.0.id"]},exportBindingAssignments:[],exportName:"_assertThisInitialized",dependencies:{}}),asyncGeneratorDelegate:mr("7.0.0-beta.0",'function _asyncGeneratorDelegate(t){var e={},n=!1;function pump(e,r){return n=!0,r=new Promise((function(n){n(t[e](r))})),{done:!1,value:new OverloadYield(r,1)}}return e["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},e.next=function(t){return n?(n=!1,t):pump("next",t)},"function"==typeof t.throw&&(e.throw=function(t){if(n)throw n=!1,t;return pump("throw",t)}),"function"==typeof t.return&&(e.return=function(t){return n?(n=!1,t):pump("return",t)}),e}',{globals:["Promise","Symbol"],locals:{_asyncGeneratorDelegate:["body.0.id"]},exportBindingAssignments:[],exportName:"_asyncGeneratorDelegate",dependencies:{OverloadYield:["body.0.body.body.1.body.body.0.argument.expressions.2.properties.1.value.callee"]}}),asyncIterator:mr("7.15.9",'function _asyncIterator(r){var n,t,o,e=2;for("undefined"!=typeof Symbol&&(t=Symbol.asyncIterator,o=Symbol.iterator);e--;){if(t&&null!=(n=r[t]))return n.call(r);if(o&&null!=(n=r[o]))return new AsyncFromSyncIterator(n.call(r));t="@@asyncIterator",o="@@iterator"}throw new TypeError("Object is not async iterable")}function AsyncFromSyncIterator(r){function AsyncFromSyncIteratorContinuation(r){if(Object(r)!==r)return Promise.reject(new TypeError(r+" is not an object."));var n=r.done;return Promise.resolve(r.value).then((function(r){return{value:r,done:n}}))}return AsyncFromSyncIterator=function(r){this.s=r,this.n=r.next},AsyncFromSyncIterator.prototype={s:null,n:null,next:function(){return AsyncFromSyncIteratorContinuation(this.n.apply(this.s,arguments))},return:function(r){var n=this.s.return;return void 0===n?Promise.resolve({value:r,done:!0}):AsyncFromSyncIteratorContinuation(n.apply(this.s,arguments))},throw:function(r){var n=this.s.return;return void 0===n?Promise.reject(r):AsyncFromSyncIteratorContinuation(n.apply(this.s,arguments))}},new AsyncFromSyncIterator(r)}',{globals:["Symbol","TypeError","Object","Promise"],locals:{_asyncIterator:["body.0.id"],AsyncFromSyncIterator:["body.1.id","body.0.body.body.1.body.body.1.consequent.argument.callee","body.1.body.body.1.argument.expressions.1.left.object","body.1.body.body.1.argument.expressions.2.callee","body.1.body.body.1.argument.expressions.0.left"]},exportBindingAssignments:[],exportName:"_asyncIterator",dependencies:{}}),asyncToGenerator:mr("7.0.0-beta.0",'function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){return void e(n)}i.done?t(u):Promise.resolve(u).then(r,o)}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise((function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n)}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n)}_next(void 0)}))}}',{globals:["Promise"],locals:{asyncGeneratorStep:["body.0.id","body.1.body.body.0.argument.body.body.1.argument.arguments.0.body.body.1.body.body.0.expression.callee","body.1.body.body.0.argument.body.body.1.argument.arguments.0.body.body.2.body.body.0.expression.callee"],_asyncToGenerator:["body.1.id"]},exportBindingAssignments:[],exportName:"_asyncToGenerator",dependencies:{}}),awaitAsyncGenerator:mr("7.0.0-beta.0","function _awaitAsyncGenerator(e){return new OverloadYield(e,0)}",{globals:[],locals:{_awaitAsyncGenerator:["body.0.id"]},exportBindingAssignments:[],exportName:"_awaitAsyncGenerator",dependencies:{OverloadYield:["body.0.body.body.0.argument.callee"]}}),callSuper:mr("7.23.8","function _callSuper(t,o,e){return o=getPrototypeOf(o),possibleConstructorReturn(t,isNativeReflectConstruct()?Reflect.construct(o,e||[],getPrototypeOf(t).constructor):o.apply(t,e))}",{globals:["Reflect"],locals:{_callSuper:["body.0.id"]},exportBindingAssignments:[],exportName:"_callSuper",dependencies:{getPrototypeOf:["body.0.body.body.0.argument.expressions.0.right.callee","body.0.body.body.0.argument.expressions.1.arguments.1.consequent.arguments.2.object.callee"],isNativeReflectConstruct:["body.0.body.body.0.argument.expressions.1.arguments.1.test.callee"],possibleConstructorReturn:["body.0.body.body.0.argument.expressions.1.callee"]}}),checkInRHS:mr("7.20.5",`function _checkInRHS(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==e?typeof e:"null"));return e}`,{globals:["Object","TypeError"],locals:{_checkInRHS:["body.0.id"]},exportBindingAssignments:[],exportName:"_checkInRHS",dependencies:{}}),checkPrivateRedeclaration:mr("7.14.1",'function _checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}',{globals:["TypeError"],locals:{_checkPrivateRedeclaration:["body.0.id"]},exportBindingAssignments:[],exportName:"_checkPrivateRedeclaration",dependencies:{}}),classCallCheck:mr("7.0.0-beta.0",'function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}',{globals:["TypeError"],locals:{_classCallCheck:["body.0.id"]},exportBindingAssignments:[],exportName:"_classCallCheck",dependencies:{}}),classNameTDZError:mr("7.0.0-beta.0",`function _classNameTDZError(e){throw new ReferenceError('Class "'+e+'" cannot be referenced in computed property keys.')}`,{globals:["ReferenceError"],locals:{_classNameTDZError:["body.0.id"]},exportBindingAssignments:[],exportName:"_classNameTDZError",dependencies:{}}),classPrivateFieldGet2:mr("7.24.0","function _classPrivateFieldGet2(s,a){return s.get(assertClassBrand(s,a))}",{globals:[],locals:{_classPrivateFieldGet2:["body.0.id"]},exportBindingAssignments:[],exportName:"_classPrivateFieldGet2",dependencies:{assertClassBrand:["body.0.body.body.0.argument.arguments.0.callee"]}}),classPrivateFieldInitSpec:mr("7.14.1","function _classPrivateFieldInitSpec(e,t,a){checkPrivateRedeclaration(e,t),t.set(e,a)}",{globals:[],locals:{_classPrivateFieldInitSpec:["body.0.id"]},exportBindingAssignments:[],exportName:"_classPrivateFieldInitSpec",dependencies:{checkPrivateRedeclaration:["body.0.body.body.0.expression.expressions.0.callee"]}}),classPrivateFieldLooseBase:mr("7.0.0-beta.0",'function _classPrivateFieldBase(e,t){if(!{}.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}',{globals:["TypeError"],locals:{_classPrivateFieldBase:["body.0.id"]},exportBindingAssignments:[],exportName:"_classPrivateFieldBase",dependencies:{}}),classPrivateFieldLooseKey:mr("7.0.0-beta.0",'var id=0;function _classPrivateFieldKey(e){return"__private_"+id+++"_"+e}',{globals:[],locals:{id:["body.0.declarations.0.id","body.1.body.body.0.argument.left.left.right.argument","body.1.body.body.0.argument.left.left.right.argument"],_classPrivateFieldKey:["body.1.id"]},exportBindingAssignments:[],exportName:"_classPrivateFieldKey",dependencies:{}}),classPrivateFieldSet2:mr("7.24.0","function _classPrivateFieldSet2(s,a,r){return s.set(assertClassBrand(s,a),r),r}",{globals:[],locals:{_classPrivateFieldSet2:["body.0.id"]},exportBindingAssignments:[],exportName:"_classPrivateFieldSet2",dependencies:{assertClassBrand:["body.0.body.body.0.argument.expressions.0.arguments.0.callee"]}}),classPrivateGetter:mr("7.24.0","function _classPrivateGetter(s,r,a){return a(assertClassBrand(s,r))}",{globals:[],locals:{_classPrivateGetter:["body.0.id"]},exportBindingAssignments:[],exportName:"_classPrivateGetter",dependencies:{assertClassBrand:["body.0.body.body.0.argument.arguments.0.callee"]}}),classPrivateMethodInitSpec:mr("7.14.1","function _classPrivateMethodInitSpec(e,a){checkPrivateRedeclaration(e,a),a.add(e)}",{globals:[],locals:{_classPrivateMethodInitSpec:["body.0.id"]},exportBindingAssignments:[],exportName:"_classPrivateMethodInitSpec",dependencies:{checkPrivateRedeclaration:["body.0.body.body.0.expression.expressions.0.callee"]}}),classPrivateSetter:mr("7.24.0","function _classPrivateSetter(s,r,a,t){return r(assertClassBrand(s,a),t),t}",{globals:[],locals:{_classPrivateSetter:["body.0.id"]},exportBindingAssignments:[],exportName:"_classPrivateSetter",dependencies:{assertClassBrand:["body.0.body.body.0.argument.expressions.0.arguments.0.callee"]}}),classStaticPrivateMethodGet:mr("7.3.2","function _classStaticPrivateMethodGet(s,a,t){return assertClassBrand(a,s),t}",{globals:[],locals:{_classStaticPrivateMethodGet:["body.0.id"]},exportBindingAssignments:[],exportName:"_classStaticPrivateMethodGet",dependencies:{assertClassBrand:["body.0.body.body.0.argument.expressions.0.callee"]}}),construct:mr("7.0.0-beta.0","function _construct(t,e,r){if(isNativeReflectConstruct())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,e);var p=new(t.bind.apply(t,o));return r&&setPrototypeOf(p,r.prototype),p}",{globals:["Reflect"],locals:{_construct:["body.0.id"]},exportBindingAssignments:[],exportName:"_construct",dependencies:{isNativeReflectConstruct:["body.0.body.body.0.test.callee"],setPrototypeOf:["body.0.body.body.4.argument.expressions.0.right.callee"]}}),createClass:mr("7.0.0-beta.0",'function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}',{globals:["Object"],locals:{_defineProperties:["body.0.id","body.1.body.body.0.argument.expressions.0.right.callee","body.1.body.body.0.argument.expressions.1.right.callee"],_createClass:["body.1.id"]},exportBindingAssignments:[],exportName:"_createClass",dependencies:{toPropertyKey:["body.0.body.body.0.body.body.1.expression.expressions.3.arguments.1.callee"]}}),createForOfIteratorHelper:mr("7.9.0",'function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var n=0,F=function(){};return{s:F,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(r){throw r},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){t=t.call(r)},n:function(){var r=t.next();return a=r.done,r},e:function(r){u=!0,o=r},f:function(){try{a||null==t.return||t.return()}finally{if(u)throw o}}}}',{globals:["Symbol","Array","TypeError"],locals:{_createForOfIteratorHelper:["body.0.id"]},exportBindingAssignments:[],exportName:"_createForOfIteratorHelper",dependencies:{unsupportedIterableToArray:["body.0.body.body.1.consequent.body.0.test.left.right.right.callee"]}}),createForOfIteratorHelperLoose:mr("7.9.0",'function _createForOfIteratorHelperLoose(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var o=0;return function(){return o>=r.length?{done:!0}:{done:!1,value:r[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}',{globals:["Symbol","Array","TypeError"],locals:{_createForOfIteratorHelperLoose:["body.0.id"]},exportBindingAssignments:[],exportName:"_createForOfIteratorHelperLoose",dependencies:{unsupportedIterableToArray:["body.0.body.body.2.test.left.right.right.callee"]}}),createSuper:mr("7.9.0","function _createSuper(t){var r=isNativeReflectConstruct();return function(){var e,o=getPrototypeOf(t);if(r){var s=getPrototypeOf(this).constructor;e=Reflect.construct(o,arguments,s)}else e=o.apply(this,arguments);return possibleConstructorReturn(this,e)}}",{globals:["Reflect"],locals:{_createSuper:["body.0.id"]},exportBindingAssignments:[],exportName:"_createSuper",dependencies:{getPrototypeOf:["body.0.body.body.1.argument.body.body.0.declarations.1.init.callee","body.0.body.body.1.argument.body.body.1.consequent.body.0.declarations.0.init.object.callee"],isNativeReflectConstruct:["body.0.body.body.0.declarations.0.init.callee"],possibleConstructorReturn:["body.0.body.body.1.argument.body.body.2.argument.callee"]}}),decorate:mr("7.1.5",`function _decorate(e,r,t,i){var o=_getDecoratorsApi();if(i)for(var n=0;n<i.length;n++)o=i[n](o);var s=r((function(e){o.initializeInstanceElements(e,a.elements)}),t),a=o.decorateClass(_coalesceClassElements(s.d.map(_createElementDescriptor)),e);return o.initializeClassElements(s.F,a.elements),o.runClassFinishers(s.F,a.finishers)}function _getDecoratorsApi(){_getDecoratorsApi=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,r){["method","field"].forEach((function(t){r.forEach((function(r){r.kind===t&&"own"===r.placement&&this.defineClassElement(e,r)}),this)}),this)},initializeClassElements:function(e,r){var t=e.prototype;["method","field"].forEach((function(i){r.forEach((function(r){var o=r.placement;if(r.kind===i&&("static"===o||"prototype"===o)){var n="static"===o?e:t;this.defineClassElement(n,r)}}),this)}),this)},defineClassElement:function(e,r){var t=r.descriptor;if("field"===r.kind){var i=r.initializer;t={enumerable:t.enumerable,writable:t.writable,configurable:t.configurable,value:void 0===i?void 0:i.call(e)}}Object.defineProperty(e,r.key,t)},decorateClass:function(e,r){var t=[],i=[],o={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,o)}),this),e.forEach((function(e){if(!_hasDecorators(e))return t.push(e);var r=this.decorateElement(e,o);t.push(r.element),t.push.apply(t,r.extras),i.push.apply(i,r.finishers)}),this),!r)return{elements:t,finishers:i};var n=this.decorateConstructor(t,r);return i.push.apply(i,n.finishers),n.finishers=i,n},addElementPlacement:function(e,r,t){var i=r[e.placement];if(!t&&-1!==i.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");i.push(e.key)},decorateElement:function(e,r){for(var t=[],i=[],o=e.decorators,n=o.length-1;n>=0;n--){var s=r[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,o[n])(a)||a);e=l.element,this.addElementPlacement(e,r),l.finisher&&i.push(l.finisher);var c=l.extras;if(c){for(var p=0;p<c.length;p++)this.addElementPlacement(c[p],r);t.push.apply(t,c)}}return{element:e,finishers:i,extras:t}},decorateConstructor:function(e,r){for(var t=[],i=r.length-1;i>=0;i--){var o=this.fromClassDescriptor(e),n=this.toClassDescriptor((0,r[i])(o)||o);if(void 0!==n.finisher&&t.push(n.finisher),void 0!==n.elements){e=n.elements;for(var s=0;s<e.length-1;s++)for(var a=s+1;a<e.length;a++)if(e[s].key===e[a].key&&e[s].placement===e[a].placement)throw new TypeError("Duplicated element ("+e[s].key+")")}}return{elements:e,finishers:t}},fromElementDescriptor:function(e){var r={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(r,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(r.initializer=e.initializer),r},toElementDescriptors:function(e){if(void 0!==e)return toArray(e).map((function(e){var r=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),r}),this)},toElementDescriptor:function(e){var r=e.kind+"";if("method"!==r&&"field"!==r)throw new TypeError('An element descriptor\\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+r+'"');var t=toPropertyKey(e.key),i=e.placement+"";if("static"!==i&&"prototype"!==i&&"own"!==i)throw new TypeError('An element descriptor\\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+i+'"');var o=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var n={kind:r,key:t,placement:i,descriptor:Object.assign({},o)};return"field"!==r?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(o,"get","The property descriptor of a field descriptor"),this.disallowProperty(o,"set","The property descriptor of a field descriptor"),this.disallowProperty(o,"value","The property descriptor of a field descriptor"),n.initializer=e.initializer),n},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:_optionalCallableProperty(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var r={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(r,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),r},toClassDescriptor:function(e){var r=e.kind+"";if("class"!==r)throw new TypeError('A class descriptor\\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+r+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var t=_optionalCallableProperty(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:t}},runClassFinishers:function(e,r){for(var t=0;t<r.length;t++){var i=(0,r[t])(e);if(void 0!==i){if("function"!=typeof i)throw new TypeError("Finishers must return a constructor.");e=i}}return e},disallowProperty:function(e,r,t){if(void 0!==e[r])throw new TypeError(t+" can't have a ."+r+" property.")}};return e}function _createElementDescriptor(e){var r,t=toPropertyKey(e.key);"method"===e.kind?r={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?r={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?r={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(r={configurable:!0,writable:!0,enumerable:!0});var i={kind:"field"===e.kind?"field":"method",key:t,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:r};return e.decorators&&(i.decorators=e.decorators),"field"===e.kind&&(i.initializer=e.value),i}function _coalesceGetterSetter(e,r){void 0!==e.descriptor.get?r.descriptor.get=e.descriptor.get:r.descriptor.set=e.descriptor.set}function _coalesceClassElements(e){for(var r=[],isSameElement=function(e){return"method"===e.kind&&e.key===o.key&&e.placement===o.placement},t=0;t<e.length;t++){var i,o=e[t];if("method"===o.kind&&(i=r.find(isSameElement)))if(_isDataDescriptor(o.descriptor)||_isDataDescriptor(i.descriptor)){if(_hasDecorators(o)||_hasDecorators(i))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(_hasDecorators(o)){if(_hasDecorators(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}_coalesceGetterSetter(o,i)}else r.push(o)}return r}function _hasDecorators(e){return e.decorators&&e.decorators.length}function _isDataDescriptor(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function _optionalCallableProperty(e,r){var t=e[r];if(void 0!==t&&"function"!=typeof t)throw new TypeError("Expected '"+r+"' to be a function");return t}`,{globals:["Object","TypeError","Symbol","ReferenceError"],locals:{_decorate:["body.0.id"],_getDecoratorsApi:["body.1.id","body.0.body.body.0.declarations.0.init.callee","body.1.body.body.0.expression.left"],_createElementDescriptor:["body.2.id","body.0.body.body.2.declarations.1.init.arguments.0.arguments.0.arguments.0"],_coalesceGetterSetter:["body.3.id","body.4.body.body.0.body.body.1.consequent.alternate.body.1.expression.callee"],_coalesceClassElements:["body.4.id","body.0.body.body.2.declarations.1.init.arguments.0.callee"],_hasDecorators:["body.5.id","body.1.body.body.1.declarations.0.init.properties.4.value.body.body.1.test.expressions.1.arguments.0.body.body.0.test.argument.callee","body.4.body.body.0.body.body.1.consequent.consequent.body.0.test.left.callee","body.4.body.body.0.body.body.1.consequent.consequent.body.0.test.right.callee","body.4.body.body.0.body.body.1.consequent.alternate.body.0.test.callee","body.4.body.body.0.body.body.1.consequent.alternate.body.0.consequent.body.0.test.callee"],_isDataDescriptor:["body.6.id","body.4.body.body.0.body.body.1.consequent.test.left.callee","body.4.body.body.0.body.body.1.consequent.test.right.callee"],_optionalCallableProperty:["body.7.id","body.1.body.body.1.declarations.0.init.properties.11.value.body.body.0.argument.properties.1.value.callee","body.1.body.body.1.declarations.0.init.properties.13.value.body.body.3.declarations.0.init.callee"]},exportBindingAssignments:[],exportName:"_decorate",dependencies:{toArray:["body.1.body.body.1.declarations.0.init.properties.9.value.body.body.0.consequent.argument.callee.object.callee"],toPropertyKey:["body.1.body.body.1.declarations.0.init.properties.10.value.body.body.2.declarations.0.init.callee","body.2.body.body.0.declarations.1.init.callee"]}}),defaults:mr("7.0.0-beta.0","function _defaults(e,r){for(var t=Object.getOwnPropertyNames(r),o=0;o<t.length;o++){var n=t[o],a=Object.getOwnPropertyDescriptor(r,n);a&&a.configurable&&void 0===e[n]&&Object.defineProperty(e,n,a)}return e}",{globals:["Object"],locals:{_defaults:["body.0.id"]},exportBindingAssignments:[],exportName:"_defaults",dependencies:{}}),defineAccessor:mr("7.20.7","function _defineAccessor(e,r,n,t){var c={configurable:!0,enumerable:!0};return c[e]=t,Object.defineProperty(r,n,c)}",{globals:["Object"],locals:{_defineAccessor:["body.0.id"]},exportBindingAssignments:[],exportName:"_defineAccessor",dependencies:{}}),defineProperty:mr("7.0.0-beta.0","function _defineProperty(e,r,t){return(r=toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}",{globals:["Object"],locals:{_defineProperty:["body.0.id"]},exportBindingAssignments:[],exportName:"_defineProperty",dependencies:{toPropertyKey:["body.0.body.body.0.argument.expressions.0.test.left.right.callee"]}}),extends:mr("7.0.0-beta.0","function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}",{globals:["Object"],locals:{_extends:["body.0.id","body.0.body.body.0.argument.expressions.1.callee.object","body.0.body.body.0.argument.expressions.0.left"]},exportBindingAssignments:["body.0.body.body.0.argument.expressions.0"],exportName:"_extends",dependencies:{}}),get:mr("7.0.0-beta.0",'function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value}},_get.apply(null,arguments)}',{globals:["Reflect","Object"],locals:{_get:["body.0.id","body.0.body.body.0.argument.expressions.1.callee.object","body.0.body.body.0.argument.expressions.0.left"]},exportBindingAssignments:["body.0.body.body.0.argument.expressions.0"],exportName:"_get",dependencies:{superPropBase:["body.0.body.body.0.argument.expressions.0.right.alternate.body.body.0.declarations.0.init.callee"]}}),getPrototypeOf:mr("7.0.0-beta.0","function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}",{globals:["Object"],locals:{_getPrototypeOf:["body.0.id","body.0.body.body.0.argument.expressions.1.callee","body.0.body.body.0.argument.expressions.0.left"]},exportBindingAssignments:["body.0.body.body.0.argument.expressions.0"],exportName:"_getPrototypeOf",dependencies:{}}),identity:mr("7.17.0","function _identity(t){return t}",{globals:[],locals:{_identity:["body.0.id"]},exportBindingAssignments:[],exportName:"_identity",dependencies:{}}),importDeferProxy:mr("7.23.0","function _importDeferProxy(e){var t=null,constValue=function(e){return function(){return e}},proxy=function(r){return function(n,o,f){return null===t&&(t=e()),r(t,o,f)}};return new Proxy({},{defineProperty:constValue(!1),deleteProperty:constValue(!1),get:proxy(Reflect.get),getOwnPropertyDescriptor:proxy(Reflect.getOwnPropertyDescriptor),getPrototypeOf:constValue(null),isExtensible:constValue(!1),has:proxy(Reflect.has),ownKeys:proxy(Reflect.ownKeys),preventExtensions:constValue(!0),set:constValue(!1),setPrototypeOf:constValue(!1)})}",{globals:["Proxy","Reflect"],locals:{_importDeferProxy:["body.0.id"]},exportBindingAssignments:[],exportName:"_importDeferProxy",dependencies:{}}),inherits:mr("7.0.0-beta.0",'function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&setPrototypeOf(t,e)}',{globals:["TypeError","Object"],locals:{_inherits:["body.0.id"]},exportBindingAssignments:[],exportName:"_inherits",dependencies:{setPrototypeOf:["body.0.body.body.1.expression.expressions.2.right.callee"]}}),inheritsLoose:mr("7.0.0-beta.0","function _inheritsLoose(t,o){t.prototype=Object.create(o.prototype),t.prototype.constructor=t,setPrototypeOf(t,o)}",{globals:["Object"],locals:{_inheritsLoose:["body.0.id"]},exportBindingAssignments:[],exportName:"_inheritsLoose",dependencies:{setPrototypeOf:["body.0.body.body.0.expression.expressions.2.callee"]}}),initializerDefineProperty:mr("7.0.0-beta.0","function _initializerDefineProperty(e,i,r,l){r&&Object.defineProperty(e,i,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(l):void 0})}",{globals:["Object"],locals:{_initializerDefineProperty:["body.0.id"]},exportBindingAssignments:[],exportName:"_initializerDefineProperty",dependencies:{}}),initializerWarningHelper:mr("7.0.0-beta.0",'function _initializerWarningHelper(r,e){throw Error("Decorating class property failed. Please ensure that transform-class-properties is enabled and runs after the decorators transform.")}',{globals:["Error"],locals:{_initializerWarningHelper:["body.0.id"]},exportBindingAssignments:[],exportName:"_initializerWarningHelper",dependencies:{}}),instanceof:mr("7.0.0-beta.0",'function _instanceof(n,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](n):n instanceof e}',{globals:["Symbol"],locals:{_instanceof:["body.0.id"]},exportBindingAssignments:[],exportName:"_instanceof",dependencies:{}}),interopRequireDefault:mr("7.0.0-beta.0","function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}",{globals:[],locals:{_interopRequireDefault:["body.0.id"]},exportBindingAssignments:[],exportName:"_interopRequireDefault",dependencies:{}}),interopRequireWildcard:mr("7.14.0",'function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,t=new WeakMap;return(_getRequireWildcardCache=function(e){return e?t:r})(e)}function _interopRequireWildcard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment