"use strict"; var __defProp = Object.defineProperty; var __defProps = Object.defineProperties; var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropNames = Object.getOwnPropertyNames; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __hasOwnProp = Object.prototype.hasOwnProperty; var __propIsEnum = Object.prototype.propertyIsEnumerable; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __spreadValues = (a, b) => { for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) { if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); } return a; }; var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; // node_modules/universalify/index.js var require_universalify = __commonJS({ "node_modules/universalify/index.js"(exports2) { "use strict"; exports2.fromCallback = function(fn) { return Object.defineProperty(function(...args) { if (typeof args[args.length - 1] === "function") fn.apply(this, args); else { return new Promise((resolve, reject) => { fn.call(this, ...args, (err, res) => err != null ? reject(err) : resolve(res)); }); } }, "name", { value: fn.name }); }; exports2.fromPromise = function(fn) { return Object.defineProperty(function(...args) { const cb = args[args.length - 1]; if (typeof cb !== "function") return fn.apply(this, args); else fn.apply(this, args.slice(0, -1)).then((r) => cb(null, r), cb); }, "name", { value: fn.name }); }; } }); // ../../node_modules/graceful-fs/polyfills.js var require_polyfills = __commonJS({ "../../node_modules/graceful-fs/polyfills.js"(exports2, module2) { var constants = require("constants"); var origCwd = process.cwd; var cwd = null; var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform; process.cwd = function() { if (!cwd) cwd = origCwd.call(process); return cwd; }; try { process.cwd(); } catch (er) { } var chdir = process.chdir; process.chdir = function(d) { cwd = null; chdir.call(process, d); }; module2.exports = patch; function patch(fs2) { if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { patchLchmod(fs2); } if (!fs2.lutimes) { patchLutimes(fs2); } fs2.chown = chownFix(fs2.chown); fs2.fchown = chownFix(fs2.fchown); fs2.lchown = chownFix(fs2.lchown); fs2.chmod = chmodFix(fs2.chmod); fs2.fchmod = chmodFix(fs2.fchmod); fs2.lchmod = chmodFix(fs2.lchmod); fs2.chownSync = chownFixSync(fs2.chownSync); fs2.fchownSync = chownFixSync(fs2.fchownSync); fs2.lchownSync = chownFixSync(fs2.lchownSync); fs2.chmodSync = chmodFixSync(fs2.chmodSync); fs2.fchmodSync = chmodFixSync(fs2.fchmodSync); fs2.lchmodSync = chmodFixSync(fs2.lchmodSync); fs2.stat = statFix(fs2.stat); fs2.fstat = statFix(fs2.fstat); fs2.lstat = statFix(fs2.lstat); fs2.statSync = statFixSync(fs2.statSync); fs2.fstatSync = statFixSync(fs2.fstatSync); fs2.lstatSync = statFixSync(fs2.lstatSync); if (!fs2.lchmod) { fs2.lchmod = function(path2, mode, cb) { if (cb) process.nextTick(cb); }; fs2.lchmodSync = function() { }; } if (!fs2.lchown) { fs2.lchown = function(path2, uid, gid, cb) { if (cb) process.nextTick(cb); }; fs2.lchownSync = function() { }; } if (platform === "win32") { fs2.rename = function(fs$rename) { return function(from, to, cb) { var start = Date.now(); var backoff = 0; fs$rename(from, to, function CB(er) { if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) { setTimeout(function() { fs2.stat(to, function(stater, st) { if (stater && stater.code === "ENOENT") fs$rename(from, to, CB); else cb(er); }); }, backoff); if (backoff < 100) backoff += 10; return; } if (cb) cb(er); }); }; }(fs2.rename); } fs2.read = function(fs$read) { function read(fd, buffer, offset, length, position, callback_) { var callback; if (callback_ && typeof callback_ === "function") { var eagCounter = 0; callback = function(er, _, __) { if (er && er.code === "EAGAIN" && eagCounter < 10) { eagCounter++; return fs$read.call(fs2, fd, buffer, offset, length, position, callback); } callback_.apply(this, arguments); }; } return fs$read.call(fs2, fd, buffer, offset, length, position, callback); } read.__proto__ = fs$read; return read; }(fs2.read); fs2.readSync = function(fs$readSync) { return function(fd, buffer, offset, length, position) { var eagCounter = 0; while (true) { try { return fs$readSync.call(fs2, fd, buffer, offset, length, position); } catch (er) { if (er.code === "EAGAIN" && eagCounter < 10) { eagCounter++; continue; } throw er; } } }; }(fs2.readSync); function patchLchmod(fs3) { fs3.lchmod = function(path2, mode, callback) { fs3.open(path2, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) { if (err) { if (callback) callback(err); return; } fs3.fchmod(fd, mode, function(err2) { fs3.close(fd, function(err22) { if (callback) callback(err2 || err22); }); }); }); }; fs3.lchmodSync = function(path2, mode) { var fd = fs3.openSync(path2, constants.O_WRONLY | constants.O_SYMLINK, mode); var threw = true; var ret; try { ret = fs3.fchmodSync(fd, mode); threw = false; } finally { if (threw) { try { fs3.closeSync(fd); } catch (er) { } } else { fs3.closeSync(fd); } } return ret; }; } function patchLutimes(fs3) { if (constants.hasOwnProperty("O_SYMLINK")) { fs3.lutimes = function(path2, at, mt, cb) { fs3.open(path2, constants.O_SYMLINK, function(er, fd) { if (er) { if (cb) cb(er); return; } fs3.futimes(fd, at, mt, function(er2) { fs3.close(fd, function(er22) { if (cb) cb(er2 || er22); }); }); }); }; fs3.lutimesSync = function(path2, at, mt) { var fd = fs3.openSync(path2, constants.O_SYMLINK); var ret; var threw = true; try { ret = fs3.futimesSync(fd, at, mt); threw = false; } finally { if (threw) { try { fs3.closeSync(fd); } catch (er) { } } else { fs3.closeSync(fd); } } return ret; }; } else { fs3.lutimes = function(_a, _b, _c, cb) { if (cb) process.nextTick(cb); }; fs3.lutimesSync = function() { }; } } function chmodFix(orig) { if (!orig) return orig; return function(target, mode, cb) { return orig.call(fs2, target, mode, function(er) { if (chownErOk(er)) er = null; if (cb) cb.apply(this, arguments); }); }; } function chmodFixSync(orig) { if (!orig) return orig; return function(target, mode) { try { return orig.call(fs2, target, mode); } catch (er) { if (!chownErOk(er)) throw er; } }; } function chownFix(orig) { if (!orig) return orig; return function(target, uid, gid, cb) { return orig.call(fs2, target, uid, gid, function(er) { if (chownErOk(er)) er = null; if (cb) cb.apply(this, arguments); }); }; } function chownFixSync(orig) { if (!orig) return orig; return function(target, uid, gid) { try { return orig.call(fs2, target, uid, gid); } catch (er) { if (!chownErOk(er)) throw er; } }; } function statFix(orig) { if (!orig) return orig; return function(target, options, cb) { if (typeof options === "function") { cb = options; options = null; } function callback(er, stats) { if (stats) { if (stats.uid < 0) stats.uid += 4294967296; if (stats.gid < 0) stats.gid += 4294967296; } if (cb) cb.apply(this, arguments); } return options ? orig.call(fs2, target, options, callback) : orig.call(fs2, target, callback); }; } function statFixSync(orig) { if (!orig) return orig; return function(target, options) { var stats = options ? orig.call(fs2, target, options) : orig.call(fs2, target); if (stats.uid < 0) stats.uid += 4294967296; if (stats.gid < 0) stats.gid += 4294967296; return stats; }; } function chownErOk(er) { if (!er) return true; if (er.code === "ENOSYS") return true; var nonroot = !process.getuid || process.getuid() !== 0; if (nonroot) { if (er.code === "EINVAL" || er.code === "EPERM") return true; } return false; } } } }); // ../../node_modules/graceful-fs/legacy-streams.js var require_legacy_streams = __commonJS({ "../../node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { var Stream = require("stream").Stream; module2.exports = legacy; function legacy(fs2) { return { ReadStream, WriteStream }; function ReadStream(path2, options) { if (!(this instanceof ReadStream)) return new ReadStream(path2, options); Stream.call(this); var self = this; this.path = path2; this.fd = null; this.readable = true; this.paused = false; this.flags = "r"; this.mode = 438; this.bufferSize = 64 * 1024; options = options || {}; var keys = Object.keys(options); for (var index = 0, length = keys.length; index < length; index++) { var key = keys[index]; this[key] = options[key]; } if (this.encoding) this.setEncoding(this.encoding); if (this.start !== void 0) { if (typeof this.start !== "number") { throw TypeError("start must be a Number"); } if (this.end === void 0) { this.end = Infinity; } else if (typeof this.end !== "number") { throw TypeError("end must be a Number"); } if (this.start > this.end) { throw new Error("start must be <= end"); } this.pos = this.start; } if (this.fd !== null) { process.nextTick(function() { self._read(); }); return; } fs2.open(this.path, this.flags, this.mode, function(err, fd) { if (err) { self.emit("error", err); self.readable = false; return; } self.fd = fd; self.emit("open", fd); self._read(); }); } function WriteStream(path2, options) { if (!(this instanceof WriteStream)) return new WriteStream(path2, options); Stream.call(this); this.path = path2; this.fd = null; this.writable = true; this.flags = "w"; this.encoding = "binary"; this.mode = 438; this.bytesWritten = 0; options = options || {}; var keys = Object.keys(options); for (var index = 0, length = keys.length; index < length; index++) { var key = keys[index]; this[key] = options[key]; } if (this.start !== void 0) { if (typeof this.start !== "number") { throw TypeError("start must be a Number"); } if (this.start < 0) { throw new Error("start must be >= zero"); } this.pos = this.start; } this.busy = false; this._queue = []; if (this.fd === null) { this._open = fs2.open; this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); this.flush(); } } } } }); // ../../node_modules/graceful-fs/clone.js var require_clone = __commonJS({ "../../node_modules/graceful-fs/clone.js"(exports2, module2) { "use strict"; module2.exports = clone; function clone(obj) { if (obj === null || typeof obj !== "object") return obj; if (obj instanceof Object) var copy = { __proto__: obj.__proto__ }; else var copy = /* @__PURE__ */ Object.create(null); Object.getOwnPropertyNames(obj).forEach(function(key) { Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); }); return copy; } } }); // ../../node_modules/graceful-fs/graceful-fs.js var require_graceful_fs = __commonJS({ "../../node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { var fs2 = require("fs"); var polyfills = require_polyfills(); var legacy = require_legacy_streams(); var clone = require_clone(); var util = require("util"); var gracefulQueue; var previousSymbol; if (typeof Symbol === "function" && typeof Symbol.for === "function") { gracefulQueue = Symbol.for("graceful-fs.queue"); previousSymbol = Symbol.for("graceful-fs.previous"); } else { gracefulQueue = "___graceful-fs.queue"; previousSymbol = "___graceful-fs.previous"; } function noop() { } function publishQueue(context, queue2) { Object.defineProperty(context, gracefulQueue, { get: function() { return queue2; } }); } var debug = noop; if (util.debuglog) debug = util.debuglog("gfs4"); else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) debug = function() { var m = util.format.apply(util, arguments); m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); console.error(m); }; if (!fs2[gracefulQueue]) { queue = global[gracefulQueue] || []; publishQueue(fs2, queue); fs2.close = function(fs$close) { function close(fd, cb) { return fs$close.call(fs2, fd, function(err) { if (!err) { retry(); } if (typeof cb === "function") cb.apply(this, arguments); }); } Object.defineProperty(close, previousSymbol, { value: fs$close }); return close; }(fs2.close); fs2.closeSync = function(fs$closeSync) { function closeSync(fd) { fs$closeSync.apply(fs2, arguments); retry(); } Object.defineProperty(closeSync, previousSymbol, { value: fs$closeSync }); return closeSync; }(fs2.closeSync); if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { process.on("exit", function() { debug(fs2[gracefulQueue]); require("assert").equal(fs2[gracefulQueue].length, 0); }); } } var queue; if (!global[gracefulQueue]) { publishQueue(global, fs2[gracefulQueue]); } module2.exports = patch(clone(fs2)); if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs2.__patched) { module2.exports = patch(fs2); fs2.__patched = true; } function patch(fs3) { polyfills(fs3); fs3.gracefulify = patch; fs3.createReadStream = createReadStream; fs3.createWriteStream = createWriteStream; var fs$readFile = fs3.readFile; fs3.readFile = readFile; function readFile(path2, options, cb) { if (typeof options === "function") cb = options, options = null; return go$readFile(path2, options, cb); function go$readFile(path3, options2, cb2) { return fs$readFile(path3, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([go$readFile, [path3, options2, cb2]]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); retry(); } }); } } var fs$writeFile = fs3.writeFile; fs3.writeFile = writeFile; function writeFile(path2, data, options, cb) { if (typeof options === "function") cb = options, options = null; return go$writeFile(path2, data, options, cb); function go$writeFile(path3, data2, options2, cb2) { return fs$writeFile(path3, data2, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([go$writeFile, [path3, data2, options2, cb2]]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); retry(); } }); } } var fs$appendFile = fs3.appendFile; if (fs$appendFile) fs3.appendFile = appendFile; function appendFile(path2, data, options, cb) { if (typeof options === "function") cb = options, options = null; return go$appendFile(path2, data, options, cb); function go$appendFile(path3, data2, options2, cb2) { return fs$appendFile(path3, data2, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([go$appendFile, [path3, data2, options2, cb2]]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); retry(); } }); } } var fs$readdir = fs3.readdir; fs3.readdir = readdir; function readdir(path2, options, cb) { var args = [path2]; if (typeof options !== "function") { args.push(options); } else { cb = options; } args.push(go$readdir$cb); return go$readdir(args); function go$readdir$cb(err, files) { if (files && files.sort) files.sort(); if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([go$readdir, [args]]); else { if (typeof cb === "function") cb.apply(this, arguments); retry(); } } } function go$readdir(args) { return fs$readdir.apply(fs3, args); } if (process.version.substr(0, 4) === "v0.8") { var legStreams = legacy(fs3); ReadStream = legStreams.ReadStream; WriteStream = legStreams.WriteStream; } var fs$ReadStream = fs3.ReadStream; if (fs$ReadStream) { ReadStream.prototype = Object.create(fs$ReadStream.prototype); ReadStream.prototype.open = ReadStream$open; } var fs$WriteStream = fs3.WriteStream; if (fs$WriteStream) { WriteStream.prototype = Object.create(fs$WriteStream.prototype); WriteStream.prototype.open = WriteStream$open; } Object.defineProperty(fs3, "ReadStream", { get: function() { return ReadStream; }, set: function(val) { ReadStream = val; }, enumerable: true, configurable: true }); Object.defineProperty(fs3, "WriteStream", { get: function() { return WriteStream; }, set: function(val) { WriteStream = val; }, enumerable: true, configurable: true }); var FileReadStream = ReadStream; Object.defineProperty(fs3, "FileReadStream", { get: function() { return FileReadStream; }, set: function(val) { FileReadStream = val; }, enumerable: true, configurable: true }); var FileWriteStream = WriteStream; Object.defineProperty(fs3, "FileWriteStream", { get: function() { return FileWriteStream; }, set: function(val) { FileWriteStream = val; }, enumerable: true, configurable: true }); function ReadStream(path2, options) { if (this instanceof ReadStream) return fs$ReadStream.apply(this, arguments), this; else return ReadStream.apply(Object.create(ReadStream.prototype), arguments); } function ReadStream$open() { var that = this; open(that.path, that.flags, that.mode, function(err, fd) { if (err) { if (that.autoClose) that.destroy(); that.emit("error", err); } else { that.fd = fd; that.emit("open", fd); that.read(); } }); } function WriteStream(path2, options) { if (this instanceof WriteStream) return fs$WriteStream.apply(this, arguments), this; else return WriteStream.apply(Object.create(WriteStream.prototype), arguments); } function WriteStream$open() { var that = this; open(that.path, that.flags, that.mode, function(err, fd) { if (err) { that.destroy(); that.emit("error", err); } else { that.fd = fd; that.emit("open", fd); } }); } function createReadStream(path2, options) { return new fs3.ReadStream(path2, options); } function createWriteStream(path2, options) { return new fs3.WriteStream(path2, options); } var fs$open = fs3.open; fs3.open = open; function open(path2, flags, mode, cb) { if (typeof mode === "function") cb = mode, mode = null; return go$open(path2, flags, mode, cb); function go$open(path3, flags2, mode2, cb2) { return fs$open(path3, flags2, mode2, function(err, fd) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([go$open, [path3, flags2, mode2, cb2]]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); retry(); } }); } } return fs3; } function enqueue(elem) { debug("ENQUEUE", elem[0].name, elem[1]); fs2[gracefulQueue].push(elem); } function retry() { var elem = fs2[gracefulQueue].shift(); if (elem) { debug("RETRY", elem[0].name, elem[1]); elem[0].apply(null, elem[1]); } } } }); // node_modules/fs-extra/lib/fs/index.js var require_fs = __commonJS({ "node_modules/fs-extra/lib/fs/index.js"(exports2) { "use strict"; var u = require_universalify().fromCallback; var fs2 = require_graceful_fs(); var api = [ "access", "appendFile", "chmod", "chown", "close", "copyFile", "fchmod", "fchown", "fdatasync", "fstat", "fsync", "ftruncate", "futimes", "lchmod", "lchown", "link", "lstat", "mkdir", "mkdtemp", "open", "opendir", "readdir", "readFile", "readlink", "realpath", "rename", "rm", "rmdir", "stat", "symlink", "truncate", "unlink", "utimes", "writeFile" ].filter((key) => { return typeof fs2[key] === "function"; }); Object.assign(exports2, fs2); api.forEach((method) => { exports2[method] = u(fs2[method]); }); exports2.realpath.native = u(fs2.realpath.native); exports2.exists = function(filename, callback) { if (typeof callback === "function") { return fs2.exists(filename, callback); } return new Promise((resolve) => { return fs2.exists(filename, resolve); }); }; exports2.read = function(fd, buffer, offset, length, position, callback) { if (typeof callback === "function") { return fs2.read(fd, buffer, offset, length, position, callback); } return new Promise((resolve, reject) => { fs2.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => { if (err) return reject(err); resolve({ bytesRead, buffer: buffer2 }); }); }); }; exports2.write = function(fd, buffer, ...args) { if (typeof args[args.length - 1] === "function") { return fs2.write(fd, buffer, ...args); } return new Promise((resolve, reject) => { fs2.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => { if (err) return reject(err); resolve({ bytesWritten, buffer: buffer2 }); }); }); }; if (typeof fs2.writev === "function") { exports2.writev = function(fd, buffers, ...args) { if (typeof args[args.length - 1] === "function") { return fs2.writev(fd, buffers, ...args); } return new Promise((resolve, reject) => { fs2.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => { if (err) return reject(err); resolve({ bytesWritten, buffers: buffers2 }); }); }); }; } } }); // node_modules/fs-extra/lib/mkdirs/utils.js var require_utils = __commonJS({ "node_modules/fs-extra/lib/mkdirs/utils.js"(exports2, module2) { "use strict"; var path2 = require("path"); module2.exports.checkPath = function checkPath(pth) { if (process.platform === "win32") { const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path2.parse(pth).root, "")); if (pathHasInvalidWinCharacters) { const error = new Error(`Path contains invalid characters: ${pth}`); error.code = "EINVAL"; throw error; } } }; } }); // node_modules/fs-extra/lib/mkdirs/make-dir.js var require_make_dir = __commonJS({ "node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports2, module2) { "use strict"; var fs2 = require_fs(); var { checkPath } = require_utils(); var getMode = (options) => { const defaults = { mode: 511 }; if (typeof options === "number") return options; return __spreadValues(__spreadValues({}, defaults), options).mode; }; module2.exports.makeDir = async (dir, options) => { checkPath(dir); return fs2.mkdir(dir, { mode: getMode(options), recursive: true }); }; module2.exports.makeDirSync = (dir, options) => { checkPath(dir); return fs2.mkdirSync(dir, { mode: getMode(options), recursive: true }); }; } }); // node_modules/fs-extra/lib/mkdirs/index.js var require_mkdirs = __commonJS({ "node_modules/fs-extra/lib/mkdirs/index.js"(exports2, module2) { "use strict"; var u = require_universalify().fromPromise; var { makeDir: _makeDir, makeDirSync } = require_make_dir(); var makeDir = u(_makeDir); module2.exports = { mkdirs: makeDir, mkdirsSync: makeDirSync, mkdirp: makeDir, mkdirpSync: makeDirSync, ensureDir: makeDir, ensureDirSync: makeDirSync }; } }); // node_modules/fs-extra/lib/util/utimes.js var require_utimes = __commonJS({ "node_modules/fs-extra/lib/util/utimes.js"(exports2, module2) { "use strict"; var fs2 = require_graceful_fs(); function utimesMillis(path2, atime, mtime, callback) { fs2.open(path2, "r+", (err, fd) => { if (err) return callback(err); fs2.futimes(fd, atime, mtime, (futimesErr) => { fs2.close(fd, (closeErr) => { if (callback) callback(futimesErr || closeErr); }); }); }); } function utimesMillisSync(path2, atime, mtime) { const fd = fs2.openSync(path2, "r+"); fs2.futimesSync(fd, atime, mtime); return fs2.closeSync(fd); } module2.exports = { utimesMillis, utimesMillisSync }; } }); // node_modules/fs-extra/lib/util/stat.js var require_stat = __commonJS({ "node_modules/fs-extra/lib/util/stat.js"(exports2, module2) { "use strict"; var fs2 = require_fs(); var path2 = require("path"); var util = require("util"); function getStats(src, dest, opts) { const statFunc = opts.dereference ? (file) => fs2.stat(file, { bigint: true }) : (file) => fs2.lstat(file, { bigint: true }); return Promise.all([ statFunc(src), statFunc(dest).catch((err) => { if (err.code === "ENOENT") return null; throw err; }) ]).then(([srcStat, destStat]) => ({ srcStat, destStat })); } function getStatsSync(src, dest, opts) { let destStat; const statFunc = opts.dereference ? (file) => fs2.statSync(file, { bigint: true }) : (file) => fs2.lstatSync(file, { bigint: true }); const srcStat = statFunc(src); try { destStat = statFunc(dest); } catch (err) { if (err.code === "ENOENT") return { srcStat, destStat: null }; throw err; } return { srcStat, destStat }; } function checkPaths(src, dest, funcName, opts, cb) { util.callbackify(getStats)(src, dest, opts, (err, stats) => { if (err) return cb(err); const { srcStat, destStat } = stats; if (destStat) { if (areIdentical(srcStat, destStat)) { const srcBaseName = path2.basename(src); const destBaseName = path2.basename(dest); if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) { return cb(null, { srcStat, destStat, isChangingCase: true }); } return cb(new Error("Source and destination must not be the same.")); } if (srcStat.isDirectory() && !destStat.isDirectory()) { return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)); } if (!srcStat.isDirectory() && destStat.isDirectory()) { return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`)); } } if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { return cb(new Error(errMsg(src, dest, funcName))); } return cb(null, { srcStat, destStat }); }); } function checkPathsSync(src, dest, funcName, opts) { const { srcStat, destStat } = getStatsSync(src, dest, opts); if (destStat) { if (areIdentical(srcStat, destStat)) { const srcBaseName = path2.basename(src); const destBaseName = path2.basename(dest); if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) { return { srcStat, destStat, isChangingCase: true }; } throw new Error("Source and destination must not be the same."); } if (srcStat.isDirectory() && !destStat.isDirectory()) { throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`); } if (!srcStat.isDirectory() && destStat.isDirectory()) { throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`); } } if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { throw new Error(errMsg(src, dest, funcName)); } return { srcStat, destStat }; } function checkParentPaths(src, srcStat, dest, funcName, cb) { const srcParent = path2.resolve(path2.dirname(src)); const destParent = path2.resolve(path2.dirname(dest)); if (destParent === srcParent || destParent === path2.parse(destParent).root) return cb(); fs2.stat(destParent, { bigint: true }, (err, destStat) => { if (err) { if (err.code === "ENOENT") return cb(); return cb(err); } if (areIdentical(srcStat, destStat)) { return cb(new Error(errMsg(src, dest, funcName))); } return checkParentPaths(src, srcStat, destParent, funcName, cb); }); } function checkParentPathsSync(src, srcStat, dest, funcName) { const srcParent = path2.resolve(path2.dirname(src)); const destParent = path2.resolve(path2.dirname(dest)); if (destParent === srcParent || destParent === path2.parse(destParent).root) return; let destStat; try { destStat = fs2.statSync(destParent, { bigint: true }); } catch (err) { if (err.code === "ENOENT") return; throw err; } if (areIdentical(srcStat, destStat)) { throw new Error(errMsg(src, dest, funcName)); } return checkParentPathsSync(src, srcStat, destParent, funcName); } function areIdentical(srcStat, destStat) { return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev; } function isSrcSubdir(src, dest) { const srcArr = path2.resolve(src).split(path2.sep).filter((i) => i); const destArr = path2.resolve(dest).split(path2.sep).filter((i) => i); return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true); } function errMsg(src, dest, funcName) { return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`; } module2.exports = { checkPaths, checkPathsSync, checkParentPaths, checkParentPathsSync, isSrcSubdir, areIdentical }; } }); // node_modules/fs-extra/lib/copy-sync/copy-sync.js var require_copy_sync = __commonJS({ "node_modules/fs-extra/lib/copy-sync/copy-sync.js"(exports2, module2) { "use strict"; var fs2 = require_graceful_fs(); var path2 = require("path"); var mkdirsSync = require_mkdirs().mkdirsSync; var utimesMillisSync = require_utimes().utimesMillisSync; var stat = require_stat(); function copySync(src, dest, opts) { if (typeof opts === "function") { opts = { filter: opts }; } opts = opts || {}; opts.clobber = "clobber" in opts ? !!opts.clobber : true; opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber; if (opts.preserveTimestamps && process.arch === "ia32") { console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended; see https://github.com/jprichardson/node-fs-extra/issues/269`); } const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts); stat.checkParentPathsSync(src, srcStat, dest, "copy"); return handleFilterAndCopy(destStat, src, dest, opts); } function handleFilterAndCopy(destStat, src, dest, opts) { if (opts.filter && !opts.filter(src, dest)) return; const destParent = path2.dirname(dest); if (!fs2.existsSync(destParent)) mkdirsSync(destParent); return getStats(destStat, src, dest, opts); } function startCopy(destStat, src, dest, opts) { if (opts.filter && !opts.filter(src, dest)) return; return getStats(destStat, src, dest, opts); } function getStats(destStat, src, dest, opts) { const statSync = opts.dereference ? fs2.statSync : fs2.lstatSync; const srcStat = statSync(src); if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts); else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts); else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts); else if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`); else if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`); throw new Error(`Unknown file: ${src}`); } function onFile(srcStat, destStat, src, dest, opts) { if (!destStat) return copyFile(srcStat, src, dest, opts); return mayCopyFile(srcStat, src, dest, opts); } function mayCopyFile(srcStat, src, dest, opts) { if (opts.overwrite) { fs2.unlinkSync(dest); return copyFile(srcStat, src, dest, opts); } else if (opts.errorOnExist) { throw new Error(`'${dest}' already exists`); } } function copyFile(srcStat, src, dest, opts) { fs2.copyFileSync(src, dest); if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest); return setDestMode(dest, srcStat.mode); } function handleTimestamps(srcMode, src, dest) { if (fileIsNotWritable(srcMode)) makeFileWritable(dest, srcMode); return setDestTimestamps(src, dest); } function fileIsNotWritable(srcMode) { return (srcMode & 128) === 0; } function makeFileWritable(dest, srcMode) { return setDestMode(dest, srcMode | 128); } function setDestMode(dest, srcMode) { return fs2.chmodSync(dest, srcMode); } function setDestTimestamps(src, dest) { const updatedSrcStat = fs2.statSync(src); return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime); } function onDir(srcStat, destStat, src, dest, opts) { if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts); return copyDir(src, dest, opts); } function mkDirAndCopy(srcMode, src, dest, opts) { fs2.mkdirSync(dest); copyDir(src, dest, opts); return setDestMode(dest, srcMode); } function copyDir(src, dest, opts) { fs2.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts)); } function copyDirItem(item, src, dest, opts) { const srcItem = path2.join(src, item); const destItem = path2.join(dest, item); const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts); return startCopy(destStat, srcItem, destItem, opts); } function onLink(destStat, src, dest, opts) { let resolvedSrc = fs2.readlinkSync(src); if (opts.dereference) { resolvedSrc = path2.resolve(process.cwd(), resolvedSrc); } if (!destStat) { return fs2.symlinkSync(resolvedSrc, dest); } else { let resolvedDest; try { resolvedDest = fs2.readlinkSync(dest); } catch (err) { if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs2.symlinkSync(resolvedSrc, dest); throw err; } if (opts.dereference) { resolvedDest = path2.resolve(process.cwd(), resolvedDest); } if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) { throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`); } if (fs2.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) { throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`); } return copyLink(resolvedSrc, dest); } } function copyLink(resolvedSrc, dest) { fs2.unlinkSync(dest); return fs2.symlinkSync(resolvedSrc, dest); } module2.exports = copySync; } }); // node_modules/fs-extra/lib/copy-sync/index.js var require_copy_sync2 = __commonJS({ "node_modules/fs-extra/lib/copy-sync/index.js"(exports2, module2) { "use strict"; module2.exports = { copySync: require_copy_sync() }; } }); // node_modules/fs-extra/lib/path-exists/index.js var require_path_exists = __commonJS({ "node_modules/fs-extra/lib/path-exists/index.js"(exports2, module2) { "use strict"; var u = require_universalify().fromPromise; var fs2 = require_fs(); function pathExists(path2) { return fs2.access(path2).then(() => true).catch(() => false); } module2.exports = { pathExists: u(pathExists), pathExistsSync: fs2.existsSync }; } }); // node_modules/fs-extra/lib/copy/copy.js var require_copy = __commonJS({ "node_modules/fs-extra/lib/copy/copy.js"(exports2, module2) { "use strict"; var fs2 = require_graceful_fs(); var path2 = require("path"); var mkdirs = require_mkdirs().mkdirs; var pathExists = require_path_exists().pathExists; var utimesMillis = require_utimes().utimesMillis; var stat = require_stat(); function copy(src, dest, opts, cb) { if (typeof opts === "function" && !cb) { cb = opts; opts = {}; } else if (typeof opts === "function") { opts = { filter: opts }; } cb = cb || function() { }; opts = opts || {}; opts.clobber = "clobber" in opts ? !!opts.clobber : true; opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber; if (opts.preserveTimestamps && process.arch === "ia32") { console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended; see https://github.com/jprichardson/node-fs-extra/issues/269`); } stat.checkPaths(src, dest, "copy", opts, (err, stats) => { if (err) return cb(err); const { srcStat, destStat } = stats; stat.checkParentPaths(src, srcStat, dest, "copy", (err2) => { if (err2) return cb(err2); if (opts.filter) return handleFilter(checkParentDir, destStat, src, dest, opts, cb); return checkParentDir(destStat, src, dest, opts, cb); }); }); } function checkParentDir(destStat, src, dest, opts, cb) { const destParent = path2.dirname(dest); pathExists(destParent, (err, dirExists) => { if (err) return cb(err); if (dirExists) return getStats(destStat, src, dest, opts, cb); mkdirs(destParent, (err2) => { if (err2) return cb(err2); return getStats(destStat, src, dest, opts, cb); }); }); } function handleFilter(onInclude, destStat, src, dest, opts, cb) { Promise.resolve(opts.filter(src, dest)).then((include) => { if (include) return onInclude(destStat, src, dest, opts, cb); return cb(); }, (error) => cb(error)); } function startCopy(destStat, src, dest, opts, cb) { if (opts.filter) return handleFilter(getStats, destStat, src, dest, opts, cb); return getStats(destStat, src, dest, opts, cb); } function getStats(destStat, src, dest, opts, cb) { const stat2 = opts.dereference ? fs2.stat : fs2.lstat; stat2(src, (err, srcStat) => { if (err) return cb(err); if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb); else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb); else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb); else if (srcStat.isSocket()) return cb(new Error(`Cannot copy a socket file: ${src}`)); else if (srcStat.isFIFO()) return cb(new Error(`Cannot copy a FIFO pipe: ${src}`)); return cb(new Error(`Unknown file: ${src}`)); }); } function onFile(srcStat, destStat, src, dest, opts, cb) { if (!destStat) return copyFile(srcStat, src, dest, opts, cb); return mayCopyFile(srcStat, src, dest, opts, cb); } function mayCopyFile(srcStat, src, dest, opts, cb) { if (opts.overwrite) { fs2.unlink(dest, (err) => { if (err) return cb(err); return copyFile(srcStat, src, dest, opts, cb); }); } else if (opts.errorOnExist) { return cb(new Error(`'${dest}' already exists`)); } else return cb(); } function copyFile(srcStat, src, dest, opts, cb) { fs2.copyFile(src, dest, (err) => { if (err) return cb(err); if (opts.preserveTimestamps) return handleTimestampsAndMode(srcStat.mode, src, dest, cb); return setDestMode(dest, srcStat.mode, cb); }); } function handleTimestampsAndMode(srcMode, src, dest, cb) { if (fileIsNotWritable(srcMode)) { return makeFileWritable(dest, srcMode, (err) => { if (err) return cb(err); return setDestTimestampsAndMode(srcMode, src, dest, cb); }); } return setDestTimestampsAndMode(srcMode, src, dest, cb); } function fileIsNotWritable(srcMode) { return (srcMode & 128) === 0; } function makeFileWritable(dest, srcMode, cb) { return setDestMode(dest, srcMode | 128, cb); } function setDestTimestampsAndMode(srcMode, src, dest, cb) { setDestTimestamps(src, dest, (err) => { if (err) return cb(err); return setDestMode(dest, srcMode, cb); }); } function setDestMode(dest, srcMode, cb) { return fs2.chmod(dest, srcMode, cb); } function setDestTimestamps(src, dest, cb) { fs2.stat(src, (err, updatedSrcStat) => { if (err) return cb(err); return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb); }); } function onDir(srcStat, destStat, src, dest, opts, cb) { if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts, cb); return copyDir(src, dest, opts, cb); } function mkDirAndCopy(srcMode, src, dest, opts, cb) { fs2.mkdir(dest, (err) => { if (err) return cb(err); copyDir(src, dest, opts, (err2) => { if (err2) return cb(err2); return setDestMode(dest, srcMode, cb); }); }); } function copyDir(src, dest, opts, cb) { fs2.readdir(src, (err, items) => { if (err) return cb(err); return copyDirItems(items, src, dest, opts, cb); }); } function copyDirItems(items, src, dest, opts, cb) { const item = items.pop(); if (!item) return cb(); return copyDirItem(items, item, src, dest, opts, cb); } function copyDirItem(items, item, src, dest, opts, cb) { const srcItem = path2.join(src, item); const destItem = path2.join(dest, item); stat.checkPaths(srcItem, destItem, "copy", opts, (err, stats) => { if (err) return cb(err); const { destStat } = stats; startCopy(destStat, srcItem, destItem, opts, (err2) => { if (err2) return cb(err2); return copyDirItems(items, src, dest, opts, cb); }); }); } function onLink(destStat, src, dest, opts, cb) { fs2.readlink(src, (err, resolvedSrc) => { if (err) return cb(err); if (opts.dereference) { resolvedSrc = path2.resolve(process.cwd(), resolvedSrc); } if (!destStat) { return fs2.symlink(resolvedSrc, dest, cb); } else { fs2.readlink(dest, (err2, resolvedDest) => { if (err2) { if (err2.code === "EINVAL" || err2.code === "UNKNOWN") return fs2.symlink(resolvedSrc, dest, cb); return cb(err2); } if (opts.dereference) { resolvedDest = path2.resolve(process.cwd(), resolvedDest); } if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) { return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)); } if (destStat.isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) { return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)); } return copyLink(resolvedSrc, dest, cb); }); } }); } function copyLink(resolvedSrc, dest, cb) { fs2.unlink(dest, (err) => { if (err) return cb(err); return fs2.symlink(resolvedSrc, dest, cb); }); } module2.exports = copy; } }); // node_modules/fs-extra/lib/copy/index.js var require_copy2 = __commonJS({ "node_modules/fs-extra/lib/copy/index.js"(exports2, module2) { "use strict"; var u = require_universalify().fromCallback; module2.exports = { copy: u(require_copy()) }; } }); // node_modules/fs-extra/lib/remove/rimraf.js var require_rimraf = __commonJS({ "node_modules/fs-extra/lib/remove/rimraf.js"(exports2, module2) { "use strict"; var fs2 = require_graceful_fs(); var path2 = require("path"); var assert = require("assert"); var isWindows = process.platform === "win32"; function defaults(options) { const methods = [ "unlink", "chmod", "stat", "lstat", "rmdir", "readdir" ]; methods.forEach((m) => { options[m] = options[m] || fs2[m]; m = m + "Sync"; options[m] = options[m] || fs2[m]; }); options.maxBusyTries = options.maxBusyTries || 3; } function rimraf(p, options, cb) { let busyTries = 0; if (typeof options === "function") { cb = options; options = {}; } assert(p, "rimraf: missing path"); assert.strictEqual(typeof p, "string", "rimraf: path should be a string"); assert.strictEqual(typeof cb, "function", "rimraf: callback function required"); assert(options, "rimraf: invalid options argument provided"); assert.strictEqual(typeof options, "object", "rimraf: options should be object"); defaults(options); rimraf_(p, options, function CB(er) { if (er) { if ((er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") && busyTries < options.maxBusyTries) { busyTries++; const time = busyTries * 100; return setTimeout(() => rimraf_(p, options, CB), time); } if (er.code === "ENOENT") er = null; } cb(er); }); } function rimraf_(p, options, cb) { assert(p); assert(options); assert(typeof cb === "function"); options.lstat(p, (er, st) => { if (er && er.code === "ENOENT") { return cb(null); } if (er && er.code === "EPERM" && isWindows) { return fixWinEPERM(p, options, er, cb); } if (st && st.isDirectory()) { return rmdir(p, options, er, cb); } options.unlink(p, (er2) => { if (er2) { if (er2.code === "ENOENT") { return cb(null); } if (er2.code === "EPERM") { return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb); } if (er2.code === "EISDIR") { return rmdir(p, options, er2, cb); } } return cb(er2); }); }); } function fixWinEPERM(p, options, er, cb) { assert(p); assert(options); assert(typeof cb === "function"); options.chmod(p, 438, (er2) => { if (er2) { cb(er2.code === "ENOENT" ? null : er); } else { options.stat(p, (er3, stats) => { if (er3) { cb(er3.code === "ENOENT" ? null : er); } else if (stats.isDirectory()) { rmdir(p, options, er, cb); } else { options.unlink(p, cb); } }); } }); } function fixWinEPERMSync(p, options, er) { let stats; assert(p); assert(options); try { options.chmodSync(p, 438); } catch (er2) { if (er2.code === "ENOENT") { return; } else { throw er; } } try { stats = options.statSync(p); } catch (er3) { if (er3.code === "ENOENT") { return; } else { throw er; } } if (stats.isDirectory()) { rmdirSync(p, options, er); } else { options.unlinkSync(p); } } function rmdir(p, options, originalEr, cb) { assert(p); assert(options); assert(typeof cb === "function"); options.rmdir(p, (er) => { if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) { rmkids(p, options, cb); } else if (er && er.code === "ENOTDIR") { cb(originalEr); } else { cb(er); } }); } function rmkids(p, options, cb) { assert(p); assert(options); assert(typeof cb === "function"); options.readdir(p, (er, files) => { if (er) return cb(er); let n = files.length; let errState; if (n === 0) return options.rmdir(p, cb); files.forEach((f) => { rimraf(path2.join(p, f), options, (er2) => { if (errState) { return; } if (er2) return cb(errState = er2); if (--n === 0) { options.rmdir(p, cb); } }); }); }); } function rimrafSync(p, options) { let st; options = options || {}; defaults(options); assert(p, "rimraf: missing path"); assert.strictEqual(typeof p, "string", "rimraf: path should be a string"); assert(options, "rimraf: missing options"); assert.strictEqual(typeof options, "object", "rimraf: options should be object"); try { st = options.lstatSync(p); } catch (er) { if (er.code === "ENOENT") { return; } if (er.code === "EPERM" && isWindows) { fixWinEPERMSync(p, options, er); } } try { if (st && st.isDirectory()) { rmdirSync(p, options, null); } else { options.unlinkSync(p); } } catch (er) { if (er.code === "ENOENT") { return; } else if (er.code === "EPERM") { return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er); } else if (er.code !== "EISDIR") { throw er; } rmdirSync(p, options, er); } } function rmdirSync(p, options, originalEr) { assert(p); assert(options); try { options.rmdirSync(p); } catch (er) { if (er.code === "ENOTDIR") { throw originalEr; } else if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") { rmkidsSync(p, options); } else if (er.code !== "ENOENT") { throw er; } } } function rmkidsSync(p, options) { assert(p); assert(options); options.readdirSync(p).forEach((f) => rimrafSync(path2.join(p, f), options)); if (isWindows) { const startTime = Date.now(); do { try { const ret = options.rmdirSync(p, options); return ret; } catch { } } while (Date.now() - startTime < 500); } else { const ret = options.rmdirSync(p, options); return ret; } } module2.exports = rimraf; rimraf.sync = rimrafSync; } }); // node_modules/fs-extra/lib/remove/index.js var require_remove = __commonJS({ "node_modules/fs-extra/lib/remove/index.js"(exports2, module2) { "use strict"; var fs2 = require_graceful_fs(); var u = require_universalify().fromCallback; var rimraf = require_rimraf(); function remove(path2, callback) { if (fs2.rm) return fs2.rm(path2, { recursive: true, force: true }, callback); rimraf(path2, callback); } function removeSync(path2) { if (fs2.rmSync) return fs2.rmSync(path2, { recursive: true, force: true }); rimraf.sync(path2); } module2.exports = { remove: u(remove), removeSync }; } }); // node_modules/fs-extra/lib/empty/index.js var require_empty = __commonJS({ "node_modules/fs-extra/lib/empty/index.js"(exports2, module2) { "use strict"; var u = require_universalify().fromPromise; var fs2 = require_fs(); var path2 = require("path"); var mkdir = require_mkdirs(); var remove = require_remove(); var emptyDir = u(async function emptyDir2(dir) { let items; try { items = await fs2.readdir(dir); } catch { return mkdir.mkdirs(dir); } return Promise.all(items.map((item) => remove.remove(path2.join(dir, item)))); }); function emptyDirSync(dir) { let items; try { items = fs2.readdirSync(dir); } catch { return mkdir.mkdirsSync(dir); } items.forEach((item) => { item = path2.join(dir, item); remove.removeSync(item); }); } module2.exports = { emptyDirSync, emptydirSync: emptyDirSync, emptyDir, emptydir: emptyDir }; } }); // node_modules/fs-extra/lib/ensure/file.js var require_file = __commonJS({ "node_modules/fs-extra/lib/ensure/file.js"(exports2, module2) { "use strict"; var u = require_universalify().fromCallback; var path2 = require("path"); var fs2 = require_graceful_fs(); var mkdir = require_mkdirs(); function createFile(file, callback) { function makeFile() { fs2.writeFile(file, "", (err) => { if (err) return callback(err); callback(); }); } fs2.stat(file, (err, stats) => { if (!err && stats.isFile()) return callback(); const dir = path2.dirname(file); fs2.stat(dir, (err2, stats2) => { if (err2) { if (err2.code === "ENOENT") { return mkdir.mkdirs(dir, (err3) => { if (err3) return callback(err3); makeFile(); }); } return callback(err2); } if (stats2.isDirectory()) makeFile(); else { fs2.readdir(dir, (err3) => { if (err3) return callback(err3); }); } }); }); } function createFileSync(file) { let stats; try { stats = fs2.statSync(file); } catch { } if (stats && stats.isFile()) return; const dir = path2.dirname(file); try { if (!fs2.statSync(dir).isDirectory()) { fs2.readdirSync(dir); } } catch (err) { if (err && err.code === "ENOENT") mkdir.mkdirsSync(dir); else throw err; } fs2.writeFileSync(file, ""); } module2.exports = { createFile: u(createFile), createFileSync }; } }); // node_modules/fs-extra/lib/ensure/link.js var require_link = __commonJS({ "node_modules/fs-extra/lib/ensure/link.js"(exports2, module2) { "use strict"; var u = require_universalify().fromCallback; var path2 = require("path"); var fs2 = require_graceful_fs(); var mkdir = require_mkdirs(); var pathExists = require_path_exists().pathExists; var { areIdentical } = require_stat(); function createLink(srcpath, dstpath, callback) { function makeLink(srcpath2, dstpath2) { fs2.link(srcpath2, dstpath2, (err) => { if (err) return callback(err); callback(null); }); } fs2.lstat(dstpath, (_, dstStat) => { fs2.lstat(srcpath, (err, srcStat) => { if (err) { err.message = err.message.replace("lstat", "ensureLink"); return callback(err); } if (dstStat && areIdentical(srcStat, dstStat)) return callback(null); const dir = path2.dirname(dstpath); pathExists(dir, (err2, dirExists) => { if (err2) return callback(err2); if (dirExists) return makeLink(srcpath, dstpath); mkdir.mkdirs(dir, (err3) => { if (err3) return callback(err3); makeLink(srcpath, dstpath); }); }); }); }); } function createLinkSync(srcpath, dstpath) { let dstStat; try { dstStat = fs2.lstatSync(dstpath); } catch { } try { const srcStat = fs2.lstatSync(srcpath); if (dstStat && areIdentical(srcStat, dstStat)) return; } catch (err) { err.message = err.message.replace("lstat", "ensureLink"); throw err; } const dir = path2.dirname(dstpath); const dirExists = fs2.existsSync(dir); if (dirExists) return fs2.linkSync(srcpath, dstpath); mkdir.mkdirsSync(dir); return fs2.linkSync(srcpath, dstpath); } module2.exports = { createLink: u(createLink), createLinkSync }; } }); // node_modules/fs-extra/lib/ensure/symlink-paths.js var require_symlink_paths = __commonJS({ "node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports2, module2) { "use strict"; var path2 = require("path"); var fs2 = require_graceful_fs(); var pathExists = require_path_exists().pathExists; function symlinkPaths(srcpath, dstpath, callback) { if (path2.isAbsolute(srcpath)) { return fs2.lstat(srcpath, (err) => { if (err) { err.message = err.message.replace("lstat", "ensureSymlink"); return callback(err); } return callback(null, { toCwd: srcpath, toDst: srcpath }); }); } else { const dstdir = path2.dirname(dstpath); const relativeToDst = path2.join(dstdir, srcpath); return pathExists(relativeToDst, (err, exists) => { if (err) return callback(err); if (exists) { return callback(null, { toCwd: relativeToDst, toDst: srcpath }); } else { return fs2.lstat(srcpath, (err2) => { if (err2) { err2.message = err2.message.replace("lstat", "ensureSymlink"); return callback(err2); } return callback(null, { toCwd: srcpath, toDst: path2.relative(dstdir, srcpath) }); }); } }); } } function symlinkPathsSync(srcpath, dstpath) { let exists; if (path2.isAbsolute(srcpath)) { exists = fs2.existsSync(srcpath); if (!exists) throw new Error("absolute srcpath does not exist"); return { toCwd: srcpath, toDst: srcpath }; } else { const dstdir = path2.dirname(dstpath); const relativeToDst = path2.join(dstdir, srcpath); exists = fs2.existsSync(relativeToDst); if (exists) { return { toCwd: relativeToDst, toDst: srcpath }; } else { exists = fs2.existsSync(srcpath); if (!exists) throw new Error("relative srcpath does not exist"); return { toCwd: srcpath, toDst: path2.relative(dstdir, srcpath) }; } } } module2.exports = { symlinkPaths, symlinkPathsSync }; } }); // node_modules/fs-extra/lib/ensure/symlink-type.js var require_symlink_type = __commonJS({ "node_modules/fs-extra/lib/ensure/symlink-type.js"(exports2, module2) { "use strict"; var fs2 = require_graceful_fs(); function symlinkType(srcpath, type, callback) { callback = typeof type === "function" ? type : callback; type = typeof type === "function" ? false : type; if (type) return callback(null, type); fs2.lstat(srcpath, (err, stats) => { if (err) return callback(null, "file"); type = stats && stats.isDirectory() ? "dir" : "file"; callback(null, type); }); } function symlinkTypeSync(srcpath, type) { let stats; if (type) return type; try { stats = fs2.lstatSync(srcpath); } catch { return "file"; } return stats && stats.isDirectory() ? "dir" : "file"; } module2.exports = { symlinkType, symlinkTypeSync }; } }); // node_modules/fs-extra/lib/ensure/symlink.js var require_symlink = __commonJS({ "node_modules/fs-extra/lib/ensure/symlink.js"(exports2, module2) { "use strict"; var u = require_universalify().fromCallback; var path2 = require("path"); var fs2 = require_fs(); var _mkdirs = require_mkdirs(); var mkdirs = _mkdirs.mkdirs; var mkdirsSync = _mkdirs.mkdirsSync; var _symlinkPaths = require_symlink_paths(); var symlinkPaths = _symlinkPaths.symlinkPaths; var symlinkPathsSync = _symlinkPaths.symlinkPathsSync; var _symlinkType = require_symlink_type(); var symlinkType = _symlinkType.symlinkType; var symlinkTypeSync = _symlinkType.symlinkTypeSync; var pathExists = require_path_exists().pathExists; var { areIdentical } = require_stat(); function createSymlink(srcpath, dstpath, type, callback) { callback = typeof type === "function" ? type : callback; type = typeof type === "function" ? false : type; fs2.lstat(dstpath, (err, stats) => { if (!err && stats.isSymbolicLink()) { Promise.all([ fs2.stat(srcpath), fs2.stat(dstpath) ]).then(([srcStat, dstStat]) => { if (areIdentical(srcStat, dstStat)) return callback(null); _createSymlink(srcpath, dstpath, type, callback); }); } else _createSymlink(srcpath, dstpath, type, callback); }); } function _createSymlink(srcpath, dstpath, type, callback) { symlinkPaths(srcpath, dstpath, (err, relative) => { if (err) return callback(err); srcpath = relative.toDst; symlinkType(relative.toCwd, type, (err2, type2) => { if (err2) return callback(err2); const dir = path2.dirname(dstpath); pathExists(dir, (err3, dirExists) => { if (err3) return callback(err3); if (dirExists) return fs2.symlink(srcpath, dstpath, type2, callback); mkdirs(dir, (err4) => { if (err4) return callback(err4); fs2.symlink(srcpath, dstpath, type2, callback); }); }); }); }); } function createSymlinkSync(srcpath, dstpath, type) { let stats; try { stats = fs2.lstatSync(dstpath); } catch { } if (stats && stats.isSymbolicLink()) { const srcStat = fs2.statSync(srcpath); const dstStat = fs2.statSync(dstpath); if (areIdentical(srcStat, dstStat)) return; } const relative = symlinkPathsSync(srcpath, dstpath); srcpath = relative.toDst; type = symlinkTypeSync(relative.toCwd, type); const dir = path2.dirname(dstpath); const exists = fs2.existsSync(dir); if (exists) return fs2.symlinkSync(srcpath, dstpath, type); mkdirsSync(dir); return fs2.symlinkSync(srcpath, dstpath, type); } module2.exports = { createSymlink: u(createSymlink), createSymlinkSync }; } }); // node_modules/fs-extra/lib/ensure/index.js var require_ensure = __commonJS({ "node_modules/fs-extra/lib/ensure/index.js"(exports2, module2) { "use strict"; var file = require_file(); var link = require_link(); var symlink = require_symlink(); module2.exports = { createFile: file.createFile, createFileSync: file.createFileSync, ensureFile: file.createFile, ensureFileSync: file.createFileSync, createLink: link.createLink, createLinkSync: link.createLinkSync, ensureLink: link.createLink, ensureLinkSync: link.createLinkSync, createSymlink: symlink.createSymlink, createSymlinkSync: symlink.createSymlinkSync, ensureSymlink: symlink.createSymlink, ensureSymlinkSync: symlink.createSymlinkSync }; } }); // ../../node_modules/universalify/index.js var require_universalify2 = __commonJS({ "../../node_modules/universalify/index.js"(exports2) { "use strict"; exports2.fromCallback = function(fn) { return Object.defineProperty(function(...args) { if (typeof args[args.length - 1] === "function") fn.apply(this, args); else { return new Promise((resolve, reject) => { fn.apply(this, args.concat([(err, res) => err ? reject(err) : resolve(res)])); }); } }, "name", { value: fn.name }); }; exports2.fromPromise = function(fn) { return Object.defineProperty(function(...args) { const cb = args[args.length - 1]; if (typeof cb !== "function") return fn.apply(this, args); else fn.apply(this, args.slice(0, -1)).then((r) => cb(null, r), cb); }, "name", { value: fn.name }); }; } }); // ../../node_modules/jsonfile/utils.js var require_utils2 = __commonJS({ "../../node_modules/jsonfile/utils.js"(exports2, module2) { function stringify(obj, options = {}) { const EOL = options.EOL || "\n"; const str = JSON.stringify(obj, options ? options.replacer : null, options.spaces); return str.replace(/\n/g, EOL) + EOL; } function stripBom(content) { if (Buffer.isBuffer(content)) content = content.toString("utf8"); return content.replace(/^\uFEFF/, ""); } module2.exports = { stringify, stripBom }; } }); // ../../node_modules/jsonfile/index.js var require_jsonfile = __commonJS({ "../../node_modules/jsonfile/index.js"(exports2, module2) { var _fs; try { _fs = require_graceful_fs(); } catch (_) { _fs = require("fs"); } var universalify = require_universalify2(); var { stringify, stripBom } = require_utils2(); async function _readFile(file, options = {}) { if (typeof options === "string") { options = { encoding: options }; } const fs2 = options.fs || _fs; const shouldThrow = "throws" in options ? options.throws : true; let data = await universalify.fromCallback(fs2.readFile)(file, options); data = stripBom(data); let obj; try { obj = JSON.parse(data, options ? options.reviver : null); } catch (err) { if (shouldThrow) { err.message = `${file}: ${err.message}`; throw err; } else { return null; } } return obj; } var readFile = universalify.fromPromise(_readFile); function readFileSync(file, options = {}) { if (typeof options === "string") { options = { encoding: options }; } const fs2 = options.fs || _fs; const shouldThrow = "throws" in options ? options.throws : true; try { let content = fs2.readFileSync(file, options); content = stripBom(content); return JSON.parse(content, options.reviver); } catch (err) { if (shouldThrow) { err.message = `${file}: ${err.message}`; throw err; } else { return null; } } } async function _writeFile(file, obj, options = {}) { const fs2 = options.fs || _fs; const str = stringify(obj, options); await universalify.fromCallback(fs2.writeFile)(file, str, options); } var writeFile = universalify.fromPromise(_writeFile); function writeFileSync(file, obj, options = {}) { const fs2 = options.fs || _fs; const str = stringify(obj, options); return fs2.writeFileSync(file, str, options); } var jsonfile = { readFile, readFileSync, writeFile, writeFileSync }; module2.exports = jsonfile; } }); // node_modules/fs-extra/lib/json/jsonfile.js var require_jsonfile2 = __commonJS({ "node_modules/fs-extra/lib/json/jsonfile.js"(exports2, module2) { "use strict"; var jsonFile = require_jsonfile(); module2.exports = { readJson: jsonFile.readFile, readJsonSync: jsonFile.readFileSync, writeJson: jsonFile.writeFile, writeJsonSync: jsonFile.writeFileSync }; } }); // node_modules/fs-extra/lib/output/index.js var require_output = __commonJS({ "node_modules/fs-extra/lib/output/index.js"(exports2, module2) { "use strict"; var u = require_universalify().fromCallback; var fs2 = require_graceful_fs(); var path2 = require("path"); var mkdir = require_mkdirs(); var pathExists = require_path_exists().pathExists; function outputFile(file, data, encoding, callback) { if (typeof encoding === "function") { callback = encoding; encoding = "utf8"; } const dir = path2.dirname(file); pathExists(dir, (err, itDoes) => { if (err) return callback(err); if (itDoes) return fs2.writeFile(file, data, encoding, callback); mkdir.mkdirs(dir, (err2) => { if (err2) return callback(err2); fs2.writeFile(file, data, encoding, callback); }); }); } function outputFileSync(file, ...args) { const dir = path2.dirname(file); if (fs2.existsSync(dir)) { return fs2.writeFileSync(file, ...args); } mkdir.mkdirsSync(dir); fs2.writeFileSync(file, ...args); } module2.exports = { outputFile: u(outputFile), outputFileSync }; } }); // node_modules/fs-extra/lib/json/output-json.js var require_output_json = __commonJS({ "node_modules/fs-extra/lib/json/output-json.js"(exports2, module2) { "use strict"; var { stringify } = require_utils2(); var { outputFile } = require_output(); async function outputJson(file, data, options = {}) { const str = stringify(data, options); await outputFile(file, str, options); } module2.exports = outputJson; } }); // node_modules/fs-extra/lib/json/output-json-sync.js var require_output_json_sync = __commonJS({ "node_modules/fs-extra/lib/json/output-json-sync.js"(exports2, module2) { "use strict"; var { stringify } = require_utils2(); var { outputFileSync } = require_output(); function outputJsonSync(file, data, options) { const str = stringify(data, options); outputFileSync(file, str, options); } module2.exports = outputJsonSync; } }); // node_modules/fs-extra/lib/json/index.js var require_json = __commonJS({ "node_modules/fs-extra/lib/json/index.js"(exports2, module2) { "use strict"; var u = require_universalify().fromPromise; var jsonFile = require_jsonfile2(); jsonFile.outputJson = u(require_output_json()); jsonFile.outputJsonSync = require_output_json_sync(); jsonFile.outputJSON = jsonFile.outputJson; jsonFile.outputJSONSync = jsonFile.outputJsonSync; jsonFile.writeJSON = jsonFile.writeJson; jsonFile.writeJSONSync = jsonFile.writeJsonSync; jsonFile.readJSON = jsonFile.readJson; jsonFile.readJSONSync = jsonFile.readJsonSync; module2.exports = jsonFile; } }); // node_modules/fs-extra/lib/move-sync/move-sync.js var require_move_sync = __commonJS({ "node_modules/fs-extra/lib/move-sync/move-sync.js"(exports2, module2) { "use strict"; var fs2 = require_graceful_fs(); var path2 = require("path"); var copySync = require_copy_sync2().copySync; var removeSync = require_remove().removeSync; var mkdirpSync = require_mkdirs().mkdirpSync; var stat = require_stat(); function moveSync(src, dest, opts) { opts = opts || {}; const overwrite = opts.overwrite || opts.clobber || false; const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts); stat.checkParentPathsSync(src, srcStat, dest, "move"); if (!isParentRoot(dest)) mkdirpSync(path2.dirname(dest)); return doRename(src, dest, overwrite, isChangingCase); } function isParentRoot(dest) { const parent = path2.dirname(dest); const parsedPath = path2.parse(parent); return parsedPath.root === parent; } function doRename(src, dest, overwrite, isChangingCase) { if (isChangingCase) return rename(src, dest, overwrite); if (overwrite) { removeSync(dest); return rename(src, dest, overwrite); } if (fs2.existsSync(dest)) throw new Error("dest already exists."); return rename(src, dest, overwrite); } function rename(src, dest, overwrite) { try { fs2.renameSync(src, dest); } catch (err) { if (err.code !== "EXDEV") throw err; return moveAcrossDevice(src, dest, overwrite); } } function moveAcrossDevice(src, dest, overwrite) { const opts = { overwrite, errorOnExist: true }; copySync(src, dest, opts); return removeSync(src); } module2.exports = moveSync; } }); // node_modules/fs-extra/lib/move-sync/index.js var require_move_sync2 = __commonJS({ "node_modules/fs-extra/lib/move-sync/index.js"(exports2, module2) { "use strict"; module2.exports = { moveSync: require_move_sync() }; } }); // node_modules/fs-extra/lib/move/move.js var require_move = __commonJS({ "node_modules/fs-extra/lib/move/move.js"(exports2, module2) { "use strict"; var fs2 = require_graceful_fs(); var path2 = require("path"); var copy = require_copy2().copy; var remove = require_remove().remove; var mkdirp = require_mkdirs().mkdirp; var pathExists = require_path_exists().pathExists; var stat = require_stat(); function move(src, dest, opts, cb) { if (typeof opts === "function") { cb = opts; opts = {}; } const overwrite = opts.overwrite || opts.clobber || false; stat.checkPaths(src, dest, "move", opts, (err, stats) => { if (err) return cb(err); const { srcStat, isChangingCase = false } = stats; stat.checkParentPaths(src, srcStat, dest, "move", (err2) => { if (err2) return cb(err2); if (isParentRoot(dest)) return doRename(src, dest, overwrite, isChangingCase, cb); mkdirp(path2.dirname(dest), (err3) => { if (err3) return cb(err3); return doRename(src, dest, overwrite, isChangingCase, cb); }); }); }); } function isParentRoot(dest) { const parent = path2.dirname(dest); const parsedPath = path2.parse(parent); return parsedPath.root === parent; } function doRename(src, dest, overwrite, isChangingCase, cb) { if (isChangingCase) return rename(src, dest, overwrite, cb); if (overwrite) { return remove(dest, (err) => { if (err) return cb(err); return rename(src, dest, overwrite, cb); }); } pathExists(dest, (err, destExists) => { if (err) return cb(err); if (destExists) return cb(new Error("dest already exists.")); return rename(src, dest, overwrite, cb); }); } function rename(src, dest, overwrite, cb) { fs2.rename(src, dest, (err) => { if (!err) return cb(); if (err.code !== "EXDEV") return cb(err); return moveAcrossDevice(src, dest, overwrite, cb); }); } function moveAcrossDevice(src, dest, overwrite, cb) { const opts = { overwrite, errorOnExist: true }; copy(src, dest, opts, (err) => { if (err) return cb(err); return remove(src, cb); }); } module2.exports = move; } }); // node_modules/fs-extra/lib/move/index.js var require_move2 = __commonJS({ "node_modules/fs-extra/lib/move/index.js"(exports2, module2) { "use strict"; var u = require_universalify().fromCallback; module2.exports = { move: u(require_move()) }; } }); // node_modules/fs-extra/lib/index.js var require_lib = __commonJS({ "node_modules/fs-extra/lib/index.js"(exports2, module2) { "use strict"; module2.exports = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, require_fs()), require_copy_sync2()), require_copy2()), require_empty()), require_ensure()), require_json()), require_mkdirs()), require_move_sync2()), require_move2()), require_output()), require_path_exists()), require_remove()); } }); // node_modules/semver/internal/constants.js var require_constants = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { var SEMVER_SPEC_VERSION = "2.0.0"; var MAX_LENGTH = 256; var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; var MAX_SAFE_COMPONENT_LENGTH = 16; module2.exports = { SEMVER_SPEC_VERSION, MAX_LENGTH, MAX_SAFE_INTEGER, MAX_SAFE_COMPONENT_LENGTH }; } }); // node_modules/semver/internal/debug.js var require_debug = __commonJS({ "node_modules/semver/internal/debug.js"(exports2, module2) { var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => { }; module2.exports = debug; } }); // node_modules/semver/internal/re.js var require_re = __commonJS({ "node_modules/semver/internal/re.js"(exports2, module2) { var { MAX_SAFE_COMPONENT_LENGTH } = require_constants(); var debug = require_debug(); exports2 = module2.exports = {}; var re = exports2.re = []; var src = exports2.src = []; var t = exports2.t = {}; var R = 0; var createToken = (name, value, isGlobal) => { const index = R++; debug(index, value); t[name] = index; src[index] = value; re[index] = new RegExp(value, isGlobal ? "g" : void 0); }; createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); createToken("NUMERICIDENTIFIERLOOSE", "[0-9]+"); createToken("NONNUMERICIDENTIFIER", "\\d*[a-zA-Z-][a-zA-Z0-9-]*"); createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`); createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`); createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`); createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`); createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); createToken("BUILDIDENTIFIER", "[0-9A-Za-z-]+"); createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`); createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`); createToken("FULL", `^${src[t.FULLPLAIN]}$`); createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`); createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`); createToken("GTLT", "((?:<|>)?=?)"); createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`); createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`); createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); createToken("COERCE", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:$|[^\\d])`); createToken("COERCERTL", src[t.COERCE], true); createToken("LONETILDE", "(?:~>?)"); createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true); exports2.tildeTrimReplace = "$1~"; createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); createToken("LONECARET", "(?:\\^)"); createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true); exports2.caretTrimReplace = "$1^"; createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); exports2.comparatorTrimReplace = "$1$2$3"; createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`); createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`); createToken("STAR", "(<|>)?=?\\s*\\*"); createToken("GTE0", "^\\s*>=\\s*0.0.0\\s*$"); createToken("GTE0PRE", "^\\s*>=\\s*0.0.0-0\\s*$"); } }); // node_modules/semver/internal/parse-options.js var require_parse_options = __commonJS({ "node_modules/semver/internal/parse-options.js"(exports2, module2) { var opts = ["includePrerelease", "loose", "rtl"]; var parseOptions = (options) => !options ? {} : typeof options !== "object" ? { loose: true } : opts.filter((k) => options[k]).reduce((options2, k) => { options2[k] = true; return options2; }, {}); module2.exports = parseOptions; } }); // node_modules/semver/internal/identifiers.js var require_identifiers = __commonJS({ "node_modules/semver/internal/identifiers.js"(exports2, module2) { var numeric = /^[0-9]+$/; var compareIdentifiers = (a, b) => { const anum = numeric.test(a); const bnum = numeric.test(b); if (anum && bnum) { a = +a; b = +b; } return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; }; var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a); module2.exports = { compareIdentifiers, rcompareIdentifiers }; } }); // node_modules/semver/classes/semver.js var require_semver = __commonJS({ "node_modules/semver/classes/semver.js"(exports2, module2) { var debug = require_debug(); var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants(); var { re, t } = require_re(); var parseOptions = require_parse_options(); var { compareIdentifiers } = require_identifiers(); var SemVer = class { constructor(version, options) { options = parseOptions(options); if (version instanceof SemVer) { if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) { return version; } else { version = version.version; } } else if (typeof version !== "string") { throw new TypeError(`Invalid Version: ${version}`); } if (version.length > MAX_LENGTH) { throw new TypeError(`version is longer than ${MAX_LENGTH} characters`); } debug("SemVer", version, options); this.options = options; this.loose = !!options.loose; this.includePrerelease = !!options.includePrerelease; const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); if (!m) { throw new TypeError(`Invalid Version: ${version}`); } this.raw = version; this.major = +m[1]; this.minor = +m[2]; this.patch = +m[3]; if (this.major > MAX_SAFE_INTEGER || this.major < 0) { throw new TypeError("Invalid major version"); } if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { throw new TypeError("Invalid minor version"); } if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { throw new TypeError("Invalid patch version"); } if (!m[4]) { this.prerelease = []; } else { this.prerelease = m[4].split(".").map((id) => { if (/^[0-9]+$/.test(id)) { const num = +id; if (num >= 0 && num < MAX_SAFE_INTEGER) { return num; } } return id; }); } this.build = m[5] ? m[5].split(".") : []; this.format(); } format() { this.version = `${this.major}.${this.minor}.${this.patch}`; if (this.prerelease.length) { this.version += `-${this.prerelease.join(".")}`; } return this.version; } toString() { return this.version; } compare(other) { debug("SemVer.compare", this.version, this.options, other); if (!(other instanceof SemVer)) { if (typeof other === "string" && other === this.version) { return 0; } other = new SemVer(other, this.options); } if (other.version === this.version) { return 0; } return this.compareMain(other) || this.comparePre(other); } compareMain(other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); } comparePre(other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } if (this.prerelease.length && !other.prerelease.length) { return -1; } else if (!this.prerelease.length && other.prerelease.length) { return 1; } else if (!this.prerelease.length && !other.prerelease.length) { return 0; } let i = 0; do { const a = this.prerelease[i]; const b = other.prerelease[i]; debug("prerelease compare", i, a, b); if (a === void 0 && b === void 0) { return 0; } else if (b === void 0) { return 1; } else if (a === void 0) { return -1; } else if (a === b) { continue; } else { return compareIdentifiers(a, b); } } while (++i); } compareBuild(other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } let i = 0; do { const a = this.build[i]; const b = other.build[i]; debug("prerelease compare", i, a, b); if (a === void 0 && b === void 0) { return 0; } else if (b === void 0) { return 1; } else if (a === void 0) { return -1; } else if (a === b) { continue; } else { return compareIdentifiers(a, b); } } while (++i); } inc(release, identifier) { switch (release) { case "premajor": this.prerelease.length = 0; this.patch = 0; this.minor = 0; this.major++; this.inc("pre", identifier); break; case "preminor": this.prerelease.length = 0; this.patch = 0; this.minor++; this.inc("pre", identifier); break; case "prepatch": this.prerelease.length = 0; this.inc("patch", identifier); this.inc("pre", identifier); break; case "prerelease": if (this.prerelease.length === 0) { this.inc("patch", identifier); } this.inc("pre", identifier); break; case "major": if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { this.major++; } this.minor = 0; this.patch = 0; this.prerelease = []; break; case "minor": if (this.patch !== 0 || this.prerelease.length === 0) { this.minor++; } this.patch = 0; this.prerelease = []; break; case "patch": if (this.prerelease.length === 0) { this.patch++; } this.prerelease = []; break; case "pre": if (this.prerelease.length === 0) { this.prerelease = [0]; } else { let i = this.prerelease.length; while (--i >= 0) { if (typeof this.prerelease[i] === "number") { this.prerelease[i]++; i = -2; } } if (i === -1) { this.prerelease.push(0); } } if (identifier) { if (this.prerelease[0] === identifier) { if (isNaN(this.prerelease[1])) { this.prerelease = [identifier, 0]; } } else { this.prerelease = [identifier, 0]; } } break; default: throw new Error(`invalid increment argument: ${release}`); } this.format(); this.raw = this.version; return this; } }; module2.exports = SemVer; } }); // node_modules/semver/functions/parse.js var require_parse = __commonJS({ "node_modules/semver/functions/parse.js"(exports2, module2) { var { MAX_LENGTH } = require_constants(); var { re, t } = require_re(); var SemVer = require_semver(); var parseOptions = require_parse_options(); var parse = (version, options) => { options = parseOptions(options); if (version instanceof SemVer) { return version; } if (typeof version !== "string") { return null; } if (version.length > MAX_LENGTH) { return null; } const r = options.loose ? re[t.LOOSE] : re[t.FULL]; if (!r.test(version)) { return null; } try { return new SemVer(version, options); } catch (er) { return null; } }; module2.exports = parse; } }); // node_modules/semver/functions/valid.js var require_valid = __commonJS({ "node_modules/semver/functions/valid.js"(exports2, module2) { var parse = require_parse(); var valid = (version, options) => { const v = parse(version, options); return v ? v.version : null; }; module2.exports = valid; } }); // node_modules/semver/functions/clean.js var require_clean = __commonJS({ "node_modules/semver/functions/clean.js"(exports2, module2) { var parse = require_parse(); var clean = (version, options) => { const s = parse(version.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; }; module2.exports = clean; } }); // node_modules/semver/functions/inc.js var require_inc = __commonJS({ "node_modules/semver/functions/inc.js"(exports2, module2) { var SemVer = require_semver(); var inc = (version, release, options, identifier) => { if (typeof options === "string") { identifier = options; options = void 0; } try { return new SemVer(version, options).inc(release, identifier).version; } catch (er) { return null; } }; module2.exports = inc; } }); // node_modules/semver/functions/compare.js var require_compare = __commonJS({ "node_modules/semver/functions/compare.js"(exports2, module2) { var SemVer = require_semver(); var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)); module2.exports = compare; } }); // node_modules/semver/functions/eq.js var require_eq = __commonJS({ "node_modules/semver/functions/eq.js"(exports2, module2) { var compare = require_compare(); var eq = (a, b, loose) => compare(a, b, loose) === 0; module2.exports = eq; } }); // node_modules/semver/functions/diff.js var require_diff = __commonJS({ "node_modules/semver/functions/diff.js"(exports2, module2) { var parse = require_parse(); var eq = require_eq(); var diff = (version1, version2) => { if (eq(version1, version2)) { return null; } else { const v1 = parse(version1); const v2 = parse(version2); const hasPre = v1.prerelease.length || v2.prerelease.length; const prefix = hasPre ? "pre" : ""; const defaultResult = hasPre ? "prerelease" : ""; for (const key in v1) { if (key === "major" || key === "minor" || key === "patch") { if (v1[key] !== v2[key]) { return prefix + key; } } } return defaultResult; } }; module2.exports = diff; } }); // node_modules/semver/functions/major.js var require_major = __commonJS({ "node_modules/semver/functions/major.js"(exports2, module2) { var SemVer = require_semver(); var major = (a, loose) => new SemVer(a, loose).major; module2.exports = major; } }); // node_modules/semver/functions/minor.js var require_minor = __commonJS({ "node_modules/semver/functions/minor.js"(exports2, module2) { var SemVer = require_semver(); var minor = (a, loose) => new SemVer(a, loose).minor; module2.exports = minor; } }); // node_modules/semver/functions/patch.js var require_patch = __commonJS({ "node_modules/semver/functions/patch.js"(exports2, module2) { var SemVer = require_semver(); var patch = (a, loose) => new SemVer(a, loose).patch; module2.exports = patch; } }); // node_modules/semver/functions/prerelease.js var require_prerelease = __commonJS({ "node_modules/semver/functions/prerelease.js"(exports2, module2) { var parse = require_parse(); var prerelease = (version, options) => { const parsed = parse(version, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; }; module2.exports = prerelease; } }); // node_modules/semver/functions/rcompare.js var require_rcompare = __commonJS({ "node_modules/semver/functions/rcompare.js"(exports2, module2) { var compare = require_compare(); var rcompare = (a, b, loose) => compare(b, a, loose); module2.exports = rcompare; } }); // node_modules/semver/functions/compare-loose.js var require_compare_loose = __commonJS({ "node_modules/semver/functions/compare-loose.js"(exports2, module2) { var compare = require_compare(); var compareLoose = (a, b) => compare(a, b, true); module2.exports = compareLoose; } }); // node_modules/semver/functions/compare-build.js var require_compare_build = __commonJS({ "node_modules/semver/functions/compare-build.js"(exports2, module2) { var SemVer = require_semver(); var compareBuild = (a, b, loose) => { const versionA = new SemVer(a, loose); const versionB = new SemVer(b, loose); return versionA.compare(versionB) || versionA.compareBuild(versionB); }; module2.exports = compareBuild; } }); // node_modules/semver/functions/sort.js var require_sort = __commonJS({ "node_modules/semver/functions/sort.js"(exports2, module2) { var compareBuild = require_compare_build(); var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)); module2.exports = sort; } }); // node_modules/semver/functions/rsort.js var require_rsort = __commonJS({ "node_modules/semver/functions/rsort.js"(exports2, module2) { var compareBuild = require_compare_build(); var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)); module2.exports = rsort; } }); // node_modules/semver/functions/gt.js var require_gt = __commonJS({ "node_modules/semver/functions/gt.js"(exports2, module2) { var compare = require_compare(); var gt = (a, b, loose) => compare(a, b, loose) > 0; module2.exports = gt; } }); // node_modules/semver/functions/lt.js var require_lt = __commonJS({ "node_modules/semver/functions/lt.js"(exports2, module2) { var compare = require_compare(); var lt = (a, b, loose) => compare(a, b, loose) < 0; module2.exports = lt; } }); // node_modules/semver/functions/neq.js var require_neq = __commonJS({ "node_modules/semver/functions/neq.js"(exports2, module2) { var compare = require_compare(); var neq = (a, b, loose) => compare(a, b, loose) !== 0; module2.exports = neq; } }); // node_modules/semver/functions/gte.js var require_gte = __commonJS({ "node_modules/semver/functions/gte.js"(exports2, module2) { var compare = require_compare(); var gte = (a, b, loose) => compare(a, b, loose) >= 0; module2.exports = gte; } }); // node_modules/semver/functions/lte.js var require_lte = __commonJS({ "node_modules/semver/functions/lte.js"(exports2, module2) { var compare = require_compare(); var lte = (a, b, loose) => compare(a, b, loose) <= 0; module2.exports = lte; } }); // node_modules/semver/functions/cmp.js var require_cmp = __commonJS({ "node_modules/semver/functions/cmp.js"(exports2, module2) { var eq = require_eq(); var neq = require_neq(); var gt = require_gt(); var gte = require_gte(); var lt = require_lt(); var lte = require_lte(); var cmp = (a, op, b, loose) => { switch (op) { case "===": if (typeof a === "object") a = a.version; if (typeof b === "object") b = b.version; return a === b; case "!==": if (typeof a === "object") a = a.version; if (typeof b === "object") b = b.version; return a !== b; case "": case "=": case "==": return eq(a, b, loose); case "!=": return neq(a, b, loose); case ">": return gt(a, b, loose); case ">=": return gte(a, b, loose); case "<": return lt(a, b, loose); case "<=": return lte(a, b, loose); default: throw new TypeError(`Invalid operator: ${op}`); } }; module2.exports = cmp; } }); // node_modules/semver/functions/coerce.js var require_coerce = __commonJS({ "node_modules/semver/functions/coerce.js"(exports2, module2) { var SemVer = require_semver(); var parse = require_parse(); var { re, t } = require_re(); var coerce = (version, options) => { if (version instanceof SemVer) { return version; } if (typeof version === "number") { version = String(version); } if (typeof version !== "string") { return null; } options = options || {}; let match = null; if (!options.rtl) { match = version.match(re[t.COERCE]); } else { let next; while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) { if (!match || next.index + next[0].length !== match.index + match[0].length) { match = next; } re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; } re[t.COERCERTL].lastIndex = -1; } if (match === null) return null; return parse(`${match[2]}.${match[3] || "0"}.${match[4] || "0"}`, options); }; module2.exports = coerce; } }); // ../../node_modules/yallist/iterator.js var require_iterator = __commonJS({ "../../node_modules/yallist/iterator.js"(exports2, module2) { "use strict"; module2.exports = function(Yallist) { Yallist.prototype[Symbol.iterator] = function* () { for (let walker = this.head; walker; walker = walker.next) { yield walker.value; } }; }; } }); // ../../node_modules/yallist/yallist.js var require_yallist = __commonJS({ "../../node_modules/yallist/yallist.js"(exports2, module2) { "use strict"; module2.exports = Yallist; Yallist.Node = Node; Yallist.create = Yallist; function Yallist(list) { var self = this; if (!(self instanceof Yallist)) { self = new Yallist(); } self.tail = null; self.head = null; self.length = 0; if (list && typeof list.forEach === "function") { list.forEach(function(item) { self.push(item); }); } else if (arguments.length > 0) { for (var i = 0, l = arguments.length; i < l; i++) { self.push(arguments[i]); } } return self; } Yallist.prototype.removeNode = function(node) { if (node.list !== this) { throw new Error("removing node which does not belong to this list"); } var next = node.next; var prev = node.prev; if (next) { next.prev = prev; } if (prev) { prev.next = next; } if (node === this.head) { this.head = next; } if (node === this.tail) { this.tail = prev; } node.list.length--; node.next = null; node.prev = null; node.list = null; return next; }; Yallist.prototype.unshiftNode = function(node) { if (node === this.head) { return; } if (node.list) { node.list.removeNode(node); } var head = this.head; node.list = this; node.next = head; if (head) { head.prev = node; } this.head = node; if (!this.tail) { this.tail = node; } this.length++; }; Yallist.prototype.pushNode = function(node) { if (node === this.tail) { return; } if (node.list) { node.list.removeNode(node); } var tail = this.tail; node.list = this; node.prev = tail; if (tail) { tail.next = node; } this.tail = node; if (!this.head) { this.head = node; } this.length++; }; Yallist.prototype.push = function() { for (var i = 0, l = arguments.length; i < l; i++) { push(this, arguments[i]); } return this.length; }; Yallist.prototype.unshift = function() { for (var i = 0, l = arguments.length; i < l; i++) { unshift(this, arguments[i]); } return this.length; }; Yallist.prototype.pop = function() { if (!this.tail) { return void 0; } var res = this.tail.value; this.tail = this.tail.prev; if (this.tail) { this.tail.next = null; } else { this.head = null; } this.length--; return res; }; Yallist.prototype.shift = function() { if (!this.head) { return void 0; } var res = this.head.value; this.head = this.head.next; if (this.head) { this.head.prev = null; } else { this.tail = null; } this.length--; return res; }; Yallist.prototype.forEach = function(fn, thisp) { thisp = thisp || this; for (var walker = this.head, i = 0; walker !== null; i++) { fn.call(thisp, walker.value, i, this); walker = walker.next; } }; Yallist.prototype.forEachReverse = function(fn, thisp) { thisp = thisp || this; for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { fn.call(thisp, walker.value, i, this); walker = walker.prev; } }; Yallist.prototype.get = function(n) { for (var i = 0, walker = this.head; walker !== null && i < n; i++) { walker = walker.next; } if (i === n && walker !== null) { return walker.value; } }; Yallist.prototype.getReverse = function(n) { for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { walker = walker.prev; } if (i === n && walker !== null) { return walker.value; } }; Yallist.prototype.map = function(fn, thisp) { thisp = thisp || this; var res = new Yallist(); for (var walker = this.head; walker !== null; ) { res.push(fn.call(thisp, walker.value, this)); walker = walker.next; } return res; }; Yallist.prototype.mapReverse = function(fn, thisp) { thisp = thisp || this; var res = new Yallist(); for (var walker = this.tail; walker !== null; ) { res.push(fn.call(thisp, walker.value, this)); walker = walker.prev; } return res; }; Yallist.prototype.reduce = function(fn, initial) { var acc; var walker = this.head; if (arguments.length > 1) { acc = initial; } else if (this.head) { walker = this.head.next; acc = this.head.value; } else { throw new TypeError("Reduce of empty list with no initial value"); } for (var i = 0; walker !== null; i++) { acc = fn(acc, walker.value, i); walker = walker.next; } return acc; }; Yallist.prototype.reduceReverse = function(fn, initial) { var acc; var walker = this.tail; if (arguments.length > 1) { acc = initial; } else if (this.tail) { walker = this.tail.prev; acc = this.tail.value; } else { throw new TypeError("Reduce of empty list with no initial value"); } for (var i = this.length - 1; walker !== null; i--) { acc = fn(acc, walker.value, i); walker = walker.prev; } return acc; }; Yallist.prototype.toArray = function() { var arr = new Array(this.length); for (var i = 0, walker = this.head; walker !== null; i++) { arr[i] = walker.value; walker = walker.next; } return arr; }; Yallist.prototype.toArrayReverse = function() { var arr = new Array(this.length); for (var i = 0, walker = this.tail; walker !== null; i++) { arr[i] = walker.value; walker = walker.prev; } return arr; }; Yallist.prototype.slice = function(from, to) { to = to || this.length; if (to < 0) { to += this.length; } from = from || 0; if (from < 0) { from += this.length; } var ret = new Yallist(); if (to < from || to < 0) { return ret; } if (from < 0) { from = 0; } if (to > this.length) { to = this.length; } for (var i = 0, walker = this.head; walker !== null && i < from; i++) { walker = walker.next; } for (; walker !== null && i < to; i++, walker = walker.next) { ret.push(walker.value); } return ret; }; Yallist.prototype.sliceReverse = function(from, to) { to = to || this.length; if (to < 0) { to += this.length; } from = from || 0; if (from < 0) { from += this.length; } var ret = new Yallist(); if (to < from || to < 0) { return ret; } if (from < 0) { from = 0; } if (to > this.length) { to = this.length; } for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { walker = walker.prev; } for (; walker !== null && i > from; i--, walker = walker.prev) { ret.push(walker.value); } return ret; }; Yallist.prototype.splice = function(start, deleteCount, ...nodes) { if (start > this.length) { start = this.length - 1; } if (start < 0) { start = this.length + start; } for (var i = 0, walker = this.head; walker !== null && i < start; i++) { walker = walker.next; } var ret = []; for (var i = 0; walker && i < deleteCount; i++) { ret.push(walker.value); walker = this.removeNode(walker); } if (walker === null) { walker = this.tail; } if (walker !== this.head && walker !== this.tail) { walker = walker.prev; } for (var i = 0; i < nodes.length; i++) { walker = insert(this, walker, nodes[i]); } return ret; }; Yallist.prototype.reverse = function() { var head = this.head; var tail = this.tail; for (var walker = head; walker !== null; walker = walker.prev) { var p = walker.prev; walker.prev = walker.next; walker.next = p; } this.head = tail; this.tail = head; return this; }; function insert(self, node, value) { var inserted = node === self.head ? new Node(value, null, node, self) : new Node(value, node, node.next, self); if (inserted.next === null) { self.tail = inserted; } if (inserted.prev === null) { self.head = inserted; } self.length++; return inserted; } function push(self, item) { self.tail = new Node(item, self.tail, null, self); if (!self.head) { self.head = self.tail; } self.length++; } function unshift(self, item) { self.head = new Node(item, null, self.head, self); if (!self.tail) { self.tail = self.head; } self.length++; } function Node(value, prev, next, list) { if (!(this instanceof Node)) { return new Node(value, prev, next, list); } this.list = list; this.value = value; if (prev) { prev.next = this; this.prev = prev; } else { this.prev = null; } if (next) { next.prev = this; this.next = next; } else { this.next = null; } } try { require_iterator()(Yallist); } catch (er) { } } }); // ../../node_modules/lru-cache/index.js var require_lru_cache = __commonJS({ "../../node_modules/lru-cache/index.js"(exports2, module2) { "use strict"; var Yallist = require_yallist(); var MAX = Symbol("max"); var LENGTH = Symbol("length"); var LENGTH_CALCULATOR = Symbol("lengthCalculator"); var ALLOW_STALE = Symbol("allowStale"); var MAX_AGE = Symbol("maxAge"); var DISPOSE = Symbol("dispose"); var NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet"); var LRU_LIST = Symbol("lruList"); var CACHE = Symbol("cache"); var UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet"); var naiveLength = () => 1; var LRUCache = class { constructor(options) { if (typeof options === "number") options = { max: options }; if (!options) options = {}; if (options.max && (typeof options.max !== "number" || options.max < 0)) throw new TypeError("max must be a non-negative number"); const max = this[MAX] = options.max || Infinity; const lc = options.length || naiveLength; this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc; this[ALLOW_STALE] = options.stale || false; if (options.maxAge && typeof options.maxAge !== "number") throw new TypeError("maxAge must be a number"); this[MAX_AGE] = options.maxAge || 0; this[DISPOSE] = options.dispose; this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false; this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false; this.reset(); } set max(mL) { if (typeof mL !== "number" || mL < 0) throw new TypeError("max must be a non-negative number"); this[MAX] = mL || Infinity; trim(this); } get max() { return this[MAX]; } set allowStale(allowStale) { this[ALLOW_STALE] = !!allowStale; } get allowStale() { return this[ALLOW_STALE]; } set maxAge(mA) { if (typeof mA !== "number") throw new TypeError("maxAge must be a non-negative number"); this[MAX_AGE] = mA; trim(this); } get maxAge() { return this[MAX_AGE]; } set lengthCalculator(lC) { if (typeof lC !== "function") lC = naiveLength; if (lC !== this[LENGTH_CALCULATOR]) { this[LENGTH_CALCULATOR] = lC; this[LENGTH] = 0; this[LRU_LIST].forEach((hit) => { hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key); this[LENGTH] += hit.length; }); } trim(this); } get lengthCalculator() { return this[LENGTH_CALCULATOR]; } get length() { return this[LENGTH]; } get itemCount() { return this[LRU_LIST].length; } rforEach(fn, thisp) { thisp = thisp || this; for (let walker = this[LRU_LIST].tail; walker !== null; ) { const prev = walker.prev; forEachStep(this, fn, walker, thisp); walker = prev; } } forEach(fn, thisp) { thisp = thisp || this; for (let walker = this[LRU_LIST].head; walker !== null; ) { const next = walker.next; forEachStep(this, fn, walker, thisp); walker = next; } } keys() { return this[LRU_LIST].toArray().map((k) => k.key); } values() { return this[LRU_LIST].toArray().map((k) => k.value); } reset() { if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) { this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value)); } this[CACHE] = /* @__PURE__ */ new Map(); this[LRU_LIST] = new Yallist(); this[LENGTH] = 0; } dump() { return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : { k: hit.key, v: hit.value, e: hit.now + (hit.maxAge || 0) }).toArray().filter((h) => h); } dumpLru() { return this[LRU_LIST]; } set(key, value, maxAge) { maxAge = maxAge || this[MAX_AGE]; if (maxAge && typeof maxAge !== "number") throw new TypeError("maxAge must be a number"); const now = maxAge ? Date.now() : 0; const len = this[LENGTH_CALCULATOR](value, key); if (this[CACHE].has(key)) { if (len > this[MAX]) { del(this, this[CACHE].get(key)); return false; } const node = this[CACHE].get(key); const item = node.value; if (this[DISPOSE]) { if (!this[NO_DISPOSE_ON_SET]) this[DISPOSE](key, item.value); } item.now = now; item.maxAge = maxAge; item.value = value; this[LENGTH] += len - item.length; item.length = len; this.get(key); trim(this); return true; } const hit = new Entry(key, value, len, now, maxAge); if (hit.length > this[MAX]) { if (this[DISPOSE]) this[DISPOSE](key, value); return false; } this[LENGTH] += hit.length; this[LRU_LIST].unshift(hit); this[CACHE].set(key, this[LRU_LIST].head); trim(this); return true; } has(key) { if (!this[CACHE].has(key)) return false; const hit = this[CACHE].get(key).value; return !isStale(this, hit); } get(key) { return get(this, key, true); } peek(key) { return get(this, key, false); } pop() { const node = this[LRU_LIST].tail; if (!node) return null; del(this, node); return node.value; } del(key) { del(this, this[CACHE].get(key)); } load(arr) { this.reset(); const now = Date.now(); for (let l = arr.length - 1; l >= 0; l--) { const hit = arr[l]; const expiresAt = hit.e || 0; if (expiresAt === 0) this.set(hit.k, hit.v); else { const maxAge = expiresAt - now; if (maxAge > 0) { this.set(hit.k, hit.v, maxAge); } } } } prune() { this[CACHE].forEach((value, key) => get(this, key, false)); } }; var get = (self, key, doUse) => { const node = self[CACHE].get(key); if (node) { const hit = node.value; if (isStale(self, hit)) { del(self, node); if (!self[ALLOW_STALE]) return void 0; } else { if (doUse) { if (self[UPDATE_AGE_ON_GET]) node.value.now = Date.now(); self[LRU_LIST].unshiftNode(node); } } return hit.value; } }; var isStale = (self, hit) => { if (!hit || !hit.maxAge && !self[MAX_AGE]) return false; const diff = Date.now() - hit.now; return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE] && diff > self[MAX_AGE]; }; var trim = (self) => { if (self[LENGTH] > self[MAX]) { for (let walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null; ) { const prev = walker.prev; del(self, walker); walker = prev; } } }; var del = (self, node) => { if (node) { const hit = node.value; if (self[DISPOSE]) self[DISPOSE](hit.key, hit.value); self[LENGTH] -= hit.length; self[CACHE].delete(hit.key); self[LRU_LIST].removeNode(node); } }; var Entry = class { constructor(key, value, length, now, maxAge) { this.key = key; this.value = value; this.length = length; this.now = now; this.maxAge = maxAge || 0; } }; var forEachStep = (self, fn, node, thisp) => { let hit = node.value; if (isStale(self, hit)) { del(self, node); if (!self[ALLOW_STALE]) hit = void 0; } if (hit) fn.call(thisp, hit.value, hit.key, self); }; module2.exports = LRUCache; } }); // node_modules/semver/classes/range.js var require_range = __commonJS({ "node_modules/semver/classes/range.js"(exports2, module2) { var Range = class { constructor(range, options) { options = parseOptions(options); if (range instanceof Range) { if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { return range; } else { return new Range(range.raw, options); } } if (range instanceof Comparator) { this.raw = range.value; this.set = [[range]]; this.format(); return this; } this.options = options; this.loose = !!options.loose; this.includePrerelease = !!options.includePrerelease; this.raw = range; this.set = range.split(/\s*\|\|\s*/).map((range2) => this.parseRange(range2.trim())).filter((c) => c.length); if (!this.set.length) { throw new TypeError(`Invalid SemVer Range: ${range}`); } if (this.set.length > 1) { const first = this.set[0]; this.set = this.set.filter((c) => !isNullSet(c[0])); if (this.set.length === 0) this.set = [first]; else if (this.set.length > 1) { for (const c of this.set) { if (c.length === 1 && isAny(c[0])) { this.set = [c]; break; } } } } this.format(); } format() { this.range = this.set.map((comps) => { return comps.join(" ").trim(); }).join("||").trim(); return this.range; } toString() { return this.range; } parseRange(range) { range = range.trim(); const memoOpts = Object.keys(this.options).join(","); const memoKey = `parseRange:${memoOpts}:${range}`; const cached = cache.get(memoKey); if (cached) return cached; const loose = this.options.loose; const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); debug("hyphen replace", range); range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); debug("comparator trim", range, re[t.COMPARATORTRIM]); range = range.replace(re[t.TILDETRIM], tildeTrimReplace); range = range.replace(re[t.CARETTRIM], caretTrimReplace); range = range.split(/\s+/).join(" "); const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; const rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)).filter(this.options.loose ? (comp) => !!comp.match(compRe) : () => true).map((comp) => new Comparator(comp, this.options)); const l = rangeList.length; const rangeMap = /* @__PURE__ */ new Map(); for (const comp of rangeList) { if (isNullSet(comp)) return [comp]; rangeMap.set(comp.value, comp); } if (rangeMap.size > 1 && rangeMap.has("")) rangeMap.delete(""); const result = [...rangeMap.values()]; cache.set(memoKey, result); return result; } intersects(range, options) { if (!(range instanceof Range)) { throw new TypeError("a Range is required"); } return this.set.some((thisComparators) => { return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { return rangeComparators.every((rangeComparator) => { return thisComparator.intersects(rangeComparator, options); }); }); }); }); } test(version) { if (!version) { return false; } if (typeof version === "string") { try { version = new SemVer(version, this.options); } catch (er) { return false; } } for (let i = 0; i < this.set.length; i++) { if (testSet(this.set[i], version, this.options)) { return true; } } return false; } }; module2.exports = Range; var LRU = require_lru_cache(); var cache = new LRU({ max: 1e3 }); var parseOptions = require_parse_options(); var Comparator = require_comparator(); var debug = require_debug(); var SemVer = require_semver(); var { re, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re(); var isNullSet = (c) => c.value === "<0.0.0-0"; var isAny = (c) => c.value === ""; var isSatisfiable = (comparators, options) => { let result = true; const remainingComparators = comparators.slice(); let testComparator = remainingComparators.pop(); while (result && remainingComparators.length) { result = remainingComparators.every((otherComparator) => { return testComparator.intersects(otherComparator, options); }); testComparator = remainingComparators.pop(); } return result; }; var parseComparator = (comp, options) => { debug("comp", comp, options); comp = replaceCarets(comp, options); debug("caret", comp); comp = replaceTildes(comp, options); debug("tildes", comp); comp = replaceXRanges(comp, options); debug("xrange", comp); comp = replaceStars(comp, options); debug("stars", comp); return comp; }; var isX = (id) => !id || id.toLowerCase() === "x" || id === "*"; var replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((comp2) => { return replaceTilde(comp2, options); }).join(" "); var replaceTilde = (comp, options) => { const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; return comp.replace(r, (_, M, m, p, pr) => { debug("tilde", comp, _, M, m, p, pr); let ret; if (isX(M)) { ret = ""; } else if (isX(m)) { ret = `>=${M}.0.0 <${+M + 1}.0.0-0`; } else if (isX(p)) { ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`; } else if (pr) { debug("replaceTilde pr", pr); ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; } else { ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; } debug("tilde return", ret); return ret; }); }; var replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((comp2) => { return replaceCaret(comp2, options); }).join(" "); var replaceCaret = (comp, options) => { debug("caret", comp, options); const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; const z = options.includePrerelease ? "-0" : ""; return comp.replace(r, (_, M, m, p, pr) => { debug("caret", comp, _, M, m, p, pr); let ret; if (isX(M)) { ret = ""; } else if (isX(m)) { ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; } else if (isX(p)) { if (M === "0") { ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; } else { ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`; } } else if (pr) { debug("replaceCaret pr", pr); if (M === "0") { if (m === "0") { ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`; } else { ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; } } else { ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`; } } else { debug("no pr"); if (M === "0") { if (m === "0") { ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`; } else { ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`; } } else { ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`; } } debug("caret return", ret); return ret; }); }; var replaceXRanges = (comp, options) => { debug("replaceXRanges", comp, options); return comp.split(/\s+/).map((comp2) => { return replaceXRange(comp2, options); }).join(" "); }; var replaceXRange = (comp, options) => { comp = comp.trim(); const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; return comp.replace(r, (ret, gtlt, M, m, p, pr) => { debug("xRange", comp, ret, gtlt, M, m, p, pr); const xM = isX(M); const xm = xM || isX(m); const xp = xm || isX(p); const anyX = xp; if (gtlt === "=" && anyX) { gtlt = ""; } pr = options.includePrerelease ? "-0" : ""; if (xM) { if (gtlt === ">" || gtlt === "<") { ret = "<0.0.0-0"; } else { ret = "*"; } } else if (gtlt && anyX) { if (xm) { m = 0; } p = 0; if (gtlt === ">") { gtlt = ">="; if (xm) { M = +M + 1; m = 0; p = 0; } else { m = +m + 1; p = 0; } } else if (gtlt === "<=") { gtlt = "<"; if (xm) { M = +M + 1; } else { m = +m + 1; } } if (gtlt === "<") pr = "-0"; ret = `${gtlt + M}.${m}.${p}${pr}`; } else if (xm) { ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`; } else if (xp) { ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`; } debug("xRange return", ret); return ret; }); }; var replaceStars = (comp, options) => { debug("replaceStars", comp, options); return comp.trim().replace(re[t.STAR], ""); }; var replaceGTE0 = (comp, options) => { debug("replaceGTE0", comp, options); return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], ""); }; var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => { if (isX(fM)) { from = ""; } else if (isX(fm)) { from = `>=${fM}.0.0${incPr ? "-0" : ""}`; } else if (isX(fp)) { from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`; } else if (fpr) { from = `>=${from}`; } else { from = `>=${from}${incPr ? "-0" : ""}`; } if (isX(tM)) { to = ""; } else if (isX(tm)) { to = `<${+tM + 1}.0.0-0`; } else if (isX(tp)) { to = `<${tM}.${+tm + 1}.0-0`; } else if (tpr) { to = `<=${tM}.${tm}.${tp}-${tpr}`; } else if (incPr) { to = `<${tM}.${tm}.${+tp + 1}-0`; } else { to = `<=${to}`; } return `${from} ${to}`.trim(); }; var testSet = (set, version, options) => { for (let i = 0; i < set.length; i++) { if (!set[i].test(version)) { return false; } } if (version.prerelease.length && !options.includePrerelease) { for (let i = 0; i < set.length; i++) { debug(set[i].semver); if (set[i].semver === Comparator.ANY) { continue; } if (set[i].semver.prerelease.length > 0) { const allowed = set[i].semver; if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) { return true; } } } return false; } return true; }; } }); // node_modules/semver/classes/comparator.js var require_comparator = __commonJS({ "node_modules/semver/classes/comparator.js"(exports2, module2) { var ANY = Symbol("SemVer ANY"); var Comparator = class { static get ANY() { return ANY; } constructor(comp, options) { options = parseOptions(options); if (comp instanceof Comparator) { if (comp.loose === !!options.loose) { return comp; } else { comp = comp.value; } } debug("comparator", comp, options); this.options = options; this.loose = !!options.loose; this.parse(comp); if (this.semver === ANY) { this.value = ""; } else { this.value = this.operator + this.semver.version; } debug("comp", this); } parse(comp) { const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; const m = comp.match(r); if (!m) { throw new TypeError(`Invalid comparator: ${comp}`); } this.operator = m[1] !== void 0 ? m[1] : ""; if (this.operator === "=") { this.operator = ""; } if (!m[2]) { this.semver = ANY; } else { this.semver = new SemVer(m[2], this.options.loose); } } toString() { return this.value; } test(version) { debug("Comparator.test", version, this.options.loose); if (this.semver === ANY || version === ANY) { return true; } if (typeof version === "string") { try { version = new SemVer(version, this.options); } catch (er) { return false; } } return cmp(version, this.operator, this.semver, this.options); } intersects(comp, options) { if (!(comp instanceof Comparator)) { throw new TypeError("a Comparator is required"); } if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } if (this.operator === "") { if (this.value === "") { return true; } return new Range(comp.value, options).test(this.value); } else if (comp.operator === "") { if (comp.value === "") { return true; } return new Range(this.value, options).test(comp.semver); } const sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">"); const sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<"); const sameSemVer = this.semver.version === comp.semver.version; const differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<="); const oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && (this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<"); const oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && (this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">"); return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; } }; module2.exports = Comparator; var parseOptions = require_parse_options(); var { re, t } = require_re(); var cmp = require_cmp(); var debug = require_debug(); var SemVer = require_semver(); var Range = require_range(); } }); // node_modules/semver/functions/satisfies.js var require_satisfies = __commonJS({ "node_modules/semver/functions/satisfies.js"(exports2, module2) { var Range = require_range(); var satisfies = (version, range, options) => { try { range = new Range(range, options); } catch (er) { return false; } return range.test(version); }; module2.exports = satisfies; } }); // node_modules/semver/ranges/to-comparators.js var require_to_comparators = __commonJS({ "node_modules/semver/ranges/to-comparators.js"(exports2, module2) { var Range = require_range(); var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); module2.exports = toComparators; } }); // node_modules/semver/ranges/max-satisfying.js var require_max_satisfying = __commonJS({ "node_modules/semver/ranges/max-satisfying.js"(exports2, module2) { var SemVer = require_semver(); var Range = require_range(); var maxSatisfying = (versions, range, options) => { let max = null; let maxSV = null; let rangeObj = null; try { rangeObj = new Range(range, options); } catch (er) { return null; } versions.forEach((v) => { if (rangeObj.test(v)) { if (!max || maxSV.compare(v) === -1) { max = v; maxSV = new SemVer(max, options); } } }); return max; }; module2.exports = maxSatisfying; } }); // node_modules/semver/ranges/min-satisfying.js var require_min_satisfying = __commonJS({ "node_modules/semver/ranges/min-satisfying.js"(exports2, module2) { var SemVer = require_semver(); var Range = require_range(); var minSatisfying = (versions, range, options) => { let min = null; let minSV = null; let rangeObj = null; try { rangeObj = new Range(range, options); } catch (er) { return null; } versions.forEach((v) => { if (rangeObj.test(v)) { if (!min || minSV.compare(v) === 1) { min = v; minSV = new SemVer(min, options); } } }); return min; }; module2.exports = minSatisfying; } }); // node_modules/semver/ranges/min-version.js var require_min_version = __commonJS({ "node_modules/semver/ranges/min-version.js"(exports2, module2) { var SemVer = require_semver(); var Range = require_range(); var gt = require_gt(); var minVersion = (range, loose) => { range = new Range(range, loose); let minver = new SemVer("0.0.0"); if (range.test(minver)) { return minver; } minver = new SemVer("0.0.0-0"); if (range.test(minver)) { return minver; } minver = null; for (let i = 0; i < range.set.length; ++i) { const comparators = range.set[i]; let setMin = null; comparators.forEach((comparator) => { const compver = new SemVer(comparator.semver.version); switch (comparator.operator) { case ">": if (compver.prerelease.length === 0) { compver.patch++; } else { compver.prerelease.push(0); } compver.raw = compver.format(); case "": case ">=": if (!setMin || gt(compver, setMin)) { setMin = compver; } break; case "<": case "<=": break; default: throw new Error(`Unexpected operation: ${comparator.operator}`); } }); if (setMin && (!minver || gt(minver, setMin))) minver = setMin; } if (minver && range.test(minver)) { return minver; } return null; }; module2.exports = minVersion; } }); // node_modules/semver/ranges/valid.js var require_valid2 = __commonJS({ "node_modules/semver/ranges/valid.js"(exports2, module2) { var Range = require_range(); var validRange = (range, options) => { try { return new Range(range, options).range || "*"; } catch (er) { return null; } }; module2.exports = validRange; } }); // node_modules/semver/ranges/outside.js var require_outside = __commonJS({ "node_modules/semver/ranges/outside.js"(exports2, module2) { var SemVer = require_semver(); var Comparator = require_comparator(); var { ANY } = Comparator; var Range = require_range(); var satisfies = require_satisfies(); var gt = require_gt(); var lt = require_lt(); var lte = require_lte(); var gte = require_gte(); var outside = (version, range, hilo, options) => { version = new SemVer(version, options); range = new Range(range, options); let gtfn, ltefn, ltfn, comp, ecomp; switch (hilo) { case ">": gtfn = gt; ltefn = lte; ltfn = lt; comp = ">"; ecomp = ">="; break; case "<": gtfn = lt; ltefn = gte; ltfn = gt; comp = "<"; ecomp = "<="; break; default: throw new TypeError('Must provide a hilo val of "<" or ">"'); } if (satisfies(version, range, options)) { return false; } for (let i = 0; i < range.set.length; ++i) { const comparators = range.set[i]; let high = null; let low = null; comparators.forEach((comparator) => { if (comparator.semver === ANY) { comparator = new Comparator(">=0.0.0"); } high = high || comparator; low = low || comparator; if (gtfn(comparator.semver, high.semver, options)) { high = comparator; } else if (ltfn(comparator.semver, low.semver, options)) { low = comparator; } }); if (high.operator === comp || high.operator === ecomp) { return false; } if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) { return false; } else if (low.operator === ecomp && ltfn(version, low.semver)) { return false; } } return true; }; module2.exports = outside; } }); // node_modules/semver/ranges/gtr.js var require_gtr = __commonJS({ "node_modules/semver/ranges/gtr.js"(exports2, module2) { var outside = require_outside(); var gtr = (version, range, options) => outside(version, range, ">", options); module2.exports = gtr; } }); // node_modules/semver/ranges/ltr.js var require_ltr = __commonJS({ "node_modules/semver/ranges/ltr.js"(exports2, module2) { var outside = require_outside(); var ltr = (version, range, options) => outside(version, range, "<", options); module2.exports = ltr; } }); // node_modules/semver/ranges/intersects.js var require_intersects = __commonJS({ "node_modules/semver/ranges/intersects.js"(exports2, module2) { var Range = require_range(); var intersects = (r1, r2, options) => { r1 = new Range(r1, options); r2 = new Range(r2, options); return r1.intersects(r2); }; module2.exports = intersects; } }); // node_modules/semver/ranges/simplify.js var require_simplify = __commonJS({ "node_modules/semver/ranges/simplify.js"(exports2, module2) { var satisfies = require_satisfies(); var compare = require_compare(); module2.exports = (versions, range, options) => { const set = []; let min = null; let prev = null; const v = versions.sort((a, b) => compare(a, b, options)); for (const version of v) { const included = satisfies(version, range, options); if (included) { prev = version; if (!min) min = version; } else { if (prev) { set.push([min, prev]); } prev = null; min = null; } } if (min) set.push([min, null]); const ranges = []; for (const [min2, max] of set) { if (min2 === max) ranges.push(min2); else if (!max && min2 === v[0]) ranges.push("*"); else if (!max) ranges.push(`>=${min2}`); else if (min2 === v[0]) ranges.push(`<=${max}`); else ranges.push(`${min2} - ${max}`); } const simplified = ranges.join(" || "); const original = typeof range.raw === "string" ? range.raw : String(range); return simplified.length < original.length ? simplified : range; }; } }); // node_modules/semver/ranges/subset.js var require_subset = __commonJS({ "node_modules/semver/ranges/subset.js"(exports2, module2) { var Range = require_range(); var Comparator = require_comparator(); var { ANY } = Comparator; var satisfies = require_satisfies(); var compare = require_compare(); var subset = (sub, dom, options = {}) => { if (sub === dom) return true; sub = new Range(sub, options); dom = new Range(dom, options); let sawNonNull = false; OUTER: for (const simpleSub of sub.set) { for (const simpleDom of dom.set) { const isSub = simpleSubset(simpleSub, simpleDom, options); sawNonNull = sawNonNull || isSub !== null; if (isSub) continue OUTER; } if (sawNonNull) return false; } return true; }; var simpleSubset = (sub, dom, options) => { if (sub === dom) return true; if (sub.length === 1 && sub[0].semver === ANY) { if (dom.length === 1 && dom[0].semver === ANY) return true; else if (options.includePrerelease) sub = [new Comparator(">=0.0.0-0")]; else sub = [new Comparator(">=0.0.0")]; } if (dom.length === 1 && dom[0].semver === ANY) { if (options.includePrerelease) return true; else dom = [new Comparator(">=0.0.0")]; } const eqSet = /* @__PURE__ */ new Set(); let gt, lt; for (const c of sub) { if (c.operator === ">" || c.operator === ">=") gt = higherGT(gt, c, options); else if (c.operator === "<" || c.operator === "<=") lt = lowerLT(lt, c, options); else eqSet.add(c.semver); } if (eqSet.size > 1) return null; let gtltComp; if (gt && lt) { gtltComp = compare(gt.semver, lt.semver, options); if (gtltComp > 0) return null; else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) return null; } for (const eq of eqSet) { if (gt && !satisfies(eq, String(gt), options)) return null; if (lt && !satisfies(eq, String(lt), options)) return null; for (const c of dom) { if (!satisfies(eq, String(c), options)) return false; } return true; } let higher, lower; let hasDomLT, hasDomGT; let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false; let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false; if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) { needDomLTPre = false; } for (const c of dom) { hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">="; hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<="; if (gt) { if (needDomGTPre) { if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) { needDomGTPre = false; } } if (c.operator === ">" || c.operator === ">=") { higher = higherGT(gt, c, options); if (higher === c && higher !== gt) return false; } else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) return false; } if (lt) { if (needDomLTPre) { if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) { needDomLTPre = false; } } if (c.operator === "<" || c.operator === "<=") { lower = lowerLT(lt, c, options); if (lower === c && lower !== lt) return false; } else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) return false; } if (!c.operator && (lt || gt) && gtltComp !== 0) return false; } if (gt && hasDomLT && !lt && gtltComp !== 0) return false; if (lt && hasDomGT && !gt && gtltComp !== 0) return false; if (needDomGTPre || needDomLTPre) return false; return true; }; var higherGT = (a, b, options) => { if (!a) return b; const comp = compare(a.semver, b.semver, options); return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a; }; var lowerLT = (a, b, options) => { if (!a) return b; const comp = compare(a.semver, b.semver, options); return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a; }; module2.exports = subset; } }); // node_modules/semver/index.js var require_semver2 = __commonJS({ "node_modules/semver/index.js"(exports2, module2) { var internalRe = require_re(); module2.exports = { re: internalRe.re, src: internalRe.src, tokens: internalRe.t, SEMVER_SPEC_VERSION: require_constants().SEMVER_SPEC_VERSION, SemVer: require_semver(), compareIdentifiers: require_identifiers().compareIdentifiers, rcompareIdentifiers: require_identifiers().rcompareIdentifiers, parse: require_parse(), valid: require_valid(), clean: require_clean(), inc: require_inc(), diff: require_diff(), major: require_major(), minor: require_minor(), patch: require_patch(), prerelease: require_prerelease(), compare: require_compare(), rcompare: require_rcompare(), compareLoose: require_compare_loose(), compareBuild: require_compare_build(), sort: require_sort(), rsort: require_rsort(), gt: require_gt(), lt: require_lt(), eq: require_eq(), neq: require_neq(), gte: require_gte(), lte: require_lte(), cmp: require_cmp(), coerce: require_coerce(), Comparator: require_comparator(), Range: require_range(), satisfies: require_satisfies(), toComparators: require_to_comparators(), maxSatisfying: require_max_satisfying(), minSatisfying: require_min_satisfying(), minVersion: require_min_version(), validRange: require_valid2(), outside: require_outside(), gtr: require_gtr(), ltr: require_ltr(), intersects: require_intersects(), simplifyRange: require_simplify(), subset: require_subset() }; } }); // node_modules/y18n/build/index.cjs var require_build = __commonJS({ "node_modules/y18n/build/index.cjs"(exports2, module2) { "use strict"; var fs2 = require("fs"); var util = require("util"); var path2 = require("path"); var shim; var Y18N = class { constructor(opts) { opts = opts || {}; this.directory = opts.directory || "./locales"; this.updateFiles = typeof opts.updateFiles === "boolean" ? opts.updateFiles : true; this.locale = opts.locale || "en"; this.fallbackToLanguage = typeof opts.fallbackToLanguage === "boolean" ? opts.fallbackToLanguage : true; this.cache = /* @__PURE__ */ Object.create(null); this.writeQueue = []; } __(...args) { if (typeof arguments[0] !== "string") { return this._taggedLiteral(arguments[0], ...arguments); } const str = args.shift(); let cb = function() { }; if (typeof args[args.length - 1] === "function") cb = args.pop(); cb = cb || function() { }; if (!this.cache[this.locale]) this._readLocaleFile(); if (!this.cache[this.locale][str] && this.updateFiles) { this.cache[this.locale][str] = str; this._enqueueWrite({ directory: this.directory, locale: this.locale, cb }); } else { cb(); } return shim.format.apply(shim.format, [this.cache[this.locale][str] || str].concat(args)); } __n() { const args = Array.prototype.slice.call(arguments); const singular = args.shift(); const plural = args.shift(); const quantity = args.shift(); let cb = function() { }; if (typeof args[args.length - 1] === "function") cb = args.pop(); if (!this.cache[this.locale]) this._readLocaleFile(); let str = quantity === 1 ? singular : plural; if (this.cache[this.locale][singular]) { const entry = this.cache[this.locale][singular]; str = entry[quantity === 1 ? "one" : "other"]; } if (!this.cache[this.locale][singular] && this.updateFiles) { this.cache[this.locale][singular] = { one: singular, other: plural }; this._enqueueWrite({ directory: this.directory, locale: this.locale, cb }); } else { cb(); } var values = [str]; if (~str.indexOf("%d")) values.push(quantity); return shim.format.apply(shim.format, values.concat(args)); } setLocale(locale) { this.locale = locale; } getLocale() { return this.locale; } updateLocale(obj) { if (!this.cache[this.locale]) this._readLocaleFile(); for (const key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { this.cache[this.locale][key] = obj[key]; } } } _taggedLiteral(parts, ...args) { let str = ""; parts.forEach(function(part, i) { var arg = args[i + 1]; str += part; if (typeof arg !== "undefined") { str += "%s"; } }); return this.__.apply(this, [str].concat([].slice.call(args, 1))); } _enqueueWrite(work) { this.writeQueue.push(work); if (this.writeQueue.length === 1) this._processWriteQueue(); } _processWriteQueue() { var _this = this; var work = this.writeQueue[0]; var directory = work.directory; var locale = work.locale; var cb = work.cb; var languageFile = this._resolveLocaleFile(directory, locale); var serializedLocale = JSON.stringify(this.cache[locale], null, 2); shim.fs.writeFile(languageFile, serializedLocale, "utf-8", function(err) { _this.writeQueue.shift(); if (_this.writeQueue.length > 0) _this._processWriteQueue(); cb(err); }); } _readLocaleFile() { var localeLookup = {}; var languageFile = this._resolveLocaleFile(this.directory, this.locale); try { localeLookup = JSON.parse(shim.fs.readFileSync(languageFile, "utf-8")); } catch (err) { if (err instanceof SyntaxError) { err.message = "syntax error in " + languageFile; } if (err.code === "ENOENT") localeLookup = {}; else throw err; } this.cache[this.locale] = localeLookup; } _resolveLocaleFile(directory, locale) { var file = shim.resolve(directory, "./", locale + ".json"); if (this.fallbackToLanguage && !this._fileExistsSync(file) && ~locale.lastIndexOf("_")) { var languageFile = shim.resolve(directory, "./", locale.split("_")[0] + ".json"); if (this._fileExistsSync(languageFile)) file = languageFile; } return file; } _fileExistsSync(file) { return shim.exists(file); } }; function y18n(opts, _shim) { shim = _shim; const y18n2 = new Y18N(opts); return { __: y18n2.__.bind(y18n2), __n: y18n2.__n.bind(y18n2), setLocale: y18n2.setLocale.bind(y18n2), getLocale: y18n2.getLocale.bind(y18n2), updateLocale: y18n2.updateLocale.bind(y18n2), locale: y18n2.locale }; } var nodePlatformShim = { fs: { readFileSync: fs2.readFileSync, writeFile: fs2.writeFile }, format: util.format, resolve: path2.resolve, exists: (file) => { try { return fs2.statSync(file).isFile(); } catch (err) { return false; } } }; var y18n$1 = (opts) => { return y18n(opts, nodePlatformShim); }; module2.exports = y18n$1; } }); // node_modules/yargs-parser/build/index.cjs var require_build2 = __commonJS({ "node_modules/yargs-parser/build/index.cjs"(exports2, module2) { "use strict"; var util = require("util"); var path2 = require("path"); var fs2 = require("fs"); function camelCase(str) { const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase(); if (!isCamelCase) { str = str.toLowerCase(); } if (str.indexOf("-") === -1 && str.indexOf("_") === -1) { return str; } else { let camelcase = ""; let nextChrUpper = false; const leadingHyphens = str.match(/^-+/); for (let i = leadingHyphens ? leadingHyphens[0].length : 0; i < str.length; i++) { let chr = str.charAt(i); if (nextChrUpper) { nextChrUpper = false; chr = chr.toUpperCase(); } if (i !== 0 && (chr === "-" || chr === "_")) { nextChrUpper = true; } else if (chr !== "-" && chr !== "_") { camelcase += chr; } } return camelcase; } } function decamelize(str, joinString) { const lowercase = str.toLowerCase(); joinString = joinString || "-"; let notCamelcase = ""; for (let i = 0; i < str.length; i++) { const chrLower = lowercase.charAt(i); const chrString = str.charAt(i); if (chrLower !== chrString && i > 0) { notCamelcase += `${joinString}${lowercase.charAt(i)}`; } else { notCamelcase += chrString; } } return notCamelcase; } function looksLikeNumber(x) { if (x === null || x === void 0) return false; if (typeof x === "number") return true; if (/^0x[0-9a-f]+$/i.test(x)) return true; if (/^0[^.]/.test(x)) return false; return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); } function tokenizeArgString(argString) { if (Array.isArray(argString)) { return argString.map((e) => typeof e !== "string" ? e + "" : e); } argString = argString.trim(); let i = 0; let prevC = null; let c = null; let opening = null; const args = []; for (let ii = 0; ii < argString.length; ii++) { prevC = c; c = argString.charAt(ii); if (c === " " && !opening) { if (!(prevC === " ")) { i++; } continue; } if (c === opening) { opening = null; } else if ((c === "'" || c === '"') && !opening) { opening = c; } if (!args[i]) args[i] = ""; args[i] += c; } return args; } var DefaultValuesForTypeKey; (function(DefaultValuesForTypeKey2) { DefaultValuesForTypeKey2["BOOLEAN"] = "boolean"; DefaultValuesForTypeKey2["STRING"] = "string"; DefaultValuesForTypeKey2["NUMBER"] = "number"; DefaultValuesForTypeKey2["ARRAY"] = "array"; })(DefaultValuesForTypeKey || (DefaultValuesForTypeKey = {})); var mixin; var YargsParser = class { constructor(_mixin) { mixin = _mixin; } parse(argsInput, options) { const opts = Object.assign({ alias: void 0, array: void 0, boolean: void 0, config: void 0, configObjects: void 0, configuration: void 0, coerce: void 0, count: void 0, default: void 0, envPrefix: void 0, narg: void 0, normalize: void 0, string: void 0, number: void 0, __: void 0, key: void 0 }, options); const args = tokenizeArgString(argsInput); const inputIsString = typeof argsInput === "string"; const aliases = combineAliases(Object.assign(/* @__PURE__ */ Object.create(null), opts.alias)); const configuration = Object.assign({ "boolean-negation": true, "camel-case-expansion": true, "combine-arrays": false, "dot-notation": true, "duplicate-arguments-array": true, "flatten-duplicate-arrays": true, "greedy-arrays": true, "halt-at-non-option": false, "nargs-eats-options": false, "negation-prefix": "no-", "parse-numbers": true, "parse-positional-numbers": true, "populate--": false, "set-placeholder-key": false, "short-option-groups": true, "strip-aliased": false, "strip-dashed": false, "unknown-options-as-args": false }, opts.configuration); const defaults = Object.assign(/* @__PURE__ */ Object.create(null), opts.default); const configObjects = opts.configObjects || []; const envPrefix = opts.envPrefix; const notFlagsOption = configuration["populate--"]; const notFlagsArgv = notFlagsOption ? "--" : "_"; const newAliases = /* @__PURE__ */ Object.create(null); const defaulted = /* @__PURE__ */ Object.create(null); const __ = opts.__ || mixin.format; const flags = { aliases: /* @__PURE__ */ Object.create(null), arrays: /* @__PURE__ */ Object.create(null), bools: /* @__PURE__ */ Object.create(null), strings: /* @__PURE__ */ Object.create(null), numbers: /* @__PURE__ */ Object.create(null), counts: /* @__PURE__ */ Object.create(null), normalize: /* @__PURE__ */ Object.create(null), configs: /* @__PURE__ */ Object.create(null), nargs: /* @__PURE__ */ Object.create(null), coercions: /* @__PURE__ */ Object.create(null), keys: [] }; const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/; const negatedBoolean = new RegExp("^--" + configuration["negation-prefix"] + "(.+)"); [].concat(opts.array || []).filter(Boolean).forEach(function(opt) { const key = typeof opt === "object" ? opt.key : opt; const assignment = Object.keys(opt).map(function(key2) { const arrayFlagKeys = { boolean: "bools", string: "strings", number: "numbers" }; return arrayFlagKeys[key2]; }).filter(Boolean).pop(); if (assignment) { flags[assignment][key] = true; } flags.arrays[key] = true; flags.keys.push(key); }); [].concat(opts.boolean || []).filter(Boolean).forEach(function(key) { flags.bools[key] = true; flags.keys.push(key); }); [].concat(opts.string || []).filter(Boolean).forEach(function(key) { flags.strings[key] = true; flags.keys.push(key); }); [].concat(opts.number || []).filter(Boolean).forEach(function(key) { flags.numbers[key] = true; flags.keys.push(key); }); [].concat(opts.count || []).filter(Boolean).forEach(function(key) { flags.counts[key] = true; flags.keys.push(key); }); [].concat(opts.normalize || []).filter(Boolean).forEach(function(key) { flags.normalize[key] = true; flags.keys.push(key); }); if (typeof opts.narg === "object") { Object.entries(opts.narg).forEach(([key, value]) => { if (typeof value === "number") { flags.nargs[key] = value; flags.keys.push(key); } }); } if (typeof opts.coerce === "object") { Object.entries(opts.coerce).forEach(([key, value]) => { if (typeof value === "function") { flags.coercions[key] = value; flags.keys.push(key); } }); } if (typeof opts.config !== "undefined") { if (Array.isArray(opts.config) || typeof opts.config === "string") { [].concat(opts.config).filter(Boolean).forEach(function(key) { flags.configs[key] = true; }); } else if (typeof opts.config === "object") { Object.entries(opts.config).forEach(([key, value]) => { if (typeof value === "boolean" || typeof value === "function") { flags.configs[key] = value; } }); } } extendAliases(opts.key, aliases, opts.default, flags.arrays); Object.keys(defaults).forEach(function(key) { (flags.aliases[key] || []).forEach(function(alias) { defaults[alias] = defaults[key]; }); }); let error = null; checkConfiguration(); let notFlags = []; const argv = Object.assign(/* @__PURE__ */ Object.create(null), { _: [] }); const argvReturn = {}; for (let i = 0; i < args.length; i++) { const arg = args[i]; const truncatedArg = arg.replace(/^-{3,}/, "---"); let broken; let key; let letters; let m; let next; let value; if (arg !== "--" && isUnknownOptionAsArg(arg)) { pushPositional(arg); } else if (truncatedArg.match(/---+(=|$)/)) { pushPositional(arg); continue; } else if (arg.match(/^--.+=/) || !configuration["short-option-groups"] && arg.match(/^-.+=/)) { m = arg.match(/^--?([^=]+)=([\s\S]*)$/); if (m !== null && Array.isArray(m) && m.length >= 3) { if (checkAllAliases(m[1], flags.arrays)) { i = eatArray(i, m[1], args, m[2]); } else if (checkAllAliases(m[1], flags.nargs) !== false) { i = eatNargs(i, m[1], args, m[2]); } else { setArg(m[1], m[2], true); } } } else if (arg.match(negatedBoolean) && configuration["boolean-negation"]) { m = arg.match(negatedBoolean); if (m !== null && Array.isArray(m) && m.length >= 2) { key = m[1]; setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false); } } else if (arg.match(/^--.+/) || !configuration["short-option-groups"] && arg.match(/^-[^-]+/)) { m = arg.match(/^--?(.+)/); if (m !== null && Array.isArray(m) && m.length >= 2) { key = m[1]; if (checkAllAliases(key, flags.arrays)) { i = eatArray(i, key, args); } else if (checkAllAliases(key, flags.nargs) !== false) { i = eatNargs(i, key, args); } else { next = args[i + 1]; if (next !== void 0 && (!next.match(/^-/) || next.match(negative)) && !checkAllAliases(key, flags.bools) && !checkAllAliases(key, flags.counts)) { setArg(key, next); i++; } else if (/^(true|false)$/.test(next)) { setArg(key, next); i++; } else { setArg(key, defaultValue(key)); } } } } else if (arg.match(/^-.\..+=/)) { m = arg.match(/^-([^=]+)=([\s\S]*)$/); if (m !== null && Array.isArray(m) && m.length >= 3) { setArg(m[1], m[2]); } } else if (arg.match(/^-.\..+/) && !arg.match(negative)) { next = args[i + 1]; m = arg.match(/^-(.\..+)/); if (m !== null && Array.isArray(m) && m.length >= 2) { key = m[1]; if (next !== void 0 && !next.match(/^-/) && !checkAllAliases(key, flags.bools) && !checkAllAliases(key, flags.counts)) { setArg(key, next); i++; } else { setArg(key, defaultValue(key)); } } } else if (arg.match(/^-[^-]+/) && !arg.match(negative)) { letters = arg.slice(1, -1).split(""); broken = false; for (let j = 0; j < letters.length; j++) { next = arg.slice(j + 2); if (letters[j + 1] && letters[j + 1] === "=") { value = arg.slice(j + 3); key = letters[j]; if (checkAllAliases(key, flags.arrays)) { i = eatArray(i, key, args, value); } else if (checkAllAliases(key, flags.nargs) !== false) { i = eatNargs(i, key, args, value); } else { setArg(key, value); } broken = true; break; } if (next === "-") { setArg(letters[j], next); continue; } if (/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) && checkAllAliases(next, flags.bools) === false) { setArg(letters[j], next); broken = true; break; } if (letters[j + 1] && letters[j + 1].match(/\W/)) { setArg(letters[j], next); broken = true; break; } else { setArg(letters[j], defaultValue(letters[j])); } } key = arg.slice(-1)[0]; if (!broken && key !== "-") { if (checkAllAliases(key, flags.arrays)) { i = eatArray(i, key, args); } else if (checkAllAliases(key, flags.nargs) !== false) { i = eatNargs(i, key, args); } else { next = args[i + 1]; if (next !== void 0 && (!/^(-|--)[^-]/.test(next) || next.match(negative)) && !checkAllAliases(key, flags.bools) && !checkAllAliases(key, flags.counts)) { setArg(key, next); i++; } else if (/^(true|false)$/.test(next)) { setArg(key, next); i++; } else { setArg(key, defaultValue(key)); } } } } else if (arg.match(/^-[0-9]$/) && arg.match(negative) && checkAllAliases(arg.slice(1), flags.bools)) { key = arg.slice(1); setArg(key, defaultValue(key)); } else if (arg === "--") { notFlags = args.slice(i + 1); break; } else if (configuration["halt-at-non-option"]) { notFlags = args.slice(i); break; } else { pushPositional(arg); } } applyEnvVars(argv, true); applyEnvVars(argv, false); setConfig(argv); setConfigObjects(); applyDefaultsAndAliases(argv, flags.aliases, defaults, true); applyCoercions(argv); if (configuration["set-placeholder-key"]) setPlaceholderKeys(argv); Object.keys(flags.counts).forEach(function(key) { if (!hasKey(argv, key.split("."))) setArg(key, 0); }); if (notFlagsOption && notFlags.length) argv[notFlagsArgv] = []; notFlags.forEach(function(key) { argv[notFlagsArgv].push(key); }); if (configuration["camel-case-expansion"] && configuration["strip-dashed"]) { Object.keys(argv).filter((key) => key !== "--" && key.includes("-")).forEach((key) => { delete argv[key]; }); } if (configuration["strip-aliased"]) { [].concat(...Object.keys(aliases).map((k) => aliases[k])).forEach((alias) => { if (configuration["camel-case-expansion"] && alias.includes("-")) { delete argv[alias.split(".").map((prop) => camelCase(prop)).join(".")]; } delete argv[alias]; }); } function pushPositional(arg) { const maybeCoercedNumber = maybeCoerceNumber("_", arg); if (typeof maybeCoercedNumber === "string" || typeof maybeCoercedNumber === "number") { argv._.push(maybeCoercedNumber); } } function eatNargs(i, key, args2, argAfterEqualSign) { let ii; let toEat = checkAllAliases(key, flags.nargs); toEat = typeof toEat !== "number" || isNaN(toEat) ? 1 : toEat; if (toEat === 0) { if (!isUndefined(argAfterEqualSign)) { error = Error(__("Argument unexpected for: %s", key)); } setArg(key, defaultValue(key)); return i; } let available = isUndefined(argAfterEqualSign) ? 0 : 1; if (configuration["nargs-eats-options"]) { if (args2.length - (i + 1) + available < toEat) { error = Error(__("Not enough arguments following: %s", key)); } available = toEat; } else { for (ii = i + 1; ii < args2.length; ii++) { if (!args2[ii].match(/^-[^0-9]/) || args2[ii].match(negative) || isUnknownOptionAsArg(args2[ii])) available++; else break; } if (available < toEat) error = Error(__("Not enough arguments following: %s", key)); } let consumed = Math.min(available, toEat); if (!isUndefined(argAfterEqualSign) && consumed > 0) { setArg(key, argAfterEqualSign); consumed--; } for (ii = i + 1; ii < consumed + i + 1; ii++) { setArg(key, args2[ii]); } return i + consumed; } function eatArray(i, key, args2, argAfterEqualSign) { let argsToSet = []; let next = argAfterEqualSign || args2[i + 1]; const nargsCount = checkAllAliases(key, flags.nargs); if (checkAllAliases(key, flags.bools) && !/^(true|false)$/.test(next)) { argsToSet.push(true); } else if (isUndefined(next) || isUndefined(argAfterEqualSign) && /^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next)) { if (defaults[key] !== void 0) { const defVal = defaults[key]; argsToSet = Array.isArray(defVal) ? defVal : [defVal]; } } else { if (!isUndefined(argAfterEqualSign)) { argsToSet.push(processValue(key, argAfterEqualSign, true)); } for (let ii = i + 1; ii < args2.length; ii++) { if (!configuration["greedy-arrays"] && argsToSet.length > 0 || nargsCount && typeof nargsCount === "number" && argsToSet.length >= nargsCount) break; next = args2[ii]; if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next)) break; i = ii; argsToSet.push(processValue(key, next, inputIsString)); } } if (typeof nargsCount === "number" && (nargsCount && argsToSet.length < nargsCount || isNaN(nargsCount) && argsToSet.length === 0)) { error = Error(__("Not enough arguments following: %s", key)); } setArg(key, argsToSet); return i; } function setArg(key, val, shouldStripQuotes = inputIsString) { if (/-/.test(key) && configuration["camel-case-expansion"]) { const alias = key.split(".").map(function(prop) { return camelCase(prop); }).join("."); addNewAlias(key, alias); } const value = processValue(key, val, shouldStripQuotes); const splitKey = key.split("."); setKey(argv, splitKey, value); if (flags.aliases[key]) { flags.aliases[key].forEach(function(x) { const keyProperties = x.split("."); setKey(argv, keyProperties, value); }); } if (splitKey.length > 1 && configuration["dot-notation"]) { (flags.aliases[splitKey[0]] || []).forEach(function(x) { let keyProperties = x.split("."); const a = [].concat(splitKey); a.shift(); keyProperties = keyProperties.concat(a); if (!(flags.aliases[key] || []).includes(keyProperties.join("."))) { setKey(argv, keyProperties, value); } }); } if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) { const keys = [key].concat(flags.aliases[key] || []); keys.forEach(function(key2) { Object.defineProperty(argvReturn, key2, { enumerable: true, get() { return val; }, set(value2) { val = typeof value2 === "string" ? mixin.normalize(value2) : value2; } }); }); } } function addNewAlias(key, alias) { if (!(flags.aliases[key] && flags.aliases[key].length)) { flags.aliases[key] = [alias]; newAliases[alias] = true; } if (!(flags.aliases[alias] && flags.aliases[alias].length)) { addNewAlias(alias, key); } } function processValue(key, val, shouldStripQuotes) { if (shouldStripQuotes) { val = stripQuotes(val); } if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) { if (typeof val === "string") val = val === "true"; } let value = Array.isArray(val) ? val.map(function(v) { return maybeCoerceNumber(key, v); }) : maybeCoerceNumber(key, val); if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === "boolean")) { value = increment(); } if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) { if (Array.isArray(val)) value = val.map((val2) => { return mixin.normalize(val2); }); else value = mixin.normalize(val); } return value; } function maybeCoerceNumber(key, value) { if (!configuration["parse-positional-numbers"] && key === "_") return value; if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) { const shouldCoerceNumber = looksLikeNumber(value) && configuration["parse-numbers"] && Number.isSafeInteger(Math.floor(parseFloat(`${value}`))); if (shouldCoerceNumber || !isUndefined(value) && checkAllAliases(key, flags.numbers)) { value = Number(value); } } return value; } function setConfig(argv2) { const configLookup = /* @__PURE__ */ Object.create(null); applyDefaultsAndAliases(configLookup, flags.aliases, defaults); Object.keys(flags.configs).forEach(function(configKey) { const configPath = argv2[configKey] || configLookup[configKey]; if (configPath) { try { let config = null; const resolvedConfigPath = mixin.resolve(mixin.cwd(), configPath); const resolveConfig = flags.configs[configKey]; if (typeof resolveConfig === "function") { try { config = resolveConfig(resolvedConfigPath); } catch (e) { config = e; } if (config instanceof Error) { error = config; return; } } else { config = mixin.require(resolvedConfigPath); } setConfigObject(config); } catch (ex) { if (ex.name === "PermissionDenied") error = ex; else if (argv2[configKey]) error = Error(__("Invalid JSON config file: %s", configPath)); } } }); } function setConfigObject(config, prev) { Object.keys(config).forEach(function(key) { const value = config[key]; const fullKey = prev ? prev + "." + key : key; if (typeof value === "object" && value !== null && !Array.isArray(value) && configuration["dot-notation"]) { setConfigObject(value, fullKey); } else { if (!hasKey(argv, fullKey.split(".")) || checkAllAliases(fullKey, flags.arrays) && configuration["combine-arrays"]) { setArg(fullKey, value); } } }); } function setConfigObjects() { if (typeof configObjects !== "undefined") { configObjects.forEach(function(configObject) { setConfigObject(configObject); }); } } function applyEnvVars(argv2, configOnly) { if (typeof envPrefix === "undefined") return; const prefix = typeof envPrefix === "string" ? envPrefix : ""; const env2 = mixin.env(); Object.keys(env2).forEach(function(envVar) { if (prefix === "" || envVar.lastIndexOf(prefix, 0) === 0) { const keys = envVar.split("__").map(function(key, i) { if (i === 0) { key = key.substring(prefix.length); } return camelCase(key); }); if ((configOnly && flags.configs[keys.join(".")] || !configOnly) && !hasKey(argv2, keys)) { setArg(keys.join("."), env2[envVar]); } } }); } function applyCoercions(argv2) { let coerce; const applied = /* @__PURE__ */ new Set(); Object.keys(argv2).forEach(function(key) { if (!applied.has(key)) { coerce = checkAllAliases(key, flags.coercions); if (typeof coerce === "function") { try { const value = maybeCoerceNumber(key, coerce(argv2[key])); [].concat(flags.aliases[key] || [], key).forEach((ali) => { applied.add(ali); argv2[ali] = value; }); } catch (err) { error = err; } } } }); } function setPlaceholderKeys(argv2) { flags.keys.forEach((key) => { if (~key.indexOf(".")) return; if (typeof argv2[key] === "undefined") argv2[key] = void 0; }); return argv2; } function applyDefaultsAndAliases(obj, aliases2, defaults2, canLog = false) { Object.keys(defaults2).forEach(function(key) { if (!hasKey(obj, key.split("."))) { setKey(obj, key.split("."), defaults2[key]); if (canLog) defaulted[key] = true; (aliases2[key] || []).forEach(function(x) { if (hasKey(obj, x.split("."))) return; setKey(obj, x.split("."), defaults2[key]); }); } }); } function hasKey(obj, keys) { let o = obj; if (!configuration["dot-notation"]) keys = [keys.join(".")]; keys.slice(0, -1).forEach(function(key2) { o = o[key2] || {}; }); const key = keys[keys.length - 1]; if (typeof o !== "object") return false; else return key in o; } function setKey(obj, keys, value) { let o = obj; if (!configuration["dot-notation"]) keys = [keys.join(".")]; keys.slice(0, -1).forEach(function(key2) { key2 = sanitizeKey(key2); if (typeof o === "object" && o[key2] === void 0) { o[key2] = {}; } if (typeof o[key2] !== "object" || Array.isArray(o[key2])) { if (Array.isArray(o[key2])) { o[key2].push({}); } else { o[key2] = [o[key2], {}]; } o = o[key2][o[key2].length - 1]; } else { o = o[key2]; } }); const key = sanitizeKey(keys[keys.length - 1]); const isTypeArray = checkAllAliases(keys.join("."), flags.arrays); const isValueArray = Array.isArray(value); let duplicate = configuration["duplicate-arguments-array"]; if (!duplicate && checkAllAliases(key, flags.nargs)) { duplicate = true; if (!isUndefined(o[key]) && flags.nargs[key] === 1 || Array.isArray(o[key]) && o[key].length === flags.nargs[key]) { o[key] = void 0; } } if (value === increment()) { o[key] = increment(o[key]); } else if (Array.isArray(o[key])) { if (duplicate && isTypeArray && isValueArray) { o[key] = configuration["flatten-duplicate-arrays"] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]); } else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) { o[key] = value; } else { o[key] = o[key].concat([value]); } } else if (o[key] === void 0 && isTypeArray) { o[key] = isValueArray ? value : [value]; } else if (duplicate && !(o[key] === void 0 || checkAllAliases(key, flags.counts) || checkAllAliases(key, flags.bools))) { o[key] = [o[key], value]; } else { o[key] = value; } } function extendAliases(...args2) { args2.forEach(function(obj) { Object.keys(obj || {}).forEach(function(key) { if (flags.aliases[key]) return; flags.aliases[key] = [].concat(aliases[key] || []); flags.aliases[key].concat(key).forEach(function(x) { if (/-/.test(x) && configuration["camel-case-expansion"]) { const c = camelCase(x); if (c !== key && flags.aliases[key].indexOf(c) === -1) { flags.aliases[key].push(c); newAliases[c] = true; } } }); flags.aliases[key].concat(key).forEach(function(x) { if (x.length > 1 && /[A-Z]/.test(x) && configuration["camel-case-expansion"]) { const c = decamelize(x, "-"); if (c !== key && flags.aliases[key].indexOf(c) === -1) { flags.aliases[key].push(c); newAliases[c] = true; } } }); flags.aliases[key].forEach(function(x) { flags.aliases[x] = [key].concat(flags.aliases[key].filter(function(y) { return x !== y; })); }); }); }); } function checkAllAliases(key, flag) { const toCheck = [].concat(flags.aliases[key] || [], key); const keys = Object.keys(flag); const setAlias = toCheck.find((key2) => keys.includes(key2)); return setAlias ? flag[setAlias] : false; } function hasAnyFlag(key) { const flagsKeys = Object.keys(flags); const toCheck = [].concat(flagsKeys.map((k) => flags[k])); return toCheck.some(function(flag) { return Array.isArray(flag) ? flag.includes(key) : flag[key]; }); } function hasFlagsMatching(arg, ...patterns) { const toCheck = [].concat(...patterns); return toCheck.some(function(pattern) { const match = arg.match(pattern); return match && hasAnyFlag(match[1]); }); } function hasAllShortFlags(arg) { if (arg.match(negative) || !arg.match(/^-[^-]+/)) { return false; } let hasAllFlags = true; let next; const letters = arg.slice(1).split(""); for (let j = 0; j < letters.length; j++) { next = arg.slice(j + 2); if (!hasAnyFlag(letters[j])) { hasAllFlags = false; break; } if (letters[j + 1] && letters[j + 1] === "=" || next === "-" || /[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) || letters[j + 1] && letters[j + 1].match(/\W/)) { break; } } return hasAllFlags; } function isUnknownOptionAsArg(arg) { return configuration["unknown-options-as-args"] && isUnknownOption(arg); } function isUnknownOption(arg) { arg = arg.replace(/^-{3,}/, "--"); if (arg.match(negative)) { return false; } if (hasAllShortFlags(arg)) { return false; } const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/; const normalFlag = /^-+([^=]+?)$/; const flagEndingInHyphen = /^-+([^=]+?)-$/; const flagEndingInDigits = /^-+([^=]+?\d+)$/; const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/; return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters); } function defaultValue(key) { if (!checkAllAliases(key, flags.bools) && !checkAllAliases(key, flags.counts) && `${key}` in defaults) { return defaults[key]; } else { return defaultForType(guessType(key)); } } function defaultForType(type) { const def = { [DefaultValuesForTypeKey.BOOLEAN]: true, [DefaultValuesForTypeKey.STRING]: "", [DefaultValuesForTypeKey.NUMBER]: void 0, [DefaultValuesForTypeKey.ARRAY]: [] }; return def[type]; } function guessType(key) { let type = DefaultValuesForTypeKey.BOOLEAN; if (checkAllAliases(key, flags.strings)) type = DefaultValuesForTypeKey.STRING; else if (checkAllAliases(key, flags.numbers)) type = DefaultValuesForTypeKey.NUMBER; else if (checkAllAliases(key, flags.bools)) type = DefaultValuesForTypeKey.BOOLEAN; else if (checkAllAliases(key, flags.arrays)) type = DefaultValuesForTypeKey.ARRAY; return type; } function isUndefined(num) { return num === void 0; } function checkConfiguration() { Object.keys(flags.counts).find((key) => { if (checkAllAliases(key, flags.arrays)) { error = Error(__("Invalid configuration: %s, opts.count excludes opts.array.", key)); return true; } else if (checkAllAliases(key, flags.nargs)) { error = Error(__("Invalid configuration: %s, opts.count excludes opts.narg.", key)); return true; } return false; }); } return { aliases: Object.assign({}, flags.aliases), argv: Object.assign(argvReturn, argv), configuration, defaulted: Object.assign({}, defaulted), error, newAliases: Object.assign({}, newAliases) }; } }; function combineAliases(aliases) { const aliasArrays = []; const combined = /* @__PURE__ */ Object.create(null); let change = true; Object.keys(aliases).forEach(function(key) { aliasArrays.push([].concat(aliases[key], key)); }); while (change) { change = false; for (let i = 0; i < aliasArrays.length; i++) { for (let ii = i + 1; ii < aliasArrays.length; ii++) { const intersect = aliasArrays[i].filter(function(v) { return aliasArrays[ii].indexOf(v) !== -1; }); if (intersect.length) { aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]); aliasArrays.splice(ii, 1); change = true; break; } } } } aliasArrays.forEach(function(aliasArray) { aliasArray = aliasArray.filter(function(v, i, self) { return self.indexOf(v) === i; }); const lastAlias = aliasArray.pop(); if (lastAlias !== void 0 && typeof lastAlias === "string") { combined[lastAlias] = aliasArray; } }); return combined; } function increment(orig) { return orig !== void 0 ? orig + 1 : 1; } function sanitizeKey(key) { if (key === "__proto__") return "___proto___"; return key; } function stripQuotes(val) { return typeof val === "string" && (val[0] === "'" || val[0] === '"') && val[val.length - 1] === val[0] ? val.substring(1, val.length - 1) : val; } var minNodeVersion = process && process.env && process.env.YARGS_MIN_NODE_VERSION ? Number(process.env.YARGS_MIN_NODE_VERSION) : 12; if (process && process.version) { const major = Number(process.version.match(/v([^.]+)/)[1]); if (major < minNodeVersion) { throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`); } } var env = process ? process.env : {}; var parser = new YargsParser({ cwd: process.cwd, env: () => { return env; }, format: util.format, normalize: path2.normalize, resolve: path2.resolve, require: (path3) => { if (typeof require !== "undefined") { return require(path3); } else if (path3.match(/\.json$/)) { return JSON.parse(fs2.readFileSync(path3, "utf8")); } else { throw Error("only .json config files are supported in ESM"); } } }); var yargsParser = function Parser(args, opts) { const result = parser.parse(args.slice(), opts); return result.argv; }; yargsParser.detailed = function(args, opts) { return parser.parse(args.slice(), opts); }; yargsParser.camelCase = camelCase; yargsParser.decamelize = decamelize; yargsParser.looksLikeNumber = looksLikeNumber; module2.exports = yargsParser; } }); // ../../node_modules/ansi-regex/index.js var require_ansi_regex = __commonJS({ "../../node_modules/ansi-regex/index.js"(exports2, module2) { "use strict"; module2.exports = ({ onlyFirst = false } = {}) => { const pattern = [ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))" ].join("|"); return new RegExp(pattern, onlyFirst ? void 0 : "g"); }; } }); // ../../node_modules/strip-ansi/index.js var require_strip_ansi = __commonJS({ "../../node_modules/strip-ansi/index.js"(exports2, module2) { "use strict"; var ansiRegex = require_ansi_regex(); module2.exports = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string; } }); // ../../node_modules/is-fullwidth-code-point/index.js var require_is_fullwidth_code_point = __commonJS({ "../../node_modules/is-fullwidth-code-point/index.js"(exports2, module2) { "use strict"; var isFullwidthCodePoint = (codePoint) => { if (Number.isNaN(codePoint)) { return false; } if (codePoint >= 4352 && (codePoint <= 4447 || codePoint === 9001 || codePoint === 9002 || 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || 12880 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65131 || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 262141)) { return true; } return false; }; module2.exports = isFullwidthCodePoint; module2.exports.default = isFullwidthCodePoint; } }); // ../../node_modules/emoji-regex/index.js var require_emoji_regex = __commonJS({ "../../node_modules/emoji-regex/index.js"(exports2, module2) { "use strict"; module2.exports = function() { return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; }; } }); // ../../node_modules/string-width/index.js var require_string_width = __commonJS({ "../../node_modules/string-width/index.js"(exports2, module2) { "use strict"; var stripAnsi = require_strip_ansi(); var isFullwidthCodePoint = require_is_fullwidth_code_point(); var emojiRegex = require_emoji_regex(); var stringWidth = (string) => { string = string.replace(emojiRegex(), " "); if (typeof string !== "string" || string.length === 0) { return 0; } string = stripAnsi(string); let width = 0; for (let i = 0; i < string.length; i++) { const code = string.codePointAt(i); if (code <= 31 || code >= 127 && code <= 159) { continue; } if (code >= 768 && code <= 879) { continue; } if (code > 65535) { i++; } width += isFullwidthCodePoint(code) ? 2 : 1; } return width; }; module2.exports = stringWidth; module2.exports.default = stringWidth; } }); // ../../node_modules/color-name/index.js var require_color_name = __commonJS({ "../../node_modules/color-name/index.js"(exports2, module2) { "use strict"; module2.exports = { "aliceblue": [240, 248, 255], "antiquewhite": [250, 235, 215], "aqua": [0, 255, 255], "aquamarine": [127, 255, 212], "azure": [240, 255, 255], "beige": [245, 245, 220], "bisque": [255, 228, 196], "black": [0, 0, 0], "blanchedalmond": [255, 235, 205], "blue": [0, 0, 255], "blueviolet": [138, 43, 226], "brown": [165, 42, 42], "burlywood": [222, 184, 135], "cadetblue": [95, 158, 160], "chartreuse": [127, 255, 0], "chocolate": [210, 105, 30], "coral": [255, 127, 80], "cornflowerblue": [100, 149, 237], "cornsilk": [255, 248, 220], "crimson": [220, 20, 60], "cyan": [0, 255, 255], "darkblue": [0, 0, 139], "darkcyan": [0, 139, 139], "darkgoldenrod": [184, 134, 11], "darkgray": [169, 169, 169], "darkgreen": [0, 100, 0], "darkgrey": [169, 169, 169], "darkkhaki": [189, 183, 107], "darkmagenta": [139, 0, 139], "darkolivegreen": [85, 107, 47], "darkorange": [255, 140, 0], "darkorchid": [153, 50, 204], "darkred": [139, 0, 0], "darksalmon": [233, 150, 122], "darkseagreen": [143, 188, 143], "darkslateblue": [72, 61, 139], "darkslategray": [47, 79, 79], "darkslategrey": [47, 79, 79], "darkturquoise": [0, 206, 209], "darkviolet": [148, 0, 211], "deeppink": [255, 20, 147], "deepskyblue": [0, 191, 255], "dimgray": [105, 105, 105], "dimgrey": [105, 105, 105], "dodgerblue": [30, 144, 255], "firebrick": [178, 34, 34], "floralwhite": [255, 250, 240], "forestgreen": [34, 139, 34], "fuchsia": [255, 0, 255], "gainsboro": [220, 220, 220], "ghostwhite": [248, 248, 255], "gold": [255, 215, 0], "goldenrod": [218, 165, 32], "gray": [128, 128, 128], "green": [0, 128, 0], "greenyellow": [173, 255, 47], "grey": [128, 128, 128], "honeydew": [240, 255, 240], "hotpink": [255, 105, 180], "indianred": [205, 92, 92], "indigo": [75, 0, 130], "ivory": [255, 255, 240], "khaki": [240, 230, 140], "lavender": [230, 230, 250], "lavenderblush": [255, 240, 245], "lawngreen": [124, 252, 0], "lemonchiffon": [255, 250, 205], "lightblue": [173, 216, 230], "lightcoral": [240, 128, 128], "lightcyan": [224, 255, 255], "lightgoldenrodyellow": [250, 250, 210], "lightgray": [211, 211, 211], "lightgreen": [144, 238, 144], "lightgrey": [211, 211, 211], "lightpink": [255, 182, 193], "lightsalmon": [255, 160, 122], "lightseagreen": [32, 178, 170], "lightskyblue": [135, 206, 250], "lightslategray": [119, 136, 153], "lightslategrey": [119, 136, 153], "lightsteelblue": [176, 196, 222], "lightyellow": [255, 255, 224], "lime": [0, 255, 0], "limegreen": [50, 205, 50], "linen": [250, 240, 230], "magenta": [255, 0, 255], "maroon": [128, 0, 0], "mediumaquamarine": [102, 205, 170], "mediumblue": [0, 0, 205], "mediumorchid": [186, 85, 211], "mediumpurple": [147, 112, 219], "mediumseagreen": [60, 179, 113], "mediumslateblue": [123, 104, 238], "mediumspringgreen": [0, 250, 154], "mediumturquoise": [72, 209, 204], "mediumvioletred": [199, 21, 133], "midnightblue": [25, 25, 112], "mintcream": [245, 255, 250], "mistyrose": [255, 228, 225], "moccasin": [255, 228, 181], "navajowhite": [255, 222, 173], "navy": [0, 0, 128], "oldlace": [253, 245, 230], "olive": [128, 128, 0], "olivedrab": [107, 142, 35], "orange": [255, 165, 0], "orangered": [255, 69, 0], "orchid": [218, 112, 214], "palegoldenrod": [238, 232, 170], "palegreen": [152, 251, 152], "paleturquoise": [175, 238, 238], "palevioletred": [219, 112, 147], "papayawhip": [255, 239, 213], "peachpuff": [255, 218, 185], "peru": [205, 133, 63], "pink": [255, 192, 203], "plum": [221, 160, 221], "powderblue": [176, 224, 230], "purple": [128, 0, 128], "rebeccapurple": [102, 51, 153], "red": [255, 0, 0], "rosybrown": [188, 143, 143], "royalblue": [65, 105, 225], "saddlebrown": [139, 69, 19], "salmon": [250, 128, 114], "sandybrown": [244, 164, 96], "seagreen": [46, 139, 87], "seashell": [255, 245, 238], "sienna": [160, 82, 45], "silver": [192, 192, 192], "skyblue": [135, 206, 235], "slateblue": [106, 90, 205], "slategray": [112, 128, 144], "slategrey": [112, 128, 144], "snow": [255, 250, 250], "springgreen": [0, 255, 127], "steelblue": [70, 130, 180], "tan": [210, 180, 140], "teal": [0, 128, 128], "thistle": [216, 191, 216], "tomato": [255, 99, 71], "turquoise": [64, 224, 208], "violet": [238, 130, 238], "wheat": [245, 222, 179], "white": [255, 255, 255], "whitesmoke": [245, 245, 245], "yellow": [255, 255, 0], "yellowgreen": [154, 205, 50] }; } }); // ../../node_modules/ansi-styles/node_modules/color-convert/conversions.js var require_conversions = __commonJS({ "../../node_modules/ansi-styles/node_modules/color-convert/conversions.js"(exports2, module2) { var cssKeywords = require_color_name(); var reverseKeywords = {}; for (const key of Object.keys(cssKeywords)) { reverseKeywords[cssKeywords[key]] = key; } var convert = { rgb: { channels: 3, labels: "rgb" }, hsl: { channels: 3, labels: "hsl" }, hsv: { channels: 3, labels: "hsv" }, hwb: { channels: 3, labels: "hwb" }, cmyk: { channels: 4, labels: "cmyk" }, xyz: { channels: 3, labels: "xyz" }, lab: { channels: 3, labels: "lab" }, lch: { channels: 3, labels: "lch" }, hex: { channels: 1, labels: ["hex"] }, keyword: { channels: 1, labels: ["keyword"] }, ansi16: { channels: 1, labels: ["ansi16"] }, ansi256: { channels: 1, labels: ["ansi256"] }, hcg: { channels: 3, labels: ["h", "c", "g"] }, apple: { channels: 3, labels: ["r16", "g16", "b16"] }, gray: { channels: 1, labels: ["gray"] } }; module2.exports = convert; for (const model of Object.keys(convert)) { if (!("channels" in convert[model])) { throw new Error("missing channels property: " + model); } if (!("labels" in convert[model])) { throw new Error("missing channel labels property: " + model); } if (convert[model].labels.length !== convert[model].channels) { throw new Error("channel and label counts mismatch: " + model); } const { channels, labels } = convert[model]; delete convert[model].channels; delete convert[model].labels; Object.defineProperty(convert[model], "channels", { value: channels }); Object.defineProperty(convert[model], "labels", { value: labels }); } convert.rgb.hsl = function(rgb) { const r = rgb[0] / 255; const g = rgb[1] / 255; const b = rgb[2] / 255; const min = Math.min(r, g, b); const max = Math.max(r, g, b); const delta = max - min; let h; let s; if (max === min) { h = 0; } else if (r === max) { h = (g - b) / delta; } else if (g === max) { h = 2 + (b - r) / delta; } else if (b === max) { h = 4 + (r - g) / delta; } h = Math.min(h * 60, 360); if (h < 0) { h += 360; } const l = (min + max) / 2; if (max === min) { s = 0; } else if (l <= 0.5) { s = delta / (max + min); } else { s = delta / (2 - max - min); } return [h, s * 100, l * 100]; }; convert.rgb.hsv = function(rgb) { let rdif; let gdif; let bdif; let h; let s; const r = rgb[0] / 255; const g = rgb[1] / 255; const b = rgb[2] / 255; const v = Math.max(r, g, b); const diff = v - Math.min(r, g, b); const diffc = function(c) { return (v - c) / 6 / diff + 1 / 2; }; if (diff === 0) { h = 0; s = 0; } else { s = diff / v; rdif = diffc(r); gdif = diffc(g); bdif = diffc(b); if (r === v) { h = bdif - gdif; } else if (g === v) { h = 1 / 3 + rdif - bdif; } else if (b === v) { h = 2 / 3 + gdif - rdif; } if (h < 0) { h += 1; } else if (h > 1) { h -= 1; } } return [ h * 360, s * 100, v * 100 ]; }; convert.rgb.hwb = function(rgb) { const r = rgb[0]; const g = rgb[1]; let b = rgb[2]; const h = convert.rgb.hsl(rgb)[0]; const w = 1 / 255 * Math.min(r, Math.min(g, b)); b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); return [h, w * 100, b * 100]; }; convert.rgb.cmyk = function(rgb) { const r = rgb[0] / 255; const g = rgb[1] / 255; const b = rgb[2] / 255; const k = Math.min(1 - r, 1 - g, 1 - b); const c = (1 - r - k) / (1 - k) || 0; const m = (1 - g - k) / (1 - k) || 0; const y = (1 - b - k) / (1 - k) || 0; return [c * 100, m * 100, y * 100, k * 100]; }; function comparativeDistance(x, y) { return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2; } convert.rgb.keyword = function(rgb) { const reversed = reverseKeywords[rgb]; if (reversed) { return reversed; } let currentClosestDistance = Infinity; let currentClosestKeyword; for (const keyword of Object.keys(cssKeywords)) { const value = cssKeywords[keyword]; const distance = comparativeDistance(rgb, value); if (distance < currentClosestDistance) { currentClosestDistance = distance; currentClosestKeyword = keyword; } } return currentClosestKeyword; }; convert.keyword.rgb = function(keyword) { return cssKeywords[keyword]; }; convert.rgb.xyz = function(rgb) { let r = rgb[0] / 255; let g = rgb[1] / 255; let b = rgb[2] / 255; r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92; g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92; b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92; const x = r * 0.4124 + g * 0.3576 + b * 0.1805; const y = r * 0.2126 + g * 0.7152 + b * 0.0722; const z = r * 0.0193 + g * 0.1192 + b * 0.9505; return [x * 100, y * 100, z * 100]; }; convert.rgb.lab = function(rgb) { const xyz = convert.rgb.xyz(rgb); let x = xyz[0]; let y = xyz[1]; let z = xyz[2]; x /= 95.047; y /= 100; z /= 108.883; x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116; y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116; z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116; const l = 116 * y - 16; const a = 500 * (x - y); const b = 200 * (y - z); return [l, a, b]; }; convert.hsl.rgb = function(hsl) { const h = hsl[0] / 360; const s = hsl[1] / 100; const l = hsl[2] / 100; let t2; let t3; let val; if (s === 0) { val = l * 255; return [val, val, val]; } if (l < 0.5) { t2 = l * (1 + s); } else { t2 = l + s - l * s; } const t1 = 2 * l - t2; const rgb = [0, 0, 0]; for (let i = 0; i < 3; i++) { t3 = h + 1 / 3 * -(i - 1); if (t3 < 0) { t3++; } if (t3 > 1) { t3--; } if (6 * t3 < 1) { val = t1 + (t2 - t1) * 6 * t3; } else if (2 * t3 < 1) { val = t2; } else if (3 * t3 < 2) { val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; } else { val = t1; } rgb[i] = val * 255; } return rgb; }; convert.hsl.hsv = function(hsl) { const h = hsl[0]; let s = hsl[1] / 100; let l = hsl[2] / 100; let smin = s; const lmin = Math.max(l, 0.01); l *= 2; s *= l <= 1 ? l : 2 - l; smin *= lmin <= 1 ? lmin : 2 - lmin; const v = (l + s) / 2; const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s); return [h, sv * 100, v * 100]; }; convert.hsv.rgb = function(hsv) { const h = hsv[0] / 60; const s = hsv[1] / 100; let v = hsv[2] / 100; const hi = Math.floor(h) % 6; const f = h - Math.floor(h); const p = 255 * v * (1 - s); const q = 255 * v * (1 - s * f); const t = 255 * v * (1 - s * (1 - f)); v *= 255; switch (hi) { case 0: return [v, t, p]; case 1: return [q, v, p]; case 2: return [p, v, t]; case 3: return [p, q, v]; case 4: return [t, p, v]; case 5: return [v, p, q]; } }; convert.hsv.hsl = function(hsv) { const h = hsv[0]; const s = hsv[1] / 100; const v = hsv[2] / 100; const vmin = Math.max(v, 0.01); let sl; let l; l = (2 - s) * v; const lmin = (2 - s) * vmin; sl = s * vmin; sl /= lmin <= 1 ? lmin : 2 - lmin; sl = sl || 0; l /= 2; return [h, sl * 100, l * 100]; }; convert.hwb.rgb = function(hwb) { const h = hwb[0] / 360; let wh = hwb[1] / 100; let bl = hwb[2] / 100; const ratio = wh + bl; let f; if (ratio > 1) { wh /= ratio; bl /= ratio; } const i = Math.floor(6 * h); const v = 1 - bl; f = 6 * h - i; if ((i & 1) !== 0) { f = 1 - f; } const n = wh + f * (v - wh); let r; let g; let b; switch (i) { default: case 6: case 0: r = v; g = n; b = wh; break; case 1: r = n; g = v; b = wh; break; case 2: r = wh; g = v; b = n; break; case 3: r = wh; g = n; b = v; break; case 4: r = n; g = wh; b = v; break; case 5: r = v; g = wh; b = n; break; } return [r * 255, g * 255, b * 255]; }; convert.cmyk.rgb = function(cmyk) { const c = cmyk[0] / 100; const m = cmyk[1] / 100; const y = cmyk[2] / 100; const k = cmyk[3] / 100; const r = 1 - Math.min(1, c * (1 - k) + k); const g = 1 - Math.min(1, m * (1 - k) + k); const b = 1 - Math.min(1, y * (1 - k) + k); return [r * 255, g * 255, b * 255]; }; convert.xyz.rgb = function(xyz) { const x = xyz[0] / 100; const y = xyz[1] / 100; const z = xyz[2] / 100; let r; let g; let b; r = x * 3.2406 + y * -1.5372 + z * -0.4986; g = x * -0.9689 + y * 1.8758 + z * 0.0415; b = x * 0.0557 + y * -0.204 + z * 1.057; r = r > 31308e-7 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92; g = g > 31308e-7 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92; b = b > 31308e-7 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92; r = Math.min(Math.max(0, r), 1); g = Math.min(Math.max(0, g), 1); b = Math.min(Math.max(0, b), 1); return [r * 255, g * 255, b * 255]; }; convert.xyz.lab = function(xyz) { let x = xyz[0]; let y = xyz[1]; let z = xyz[2]; x /= 95.047; y /= 100; z /= 108.883; x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116; y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116; z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116; const l = 116 * y - 16; const a = 500 * (x - y); const b = 200 * (y - z); return [l, a, b]; }; convert.lab.xyz = function(lab) { const l = lab[0]; const a = lab[1]; const b = lab[2]; let x; let y; let z; y = (l + 16) / 116; x = a / 500 + y; z = y - b / 200; const y2 = y ** 3; const x2 = x ** 3; const z2 = z ** 3; y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787; x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787; z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787; x *= 95.047; y *= 100; z *= 108.883; return [x, y, z]; }; convert.lab.lch = function(lab) { const l = lab[0]; const a = lab[1]; const b = lab[2]; let h; const hr = Math.atan2(b, a); h = hr * 360 / 2 / Math.PI; if (h < 0) { h += 360; } const c = Math.sqrt(a * a + b * b); return [l, c, h]; }; convert.lch.lab = function(lch) { const l = lch[0]; const c = lch[1]; const h = lch[2]; const hr = h / 360 * 2 * Math.PI; const a = c * Math.cos(hr); const b = c * Math.sin(hr); return [l, a, b]; }; convert.rgb.ansi16 = function(args, saturation = null) { const [r, g, b] = args; let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; value = Math.round(value / 50); if (value === 0) { return 30; } let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255)); if (value === 2) { ansi += 60; } return ansi; }; convert.hsv.ansi16 = function(args) { return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); }; convert.rgb.ansi256 = function(args) { const r = args[0]; const g = args[1]; const b = args[2]; if (r === g && g === b) { if (r < 8) { return 16; } if (r > 248) { return 231; } return Math.round((r - 8) / 247 * 24) + 232; } const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5); return ansi; }; convert.ansi16.rgb = function(args) { let color = args % 10; if (color === 0 || color === 7) { if (args > 50) { color += 3.5; } color = color / 10.5 * 255; return [color, color, color]; } const mult = (~~(args > 50) + 1) * 0.5; const r = (color & 1) * mult * 255; const g = (color >> 1 & 1) * mult * 255; const b = (color >> 2 & 1) * mult * 255; return [r, g, b]; }; convert.ansi256.rgb = function(args) { if (args >= 232) { const c = (args - 232) * 10 + 8; return [c, c, c]; } args -= 16; let rem; const r = Math.floor(args / 36) / 5 * 255; const g = Math.floor((rem = args % 36) / 6) / 5 * 255; const b = rem % 6 / 5 * 255; return [r, g, b]; }; convert.rgb.hex = function(args) { const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255); const string = integer.toString(16).toUpperCase(); return "000000".substring(string.length) + string; }; convert.hex.rgb = function(args) { const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); if (!match) { return [0, 0, 0]; } let colorString = match[0]; if (match[0].length === 3) { colorString = colorString.split("").map((char) => { return char + char; }).join(""); } const integer = parseInt(colorString, 16); const r = integer >> 16 & 255; const g = integer >> 8 & 255; const b = integer & 255; return [r, g, b]; }; convert.rgb.hcg = function(rgb) { const r = rgb[0] / 255; const g = rgb[1] / 255; const b = rgb[2] / 255; const max = Math.max(Math.max(r, g), b); const min = Math.min(Math.min(r, g), b); const chroma = max - min; let grayscale; let hue; if (chroma < 1) { grayscale = min / (1 - chroma); } else { grayscale = 0; } if (chroma <= 0) { hue = 0; } else if (max === r) { hue = (g - b) / chroma % 6; } else if (max === g) { hue = 2 + (b - r) / chroma; } else { hue = 4 + (r - g) / chroma; } hue /= 6; hue %= 1; return [hue * 360, chroma * 100, grayscale * 100]; }; convert.hsl.hcg = function(hsl) { const s = hsl[1] / 100; const l = hsl[2] / 100; const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l); let f = 0; if (c < 1) { f = (l - 0.5 * c) / (1 - c); } return [hsl[0], c * 100, f * 100]; }; convert.hsv.hcg = function(hsv) { const s = hsv[1] / 100; const v = hsv[2] / 100; const c = s * v; let f = 0; if (c < 1) { f = (v - c) / (1 - c); } return [hsv[0], c * 100, f * 100]; }; convert.hcg.rgb = function(hcg) { const h = hcg[0] / 360; const c = hcg[1] / 100; const g = hcg[2] / 100; if (c === 0) { return [g * 255, g * 255, g * 255]; } const pure = [0, 0, 0]; const hi = h % 1 * 6; const v = hi % 1; const w = 1 - v; let mg = 0; switch (Math.floor(hi)) { case 0: pure[0] = 1; pure[1] = v; pure[2] = 0; break; case 1: pure[0] = w; pure[1] = 1; pure[2] = 0; break; case 2: pure[0] = 0; pure[1] = 1; pure[2] = v; break; case 3: pure[0] = 0; pure[1] = w; pure[2] = 1; break; case 4: pure[0] = v; pure[1] = 0; pure[2] = 1; break; default: pure[0] = 1; pure[1] = 0; pure[2] = w; } mg = (1 - c) * g; return [ (c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255 ]; }; convert.hcg.hsv = function(hcg) { const c = hcg[1] / 100; const g = hcg[2] / 100; const v = c + g * (1 - c); let f = 0; if (v > 0) { f = c / v; } return [hcg[0], f * 100, v * 100]; }; convert.hcg.hsl = function(hcg) { const c = hcg[1] / 100; const g = hcg[2] / 100; const l = g * (1 - c) + 0.5 * c; let s = 0; if (l > 0 && l < 0.5) { s = c / (2 * l); } else if (l >= 0.5 && l < 1) { s = c / (2 * (1 - l)); } return [hcg[0], s * 100, l * 100]; }; convert.hcg.hwb = function(hcg) { const c = hcg[1] / 100; const g = hcg[2] / 100; const v = c + g * (1 - c); return [hcg[0], (v - c) * 100, (1 - v) * 100]; }; convert.hwb.hcg = function(hwb) { const w = hwb[1] / 100; const b = hwb[2] / 100; const v = 1 - b; const c = v - w; let g = 0; if (c < 1) { g = (v - c) / (1 - c); } return [hwb[0], c * 100, g * 100]; }; convert.apple.rgb = function(apple) { return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255]; }; convert.rgb.apple = function(rgb) { return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535]; }; convert.gray.rgb = function(args) { return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; }; convert.gray.hsl = function(args) { return [0, 0, args[0]]; }; convert.gray.hsv = convert.gray.hsl; convert.gray.hwb = function(gray) { return [0, 100, gray[0]]; }; convert.gray.cmyk = function(gray) { return [0, 0, 0, gray[0]]; }; convert.gray.lab = function(gray) { return [gray[0], 0, 0]; }; convert.gray.hex = function(gray) { const val = Math.round(gray[0] / 100 * 255) & 255; const integer = (val << 16) + (val << 8) + val; const string = integer.toString(16).toUpperCase(); return "000000".substring(string.length) + string; }; convert.rgb.gray = function(rgb) { const val = (rgb[0] + rgb[1] + rgb[2]) / 3; return [val / 255 * 100]; }; } }); // ../../node_modules/ansi-styles/node_modules/color-convert/route.js var require_route = __commonJS({ "../../node_modules/ansi-styles/node_modules/color-convert/route.js"(exports2, module2) { var conversions = require_conversions(); function buildGraph() { const graph = {}; const models = Object.keys(conversions); for (let len = models.length, i = 0; i < len; i++) { graph[models[i]] = { distance: -1, parent: null }; } return graph; } function deriveBFS(fromModel) { const graph = buildGraph(); const queue = [fromModel]; graph[fromModel].distance = 0; while (queue.length) { const current = queue.pop(); const adjacents = Object.keys(conversions[current]); for (let len = adjacents.length, i = 0; i < len; i++) { const adjacent = adjacents[i]; const node = graph[adjacent]; if (node.distance === -1) { node.distance = graph[current].distance + 1; node.parent = current; queue.unshift(adjacent); } } } return graph; } function link(from, to) { return function(args) { return to(from(args)); }; } function wrapConversion(toModel, graph) { const path2 = [graph[toModel].parent, toModel]; let fn = conversions[graph[toModel].parent][toModel]; let cur = graph[toModel].parent; while (graph[cur].parent) { path2.unshift(graph[cur].parent); fn = link(conversions[graph[cur].parent][cur], fn); cur = graph[cur].parent; } fn.conversion = path2; return fn; } module2.exports = function(fromModel) { const graph = deriveBFS(fromModel); const conversion = {}; const models = Object.keys(graph); for (let len = models.length, i = 0; i < len; i++) { const toModel = models[i]; const node = graph[toModel]; if (node.parent === null) { continue; } conversion[toModel] = wrapConversion(toModel, graph); } return conversion; }; } }); // ../../node_modules/ansi-styles/node_modules/color-convert/index.js var require_color_convert = __commonJS({ "../../node_modules/ansi-styles/node_modules/color-convert/index.js"(exports2, module2) { var conversions = require_conversions(); var route = require_route(); var convert = {}; var models = Object.keys(conversions); function wrapRaw(fn) { const wrappedFn = function(...args) { const arg0 = args[0]; if (arg0 === void 0 || arg0 === null) { return arg0; } if (arg0.length > 1) { args = arg0; } return fn(args); }; if ("conversion" in fn) { wrappedFn.conversion = fn.conversion; } return wrappedFn; } function wrapRounded(fn) { const wrappedFn = function(...args) { const arg0 = args[0]; if (arg0 === void 0 || arg0 === null) { return arg0; } if (arg0.length > 1) { args = arg0; } const result = fn(args); if (typeof result === "object") { for (let len = result.length, i = 0; i < len; i++) { result[i] = Math.round(result[i]); } } return result; }; if ("conversion" in fn) { wrappedFn.conversion = fn.conversion; } return wrappedFn; } models.forEach((fromModel) => { convert[fromModel] = {}; Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels }); Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels }); const routes = route(fromModel); const routeModels = Object.keys(routes); routeModels.forEach((toModel) => { const fn = routes[toModel]; convert[fromModel][toModel] = wrapRounded(fn); convert[fromModel][toModel].raw = wrapRaw(fn); }); }); module2.exports = convert; } }); // ../../node_modules/ansi-styles/index.js var require_ansi_styles = __commonJS({ "../../node_modules/ansi-styles/index.js"(exports2, module2) { "use strict"; var wrapAnsi16 = (fn, offset) => (...args) => { const code = fn(...args); return `\x1B[${code + offset}m`; }; var wrapAnsi256 = (fn, offset) => (...args) => { const code = fn(...args); return `\x1B[${38 + offset};5;${code}m`; }; var wrapAnsi16m = (fn, offset) => (...args) => { const rgb = fn(...args); return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; }; var ansi2ansi = (n) => n; var rgb2rgb = (r, g, b) => [r, g, b]; var setLazyProperty = (object, property, get) => { Object.defineProperty(object, property, { get: () => { const value = get(); Object.defineProperty(object, property, { value, enumerable: true, configurable: true }); return value; }, enumerable: true, configurable: true }); }; var colorConvert; var makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { if (colorConvert === void 0) { colorConvert = require_color_convert(); } const offset = isBackground ? 10 : 0; const styles = {}; for (const [sourceSpace, suite] of Object.entries(colorConvert)) { const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace; if (sourceSpace === targetSpace) { styles[name] = wrap(identity, offset); } else if (typeof suite === "object") { styles[name] = wrap(suite[targetSpace], offset); } } return styles; }; function assembleStyles() { const codes = /* @__PURE__ */ new Map(); const styles = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } }; styles.color.gray = styles.color.blackBright; styles.bgColor.bgGray = styles.bgColor.bgBlackBright; styles.color.grey = styles.color.blackBright; styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; for (const [groupName, group] of Object.entries(styles)) { for (const [styleName, style] of Object.entries(group)) { styles[styleName] = { open: `\x1B[${style[0]}m`, close: `\x1B[${style[1]}m` }; group[styleName] = styles[styleName]; codes.set(style[0], style[1]); } Object.defineProperty(styles, groupName, { value: group, enumerable: false }); } Object.defineProperty(styles, "codes", { value: codes, enumerable: false }); styles.color.close = "\x1B[39m"; styles.bgColor.close = "\x1B[49m"; setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false)); setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false)); setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false)); setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true)); setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true)); setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true)); return styles; } Object.defineProperty(module2, "exports", { enumerable: true, get: assembleStyles }); } }); // ../../node_modules/cliui/node_modules/wrap-ansi/index.js var require_wrap_ansi = __commonJS({ "../../node_modules/cliui/node_modules/wrap-ansi/index.js"(exports2, module2) { "use strict"; var stringWidth = require_string_width(); var stripAnsi = require_strip_ansi(); var ansiStyles = require_ansi_styles(); var ESCAPES = /* @__PURE__ */ new Set([ "\x1B", "\x9B" ]); var END_CODE = 39; var ANSI_ESCAPE_BELL = "\x07"; var ANSI_CSI = "["; var ANSI_OSC = "]"; var ANSI_SGR_TERMINATOR = "m"; var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`; var wrapAnsi = (code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`; var wrapAnsiHyperlink = (uri) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${uri}${ANSI_ESCAPE_BELL}`; var wordLengths = (string) => string.split(" ").map((character) => stringWidth(character)); var wrapWord = (rows, word, columns) => { const characters = [...word]; let isInsideEscape = false; let isInsideLinkEscape = false; let visible = stringWidth(stripAnsi(rows[rows.length - 1])); for (const [index, character] of characters.entries()) { const characterLength = stringWidth(character); if (visible + characterLength <= columns) { rows[rows.length - 1] += character; } else { rows.push(character); visible = 0; } if (ESCAPES.has(character)) { isInsideEscape = true; isInsideLinkEscape = characters.slice(index + 1).join("").startsWith(ANSI_ESCAPE_LINK); } if (isInsideEscape) { if (isInsideLinkEscape) { if (character === ANSI_ESCAPE_BELL) { isInsideEscape = false; isInsideLinkEscape = false; } } else if (character === ANSI_SGR_TERMINATOR) { isInsideEscape = false; } continue; } visible += characterLength; if (visible === columns && index < characters.length - 1) { rows.push(""); visible = 0; } } if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) { rows[rows.length - 2] += rows.pop(); } }; var stringVisibleTrimSpacesRight = (string) => { const words = string.split(" "); let last = words.length; while (last > 0) { if (stringWidth(words[last - 1]) > 0) { break; } last--; } if (last === words.length) { return string; } return words.slice(0, last).join(" ") + words.slice(last).join(""); }; var exec = (string, columns, options = {}) => { if (options.trim !== false && string.trim() === "") { return ""; } let returnValue = ""; let escapeCode; let escapeUrl; const lengths = wordLengths(string); let rows = [""]; for (const [index, word] of string.split(" ").entries()) { if (options.trim !== false) { rows[rows.length - 1] = rows[rows.length - 1].trimStart(); } let rowLength = stringWidth(rows[rows.length - 1]); if (index !== 0) { if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) { rows.push(""); rowLength = 0; } if (rowLength > 0 || options.trim === false) { rows[rows.length - 1] += " "; rowLength++; } } if (options.hard && lengths[index] > columns) { const remainingColumns = columns - rowLength; const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns); const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns); if (breaksStartingNextLine < breaksStartingThisLine) { rows.push(""); } wrapWord(rows, word, columns); continue; } if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) { if (options.wordWrap === false && rowLength < columns) { wrapWord(rows, word, columns); continue; } rows.push(""); } if (rowLength + lengths[index] > columns && options.wordWrap === false) { wrapWord(rows, word, columns); continue; } rows[rows.length - 1] += word; } if (options.trim !== false) { rows = rows.map(stringVisibleTrimSpacesRight); } const pre = [...rows.join("\n")]; for (const [index, character] of pre.entries()) { returnValue += character; if (ESCAPES.has(character)) { const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?\\d+)m|\\${ANSI_ESCAPE_LINK}(?.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join("")) || { groups: {} }; if (groups.code !== void 0) { const code2 = Number.parseFloat(groups.code); escapeCode = code2 === END_CODE ? void 0 : code2; } else if (groups.uri !== void 0) { escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri; } } const code = ansiStyles.codes.get(Number(escapeCode)); if (pre[index + 1] === "\n") { if (escapeUrl) { returnValue += wrapAnsiHyperlink(""); } if (escapeCode && code) { returnValue += wrapAnsi(code); } } else if (character === "\n") { if (escapeCode && code) { returnValue += wrapAnsi(escapeCode); } if (escapeUrl) { returnValue += wrapAnsiHyperlink(escapeUrl); } } } return returnValue; }; module2.exports = (string, columns, options) => { return String(string).normalize().replace(/\r\n/g, "\n").split("\n").map((line) => exec(line, columns, options)).join("\n"); }; } }); // ../../node_modules/cliui/build/index.cjs var require_build3 = __commonJS({ "../../node_modules/cliui/build/index.cjs"(exports2, module2) { "use strict"; var align = { right: alignRight, center: alignCenter }; var top = 0; var right = 1; var bottom = 2; var left = 3; var UI = class { constructor(opts) { var _a; this.width = opts.width; this.wrap = (_a = opts.wrap) !== null && _a !== void 0 ? _a : true; this.rows = []; } span(...args) { const cols = this.div(...args); cols.span = true; } resetOutput() { this.rows = []; } div(...args) { if (args.length === 0) { this.div(""); } if (this.wrap && this.shouldApplyLayoutDSL(...args) && typeof args[0] === "string") { return this.applyLayoutDSL(args[0]); } const cols = args.map((arg) => { if (typeof arg === "string") { return this.colFromString(arg); } return arg; }); this.rows.push(cols); return cols; } shouldApplyLayoutDSL(...args) { return args.length === 1 && typeof args[0] === "string" && /[\t\n]/.test(args[0]); } applyLayoutDSL(str) { const rows = str.split("\n").map((row) => row.split(" ")); let leftColumnWidth = 0; rows.forEach((columns) => { if (columns.length > 1 && mixin.stringWidth(columns[0]) > leftColumnWidth) { leftColumnWidth = Math.min(Math.floor(this.width * 0.5), mixin.stringWidth(columns[0])); } }); rows.forEach((columns) => { this.div(...columns.map((r, i) => { return { text: r.trim(), padding: this.measurePadding(r), width: i === 0 && columns.length > 1 ? leftColumnWidth : void 0 }; })); }); return this.rows[this.rows.length - 1]; } colFromString(text) { return { text, padding: this.measurePadding(text) }; } measurePadding(str) { const noAnsi = mixin.stripAnsi(str); return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length]; } toString() { const lines = []; this.rows.forEach((row) => { this.rowToString(row, lines); }); return lines.filter((line) => !line.hidden).map((line) => line.text).join("\n"); } rowToString(row, lines) { this.rasterize(row).forEach((rrow, r) => { let str = ""; rrow.forEach((col, c) => { const { width } = row[c]; const wrapWidth = this.negatePadding(row[c]); let ts = col; if (wrapWidth > mixin.stringWidth(col)) { ts += " ".repeat(wrapWidth - mixin.stringWidth(col)); } if (row[c].align && row[c].align !== "left" && this.wrap) { const fn = align[row[c].align]; ts = fn(ts, wrapWidth); if (mixin.stringWidth(ts) < wrapWidth) { ts += " ".repeat((width || 0) - mixin.stringWidth(ts) - 1); } } const padding = row[c].padding || [0, 0, 0, 0]; if (padding[left]) { str += " ".repeat(padding[left]); } str += addBorder(row[c], ts, "| "); str += ts; str += addBorder(row[c], ts, " |"); if (padding[right]) { str += " ".repeat(padding[right]); } if (r === 0 && lines.length > 0) { str = this.renderInline(str, lines[lines.length - 1]); } }); lines.push({ text: str.replace(/ +$/, ""), span: row.span }); }); return lines; } renderInline(source, previousLine) { const match = source.match(/^ */); const leadingWhitespace = match ? match[0].length : 0; const target = previousLine.text; const targetTextWidth = mixin.stringWidth(target.trimRight()); if (!previousLine.span) { return source; } if (!this.wrap) { previousLine.hidden = true; return target + source; } if (leadingWhitespace < targetTextWidth) { return source; } previousLine.hidden = true; return target.trimRight() + " ".repeat(leadingWhitespace - targetTextWidth) + source.trimLeft(); } rasterize(row) { const rrows = []; const widths = this.columnWidths(row); let wrapped; row.forEach((col, c) => { col.width = widths[c]; if (this.wrap) { wrapped = mixin.wrap(col.text, this.negatePadding(col), { hard: true }).split("\n"); } else { wrapped = col.text.split("\n"); } if (col.border) { wrapped.unshift("." + "-".repeat(this.negatePadding(col) + 2) + "."); wrapped.push("'" + "-".repeat(this.negatePadding(col) + 2) + "'"); } if (col.padding) { wrapped.unshift(...new Array(col.padding[top] || 0).fill("")); wrapped.push(...new Array(col.padding[bottom] || 0).fill("")); } wrapped.forEach((str, r) => { if (!rrows[r]) { rrows.push([]); } const rrow = rrows[r]; for (let i = 0; i < c; i++) { if (rrow[i] === void 0) { rrow.push(""); } } rrow.push(str); }); }); return rrows; } negatePadding(col) { let wrapWidth = col.width || 0; if (col.padding) { wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0); } if (col.border) { wrapWidth -= 4; } return wrapWidth; } columnWidths(row) { if (!this.wrap) { return row.map((col) => { return col.width || mixin.stringWidth(col.text); }); } let unset = row.length; let remainingWidth = this.width; const widths = row.map((col) => { if (col.width) { unset--; remainingWidth -= col.width; return col.width; } return void 0; }); const unsetWidth = unset ? Math.floor(remainingWidth / unset) : 0; return widths.map((w, i) => { if (w === void 0) { return Math.max(unsetWidth, _minWidth(row[i])); } return w; }); } }; function addBorder(col, ts, style) { if (col.border) { if (/[.']-+[.']/.test(ts)) { return ""; } if (ts.trim().length !== 0) { return style; } return " "; } return ""; } function _minWidth(col) { const padding = col.padding || []; const minWidth = 1 + (padding[left] || 0) + (padding[right] || 0); if (col.border) { return minWidth + 4; } return minWidth; } function getWindowWidth() { if (typeof process === "object" && process.stdout && process.stdout.columns) { return process.stdout.columns; } return 80; } function alignRight(str, width) { str = str.trim(); const strWidth = mixin.stringWidth(str); if (strWidth < width) { return " ".repeat(width - strWidth) + str; } return str; } function alignCenter(str, width) { str = str.trim(); const strWidth = mixin.stringWidth(str); if (strWidth >= width) { return str; } return " ".repeat(width - strWidth >> 1) + str; } var mixin; function cliui(opts, _mixin) { mixin = _mixin; return new UI({ width: (opts === null || opts === void 0 ? void 0 : opts.width) || getWindowWidth(), wrap: opts === null || opts === void 0 ? void 0 : opts.wrap }); } var stringWidth = require_string_width(); var stripAnsi = require_strip_ansi(); var wrap = require_wrap_ansi(); function ui(opts) { return cliui(opts, { stringWidth, stripAnsi, wrap }); } module2.exports = ui; } }); // ../../node_modules/escalade/sync/index.js var require_sync = __commonJS({ "../../node_modules/escalade/sync/index.js"(exports2, module2) { var { dirname, resolve } = require("path"); var { readdirSync, statSync } = require("fs"); module2.exports = function(start, callback) { let dir = resolve(".", start); let tmp, stats = statSync(dir); if (!stats.isDirectory()) { dir = dirname(dir); } while (true) { tmp = callback(dir, readdirSync(dir)); if (tmp) return resolve(dir, tmp); dir = dirname(tmp = dir); if (tmp === dir) break; } }; } }); // ../../node_modules/get-caller-file/index.js var require_get_caller_file = __commonJS({ "../../node_modules/get-caller-file/index.js"(exports2, module2) { "use strict"; module2.exports = function getCallerFile(position) { if (position === void 0) { position = 2; } if (position >= Error.stackTraceLimit) { throw new TypeError("getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `" + position + "` and Error.stackTraceLimit was: `" + Error.stackTraceLimit + "`"); } var oldPrepareStackTrace = Error.prepareStackTrace; Error.prepareStackTrace = function(_, stack2) { return stack2; }; var stack = new Error().stack; Error.prepareStackTrace = oldPrepareStackTrace; if (stack !== null && typeof stack === "object") { return stack[position] ? stack[position].getFileName() : void 0; } }; } }); // ../../node_modules/require-directory/index.js var require_require_directory = __commonJS({ "../../node_modules/require-directory/index.js"(exports2, module2) { "use strict"; var fs2 = require("fs"); var join = require("path").join; var resolve = require("path").resolve; var dirname = require("path").dirname; var defaultOptions = { extensions: ["js", "json", "coffee"], recurse: true, rename: function(name) { return name; }, visit: function(obj) { return obj; } }; function checkFileInclusion(path2, filename, options) { return new RegExp("\\.(" + options.extensions.join("|") + ")$", "i").test(filename) && !(options.include && options.include instanceof RegExp && !options.include.test(path2)) && !(options.include && typeof options.include === "function" && !options.include(path2, filename)) && !(options.exclude && options.exclude instanceof RegExp && options.exclude.test(path2)) && !(options.exclude && typeof options.exclude === "function" && options.exclude(path2, filename)); } function requireDirectory(m, path2, options) { var retval = {}; if (path2 && !options && typeof path2 !== "string") { options = path2; path2 = null; } options = options || {}; for (var prop in defaultOptions) { if (typeof options[prop] === "undefined") { options[prop] = defaultOptions[prop]; } } path2 = !path2 ? dirname(m.filename) : resolve(dirname(m.filename), path2); fs2.readdirSync(path2).forEach(function(filename) { var joined = join(path2, filename), files, key, obj; if (fs2.statSync(joined).isDirectory() && options.recurse) { files = requireDirectory(m, joined, options); if (Object.keys(files).length) { retval[options.rename(filename, joined, filename)] = files; } } else { if (joined !== m.filename && checkFileInclusion(joined, filename, options)) { key = filename.substring(0, filename.lastIndexOf(".")); obj = m.require(joined); retval[options.rename(key, joined, filename)] = options.visit(obj, joined, filename) || obj; } } }); return retval; } module2.exports = requireDirectory; module2.exports.defaults = defaultOptions; } }); // node_modules/ansi-regex/index.js var require_ansi_regex2 = __commonJS({ "node_modules/ansi-regex/index.js"(exports2, module2) { "use strict"; module2.exports = ({ onlyFirst = false } = {}) => { const pattern = [ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))" ].join("|"); return new RegExp(pattern, onlyFirst ? void 0 : "g"); }; } }); // node_modules/strip-ansi/index.js var require_strip_ansi2 = __commonJS({ "node_modules/strip-ansi/index.js"(exports2, module2) { "use strict"; var ansiRegex = require_ansi_regex2(); module2.exports = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string; } }); // node_modules/string-width/index.js var require_string_width2 = __commonJS({ "node_modules/string-width/index.js"(exports2, module2) { "use strict"; var stripAnsi = require_strip_ansi2(); var isFullwidthCodePoint = require_is_fullwidth_code_point(); var emojiRegex = require_emoji_regex(); var stringWidth = (string) => { if (typeof string !== "string" || string.length === 0) { return 0; } string = stripAnsi(string); if (string.length === 0) { return 0; } string = string.replace(emojiRegex(), " "); let width = 0; for (let i = 0; i < string.length; i++) { const code = string.codePointAt(i); if (code <= 31 || code >= 127 && code <= 159) { continue; } if (code >= 768 && code <= 879) { continue; } if (code > 65535) { i++; } width += isFullwidthCodePoint(code) ? 2 : 1; } return width; }; module2.exports = stringWidth; module2.exports.default = stringWidth; } }); // node_modules/yargs/build/index.cjs var require_build4 = __commonJS({ "node_modules/yargs/build/index.cjs"(exports2, module2) { "use strict"; var t = require("assert"); var e = class extends Error { constructor(t2) { super(t2 || "yargs error"), this.name = "YError", Error.captureStackTrace(this, e); } }; var s; var i = []; function n(t2, o2, a2, h2) { s = h2; let l2 = {}; if (Object.prototype.hasOwnProperty.call(t2, "extends")) { if (typeof t2.extends != "string") return l2; const r2 = /\.json|\..*rc$/.test(t2.extends); let h3 = null; if (r2) h3 = function(t3, e2) { return s.path.resolve(t3, e2); }(o2, t2.extends); else try { h3 = require.resolve(t2.extends); } catch (e2) { return t2; } !function(t3) { if (i.indexOf(t3) > -1) throw new e(`Circular extended configurations: '${t3}'.`); }(h3), i.push(h3), l2 = r2 ? JSON.parse(s.readFileSync(h3, "utf8")) : require(t2.extends), delete t2.extends, l2 = n(l2, s.path.dirname(h3), a2, s); } return i = [], a2 ? r(l2, t2) : Object.assign({}, l2, t2); } function r(t2, e2) { const s2 = {}; function i2(t3) { return t3 && typeof t3 == "object" && !Array.isArray(t3); } Object.assign(s2, t2); for (const n2 of Object.keys(e2)) i2(e2[n2]) && i2(s2[n2]) ? s2[n2] = r(t2[n2], e2[n2]) : s2[n2] = e2[n2]; return s2; } function o(t2) { const e2 = t2.replace(/\s{2,}/g, " ").split(/\s+(?![^[]*]|[^<]*>)/), s2 = /\.*[\][<>]/g, i2 = e2.shift(); if (!i2) throw new Error(`No command found in: ${t2}`); const n2 = { cmd: i2.replace(s2, ""), demanded: [], optional: [] }; return e2.forEach((t3, i3) => { let r2 = false; t3 = t3.replace(/\s/g, ""), /\.+[\]>]/.test(t3) && i3 === e2.length - 1 && (r2 = true), /^\[/.test(t3) ? n2.optional.push({ cmd: t3.replace(s2, "").split("|"), variadic: r2 }) : n2.demanded.push({ cmd: t3.replace(s2, "").split("|"), variadic: r2 }); }), n2; } var a = ["first", "second", "third", "fourth", "fifth", "sixth"]; function h(t2, s2, i2) { try { let n2 = 0; const [r2, a2, h2] = typeof t2 == "object" ? [{ demanded: [], optional: [] }, t2, s2] : [o(`cmd ${t2}`), s2, i2], f2 = [].slice.call(a2); for (; f2.length && f2[f2.length - 1] === void 0; ) f2.pop(); const d2 = h2 || f2.length; if (d2 < r2.demanded.length) throw new e(`Not enough arguments provided. Expected ${r2.demanded.length} but received ${f2.length}.`); const u2 = r2.demanded.length + r2.optional.length; if (d2 > u2) throw new e(`Too many arguments provided. Expected max ${u2} but received ${d2}.`); r2.demanded.forEach((t3) => { const e2 = l(f2.shift()); t3.cmd.filter((t4) => t4 === e2 || t4 === "*").length === 0 && c(e2, t3.cmd, n2), n2 += 1; }), r2.optional.forEach((t3) => { if (f2.length === 0) return; const e2 = l(f2.shift()); t3.cmd.filter((t4) => t4 === e2 || t4 === "*").length === 0 && c(e2, t3.cmd, n2), n2 += 1; }); } catch (t3) { console.warn(t3.stack); } } function l(t2) { return Array.isArray(t2) ? "array" : t2 === null ? "null" : typeof t2; } function c(t2, s2, i2) { throw new e(`Invalid ${a[i2] || "manyith"} argument. Expected ${s2.join(" or ")} but received ${t2}.`); } function f(t2) { return !!t2 && !!t2.then && typeof t2.then == "function"; } function d(t2, e2, s2, i2) { s2.assert.notStrictEqual(t2, e2, i2); } function u(t2, e2) { e2.assert.strictEqual(typeof t2, "string"); } function p(t2) { return Object.keys(t2); } function g(t2 = {}, e2 = () => true) { const s2 = {}; return p(t2).forEach((i2) => { e2(i2, t2[i2]) && (s2[i2] = t2[i2]); }), s2; } function m() { return process.versions.electron && !process.defaultApp ? 0 : 1; } function y() { return process.argv[m()]; } var b = Object.freeze({ __proto__: null, hideBin: function(t2) { return t2.slice(m() + 1); }, getProcessArgvBin: y }); function v(t2, e2, s2, i2) { if (s2 === "a" && !i2) throw new TypeError("Private accessor was defined without a getter"); if (typeof e2 == "function" ? t2 !== e2 || !i2 : !e2.has(t2)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return s2 === "m" ? i2 : s2 === "a" ? i2.call(t2) : i2 ? i2.value : e2.get(t2); } function O(t2, e2, s2, i2, n2) { if (i2 === "m") throw new TypeError("Private method is not writable"); if (i2 === "a" && !n2) throw new TypeError("Private accessor was defined without a setter"); if (typeof e2 == "function" ? t2 !== e2 || !n2 : !e2.has(t2)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return i2 === "a" ? n2.call(t2, s2) : n2 ? n2.value = s2 : e2.set(t2, s2), s2; } var w = class { constructor(t2) { this.globalMiddleware = [], this.frozens = [], this.yargs = t2; } addMiddleware(t2, e2, s2 = true, i2 = false) { if (h(" [boolean] [boolean] [boolean]", [t2, e2, s2], arguments.length), Array.isArray(t2)) { for (let i3 = 0; i3 < t2.length; i3++) { if (typeof t2[i3] != "function") throw Error("middleware must be a function"); const n2 = t2[i3]; n2.applyBeforeValidation = e2, n2.global = s2; } Array.prototype.push.apply(this.globalMiddleware, t2); } else if (typeof t2 == "function") { const n2 = t2; n2.applyBeforeValidation = e2, n2.global = s2, n2.mutates = i2, this.globalMiddleware.push(t2); } return this.yargs; } addCoerceMiddleware(t2, e2) { const s2 = this.yargs.getAliases(); return this.globalMiddleware = this.globalMiddleware.filter((t3) => { const i2 = [...s2[e2] || [], e2]; return !t3.option || !i2.includes(t3.option); }), t2.option = e2, this.addMiddleware(t2, true, true, true); } getMiddleware() { return this.globalMiddleware; } freeze() { this.frozens.push([...this.globalMiddleware]); } unfreeze() { const t2 = this.frozens.pop(); t2 !== void 0 && (this.globalMiddleware = t2); } reset() { this.globalMiddleware = this.globalMiddleware.filter((t2) => t2.global); } }; function C(t2, e2, s2, i2) { return s2.reduce((t3, s3) => { if (s3.applyBeforeValidation !== i2) return t3; if (s3.mutates) { if (s3.applied) return t3; s3.applied = true; } if (f(t3)) return t3.then((t4) => Promise.all([t4, s3(t4, e2)])).then(([t4, e3]) => Object.assign(t4, e3)); { const i3 = s3(t3, e2); return f(i3) ? i3.then((e3) => Object.assign(t3, e3)) : Object.assign(t3, i3); } }, t2); } function j(t2, e2, s2 = (t3) => { throw t3; }) { try { const s3 = typeof t2 == "function" ? t2() : t2; return f(s3) ? s3.then((t3) => e2(t3)) : e2(s3); } catch (t3) { return s2(t3); } } var _ = /(^\*)|(^\$0)/; var M = class { constructor(t2, e2, s2, i2) { this.requireCache = /* @__PURE__ */ new Set(), this.handlers = {}, this.aliasMap = {}, this.frozens = [], this.shim = i2, this.usage = t2, this.globalMiddleware = s2, this.validation = e2; } addDirectory(t2, e2, s2, i2) { typeof (i2 = i2 || {}).recurse != "boolean" && (i2.recurse = false), Array.isArray(i2.extensions) || (i2.extensions = ["js"]); const n2 = typeof i2.visit == "function" ? i2.visit : (t3) => t3; i2.visit = (t3, e3, s3) => { const i3 = n2(t3, e3, s3); if (i3) { if (this.requireCache.has(e3)) return i3; this.requireCache.add(e3), this.addHandler(i3); } return i3; }, this.shim.requireDirectory({ require: e2, filename: s2 }, t2, i2); } addHandler(t2, e2, s2, i2, n2, r2) { let a2 = []; const h2 = function(t3) { return t3 ? t3.map((t4) => (t4.applyBeforeValidation = false, t4)) : []; }(n2); if (i2 = i2 || (() => { }), Array.isArray(t2)) if (function(t3) { return t3.every((t4) => typeof t4 == "string"); }(t2)) [t2, ...a2] = t2; else for (const e3 of t2) this.addHandler(e3); else { if (function(t3) { return typeof t3 == "object" && !Array.isArray(t3); }(t2)) { let e3 = Array.isArray(t2.command) || typeof t2.command == "string" ? t2.command : this.moduleName(t2); return t2.aliases && (e3 = [].concat(e3).concat(t2.aliases)), void this.addHandler(e3, this.extractDesc(t2), t2.builder, t2.handler, t2.middlewares, t2.deprecated); } if (k(s2)) return void this.addHandler([t2].concat(a2), e2, s2.builder, s2.handler, s2.middlewares, s2.deprecated); } if (typeof t2 == "string") { const n3 = o(t2); a2 = a2.map((t3) => o(t3).cmd); let l2 = false; const c2 = [n3.cmd].concat(a2).filter((t3) => !_.test(t3) || (l2 = true, false)); c2.length === 0 && l2 && c2.push("$0"), l2 && (n3.cmd = c2[0], a2 = c2.slice(1), t2 = t2.replace(_, n3.cmd)), a2.forEach((t3) => { this.aliasMap[t3] = n3.cmd; }), e2 !== false && this.usage.command(t2, e2, l2, a2, r2), this.handlers[n3.cmd] = { original: t2, description: e2, handler: i2, builder: s2 || {}, middlewares: h2, deprecated: r2, demanded: n3.demanded, optional: n3.optional }, l2 && (this.defaultCommand = this.handlers[n3.cmd]); } } getCommandHandlers() { return this.handlers; } getCommands() { return Object.keys(this.handlers).concat(Object.keys(this.aliasMap)); } hasDefaultCommand() { return !!this.defaultCommand; } runCommand(t2, e2, s2, i2, n2, r2) { const o2 = this.handlers[t2] || this.handlers[this.aliasMap[t2]] || this.defaultCommand, a2 = e2.getInternalMethods().getContext(), h2 = a2.commands.slice(), l2 = !t2; t2 && (a2.commands.push(t2), a2.fullCommands.push(o2.original)); const c2 = this.applyBuilderUpdateUsageAndParse(l2, o2, e2, s2.aliases, h2, i2, n2, r2); return f(c2) ? c2.then((t3) => this.applyMiddlewareAndGetResult(l2, o2, t3.innerArgv, a2, n2, t3.aliases, e2)) : this.applyMiddlewareAndGetResult(l2, o2, c2.innerArgv, a2, n2, c2.aliases, e2); } applyBuilderUpdateUsageAndParse(t2, e2, s2, i2, n2, r2, o2, a2) { const h2 = e2.builder; let l2 = s2; if (E(h2)) { const c2 = h2(s2.getInternalMethods().reset(i2), a2); if (f(c2)) return c2.then((i3) => { var a3; return l2 = (a3 = i3) && typeof a3.getInternalMethods == "function" ? i3 : s2, this.parseAndUpdateUsage(t2, e2, l2, n2, r2, o2); }); } else (function(t3) { return typeof t3 == "object"; })(h2) && (l2 = s2.getInternalMethods().reset(i2), Object.keys(e2.builder).forEach((t3) => { l2.option(t3, h2[t3]); })); return this.parseAndUpdateUsage(t2, e2, l2, n2, r2, o2); } parseAndUpdateUsage(t2, e2, s2, i2, n2, r2) { t2 && s2.getInternalMethods().getUsageInstance().unfreeze(), this.shouldUpdateUsage(s2) && s2.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(i2, e2), e2.description); const o2 = s2.getInternalMethods().runYargsParserAndExecuteCommands(null, void 0, true, n2, r2); return f(o2) ? o2.then((t3) => ({ aliases: s2.parsed.aliases, innerArgv: t3 })) : { aliases: s2.parsed.aliases, innerArgv: o2 }; } shouldUpdateUsage(t2) { return !t2.getInternalMethods().getUsageInstance().getUsageDisabled() && t2.getInternalMethods().getUsageInstance().getUsage().length === 0; } usageFromParentCommandsCommandHandler(t2, e2) { const s2 = _.test(e2.original) ? e2.original.replace(_, "").trim() : e2.original, i2 = t2.filter((t3) => !_.test(t3)); return i2.push(s2), `$0 ${i2.join(" ")}`; } applyMiddlewareAndGetResult(t2, e2, s2, i2, n2, r2, o2) { let a2 = {}; if (n2) return s2; o2.getInternalMethods().getHasOutput() || (a2 = this.populatePositionals(e2, s2, i2, o2)); const h2 = this.globalMiddleware.getMiddleware().slice(0).concat(e2.middlewares); if (s2 = C(s2, o2, h2, true), !o2.getInternalMethods().getHasOutput()) { const e3 = o2.getInternalMethods().runValidation(r2, a2, o2.parsed.error, t2); s2 = j(s2, (t3) => (e3(t3), t3)); } if (e2.handler && !o2.getInternalMethods().getHasOutput()) { o2.getInternalMethods().setHasOutput(); const i3 = !!o2.getOptions().configuration["populate--"]; o2.getInternalMethods().postProcess(s2, i3, false, false), s2 = j(s2 = C(s2, o2, h2, false), (t3) => { const s3 = e2.handler(t3); return f(s3) ? s3.then(() => t3) : t3; }), t2 || o2.getInternalMethods().getUsageInstance().cacheHelpMessage(), f(s2) && !o2.getInternalMethods().hasParseCallback() && s2.catch((t3) => { try { o2.getInternalMethods().getUsageInstance().fail(null, t3); } catch (t4) { } }); } return t2 || (i2.commands.pop(), i2.fullCommands.pop()), s2; } populatePositionals(t2, e2, s2, i2) { e2._ = e2._.slice(s2.commands.length); const n2 = t2.demanded.slice(0), r2 = t2.optional.slice(0), o2 = {}; for (this.validation.positionalCount(n2.length, e2._.length); n2.length; ) { const t3 = n2.shift(); this.populatePositional(t3, e2, o2); } for (; r2.length; ) { const t3 = r2.shift(); this.populatePositional(t3, e2, o2); } return e2._ = s2.commands.concat(e2._.map((t3) => "" + t3)), this.postProcessPositionals(e2, o2, this.cmdToParseOptions(t2.original), i2), o2; } populatePositional(t2, e2, s2) { const i2 = t2.cmd[0]; t2.variadic ? s2[i2] = e2._.splice(0).map(String) : e2._.length && (s2[i2] = [String(e2._.shift())]); } cmdToParseOptions(t2) { const e2 = { array: [], default: {}, alias: {}, demand: {} }, s2 = o(t2); return s2.demanded.forEach((t3) => { const [s3, ...i2] = t3.cmd; t3.variadic && (e2.array.push(s3), e2.default[s3] = []), e2.alias[s3] = i2, e2.demand[s3] = true; }), s2.optional.forEach((t3) => { const [s3, ...i2] = t3.cmd; t3.variadic && (e2.array.push(s3), e2.default[s3] = []), e2.alias[s3] = i2; }), e2; } postProcessPositionals(t2, e2, s2, i2) { const n2 = Object.assign({}, i2.getOptions()); n2.default = Object.assign(s2.default, n2.default); for (const t3 of Object.keys(s2.alias)) n2.alias[t3] = (n2.alias[t3] || []).concat(s2.alias[t3]); n2.array = n2.array.concat(s2.array), n2.config = {}; const r2 = []; if (Object.keys(e2).forEach((t3) => { e2[t3].map((e3) => { n2.configuration["unknown-options-as-args"] && (n2.key[t3] = true), r2.push(`--${t3}`), r2.push(e3); }); }), !r2.length) return; const o2 = Object.assign({}, n2.configuration, { "populate--": false }), a2 = this.shim.Parser.detailed(r2, Object.assign({}, n2, { configuration: o2 })); if (a2.error) i2.getInternalMethods().getUsageInstance().fail(a2.error.message, a2.error); else { const s3 = Object.keys(e2); Object.keys(e2).forEach((t3) => { s3.push(...a2.aliases[t3]); }); const n3 = i2.getOptions().default; Object.keys(a2.argv).forEach((i3) => { s3.includes(i3) && (e2[i3] || (e2[i3] = a2.argv[i3]), !Object.prototype.hasOwnProperty.call(n3, i3) && Object.prototype.hasOwnProperty.call(t2, i3) && Object.prototype.hasOwnProperty.call(a2.argv, i3) && (Array.isArray(t2[i3]) || Array.isArray(a2.argv[i3])) ? t2[i3] = [].concat(t2[i3], a2.argv[i3]) : t2[i3] = a2.argv[i3]); }); } } runDefaultBuilderOn(t2) { if (!this.defaultCommand) return; if (this.shouldUpdateUsage(t2)) { const e3 = _.test(this.defaultCommand.original) ? this.defaultCommand.original : this.defaultCommand.original.replace(/^[^[\]<>]*/, "$0 "); t2.getInternalMethods().getUsageInstance().usage(e3, this.defaultCommand.description); } const e2 = this.defaultCommand.builder; if (E(e2)) return e2(t2, true); k(e2) || Object.keys(e2).forEach((s2) => { t2.option(s2, e2[s2]); }); } moduleName(t2) { const e2 = function(t3) { if (typeof require == "undefined") return null; for (let e3, s2 = 0, i2 = Object.keys(require.cache); s2 < i2.length; s2++) if (e3 = require.cache[i2[s2]], e3.exports === t3) return e3; return null; }(t2); if (!e2) throw new Error(`No command name given for module: ${this.shim.inspect(t2)}`); return this.commandFromFilename(e2.filename); } commandFromFilename(t2) { return this.shim.path.basename(t2, this.shim.path.extname(t2)); } extractDesc({ describe: t2, description: e2, desc: s2 }) { for (const i2 of [t2, e2, s2]) { if (typeof i2 == "string" || i2 === false) return i2; d(i2, true, this.shim); } return false; } freeze() { this.frozens.push({ handlers: this.handlers, aliasMap: this.aliasMap, defaultCommand: this.defaultCommand }); } unfreeze() { const t2 = this.frozens.pop(); d(t2, void 0, this.shim), { handlers: this.handlers, aliasMap: this.aliasMap, defaultCommand: this.defaultCommand } = t2; } reset() { return this.handlers = {}, this.aliasMap = {}, this.defaultCommand = void 0, this.requireCache = /* @__PURE__ */ new Set(), this; } }; function k(t2) { return typeof t2 == "object" && !!t2.builder && typeof t2.handler == "function"; } function E(t2) { return typeof t2 == "function"; } function x(t2) { typeof process != "undefined" && [process.stdout, process.stderr].forEach((e2) => { const s2 = e2; s2._handle && s2.isTTY && typeof s2._handle.setBlocking == "function" && s2._handle.setBlocking(t2); }); } function A(t2) { return typeof t2 == "boolean"; } function S(t2, s2) { const i2 = s2.y18n.__, n2 = {}, r2 = []; n2.failFn = function(t3) { r2.push(t3); }; let o2 = null, a2 = true; n2.showHelpOnFail = function(t3 = true, e2) { const [s3, i3] = typeof t3 == "string" ? [true, t3] : [t3, e2]; return o2 = i3, a2 = s3, n2; }; let h2 = false; n2.fail = function(s3, i3) { const l3 = t2.getInternalMethods().getLoggerInstance(); if (!r2.length) { if (t2.getExitProcess() && x(true), h2 || (h2 = true, a2 && (t2.showHelp("error"), l3.error()), (s3 || i3) && l3.error(s3 || i3), o2 && ((s3 || i3) && l3.error(""), l3.error(o2))), i3 = i3 || new e(s3), t2.getExitProcess()) return t2.exit(1); if (t2.getInternalMethods().hasParseCallback()) return t2.exit(1, i3); throw i3; } for (let t3 = r2.length - 1; t3 >= 0; --t3) { const e2 = r2[t3]; if (A(e2)) { if (i3) throw i3; if (s3) throw Error(s3); } else e2(s3, i3, n2); } }; let l2 = [], c2 = false; n2.usage = (t3, e2) => t3 === null ? (c2 = true, l2 = [], n2) : (c2 = false, l2.push([t3, e2 || ""]), n2), n2.getUsage = () => l2, n2.getUsageDisabled = () => c2, n2.getPositionalGroupName = () => i2("Positionals:"); let f2 = []; n2.example = (t3, e2) => { f2.push([t3, e2 || ""]); }; let d2 = []; n2.command = function(t3, e2, s3, i3, n3 = false) { s3 && (d2 = d2.map((t4) => (t4[2] = false, t4))), d2.push([t3, e2 || "", s3, i3, n3]); }, n2.getCommands = () => d2; let u2 = {}; n2.describe = function(t3, e2) { Array.isArray(t3) ? t3.forEach((t4) => { n2.describe(t4, e2); }) : typeof t3 == "object" ? Object.keys(t3).forEach((e3) => { n2.describe(e3, t3[e3]); }) : u2[t3] = e2; }, n2.getDescriptions = () => u2; let p2 = []; n2.epilog = (t3) => { p2.push(t3); }; let m2, y2 = false; function b2() { return y2 || (m2 = function() { const t3 = 80; return s2.process.stdColumns ? Math.min(t3, s2.process.stdColumns) : t3; }(), y2 = true), m2; } n2.wrap = (t3) => { y2 = true, m2 = t3; }; const v2 = "__yargsString__:"; function O2(t3, e2, i3) { let n3 = 0; return Array.isArray(t3) || (t3 = Object.values(t3).map((t4) => [t4])), t3.forEach((t4) => { n3 = Math.max(s2.stringWidth(i3 ? `${i3} ${I(t4[0])}` : I(t4[0])) + $(t4[0]), n3); }), e2 && (n3 = Math.min(n3, parseInt((0.5 * e2).toString(), 10))), n3; } let w2; function C2(e2) { return t2.getOptions().hiddenOptions.indexOf(e2) < 0 || t2.parsed.argv[t2.getOptions().showHiddenOpt]; } function j2(t3, e2) { let s3 = `[${i2("default:")} `; if (t3 === void 0 && !e2) return null; if (e2) s3 += e2; else switch (typeof t3) { case "string": s3 += `"${t3}"`; break; case "object": s3 += JSON.stringify(t3); break; default: s3 += t3; } return `${s3}]`; } n2.deferY18nLookup = (t3) => v2 + t3, n2.help = function() { if (w2) return w2; !function() { const e3 = t2.getDemandedOptions(), s3 = t2.getOptions(); (Object.keys(s3.alias) || []).forEach((i3) => { s3.alias[i3].forEach((r4) => { u2[r4] && n2.describe(i3, u2[r4]), r4 in e3 && t2.demandOption(i3, e3[r4]), s3.boolean.includes(r4) && t2.boolean(i3), s3.count.includes(r4) && t2.count(i3), s3.string.includes(r4) && t2.string(i3), s3.normalize.includes(r4) && t2.normalize(i3), s3.array.includes(r4) && t2.array(i3), s3.number.includes(r4) && t2.number(i3); }); }); }(); const e2 = t2.customScriptName ? t2.$0 : s2.path.basename(t2.$0), r3 = t2.getDemandedOptions(), o3 = t2.getDemandedCommands(), a3 = t2.getDeprecatedOptions(), h3 = t2.getGroups(), g2 = t2.getOptions(); let m3 = []; m3 = m3.concat(Object.keys(u2)), m3 = m3.concat(Object.keys(r3)), m3 = m3.concat(Object.keys(o3)), m3 = m3.concat(Object.keys(g2.default)), m3 = m3.filter(C2), m3 = Object.keys(m3.reduce((t3, e3) => (e3 !== "_" && (t3[e3] = true), t3), {})); const y3 = b2(), _3 = s2.cliui({ width: y3, wrap: !!y3 }); if (!c2) { if (l2.length) l2.forEach((t3) => { _3.div({ text: `${t3[0].replace(/\$0/g, e2)}` }), t3[1] && _3.div({ text: `${t3[1]}`, padding: [1, 0, 0, 0] }); }), _3.div(); else if (d2.length) { let t3 = null; t3 = o3._ ? `${e2} <${i2("command")}> ` : `${e2} [${i2("command")}] `, _3.div(`${t3}`); } } if (d2.length > 1 || d2.length === 1 && !d2[0][2]) { _3.div(i2("Commands:")); const s3 = t2.getInternalMethods().getContext(), n3 = s3.commands.length ? `${s3.commands.join(" ")} ` : ""; t2.getInternalMethods().getParserConfiguration()["sort-commands"] === true && (d2 = d2.sort((t3, e3) => t3[0].localeCompare(e3[0]))); const r4 = e2 ? `${e2} ` : ""; d2.forEach((t3) => { const s4 = `${r4}${n3}${t3[0].replace(/^\$0 ?/, "")}`; _3.span({ text: s4, padding: [0, 2, 0, 2], width: O2(d2, y3, `${e2}${n3}`) + 4 }, { text: t3[1] }); const o4 = []; t3[2] && o4.push(`[${i2("default")}]`), t3[3] && t3[3].length && o4.push(`[${i2("aliases:")} ${t3[3].join(", ")}]`), t3[4] && (typeof t3[4] == "string" ? o4.push(`[${i2("deprecated: %s", t3[4])}]`) : o4.push(`[${i2("deprecated")}]`)), o4.length ? _3.div({ text: o4.join(" "), padding: [0, 0, 0, 2], align: "right" }) : _3.div(); }), _3.div(); } const M3 = (Object.keys(g2.alias) || []).concat(Object.keys(t2.parsed.newAliases) || []); m3 = m3.filter((e3) => !t2.parsed.newAliases[e3] && M3.every((t3) => (g2.alias[t3] || []).indexOf(e3) === -1)); const k2 = i2("Options:"); h3[k2] || (h3[k2] = []), function(t3, e3, s3, i3) { let n3 = [], r4 = null; Object.keys(s3).forEach((t4) => { n3 = n3.concat(s3[t4]); }), t3.forEach((t4) => { r4 = [t4].concat(e3[t4]), r4.some((t5) => n3.indexOf(t5) !== -1) || s3[i3].push(t4); }); }(m3, g2.alias, h3, k2); const E2 = (t3) => /^--/.test(I(t3)), x2 = Object.keys(h3).filter((t3) => h3[t3].length > 0).map((t3) => ({ groupName: t3, normalizedKeys: h3[t3].filter(C2).map((t4) => { if (M3.includes(t4)) return t4; for (let e3, s3 = 0; (e3 = M3[s3]) !== void 0; s3++) if ((g2.alias[e3] || []).includes(t4)) return e3; return t4; }) })).filter(({ normalizedKeys: t3 }) => t3.length > 0).map(({ groupName: t3, normalizedKeys: e3 }) => { const s3 = e3.reduce((e4, s4) => (e4[s4] = [s4].concat(g2.alias[s4] || []).map((e5) => t3 === n2.getPositionalGroupName() ? e5 : (/^[0-9]$/.test(e5) ? g2.boolean.includes(s4) ? "-" : "--" : e5.length > 1 ? "--" : "-") + e5).sort((t4, e5) => E2(t4) === E2(e5) ? 0 : E2(t4) ? 1 : -1).join(", "), e4), {}); return { groupName: t3, normalizedKeys: e3, switches: s3 }; }); if (x2.filter(({ groupName: t3 }) => t3 !== n2.getPositionalGroupName()).some(({ normalizedKeys: t3, switches: e3 }) => !t3.every((t4) => E2(e3[t4]))) && x2.filter(({ groupName: t3 }) => t3 !== n2.getPositionalGroupName()).forEach(({ normalizedKeys: t3, switches: e3 }) => { t3.forEach((t4) => { var s3, i3; E2(e3[t4]) && (e3[t4] = (s3 = e3[t4], i3 = "-x, ".length, P(s3) ? { text: s3.text, indentation: s3.indentation + i3 } : { text: s3, indentation: i3 })); }); }), x2.forEach(({ groupName: t3, normalizedKeys: e3, switches: s3 }) => { _3.div(t3), e3.forEach((t4) => { const e4 = s3[t4]; let o4 = u2[t4] || "", h4 = null; o4.includes(v2) && (o4 = i2(o4.substring(v2.length))), g2.boolean.includes(t4) && (h4 = `[${i2("boolean")}]`), g2.count.includes(t4) && (h4 = `[${i2("count")}]`), g2.string.includes(t4) && (h4 = `[${i2("string")}]`), g2.normalize.includes(t4) && (h4 = `[${i2("string")}]`), g2.array.includes(t4) && (h4 = `[${i2("array")}]`), g2.number.includes(t4) && (h4 = `[${i2("number")}]`); const l3 = [t4 in a3 ? (c3 = a3[t4], typeof c3 == "string" ? `[${i2("deprecated: %s", c3)}]` : `[${i2("deprecated")}]`) : null, h4, t4 in r3 ? `[${i2("required")}]` : null, g2.choices && g2.choices[t4] ? `[${i2("choices:")} ${n2.stringifiedValues(g2.choices[t4])}]` : null, j2(g2.default[t4], g2.defaultDescription[t4])].filter(Boolean).join(" "); var c3; _3.span({ text: I(e4), padding: [0, 2, 0, 2 + $(e4)], width: O2(s3, y3) + 4 }, o4), l3 ? _3.div({ text: l3, padding: [0, 0, 0, 2], align: "right" }) : _3.div(); }), _3.div(); }), f2.length && (_3.div(i2("Examples:")), f2.forEach((t3) => { t3[0] = t3[0].replace(/\$0/g, e2); }), f2.forEach((t3) => { t3[1] === "" ? _3.div({ text: t3[0], padding: [0, 2, 0, 2] }) : _3.div({ text: t3[0], padding: [0, 2, 0, 2], width: O2(f2, y3) + 4 }, { text: t3[1] }); }), _3.div()), p2.length > 0) { const t3 = p2.map((t4) => t4.replace(/\$0/g, e2)).join("\n"); _3.div(`${t3} `); } return _3.toString().replace(/\s*$/, ""); }, n2.cacheHelpMessage = function() { w2 = this.help(); }, n2.clearCachedHelpMessage = function() { w2 = void 0; }, n2.hasCachedHelpMessage = function() { return !!w2; }, n2.showHelp = (e2) => { const s3 = t2.getInternalMethods().getLoggerInstance(); e2 || (e2 = "error"); (typeof e2 == "function" ? e2 : s3[e2])(n2.help()); }, n2.functionDescription = (t3) => ["(", t3.name ? s2.Parser.decamelize(t3.name, "-") : i2("generated-value"), ")"].join(""), n2.stringifiedValues = function(t3, e2) { let s3 = ""; const i3 = e2 || ", ", n3 = [].concat(t3); return t3 && n3.length ? (n3.forEach((t4) => { s3.length && (s3 += i3), s3 += JSON.stringify(t4); }), s3) : s3; }; let _2 = null; n2.version = (t3) => { _2 = t3; }, n2.showVersion = (e2) => { const s3 = t2.getInternalMethods().getLoggerInstance(); e2 || (e2 = "error"); (typeof e2 == "function" ? e2 : s3[e2])(_2); }, n2.reset = function(t3) { return o2 = null, h2 = false, l2 = [], c2 = false, p2 = [], f2 = [], d2 = [], u2 = g(u2, (e2) => !t3[e2]), n2; }; const M2 = []; return n2.freeze = function() { M2.push({ failMessage: o2, failureOutput: h2, usages: l2, usageDisabled: c2, epilogs: p2, examples: f2, commands: d2, descriptions: u2 }); }, n2.unfreeze = function() { const t3 = M2.pop(); t3 && ({ failMessage: o2, failureOutput: h2, usages: l2, usageDisabled: c2, epilogs: p2, examples: f2, commands: d2, descriptions: u2 } = t3); }, n2; } function P(t2) { return typeof t2 == "object"; } function $(t2) { return P(t2) ? t2.indentation : 0; } function I(t2) { return P(t2) ? t2.text : t2; } var D = class { constructor(t2, e2, s2, i2) { var n2, r2, o2; this.yargs = t2, this.usage = e2, this.command = s2, this.shim = i2, this.completionKey = "get-yargs-completions", this.aliases = null, this.customCompletionFunction = null, this.zshShell = (o2 = ((n2 = this.shim.getEnv("SHELL")) === null || n2 === void 0 ? void 0 : n2.includes("zsh")) || ((r2 = this.shim.getEnv("ZSH_NAME")) === null || r2 === void 0 ? void 0 : r2.includes("zsh"))) !== null && o2 !== void 0 && o2; } defaultCompletion(t2, e2, s2, i2) { const n2 = this.command.getCommandHandlers(); for (let e3 = 0, s3 = t2.length; e3 < s3; ++e3) if (n2[t2[e3]] && n2[t2[e3]].builder) { const s4 = n2[t2[e3]].builder; if (E(s4)) { const t3 = this.yargs.getInternalMethods().reset(); return s4(t3, true), t3.argv; } } const r2 = []; this.commandCompletions(r2, t2, s2), this.optionCompletions(r2, t2, e2, s2), this.choicesCompletions(r2, t2, e2, s2), i2(null, r2); } commandCompletions(t2, e2, s2) { const i2 = this.yargs.getInternalMethods().getContext().commands; s2.match(/^-/) || i2[i2.length - 1] === s2 || this.previousArgHasChoices(e2) || this.usage.getCommands().forEach((s3) => { const i3 = o(s3[0]).cmd; if (e2.indexOf(i3) === -1) if (this.zshShell) { const e3 = s3[1] || ""; t2.push(i3.replace(/:/g, "\\:") + ":" + e3); } else t2.push(i3); }); } optionCompletions(t2, e2, s2, i2) { if ((i2.match(/^-/) || i2 === "" && t2.length === 0) && !this.previousArgHasChoices(e2)) { const n2 = this.yargs.getOptions(), r2 = this.yargs.getGroups()[this.usage.getPositionalGroupName()] || []; Object.keys(n2.key).forEach((o2) => { const a2 = !!n2.configuration["boolean-negation"] && n2.boolean.includes(o2); r2.includes(o2) || this.argsContainKey(e2, s2, o2, a2) || (this.completeOptionKey(o2, t2, i2), a2 && n2.default[o2] && this.completeOptionKey(`no-${o2}`, t2, i2)); }); } } choicesCompletions(t2, e2, s2, i2) { if (this.previousArgHasChoices(e2)) { const s3 = this.getPreviousArgChoices(e2); s3 && s3.length > 0 && t2.push(...s3); } } getPreviousArgChoices(t2) { if (t2.length < 1) return; let e2 = t2[t2.length - 1], s2 = ""; if (!e2.startsWith("--") && t2.length > 1 && (s2 = e2, e2 = t2[t2.length - 2]), !e2.startsWith("--")) return; const i2 = e2.replace(/-/g, ""), n2 = this.yargs.getOptions(); return Object.keys(n2.key).some((t3) => t3 === i2) && Array.isArray(n2.choices[i2]) ? n2.choices[i2].filter((t3) => !s2 || t3.startsWith(s2)) : void 0; } previousArgHasChoices(t2) { const e2 = this.getPreviousArgChoices(t2); return e2 !== void 0 && e2.length > 0; } argsContainKey(t2, e2, s2, i2) { if (t2.indexOf(`--${s2}`) !== -1) return true; if (i2 && t2.indexOf(`--no-${s2}`) !== -1) return true; if (this.aliases) { for (const t3 of this.aliases[s2]) if (e2[t3] !== void 0) return true; } return false; } completeOptionKey(t2, e2, s2) { const i2 = this.usage.getDescriptions(), n2 = !/^--/.test(s2) && ((t3) => /^[^0-9]$/.test(t3))(t2) ? "-" : "--"; if (this.zshShell) { const s3 = i2[t2] || ""; e2.push(n2 + `${t2.replace(/:/g, "\\:")}:${s3.replace("__yargsString__:", "")}`); } else e2.push(n2 + t2); } customCompletion(t2, e2, s2, i2) { if (d(this.customCompletionFunction, null, this.shim), this.customCompletionFunction.length < 3) { const t3 = this.customCompletionFunction(s2, e2); return f(t3) ? t3.then((t4) => { this.shim.process.nextTick(() => { i2(null, t4); }); }).catch((t4) => { this.shim.process.nextTick(() => { i2(t4, void 0); }); }) : i2(null, t3); } return function(t3) { return t3.length > 3; }(this.customCompletionFunction) ? this.customCompletionFunction(s2, e2, (n2 = i2) => this.defaultCompletion(t2, e2, s2, n2), (t3) => { i2(null, t3); }) : this.customCompletionFunction(s2, e2, (t3) => { i2(null, t3); }); } getCompletion(t2, e2) { const s2 = t2.length ? t2[t2.length - 1] : "", i2 = this.yargs.parse(t2, true), n2 = this.customCompletionFunction ? (i3) => this.customCompletion(t2, i3, s2, e2) : (i3) => this.defaultCompletion(t2, i3, s2, e2); return f(i2) ? i2.then(n2) : n2(i2); } generateCompletionScript(t2, e2) { let s2 = this.zshShell ? `#compdef {{app_name}} ###-begin-{{app_name}}-completions-### # # yargs command completion script # # Installation: {{app_path}} {{completion_command}} >> ~/.zshrc # or {{app_path}} {{completion_command}} >> ~/.zsh_profile on OSX. # _{{app_name}}_yargs_completions() { local reply local si=$IFS IFS=$' ' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}")) IFS=$si _describe 'values' reply } compdef _{{app_name}}_yargs_completions {{app_name}} ###-end-{{app_name}}-completions-### ` : '###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc\n# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local cur_word args type_list\n\n cur_word="${COMP_WORDS[COMP_CWORD]}"\n args=("${COMP_WORDS[@]}")\n\n # ask yargs to generate completions.\n type_list=$({{app_path}} --get-yargs-completions "${args[@]}")\n\n COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) )\n\n # if no match was found, fall back to filename completion\n if [ ${#COMPREPLY[@]} -eq 0 ]; then\n COMPREPLY=()\n fi\n\n return 0\n}\ncomplete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n'; const i2 = this.shim.path.basename(t2); return t2.match(/\.js$/) && (t2 = `./${t2}`), s2 = s2.replace(/{{app_name}}/g, i2), s2 = s2.replace(/{{completion_command}}/g, e2), s2.replace(/{{app_path}}/g, t2); } registerFunction(t2) { this.customCompletionFunction = t2; } setParsed(t2) { this.aliases = t2.aliases; } }; function N(t2, e2) { if (t2.length === 0) return e2.length; if (e2.length === 0) return t2.length; const s2 = []; let i2, n2; for (i2 = 0; i2 <= e2.length; i2++) s2[i2] = [i2]; for (n2 = 0; n2 <= t2.length; n2++) s2[0][n2] = n2; for (i2 = 1; i2 <= e2.length; i2++) for (n2 = 1; n2 <= t2.length; n2++) e2.charAt(i2 - 1) === t2.charAt(n2 - 1) ? s2[i2][n2] = s2[i2 - 1][n2 - 1] : i2 > 1 && n2 > 1 && e2.charAt(i2 - 2) === t2.charAt(n2 - 1) && e2.charAt(i2 - 1) === t2.charAt(n2 - 2) ? s2[i2][n2] = s2[i2 - 2][n2 - 2] + 1 : s2[i2][n2] = Math.min(s2[i2 - 1][n2 - 1] + 1, Math.min(s2[i2][n2 - 1] + 1, s2[i2 - 1][n2] + 1)); return s2[e2.length][t2.length]; } var H = ["$0", "--", "_"]; var z; var q; var W; var U; var F; var L; var V; var T; var R; var G; var K; var B; var Y; var J; var Z; var X; var Q; var tt; var et; var st; var it; var nt; var rt; var ot; var at; var ht; var lt; var ct; var ft; var dt; var ut; var pt; var gt; var mt = Symbol("copyDoubleDash"); var yt = Symbol("copyDoubleDash"); var bt = Symbol("deleteFromParserHintObject"); var vt = Symbol("emitWarning"); var Ot = Symbol("freeze"); var wt = Symbol("getDollarZero"); var Ct = Symbol("getParserConfiguration"); var jt = Symbol("guessLocale"); var _t = Symbol("guessVersion"); var Mt = Symbol("parsePositionalNumbers"); var kt = Symbol("pkgUp"); var Et = Symbol("populateParserHintArray"); var xt = Symbol("populateParserHintSingleValueDictionary"); var At = Symbol("populateParserHintArrayDictionary"); var St = Symbol("populateParserHintDictionary"); var Pt = Symbol("sanitizeKey"); var $t = Symbol("setKey"); var It = Symbol("unfreeze"); var Dt = Symbol("validateAsync"); var Nt = Symbol("getCommandInstance"); var Ht = Symbol("getContext"); var zt = Symbol("getHasOutput"); var qt = Symbol("getLoggerInstance"); var Wt = Symbol("getParseContext"); var Ut = Symbol("getUsageInstance"); var Ft = Symbol("getValidationInstance"); var Lt = Symbol("hasParseCallback"); var Vt = Symbol("postProcess"); var Tt = Symbol("rebase"); var Rt = Symbol("reset"); var Gt = Symbol("runYargsParserAndExecuteCommands"); var Kt = Symbol("runValidation"); var Bt = Symbol("setHasOutput"); var Yt = Symbol("kTrackManuallySetKeys"); var Jt = class { constructor(t2 = [], e2, s2, i2) { this.customScriptName = false, this.parsed = false, z.set(this, void 0), q.set(this, void 0), W.set(this, { commands: [], fullCommands: [] }), U.set(this, null), F.set(this, null), L.set(this, "show-hidden"), V.set(this, null), T.set(this, true), R.set(this, {}), G.set(this, true), K.set(this, []), B.set(this, void 0), Y.set(this, {}), J.set(this, false), Z.set(this, null), X.set(this, void 0), Q.set(this, ""), tt.set(this, void 0), et.set(this, void 0), st.set(this, {}), it.set(this, null), nt.set(this, null), rt.set(this, {}), ot.set(this, {}), at.set(this, void 0), ht.set(this, false), lt.set(this, void 0), ct.set(this, false), ft.set(this, false), dt.set(this, false), ut.set(this, void 0), pt.set(this, null), gt.set(this, void 0), O(this, lt, i2, "f"), O(this, at, t2, "f"), O(this, q, e2, "f"), O(this, et, s2, "f"), O(this, B, new w(this), "f"), this.$0 = this[wt](), this[Rt](), O(this, z, v(this, z, "f"), "f"), O(this, ut, v(this, ut, "f"), "f"), O(this, gt, v(this, gt, "f"), "f"), O(this, tt, v(this, tt, "f"), "f"), v(this, tt, "f").showHiddenOpt = v(this, L, "f"), O(this, X, this[yt](), "f"); } addHelpOpt(t2, e2) { return h("[string|boolean] [string]", [t2, e2], arguments.length), v(this, Z, "f") && (this[bt](v(this, Z, "f")), O(this, Z, null, "f")), t2 === false && e2 === void 0 || (O(this, Z, typeof t2 == "string" ? t2 : "help", "f"), this.boolean(v(this, Z, "f")), this.describe(v(this, Z, "f"), e2 || v(this, ut, "f").deferY18nLookup("Show help"))), this; } help(t2, e2) { return this.addHelpOpt(t2, e2); } addShowHiddenOpt(t2, e2) { if (h("[string|boolean] [string]", [t2, e2], arguments.length), t2 === false && e2 === void 0) return this; const s2 = typeof t2 == "string" ? t2 : v(this, L, "f"); return this.boolean(s2), this.describe(s2, e2 || v(this, ut, "f").deferY18nLookup("Show hidden options")), v(this, tt, "f").showHiddenOpt = s2, this; } showHidden(t2, e2) { return this.addShowHiddenOpt(t2, e2); } alias(t2, e2) { return h(" [string|array]", [t2, e2], arguments.length), this[At](this.alias.bind(this), "alias", t2, e2), this; } array(t2) { return h("", [t2], arguments.length), this[Et]("array", t2), this[Yt](t2), this; } boolean(t2) { return h("", [t2], arguments.length), this[Et]("boolean", t2), this[Yt](t2), this; } check(t2, e2) { return h(" [boolean]", [t2, e2], arguments.length), this.middleware((e3, s2) => j(() => t2(e3, s2.getOptions()), (s3) => (s3 ? (typeof s3 == "string" || s3 instanceof Error) && v(this, ut, "f").fail(s3.toString(), s3) : v(this, ut, "f").fail(v(this, lt, "f").y18n.__("Argument check failed: %s", t2.toString())), e3), (t3) => (v(this, ut, "f").fail(t3.message ? t3.message : t3.toString(), t3), e3)), false, e2), this; } choices(t2, e2) { return h(" [string|array]", [t2, e2], arguments.length), this[At](this.choices.bind(this), "choices", t2, e2), this; } coerce(t2, s2) { if (h(" [function]", [t2, s2], arguments.length), Array.isArray(t2)) { if (!s2) throw new e("coerce callback must be provided"); for (const e2 of t2) this.coerce(e2, s2); return this; } if (typeof t2 == "object") { for (const e2 of Object.keys(t2)) this.coerce(e2, t2[e2]); return this; } if (!s2) throw new e("coerce callback must be provided"); return v(this, tt, "f").key[t2] = true, v(this, B, "f").addCoerceMiddleware((i2, n2) => { let r2; return j(() => (r2 = n2.getAliases(), s2(i2[t2])), (e2) => { if (i2[t2] = e2, r2[t2]) for (const s3 of r2[t2]) i2[s3] = e2; return i2; }, (t3) => { throw new e(t3.message); }); }, t2), this; } conflicts(t2, e2) { return h(" [string|array]", [t2, e2], arguments.length), v(this, gt, "f").conflicts(t2, e2), this; } config(t2 = "config", e2, s2) { return h("[object|string] [string|function] [function]", [t2, e2, s2], arguments.length), typeof t2 != "object" || Array.isArray(t2) ? (typeof e2 == "function" && (s2 = e2, e2 = void 0), this.describe(t2, e2 || v(this, ut, "f").deferY18nLookup("Path to JSON config file")), (Array.isArray(t2) ? t2 : [t2]).forEach((t3) => { v(this, tt, "f").config[t3] = s2 || true; }), this) : (t2 = n(t2, v(this, q, "f"), this[Ct]()["deep-merge-config"] || false, v(this, lt, "f")), v(this, tt, "f").configObjects = (v(this, tt, "f").configObjects || []).concat(t2), this); } completion(t2, e2, s2) { return h("[string] [string|boolean|function] [function]", [t2, e2, s2], arguments.length), typeof e2 == "function" && (s2 = e2, e2 = void 0), O(this, F, t2 || v(this, F, "f") || "completion", "f"), e2 || e2 === false || (e2 = "generate completion script"), this.command(v(this, F, "f"), e2), s2 && v(this, U, "f").registerFunction(s2), this; } command(t2, e2, s2, i2, n2, r2) { return h(" [string|boolean] [function|object] [function] [array] [boolean|string]", [t2, e2, s2, i2, n2, r2], arguments.length), v(this, z, "f").addHandler(t2, e2, s2, i2, n2, r2), this; } commands(t2, e2, s2, i2, n2, r2) { return this.command(t2, e2, s2, i2, n2, r2); } commandDir(t2, e2) { h(" [object]", [t2, e2], arguments.length); const s2 = v(this, et, "f") || v(this, lt, "f").require; return v(this, z, "f").addDirectory(t2, s2, v(this, lt, "f").getCallerFile(), e2), this; } count(t2) { return h("", [t2], arguments.length), this[Et]("count", t2), this[Yt](t2), this; } default(t2, e2, s2) { return h(" [*] [string]", [t2, e2, s2], arguments.length), s2 && (u(t2, v(this, lt, "f")), v(this, tt, "f").defaultDescription[t2] = s2), typeof e2 == "function" && (u(t2, v(this, lt, "f")), v(this, tt, "f").defaultDescription[t2] || (v(this, tt, "f").defaultDescription[t2] = v(this, ut, "f").functionDescription(e2)), e2 = e2.call()), this[xt](this.default.bind(this), "default", t2, e2), this; } defaults(t2, e2, s2) { return this.default(t2, e2, s2); } demandCommand(t2 = 1, e2, s2, i2) { return h("[number] [number|string] [string|null|undefined] [string|null|undefined]", [t2, e2, s2, i2], arguments.length), typeof e2 != "number" && (s2 = e2, e2 = 1 / 0), this.global("_", false), v(this, tt, "f").demandedCommands._ = { min: t2, max: e2, minMsg: s2, maxMsg: i2 }, this; } demand(t2, e2, s2) { return Array.isArray(e2) ? (e2.forEach((t3) => { d(s2, true, v(this, lt, "f")), this.demandOption(t3, s2); }), e2 = 1 / 0) : typeof e2 != "number" && (s2 = e2, e2 = 1 / 0), typeof t2 == "number" ? (d(s2, true, v(this, lt, "f")), this.demandCommand(t2, e2, s2, s2)) : Array.isArray(t2) ? t2.forEach((t3) => { d(s2, true, v(this, lt, "f")), this.demandOption(t3, s2); }) : typeof s2 == "string" ? this.demandOption(t2, s2) : s2 !== true && s2 !== void 0 || this.demandOption(t2), this; } demandOption(t2, e2) { return h(" [string]", [t2, e2], arguments.length), this[xt](this.demandOption.bind(this), "demandedOptions", t2, e2), this; } deprecateOption(t2, e2) { return h(" [string|boolean]", [t2, e2], arguments.length), v(this, tt, "f").deprecatedOptions[t2] = e2, this; } describe(t2, e2) { return h(" [string]", [t2, e2], arguments.length), this[$t](t2, true), v(this, ut, "f").describe(t2, e2), this; } detectLocale(t2) { return h("", [t2], arguments.length), O(this, T, t2, "f"), this; } env(t2) { return h("[string|boolean]", [t2], arguments.length), t2 === false ? delete v(this, tt, "f").envPrefix : v(this, tt, "f").envPrefix = t2 || "", this; } epilogue(t2) { return h("", [t2], arguments.length), v(this, ut, "f").epilog(t2), this; } epilog(t2) { return this.epilogue(t2); } example(t2, e2) { return h(" [string]", [t2, e2], arguments.length), Array.isArray(t2) ? t2.forEach((t3) => this.example(...t3)) : v(this, ut, "f").example(t2, e2), this; } exit(t2, e2) { O(this, J, true, "f"), O(this, V, e2, "f"), v(this, G, "f") && v(this, lt, "f").process.exit(t2); } exitProcess(t2 = true) { return h("[boolean]", [t2], arguments.length), O(this, G, t2, "f"), this; } fail(t2) { if (h("", [t2], arguments.length), typeof t2 == "boolean" && t2 !== false) throw new e("Invalid first argument. Expected function or boolean 'false'"); return v(this, ut, "f").failFn(t2), this; } getAliases() { return this.parsed ? this.parsed.aliases : {}; } async getCompletion(t2, e2) { return h(" [function]", [t2, e2], arguments.length), e2 ? v(this, U, "f").getCompletion(t2, e2) : new Promise((e3, s2) => { v(this, U, "f").getCompletion(t2, (t3, i2) => { t3 ? s2(t3) : e3(i2); }); }); } getDemandedOptions() { return h([], 0), v(this, tt, "f").demandedOptions; } getDemandedCommands() { return h([], 0), v(this, tt, "f").demandedCommands; } getDeprecatedOptions() { return h([], 0), v(this, tt, "f").deprecatedOptions; } getDetectLocale() { return v(this, T, "f"); } getExitProcess() { return v(this, G, "f"); } getGroups() { return Object.assign({}, v(this, Y, "f"), v(this, ot, "f")); } getHelp() { if (O(this, J, true, "f"), !v(this, ut, "f").hasCachedHelpMessage()) { if (!this.parsed) { const t3 = this[Gt](v(this, at, "f"), void 0, void 0, 0, true); if (f(t3)) return t3.then(() => v(this, ut, "f").help()); } const t2 = v(this, z, "f").runDefaultBuilderOn(this); if (f(t2)) return t2.then(() => v(this, ut, "f").help()); } return Promise.resolve(v(this, ut, "f").help()); } getOptions() { return v(this, tt, "f"); } getStrict() { return v(this, ct, "f"); } getStrictCommands() { return v(this, ft, "f"); } getStrictOptions() { return v(this, dt, "f"); } global(t2, e2) { return h(" [boolean]", [t2, e2], arguments.length), t2 = [].concat(t2), e2 !== false ? v(this, tt, "f").local = v(this, tt, "f").local.filter((e3) => t2.indexOf(e3) === -1) : t2.forEach((t3) => { v(this, tt, "f").local.includes(t3) || v(this, tt, "f").local.push(t3); }), this; } group(t2, e2) { h(" ", [t2, e2], arguments.length); const s2 = v(this, ot, "f")[e2] || v(this, Y, "f")[e2]; v(this, ot, "f")[e2] && delete v(this, ot, "f")[e2]; const i2 = {}; return v(this, Y, "f")[e2] = (s2 || []).concat(t2).filter((t3) => !i2[t3] && (i2[t3] = true)), this; } hide(t2) { return h("", [t2], arguments.length), v(this, tt, "f").hiddenOptions.push(t2), this; } implies(t2, e2) { return h(" [number|string|array]", [t2, e2], arguments.length), v(this, gt, "f").implies(t2, e2), this; } locale(t2) { return h("[string]", [t2], arguments.length), t2 ? (O(this, T, false, "f"), v(this, lt, "f").y18n.setLocale(t2), this) : (this[jt](), v(this, lt, "f").y18n.getLocale()); } middleware(t2, e2, s2) { return v(this, B, "f").addMiddleware(t2, !!e2, s2); } nargs(t2, e2) { return h(" [number]", [t2, e2], arguments.length), this[xt](this.nargs.bind(this), "narg", t2, e2), this; } normalize(t2) { return h("", [t2], arguments.length), this[Et]("normalize", t2), this; } number(t2) { return h("", [t2], arguments.length), this[Et]("number", t2), this[Yt](t2), this; } option(t2, e2) { if (h(" [object]", [t2, e2], arguments.length), typeof t2 == "object") Object.keys(t2).forEach((e3) => { this.options(e3, t2[e3]); }); else { typeof e2 != "object" && (e2 = {}), this[Yt](t2), !v(this, pt, "f") || t2 !== "version" && (e2 == null ? void 0 : e2.alias) !== "version" || this[vt](['"version" is a reserved word.', "Please do one of the following:", '- Disable version with `yargs.version(false)` if using "version" as an option', "- Use the built-in `yargs.version` method instead (if applicable)", "- Use a different option key", "https://yargs.js.org/docs/#api-reference-version"].join("\n"), void 0, "versionWarning"), v(this, tt, "f").key[t2] = true, e2.alias && this.alias(t2, e2.alias); const s2 = e2.deprecate || e2.deprecated; s2 && this.deprecateOption(t2, s2); const i2 = e2.demand || e2.required || e2.require; i2 && this.demand(t2, i2), e2.demandOption && this.demandOption(t2, typeof e2.demandOption == "string" ? e2.demandOption : void 0), e2.conflicts && this.conflicts(t2, e2.conflicts), "default" in e2 && this.default(t2, e2.default), e2.implies !== void 0 && this.implies(t2, e2.implies), e2.nargs !== void 0 && this.nargs(t2, e2.nargs), e2.config && this.config(t2, e2.configParser), e2.normalize && this.normalize(t2), e2.choices && this.choices(t2, e2.choices), e2.coerce && this.coerce(t2, e2.coerce), e2.group && this.group(t2, e2.group), (e2.boolean || e2.type === "boolean") && (this.boolean(t2), e2.alias && this.boolean(e2.alias)), (e2.array || e2.type === "array") && (this.array(t2), e2.alias && this.array(e2.alias)), (e2.number || e2.type === "number") && (this.number(t2), e2.alias && this.number(e2.alias)), (e2.string || e2.type === "string") && (this.string(t2), e2.alias && this.string(e2.alias)), (e2.count || e2.type === "count") && this.count(t2), typeof e2.global == "boolean" && this.global(t2, e2.global), e2.defaultDescription && (v(this, tt, "f").defaultDescription[t2] = e2.defaultDescription), e2.skipValidation && this.skipValidation(t2); const n2 = e2.describe || e2.description || e2.desc; this.describe(t2, n2), e2.hidden && this.hide(t2), e2.requiresArg && this.requiresArg(t2); } return this; } options(t2, e2) { return this.option(t2, e2); } parse(t2, e2, s2) { h("[string|array] [function|boolean|object] [function]", [t2, e2, s2], arguments.length), this[Ot](), t2 === void 0 && (t2 = v(this, at, "f")), typeof e2 == "object" && (O(this, nt, e2, "f"), e2 = s2), typeof e2 == "function" && (O(this, it, e2, "f"), e2 = false), e2 || O(this, at, t2, "f"), v(this, it, "f") && O(this, G, false, "f"); const i2 = this[Gt](t2, !!e2), n2 = this.parsed; return v(this, U, "f").setParsed(this.parsed), f(i2) ? i2.then((t3) => (v(this, it, "f") && v(this, it, "f").call(this, v(this, V, "f"), t3, v(this, Q, "f")), t3)).catch((t3) => { throw v(this, it, "f") && v(this, it, "f")(t3, this.parsed.argv, v(this, Q, "f")), t3; }).finally(() => { this[It](), this.parsed = n2; }) : (v(this, it, "f") && v(this, it, "f").call(this, v(this, V, "f"), i2, v(this, Q, "f")), this[It](), this.parsed = n2, i2); } parseAsync(t2, e2, s2) { const i2 = this.parse(t2, e2, s2); return f(i2) ? i2 : Promise.resolve(i2); } parseSync(t2, s2, i2) { const n2 = this.parse(t2, s2, i2); if (f(n2)) throw new e(".parseSync() must not be used with asynchronous builders, handlers, or middleware"); return n2; } parserConfiguration(t2) { return h("", [t2], arguments.length), O(this, st, t2, "f"), this; } pkgConf(t2, e2) { h(" [string]", [t2, e2], arguments.length); let s2 = null; const i2 = this[kt](e2 || v(this, q, "f")); return i2[t2] && typeof i2[t2] == "object" && (s2 = n(i2[t2], e2 || v(this, q, "f"), this[Ct]()["deep-merge-config"] || false, v(this, lt, "f")), v(this, tt, "f").configObjects = (v(this, tt, "f").configObjects || []).concat(s2)), this; } positional(t2, e2) { h(" ", [t2, e2], arguments.length); const s2 = ["default", "defaultDescription", "implies", "normalize", "choices", "conflicts", "coerce", "type", "describe", "desc", "description", "alias"]; e2 = g(e2, (t3, e3) => !(t3 === "type" && !["string", "number", "boolean"].includes(e3)) && s2.includes(t3)); const i2 = v(this, W, "f").fullCommands[v(this, W, "f").fullCommands.length - 1], n2 = i2 ? v(this, z, "f").cmdToParseOptions(i2) : { array: [], alias: {}, default: {}, demand: {} }; return p(n2).forEach((s3) => { const i3 = n2[s3]; Array.isArray(i3) ? i3.indexOf(t2) !== -1 && (e2[s3] = true) : i3[t2] && !(s3 in e2) && (e2[s3] = i3[t2]); }), this.group(t2, v(this, ut, "f").getPositionalGroupName()), this.option(t2, e2); } recommendCommands(t2 = true) { return h("[boolean]", [t2], arguments.length), O(this, ht, t2, "f"), this; } required(t2, e2, s2) { return this.demand(t2, e2, s2); } require(t2, e2, s2) { return this.demand(t2, e2, s2); } requiresArg(t2) { return h(" [number]", [t2], arguments.length), typeof t2 == "string" && v(this, tt, "f").narg[t2] || this[xt](this.requiresArg.bind(this), "narg", t2, NaN), this; } showCompletionScript(t2, e2) { return h("[string] [string]", [t2, e2], arguments.length), t2 = t2 || this.$0, v(this, X, "f").log(v(this, U, "f").generateCompletionScript(t2, e2 || v(this, F, "f") || "completion")), this; } showHelp(t2) { if (h("[string|function]", [t2], arguments.length), O(this, J, true, "f"), !v(this, ut, "f").hasCachedHelpMessage()) { if (!this.parsed) { const e3 = this[Gt](v(this, at, "f"), void 0, void 0, 0, true); if (f(e3)) return e3.then(() => { v(this, ut, "f").showHelp(t2); }), this; } const e2 = v(this, z, "f").runDefaultBuilderOn(this); if (f(e2)) return e2.then(() => { v(this, ut, "f").showHelp(t2); }), this; } return v(this, ut, "f").showHelp(t2), this; } scriptName(t2) { return this.customScriptName = true, this.$0 = t2, this; } showHelpOnFail(t2, e2) { return h("[boolean|string] [string]", [t2, e2], arguments.length), v(this, ut, "f").showHelpOnFail(t2, e2), this; } showVersion(t2) { return h("[string|function]", [t2], arguments.length), v(this, ut, "f").showVersion(t2), this; } skipValidation(t2) { return h("", [t2], arguments.length), this[Et]("skipValidation", t2), this; } strict(t2) { return h("[boolean]", [t2], arguments.length), O(this, ct, t2 !== false, "f"), this; } strictCommands(t2) { return h("[boolean]", [t2], arguments.length), O(this, ft, t2 !== false, "f"), this; } strictOptions(t2) { return h("[boolean]", [t2], arguments.length), O(this, dt, t2 !== false, "f"), this; } string(t2) { return h("", [t2], arguments.length), this[Et]("string", t2), this[Yt](t2), this; } terminalWidth() { return h([], 0), v(this, lt, "f").process.stdColumns; } updateLocale(t2) { return this.updateStrings(t2); } updateStrings(t2) { return h("", [t2], arguments.length), O(this, T, false, "f"), v(this, lt, "f").y18n.updateLocale(t2), this; } usage(t2, s2, i2, n2) { if (h(" [string|boolean] [function|object] [function]", [t2, s2, i2, n2], arguments.length), s2 !== void 0) { if (d(t2, null, v(this, lt, "f")), (t2 || "").match(/^\$0( |$)/)) return this.command(t2, s2, i2, n2); throw new e(".usage() description must start with $0 if being used as alias for .command()"); } return v(this, ut, "f").usage(t2), this; } version(t2, e2, s2) { const i2 = "version"; if (h("[boolean|string] [string] [string]", [t2, e2, s2], arguments.length), v(this, pt, "f") && (this[bt](v(this, pt, "f")), v(this, ut, "f").version(void 0), O(this, pt, null, "f")), arguments.length === 0) s2 = this[_t](), t2 = i2; else if (arguments.length === 1) { if (t2 === false) return this; s2 = t2, t2 = i2; } else arguments.length === 2 && (s2 = e2, e2 = void 0); return O(this, pt, typeof t2 == "string" ? t2 : i2, "f"), e2 = e2 || v(this, ut, "f").deferY18nLookup("Show version number"), v(this, ut, "f").version(s2 || void 0), this.boolean(v(this, pt, "f")), this.describe(v(this, pt, "f"), e2), this; } wrap(t2) { return h("", [t2], arguments.length), v(this, ut, "f").wrap(t2), this; } [(z = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), st = /* @__PURE__ */ new WeakMap(), it = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), rt = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), ht = /* @__PURE__ */ new WeakMap(), lt = /* @__PURE__ */ new WeakMap(), ct = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakMap(), pt = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakMap(), mt)](t2) { if (!t2._ || !t2["--"]) return t2; t2._.push.apply(t2._, t2["--"]); try { delete t2["--"]; } catch (t3) { } return t2; } [yt]() { return { log: (...t2) => { this[Lt]() || console.log(...t2), O(this, J, true, "f"), v(this, Q, "f").length && O(this, Q, v(this, Q, "f") + "\n", "f"), O(this, Q, v(this, Q, "f") + t2.join(" "), "f"); }, error: (...t2) => { this[Lt]() || console.error(...t2), O(this, J, true, "f"), v(this, Q, "f").length && O(this, Q, v(this, Q, "f") + "\n", "f"), O(this, Q, v(this, Q, "f") + t2.join(" "), "f"); } }; } [bt](t2) { p(v(this, tt, "f")).forEach((e2) => { if (e2 === "configObjects") return; const s2 = v(this, tt, "f")[e2]; Array.isArray(s2) ? s2.includes(t2) && s2.splice(s2.indexOf(t2), 1) : typeof s2 == "object" && delete s2[t2]; }), delete v(this, ut, "f").getDescriptions()[t2]; } [vt](t2, e2, s2) { v(this, R, "f")[s2] || (v(this, lt, "f").process.emitWarning(t2, e2), v(this, R, "f")[s2] = true); } [Ot]() { v(this, K, "f").push({ options: v(this, tt, "f"), configObjects: v(this, tt, "f").configObjects.slice(0), exitProcess: v(this, G, "f"), groups: v(this, Y, "f"), strict: v(this, ct, "f"), strictCommands: v(this, ft, "f"), strictOptions: v(this, dt, "f"), completionCommand: v(this, F, "f"), output: v(this, Q, "f"), exitError: v(this, V, "f"), hasOutput: v(this, J, "f"), parsed: this.parsed, parseFn: v(this, it, "f"), parseContext: v(this, nt, "f") }), v(this, ut, "f").freeze(), v(this, gt, "f").freeze(), v(this, z, "f").freeze(), v(this, B, "f").freeze(); } [wt]() { let t2, e2 = ""; return t2 = /\b(node|iojs|electron)(\.exe)?$/.test(v(this, lt, "f").process.argv()[0]) ? v(this, lt, "f").process.argv().slice(1, 2) : v(this, lt, "f").process.argv().slice(0, 1), e2 = t2.map((t3) => { const e3 = this[Tt](v(this, q, "f"), t3); return t3.match(/^(\/|([a-zA-Z]:)?\\)/) && e3.length < t3.length ? e3 : t3; }).join(" ").trim(), v(this, lt, "f").getEnv("_") && v(this, lt, "f").getProcessArgvBin() === v(this, lt, "f").getEnv("_") && (e2 = v(this, lt, "f").getEnv("_").replace(`${v(this, lt, "f").path.dirname(v(this, lt, "f").process.execPath())}/`, "")), e2; } [Ct]() { return v(this, st, "f"); } [jt]() { if (!v(this, T, "f")) return; const t2 = v(this, lt, "f").getEnv("LC_ALL") || v(this, lt, "f").getEnv("LC_MESSAGES") || v(this, lt, "f").getEnv("LANG") || v(this, lt, "f").getEnv("LANGUAGE") || "en_US"; this.locale(t2.replace(/[.:].*/, "")); } [_t]() { return this[kt]().version || "unknown"; } [Mt](t2) { const e2 = t2["--"] ? t2["--"] : t2._; for (let t3, s2 = 0; (t3 = e2[s2]) !== void 0; s2++) v(this, lt, "f").Parser.looksLikeNumber(t3) && Number.isSafeInteger(Math.floor(parseFloat(`${t3}`))) && (e2[s2] = Number(t3)); return t2; } [kt](t2) { const e2 = t2 || "*"; if (v(this, rt, "f")[e2]) return v(this, rt, "f")[e2]; let s2 = {}; try { let e3 = t2 || v(this, lt, "f").mainFilename; !t2 && v(this, lt, "f").path.extname(e3) && (e3 = v(this, lt, "f").path.dirname(e3)); const i2 = v(this, lt, "f").findUp(e3, (t3, e4) => e4.includes("package.json") ? "package.json" : void 0); d(i2, void 0, v(this, lt, "f")), s2 = JSON.parse(v(this, lt, "f").readFileSync(i2, "utf8")); } catch (t3) { } return v(this, rt, "f")[e2] = s2 || {}, v(this, rt, "f")[e2]; } [Et](t2, e2) { (e2 = [].concat(e2)).forEach((e3) => { e3 = this[Pt](e3), v(this, tt, "f")[t2].push(e3); }); } [xt](t2, e2, s2, i2) { this[St](t2, e2, s2, i2, (t3, e3, s3) => { v(this, tt, "f")[t3][e3] = s3; }); } [At](t2, e2, s2, i2) { this[St](t2, e2, s2, i2, (t3, e3, s3) => { v(this, tt, "f")[t3][e3] = (v(this, tt, "f")[t3][e3] || []).concat(s3); }); } [St](t2, e2, s2, i2, n2) { if (Array.isArray(s2)) s2.forEach((e3) => { t2(e3, i2); }); else if (((t3) => typeof t3 == "object")(s2)) for (const e3 of p(s2)) t2(e3, s2[e3]); else n2(e2, this[Pt](s2), i2); } [Pt](t2) { return t2 === "__proto__" ? "___proto___" : t2; } [$t](t2, e2) { return this[xt](this[$t].bind(this), "key", t2, e2), this; } [It]() { var t2, e2, s2, i2, n2, r2, o2, a2, h2, l2, c2, f2; const u2 = v(this, K, "f").pop(); let p2; d(u2, void 0, v(this, lt, "f")), t2 = this, e2 = this, s2 = this, i2 = this, n2 = this, r2 = this, o2 = this, a2 = this, h2 = this, l2 = this, c2 = this, f2 = this, { options: { set value(e3) { O(t2, tt, e3, "f"); } }.value, configObjects: p2, exitProcess: { set value(t3) { O(e2, G, t3, "f"); } }.value, groups: { set value(t3) { O(s2, Y, t3, "f"); } }.value, output: { set value(t3) { O(i2, Q, t3, "f"); } }.value, exitError: { set value(t3) { O(n2, V, t3, "f"); } }.value, hasOutput: { set value(t3) { O(r2, J, t3, "f"); } }.value, parsed: this.parsed, strict: { set value(t3) { O(o2, ct, t3, "f"); } }.value, strictCommands: { set value(t3) { O(a2, ft, t3, "f"); } }.value, strictOptions: { set value(t3) { O(h2, dt, t3, "f"); } }.value, completionCommand: { set value(t3) { O(l2, F, t3, "f"); } }.value, parseFn: { set value(t3) { O(c2, it, t3, "f"); } }.value, parseContext: { set value(t3) { O(f2, nt, t3, "f"); } }.value } = u2, v(this, tt, "f").configObjects = p2, v(this, ut, "f").unfreeze(), v(this, gt, "f").unfreeze(), v(this, z, "f").unfreeze(), v(this, B, "f").unfreeze(); } [Dt](t2, e2) { return j(e2, (e3) => (t2(e3), e3)); } getInternalMethods() { return { getCommandInstance: this[Nt].bind(this), getContext: this[Ht].bind(this), getHasOutput: this[zt].bind(this), getLoggerInstance: this[qt].bind(this), getParseContext: this[Wt].bind(this), getParserConfiguration: this[Ct].bind(this), getUsageInstance: this[Ut].bind(this), getValidationInstance: this[Ft].bind(this), hasParseCallback: this[Lt].bind(this), postProcess: this[Vt].bind(this), reset: this[Rt].bind(this), runValidation: this[Kt].bind(this), runYargsParserAndExecuteCommands: this[Gt].bind(this), setHasOutput: this[Bt].bind(this) }; } [Nt]() { return v(this, z, "f"); } [Ht]() { return v(this, W, "f"); } [zt]() { return v(this, J, "f"); } [qt]() { return v(this, X, "f"); } [Wt]() { return v(this, nt, "f") || {}; } [Ut]() { return v(this, ut, "f"); } [Ft]() { return v(this, gt, "f"); } [Lt]() { return !!v(this, it, "f"); } [Vt](t2, e2, s2, i2) { if (s2) return t2; if (f(t2)) return t2; e2 || (t2 = this[mt](t2)); return (this[Ct]()["parse-positional-numbers"] || this[Ct]()["parse-positional-numbers"] === void 0) && (t2 = this[Mt](t2)), i2 && (t2 = C(t2, this, v(this, B, "f").getMiddleware(), false)), t2; } [Rt](t2 = {}) { O(this, tt, v(this, tt, "f") || {}, "f"); const e2 = {}; e2.local = v(this, tt, "f").local || [], e2.configObjects = v(this, tt, "f").configObjects || []; const s2 = {}; e2.local.forEach((e3) => { s2[e3] = true, (t2[e3] || []).forEach((t3) => { s2[t3] = true; }); }), Object.assign(v(this, ot, "f"), Object.keys(v(this, Y, "f")).reduce((t3, e3) => { const i2 = v(this, Y, "f")[e3].filter((t4) => !(t4 in s2)); return i2.length > 0 && (t3[e3] = i2), t3; }, {})), O(this, Y, {}, "f"); return ["array", "boolean", "string", "skipValidation", "count", "normalize", "number", "hiddenOptions"].forEach((t3) => { e2[t3] = (v(this, tt, "f")[t3] || []).filter((t4) => !s2[t4]); }), ["narg", "key", "alias", "default", "defaultDescription", "config", "choices", "demandedOptions", "demandedCommands", "deprecatedOptions"].forEach((t3) => { e2[t3] = g(v(this, tt, "f")[t3], (t4) => !s2[t4]); }), e2.envPrefix = v(this, tt, "f").envPrefix, O(this, tt, e2, "f"), O(this, ut, v(this, ut, "f") ? v(this, ut, "f").reset(s2) : S(this, v(this, lt, "f")), "f"), O(this, gt, v(this, gt, "f") ? v(this, gt, "f").reset(s2) : function(t3, e3, s3) { const i2 = s3.y18n.__, n2 = s3.y18n.__n, r2 = { nonOptionCount: function(s4) { const i3 = t3.getDemandedCommands(), r3 = s4._.length + (s4["--"] ? s4["--"].length : 0) - t3.getInternalMethods().getContext().commands.length; i3._ && (r3 < i3._.min || r3 > i3._.max) && (r3 < i3._.min ? i3._.minMsg !== void 0 ? e3.fail(i3._.minMsg ? i3._.minMsg.replace(/\$0/g, r3.toString()).replace(/\$1/, i3._.min.toString()) : null) : e3.fail(n2("Not enough non-option arguments: got %s, need at least %s", "Not enough non-option arguments: got %s, need at least %s", r3, r3.toString(), i3._.min.toString())) : r3 > i3._.max && (i3._.maxMsg !== void 0 ? e3.fail(i3._.maxMsg ? i3._.maxMsg.replace(/\$0/g, r3.toString()).replace(/\$1/, i3._.max.toString()) : null) : e3.fail(n2("Too many non-option arguments: got %s, maximum of %s", "Too many non-option arguments: got %s, maximum of %s", r3, r3.toString(), i3._.max.toString())))); }, positionalCount: function(t4, s4) { s4 < t4 && e3.fail(n2("Not enough non-option arguments: got %s, need at least %s", "Not enough non-option arguments: got %s, need at least %s", s4, s4 + "", t4 + "")); }, requiredArguments: function(t4, s4) { let i3 = null; for (const e4 of Object.keys(s4)) Object.prototype.hasOwnProperty.call(t4, e4) && t4[e4] !== void 0 || (i3 = i3 || {}, i3[e4] = s4[e4]); if (i3) { const t5 = []; for (const e4 of Object.keys(i3)) { const s6 = i3[e4]; s6 && t5.indexOf(s6) < 0 && t5.push(s6); } const s5 = t5.length ? ` ${t5.join("\n")}` : ""; e3.fail(n2("Missing required argument: %s", "Missing required arguments: %s", Object.keys(i3).length, Object.keys(i3).join(", ") + s5)); } }, unknownArguments: function(s4, i3, o3, a3, h2 = true) { var l3; const c3 = t3.getInternalMethods().getCommandInstance().getCommands(), f2 = [], d2 = t3.getInternalMethods().getContext(); if (Object.keys(s4).forEach((e4) => { H.includes(e4) || Object.prototype.hasOwnProperty.call(o3, e4) || Object.prototype.hasOwnProperty.call(t3.getInternalMethods().getParseContext(), e4) || r2.isValidAndSomeAliasIsNotNew(e4, i3) || f2.push(e4); }), h2 && (d2.commands.length > 0 || c3.length > 0 || a3) && s4._.slice(d2.commands.length).forEach((t4) => { c3.includes("" + t4) || f2.push("" + t4); }), h2) { const e4 = ((l3 = t3.getDemandedCommands()._) === null || l3 === void 0 ? void 0 : l3.max) || 0, i4 = d2.commands.length + e4; i4 < s4._.length && s4._.slice(i4).forEach((t4) => { t4 = String(t4), d2.commands.includes(t4) || f2.includes(t4) || f2.push(t4); }); } f2.length && e3.fail(n2("Unknown argument: %s", "Unknown arguments: %s", f2.length, f2.join(", "))); }, unknownCommands: function(s4) { const i3 = t3.getInternalMethods().getCommandInstance().getCommands(), r3 = [], o3 = t3.getInternalMethods().getContext(); return (o3.commands.length > 0 || i3.length > 0) && s4._.slice(o3.commands.length).forEach((t4) => { i3.includes("" + t4) || r3.push("" + t4); }), r3.length > 0 && (e3.fail(n2("Unknown command: %s", "Unknown commands: %s", r3.length, r3.join(", "))), true); }, isValidAndSomeAliasIsNotNew: function(e4, s4) { if (!Object.prototype.hasOwnProperty.call(s4, e4)) return false; const i3 = t3.parsed.newAliases; return [e4, ...s4[e4]].some((t4) => !Object.prototype.hasOwnProperty.call(i3, t4) || !i3[e4]); }, limitedChoices: function(s4) { const n3 = t3.getOptions(), r3 = {}; if (!Object.keys(n3.choices).length) return; Object.keys(s4).forEach((t4) => { H.indexOf(t4) === -1 && Object.prototype.hasOwnProperty.call(n3.choices, t4) && [].concat(s4[t4]).forEach((e4) => { n3.choices[t4].indexOf(e4) === -1 && e4 !== void 0 && (r3[t4] = (r3[t4] || []).concat(e4)); }); }); const o3 = Object.keys(r3); if (!o3.length) return; let a3 = i2("Invalid values:"); o3.forEach((t4) => { a3 += ` ${i2("Argument: %s, Given: %s, Choices: %s", t4, e3.stringifiedValues(r3[t4]), e3.stringifiedValues(n3.choices[t4]))}`; }), e3.fail(a3); } }; let o2 = {}; function a2(t4, e4) { const s4 = Number(e4); return typeof (e4 = isNaN(s4) ? e4 : s4) == "number" ? e4 = t4._.length >= e4 : e4.match(/^--no-.+/) ? (e4 = e4.match(/^--no-(.+)/)[1], e4 = !Object.prototype.hasOwnProperty.call(t4, e4)) : e4 = Object.prototype.hasOwnProperty.call(t4, e4), e4; } r2.implies = function(e4, i3) { h(" [array|number|string]", [e4, i3], arguments.length), typeof e4 == "object" ? Object.keys(e4).forEach((t4) => { r2.implies(t4, e4[t4]); }) : (t3.global(e4), o2[e4] || (o2[e4] = []), Array.isArray(i3) ? i3.forEach((t4) => r2.implies(e4, t4)) : (d(i3, void 0, s3), o2[e4].push(i3))); }, r2.getImplied = function() { return o2; }, r2.implications = function(t4) { const s4 = []; if (Object.keys(o2).forEach((e4) => { const i3 = e4; (o2[e4] || []).forEach((e5) => { let n3 = i3; const r3 = e5; n3 = a2(t4, n3), e5 = a2(t4, e5), n3 && !e5 && s4.push(` ${i3} -> ${r3}`); }); }), s4.length) { let t5 = `${i2("Implications failed:")} `; s4.forEach((e4) => { t5 += e4; }), e3.fail(t5); } }; let l2 = {}; r2.conflicts = function(e4, s4) { h(" [array|string]", [e4, s4], arguments.length), typeof e4 == "object" ? Object.keys(e4).forEach((t4) => { r2.conflicts(t4, e4[t4]); }) : (t3.global(e4), l2[e4] || (l2[e4] = []), Array.isArray(s4) ? s4.forEach((t4) => r2.conflicts(e4, t4)) : l2[e4].push(s4)); }, r2.getConflicting = () => l2, r2.conflicting = function(n3) { Object.keys(n3).forEach((t4) => { l2[t4] && l2[t4].forEach((s4) => { s4 && n3[t4] !== void 0 && n3[s4] !== void 0 && e3.fail(i2("Arguments %s and %s are mutually exclusive", t4, s4)); }); }), t3.getInternalMethods().getParserConfiguration()["strip-dashed"] && Object.keys(l2).forEach((t4) => { l2[t4].forEach((r3) => { r3 && n3[s3.Parser.camelCase(t4)] !== void 0 && n3[s3.Parser.camelCase(r3)] !== void 0 && e3.fail(i2("Arguments %s and %s are mutually exclusive", t4, r3)); }); }); }, r2.recommendCommands = function(t4, s4) { s4 = s4.sort((t5, e4) => e4.length - t5.length); let n3 = null, r3 = 1 / 0; for (let e4, i3 = 0; (e4 = s4[i3]) !== void 0; i3++) { const s5 = N(t4, e4); s5 <= 3 && s5 < r3 && (r3 = s5, n3 = e4); } n3 && e3.fail(i2("Did you mean %s?", n3)); }, r2.reset = function(t4) { return o2 = g(o2, (e4) => !t4[e4]), l2 = g(l2, (e4) => !t4[e4]), r2; }; const c2 = []; return r2.freeze = function() { c2.push({ implied: o2, conflicting: l2 }); }, r2.unfreeze = function() { const t4 = c2.pop(); d(t4, void 0, s3), { implied: o2, conflicting: l2 } = t4; }, r2; }(this, v(this, ut, "f"), v(this, lt, "f")), "f"), O(this, z, v(this, z, "f") ? v(this, z, "f").reset() : function(t3, e3, s3, i2) { return new M(t3, e3, s3, i2); }(v(this, ut, "f"), v(this, gt, "f"), v(this, B, "f"), v(this, lt, "f")), "f"), v(this, U, "f") || O(this, U, function(t3, e3, s3, i2) { return new D(t3, e3, s3, i2); }(this, v(this, ut, "f"), v(this, z, "f"), v(this, lt, "f")), "f"), v(this, B, "f").reset(), O(this, F, null, "f"), O(this, Q, "", "f"), O(this, V, null, "f"), O(this, J, false, "f"), this.parsed = false, this; } [Tt](t2, e2) { return v(this, lt, "f").path.relative(t2, e2); } [Gt](t2, s2, i2, n2 = 0, r2 = false) { let o2 = !!i2 || r2; t2 = t2 || v(this, at, "f"), v(this, tt, "f").__ = v(this, lt, "f").y18n.__, v(this, tt, "f").configuration = this[Ct](); const a2 = !!v(this, tt, "f").configuration["populate--"], h2 = Object.assign({}, v(this, tt, "f").configuration, { "populate--": true }), l2 = v(this, lt, "f").Parser.detailed(t2, Object.assign({}, v(this, tt, "f"), { configuration: __spreadValues({ "parse-positional-numbers": false }, h2) })), c2 = Object.assign(l2.argv, v(this, nt, "f")); let d2; const u2 = l2.aliases; let p2 = false, g2 = false; Object.keys(c2).forEach((t3) => { t3 === v(this, Z, "f") && c2[t3] ? p2 = true : t3 === v(this, pt, "f") && c2[t3] && (g2 = true); }), c2.$0 = this.$0, this.parsed = l2, n2 === 0 && v(this, ut, "f").clearCachedHelpMessage(); try { if (this[jt](), s2) return this[Vt](c2, a2, !!i2, false); if (v(this, Z, "f")) { [v(this, Z, "f")].concat(u2[v(this, Z, "f")] || []).filter((t3) => t3.length > 1).includes("" + c2._[c2._.length - 1]) && (c2._.pop(), p2 = true); } const h3 = v(this, z, "f").getCommands(), m2 = v(this, U, "f").completionKey in c2, y2 = p2 || m2 || r2; if (c2._.length) { if (h3.length) { let t3; for (let e2, s3 = n2 || 0; c2._[s3] !== void 0; s3++) { if (e2 = String(c2._[s3]), h3.includes(e2) && e2 !== v(this, F, "f")) { const t4 = v(this, z, "f").runCommand(e2, this, l2, s3 + 1, r2, p2 || g2 || r2); return this[Vt](t4, a2, !!i2, false); } if (!t3 && e2 !== v(this, F, "f")) { t3 = e2; break; } } !v(this, z, "f").hasDefaultCommand() && v(this, ht, "f") && t3 && !y2 && v(this, gt, "f").recommendCommands(t3, h3); } v(this, F, "f") && c2._.includes(v(this, F, "f")) && !m2 && (v(this, G, "f") && x(true), this.showCompletionScript(), this.exit(0)); } if (v(this, z, "f").hasDefaultCommand() && !y2) { const t3 = v(this, z, "f").runCommand(null, this, l2, 0, r2, p2 || g2 || r2); return this[Vt](t3, a2, !!i2, false); } if (m2) { v(this, G, "f") && x(true); const s3 = (t2 = [].concat(t2)).slice(t2.indexOf(`--${v(this, U, "f").completionKey}`) + 1); return v(this, U, "f").getCompletion(s3, (t3, s4) => { if (t3) throw new e(t3.message); (s4 || []).forEach((t4) => { v(this, X, "f").log(t4); }), this.exit(0); }), this[Vt](c2, !a2, !!i2, false); } if (v(this, J, "f") || (p2 ? (v(this, G, "f") && x(true), o2 = true, this.showHelp("log"), this.exit(0)) : g2 && (v(this, G, "f") && x(true), o2 = true, v(this, ut, "f").showVersion("log"), this.exit(0))), !o2 && v(this, tt, "f").skipValidation.length > 0 && (o2 = Object.keys(c2).some((t3) => v(this, tt, "f").skipValidation.indexOf(t3) >= 0 && c2[t3] === true)), !o2) { if (l2.error) throw new e(l2.error.message); if (!m2) { const t3 = this[Kt](u2, {}, l2.error); i2 || (d2 = C(c2, this, v(this, B, "f").getMiddleware(), true)), d2 = this[Dt](t3, d2 != null ? d2 : c2), f(d2) && !i2 && (d2 = d2.then(() => C(c2, this, v(this, B, "f").getMiddleware(), false))); } } } catch (t3) { if (!(t3 instanceof e)) throw t3; v(this, ut, "f").fail(t3.message, t3); } return this[Vt](d2 != null ? d2 : c2, a2, !!i2, true); } [Kt](t2, s2, i2, n2) { const r2 = __spreadValues({}, this.getDemandedOptions()); return (o2) => { if (i2) throw new e(i2.message); v(this, gt, "f").nonOptionCount(o2), v(this, gt, "f").requiredArguments(o2, r2); let a2 = false; v(this, ft, "f") && (a2 = v(this, gt, "f").unknownCommands(o2)), v(this, ct, "f") && !a2 ? v(this, gt, "f").unknownArguments(o2, t2, s2, !!n2) : v(this, dt, "f") && v(this, gt, "f").unknownArguments(o2, t2, {}, false, false), v(this, gt, "f").limitedChoices(o2), v(this, gt, "f").implications(o2), v(this, gt, "f").conflicting(o2); }; } [Bt]() { O(this, J, true, "f"); } [Yt](t2) { if (typeof t2 == "string") v(this, tt, "f").key[t2] = true; else for (const e2 of t2) v(this, tt, "f").key[e2] = true; } }; var Zt; var Xt; var { readFileSync: Qt } = require("fs"); var { inspect: te } = require("util"); var { resolve: ee } = require("path"); var se = require_build(); var ie = require_build2(); var ne; var re = { assert: { notStrictEqual: t.notStrictEqual, strictEqual: t.strictEqual }, cliui: require_build3(), findUp: require_sync(), getEnv: (t2) => process.env[t2], getCallerFile: require_get_caller_file(), getProcessArgvBin: y, inspect: te, mainFilename: (Xt = (Zt = require === null || require === void 0 ? void 0 : require.main) === null || Zt === void 0 ? void 0 : Zt.filename) !== null && Xt !== void 0 ? Xt : process.cwd(), Parser: ie, path: require("path"), process: { argv: () => process.argv, cwd: process.cwd, emitWarning: (t2, e2) => process.emitWarning(t2, e2), execPath: () => process.execPath, exit: (t2) => { process.exit(t2); }, nextTick: process.nextTick, stdColumns: process.stdout.columns !== void 0 ? process.stdout.columns : null }, readFileSync: Qt, require, requireDirectory: require_require_directory(), stringWidth: require_string_width2(), y18n: se({ directory: ee(__dirname, "../locales"), updateFiles: false }) }; var oe = ((ne = process === null || process === void 0 ? void 0 : process.env) === null || ne === void 0 ? void 0 : ne.YARGS_MIN_NODE_VERSION) ? Number(process.env.YARGS_MIN_NODE_VERSION) : 12; if (process && process.version) { if (Number(process.version.match(/v([^.]+)/)[1]) < oe) throw Error(`yargs supports a minimum Node.js version of ${oe}. Read our version support policy: https://github.com/yargs/yargs#supported-nodejs-versions`); } var ae = require_build2(); var he; var le = { applyExtends: n, cjsPlatformShim: re, Yargs: (he = re, (t2 = [], e2 = he.process.cwd(), s2) => { const i2 = new Jt(t2, e2, s2, he); return Object.defineProperty(i2, "argv", { get: () => i2.parse(), enumerable: true }), i2.help(), i2.version(), i2; }), argsert: h, isPromise: f, objFilter: g, parseCommand: o, Parser: ae, processArgv: b, YError: e }; module2.exports = le; } }); // node_modules/yargs/index.cjs var require_yargs = __commonJS({ "node_modules/yargs/index.cjs"(exports2, module2) { "use strict"; var { Yargs, processArgv } = require_build4(); Argv(processArgv.hideBin(process.argv)); module2.exports = Argv; function Argv(processArgs, cwd) { const argv = Yargs(processArgs, cwd, require); singletonify(argv); return argv; } function defineGetter(obj, key, getter) { Object.defineProperty(obj, key, { configurable: true, enumerable: true, get: getter }); } function lookupGetter(obj, key) { const desc = Object.getOwnPropertyDescriptor(obj, key); if (typeof desc !== "undefined") { return desc.get; } } function singletonify(inst) { [ ...Object.keys(inst), ...Object.getOwnPropertyNames(inst.constructor.prototype) ].forEach((key) => { if (key === "argv") { defineGetter(Argv, key, lookupGetter(inst, key)); } else if (typeof inst[key] === "function") { Argv[key] = inst[key].bind(inst); } else { defineGetter(Argv, "$0", () => inst.$0); defineGetter(Argv, "parsed", () => inst.parsed); } }); } } }); // package.json var require_package = __commonJS({ "package.json"(exports2, module2) { module2.exports = { name: "@carbon/telemetry", description: "Collect telemetry data for projects at IBM using Carbon", version: "0.1.0", license: "Apache-2.0", bin: { "carbon-telemetry": "./bin/carbon-telemetry.js" }, repository: "https://github.com/carbon-design-system/carbon", bugs: "https://github.ibm.com/carbon-design-system/carbon/issues", keywords: [ "carbon", "carbon design system" ], publishConfig: { access: "public" }, scripts: { build: "esbuild --bundle --platform=node --target=node12 --outfile=cli.js src/cli.js", clean: "rimraf cli.js" }, devDependencies: { "@babel/parser": "^7.17.0", "@babel/traverse": "^7.17.0", "ci-info": "^3.3.0", configstore: "^5.0.1", esbuild: "^0.14.20", "fast-glob": "^3.2.11", "fs-extra": "^10.0.0", got: "^11.8.2", rimraf: "^3.0.2", semver: "^7.3.5", winston: "^3.5.1", yargs: "^17.3.1" } }; } }); // ../../node_modules/make-dir/node_modules/semver/semver.js var require_semver3 = __commonJS({ "../../node_modules/make-dir/node_modules/semver/semver.js"(exports2, module2) { exports2 = module2.exports = SemVer; var debug; if (typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) { debug = function() { var args = Array.prototype.slice.call(arguments, 0); args.unshift("SEMVER"); console.log.apply(console, args); }; } else { debug = function() { }; } exports2.SEMVER_SPEC_VERSION = "2.0.0"; var MAX_LENGTH = 256; var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; var MAX_SAFE_COMPONENT_LENGTH = 16; var re = exports2.re = []; var src = exports2.src = []; var t = exports2.tokens = {}; var R = 0; function tok(n) { t[n] = R++; } tok("NUMERICIDENTIFIER"); src[t.NUMERICIDENTIFIER] = "0|[1-9]\\d*"; tok("NUMERICIDENTIFIERLOOSE"); src[t.NUMERICIDENTIFIERLOOSE] = "[0-9]+"; tok("NONNUMERICIDENTIFIER"); src[t.NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-][a-zA-Z0-9-]*"; tok("MAINVERSION"); src[t.MAINVERSION] = "(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")"; tok("MAINVERSIONLOOSE"); src[t.MAINVERSIONLOOSE] = "(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")"; tok("PRERELEASEIDENTIFIER"); src[t.PRERELEASEIDENTIFIER] = "(?:" + src[t.NUMERICIDENTIFIER] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; tok("PRERELEASEIDENTIFIERLOOSE"); src[t.PRERELEASEIDENTIFIERLOOSE] = "(?:" + src[t.NUMERICIDENTIFIERLOOSE] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; tok("PRERELEASE"); src[t.PRERELEASE] = "(?:-(" + src[t.PRERELEASEIDENTIFIER] + "(?:\\." + src[t.PRERELEASEIDENTIFIER] + ")*))"; tok("PRERELEASELOOSE"); src[t.PRERELEASELOOSE] = "(?:-?(" + src[t.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[t.PRERELEASEIDENTIFIERLOOSE] + ")*))"; tok("BUILDIDENTIFIER"); src[t.BUILDIDENTIFIER] = "[0-9A-Za-z-]+"; tok("BUILD"); src[t.BUILD] = "(?:\\+(" + src[t.BUILDIDENTIFIER] + "(?:\\." + src[t.BUILDIDENTIFIER] + ")*))"; tok("FULL"); tok("FULLPLAIN"); src[t.FULLPLAIN] = "v?" + src[t.MAINVERSION] + src[t.PRERELEASE] + "?" + src[t.BUILD] + "?"; src[t.FULL] = "^" + src[t.FULLPLAIN] + "$"; tok("LOOSEPLAIN"); src[t.LOOSEPLAIN] = "[v=\\s]*" + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + "?" + src[t.BUILD] + "?"; tok("LOOSE"); src[t.LOOSE] = "^" + src[t.LOOSEPLAIN] + "$"; tok("GTLT"); src[t.GTLT] = "((?:<|>)?=?)"; tok("XRANGEIDENTIFIERLOOSE"); src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*"; tok("XRANGEIDENTIFIER"); src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + "|x|X|\\*"; tok("XRANGEPLAIN"); src[t.XRANGEPLAIN] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:" + src[t.PRERELEASE] + ")?" + src[t.BUILD] + "?)?)?"; tok("XRANGEPLAINLOOSE"); src[t.XRANGEPLAINLOOSE] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:" + src[t.PRERELEASELOOSE] + ")?" + src[t.BUILD] + "?)?)?"; tok("XRANGE"); src[t.XRANGE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAIN] + "$"; tok("XRANGELOOSE"); src[t.XRANGELOOSE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAINLOOSE] + "$"; tok("COERCE"); src[t.COERCE] = "(^|[^\\d])(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "})(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:$|[^\\d])"; tok("COERCERTL"); re[t.COERCERTL] = new RegExp(src[t.COERCE], "g"); tok("LONETILDE"); src[t.LONETILDE] = "(?:~>?)"; tok("TILDETRIM"); src[t.TILDETRIM] = "(\\s*)" + src[t.LONETILDE] + "\\s+"; re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], "g"); var tildeTrimReplace = "$1~"; tok("TILDE"); src[t.TILDE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAIN] + "$"; tok("TILDELOOSE"); src[t.TILDELOOSE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + "$"; tok("LONECARET"); src[t.LONECARET] = "(?:\\^)"; tok("CARETTRIM"); src[t.CARETTRIM] = "(\\s*)" + src[t.LONECARET] + "\\s+"; re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], "g"); var caretTrimReplace = "$1^"; tok("CARET"); src[t.CARET] = "^" + src[t.LONECARET] + src[t.XRANGEPLAIN] + "$"; tok("CARETLOOSE"); src[t.CARETLOOSE] = "^" + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + "$"; tok("COMPARATORLOOSE"); src[t.COMPARATORLOOSE] = "^" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + ")$|^$"; tok("COMPARATOR"); src[t.COMPARATOR] = "^" + src[t.GTLT] + "\\s*(" + src[t.FULLPLAIN] + ")$|^$"; tok("COMPARATORTRIM"); src[t.COMPARATORTRIM] = "(\\s*)" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + "|" + src[t.XRANGEPLAIN] + ")"; re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], "g"); var comparatorTrimReplace = "$1$2$3"; tok("HYPHENRANGE"); src[t.HYPHENRANGE] = "^\\s*(" + src[t.XRANGEPLAIN] + ")\\s+-\\s+(" + src[t.XRANGEPLAIN] + ")\\s*$"; tok("HYPHENRANGELOOSE"); src[t.HYPHENRANGELOOSE] = "^\\s*(" + src[t.XRANGEPLAINLOOSE] + ")\\s+-\\s+(" + src[t.XRANGEPLAINLOOSE] + ")\\s*$"; tok("STAR"); src[t.STAR] = "(<|>)?=?\\s*\\*"; for (i = 0; i < R; i++) { debug(i, src[i]); if (!re[i]) { re[i] = new RegExp(src[i]); } } var i; exports2.parse = parse; function parse(version, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } if (version instanceof SemVer) { return version; } if (typeof version !== "string") { return null; } if (version.length > MAX_LENGTH) { return null; } var r = options.loose ? re[t.LOOSE] : re[t.FULL]; if (!r.test(version)) { return null; } try { return new SemVer(version, options); } catch (er) { return null; } } exports2.valid = valid; function valid(version, options) { var v = parse(version, options); return v ? v.version : null; } exports2.clean = clean; function clean(version, options) { var s = parse(version.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; } exports2.SemVer = SemVer; function SemVer(version, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } if (version instanceof SemVer) { if (version.loose === options.loose) { return version; } else { version = version.version; } } else if (typeof version !== "string") { throw new TypeError("Invalid Version: " + version); } if (version.length > MAX_LENGTH) { throw new TypeError("version is longer than " + MAX_LENGTH + " characters"); } if (!(this instanceof SemVer)) { return new SemVer(version, options); } debug("SemVer", version, options); this.options = options; this.loose = !!options.loose; var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); if (!m) { throw new TypeError("Invalid Version: " + version); } this.raw = version; this.major = +m[1]; this.minor = +m[2]; this.patch = +m[3]; if (this.major > MAX_SAFE_INTEGER || this.major < 0) { throw new TypeError("Invalid major version"); } if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { throw new TypeError("Invalid minor version"); } if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { throw new TypeError("Invalid patch version"); } if (!m[4]) { this.prerelease = []; } else { this.prerelease = m[4].split(".").map(function(id) { if (/^[0-9]+$/.test(id)) { var num = +id; if (num >= 0 && num < MAX_SAFE_INTEGER) { return num; } } return id; }); } this.build = m[5] ? m[5].split(".") : []; this.format(); } SemVer.prototype.format = function() { this.version = this.major + "." + this.minor + "." + this.patch; if (this.prerelease.length) { this.version += "-" + this.prerelease.join("."); } return this.version; }; SemVer.prototype.toString = function() { return this.version; }; SemVer.prototype.compare = function(other) { debug("SemVer.compare", this.version, this.options, other); if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } return this.compareMain(other) || this.comparePre(other); }; SemVer.prototype.compareMain = function(other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); }; SemVer.prototype.comparePre = function(other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } if (this.prerelease.length && !other.prerelease.length) { return -1; } else if (!this.prerelease.length && other.prerelease.length) { return 1; } else if (!this.prerelease.length && !other.prerelease.length) { return 0; } var i2 = 0; do { var a = this.prerelease[i2]; var b = other.prerelease[i2]; debug("prerelease compare", i2, a, b); if (a === void 0 && b === void 0) { return 0; } else if (b === void 0) { return 1; } else if (a === void 0) { return -1; } else if (a === b) { continue; } else { return compareIdentifiers(a, b); } } while (++i2); }; SemVer.prototype.compareBuild = function(other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } var i2 = 0; do { var a = this.build[i2]; var b = other.build[i2]; debug("prerelease compare", i2, a, b); if (a === void 0 && b === void 0) { return 0; } else if (b === void 0) { return 1; } else if (a === void 0) { return -1; } else if (a === b) { continue; } else { return compareIdentifiers(a, b); } } while (++i2); }; SemVer.prototype.inc = function(release, identifier) { switch (release) { case "premajor": this.prerelease.length = 0; this.patch = 0; this.minor = 0; this.major++; this.inc("pre", identifier); break; case "preminor": this.prerelease.length = 0; this.patch = 0; this.minor++; this.inc("pre", identifier); break; case "prepatch": this.prerelease.length = 0; this.inc("patch", identifier); this.inc("pre", identifier); break; case "prerelease": if (this.prerelease.length === 0) { this.inc("patch", identifier); } this.inc("pre", identifier); break; case "major": if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { this.major++; } this.minor = 0; this.patch = 0; this.prerelease = []; break; case "minor": if (this.patch !== 0 || this.prerelease.length === 0) { this.minor++; } this.patch = 0; this.prerelease = []; break; case "patch": if (this.prerelease.length === 0) { this.patch++; } this.prerelease = []; break; case "pre": if (this.prerelease.length === 0) { this.prerelease = [0]; } else { var i2 = this.prerelease.length; while (--i2 >= 0) { if (typeof this.prerelease[i2] === "number") { this.prerelease[i2]++; i2 = -2; } } if (i2 === -1) { this.prerelease.push(0); } } if (identifier) { if (this.prerelease[0] === identifier) { if (isNaN(this.prerelease[1])) { this.prerelease = [identifier, 0]; } } else { this.prerelease = [identifier, 0]; } } break; default: throw new Error("invalid increment argument: " + release); } this.format(); this.raw = this.version; return this; }; exports2.inc = inc; function inc(version, release, loose, identifier) { if (typeof loose === "string") { identifier = loose; loose = void 0; } try { return new SemVer(version, loose).inc(release, identifier).version; } catch (er) { return null; } } exports2.diff = diff; function diff(version1, version2) { if (eq(version1, version2)) { return null; } else { var v1 = parse(version1); var v2 = parse(version2); var prefix = ""; if (v1.prerelease.length || v2.prerelease.length) { prefix = "pre"; var defaultResult = "prerelease"; } for (var key in v1) { if (key === "major" || key === "minor" || key === "patch") { if (v1[key] !== v2[key]) { return prefix + key; } } } return defaultResult; } } exports2.compareIdentifiers = compareIdentifiers; var numeric = /^[0-9]+$/; function compareIdentifiers(a, b) { var anum = numeric.test(a); var bnum = numeric.test(b); if (anum && bnum) { a = +a; b = +b; } return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; } exports2.rcompareIdentifiers = rcompareIdentifiers; function rcompareIdentifiers(a, b) { return compareIdentifiers(b, a); } exports2.major = major; function major(a, loose) { return new SemVer(a, loose).major; } exports2.minor = minor; function minor(a, loose) { return new SemVer(a, loose).minor; } exports2.patch = patch; function patch(a, loose) { return new SemVer(a, loose).patch; } exports2.compare = compare; function compare(a, b, loose) { return new SemVer(a, loose).compare(new SemVer(b, loose)); } exports2.compareLoose = compareLoose; function compareLoose(a, b) { return compare(a, b, true); } exports2.compareBuild = compareBuild; function compareBuild(a, b, loose) { var versionA = new SemVer(a, loose); var versionB = new SemVer(b, loose); return versionA.compare(versionB) || versionA.compareBuild(versionB); } exports2.rcompare = rcompare; function rcompare(a, b, loose) { return compare(b, a, loose); } exports2.sort = sort; function sort(list, loose) { return list.sort(function(a, b) { return exports2.compareBuild(a, b, loose); }); } exports2.rsort = rsort; function rsort(list, loose) { return list.sort(function(a, b) { return exports2.compareBuild(b, a, loose); }); } exports2.gt = gt; function gt(a, b, loose) { return compare(a, b, loose) > 0; } exports2.lt = lt; function lt(a, b, loose) { return compare(a, b, loose) < 0; } exports2.eq = eq; function eq(a, b, loose) { return compare(a, b, loose) === 0; } exports2.neq = neq; function neq(a, b, loose) { return compare(a, b, loose) !== 0; } exports2.gte = gte; function gte(a, b, loose) { return compare(a, b, loose) >= 0; } exports2.lte = lte; function lte(a, b, loose) { return compare(a, b, loose) <= 0; } exports2.cmp = cmp; function cmp(a, op, b, loose) { switch (op) { case "===": if (typeof a === "object") a = a.version; if (typeof b === "object") b = b.version; return a === b; case "!==": if (typeof a === "object") a = a.version; if (typeof b === "object") b = b.version; return a !== b; case "": case "=": case "==": return eq(a, b, loose); case "!=": return neq(a, b, loose); case ">": return gt(a, b, loose); case ">=": return gte(a, b, loose); case "<": return lt(a, b, loose); case "<=": return lte(a, b, loose); default: throw new TypeError("Invalid operator: " + op); } } exports2.Comparator = Comparator; function Comparator(comp, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } if (comp instanceof Comparator) { if (comp.loose === !!options.loose) { return comp; } else { comp = comp.value; } } if (!(this instanceof Comparator)) { return new Comparator(comp, options); } debug("comparator", comp, options); this.options = options; this.loose = !!options.loose; this.parse(comp); if (this.semver === ANY) { this.value = ""; } else { this.value = this.operator + this.semver.version; } debug("comp", this); } var ANY = {}; Comparator.prototype.parse = function(comp) { var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; var m = comp.match(r); if (!m) { throw new TypeError("Invalid comparator: " + comp); } this.operator = m[1] !== void 0 ? m[1] : ""; if (this.operator === "=") { this.operator = ""; } if (!m[2]) { this.semver = ANY; } else { this.semver = new SemVer(m[2], this.options.loose); } }; Comparator.prototype.toString = function() { return this.value; }; Comparator.prototype.test = function(version) { debug("Comparator.test", version, this.options.loose); if (this.semver === ANY || version === ANY) { return true; } if (typeof version === "string") { try { version = new SemVer(version, this.options); } catch (er) { return false; } } return cmp(version, this.operator, this.semver, this.options); }; Comparator.prototype.intersects = function(comp, options) { if (!(comp instanceof Comparator)) { throw new TypeError("a Comparator is required"); } if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } var rangeTmp; if (this.operator === "") { if (this.value === "") { return true; } rangeTmp = new Range(comp.value, options); return satisfies(this.value, rangeTmp, options); } else if (comp.operator === "") { if (comp.value === "") { return true; } rangeTmp = new Range(this.value, options); return satisfies(comp.semver, rangeTmp, options); } var sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">"); var sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<"); var sameSemVer = this.semver.version === comp.semver.version; var differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<="); var oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && ((this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<")); var oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && ((this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">")); return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; }; exports2.Range = Range; function Range(range, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } if (range instanceof Range) { if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { return range; } else { return new Range(range.raw, options); } } if (range instanceof Comparator) { return new Range(range.value, options); } if (!(this instanceof Range)) { return new Range(range, options); } this.options = options; this.loose = !!options.loose; this.includePrerelease = !!options.includePrerelease; this.raw = range; this.set = range.split(/\s*\|\|\s*/).map(function(range2) { return this.parseRange(range2.trim()); }, this).filter(function(c) { return c.length; }); if (!this.set.length) { throw new TypeError("Invalid SemVer Range: " + range); } this.format(); } Range.prototype.format = function() { this.range = this.set.map(function(comps) { return comps.join(" ").trim(); }).join("||").trim(); return this.range; }; Range.prototype.toString = function() { return this.range; }; Range.prototype.parseRange = function(range) { var loose = this.options.loose; range = range.trim(); var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; range = range.replace(hr, hyphenReplace); debug("hyphen replace", range); range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); debug("comparator trim", range, re[t.COMPARATORTRIM]); range = range.replace(re[t.TILDETRIM], tildeTrimReplace); range = range.replace(re[t.CARETTRIM], caretTrimReplace); range = range.split(/\s+/).join(" "); var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; var set = range.split(" ").map(function(comp) { return parseComparator(comp, this.options); }, this).join(" ").split(/\s+/); if (this.options.loose) { set = set.filter(function(comp) { return !!comp.match(compRe); }); } set = set.map(function(comp) { return new Comparator(comp, this.options); }, this); return set; }; Range.prototype.intersects = function(range, options) { if (!(range instanceof Range)) { throw new TypeError("a Range is required"); } return this.set.some(function(thisComparators) { return isSatisfiable(thisComparators, options) && range.set.some(function(rangeComparators) { return isSatisfiable(rangeComparators, options) && thisComparators.every(function(thisComparator) { return rangeComparators.every(function(rangeComparator) { return thisComparator.intersects(rangeComparator, options); }); }); }); }); }; function isSatisfiable(comparators, options) { var result = true; var remainingComparators = comparators.slice(); var testComparator = remainingComparators.pop(); while (result && remainingComparators.length) { result = remainingComparators.every(function(otherComparator) { return testComparator.intersects(otherComparator, options); }); testComparator = remainingComparators.pop(); } return result; } exports2.toComparators = toComparators; function toComparators(range, options) { return new Range(range, options).set.map(function(comp) { return comp.map(function(c) { return c.value; }).join(" ").trim().split(" "); }); } function parseComparator(comp, options) { debug("comp", comp, options); comp = replaceCarets(comp, options); debug("caret", comp); comp = replaceTildes(comp, options); debug("tildes", comp); comp = replaceXRanges(comp, options); debug("xrange", comp); comp = replaceStars(comp, options); debug("stars", comp); return comp; } function isX(id) { return !id || id.toLowerCase() === "x" || id === "*"; } function replaceTildes(comp, options) { return comp.trim().split(/\s+/).map(function(comp2) { return replaceTilde(comp2, options); }).join(" "); } function replaceTilde(comp, options) { var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; return comp.replace(r, function(_, M, m, p, pr) { debug("tilde", comp, _, M, m, p, pr); var ret; if (isX(M)) { ret = ""; } else if (isX(m)) { ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; } else if (isX(p)) { ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; } else if (pr) { debug("replaceTilde pr", pr); ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; } else { ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; } debug("tilde return", ret); return ret; }); } function replaceCarets(comp, options) { return comp.trim().split(/\s+/).map(function(comp2) { return replaceCaret(comp2, options); }).join(" "); } function replaceCaret(comp, options) { debug("caret", comp, options); var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; return comp.replace(r, function(_, M, m, p, pr) { debug("caret", comp, _, M, m, p, pr); var ret; if (isX(M)) { ret = ""; } else if (isX(m)) { ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; } else if (isX(p)) { if (M === "0") { ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; } else { ret = ">=" + M + "." + m + ".0 <" + (+M + 1) + ".0.0"; } } else if (pr) { debug("replaceCaret pr", pr); if (M === "0") { if (m === "0") { ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + m + "." + (+p + 1); } else { ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; } } else { ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) + ".0.0"; } } else { debug("no pr"); if (M === "0") { if (m === "0") { ret = ">=" + M + "." + m + "." + p + " <" + M + "." + m + "." + (+p + 1); } else { ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; } } else { ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0"; } } debug("caret return", ret); return ret; }); } function replaceXRanges(comp, options) { debug("replaceXRanges", comp, options); return comp.split(/\s+/).map(function(comp2) { return replaceXRange(comp2, options); }).join(" "); } function replaceXRange(comp, options) { comp = comp.trim(); var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; return comp.replace(r, function(ret, gtlt, M, m, p, pr) { debug("xRange", comp, ret, gtlt, M, m, p, pr); var xM = isX(M); var xm = xM || isX(m); var xp = xm || isX(p); var anyX = xp; if (gtlt === "=" && anyX) { gtlt = ""; } pr = options.includePrerelease ? "-0" : ""; if (xM) { if (gtlt === ">" || gtlt === "<") { ret = "<0.0.0-0"; } else { ret = "*"; } } else if (gtlt && anyX) { if (xm) { m = 0; } p = 0; if (gtlt === ">") { gtlt = ">="; if (xm) { M = +M + 1; m = 0; p = 0; } else { m = +m + 1; p = 0; } } else if (gtlt === "<=") { gtlt = "<"; if (xm) { M = +M + 1; } else { m = +m + 1; } } ret = gtlt + M + "." + m + "." + p + pr; } else if (xm) { ret = ">=" + M + ".0.0" + pr + " <" + (+M + 1) + ".0.0" + pr; } else if (xp) { ret = ">=" + M + "." + m + ".0" + pr + " <" + M + "." + (+m + 1) + ".0" + pr; } debug("xRange return", ret); return ret; }); } function replaceStars(comp, options) { debug("replaceStars", comp, options); return comp.trim().replace(re[t.STAR], ""); } function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { if (isX(fM)) { from = ""; } else if (isX(fm)) { from = ">=" + fM + ".0.0"; } else if (isX(fp)) { from = ">=" + fM + "." + fm + ".0"; } else { from = ">=" + from; } if (isX(tM)) { to = ""; } else if (isX(tm)) { to = "<" + (+tM + 1) + ".0.0"; } else if (isX(tp)) { to = "<" + tM + "." + (+tm + 1) + ".0"; } else if (tpr) { to = "<=" + tM + "." + tm + "." + tp + "-" + tpr; } else { to = "<=" + to; } return (from + " " + to).trim(); } Range.prototype.test = function(version) { if (!version) { return false; } if (typeof version === "string") { try { version = new SemVer(version, this.options); } catch (er) { return false; } } for (var i2 = 0; i2 < this.set.length; i2++) { if (testSet(this.set[i2], version, this.options)) { return true; } } return false; }; function testSet(set, version, options) { for (var i2 = 0; i2 < set.length; i2++) { if (!set[i2].test(version)) { return false; } } if (version.prerelease.length && !options.includePrerelease) { for (i2 = 0; i2 < set.length; i2++) { debug(set[i2].semver); if (set[i2].semver === ANY) { continue; } if (set[i2].semver.prerelease.length > 0) { var allowed = set[i2].semver; if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) { return true; } } } return false; } return true; } exports2.satisfies = satisfies; function satisfies(version, range, options) { try { range = new Range(range, options); } catch (er) { return false; } return range.test(version); } exports2.maxSatisfying = maxSatisfying; function maxSatisfying(versions, range, options) { var max = null; var maxSV = null; try { var rangeObj = new Range(range, options); } catch (er) { return null; } versions.forEach(function(v) { if (rangeObj.test(v)) { if (!max || maxSV.compare(v) === -1) { max = v; maxSV = new SemVer(max, options); } } }); return max; } exports2.minSatisfying = minSatisfying; function minSatisfying(versions, range, options) { var min = null; var minSV = null; try { var rangeObj = new Range(range, options); } catch (er) { return null; } versions.forEach(function(v) { if (rangeObj.test(v)) { if (!min || minSV.compare(v) === 1) { min = v; minSV = new SemVer(min, options); } } }); return min; } exports2.minVersion = minVersion; function minVersion(range, loose) { range = new Range(range, loose); var minver = new SemVer("0.0.0"); if (range.test(minver)) { return minver; } minver = new SemVer("0.0.0-0"); if (range.test(minver)) { return minver; } minver = null; for (var i2 = 0; i2 < range.set.length; ++i2) { var comparators = range.set[i2]; comparators.forEach(function(comparator) { var compver = new SemVer(comparator.semver.version); switch (comparator.operator) { case ">": if (compver.prerelease.length === 0) { compver.patch++; } else { compver.prerelease.push(0); } compver.raw = compver.format(); case "": case ">=": if (!minver || gt(minver, compver)) { minver = compver; } break; case "<": case "<=": break; default: throw new Error("Unexpected operation: " + comparator.operator); } }); } if (minver && range.test(minver)) { return minver; } return null; } exports2.validRange = validRange; function validRange(range, options) { try { return new Range(range, options).range || "*"; } catch (er) { return null; } } exports2.ltr = ltr; function ltr(version, range, options) { return outside(version, range, "<", options); } exports2.gtr = gtr; function gtr(version, range, options) { return outside(version, range, ">", options); } exports2.outside = outside; function outside(version, range, hilo, options) { version = new SemVer(version, options); range = new Range(range, options); var gtfn, ltefn, ltfn, comp, ecomp; switch (hilo) { case ">": gtfn = gt; ltefn = lte; ltfn = lt; comp = ">"; ecomp = ">="; break; case "<": gtfn = lt; ltefn = gte; ltfn = gt; comp = "<"; ecomp = "<="; break; default: throw new TypeError('Must provide a hilo val of "<" or ">"'); } if (satisfies(version, range, options)) { return false; } for (var i2 = 0; i2 < range.set.length; ++i2) { var comparators = range.set[i2]; var high = null; var low = null; comparators.forEach(function(comparator) { if (comparator.semver === ANY) { comparator = new Comparator(">=0.0.0"); } high = high || comparator; low = low || comparator; if (gtfn(comparator.semver, high.semver, options)) { high = comparator; } else if (ltfn(comparator.semver, low.semver, options)) { low = comparator; } }); if (high.operator === comp || high.operator === ecomp) { return false; } if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) { return false; } else if (low.operator === ecomp && ltfn(version, low.semver)) { return false; } } return true; } exports2.prerelease = prerelease; function prerelease(version, options) { var parsed = parse(version, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; } exports2.intersects = intersects; function intersects(r1, r2, options) { r1 = new Range(r1, options); r2 = new Range(r2, options); return r1.intersects(r2); } exports2.coerce = coerce; function coerce(version, options) { if (version instanceof SemVer) { return version; } if (typeof version === "number") { version = String(version); } if (typeof version !== "string") { return null; } options = options || {}; var match = null; if (!options.rtl) { match = version.match(re[t.COERCE]); } else { var next; while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) { if (!match || next.index + next[0].length !== match.index + match[0].length) { match = next; } re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; } re[t.COERCERTL].lastIndex = -1; } if (match === null) { return null; } return parse(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options); } } }); // ../../node_modules/make-dir/index.js var require_make_dir2 = __commonJS({ "../../node_modules/make-dir/index.js"(exports2, module2) { "use strict"; var fs2 = require("fs"); var path2 = require("path"); var { promisify } = require("util"); var semver2 = require_semver3(); var useNativeRecursiveOption = semver2.satisfies(process.version, ">=10.12.0"); var checkPath = (pth) => { if (process.platform === "win32") { const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path2.parse(pth).root, "")); if (pathHasInvalidWinCharacters) { const error = new Error(`Path contains invalid characters: ${pth}`); error.code = "EINVAL"; throw error; } } }; var processOptions = (options) => { const defaults = { mode: 511, fs: fs2 }; return __spreadValues(__spreadValues({}, defaults), options); }; var permissionError = (pth) => { const error = new Error(`operation not permitted, mkdir '${pth}'`); error.code = "EPERM"; error.errno = -4048; error.path = pth; error.syscall = "mkdir"; return error; }; var makeDir = async (input, options) => { checkPath(input); options = processOptions(options); const mkdir = promisify(options.fs.mkdir); const stat = promisify(options.fs.stat); if (useNativeRecursiveOption && options.fs.mkdir === fs2.mkdir) { const pth = path2.resolve(input); await mkdir(pth, { mode: options.mode, recursive: true }); return pth; } const make = async (pth) => { try { await mkdir(pth, options.mode); return pth; } catch (error) { if (error.code === "EPERM") { throw error; } if (error.code === "ENOENT") { if (path2.dirname(pth) === pth) { throw permissionError(pth); } if (error.message.includes("null bytes")) { throw error; } await make(path2.dirname(pth)); return make(pth); } try { const stats = await stat(pth); if (!stats.isDirectory()) { throw new Error("The path is not a directory"); } } catch (_) { throw error; } return pth; } }; return make(path2.resolve(input)); }; module2.exports = makeDir; module2.exports.sync = (input, options) => { checkPath(input); options = processOptions(options); if (useNativeRecursiveOption && options.fs.mkdirSync === fs2.mkdirSync) { const pth = path2.resolve(input); fs2.mkdirSync(pth, { mode: options.mode, recursive: true }); return pth; } const make = (pth) => { try { options.fs.mkdirSync(pth, options.mode); } catch (error) { if (error.code === "EPERM") { throw error; } if (error.code === "ENOENT") { if (path2.dirname(pth) === pth) { throw permissionError(pth); } if (error.message.includes("null bytes")) { throw error; } make(path2.dirname(pth)); return make(pth); } try { if (!options.fs.statSync(pth).isDirectory()) { throw new Error("The path is not a directory"); } } catch (_) { throw error; } } return pth; }; return make(path2.resolve(input)); }; } }); // ../../node_modules/xdg-basedir/index.js var require_xdg_basedir = __commonJS({ "../../node_modules/xdg-basedir/index.js"(exports2) { "use strict"; var os = require("os"); var path2 = require("path"); var homeDirectory = os.homedir(); var { env } = process; exports2.data = env.XDG_DATA_HOME || (homeDirectory ? path2.join(homeDirectory, ".local", "share") : void 0); exports2.config = env.XDG_CONFIG_HOME || (homeDirectory ? path2.join(homeDirectory, ".config") : void 0); exports2.cache = env.XDG_CACHE_HOME || (homeDirectory ? path2.join(homeDirectory, ".cache") : void 0); exports2.runtime = env.XDG_RUNTIME_DIR || void 0; exports2.dataDirs = (env.XDG_DATA_DIRS || "/usr/local/share/:/usr/share/").split(":"); if (exports2.data) { exports2.dataDirs.unshift(exports2.data); } exports2.configDirs = (env.XDG_CONFIG_DIRS || "/etc/xdg").split(":"); if (exports2.config) { exports2.configDirs.unshift(exports2.config); } } }); // ../../node_modules/imurmurhash/imurmurhash.js var require_imurmurhash = __commonJS({ "../../node_modules/imurmurhash/imurmurhash.js"(exports2, module2) { (function() { var cache; function MurmurHash3(key, seed) { var m = this instanceof MurmurHash3 ? this : cache; m.reset(seed); if (typeof key === "string" && key.length > 0) { m.hash(key); } if (m !== this) { return m; } } ; MurmurHash3.prototype.hash = function(key) { var h1, k1, i, top, len; len = key.length; this.len += len; k1 = this.k1; i = 0; switch (this.rem) { case 0: k1 ^= len > i ? key.charCodeAt(i++) & 65535 : 0; case 1: k1 ^= len > i ? (key.charCodeAt(i++) & 65535) << 8 : 0; case 2: k1 ^= len > i ? (key.charCodeAt(i++) & 65535) << 16 : 0; case 3: k1 ^= len > i ? (key.charCodeAt(i) & 255) << 24 : 0; k1 ^= len > i ? (key.charCodeAt(i++) & 65280) >> 8 : 0; } this.rem = len + this.rem & 3; len -= this.rem; if (len > 0) { h1 = this.h1; while (1) { k1 = k1 * 11601 + (k1 & 65535) * 3432906752 & 4294967295; k1 = k1 << 15 | k1 >>> 17; k1 = k1 * 13715 + (k1 & 65535) * 461832192 & 4294967295; h1 ^= k1; h1 = h1 << 13 | h1 >>> 19; h1 = h1 * 5 + 3864292196 & 4294967295; if (i >= len) { break; } k1 = key.charCodeAt(i++) & 65535 ^ (key.charCodeAt(i++) & 65535) << 8 ^ (key.charCodeAt(i++) & 65535) << 16; top = key.charCodeAt(i++); k1 ^= (top & 255) << 24 ^ (top & 65280) >> 8; } k1 = 0; switch (this.rem) { case 3: k1 ^= (key.charCodeAt(i + 2) & 65535) << 16; case 2: k1 ^= (key.charCodeAt(i + 1) & 65535) << 8; case 1: k1 ^= key.charCodeAt(i) & 65535; } this.h1 = h1; } this.k1 = k1; return this; }; MurmurHash3.prototype.result = function() { var k1, h1; k1 = this.k1; h1 = this.h1; if (k1 > 0) { k1 = k1 * 11601 + (k1 & 65535) * 3432906752 & 4294967295; k1 = k1 << 15 | k1 >>> 17; k1 = k1 * 13715 + (k1 & 65535) * 461832192 & 4294967295; h1 ^= k1; } h1 ^= this.len; h1 ^= h1 >>> 16; h1 = h1 * 51819 + (h1 & 65535) * 2246770688 & 4294967295; h1 ^= h1 >>> 13; h1 = h1 * 44597 + (h1 & 65535) * 3266445312 & 4294967295; h1 ^= h1 >>> 16; return h1 >>> 0; }; MurmurHash3.prototype.reset = function(seed) { this.h1 = typeof seed === "number" ? seed : 0; this.rem = this.k1 = this.len = 0; return this; }; cache = new MurmurHash3(); if (typeof module2 != "undefined") { module2.exports = MurmurHash3; } else { this.MurmurHash3 = MurmurHash3; } })(); } }); // ../../node_modules/signal-exit/signals.js var require_signals = __commonJS({ "../../node_modules/signal-exit/signals.js"(exports2, module2) { module2.exports = [ "SIGABRT", "SIGALRM", "SIGHUP", "SIGINT", "SIGTERM" ]; if (process.platform !== "win32") { module2.exports.push("SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT"); } if (process.platform === "linux") { module2.exports.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT", "SIGUNUSED"); } } }); // ../../node_modules/signal-exit/index.js var require_signal_exit = __commonJS({ "../../node_modules/signal-exit/index.js"(exports2, module2) { var assert = require("assert"); var signals = require_signals(); var isWin = /^win/i.test(process.platform); var EE = require("events"); if (typeof EE !== "function") { EE = EE.EventEmitter; } var emitter; if (process.__signal_exit_emitter__) { emitter = process.__signal_exit_emitter__; } else { emitter = process.__signal_exit_emitter__ = new EE(); emitter.count = 0; emitter.emitted = {}; } if (!emitter.infinite) { emitter.setMaxListeners(Infinity); emitter.infinite = true; } module2.exports = function(cb, opts) { assert.equal(typeof cb, "function", "a callback must be provided for exit handler"); if (loaded === false) { load(); } var ev = "exit"; if (opts && opts.alwaysLast) { ev = "afterexit"; } var remove = function() { emitter.removeListener(ev, cb); if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) { unload(); } }; emitter.on(ev, cb); return remove; }; module2.exports.unload = unload; function unload() { if (!loaded) { return; } loaded = false; signals.forEach(function(sig) { try { process.removeListener(sig, sigListeners[sig]); } catch (er) { } }); process.emit = originalProcessEmit; process.reallyExit = originalProcessReallyExit; emitter.count -= 1; } function emit(event, code, signal) { if (emitter.emitted[event]) { return; } emitter.emitted[event] = true; emitter.emit(event, code, signal); } var sigListeners = {}; signals.forEach(function(sig) { sigListeners[sig] = function listener() { var listeners = process.listeners(sig); if (listeners.length === emitter.count) { unload(); emit("exit", null, sig); emit("afterexit", null, sig); if (isWin && sig === "SIGHUP") { sig = "SIGINT"; } process.kill(process.pid, sig); } }; }); module2.exports.signals = function() { return signals; }; module2.exports.load = load; var loaded = false; function load() { if (loaded) { return; } loaded = true; emitter.count += 1; signals = signals.filter(function(sig) { try { process.on(sig, sigListeners[sig]); return true; } catch (er) { return false; } }); process.emit = processEmit; process.reallyExit = processReallyExit; } var originalProcessReallyExit = process.reallyExit; function processReallyExit(code) { process.exitCode = code || 0; emit("exit", process.exitCode, null); emit("afterexit", process.exitCode, null); originalProcessReallyExit.call(process, process.exitCode); } var originalProcessEmit = process.emit; function processEmit(ev, arg) { if (ev === "exit") { if (arg !== void 0) { process.exitCode = arg; } var ret = originalProcessEmit.apply(this, arguments); emit("exit", process.exitCode, null); emit("afterexit", process.exitCode, null); return ret; } else { return originalProcessEmit.apply(this, arguments); } } } }); // ../../node_modules/is-typedarray/index.js var require_is_typedarray = __commonJS({ "../../node_modules/is-typedarray/index.js"(exports2, module2) { module2.exports = isTypedArray; isTypedArray.strict = isStrictTypedArray; isTypedArray.loose = isLooseTypedArray; var toString = Object.prototype.toString; var names = { "[object Int8Array]": true, "[object Int16Array]": true, "[object Int32Array]": true, "[object Uint8Array]": true, "[object Uint8ClampedArray]": true, "[object Uint16Array]": true, "[object Uint32Array]": true, "[object Float32Array]": true, "[object Float64Array]": true }; function isTypedArray(arr) { return isStrictTypedArray(arr) || isLooseTypedArray(arr); } function isStrictTypedArray(arr) { return arr instanceof Int8Array || arr instanceof Int16Array || arr instanceof Int32Array || arr instanceof Uint8Array || arr instanceof Uint8ClampedArray || arr instanceof Uint16Array || arr instanceof Uint32Array || arr instanceof Float32Array || arr instanceof Float64Array; } function isLooseTypedArray(arr) { return names[toString.call(arr)]; } } }); // ../../node_modules/typedarray-to-buffer/index.js var require_typedarray_to_buffer = __commonJS({ "../../node_modules/typedarray-to-buffer/index.js"(exports2, module2) { var isTypedArray = require_is_typedarray().strict; module2.exports = function typedarrayToBuffer(arr) { if (isTypedArray(arr)) { var buf = Buffer.from(arr.buffer); if (arr.byteLength !== arr.buffer.byteLength) { buf = buf.slice(arr.byteOffset, arr.byteOffset + arr.byteLength); } return buf; } else { return Buffer.from(arr); } }; } }); // ../../node_modules/configstore/node_modules/write-file-atomic/index.js var require_write_file_atomic = __commonJS({ "../../node_modules/configstore/node_modules/write-file-atomic/index.js"(exports2, module2) { "use strict"; module2.exports = writeFile; module2.exports.sync = writeFileSync; module2.exports._getTmpname = getTmpname; module2.exports._cleanupOnExit = cleanupOnExit; var fs2 = require("fs"); var MurmurHash3 = require_imurmurhash(); var onExit = require_signal_exit(); var path2 = require("path"); var isTypedArray = require_is_typedarray(); var typedArrayToBuffer = require_typedarray_to_buffer(); var { promisify } = require("util"); var activeFiles = {}; var threadId = function getId() { try { const workerThreads = require("worker_threads"); return workerThreads.threadId; } catch (e) { return 0; } }(); var invocations = 0; function getTmpname(filename) { return filename + "." + MurmurHash3(__filename).hash(String(process.pid)).hash(String(threadId)).hash(String(++invocations)).result(); } function cleanupOnExit(tmpfile) { return () => { try { fs2.unlinkSync(typeof tmpfile === "function" ? tmpfile() : tmpfile); } catch (_) { } }; } function serializeActiveFile(absoluteName) { return new Promise((resolve) => { if (!activeFiles[absoluteName]) activeFiles[absoluteName] = []; activeFiles[absoluteName].push(resolve); if (activeFiles[absoluteName].length === 1) resolve(); }); } function isChownErrOk(err) { if (err.code === "ENOSYS") { return true; } const nonroot = !process.getuid || process.getuid() !== 0; if (nonroot) { if (err.code === "EINVAL" || err.code === "EPERM") { return true; } } return false; } async function writeFileAsync(filename, data, options = {}) { if (typeof options === "string") { options = { encoding: options }; } let fd; let tmpfile; const removeOnExitHandler = onExit(cleanupOnExit(() => tmpfile)); const absoluteName = path2.resolve(filename); try { await serializeActiveFile(absoluteName); const truename = await promisify(fs2.realpath)(filename).catch(() => filename); tmpfile = getTmpname(truename); if (!options.mode || !options.chown) { const stats = await promisify(fs2.stat)(truename).catch(() => { }); if (stats) { if (options.mode == null) { options.mode = stats.mode; } if (options.chown == null && process.getuid) { options.chown = { uid: stats.uid, gid: stats.gid }; } } } fd = await promisify(fs2.open)(tmpfile, "w", options.mode); if (options.tmpfileCreated) { await options.tmpfileCreated(tmpfile); } if (isTypedArray(data)) { data = typedArrayToBuffer(data); } if (Buffer.isBuffer(data)) { await promisify(fs2.write)(fd, data, 0, data.length, 0); } else if (data != null) { await promisify(fs2.write)(fd, String(data), 0, String(options.encoding || "utf8")); } if (options.fsync !== false) { await promisify(fs2.fsync)(fd); } await promisify(fs2.close)(fd); fd = null; if (options.chown) { await promisify(fs2.chown)(tmpfile, options.chown.uid, options.chown.gid).catch((err) => { if (!isChownErrOk(err)) { throw err; } }); } if (options.mode) { await promisify(fs2.chmod)(tmpfile, options.mode).catch((err) => { if (!isChownErrOk(err)) { throw err; } }); } await promisify(fs2.rename)(tmpfile, truename); } finally { if (fd) { await promisify(fs2.close)(fd).catch(() => { }); } removeOnExitHandler(); await promisify(fs2.unlink)(tmpfile).catch(() => { }); activeFiles[absoluteName].shift(); if (activeFiles[absoluteName].length > 0) { activeFiles[absoluteName][0](); } else delete activeFiles[absoluteName]; } } function writeFile(filename, data, options, callback) { if (options instanceof Function) { callback = options; options = {}; } const promise = writeFileAsync(filename, data, options); if (callback) { promise.then(callback, callback); } return promise; } function writeFileSync(filename, data, options) { if (typeof options === "string") options = { encoding: options }; else if (!options) options = {}; try { filename = fs2.realpathSync(filename); } catch (ex) { } const tmpfile = getTmpname(filename); if (!options.mode || !options.chown) { try { const stats = fs2.statSync(filename); options = Object.assign({}, options); if (!options.mode) { options.mode = stats.mode; } if (!options.chown && process.getuid) { options.chown = { uid: stats.uid, gid: stats.gid }; } } catch (ex) { } } let fd; const cleanup = cleanupOnExit(tmpfile); const removeOnExitHandler = onExit(cleanup); let threw = true; try { fd = fs2.openSync(tmpfile, "w", options.mode || 438); if (options.tmpfileCreated) { options.tmpfileCreated(tmpfile); } if (isTypedArray(data)) { data = typedArrayToBuffer(data); } if (Buffer.isBuffer(data)) { fs2.writeSync(fd, data, 0, data.length, 0); } else if (data != null) { fs2.writeSync(fd, String(data), 0, String(options.encoding || "utf8")); } if (options.fsync !== false) { fs2.fsyncSync(fd); } fs2.closeSync(fd); fd = null; if (options.chown) { try { fs2.chownSync(tmpfile, options.chown.uid, options.chown.gid); } catch (err) { if (!isChownErrOk(err)) { throw err; } } } if (options.mode) { try { fs2.chmodSync(tmpfile, options.mode); } catch (err) { if (!isChownErrOk(err)) { throw err; } } } fs2.renameSync(tmpfile, filename); threw = false; } finally { if (fd) { try { fs2.closeSync(fd); } catch (ex) { } } removeOnExitHandler(); if (threw) { cleanup(); } } } } }); // ../../node_modules/dot-prop/node_modules/is-obj/index.js var require_is_obj = __commonJS({ "../../node_modules/dot-prop/node_modules/is-obj/index.js"(exports2, module2) { "use strict"; module2.exports = (value) => { const type = typeof value; return value !== null && (type === "object" || type === "function"); }; } }); // ../../node_modules/dot-prop/index.js var require_dot_prop = __commonJS({ "../../node_modules/dot-prop/index.js"(exports2, module2) { "use strict"; var isObj = require_is_obj(); var disallowedKeys = [ "__proto__", "prototype", "constructor" ]; var isValidPath = (pathSegments) => !pathSegments.some((segment) => disallowedKeys.includes(segment)); function getPathSegments(path2) { const pathArray = path2.split("."); const parts = []; for (let i = 0; i < pathArray.length; i++) { let p = pathArray[i]; while (p[p.length - 1] === "\\" && pathArray[i + 1] !== void 0) { p = p.slice(0, -1) + "."; p += pathArray[++i]; } parts.push(p); } if (!isValidPath(parts)) { return []; } return parts; } module2.exports = { get(object, path2, value) { if (!isObj(object) || typeof path2 !== "string") { return value === void 0 ? object : value; } const pathArray = getPathSegments(path2); if (pathArray.length === 0) { return; } for (let i = 0; i < pathArray.length; i++) { if (!Object.prototype.propertyIsEnumerable.call(object, pathArray[i])) { return value; } object = object[pathArray[i]]; if (object === void 0 || object === null) { if (i !== pathArray.length - 1) { return value; } break; } } return object; }, set(object, path2, value) { if (!isObj(object) || typeof path2 !== "string") { return object; } const root = object; const pathArray = getPathSegments(path2); for (let i = 0; i < pathArray.length; i++) { const p = pathArray[i]; if (!isObj(object[p])) { object[p] = {}; } if (i === pathArray.length - 1) { object[p] = value; } object = object[p]; } return root; }, delete(object, path2) { if (!isObj(object) || typeof path2 !== "string") { return; } const pathArray = getPathSegments(path2); for (let i = 0; i < pathArray.length; i++) { const p = pathArray[i]; if (i === pathArray.length - 1) { delete object[p]; return; } object = object[p]; if (!isObj(object)) { return; } } }, has(object, path2) { if (!isObj(object) || typeof path2 !== "string") { return false; } const pathArray = getPathSegments(path2); if (pathArray.length === 0) { return false; } for (let i = 0; i < pathArray.length; i++) { if (isObj(object)) { if (!(pathArray[i] in object)) { return false; } object = object[pathArray[i]]; } else { return false; } } return true; } }; } }); // ../../node_modules/crypto-random-string/index.js var require_crypto_random_string = __commonJS({ "../../node_modules/crypto-random-string/index.js"(exports2, module2) { "use strict"; var crypto = require("crypto"); module2.exports = (length) => { if (!Number.isFinite(length)) { throw new TypeError("Expected a finite number"); } return crypto.randomBytes(Math.ceil(length / 2)).toString("hex").slice(0, length); }; } }); // ../../node_modules/unique-string/index.js var require_unique_string = __commonJS({ "../../node_modules/unique-string/index.js"(exports2, module2) { "use strict"; var cryptoRandomString = require_crypto_random_string(); module2.exports = () => cryptoRandomString(32); } }); // ../../node_modules/configstore/index.js var require_configstore = __commonJS({ "../../node_modules/configstore/index.js"(exports2, module2) { "use strict"; var path2 = require("path"); var os = require("os"); var fs2 = require_graceful_fs(); var makeDir = require_make_dir2(); var xdgBasedir = require_xdg_basedir(); var writeFileAtomic = require_write_file_atomic(); var dotProp = require_dot_prop(); var uniqueString = require_unique_string(); var configDirectory = xdgBasedir.config || path2.join(os.tmpdir(), uniqueString()); var permissionError = "You don't have access to this file."; var makeDirOptions = { mode: 448 }; var writeFileOptions = { mode: 384 }; var Configstore = class { constructor(id, defaults, options = {}) { const pathPrefix = options.globalConfigPath ? path2.join(id, "config.json") : path2.join("configstore", `${id}.json`); this.path = options.configPath || path2.join(configDirectory, pathPrefix); if (defaults) { this.all = __spreadValues(__spreadValues({}, defaults), this.all); } } get all() { try { return JSON.parse(fs2.readFileSync(this.path, "utf8")); } catch (error) { if (error.code === "ENOENT") { return {}; } if (error.code === "EACCES") { error.message = `${error.message} ${permissionError} `; } if (error.name === "SyntaxError") { writeFileAtomic.sync(this.path, "", writeFileOptions); return {}; } throw error; } } set all(value) { try { makeDir.sync(path2.dirname(this.path), makeDirOptions); writeFileAtomic.sync(this.path, JSON.stringify(value, void 0, " "), writeFileOptions); } catch (error) { if (error.code === "EACCES") { error.message = `${error.message} ${permissionError} `; } throw error; } } get size() { return Object.keys(this.all || {}).length; } get(key) { return dotProp.get(this.all, key); } set(key, value) { const config = this.all; if (arguments.length === 1) { for (const k of Object.keys(key)) { dotProp.set(config, k, key[k]); } } else { dotProp.set(config, key, value); } this.all = config; } has(key) { return dotProp.has(this.all, key); } delete(key) { const config = this.all; dotProp.delete(config, key); this.all = config; } clear() { this.all = {}; } }; module2.exports = Configstore; } }); // ../../node_modules/@sindresorhus/is/dist/index.js var require_dist = __commonJS({ "../../node_modules/@sindresorhus/is/dist/index.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var typedArrayTypeNames = [ "Int8Array", "Uint8Array", "Uint8ClampedArray", "Int16Array", "Uint16Array", "Int32Array", "Uint32Array", "Float32Array", "Float64Array", "BigInt64Array", "BigUint64Array" ]; function isTypedArrayName(name) { return typedArrayTypeNames.includes(name); } var objectTypeNames = [ "Function", "Generator", "AsyncGenerator", "GeneratorFunction", "AsyncGeneratorFunction", "AsyncFunction", "Observable", "Array", "Buffer", "Object", "RegExp", "Date", "Error", "Map", "Set", "WeakMap", "WeakSet", "ArrayBuffer", "SharedArrayBuffer", "DataView", "Promise", "URL", "HTMLElement", ...typedArrayTypeNames ]; function isObjectTypeName(name) { return objectTypeNames.includes(name); } var primitiveTypeNames = [ "null", "undefined", "string", "number", "bigint", "boolean", "symbol" ]; function isPrimitiveTypeName(name) { return primitiveTypeNames.includes(name); } function isOfType(type) { return (value) => typeof value === type; } var { toString } = Object.prototype; var getObjectType = (value) => { const objectTypeName = toString.call(value).slice(8, -1); if (/HTML\w+Element/.test(objectTypeName) && is.domElement(value)) { return "HTMLElement"; } if (isObjectTypeName(objectTypeName)) { return objectTypeName; } return void 0; }; var isObjectOfType = (type) => (value) => getObjectType(value) === type; function is(value) { if (value === null) { return "null"; } switch (typeof value) { case "undefined": return "undefined"; case "string": return "string"; case "number": return "number"; case "boolean": return "boolean"; case "function": return "Function"; case "bigint": return "bigint"; case "symbol": return "symbol"; default: } if (is.observable(value)) { return "Observable"; } if (is.array(value)) { return "Array"; } if (is.buffer(value)) { return "Buffer"; } const tagType = getObjectType(value); if (tagType) { return tagType; } if (value instanceof String || value instanceof Boolean || value instanceof Number) { throw new TypeError("Please don't use object wrappers for primitive types"); } return "Object"; } is.undefined = isOfType("undefined"); is.string = isOfType("string"); var isNumberType = isOfType("number"); is.number = (value) => isNumberType(value) && !is.nan(value); is.bigint = isOfType("bigint"); is.function_ = isOfType("function"); is.null_ = (value) => value === null; is.class_ = (value) => is.function_(value) && value.toString().startsWith("class "); is.boolean = (value) => value === true || value === false; is.symbol = isOfType("symbol"); is.numericString = (value) => is.string(value) && !is.emptyStringOrWhitespace(value) && !Number.isNaN(Number(value)); is.array = (value, assertion) => { if (!Array.isArray(value)) { return false; } if (!is.function_(assertion)) { return true; } return value.every(assertion); }; is.buffer = (value) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = value) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.isBuffer) === null || _c === void 0 ? void 0 : _c.call(_b, value)) !== null && _d !== void 0 ? _d : false; }; is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value); is.object = (value) => !is.null_(value) && (typeof value === "object" || is.function_(value)); is.iterable = (value) => { var _a; return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a[Symbol.iterator]); }; is.asyncIterable = (value) => { var _a; return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a[Symbol.asyncIterator]); }; is.generator = (value) => is.iterable(value) && is.function_(value.next) && is.function_(value.throw); is.asyncGenerator = (value) => is.asyncIterable(value) && is.function_(value.next) && is.function_(value.throw); is.nativePromise = (value) => isObjectOfType("Promise")(value); var hasPromiseAPI = (value) => { var _a, _b; return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a.then) && is.function_((_b = value) === null || _b === void 0 ? void 0 : _b.catch); }; is.promise = (value) => is.nativePromise(value) || hasPromiseAPI(value); is.generatorFunction = isObjectOfType("GeneratorFunction"); is.asyncGeneratorFunction = (value) => getObjectType(value) === "AsyncGeneratorFunction"; is.asyncFunction = (value) => getObjectType(value) === "AsyncFunction"; is.boundFunction = (value) => is.function_(value) && !value.hasOwnProperty("prototype"); is.regExp = isObjectOfType("RegExp"); is.date = isObjectOfType("Date"); is.error = isObjectOfType("Error"); is.map = (value) => isObjectOfType("Map")(value); is.set = (value) => isObjectOfType("Set")(value); is.weakMap = (value) => isObjectOfType("WeakMap")(value); is.weakSet = (value) => isObjectOfType("WeakSet")(value); is.int8Array = isObjectOfType("Int8Array"); is.uint8Array = isObjectOfType("Uint8Array"); is.uint8ClampedArray = isObjectOfType("Uint8ClampedArray"); is.int16Array = isObjectOfType("Int16Array"); is.uint16Array = isObjectOfType("Uint16Array"); is.int32Array = isObjectOfType("Int32Array"); is.uint32Array = isObjectOfType("Uint32Array"); is.float32Array = isObjectOfType("Float32Array"); is.float64Array = isObjectOfType("Float64Array"); is.bigInt64Array = isObjectOfType("BigInt64Array"); is.bigUint64Array = isObjectOfType("BigUint64Array"); is.arrayBuffer = isObjectOfType("ArrayBuffer"); is.sharedArrayBuffer = isObjectOfType("SharedArrayBuffer"); is.dataView = isObjectOfType("DataView"); is.directInstanceOf = (instance, class_) => Object.getPrototypeOf(instance) === class_.prototype; is.urlInstance = (value) => isObjectOfType("URL")(value); is.urlString = (value) => { if (!is.string(value)) { return false; } try { new URL(value); return true; } catch (_a) { return false; } }; is.truthy = (value) => Boolean(value); is.falsy = (value) => !value; is.nan = (value) => Number.isNaN(value); is.primitive = (value) => is.null_(value) || isPrimitiveTypeName(typeof value); is.integer = (value) => Number.isInteger(value); is.safeInteger = (value) => Number.isSafeInteger(value); is.plainObject = (value) => { if (toString.call(value) !== "[object Object]") { return false; } const prototype = Object.getPrototypeOf(value); return prototype === null || prototype === Object.getPrototypeOf({}); }; is.typedArray = (value) => isTypedArrayName(getObjectType(value)); var isValidLength = (value) => is.safeInteger(value) && value >= 0; is.arrayLike = (value) => !is.nullOrUndefined(value) && !is.function_(value) && isValidLength(value.length); is.inRange = (value, range) => { if (is.number(range)) { return value >= Math.min(0, range) && value <= Math.max(range, 0); } if (is.array(range) && range.length === 2) { return value >= Math.min(...range) && value <= Math.max(...range); } throw new TypeError(`Invalid range: ${JSON.stringify(range)}`); }; var NODE_TYPE_ELEMENT = 1; var DOM_PROPERTIES_TO_CHECK = [ "innerHTML", "ownerDocument", "style", "attributes", "nodeValue" ]; is.domElement = (value) => { return is.object(value) && value.nodeType === NODE_TYPE_ELEMENT && is.string(value.nodeName) && !is.plainObject(value) && DOM_PROPERTIES_TO_CHECK.every((property) => property in value); }; is.observable = (value) => { var _a, _b, _c, _d; if (!value) { return false; } if (value === ((_b = (_a = value)[Symbol.observable]) === null || _b === void 0 ? void 0 : _b.call(_a))) { return true; } if (value === ((_d = (_c = value)["@@observable"]) === null || _d === void 0 ? void 0 : _d.call(_c))) { return true; } return false; }; is.nodeStream = (value) => is.object(value) && is.function_(value.pipe) && !is.observable(value); is.infinite = (value) => value === Infinity || value === -Infinity; var isAbsoluteMod2 = (remainder) => (value) => is.integer(value) && Math.abs(value % 2) === remainder; is.evenInteger = isAbsoluteMod2(0); is.oddInteger = isAbsoluteMod2(1); is.emptyArray = (value) => is.array(value) && value.length === 0; is.nonEmptyArray = (value) => is.array(value) && value.length > 0; is.emptyString = (value) => is.string(value) && value.length === 0; is.nonEmptyString = (value) => is.string(value) && value.length > 0; var isWhiteSpaceString = (value) => is.string(value) && !/\S/.test(value); is.emptyStringOrWhitespace = (value) => is.emptyString(value) || isWhiteSpaceString(value); is.emptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length === 0; is.nonEmptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length > 0; is.emptySet = (value) => is.set(value) && value.size === 0; is.nonEmptySet = (value) => is.set(value) && value.size > 0; is.emptyMap = (value) => is.map(value) && value.size === 0; is.nonEmptyMap = (value) => is.map(value) && value.size > 0; var predicateOnArray = (method, predicate, values) => { if (!is.function_(predicate)) { throw new TypeError(`Invalid predicate: ${JSON.stringify(predicate)}`); } if (values.length === 0) { throw new TypeError("Invalid number of values"); } return method.call(values, predicate); }; is.any = (predicate, ...values) => { const predicates = is.array(predicate) ? predicate : [predicate]; return predicates.some((singlePredicate) => predicateOnArray(Array.prototype.some, singlePredicate, values)); }; is.all = (predicate, ...values) => predicateOnArray(Array.prototype.every, predicate, values); var assertType = (condition, description, value) => { if (!condition) { throw new TypeError(`Expected value which is \`${description}\`, received value of type \`${is(value)}\`.`); } }; exports2.assert = { undefined: (value) => assertType(is.undefined(value), "undefined", value), string: (value) => assertType(is.string(value), "string", value), number: (value) => assertType(is.number(value), "number", value), bigint: (value) => assertType(is.bigint(value), "bigint", value), function_: (value) => assertType(is.function_(value), "Function", value), null_: (value) => assertType(is.null_(value), "null", value), class_: (value) => assertType(is.class_(value), "Class", value), boolean: (value) => assertType(is.boolean(value), "boolean", value), symbol: (value) => assertType(is.symbol(value), "symbol", value), numericString: (value) => assertType(is.numericString(value), "string with a number", value), array: (value, assertion) => { const assert = assertType; assert(is.array(value), "Array", value); if (assertion) { value.forEach(assertion); } }, buffer: (value) => assertType(is.buffer(value), "Buffer", value), nullOrUndefined: (value) => assertType(is.nullOrUndefined(value), "null or undefined", value), object: (value) => assertType(is.object(value), "Object", value), iterable: (value) => assertType(is.iterable(value), "Iterable", value), asyncIterable: (value) => assertType(is.asyncIterable(value), "AsyncIterable", value), generator: (value) => assertType(is.generator(value), "Generator", value), asyncGenerator: (value) => assertType(is.asyncGenerator(value), "AsyncGenerator", value), nativePromise: (value) => assertType(is.nativePromise(value), "native Promise", value), promise: (value) => assertType(is.promise(value), "Promise", value), generatorFunction: (value) => assertType(is.generatorFunction(value), "GeneratorFunction", value), asyncGeneratorFunction: (value) => assertType(is.asyncGeneratorFunction(value), "AsyncGeneratorFunction", value), asyncFunction: (value) => assertType(is.asyncFunction(value), "AsyncFunction", value), boundFunction: (value) => assertType(is.boundFunction(value), "Function", value), regExp: (value) => assertType(is.regExp(value), "RegExp", value), date: (value) => assertType(is.date(value), "Date", value), error: (value) => assertType(is.error(value), "Error", value), map: (value) => assertType(is.map(value), "Map", value), set: (value) => assertType(is.set(value), "Set", value), weakMap: (value) => assertType(is.weakMap(value), "WeakMap", value), weakSet: (value) => assertType(is.weakSet(value), "WeakSet", value), int8Array: (value) => assertType(is.int8Array(value), "Int8Array", value), uint8Array: (value) => assertType(is.uint8Array(value), "Uint8Array", value), uint8ClampedArray: (value) => assertType(is.uint8ClampedArray(value), "Uint8ClampedArray", value), int16Array: (value) => assertType(is.int16Array(value), "Int16Array", value), uint16Array: (value) => assertType(is.uint16Array(value), "Uint16Array", value), int32Array: (value) => assertType(is.int32Array(value), "Int32Array", value), uint32Array: (value) => assertType(is.uint32Array(value), "Uint32Array", value), float32Array: (value) => assertType(is.float32Array(value), "Float32Array", value), float64Array: (value) => assertType(is.float64Array(value), "Float64Array", value), bigInt64Array: (value) => assertType(is.bigInt64Array(value), "BigInt64Array", value), bigUint64Array: (value) => assertType(is.bigUint64Array(value), "BigUint64Array", value), arrayBuffer: (value) => assertType(is.arrayBuffer(value), "ArrayBuffer", value), sharedArrayBuffer: (value) => assertType(is.sharedArrayBuffer(value), "SharedArrayBuffer", value), dataView: (value) => assertType(is.dataView(value), "DataView", value), urlInstance: (value) => assertType(is.urlInstance(value), "URL", value), urlString: (value) => assertType(is.urlString(value), "string with a URL", value), truthy: (value) => assertType(is.truthy(value), "truthy", value), falsy: (value) => assertType(is.falsy(value), "falsy", value), nan: (value) => assertType(is.nan(value), "NaN", value), primitive: (value) => assertType(is.primitive(value), "primitive", value), integer: (value) => assertType(is.integer(value), "integer", value), safeInteger: (value) => assertType(is.safeInteger(value), "integer", value), plainObject: (value) => assertType(is.plainObject(value), "plain object", value), typedArray: (value) => assertType(is.typedArray(value), "TypedArray", value), arrayLike: (value) => assertType(is.arrayLike(value), "array-like", value), domElement: (value) => assertType(is.domElement(value), "HTMLElement", value), observable: (value) => assertType(is.observable(value), "Observable", value), nodeStream: (value) => assertType(is.nodeStream(value), "Node.js Stream", value), infinite: (value) => assertType(is.infinite(value), "infinite number", value), emptyArray: (value) => assertType(is.emptyArray(value), "empty array", value), nonEmptyArray: (value) => assertType(is.nonEmptyArray(value), "non-empty array", value), emptyString: (value) => assertType(is.emptyString(value), "empty string", value), nonEmptyString: (value) => assertType(is.nonEmptyString(value), "non-empty string", value), emptyStringOrWhitespace: (value) => assertType(is.emptyStringOrWhitespace(value), "empty string or whitespace", value), emptyObject: (value) => assertType(is.emptyObject(value), "empty object", value), nonEmptyObject: (value) => assertType(is.nonEmptyObject(value), "non-empty object", value), emptySet: (value) => assertType(is.emptySet(value), "empty set", value), nonEmptySet: (value) => assertType(is.nonEmptySet(value), "non-empty set", value), emptyMap: (value) => assertType(is.emptyMap(value), "empty map", value), nonEmptyMap: (value) => assertType(is.nonEmptyMap(value), "non-empty map", value), evenInteger: (value) => assertType(is.evenInteger(value), "even integer", value), oddInteger: (value) => assertType(is.oddInteger(value), "odd integer", value), directInstanceOf: (instance, class_) => assertType(is.directInstanceOf(instance, class_), "T", instance), inRange: (value, range) => assertType(is.inRange(value, range), "in range", value), any: (predicate, ...values) => assertType(is.any(predicate, ...values), "predicate returns truthy for any value", values), all: (predicate, ...values) => assertType(is.all(predicate, ...values), "predicate returns truthy for all values", values) }; Object.defineProperties(is, { class: { value: is.class_ }, function: { value: is.function_ }, null: { value: is.null_ } }); Object.defineProperties(exports2.assert, { class: { value: exports2.assert.class_ }, function: { value: exports2.assert.function_ }, null: { value: exports2.assert.null_ } }); exports2.default = is; module2.exports = is; module2.exports.default = is; module2.exports.assert = exports2.assert; } }); // ../../node_modules/p-cancelable/index.js var require_p_cancelable = __commonJS({ "../../node_modules/p-cancelable/index.js"(exports2, module2) { "use strict"; var CancelError = class extends Error { constructor(reason) { super(reason || "Promise was canceled"); this.name = "CancelError"; } get isCanceled() { return true; } }; var PCancelable = class { static fn(userFn) { return (...arguments_) => { return new PCancelable((resolve, reject, onCancel) => { arguments_.push(onCancel); userFn(...arguments_).then(resolve, reject); }); }; } constructor(executor) { this._cancelHandlers = []; this._isPending = true; this._isCanceled = false; this._rejectOnCancel = true; this._promise = new Promise((resolve, reject) => { this._reject = reject; const onResolve = (value) => { this._isPending = false; resolve(value); }; const onReject = (error) => { this._isPending = false; reject(error); }; const onCancel = (handler) => { if (!this._isPending) { throw new Error("The `onCancel` handler was attached after the promise settled."); } this._cancelHandlers.push(handler); }; Object.defineProperties(onCancel, { shouldReject: { get: () => this._rejectOnCancel, set: (boolean) => { this._rejectOnCancel = boolean; } } }); return executor(onResolve, onReject, onCancel); }); } then(onFulfilled, onRejected) { return this._promise.then(onFulfilled, onRejected); } catch(onRejected) { return this._promise.catch(onRejected); } finally(onFinally) { return this._promise.finally(onFinally); } cancel(reason) { if (!this._isPending || this._isCanceled) { return; } if (this._cancelHandlers.length > 0) { try { for (const handler of this._cancelHandlers) { handler(); } } catch (error) { this._reject(error); } } this._isCanceled = true; if (this._rejectOnCancel) { this._reject(new CancelError(reason)); } } get isCanceled() { return this._isCanceled; } }; Object.setPrototypeOf(PCancelable.prototype, Promise.prototype); module2.exports = PCancelable; module2.exports.CancelError = CancelError; } }); // ../../node_modules/defer-to-connect/dist/source/index.js var require_source = __commonJS({ "../../node_modules/defer-to-connect/dist/source/index.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var tls_1 = require("tls"); var deferToConnect = (socket, fn) => { let listeners; if (typeof fn === "function") { const connect = fn; listeners = { connect }; } else { listeners = fn; } const hasConnectListener = typeof listeners.connect === "function"; const hasSecureConnectListener = typeof listeners.secureConnect === "function"; const hasCloseListener = typeof listeners.close === "function"; const onConnect = () => { if (hasConnectListener) { listeners.connect(); } if (socket instanceof tls_1.TLSSocket && hasSecureConnectListener) { if (socket.authorized) { listeners.secureConnect(); } else if (!socket.authorizationError) { socket.once("secureConnect", listeners.secureConnect); } } if (hasCloseListener) { socket.once("close", listeners.close); } }; if (socket.writable && !socket.connecting) { onConnect(); } else if (socket.connecting) { socket.once("connect", onConnect); } else if (socket.destroyed && hasCloseListener) { listeners.close(socket._hadError); } }; exports2.default = deferToConnect; module2.exports = deferToConnect; module2.exports.default = deferToConnect; } }); // ../../node_modules/@szmarczak/http-timer/dist/source/index.js var require_source2 = __commonJS({ "../../node_modules/@szmarczak/http-timer/dist/source/index.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var defer_to_connect_1 = require_source(); var nodejsMajorVersion = Number(process.versions.node.split(".")[0]); var timer = (request) => { const timings = { start: Date.now(), socket: void 0, lookup: void 0, connect: void 0, secureConnect: void 0, upload: void 0, response: void 0, end: void 0, error: void 0, abort: void 0, phases: { wait: void 0, dns: void 0, tcp: void 0, tls: void 0, request: void 0, firstByte: void 0, download: void 0, total: void 0 } }; request.timings = timings; const handleError = (origin) => { const emit = origin.emit.bind(origin); origin.emit = (event, ...args) => { if (event === "error") { timings.error = Date.now(); timings.phases.total = timings.error - timings.start; origin.emit = emit; } return emit(event, ...args); }; }; handleError(request); request.prependOnceListener("abort", () => { timings.abort = Date.now(); if (!timings.response || nodejsMajorVersion >= 13) { timings.phases.total = Date.now() - timings.start; } }); const onSocket = (socket) => { timings.socket = Date.now(); timings.phases.wait = timings.socket - timings.start; const lookupListener = () => { timings.lookup = Date.now(); timings.phases.dns = timings.lookup - timings.socket; }; socket.prependOnceListener("lookup", lookupListener); defer_to_connect_1.default(socket, { connect: () => { timings.connect = Date.now(); if (timings.lookup === void 0) { socket.removeListener("lookup", lookupListener); timings.lookup = timings.connect; timings.phases.dns = timings.lookup - timings.socket; } timings.phases.tcp = timings.connect - timings.lookup; }, secureConnect: () => { timings.secureConnect = Date.now(); timings.phases.tls = timings.secureConnect - timings.connect; } }); }; if (request.socket) { onSocket(request.socket); } else { request.prependOnceListener("socket", onSocket); } const onUpload = () => { var _a; timings.upload = Date.now(); timings.phases.request = timings.upload - (_a = timings.secureConnect, _a !== null && _a !== void 0 ? _a : timings.connect); }; const writableFinished = () => { if (typeof request.writableFinished === "boolean") { return request.writableFinished; } return request.finished && request.outputSize === 0 && (!request.socket || request.socket.writableLength === 0); }; if (writableFinished()) { onUpload(); } else { request.prependOnceListener("finish", onUpload); } request.prependOnceListener("response", (response) => { timings.response = Date.now(); timings.phases.firstByte = timings.response - timings.upload; response.timings = timings; handleError(response); response.prependOnceListener("end", () => { timings.end = Date.now(); timings.phases.download = timings.end - timings.response; timings.phases.total = timings.end - timings.start; }); }); return timings; }; exports2.default = timer; module2.exports = timer; module2.exports.default = timer; } }); // ../../node_modules/cacheable-lookup/source/index.js var require_source3 = __commonJS({ "../../node_modules/cacheable-lookup/source/index.js"(exports2, module2) { "use strict"; var { V4MAPPED, ADDRCONFIG, ALL, promises: { Resolver: AsyncResolver }, lookup: dnsLookup } = require("dns"); var { promisify } = require("util"); var os = require("os"); var kCacheableLookupCreateConnection = Symbol("cacheableLookupCreateConnection"); var kCacheableLookupInstance = Symbol("cacheableLookupInstance"); var kExpires = Symbol("expires"); var supportsALL = typeof ALL === "number"; var verifyAgent = (agent) => { if (!(agent && typeof agent.createConnection === "function")) { throw new Error("Expected an Agent instance as the first argument"); } }; var map4to6 = (entries) => { for (const entry of entries) { if (entry.family === 6) { continue; } entry.address = `::ffff:${entry.address}`; entry.family = 6; } }; var getIfaceInfo = () => { let has4 = false; let has6 = false; for (const device of Object.values(os.networkInterfaces())) { for (const iface of device) { if (iface.internal) { continue; } if (iface.family === "IPv6") { has6 = true; } else { has4 = true; } if (has4 && has6) { return { has4, has6 }; } } } return { has4, has6 }; }; var isIterable = (map) => { return Symbol.iterator in map; }; var ttl = { ttl: true }; var all = { all: true }; var CacheableLookup = class { constructor({ cache = /* @__PURE__ */ new Map(), maxTtl = Infinity, fallbackDuration = 3600, errorTtl = 0.15, resolver = new AsyncResolver(), lookup = dnsLookup } = {}) { this.maxTtl = maxTtl; this.errorTtl = errorTtl; this._cache = cache; this._resolver = resolver; this._dnsLookup = promisify(lookup); if (this._resolver instanceof AsyncResolver) { this._resolve4 = this._resolver.resolve4.bind(this._resolver); this._resolve6 = this._resolver.resolve6.bind(this._resolver); } else { this._resolve4 = promisify(this._resolver.resolve4.bind(this._resolver)); this._resolve6 = promisify(this._resolver.resolve6.bind(this._resolver)); } this._iface = getIfaceInfo(); this._pending = {}; this._nextRemovalTime = false; this._hostnamesToFallback = /* @__PURE__ */ new Set(); if (fallbackDuration < 1) { this._fallback = false; } else { this._fallback = true; const interval = setInterval(() => { this._hostnamesToFallback.clear(); }, fallbackDuration * 1e3); if (interval.unref) { interval.unref(); } } this.lookup = this.lookup.bind(this); this.lookupAsync = this.lookupAsync.bind(this); } set servers(servers) { this.clear(); this._resolver.setServers(servers); } get servers() { return this._resolver.getServers(); } lookup(hostname, options, callback) { if (typeof options === "function") { callback = options; options = {}; } else if (typeof options === "number") { options = { family: options }; } if (!callback) { throw new Error("Callback must be a function."); } this.lookupAsync(hostname, options).then((result) => { if (options.all) { callback(null, result); } else { callback(null, result.address, result.family, result.expires, result.ttl); } }, callback); } async lookupAsync(hostname, options = {}) { if (typeof options === "number") { options = { family: options }; } let cached = await this.query(hostname); if (options.family === 6) { const filtered = cached.filter((entry) => entry.family === 6); if (options.hints & V4MAPPED) { if (supportsALL && options.hints & ALL || filtered.length === 0) { map4to6(cached); } else { cached = filtered; } } else { cached = filtered; } } else if (options.family === 4) { cached = cached.filter((entry) => entry.family === 4); } if (options.hints & ADDRCONFIG) { const { _iface } = this; cached = cached.filter((entry) => entry.family === 6 ? _iface.has6 : _iface.has4); } if (cached.length === 0) { const error = new Error(`cacheableLookup ENOTFOUND ${hostname}`); error.code = "ENOTFOUND"; error.hostname = hostname; throw error; } if (options.all) { return cached; } return cached[0]; } async query(hostname) { let cached = await this._cache.get(hostname); if (!cached) { const pending = this._pending[hostname]; if (pending) { cached = await pending; } else { const newPromise = this.queryAndCache(hostname); this._pending[hostname] = newPromise; cached = await newPromise; } } cached = cached.map((entry) => { return __spreadValues({}, entry); }); return cached; } async _resolve(hostname) { const wrap = async (promise) => { try { return await promise; } catch (error) { if (error.code === "ENODATA" || error.code === "ENOTFOUND") { return []; } throw error; } }; const [A, AAAA] = await Promise.all([ this._resolve4(hostname, ttl), this._resolve6(hostname, ttl) ].map((promise) => wrap(promise))); let aTtl = 0; let aaaaTtl = 0; let cacheTtl = 0; const now = Date.now(); for (const entry of A) { entry.family = 4; entry.expires = now + entry.ttl * 1e3; aTtl = Math.max(aTtl, entry.ttl); } for (const entry of AAAA) { entry.family = 6; entry.expires = now + entry.ttl * 1e3; aaaaTtl = Math.max(aaaaTtl, entry.ttl); } if (A.length > 0) { if (AAAA.length > 0) { cacheTtl = Math.min(aTtl, aaaaTtl); } else { cacheTtl = aTtl; } } else { cacheTtl = aaaaTtl; } return { entries: [ ...A, ...AAAA ], cacheTtl }; } async _lookup(hostname) { try { const entries = await this._dnsLookup(hostname, { all: true }); return { entries, cacheTtl: 0 }; } catch (_) { return { entries: [], cacheTtl: 0 }; } } async _set(hostname, data, cacheTtl) { if (this.maxTtl > 0 && cacheTtl > 0) { cacheTtl = Math.min(cacheTtl, this.maxTtl) * 1e3; data[kExpires] = Date.now() + cacheTtl; try { await this._cache.set(hostname, data, cacheTtl); } catch (error) { this.lookupAsync = async () => { const cacheError = new Error("Cache Error. Please recreate the CacheableLookup instance."); cacheError.cause = error; throw cacheError; }; } if (isIterable(this._cache)) { this._tick(cacheTtl); } } } async queryAndCache(hostname) { if (this._hostnamesToFallback.has(hostname)) { return this._dnsLookup(hostname, all); } try { let query = await this._resolve(hostname); if (query.entries.length === 0 && this._fallback) { query = await this._lookup(hostname); if (query.entries.length !== 0) { this._hostnamesToFallback.add(hostname); } } const cacheTtl = query.entries.length === 0 ? this.errorTtl : query.cacheTtl; await this._set(hostname, query.entries, cacheTtl); delete this._pending[hostname]; return query.entries; } catch (error) { delete this._pending[hostname]; throw error; } } _tick(ms) { const nextRemovalTime = this._nextRemovalTime; if (!nextRemovalTime || ms < nextRemovalTime) { clearTimeout(this._removalTimeout); this._nextRemovalTime = ms; this._removalTimeout = setTimeout(() => { this._nextRemovalTime = false; let nextExpiry = Infinity; const now = Date.now(); for (const [hostname, entries] of this._cache) { const expires = entries[kExpires]; if (now >= expires) { this._cache.delete(hostname); } else if (expires < nextExpiry) { nextExpiry = expires; } } if (nextExpiry !== Infinity) { this._tick(nextExpiry - now); } }, ms); if (this._removalTimeout.unref) { this._removalTimeout.unref(); } } } install(agent) { verifyAgent(agent); if (kCacheableLookupCreateConnection in agent) { throw new Error("CacheableLookup has been already installed"); } agent[kCacheableLookupCreateConnection] = agent.createConnection; agent[kCacheableLookupInstance] = this; agent.createConnection = (options, callback) => { if (!("lookup" in options)) { options.lookup = this.lookup; } return agent[kCacheableLookupCreateConnection](options, callback); }; } uninstall(agent) { verifyAgent(agent); if (agent[kCacheableLookupCreateConnection]) { if (agent[kCacheableLookupInstance] !== this) { throw new Error("The agent is not owned by this CacheableLookup instance"); } agent.createConnection = agent[kCacheableLookupCreateConnection]; delete agent[kCacheableLookupCreateConnection]; delete agent[kCacheableLookupInstance]; } } updateInterfaceInfo() { const { _iface } = this; this._iface = getIfaceInfo(); if (_iface.has4 && !this._iface.has4 || _iface.has6 && !this._iface.has6) { this._cache.clear(); } } clear(hostname) { if (hostname) { this._cache.delete(hostname); return; } this._cache.clear(); } }; module2.exports = CacheableLookup; module2.exports.default = CacheableLookup; } }); // ../../node_modules/cacheable-request/node_modules/normalize-url/index.js var require_normalize_url = __commonJS({ "../../node_modules/cacheable-request/node_modules/normalize-url/index.js"(exports2, module2) { "use strict"; var DATA_URL_DEFAULT_MIME_TYPE = "text/plain"; var DATA_URL_DEFAULT_CHARSET = "us-ascii"; var testParameter = (name, filters) => { return filters.some((filter) => filter instanceof RegExp ? filter.test(name) : filter === name); }; var normalizeDataURL = (urlString, { stripHash }) => { const match = /^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(urlString); if (!match) { throw new Error(`Invalid URL: ${urlString}`); } let { type, data, hash: hash2 } = match.groups; const mediaType = type.split(";"); hash2 = stripHash ? "" : hash2; let isBase64 = false; if (mediaType[mediaType.length - 1] === "base64") { mediaType.pop(); isBase64 = true; } const mimeType = (mediaType.shift() || "").toLowerCase(); const attributes = mediaType.map((attribute) => { let [key, value = ""] = attribute.split("=").map((string) => string.trim()); if (key === "charset") { value = value.toLowerCase(); if (value === DATA_URL_DEFAULT_CHARSET) { return ""; } } return `${key}${value ? `=${value}` : ""}`; }).filter(Boolean); const normalizedMediaType = [ ...attributes ]; if (isBase64) { normalizedMediaType.push("base64"); } if (normalizedMediaType.length !== 0 || mimeType && mimeType !== DATA_URL_DEFAULT_MIME_TYPE) { normalizedMediaType.unshift(mimeType); } return `data:${normalizedMediaType.join(";")},${isBase64 ? data.trim() : data}${hash2 ? `#${hash2}` : ""}`; }; var normalizeUrl = (urlString, options) => { options = __spreadValues({ defaultProtocol: "http:", normalizeProtocol: true, forceHttp: false, forceHttps: false, stripAuthentication: true, stripHash: false, stripTextFragment: true, stripWWW: true, removeQueryParameters: [/^utm_\w+/i], removeTrailingSlash: true, removeSingleSlash: true, removeDirectoryIndex: false, sortQueryParameters: true }, options); urlString = urlString.trim(); if (/^data:/i.test(urlString)) { return normalizeDataURL(urlString, options); } if (/^view-source:/i.test(urlString)) { throw new Error("`view-source:` is not supported as it is a non-standard protocol"); } const hasRelativeProtocol = urlString.startsWith("//"); const isRelativeUrl = !hasRelativeProtocol && /^\.*\//.test(urlString); if (!isRelativeUrl) { urlString = urlString.replace(/^(?!(?:\w+:)?\/\/)|^\/\//, options.defaultProtocol); } const urlObj = new URL(urlString); if (options.forceHttp && options.forceHttps) { throw new Error("The `forceHttp` and `forceHttps` options cannot be used together"); } if (options.forceHttp && urlObj.protocol === "https:") { urlObj.protocol = "http:"; } if (options.forceHttps && urlObj.protocol === "http:") { urlObj.protocol = "https:"; } if (options.stripAuthentication) { urlObj.username = ""; urlObj.password = ""; } if (options.stripHash) { urlObj.hash = ""; } else if (options.stripTextFragment) { urlObj.hash = urlObj.hash.replace(/#?:~:text.*?$/i, ""); } if (urlObj.pathname) { urlObj.pathname = urlObj.pathname.replace(/(? 0) { let pathComponents = urlObj.pathname.split("/"); const lastComponent = pathComponents[pathComponents.length - 1]; if (testParameter(lastComponent, options.removeDirectoryIndex)) { pathComponents = pathComponents.slice(0, pathComponents.length - 1); urlObj.pathname = pathComponents.slice(1).join("/") + "/"; } } if (urlObj.hostname) { urlObj.hostname = urlObj.hostname.replace(/\.$/, ""); if (options.stripWWW && /^www\.(?!www\.)(?:[a-z\-\d]{1,63})\.(?:[a-z.\-\d]{2,63})$/.test(urlObj.hostname)) { urlObj.hostname = urlObj.hostname.replace(/^www\./, ""); } } if (Array.isArray(options.removeQueryParameters)) { for (const key of [...urlObj.searchParams.keys()]) { if (testParameter(key, options.removeQueryParameters)) { urlObj.searchParams.delete(key); } } } if (options.removeQueryParameters === true) { urlObj.search = ""; } if (options.sortQueryParameters) { urlObj.searchParams.sort(); } if (options.removeTrailingSlash) { urlObj.pathname = urlObj.pathname.replace(/\/$/, ""); } const oldUrlString = urlString; urlString = urlObj.toString(); if (!options.removeSingleSlash && urlObj.pathname === "/" && !oldUrlString.endsWith("/") && urlObj.hash === "") { urlString = urlString.replace(/\/$/, ""); } if ((options.removeTrailingSlash || urlObj.pathname === "/") && urlObj.hash === "" && options.removeSingleSlash) { urlString = urlString.replace(/\/$/, ""); } if (hasRelativeProtocol && !options.normalizeProtocol) { urlString = urlString.replace(/^http:\/\//, "//"); } if (options.stripProtocol) { urlString = urlString.replace(/^(?:https?:)?\/\//, ""); } return urlString; }; module2.exports = normalizeUrl; } }); // ../../node_modules/wrappy/wrappy.js var require_wrappy = __commonJS({ "../../node_modules/wrappy/wrappy.js"(exports2, module2) { module2.exports = wrappy; function wrappy(fn, cb) { if (fn && cb) return wrappy(fn)(cb); if (typeof fn !== "function") throw new TypeError("need wrapper function"); Object.keys(fn).forEach(function(k) { wrapper[k] = fn[k]; }); return wrapper; function wrapper() { var args = new Array(arguments.length); for (var i = 0; i < args.length; i++) { args[i] = arguments[i]; } var ret = fn.apply(this, args); var cb2 = args[args.length - 1]; if (typeof ret === "function" && ret !== cb2) { Object.keys(cb2).forEach(function(k) { ret[k] = cb2[k]; }); } return ret; } } } }); // ../../node_modules/once/once.js var require_once = __commonJS({ "../../node_modules/once/once.js"(exports2, module2) { var wrappy = require_wrappy(); module2.exports = wrappy(once); module2.exports.strict = wrappy(onceStrict); once.proto = once(function() { Object.defineProperty(Function.prototype, "once", { value: function() { return once(this); }, configurable: true }); Object.defineProperty(Function.prototype, "onceStrict", { value: function() { return onceStrict(this); }, configurable: true }); }); function once(fn) { var f = function() { if (f.called) return f.value; f.called = true; return f.value = fn.apply(this, arguments); }; f.called = false; return f; } function onceStrict(fn) { var f = function() { if (f.called) throw new Error(f.onceError); f.called = true; return f.value = fn.apply(this, arguments); }; var name = fn.name || "Function wrapped with `once`"; f.onceError = name + " shouldn't be called more than once"; f.called = false; return f; } } }); // ../../node_modules/end-of-stream/index.js var require_end_of_stream = __commonJS({ "../../node_modules/end-of-stream/index.js"(exports2, module2) { var once = require_once(); var noop = function() { }; var isRequest = function(stream) { return stream.setHeader && typeof stream.abort === "function"; }; var isChildProcess = function(stream) { return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3; }; var eos = function(stream, opts, callback) { if (typeof opts === "function") return eos(stream, null, opts); if (!opts) opts = {}; callback = once(callback || noop); var ws = stream._writableState; var rs = stream._readableState; var readable = opts.readable || opts.readable !== false && stream.readable; var writable = opts.writable || opts.writable !== false && stream.writable; var cancelled = false; var onlegacyfinish = function() { if (!stream.writable) onfinish(); }; var onfinish = function() { writable = false; if (!readable) callback.call(stream); }; var onend = function() { readable = false; if (!writable) callback.call(stream); }; var onexit = function(exitCode) { callback.call(stream, exitCode ? new Error("exited with error code: " + exitCode) : null); }; var onerror = function(err) { callback.call(stream, err); }; var onclose = function() { process.nextTick(onclosenexttick); }; var onclosenexttick = function() { if (cancelled) return; if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error("premature close")); if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error("premature close")); }; var onrequest = function() { stream.req.on("finish", onfinish); }; if (isRequest(stream)) { stream.on("complete", onfinish); stream.on("abort", onclose); if (stream.req) onrequest(); else stream.on("request", onrequest); } else if (writable && !ws) { stream.on("end", onlegacyfinish); stream.on("close", onlegacyfinish); } if (isChildProcess(stream)) stream.on("exit", onexit); stream.on("end", onend); stream.on("finish", onfinish); if (opts.error !== false) stream.on("error", onerror); stream.on("close", onclose); return function() { cancelled = true; stream.removeListener("complete", onfinish); stream.removeListener("abort", onclose); stream.removeListener("request", onrequest); if (stream.req) stream.req.removeListener("finish", onfinish); stream.removeListener("end", onlegacyfinish); stream.removeListener("close", onlegacyfinish); stream.removeListener("finish", onfinish); stream.removeListener("exit", onexit); stream.removeListener("end", onend); stream.removeListener("error", onerror); stream.removeListener("close", onclose); }; }; module2.exports = eos; } }); // ../../node_modules/pump/index.js var require_pump = __commonJS({ "../../node_modules/pump/index.js"(exports2, module2) { var once = require_once(); var eos = require_end_of_stream(); var fs2 = require("fs"); var noop = function() { }; var ancient = /^v?\.0/.test(process.version); var isFn = function(fn) { return typeof fn === "function"; }; var isFS = function(stream) { if (!ancient) return false; if (!fs2) return false; return (stream instanceof (fs2.ReadStream || noop) || stream instanceof (fs2.WriteStream || noop)) && isFn(stream.close); }; var isRequest = function(stream) { return stream.setHeader && isFn(stream.abort); }; var destroyer = function(stream, reading, writing, callback) { callback = once(callback); var closed = false; stream.on("close", function() { closed = true; }); eos(stream, { readable: reading, writable: writing }, function(err) { if (err) return callback(err); closed = true; callback(); }); var destroyed = false; return function(err) { if (closed) return; if (destroyed) return; destroyed = true; if (isFS(stream)) return stream.close(noop); if (isRequest(stream)) return stream.abort(); if (isFn(stream.destroy)) return stream.destroy(); callback(err || new Error("stream was destroyed")); }; }; var call = function(fn) { fn(); }; var pipe = function(from, to) { return from.pipe(to); }; var pump = function() { var streams = Array.prototype.slice.call(arguments); var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop; if (Array.isArray(streams[0])) streams = streams[0]; if (streams.length < 2) throw new Error("pump requires two streams per minimum"); var error; var destroys = streams.map(function(stream, i) { var reading = i < streams.length - 1; var writing = i > 0; return destroyer(stream, reading, writing, function(err) { if (!error) error = err; if (err) destroys.forEach(call); if (reading) return; destroys.forEach(call); callback(error); }); }); return streams.reduce(pipe); }; module2.exports = pump; } }); // ../../node_modules/cacheable-request/node_modules/get-stream/buffer-stream.js var require_buffer_stream = __commonJS({ "../../node_modules/cacheable-request/node_modules/get-stream/buffer-stream.js"(exports2, module2) { "use strict"; var { PassThrough: PassThroughStream } = require("stream"); module2.exports = (options) => { options = __spreadValues({}, options); const { array } = options; let { encoding } = options; const isBuffer = encoding === "buffer"; let objectMode = false; if (array) { objectMode = !(encoding || isBuffer); } else { encoding = encoding || "utf8"; } if (isBuffer) { encoding = null; } const stream = new PassThroughStream({ objectMode }); if (encoding) { stream.setEncoding(encoding); } let length = 0; const chunks = []; stream.on("data", (chunk) => { chunks.push(chunk); if (objectMode) { length = chunks.length; } else { length += chunk.length; } }); stream.getBufferedValue = () => { if (array) { return chunks; } return isBuffer ? Buffer.concat(chunks, length) : chunks.join(""); }; stream.getBufferedLength = () => length; return stream; }; } }); // ../../node_modules/cacheable-request/node_modules/get-stream/index.js var require_get_stream = __commonJS({ "../../node_modules/cacheable-request/node_modules/get-stream/index.js"(exports2, module2) { "use strict"; var pump = require_pump(); var bufferStream = require_buffer_stream(); var MaxBufferError = class extends Error { constructor() { super("maxBuffer exceeded"); this.name = "MaxBufferError"; } }; async function getStream(inputStream, options) { if (!inputStream) { return Promise.reject(new Error("Expected a stream")); } options = __spreadValues({ maxBuffer: Infinity }, options); const { maxBuffer } = options; let stream; await new Promise((resolve, reject) => { const rejectPromise = (error) => { if (error) { error.bufferedData = stream.getBufferedValue(); } reject(error); }; stream = pump(inputStream, bufferStream(options), (error) => { if (error) { rejectPromise(error); return; } resolve(); }); stream.on("data", () => { if (stream.getBufferedLength() > maxBuffer) { rejectPromise(new MaxBufferError()); } }); }); return stream.getBufferedValue(); } module2.exports = getStream; module2.exports.default = getStream; module2.exports.buffer = (stream, options) => getStream(stream, __spreadProps(__spreadValues({}, options), { encoding: "buffer" })); module2.exports.array = (stream, options) => getStream(stream, __spreadProps(__spreadValues({}, options), { array: true })); module2.exports.MaxBufferError = MaxBufferError; } }); // ../../node_modules/http-cache-semantics/index.js var require_http_cache_semantics = __commonJS({ "../../node_modules/http-cache-semantics/index.js"(exports2, module2) { "use strict"; var statusCodeCacheableByDefault = /* @__PURE__ */ new Set([ 200, 203, 204, 206, 300, 301, 404, 405, 410, 414, 501 ]); var understoodStatuses = /* @__PURE__ */ new Set([ 200, 203, 204, 300, 301, 302, 303, 307, 308, 404, 405, 410, 414, 501 ]); var errorStatusCodes = /* @__PURE__ */ new Set([ 500, 502, 503, 504 ]); var hopByHopHeaders = { date: true, connection: true, "keep-alive": true, "proxy-authenticate": true, "proxy-authorization": true, te: true, trailer: true, "transfer-encoding": true, upgrade: true }; var excludedFromRevalidationUpdate = { "content-length": true, "content-encoding": true, "transfer-encoding": true, "content-range": true }; function toNumberOrZero(s) { const n = parseInt(s, 10); return isFinite(n) ? n : 0; } function isErrorResponse(response) { if (!response) { return true; } return errorStatusCodes.has(response.status); } function parseCacheControl(header) { const cc = {}; if (!header) return cc; const parts = header.trim().split(/\s*,\s*/); for (const part of parts) { const [k, v] = part.split(/\s*=\s*/, 2); cc[k] = v === void 0 ? true : v.replace(/^"|"$/g, ""); } return cc; } function formatCacheControl(cc) { let parts = []; for (const k in cc) { const v = cc[k]; parts.push(v === true ? k : k + "=" + v); } if (!parts.length) { return void 0; } return parts.join(", "); } module2.exports = class CachePolicy { constructor(req, res, { shared, cacheHeuristic, immutableMinTimeToLive, ignoreCargoCult, _fromObject } = {}) { if (_fromObject) { this._fromObject(_fromObject); return; } if (!res || !res.headers) { throw Error("Response headers missing"); } this._assertRequestHasHeaders(req); this._responseTime = this.now(); this._isShared = shared !== false; this._cacheHeuristic = cacheHeuristic !== void 0 ? cacheHeuristic : 0.1; this._immutableMinTtl = immutableMinTimeToLive !== void 0 ? immutableMinTimeToLive : 24 * 3600 * 1e3; this._status = "status" in res ? res.status : 200; this._resHeaders = res.headers; this._rescc = parseCacheControl(res.headers["cache-control"]); this._method = "method" in req ? req.method : "GET"; this._url = req.url; this._host = req.headers.host; this._noAuthorization = !req.headers.authorization; this._reqHeaders = res.headers.vary ? req.headers : null; this._reqcc = parseCacheControl(req.headers["cache-control"]); if (ignoreCargoCult && "pre-check" in this._rescc && "post-check" in this._rescc) { delete this._rescc["pre-check"]; delete this._rescc["post-check"]; delete this._rescc["no-cache"]; delete this._rescc["no-store"]; delete this._rescc["must-revalidate"]; this._resHeaders = Object.assign({}, this._resHeaders, { "cache-control": formatCacheControl(this._rescc) }); delete this._resHeaders.expires; delete this._resHeaders.pragma; } if (res.headers["cache-control"] == null && /no-cache/.test(res.headers.pragma)) { this._rescc["no-cache"] = true; } } now() { return Date.now(); } storable() { return !!(!this._reqcc["no-store"] && (this._method === "GET" || this._method === "HEAD" || this._method === "POST" && this._hasExplicitExpiration()) && understoodStatuses.has(this._status) && !this._rescc["no-store"] && (!this._isShared || !this._rescc.private) && (!this._isShared || this._noAuthorization || this._allowsStoringAuthenticated()) && (this._resHeaders.expires || this._rescc["max-age"] || this._isShared && this._rescc["s-maxage"] || this._rescc.public || statusCodeCacheableByDefault.has(this._status))); } _hasExplicitExpiration() { return this._isShared && this._rescc["s-maxage"] || this._rescc["max-age"] || this._resHeaders.expires; } _assertRequestHasHeaders(req) { if (!req || !req.headers) { throw Error("Request headers missing"); } } satisfiesWithoutRevalidation(req) { this._assertRequestHasHeaders(req); const requestCC = parseCacheControl(req.headers["cache-control"]); if (requestCC["no-cache"] || /no-cache/.test(req.headers.pragma)) { return false; } if (requestCC["max-age"] && this.age() > requestCC["max-age"]) { return false; } if (requestCC["min-fresh"] && this.timeToLive() < 1e3 * requestCC["min-fresh"]) { return false; } if (this.stale()) { const allowsStale = requestCC["max-stale"] && !this._rescc["must-revalidate"] && (requestCC["max-stale"] === true || requestCC["max-stale"] > this.age() - this.maxAge()); if (!allowsStale) { return false; } } return this._requestMatches(req, false); } _requestMatches(req, allowHeadMethod) { return (!this._url || this._url === req.url) && this._host === req.headers.host && (!req.method || this._method === req.method || allowHeadMethod && req.method === "HEAD") && this._varyMatches(req); } _allowsStoringAuthenticated() { return this._rescc["must-revalidate"] || this._rescc.public || this._rescc["s-maxage"]; } _varyMatches(req) { if (!this._resHeaders.vary) { return true; } if (this._resHeaders.vary === "*") { return false; } const fields = this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/); for (const name of fields) { if (req.headers[name] !== this._reqHeaders[name]) return false; } return true; } _copyWithoutHopByHopHeaders(inHeaders) { const headers = {}; for (const name in inHeaders) { if (hopByHopHeaders[name]) continue; headers[name] = inHeaders[name]; } if (inHeaders.connection) { const tokens = inHeaders.connection.trim().split(/\s*,\s*/); for (const name of tokens) { delete headers[name]; } } if (headers.warning) { const warnings = headers.warning.split(/,/).filter((warning) => { return !/^\s*1[0-9][0-9]/.test(warning); }); if (!warnings.length) { delete headers.warning; } else { headers.warning = warnings.join(",").trim(); } } return headers; } responseHeaders() { const headers = this._copyWithoutHopByHopHeaders(this._resHeaders); const age = this.age(); if (age > 3600 * 24 && !this._hasExplicitExpiration() && this.maxAge() > 3600 * 24) { headers.warning = (headers.warning ? `${headers.warning}, ` : "") + '113 - "rfc7234 5.5.4"'; } headers.age = `${Math.round(age)}`; headers.date = new Date(this.now()).toUTCString(); return headers; } date() { const serverDate = Date.parse(this._resHeaders.date); if (isFinite(serverDate)) { return serverDate; } return this._responseTime; } age() { let age = this._ageValue(); const residentTime = (this.now() - this._responseTime) / 1e3; return age + residentTime; } _ageValue() { return toNumberOrZero(this._resHeaders.age); } maxAge() { if (!this.storable() || this._rescc["no-cache"]) { return 0; } if (this._isShared && (this._resHeaders["set-cookie"] && !this._rescc.public && !this._rescc.immutable)) { return 0; } if (this._resHeaders.vary === "*") { return 0; } if (this._isShared) { if (this._rescc["proxy-revalidate"]) { return 0; } if (this._rescc["s-maxage"]) { return toNumberOrZero(this._rescc["s-maxage"]); } } if (this._rescc["max-age"]) { return toNumberOrZero(this._rescc["max-age"]); } const defaultMinTtl = this._rescc.immutable ? this._immutableMinTtl : 0; const serverDate = this.date(); if (this._resHeaders.expires) { const expires = Date.parse(this._resHeaders.expires); if (Number.isNaN(expires) || expires < serverDate) { return 0; } return Math.max(defaultMinTtl, (expires - serverDate) / 1e3); } if (this._resHeaders["last-modified"]) { const lastModified = Date.parse(this._resHeaders["last-modified"]); if (isFinite(lastModified) && serverDate > lastModified) { return Math.max(defaultMinTtl, (serverDate - lastModified) / 1e3 * this._cacheHeuristic); } } return defaultMinTtl; } timeToLive() { const age = this.maxAge() - this.age(); const staleIfErrorAge = age + toNumberOrZero(this._rescc["stale-if-error"]); const staleWhileRevalidateAge = age + toNumberOrZero(this._rescc["stale-while-revalidate"]); return Math.max(0, age, staleIfErrorAge, staleWhileRevalidateAge) * 1e3; } stale() { return this.maxAge() <= this.age(); } _useStaleIfError() { return this.maxAge() + toNumberOrZero(this._rescc["stale-if-error"]) > this.age(); } useStaleWhileRevalidate() { return this.maxAge() + toNumberOrZero(this._rescc["stale-while-revalidate"]) > this.age(); } static fromObject(obj) { return new this(void 0, void 0, { _fromObject: obj }); } _fromObject(obj) { if (this._responseTime) throw Error("Reinitialized"); if (!obj || obj.v !== 1) throw Error("Invalid serialization"); this._responseTime = obj.t; this._isShared = obj.sh; this._cacheHeuristic = obj.ch; this._immutableMinTtl = obj.imm !== void 0 ? obj.imm : 24 * 3600 * 1e3; this._status = obj.st; this._resHeaders = obj.resh; this._rescc = obj.rescc; this._method = obj.m; this._url = obj.u; this._host = obj.h; this._noAuthorization = obj.a; this._reqHeaders = obj.reqh; this._reqcc = obj.reqcc; } toObject() { return { v: 1, t: this._responseTime, sh: this._isShared, ch: this._cacheHeuristic, imm: this._immutableMinTtl, st: this._status, resh: this._resHeaders, rescc: this._rescc, m: this._method, u: this._url, h: this._host, a: this._noAuthorization, reqh: this._reqHeaders, reqcc: this._reqcc }; } revalidationHeaders(incomingReq) { this._assertRequestHasHeaders(incomingReq); const headers = this._copyWithoutHopByHopHeaders(incomingReq.headers); delete headers["if-range"]; if (!this._requestMatches(incomingReq, true) || !this.storable()) { delete headers["if-none-match"]; delete headers["if-modified-since"]; return headers; } if (this._resHeaders.etag) { headers["if-none-match"] = headers["if-none-match"] ? `${headers["if-none-match"]}, ${this._resHeaders.etag}` : this._resHeaders.etag; } const forbidsWeakValidators = headers["accept-ranges"] || headers["if-match"] || headers["if-unmodified-since"] || this._method && this._method != "GET"; if (forbidsWeakValidators) { delete headers["if-modified-since"]; if (headers["if-none-match"]) { const etags = headers["if-none-match"].split(/,/).filter((etag) => { return !/^\s*W\//.test(etag); }); if (!etags.length) { delete headers["if-none-match"]; } else { headers["if-none-match"] = etags.join(",").trim(); } } } else if (this._resHeaders["last-modified"] && !headers["if-modified-since"]) { headers["if-modified-since"] = this._resHeaders["last-modified"]; } return headers; } revalidatedPolicy(request, response) { this._assertRequestHasHeaders(request); if (this._useStaleIfError() && isErrorResponse(response)) { return { modified: false, matches: false, policy: this }; } if (!response || !response.headers) { throw Error("Response headers missing"); } let matches = false; if (response.status !== void 0 && response.status != 304) { matches = false; } else if (response.headers.etag && !/^\s*W\//.test(response.headers.etag)) { matches = this._resHeaders.etag && this._resHeaders.etag.replace(/^\s*W\//, "") === response.headers.etag; } else if (this._resHeaders.etag && response.headers.etag) { matches = this._resHeaders.etag.replace(/^\s*W\//, "") === response.headers.etag.replace(/^\s*W\//, ""); } else if (this._resHeaders["last-modified"]) { matches = this._resHeaders["last-modified"] === response.headers["last-modified"]; } else { if (!this._resHeaders.etag && !this._resHeaders["last-modified"] && !response.headers.etag && !response.headers["last-modified"]) { matches = true; } } if (!matches) { return { policy: new this.constructor(request, response), modified: response.status != 304, matches: false }; } const headers = {}; for (const k in this._resHeaders) { headers[k] = k in response.headers && !excludedFromRevalidationUpdate[k] ? response.headers[k] : this._resHeaders[k]; } const newResponse = Object.assign({}, response, { status: this._status, method: this._method, headers }); return { policy: new this.constructor(request, newResponse, { shared: this._isShared, cacheHeuristic: this._cacheHeuristic, immutableMinTimeToLive: this._immutableMinTtl }), modified: false, matches: true }; } }; } }); // ../../node_modules/lowercase-keys/index.js var require_lowercase_keys = __commonJS({ "../../node_modules/lowercase-keys/index.js"(exports2, module2) { "use strict"; module2.exports = (object) => { const result = {}; for (const [key, value] of Object.entries(object)) { result[key.toLowerCase()] = value; } return result; }; } }); // ../../node_modules/responselike/src/index.js var require_src = __commonJS({ "../../node_modules/responselike/src/index.js"(exports2, module2) { "use strict"; var Readable = require("stream").Readable; var lowercaseKeys = require_lowercase_keys(); var Response = class extends Readable { constructor(statusCode, headers, body, url) { if (typeof statusCode !== "number") { throw new TypeError("Argument `statusCode` should be a number"); } if (typeof headers !== "object") { throw new TypeError("Argument `headers` should be an object"); } if (!(body instanceof Buffer)) { throw new TypeError("Argument `body` should be a buffer"); } if (typeof url !== "string") { throw new TypeError("Argument `url` should be a string"); } super(); this.statusCode = statusCode; this.headers = lowercaseKeys(headers); this.body = body; this.url = url; } _read() { this.push(this.body); this.push(null); } }; module2.exports = Response; } }); // ../../node_modules/mimic-response/index.js var require_mimic_response = __commonJS({ "../../node_modules/mimic-response/index.js"(exports2, module2) { "use strict"; var knownProps = [ "destroy", "setTimeout", "socket", "headers", "trailers", "rawHeaders", "statusCode", "httpVersion", "httpVersionMinor", "httpVersionMajor", "rawTrailers", "statusMessage" ]; module2.exports = (fromStream, toStream) => { const fromProps = new Set(Object.keys(fromStream).concat(knownProps)); for (const prop of fromProps) { if (prop in toStream) { continue; } toStream[prop] = typeof fromStream[prop] === "function" ? fromStream[prop].bind(fromStream) : fromStream[prop]; } }; } }); // ../../node_modules/clone-response/src/index.js var require_src2 = __commonJS({ "../../node_modules/clone-response/src/index.js"(exports2, module2) { "use strict"; var PassThrough = require("stream").PassThrough; var mimicResponse = require_mimic_response(); var cloneResponse = (response) => { if (!(response && response.pipe)) { throw new TypeError("Parameter `response` must be a response stream."); } const clone = new PassThrough(); mimicResponse(response, clone); return response.pipe(clone); }; module2.exports = cloneResponse; } }); // ../../node_modules/json-buffer/index.js var require_json_buffer = __commonJS({ "../../node_modules/json-buffer/index.js"(exports2) { exports2.stringify = function stringify(o) { if (typeof o == "undefined") return o; if (o && Buffer.isBuffer(o)) return JSON.stringify(":base64:" + o.toString("base64")); if (o && o.toJSON) o = o.toJSON(); if (o && typeof o === "object") { var s = ""; var array = Array.isArray(o); s = array ? "[" : "{"; var first = true; for (var k in o) { var ignore = typeof o[k] == "function" || !array && typeof o[k] === "undefined"; if (Object.hasOwnProperty.call(o, k) && !ignore) { if (!first) s += ","; first = false; if (array) { if (o[k] == void 0) s += "null"; else s += stringify(o[k]); } else if (o[k] !== void 0) { s += stringify(k) + ":" + stringify(o[k]); } } } s += array ? "]" : "}"; return s; } else if (typeof o === "string") { return JSON.stringify(/^:/.test(o) ? ":" + o : o); } else if (typeof o === "undefined") { return "null"; } else return JSON.stringify(o); }; exports2.parse = function(s) { return JSON.parse(s, function(key, value) { if (typeof value === "string") { if (/^:base64:/.test(value)) return Buffer.from(value.substring(8), "base64"); else return /^:/.test(value) ? value.substring(1) : value; } return value; }); }; } }); // ../../node_modules/keyv/src/index.js var require_src3 = __commonJS({ "../../node_modules/keyv/src/index.js"(exports2, module2) { "use strict"; var EventEmitter = require("events"); var JSONB = require_json_buffer(); var loadStore = (opts) => { const adapters = { redis: "@keyv/redis", mongodb: "@keyv/mongo", mongo: "@keyv/mongo", sqlite: "@keyv/sqlite", postgresql: "@keyv/postgres", postgres: "@keyv/postgres", mysql: "@keyv/mysql" }; if (opts.adapter || opts.uri) { const adapter = opts.adapter || /^[^:]*/.exec(opts.uri)[0]; return new (require(adapters[adapter]))(opts); } return /* @__PURE__ */ new Map(); }; var Keyv = class extends EventEmitter { constructor(uri, opts) { super(); this.opts = Object.assign({ namespace: "keyv", serialize: JSONB.stringify, deserialize: JSONB.parse }, typeof uri === "string" ? { uri } : uri, opts); if (!this.opts.store) { const adapterOpts = Object.assign({}, this.opts); this.opts.store = loadStore(adapterOpts); } if (typeof this.opts.store.on === "function") { this.opts.store.on("error", (err) => this.emit("error", err)); } this.opts.store.namespace = this.opts.namespace; } _getKeyPrefix(key) { return `${this.opts.namespace}:${key}`; } get(key, opts) { const keyPrefixed = this._getKeyPrefix(key); const { store } = this.opts; return Promise.resolve().then(() => store.get(keyPrefixed)).then((data) => { return typeof data === "string" ? this.opts.deserialize(data) : data; }).then((data) => { if (data === void 0) { return void 0; } if (typeof data.expires === "number" && Date.now() > data.expires) { this.delete(key); return void 0; } return opts && opts.raw ? data : data.value; }); } set(key, value, ttl) { const keyPrefixed = this._getKeyPrefix(key); if (typeof ttl === "undefined") { ttl = this.opts.ttl; } if (ttl === 0) { ttl = void 0; } const { store } = this.opts; return Promise.resolve().then(() => { const expires = typeof ttl === "number" ? Date.now() + ttl : null; value = { value, expires }; return this.opts.serialize(value); }).then((value2) => store.set(keyPrefixed, value2, ttl)).then(() => true); } delete(key) { const keyPrefixed = this._getKeyPrefix(key); const { store } = this.opts; return Promise.resolve().then(() => store.delete(keyPrefixed)); } clear() { const { store } = this.opts; return Promise.resolve().then(() => store.clear()); } }; module2.exports = Keyv; } }); // ../../node_modules/cacheable-request/src/index.js var require_src4 = __commonJS({ "../../node_modules/cacheable-request/src/index.js"(exports2, module2) { "use strict"; var EventEmitter = require("events"); var urlLib = require("url"); var normalizeUrl = require_normalize_url(); var getStream = require_get_stream(); var CachePolicy = require_http_cache_semantics(); var Response = require_src(); var lowercaseKeys = require_lowercase_keys(); var cloneResponse = require_src2(); var Keyv = require_src3(); var CacheableRequest = class { constructor(request, cacheAdapter) { if (typeof request !== "function") { throw new TypeError("Parameter `request` must be a function"); } this.cache = new Keyv({ uri: typeof cacheAdapter === "string" && cacheAdapter, store: typeof cacheAdapter !== "string" && cacheAdapter, namespace: "cacheable-request" }); return this.createCacheableRequest(request); } createCacheableRequest(request) { return (opts, cb) => { let url; if (typeof opts === "string") { url = normalizeUrlObject(urlLib.parse(opts)); opts = {}; } else if (opts instanceof urlLib.URL) { url = normalizeUrlObject(urlLib.parse(opts.toString())); opts = {}; } else { const [pathname, ...searchParts] = (opts.path || "").split("?"); const search = searchParts.length > 0 ? `?${searchParts.join("?")}` : ""; url = normalizeUrlObject(__spreadProps(__spreadValues({}, opts), { pathname, search })); } opts = __spreadValues(__spreadValues({ headers: {}, method: "GET", cache: true, strictTtl: false, automaticFailover: false }, opts), urlObjectToRequestOptions(url)); opts.headers = lowercaseKeys(opts.headers); const ee = new EventEmitter(); const normalizedUrlString = normalizeUrl(urlLib.format(url), { stripWWW: false, removeTrailingSlash: false, stripAuthentication: false }); const key = `${opts.method}:${normalizedUrlString}`; let revalidate = false; let madeRequest = false; const makeRequest = (opts2) => { madeRequest = true; let requestErrored = false; let requestErrorCallback; const requestErrorPromise = new Promise((resolve) => { requestErrorCallback = () => { if (!requestErrored) { requestErrored = true; resolve(); } }; }); const handler = (response) => { if (revalidate && !opts2.forceRefresh) { response.status = response.statusCode; const revalidatedPolicy = CachePolicy.fromObject(revalidate.cachePolicy).revalidatedPolicy(opts2, response); if (!revalidatedPolicy.modified) { const headers = revalidatedPolicy.policy.responseHeaders(); response = new Response(revalidate.statusCode, headers, revalidate.body, revalidate.url); response.cachePolicy = revalidatedPolicy.policy; response.fromCache = true; } } if (!response.fromCache) { response.cachePolicy = new CachePolicy(opts2, response, opts2); response.fromCache = false; } let clonedResponse; if (opts2.cache && response.cachePolicy.storable()) { clonedResponse = cloneResponse(response); (async () => { try { const bodyPromise = getStream.buffer(response); await Promise.race([ requestErrorPromise, new Promise((resolve) => response.once("end", resolve)) ]); if (requestErrored) { return; } const body = await bodyPromise; const value = { cachePolicy: response.cachePolicy.toObject(), url: response.url, statusCode: response.fromCache ? revalidate.statusCode : response.statusCode, body }; let ttl = opts2.strictTtl ? response.cachePolicy.timeToLive() : void 0; if (opts2.maxTtl) { ttl = ttl ? Math.min(ttl, opts2.maxTtl) : opts2.maxTtl; } await this.cache.set(key, value, ttl); } catch (error) { ee.emit("error", new CacheableRequest.CacheError(error)); } })(); } else if (opts2.cache && revalidate) { (async () => { try { await this.cache.delete(key); } catch (error) { ee.emit("error", new CacheableRequest.CacheError(error)); } })(); } ee.emit("response", clonedResponse || response); if (typeof cb === "function") { cb(clonedResponse || response); } }; try { const req = request(opts2, handler); req.once("error", requestErrorCallback); req.once("abort", requestErrorCallback); ee.emit("request", req); } catch (error) { ee.emit("error", new CacheableRequest.RequestError(error)); } }; (async () => { const get = async (opts2) => { await Promise.resolve(); const cacheEntry = opts2.cache ? await this.cache.get(key) : void 0; if (typeof cacheEntry === "undefined") { return makeRequest(opts2); } const policy = CachePolicy.fromObject(cacheEntry.cachePolicy); if (policy.satisfiesWithoutRevalidation(opts2) && !opts2.forceRefresh) { const headers = policy.responseHeaders(); const response = new Response(cacheEntry.statusCode, headers, cacheEntry.body, cacheEntry.url); response.cachePolicy = policy; response.fromCache = true; ee.emit("response", response); if (typeof cb === "function") { cb(response); } } else { revalidate = cacheEntry; opts2.headers = policy.revalidationHeaders(opts2); makeRequest(opts2); } }; const errorHandler = (error) => ee.emit("error", new CacheableRequest.CacheError(error)); this.cache.once("error", errorHandler); ee.on("response", () => this.cache.removeListener("error", errorHandler)); try { await get(opts); } catch (error) { if (opts.automaticFailover && !madeRequest) { makeRequest(opts); } ee.emit("error", new CacheableRequest.CacheError(error)); } })(); return ee; }; } }; function urlObjectToRequestOptions(url) { const options = __spreadValues({}, url); options.path = `${url.pathname || "/"}${url.search || ""}`; delete options.pathname; delete options.search; return options; } function normalizeUrlObject(url) { return { protocol: url.protocol, auth: url.auth, hostname: url.hostname || url.host || "localhost", port: url.port, pathname: url.pathname, search: url.search }; } CacheableRequest.RequestError = class extends Error { constructor(error) { super(error.message); this.name = "RequestError"; Object.assign(this, error); } }; CacheableRequest.CacheError = class extends Error { constructor(error) { super(error.message); this.name = "CacheError"; Object.assign(this, error); } }; module2.exports = CacheableRequest; } }); // ../../node_modules/decompress-response/node_modules/mimic-response/index.js var require_mimic_response2 = __commonJS({ "../../node_modules/decompress-response/node_modules/mimic-response/index.js"(exports2, module2) { "use strict"; var knownProperties = [ "aborted", "complete", "headers", "httpVersion", "httpVersionMinor", "httpVersionMajor", "method", "rawHeaders", "rawTrailers", "setTimeout", "socket", "statusCode", "statusMessage", "trailers", "url" ]; module2.exports = (fromStream, toStream) => { if (toStream._readableState.autoDestroy) { throw new Error("The second stream must have the `autoDestroy` option set to `false`"); } const fromProperties = new Set(Object.keys(fromStream).concat(knownProperties)); const properties = {}; for (const property of fromProperties) { if (property in toStream) { continue; } properties[property] = { get() { const value = fromStream[property]; const isFunction = typeof value === "function"; return isFunction ? value.bind(fromStream) : value; }, set(value) { fromStream[property] = value; }, enumerable: true, configurable: false }; } Object.defineProperties(toStream, properties); fromStream.once("aborted", () => { toStream.destroy(); toStream.emit("aborted"); }); fromStream.once("close", () => { if (fromStream.complete) { if (toStream.readable) { toStream.once("end", () => { toStream.emit("close"); }); } else { toStream.emit("close"); } } else { toStream.emit("close"); } }); return toStream; }; } }); // ../../node_modules/decompress-response/index.js var require_decompress_response = __commonJS({ "../../node_modules/decompress-response/index.js"(exports2, module2) { "use strict"; var { Transform, PassThrough } = require("stream"); var zlib = require("zlib"); var mimicResponse = require_mimic_response2(); module2.exports = (response) => { const contentEncoding = (response.headers["content-encoding"] || "").toLowerCase(); if (!["gzip", "deflate", "br"].includes(contentEncoding)) { return response; } const isBrotli = contentEncoding === "br"; if (isBrotli && typeof zlib.createBrotliDecompress !== "function") { response.destroy(new Error("Brotli is not supported on Node.js < 12")); return response; } let isEmpty = true; const checker = new Transform({ transform(data, _encoding, callback) { isEmpty = false; callback(null, data); }, flush(callback) { callback(); } }); const finalStream = new PassThrough({ autoDestroy: false, destroy(error, callback) { response.destroy(); callback(error); } }); const decompressStream = isBrotli ? zlib.createBrotliDecompress() : zlib.createUnzip(); decompressStream.once("error", (error) => { if (isEmpty && !response.readable) { finalStream.end(); return; } finalStream.destroy(error); }); mimicResponse(response, finalStream); response.pipe(checker).pipe(decompressStream).pipe(finalStream); return finalStream; }; } }); // ../../node_modules/http2-wrapper/node_modules/quick-lru/index.js var require_quick_lru = __commonJS({ "../../node_modules/http2-wrapper/node_modules/quick-lru/index.js"(exports2, module2) { "use strict"; var QuickLRU = class { constructor(options = {}) { if (!(options.maxSize && options.maxSize > 0)) { throw new TypeError("`maxSize` must be a number greater than 0"); } this.maxSize = options.maxSize; this.onEviction = options.onEviction; this.cache = /* @__PURE__ */ new Map(); this.oldCache = /* @__PURE__ */ new Map(); this._size = 0; } _set(key, value) { this.cache.set(key, value); this._size++; if (this._size >= this.maxSize) { this._size = 0; if (typeof this.onEviction === "function") { for (const [key2, value2] of this.oldCache.entries()) { this.onEviction(key2, value2); } } this.oldCache = this.cache; this.cache = /* @__PURE__ */ new Map(); } } get(key) { if (this.cache.has(key)) { return this.cache.get(key); } if (this.oldCache.has(key)) { const value = this.oldCache.get(key); this.oldCache.delete(key); this._set(key, value); return value; } } set(key, value) { if (this.cache.has(key)) { this.cache.set(key, value); } else { this._set(key, value); } return this; } has(key) { return this.cache.has(key) || this.oldCache.has(key); } peek(key) { if (this.cache.has(key)) { return this.cache.get(key); } if (this.oldCache.has(key)) { return this.oldCache.get(key); } } delete(key) { const deleted = this.cache.delete(key); if (deleted) { this._size--; } return this.oldCache.delete(key) || deleted; } clear() { this.cache.clear(); this.oldCache.clear(); this._size = 0; } *keys() { for (const [key] of this) { yield key; } } *values() { for (const [, value] of this) { yield value; } } *[Symbol.iterator]() { for (const item of this.cache) { yield item; } for (const item of this.oldCache) { const [key] = item; if (!this.cache.has(key)) { yield item; } } } get size() { let oldCacheSize = 0; for (const key of this.oldCache.keys()) { if (!this.cache.has(key)) { oldCacheSize++; } } return Math.min(this._size + oldCacheSize, this.maxSize); } }; module2.exports = QuickLRU; } }); // ../../node_modules/http2-wrapper/source/agent.js var require_agent = __commonJS({ "../../node_modules/http2-wrapper/source/agent.js"(exports2, module2) { "use strict"; var EventEmitter = require("events"); var tls = require("tls"); var http2 = require("http2"); var QuickLRU = require_quick_lru(); var kCurrentStreamsCount = Symbol("currentStreamsCount"); var kRequest = Symbol("request"); var kOriginSet = Symbol("cachedOriginSet"); var kGracefullyClosing = Symbol("gracefullyClosing"); var nameKeys = [ "maxDeflateDynamicTableSize", "maxSessionMemory", "maxHeaderListPairs", "maxOutstandingPings", "maxReservedRemoteStreams", "maxSendHeaderBlockLength", "paddingStrategy", "localAddress", "path", "rejectUnauthorized", "minDHSize", "ca", "cert", "clientCertEngine", "ciphers", "key", "pfx", "servername", "minVersion", "maxVersion", "secureProtocol", "crl", "honorCipherOrder", "ecdhCurve", "dhparam", "secureOptions", "sessionIdContext" ]; var getSortedIndex = (array, value, compare) => { let low = 0; let high = array.length; while (low < high) { const mid = low + high >>> 1; if (compare(array[mid], value)) { low = mid + 1; } else { high = mid; } } return low; }; var compareSessions = (a, b) => { return a.remoteSettings.maxConcurrentStreams > b.remoteSettings.maxConcurrentStreams; }; var closeCoveredSessions = (where, session) => { for (const coveredSession of where) { if (coveredSession[kOriginSet].length < session[kOriginSet].length && coveredSession[kOriginSet].every((origin) => session[kOriginSet].includes(origin)) && coveredSession[kCurrentStreamsCount] + session[kCurrentStreamsCount] <= session.remoteSettings.maxConcurrentStreams) { gracefullyClose(coveredSession); } } }; var closeSessionIfCovered = (where, coveredSession) => { for (const session of where) { if (coveredSession[kOriginSet].length < session[kOriginSet].length && coveredSession[kOriginSet].every((origin) => session[kOriginSet].includes(origin)) && coveredSession[kCurrentStreamsCount] + session[kCurrentStreamsCount] <= session.remoteSettings.maxConcurrentStreams) { gracefullyClose(coveredSession); } } }; var getSessions = ({ agent, isFree }) => { const result = {}; for (const normalizedOptions in agent.sessions) { const sessions = agent.sessions[normalizedOptions]; const filtered = sessions.filter((session) => { const result2 = session[Agent.kCurrentStreamsCount] < session.remoteSettings.maxConcurrentStreams; return isFree ? result2 : !result2; }); if (filtered.length !== 0) { result[normalizedOptions] = filtered; } } return result; }; var gracefullyClose = (session) => { session[kGracefullyClosing] = true; if (session[kCurrentStreamsCount] === 0) { session.close(); } }; var Agent = class extends EventEmitter { constructor({ timeout: timeout2 = 6e4, maxSessions = Infinity, maxFreeSessions = 10, maxCachedTlsSessions = 100 } = {}) { super(); this.sessions = {}; this.queue = {}; this.timeout = timeout2; this.maxSessions = maxSessions; this.maxFreeSessions = maxFreeSessions; this._freeSessionsCount = 0; this._sessionsCount = 0; this.settings = { enablePush: false }; this.tlsSessionCache = new QuickLRU({ maxSize: maxCachedTlsSessions }); } static normalizeOrigin(url, servername) { if (typeof url === "string") { url = new URL(url); } if (servername && url.hostname !== servername) { url.hostname = servername; } return url.origin; } normalizeOptions(options) { let normalized = ""; if (options) { for (const key of nameKeys) { if (options[key]) { normalized += `:${options[key]}`; } } } return normalized; } _tryToCreateNewSession(normalizedOptions, normalizedOrigin) { if (!(normalizedOptions in this.queue) || !(normalizedOrigin in this.queue[normalizedOptions])) { return; } const item = this.queue[normalizedOptions][normalizedOrigin]; if (this._sessionsCount < this.maxSessions && !item.completed) { item.completed = true; item(); } } getSession(origin, options, listeners) { return new Promise((resolve, reject) => { if (Array.isArray(listeners)) { listeners = [...listeners]; resolve(); } else { listeners = [{ resolve, reject }]; } const normalizedOptions = this.normalizeOptions(options); const normalizedOrigin = Agent.normalizeOrigin(origin, options && options.servername); if (normalizedOrigin === void 0) { for (const { reject: reject2 } of listeners) { reject2(new TypeError("The `origin` argument needs to be a string or an URL object")); } return; } if (normalizedOptions in this.sessions) { const sessions = this.sessions[normalizedOptions]; let maxConcurrentStreams = -1; let currentStreamsCount = -1; let optimalSession; for (const session of sessions) { const sessionMaxConcurrentStreams = session.remoteSettings.maxConcurrentStreams; if (sessionMaxConcurrentStreams < maxConcurrentStreams) { break; } if (session[kOriginSet].includes(normalizedOrigin)) { const sessionCurrentStreamsCount = session[kCurrentStreamsCount]; if (sessionCurrentStreamsCount >= sessionMaxConcurrentStreams || session[kGracefullyClosing] || session.destroyed) { continue; } if (!optimalSession) { maxConcurrentStreams = sessionMaxConcurrentStreams; } if (sessionCurrentStreamsCount > currentStreamsCount) { optimalSession = session; currentStreamsCount = sessionCurrentStreamsCount; } } } if (optimalSession) { if (listeners.length !== 1) { for (const { reject: reject2 } of listeners) { const error = new Error(`Expected the length of listeners to be 1, got ${listeners.length}. Please report this to https://github.com/szmarczak/http2-wrapper/`); reject2(error); } return; } listeners[0].resolve(optimalSession); return; } } if (normalizedOptions in this.queue) { if (normalizedOrigin in this.queue[normalizedOptions]) { this.queue[normalizedOptions][normalizedOrigin].listeners.push(...listeners); this._tryToCreateNewSession(normalizedOptions, normalizedOrigin); return; } } else { this.queue[normalizedOptions] = {}; } const removeFromQueue = () => { if (normalizedOptions in this.queue && this.queue[normalizedOptions][normalizedOrigin] === entry) { delete this.queue[normalizedOptions][normalizedOrigin]; if (Object.keys(this.queue[normalizedOptions]).length === 0) { delete this.queue[normalizedOptions]; } } }; const entry = () => { const name = `${normalizedOrigin}:${normalizedOptions}`; let receivedSettings = false; try { const session = http2.connect(origin, __spreadValues({ createConnection: this.createConnection, settings: this.settings, session: this.tlsSessionCache.get(name) }, options)); session[kCurrentStreamsCount] = 0; session[kGracefullyClosing] = false; const isFree = () => session[kCurrentStreamsCount] < session.remoteSettings.maxConcurrentStreams; let wasFree = true; session.socket.once("session", (tlsSession) => { this.tlsSessionCache.set(name, tlsSession); }); session.once("error", (error) => { for (const { reject: reject2 } of listeners) { reject2(error); } this.tlsSessionCache.delete(name); }); session.setTimeout(this.timeout, () => { session.destroy(); }); session.once("close", () => { if (receivedSettings) { if (wasFree) { this._freeSessionsCount--; } this._sessionsCount--; const where = this.sessions[normalizedOptions]; where.splice(where.indexOf(session), 1); if (where.length === 0) { delete this.sessions[normalizedOptions]; } } else { const error = new Error("Session closed without receiving a SETTINGS frame"); error.code = "HTTP2WRAPPER_NOSETTINGS"; for (const { reject: reject2 } of listeners) { reject2(error); } removeFromQueue(); } this._tryToCreateNewSession(normalizedOptions, normalizedOrigin); }); const processListeners = () => { if (!(normalizedOptions in this.queue) || !isFree()) { return; } for (const origin2 of session[kOriginSet]) { if (origin2 in this.queue[normalizedOptions]) { const { listeners: listeners2 } = this.queue[normalizedOptions][origin2]; while (listeners2.length !== 0 && isFree()) { listeners2.shift().resolve(session); } const where = this.queue[normalizedOptions]; if (where[origin2].listeners.length === 0) { delete where[origin2]; if (Object.keys(where).length === 0) { delete this.queue[normalizedOptions]; break; } } if (!isFree()) { break; } } } }; session.on("origin", () => { session[kOriginSet] = session.originSet; if (!isFree()) { return; } processListeners(); closeCoveredSessions(this.sessions[normalizedOptions], session); }); session.once("remoteSettings", () => { session.ref(); session.unref(); this._sessionsCount++; if (entry.destroyed) { const error = new Error("Agent has been destroyed"); for (const listener of listeners) { listener.reject(error); } session.destroy(); return; } session[kOriginSet] = session.originSet; { const where = this.sessions; if (normalizedOptions in where) { const sessions = where[normalizedOptions]; sessions.splice(getSortedIndex(sessions, session, compareSessions), 0, session); } else { where[normalizedOptions] = [session]; } } this._freeSessionsCount += 1; receivedSettings = true; this.emit("session", session); processListeners(); removeFromQueue(); if (session[kCurrentStreamsCount] === 0 && this._freeSessionsCount > this.maxFreeSessions) { session.close(); } if (listeners.length !== 0) { this.getSession(normalizedOrigin, options, listeners); listeners.length = 0; } session.on("remoteSettings", () => { processListeners(); closeCoveredSessions(this.sessions[normalizedOptions], session); }); }); session[kRequest] = session.request; session.request = (headers, streamOptions) => { if (session[kGracefullyClosing]) { throw new Error("The session is gracefully closing. No new streams are allowed."); } const stream = session[kRequest](headers, streamOptions); session.ref(); ++session[kCurrentStreamsCount]; if (session[kCurrentStreamsCount] === session.remoteSettings.maxConcurrentStreams) { this._freeSessionsCount--; } stream.once("close", () => { wasFree = isFree(); --session[kCurrentStreamsCount]; if (!session.destroyed && !session.closed) { closeSessionIfCovered(this.sessions[normalizedOptions], session); if (isFree() && !session.closed) { if (!wasFree) { this._freeSessionsCount++; wasFree = true; } const isEmpty = session[kCurrentStreamsCount] === 0; if (isEmpty) { session.unref(); } if (isEmpty && (this._freeSessionsCount > this.maxFreeSessions || session[kGracefullyClosing])) { session.close(); } else { closeCoveredSessions(this.sessions[normalizedOptions], session); processListeners(); } } } }); return stream; }; } catch (error) { for (const listener of listeners) { listener.reject(error); } removeFromQueue(); } }; entry.listeners = listeners; entry.completed = false; entry.destroyed = false; this.queue[normalizedOptions][normalizedOrigin] = entry; this._tryToCreateNewSession(normalizedOptions, normalizedOrigin); }); } request(origin, options, headers, streamOptions) { return new Promise((resolve, reject) => { this.getSession(origin, options, [{ reject, resolve: (session) => { try { resolve(session.request(headers, streamOptions)); } catch (error) { reject(error); } } }]); }); } createConnection(origin, options) { return Agent.connect(origin, options); } static connect(origin, options) { options.ALPNProtocols = ["h2"]; const port = origin.port || 443; const host = origin.hostname || origin.host; if (typeof options.servername === "undefined") { options.servername = host; } return tls.connect(port, host, options); } closeFreeSessions() { for (const sessions of Object.values(this.sessions)) { for (const session of sessions) { if (session[kCurrentStreamsCount] === 0) { session.close(); } } } } destroy(reason) { for (const sessions of Object.values(this.sessions)) { for (const session of sessions) { session.destroy(reason); } } for (const entriesOfAuthority of Object.values(this.queue)) { for (const entry of Object.values(entriesOfAuthority)) { entry.destroyed = true; } } this.queue = {}; } get freeSessions() { return getSessions({ agent: this, isFree: true }); } get busySessions() { return getSessions({ agent: this, isFree: false }); } }; Agent.kCurrentStreamsCount = kCurrentStreamsCount; Agent.kGracefullyClosing = kGracefullyClosing; module2.exports = { Agent, globalAgent: new Agent() }; } }); // ../../node_modules/http2-wrapper/source/incoming-message.js var require_incoming_message = __commonJS({ "../../node_modules/http2-wrapper/source/incoming-message.js"(exports2, module2) { "use strict"; var { Readable } = require("stream"); var IncomingMessage = class extends Readable { constructor(socket, highWaterMark) { super({ highWaterMark, autoDestroy: false }); this.statusCode = null; this.statusMessage = ""; this.httpVersion = "2.0"; this.httpVersionMajor = 2; this.httpVersionMinor = 0; this.headers = {}; this.trailers = {}; this.req = null; this.aborted = false; this.complete = false; this.upgrade = null; this.rawHeaders = []; this.rawTrailers = []; this.socket = socket; this.connection = socket; this._dumped = false; } _destroy(error) { this.req._request.destroy(error); } setTimeout(ms, callback) { this.req.setTimeout(ms, callback); return this; } _dump() { if (!this._dumped) { this._dumped = true; this.removeAllListeners("data"); this.resume(); } } _read() { if (this.req) { this.req._request.resume(); } } }; module2.exports = IncomingMessage; } }); // ../../node_modules/http2-wrapper/source/utils/url-to-options.js var require_url_to_options = __commonJS({ "../../node_modules/http2-wrapper/source/utils/url-to-options.js"(exports2, module2) { "use strict"; module2.exports = (url) => { const options = { protocol: url.protocol, hostname: typeof url.hostname === "string" && url.hostname.startsWith("[") ? url.hostname.slice(1, -1) : url.hostname, host: url.host, hash: url.hash, search: url.search, pathname: url.pathname, href: url.href, path: `${url.pathname || ""}${url.search || ""}` }; if (typeof url.port === "string" && url.port.length !== 0) { options.port = Number(url.port); } if (url.username || url.password) { options.auth = `${url.username || ""}:${url.password || ""}`; } return options; }; } }); // ../../node_modules/http2-wrapper/source/utils/proxy-events.js var require_proxy_events = __commonJS({ "../../node_modules/http2-wrapper/source/utils/proxy-events.js"(exports2, module2) { "use strict"; module2.exports = (from, to, events) => { for (const event of events) { from.on(event, (...args) => to.emit(event, ...args)); } }; } }); // ../../node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js var require_is_request_pseudo_header = __commonJS({ "../../node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js"(exports2, module2) { "use strict"; module2.exports = (header) => { switch (header) { case ":method": case ":scheme": case ":authority": case ":path": return true; default: return false; } }; } }); // ../../node_modules/http2-wrapper/source/utils/errors.js var require_errors = __commonJS({ "../../node_modules/http2-wrapper/source/utils/errors.js"(exports2, module2) { "use strict"; var makeError = (Base, key, getMessage) => { module2.exports[key] = class NodeError extends Base { constructor(...args) { super(typeof getMessage === "string" ? getMessage : getMessage(args)); this.name = `${super.name} [${key}]`; this.code = key; } }; }; makeError(TypeError, "ERR_INVALID_ARG_TYPE", (args) => { const type = args[0].includes(".") ? "property" : "argument"; let valid = args[1]; const isManyTypes = Array.isArray(valid); if (isManyTypes) { valid = `${valid.slice(0, -1).join(", ")} or ${valid.slice(-1)}`; } return `The "${args[0]}" ${type} must be ${isManyTypes ? "one of" : "of"} type ${valid}. Received ${typeof args[2]}`; }); makeError(TypeError, "ERR_INVALID_PROTOCOL", (args) => { return `Protocol "${args[0]}" not supported. Expected "${args[1]}"`; }); makeError(Error, "ERR_HTTP_HEADERS_SENT", (args) => { return `Cannot ${args[0]} headers after they are sent to the client`; }); makeError(TypeError, "ERR_INVALID_HTTP_TOKEN", (args) => { return `${args[0]} must be a valid HTTP token [${args[1]}]`; }); makeError(TypeError, "ERR_HTTP_INVALID_HEADER_VALUE", (args) => { return `Invalid value "${args[0]} for header "${args[1]}"`; }); makeError(TypeError, "ERR_INVALID_CHAR", (args) => { return `Invalid character in ${args[0]} [${args[1]}]`; }); } }); // ../../node_modules/http2-wrapper/source/client-request.js var require_client_request = __commonJS({ "../../node_modules/http2-wrapper/source/client-request.js"(exports2, module2) { "use strict"; var http2 = require("http2"); var { Writable } = require("stream"); var { Agent, globalAgent } = require_agent(); var IncomingMessage = require_incoming_message(); var urlToOptions = require_url_to_options(); var proxyEvents = require_proxy_events(); var isRequestPseudoHeader = require_is_request_pseudo_header(); var { ERR_INVALID_ARG_TYPE, ERR_INVALID_PROTOCOL, ERR_HTTP_HEADERS_SENT, ERR_INVALID_HTTP_TOKEN, ERR_HTTP_INVALID_HEADER_VALUE, ERR_INVALID_CHAR } = require_errors(); var { HTTP2_HEADER_STATUS, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_METHOD_CONNECT } = http2.constants; var kHeaders = Symbol("headers"); var kOrigin = Symbol("origin"); var kSession = Symbol("session"); var kOptions = Symbol("options"); var kFlushedHeaders = Symbol("flushedHeaders"); var kJobs = Symbol("jobs"); var isValidHttpToken = /^[\^`\-\w!#$%&*+.|~]+$/; var isInvalidHeaderValue = /[^\t\u0020-\u007E\u0080-\u00FF]/; var ClientRequest = class extends Writable { constructor(input, options, callback) { super({ autoDestroy: false }); const hasInput = typeof input === "string" || input instanceof URL; if (hasInput) { input = urlToOptions(input instanceof URL ? input : new URL(input)); } if (typeof options === "function" || options === void 0) { callback = options; options = hasInput ? input : __spreadValues({}, input); } else { options = __spreadValues(__spreadValues({}, input), options); } if (options.h2session) { this[kSession] = options.h2session; } else if (options.agent === false) { this.agent = new Agent({ maxFreeSessions: 0 }); } else if (typeof options.agent === "undefined" || options.agent === null) { if (typeof options.createConnection === "function") { this.agent = new Agent({ maxFreeSessions: 0 }); this.agent.createConnection = options.createConnection; } else { this.agent = globalAgent; } } else if (typeof options.agent.request === "function") { this.agent = options.agent; } else { throw new ERR_INVALID_ARG_TYPE("options.agent", ["Agent-like Object", "undefined", "false"], options.agent); } if (options.protocol && options.protocol !== "https:") { throw new ERR_INVALID_PROTOCOL(options.protocol, "https:"); } const port = options.port || options.defaultPort || this.agent && this.agent.defaultPort || 443; const host = options.hostname || options.host || "localhost"; delete options.hostname; delete options.host; delete options.port; const { timeout: timeout2 } = options; options.timeout = void 0; this[kHeaders] = /* @__PURE__ */ Object.create(null); this[kJobs] = []; this.socket = null; this.connection = null; this.method = options.method || "GET"; this.path = options.path; this.res = null; this.aborted = false; this.reusedSocket = false; if (options.headers) { for (const [header, value] of Object.entries(options.headers)) { this.setHeader(header, value); } } if (options.auth && !("authorization" in this[kHeaders])) { this[kHeaders].authorization = "Basic " + Buffer.from(options.auth).toString("base64"); } options.session = options.tlsSession; options.path = options.socketPath; this[kOptions] = options; if (port === 443) { this[kOrigin] = `https://${host}`; if (!(":authority" in this[kHeaders])) { this[kHeaders][":authority"] = host; } } else { this[kOrigin] = `https://${host}:${port}`; if (!(":authority" in this[kHeaders])) { this[kHeaders][":authority"] = `${host}:${port}`; } } if (timeout2) { this.setTimeout(timeout2); } if (callback) { this.once("response", callback); } this[kFlushedHeaders] = false; } get method() { return this[kHeaders][HTTP2_HEADER_METHOD]; } set method(value) { if (value) { this[kHeaders][HTTP2_HEADER_METHOD] = value.toUpperCase(); } } get path() { return this[kHeaders][HTTP2_HEADER_PATH]; } set path(value) { if (value) { this[kHeaders][HTTP2_HEADER_PATH] = value; } } get _mustNotHaveABody() { return this.method === "GET" || this.method === "HEAD" || this.method === "DELETE"; } _write(chunk, encoding, callback) { if (this._mustNotHaveABody) { callback(new Error("The GET, HEAD and DELETE methods must NOT have a body")); return; } this.flushHeaders(); const callWrite = () => this._request.write(chunk, encoding, callback); if (this._request) { callWrite(); } else { this[kJobs].push(callWrite); } } _final(callback) { if (this.destroyed) { return; } this.flushHeaders(); const callEnd = () => { if (this._mustNotHaveABody) { callback(); return; } this._request.end(callback); }; if (this._request) { callEnd(); } else { this[kJobs].push(callEnd); } } abort() { if (this.res && this.res.complete) { return; } if (!this.aborted) { process.nextTick(() => this.emit("abort")); } this.aborted = true; this.destroy(); } _destroy(error, callback) { if (this.res) { this.res._dump(); } if (this._request) { this._request.destroy(); } callback(error); } async flushHeaders() { if (this[kFlushedHeaders] || this.destroyed) { return; } this[kFlushedHeaders] = true; const isConnectMethod = this.method === HTTP2_METHOD_CONNECT; const onStream = (stream) => { this._request = stream; if (this.destroyed) { stream.destroy(); return; } if (!isConnectMethod) { proxyEvents(stream, this, ["timeout", "continue", "close", "error"]); } const waitForEnd = (fn) => { return (...args) => { if (!this.writable && !this.destroyed) { fn(...args); } else { this.once("finish", () => { fn(...args); }); } }; }; stream.once("response", waitForEnd((headers, flags, rawHeaders) => { const response = new IncomingMessage(this.socket, stream.readableHighWaterMark); this.res = response; response.req = this; response.statusCode = headers[HTTP2_HEADER_STATUS]; response.headers = headers; response.rawHeaders = rawHeaders; response.once("end", () => { if (this.aborted) { response.aborted = true; response.emit("aborted"); } else { response.complete = true; response.socket = null; response.connection = null; } }); if (isConnectMethod) { response.upgrade = true; if (this.emit("connect", response, stream, Buffer.alloc(0))) { this.emit("close"); } else { stream.destroy(); } } else { stream.on("data", (chunk) => { if (!response._dumped && !response.push(chunk)) { stream.pause(); } }); stream.once("end", () => { response.push(null); }); if (!this.emit("response", response)) { response._dump(); } } })); stream.once("headers", waitForEnd((headers) => this.emit("information", { statusCode: headers[HTTP2_HEADER_STATUS] }))); stream.once("trailers", waitForEnd((trailers, flags, rawTrailers) => { const { res } = this; res.trailers = trailers; res.rawTrailers = rawTrailers; })); const { socket } = stream.session; this.socket = socket; this.connection = socket; for (const job of this[kJobs]) { job(); } this.emit("socket", this.socket); }; if (this[kSession]) { try { onStream(this[kSession].request(this[kHeaders])); } catch (error) { this.emit("error", error); } } else { this.reusedSocket = true; try { onStream(await this.agent.request(this[kOrigin], this[kOptions], this[kHeaders])); } catch (error) { this.emit("error", error); } } } getHeader(name) { if (typeof name !== "string") { throw new ERR_INVALID_ARG_TYPE("name", "string", name); } return this[kHeaders][name.toLowerCase()]; } get headersSent() { return this[kFlushedHeaders]; } removeHeader(name) { if (typeof name !== "string") { throw new ERR_INVALID_ARG_TYPE("name", "string", name); } if (this.headersSent) { throw new ERR_HTTP_HEADERS_SENT("remove"); } delete this[kHeaders][name.toLowerCase()]; } setHeader(name, value) { if (this.headersSent) { throw new ERR_HTTP_HEADERS_SENT("set"); } if (typeof name !== "string" || !isValidHttpToken.test(name) && !isRequestPseudoHeader(name)) { throw new ERR_INVALID_HTTP_TOKEN("Header name", name); } if (typeof value === "undefined") { throw new ERR_HTTP_INVALID_HEADER_VALUE(value, name); } if (isInvalidHeaderValue.test(value)) { throw new ERR_INVALID_CHAR("header content", name); } this[kHeaders][name.toLowerCase()] = value; } setNoDelay() { } setSocketKeepAlive() { } setTimeout(ms, callback) { const applyTimeout = () => this._request.setTimeout(ms, callback); if (this._request) { applyTimeout(); } else { this[kJobs].push(applyTimeout); } return this; } get maxHeadersCount() { if (!this.destroyed && this._request) { return this._request.session.localSettings.maxHeaderListSize; } return void 0; } set maxHeadersCount(_value) { } }; module2.exports = ClientRequest; } }); // ../../node_modules/resolve-alpn/index.js var require_resolve_alpn = __commonJS({ "../../node_modules/resolve-alpn/index.js"(exports2, module2) { "use strict"; var tls = require("tls"); module2.exports = (options = {}) => new Promise((resolve, reject) => { const socket = tls.connect(options, () => { if (options.resolveSocket) { socket.off("error", reject); resolve({ alpnProtocol: socket.alpnProtocol, socket }); } else { socket.destroy(); resolve({ alpnProtocol: socket.alpnProtocol }); } }); socket.on("error", reject); }); } }); // ../../node_modules/http2-wrapper/source/utils/calculate-server-name.js var require_calculate_server_name = __commonJS({ "../../node_modules/http2-wrapper/source/utils/calculate-server-name.js"(exports2, module2) { "use strict"; var net = require("net"); module2.exports = (options) => { let servername = options.host; const hostHeader = options.headers && options.headers.host; if (hostHeader) { if (hostHeader.startsWith("[")) { const index = hostHeader.indexOf("]"); if (index === -1) { servername = hostHeader; } else { servername = hostHeader.slice(1, -1); } } else { servername = hostHeader.split(":", 1)[0]; } } if (net.isIP(servername)) { return ""; } return servername; }; } }); // ../../node_modules/http2-wrapper/source/auto.js var require_auto = __commonJS({ "../../node_modules/http2-wrapper/source/auto.js"(exports2, module2) { "use strict"; var http = require("http"); var https = require("https"); var resolveALPN = require_resolve_alpn(); var QuickLRU = require_quick_lru(); var Http2ClientRequest = require_client_request(); var calculateServerName = require_calculate_server_name(); var urlToOptions = require_url_to_options(); var cache = new QuickLRU({ maxSize: 100 }); var queue = /* @__PURE__ */ new Map(); var installSocket = (agent, socket, options) => { socket._httpMessage = { shouldKeepAlive: true }; const onFree = () => { agent.emit("free", socket, options); }; socket.on("free", onFree); const onClose = () => { agent.removeSocket(socket, options); }; socket.on("close", onClose); const onRemove = () => { agent.removeSocket(socket, options); socket.off("close", onClose); socket.off("free", onFree); socket.off("agentRemove", onRemove); }; socket.on("agentRemove", onRemove); agent.emit("free", socket, options); }; var resolveProtocol = async (options) => { const name = `${options.host}:${options.port}:${options.ALPNProtocols.sort()}`; if (!cache.has(name)) { if (queue.has(name)) { const result = await queue.get(name); return result.alpnProtocol; } const { path: path2, agent } = options; options.path = options.socketPath; const resultPromise = resolveALPN(options); queue.set(name, resultPromise); try { const { socket, alpnProtocol } = await resultPromise; cache.set(name, alpnProtocol); options.path = path2; if (alpnProtocol === "h2") { socket.destroy(); } else { const { globalAgent } = https; const defaultCreateConnection = https.Agent.prototype.createConnection; if (agent) { if (agent.createConnection === defaultCreateConnection) { installSocket(agent, socket, options); } else { socket.destroy(); } } else if (globalAgent.createConnection === defaultCreateConnection) { installSocket(globalAgent, socket, options); } else { socket.destroy(); } } queue.delete(name); return alpnProtocol; } catch (error) { queue.delete(name); throw error; } } return cache.get(name); }; module2.exports = async (input, options, callback) => { if (typeof input === "string" || input instanceof URL) { input = urlToOptions(new URL(input)); } if (typeof options === "function") { callback = options; options = void 0; } options = __spreadProps(__spreadValues(__spreadValues({ ALPNProtocols: ["h2", "http/1.1"] }, input), options), { resolveSocket: true }); if (!Array.isArray(options.ALPNProtocols) || options.ALPNProtocols.length === 0) { throw new Error("The `ALPNProtocols` option must be an Array with at least one entry"); } options.protocol = options.protocol || "https:"; const isHttps = options.protocol === "https:"; options.host = options.hostname || options.host || "localhost"; options.session = options.tlsSession; options.servername = options.servername || calculateServerName(options); options.port = options.port || (isHttps ? 443 : 80); options._defaultAgent = isHttps ? https.globalAgent : http.globalAgent; const agents = options.agent; if (agents) { if (agents.addRequest) { throw new Error("The `options.agent` object can contain only `http`, `https` or `http2` properties"); } options.agent = agents[isHttps ? "https" : "http"]; } if (isHttps) { const protocol = await resolveProtocol(options); if (protocol === "h2") { if (agents) { options.agent = agents.http2; } return new Http2ClientRequest(options, callback); } } return http.request(options, callback); }; module2.exports.protocolCache = cache; } }); // ../../node_modules/http2-wrapper/source/index.js var require_source4 = __commonJS({ "../../node_modules/http2-wrapper/source/index.js"(exports2, module2) { "use strict"; var http2 = require("http2"); var agent = require_agent(); var ClientRequest = require_client_request(); var IncomingMessage = require_incoming_message(); var auto = require_auto(); var request = (url, options, callback) => { return new ClientRequest(url, options, callback); }; var get = (url, options, callback) => { const req = new ClientRequest(url, options, callback); req.end(); return req; }; module2.exports = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, http2), { ClientRequest, IncomingMessage }), agent), { request, get, auto }); } }); // ../../node_modules/got/dist/source/core/utils/is-form-data.js var require_is_form_data = __commonJS({ "../../node_modules/got/dist/source/core/utils/is-form-data.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var is_1 = require_dist(); exports2.default = (body) => is_1.default.nodeStream(body) && is_1.default.function_(body.getBoundary); } }); // ../../node_modules/got/dist/source/core/utils/get-body-size.js var require_get_body_size = __commonJS({ "../../node_modules/got/dist/source/core/utils/get-body-size.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var fs_1 = require("fs"); var util_1 = require("util"); var is_1 = require_dist(); var is_form_data_1 = require_is_form_data(); var statAsync = util_1.promisify(fs_1.stat); exports2.default = async (body, headers) => { if (headers && "content-length" in headers) { return Number(headers["content-length"]); } if (!body) { return 0; } if (is_1.default.string(body)) { return Buffer.byteLength(body); } if (is_1.default.buffer(body)) { return body.length; } if (is_form_data_1.default(body)) { return util_1.promisify(body.getLength.bind(body))(); } if (body instanceof fs_1.ReadStream) { const { size } = await statAsync(body.path); if (size === 0) { return void 0; } return size; } return void 0; }; } }); // ../../node_modules/got/dist/source/core/utils/proxy-events.js var require_proxy_events2 = __commonJS({ "../../node_modules/got/dist/source/core/utils/proxy-events.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); function default_1(from, to, events) { const fns = {}; for (const event of events) { fns[event] = (...args) => { to.emit(event, ...args); }; from.on(event, fns[event]); } return () => { for (const event of events) { from.off(event, fns[event]); } }; } exports2.default = default_1; } }); // ../../node_modules/got/dist/source/core/utils/unhandle.js var require_unhandle = __commonJS({ "../../node_modules/got/dist/source/core/utils/unhandle.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = () => { const handlers = []; return { once(origin, event, fn) { origin.once(event, fn); handlers.push({ origin, event, fn }); }, unhandleAll() { for (const handler of handlers) { const { origin, event, fn } = handler; origin.removeListener(event, fn); } handlers.length = 0; } }; }; } }); // ../../node_modules/got/dist/source/core/utils/timed-out.js var require_timed_out = __commonJS({ "../../node_modules/got/dist/source/core/utils/timed-out.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TimeoutError = void 0; var net = require("net"); var unhandle_1 = require_unhandle(); var reentry = Symbol("reentry"); var noop = () => { }; var TimeoutError = class extends Error { constructor(threshold, event) { super(`Timeout awaiting '${event}' for ${threshold}ms`); this.event = event; this.name = "TimeoutError"; this.code = "ETIMEDOUT"; } }; exports2.TimeoutError = TimeoutError; exports2.default = (request, delays, options) => { if (reentry in request) { return noop; } request[reentry] = true; const cancelers = []; const { once, unhandleAll } = unhandle_1.default(); const addTimeout = (delay, callback, event) => { var _a; const timeout2 = setTimeout(callback, delay, delay, event); (_a = timeout2.unref) === null || _a === void 0 ? void 0 : _a.call(timeout2); const cancel = () => { clearTimeout(timeout2); }; cancelers.push(cancel); return cancel; }; const { host, hostname } = options; const timeoutHandler = (delay, event) => { request.destroy(new TimeoutError(delay, event)); }; const cancelTimeouts = () => { for (const cancel of cancelers) { cancel(); } unhandleAll(); }; request.once("error", (error) => { cancelTimeouts(); if (request.listenerCount("error") === 0) { throw error; } }); request.once("close", cancelTimeouts); once(request, "response", (response) => { once(response, "end", cancelTimeouts); }); if (typeof delays.request !== "undefined") { addTimeout(delays.request, timeoutHandler, "request"); } if (typeof delays.socket !== "undefined") { const socketTimeoutHandler = () => { timeoutHandler(delays.socket, "socket"); }; request.setTimeout(delays.socket, socketTimeoutHandler); cancelers.push(() => { request.removeListener("timeout", socketTimeoutHandler); }); } once(request, "socket", (socket) => { var _a; const { socketPath } = request; if (socket.connecting) { const hasPath = Boolean(socketPath !== null && socketPath !== void 0 ? socketPath : net.isIP((_a = hostname !== null && hostname !== void 0 ? hostname : host) !== null && _a !== void 0 ? _a : "") !== 0); if (typeof delays.lookup !== "undefined" && !hasPath && typeof socket.address().address === "undefined") { const cancelTimeout = addTimeout(delays.lookup, timeoutHandler, "lookup"); once(socket, "lookup", cancelTimeout); } if (typeof delays.connect !== "undefined") { const timeConnect = () => addTimeout(delays.connect, timeoutHandler, "connect"); if (hasPath) { once(socket, "connect", timeConnect()); } else { once(socket, "lookup", (error) => { if (error === null) { once(socket, "connect", timeConnect()); } }); } } if (typeof delays.secureConnect !== "undefined" && options.protocol === "https:") { once(socket, "connect", () => { const cancelTimeout = addTimeout(delays.secureConnect, timeoutHandler, "secureConnect"); once(socket, "secureConnect", cancelTimeout); }); } } if (typeof delays.send !== "undefined") { const timeRequest = () => addTimeout(delays.send, timeoutHandler, "send"); if (socket.connecting) { once(socket, "connect", () => { once(request, "upload-complete", timeRequest()); }); } else { once(request, "upload-complete", timeRequest()); } } }); if (typeof delays.response !== "undefined") { once(request, "upload-complete", () => { const cancelTimeout = addTimeout(delays.response, timeoutHandler, "response"); once(request, "response", cancelTimeout); }); } return cancelTimeouts; }; } }); // ../../node_modules/got/dist/source/core/utils/url-to-options.js var require_url_to_options2 = __commonJS({ "../../node_modules/got/dist/source/core/utils/url-to-options.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var is_1 = require_dist(); exports2.default = (url) => { url = url; const options = { protocol: url.protocol, hostname: is_1.default.string(url.hostname) && url.hostname.startsWith("[") ? url.hostname.slice(1, -1) : url.hostname, host: url.host, hash: url.hash, search: url.search, pathname: url.pathname, href: url.href, path: `${url.pathname || ""}${url.search || ""}` }; if (is_1.default.string(url.port) && url.port.length > 0) { options.port = Number(url.port); } if (url.username || url.password) { options.auth = `${url.username || ""}:${url.password || ""}`; } return options; }; } }); // ../../node_modules/got/dist/source/core/utils/options-to-url.js var require_options_to_url = __commonJS({ "../../node_modules/got/dist/source/core/utils/options-to-url.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var url_1 = require("url"); var keys = [ "protocol", "host", "hostname", "port", "pathname", "search" ]; exports2.default = (origin, options) => { var _a, _b; if (options.path) { if (options.pathname) { throw new TypeError("Parameters `path` and `pathname` are mutually exclusive."); } if (options.search) { throw new TypeError("Parameters `path` and `search` are mutually exclusive."); } if (options.searchParams) { throw new TypeError("Parameters `path` and `searchParams` are mutually exclusive."); } } if (options.search && options.searchParams) { throw new TypeError("Parameters `search` and `searchParams` are mutually exclusive."); } if (!origin) { if (!options.protocol) { throw new TypeError("No URL protocol specified"); } origin = `${options.protocol}//${(_b = (_a = options.hostname) !== null && _a !== void 0 ? _a : options.host) !== null && _b !== void 0 ? _b : ""}`; } const url = new url_1.URL(origin); if (options.path) { const searchIndex = options.path.indexOf("?"); if (searchIndex === -1) { options.pathname = options.path; } else { options.pathname = options.path.slice(0, searchIndex); options.search = options.path.slice(searchIndex + 1); } delete options.path; } for (const key of keys) { if (options[key]) { url[key] = options[key].toString(); } } return url; }; } }); // ../../node_modules/got/dist/source/core/utils/weakable-map.js var require_weakable_map = __commonJS({ "../../node_modules/got/dist/source/core/utils/weakable-map.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var WeakableMap = class { constructor() { this.weakMap = /* @__PURE__ */ new WeakMap(); this.map = /* @__PURE__ */ new Map(); } set(key, value) { if (typeof key === "object") { this.weakMap.set(key, value); } else { this.map.set(key, value); } } get(key) { if (typeof key === "object") { return this.weakMap.get(key); } return this.map.get(key); } has(key) { if (typeof key === "object") { return this.weakMap.has(key); } return this.map.has(key); } }; exports2.default = WeakableMap; } }); // ../../node_modules/got/dist/source/core/utils/get-buffer.js var require_get_buffer = __commonJS({ "../../node_modules/got/dist/source/core/utils/get-buffer.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var getBuffer = async (stream) => { const chunks = []; let length = 0; for await (const chunk of stream) { chunks.push(chunk); length += Buffer.byteLength(chunk); } if (Buffer.isBuffer(chunks[0])) { return Buffer.concat(chunks, length); } return Buffer.from(chunks.join("")); }; exports2.default = getBuffer; } }); // ../../node_modules/got/dist/source/core/utils/dns-ip-version.js var require_dns_ip_version = __commonJS({ "../../node_modules/got/dist/source/core/utils/dns-ip-version.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.dnsLookupIpVersionToFamily = exports2.isDnsLookupIpVersion = void 0; var conversionTable = { auto: 0, ipv4: 4, ipv6: 6 }; exports2.isDnsLookupIpVersion = (value) => { return value in conversionTable; }; exports2.dnsLookupIpVersionToFamily = (dnsLookupIpVersion) => { if (exports2.isDnsLookupIpVersion(dnsLookupIpVersion)) { return conversionTable[dnsLookupIpVersion]; } throw new Error("Invalid DNS lookup IP version"); }; } }); // ../../node_modules/got/dist/source/core/utils/is-response-ok.js var require_is_response_ok = __commonJS({ "../../node_modules/got/dist/source/core/utils/is-response-ok.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isResponseOk = void 0; exports2.isResponseOk = (response) => { const { statusCode } = response; const limitStatusCode = response.request.options.followRedirect ? 299 : 399; return statusCode >= 200 && statusCode <= limitStatusCode || statusCode === 304; }; } }); // ../../node_modules/got/dist/source/utils/deprecation-warning.js var require_deprecation_warning = __commonJS({ "../../node_modules/got/dist/source/utils/deprecation-warning.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var alreadyWarned = /* @__PURE__ */ new Set(); exports2.default = (message) => { if (alreadyWarned.has(message)) { return; } alreadyWarned.add(message); process.emitWarning(`Got: ${message}`, { type: "DeprecationWarning" }); }; } }); // ../../node_modules/got/dist/source/as-promise/normalize-arguments.js var require_normalize_arguments = __commonJS({ "../../node_modules/got/dist/source/as-promise/normalize-arguments.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var is_1 = require_dist(); var normalizeArguments = (options, defaults) => { if (is_1.default.null_(options.encoding)) { throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead"); } is_1.assert.any([is_1.default.string, is_1.default.undefined], options.encoding); is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.resolveBodyOnly); is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.methodRewriting); is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.isStream); is_1.assert.any([is_1.default.string, is_1.default.undefined], options.responseType); if (options.responseType === void 0) { options.responseType = "text"; } const { retry } = options; if (defaults) { options.retry = __spreadValues({}, defaults.retry); } else { options.retry = { calculateDelay: (retryObject) => retryObject.computedValue, limit: 0, methods: [], statusCodes: [], errorCodes: [], maxRetryAfter: void 0 }; } if (is_1.default.object(retry)) { options.retry = __spreadValues(__spreadValues({}, options.retry), retry); options.retry.methods = [...new Set(options.retry.methods.map((method) => method.toUpperCase()))]; options.retry.statusCodes = [...new Set(options.retry.statusCodes)]; options.retry.errorCodes = [...new Set(options.retry.errorCodes)]; } else if (is_1.default.number(retry)) { options.retry.limit = retry; } if (is_1.default.undefined(options.retry.maxRetryAfter)) { options.retry.maxRetryAfter = Math.min(...[options.timeout.request, options.timeout.connect].filter(is_1.default.number)); } if (is_1.default.object(options.pagination)) { if (defaults) { options.pagination = __spreadValues(__spreadValues({}, defaults.pagination), options.pagination); } const { pagination } = options; if (!is_1.default.function_(pagination.transform)) { throw new Error("`options.pagination.transform` must be implemented"); } if (!is_1.default.function_(pagination.shouldContinue)) { throw new Error("`options.pagination.shouldContinue` must be implemented"); } if (!is_1.default.function_(pagination.filter)) { throw new TypeError("`options.pagination.filter` must be implemented"); } if (!is_1.default.function_(pagination.paginate)) { throw new Error("`options.pagination.paginate` must be implemented"); } } if (options.responseType === "json" && options.headers.accept === void 0) { options.headers.accept = "application/json"; } return options; }; exports2.default = normalizeArguments; } }); // ../../node_modules/got/dist/source/core/calculate-retry-delay.js var require_calculate_retry_delay = __commonJS({ "../../node_modules/got/dist/source/core/calculate-retry-delay.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryAfterStatusCodes = void 0; exports2.retryAfterStatusCodes = /* @__PURE__ */ new Set([413, 429, 503]); var calculateRetryDelay = ({ attemptCount, retryOptions, error, retryAfter }) => { if (attemptCount > retryOptions.limit) { return 0; } const hasMethod = retryOptions.methods.includes(error.options.method); const hasErrorCode = retryOptions.errorCodes.includes(error.code); const hasStatusCode = error.response && retryOptions.statusCodes.includes(error.response.statusCode); if (!hasMethod || !hasErrorCode && !hasStatusCode) { return 0; } if (error.response) { if (retryAfter) { if (retryOptions.maxRetryAfter === void 0 || retryAfter > retryOptions.maxRetryAfter) { return 0; } return retryAfter; } if (error.response.statusCode === 413) { return 0; } } const noise = Math.random() * 100; return 2 ** (attemptCount - 1) * 1e3 + noise; }; exports2.default = calculateRetryDelay; } }); // ../../node_modules/got/dist/source/core/index.js var require_core = __commonJS({ "../../node_modules/got/dist/source/core/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UnsupportedProtocolError = exports2.ReadError = exports2.TimeoutError = exports2.UploadError = exports2.CacheError = exports2.HTTPError = exports2.MaxRedirectsError = exports2.RequestError = exports2.setNonEnumerableProperties = exports2.knownHookEvents = exports2.withoutBody = exports2.kIsNormalizedAlready = void 0; var util_1 = require("util"); var stream_1 = require("stream"); var fs_1 = require("fs"); var url_1 = require("url"); var http = require("http"); var http_1 = require("http"); var https = require("https"); var http_timer_1 = require_source2(); var cacheable_lookup_1 = require_source3(); var CacheableRequest = require_src4(); var decompressResponse = require_decompress_response(); var http2wrapper = require_source4(); var lowercaseKeys = require_lowercase_keys(); var is_1 = require_dist(); var get_body_size_1 = require_get_body_size(); var is_form_data_1 = require_is_form_data(); var proxy_events_1 = require_proxy_events2(); var timed_out_1 = require_timed_out(); var url_to_options_1 = require_url_to_options2(); var options_to_url_1 = require_options_to_url(); var weakable_map_1 = require_weakable_map(); var get_buffer_1 = require_get_buffer(); var dns_ip_version_1 = require_dns_ip_version(); var is_response_ok_1 = require_is_response_ok(); var deprecation_warning_1 = require_deprecation_warning(); var normalize_arguments_1 = require_normalize_arguments(); var calculate_retry_delay_1 = require_calculate_retry_delay(); var globalDnsCache; var kRequest = Symbol("request"); var kResponse = Symbol("response"); var kResponseSize = Symbol("responseSize"); var kDownloadedSize = Symbol("downloadedSize"); var kBodySize = Symbol("bodySize"); var kUploadedSize = Symbol("uploadedSize"); var kServerResponsesPiped = Symbol("serverResponsesPiped"); var kUnproxyEvents = Symbol("unproxyEvents"); var kIsFromCache = Symbol("isFromCache"); var kCancelTimeouts = Symbol("cancelTimeouts"); var kStartedReading = Symbol("startedReading"); var kStopReading = Symbol("stopReading"); var kTriggerRead = Symbol("triggerRead"); var kBody = Symbol("body"); var kJobs = Symbol("jobs"); var kOriginalResponse = Symbol("originalResponse"); var kRetryTimeout = Symbol("retryTimeout"); exports2.kIsNormalizedAlready = Symbol("isNormalizedAlready"); var supportsBrotli = is_1.default.string(process.versions.brotli); exports2.withoutBody = /* @__PURE__ */ new Set(["GET", "HEAD"]); exports2.knownHookEvents = [ "init", "beforeRequest", "beforeRedirect", "beforeError", "beforeRetry", "afterResponse" ]; function validateSearchParameters(searchParameters) { for (const key in searchParameters) { const value = searchParameters[key]; if (!is_1.default.string(value) && !is_1.default.number(value) && !is_1.default.boolean(value) && !is_1.default.null_(value) && !is_1.default.undefined(value)) { throw new TypeError(`The \`searchParams\` value '${String(value)}' must be a string, number, boolean or null`); } } } function isClientRequest(clientRequest) { return is_1.default.object(clientRequest) && !("statusCode" in clientRequest); } var cacheableStore = new weakable_map_1.default(); var waitForOpenFile = async (file) => new Promise((resolve, reject) => { const onError = (error) => { reject(error); }; if (!file.pending) { resolve(); } file.once("error", onError); file.once("ready", () => { file.off("error", onError); resolve(); }); }); var redirectCodes = /* @__PURE__ */ new Set([300, 301, 302, 303, 304, 307, 308]); var nonEnumerableProperties = [ "context", "body", "json", "form" ]; exports2.setNonEnumerableProperties = (sources, to) => { const properties = {}; for (const source of sources) { if (!source) { continue; } for (const name of nonEnumerableProperties) { if (!(name in source)) { continue; } properties[name] = { writable: true, configurable: true, enumerable: false, value: source[name] }; } } Object.defineProperties(to, properties); }; var RequestError = class extends Error { constructor(message, error, self) { var _a, _b; super(message); Error.captureStackTrace(this, this.constructor); this.name = "RequestError"; this.code = (_a = error.code) !== null && _a !== void 0 ? _a : "ERR_GOT_REQUEST_ERROR"; if (self instanceof Request) { Object.defineProperty(this, "request", { enumerable: false, value: self }); Object.defineProperty(this, "response", { enumerable: false, value: self[kResponse] }); Object.defineProperty(this, "options", { enumerable: false, value: self.options }); } else { Object.defineProperty(this, "options", { enumerable: false, value: self }); } this.timings = (_b = this.request) === null || _b === void 0 ? void 0 : _b.timings; if (is_1.default.string(error.stack) && is_1.default.string(this.stack)) { const indexOfMessage = this.stack.indexOf(this.message) + this.message.length; const thisStackTrace = this.stack.slice(indexOfMessage).split("\n").reverse(); const errorStackTrace = error.stack.slice(error.stack.indexOf(error.message) + error.message.length).split("\n").reverse(); while (errorStackTrace.length !== 0 && errorStackTrace[0] === thisStackTrace[0]) { thisStackTrace.shift(); } this.stack = `${this.stack.slice(0, indexOfMessage)}${thisStackTrace.reverse().join("\n")}${errorStackTrace.reverse().join("\n")}`; } } }; exports2.RequestError = RequestError; var MaxRedirectsError = class extends RequestError { constructor(request) { super(`Redirected ${request.options.maxRedirects} times. Aborting.`, {}, request); this.name = "MaxRedirectsError"; this.code = "ERR_TOO_MANY_REDIRECTS"; } }; exports2.MaxRedirectsError = MaxRedirectsError; var HTTPError = class extends RequestError { constructor(response) { super(`Response code ${response.statusCode} (${response.statusMessage})`, {}, response.request); this.name = "HTTPError"; this.code = "ERR_NON_2XX_3XX_RESPONSE"; } }; exports2.HTTPError = HTTPError; var CacheError = class extends RequestError { constructor(error, request) { super(error.message, error, request); this.name = "CacheError"; this.code = this.code === "ERR_GOT_REQUEST_ERROR" ? "ERR_CACHE_ACCESS" : this.code; } }; exports2.CacheError = CacheError; var UploadError = class extends RequestError { constructor(error, request) { super(error.message, error, request); this.name = "UploadError"; this.code = this.code === "ERR_GOT_REQUEST_ERROR" ? "ERR_UPLOAD" : this.code; } }; exports2.UploadError = UploadError; var TimeoutError = class extends RequestError { constructor(error, timings, request) { super(error.message, error, request); this.name = "TimeoutError"; this.event = error.event; this.timings = timings; } }; exports2.TimeoutError = TimeoutError; var ReadError = class extends RequestError { constructor(error, request) { super(error.message, error, request); this.name = "ReadError"; this.code = this.code === "ERR_GOT_REQUEST_ERROR" ? "ERR_READING_RESPONSE_STREAM" : this.code; } }; exports2.ReadError = ReadError; var UnsupportedProtocolError = class extends RequestError { constructor(options) { super(`Unsupported protocol "${options.url.protocol}"`, {}, options); this.name = "UnsupportedProtocolError"; this.code = "ERR_UNSUPPORTED_PROTOCOL"; } }; exports2.UnsupportedProtocolError = UnsupportedProtocolError; var proxiedRequestEvents = [ "socket", "connect", "continue", "information", "upgrade", "timeout" ]; var Request = class extends stream_1.Duplex { constructor(url, options = {}, defaults) { super({ autoDestroy: false, highWaterMark: 0 }); this[kDownloadedSize] = 0; this[kUploadedSize] = 0; this.requestInitialized = false; this[kServerResponsesPiped] = /* @__PURE__ */ new Set(); this.redirects = []; this[kStopReading] = false; this[kTriggerRead] = false; this[kJobs] = []; this.retryCount = 0; this._progressCallbacks = []; const unlockWrite = () => this._unlockWrite(); const lockWrite = () => this._lockWrite(); this.on("pipe", (source) => { source.prependListener("data", unlockWrite); source.on("data", lockWrite); source.prependListener("end", unlockWrite); source.on("end", lockWrite); }); this.on("unpipe", (source) => { source.off("data", unlockWrite); source.off("data", lockWrite); source.off("end", unlockWrite); source.off("end", lockWrite); }); this.on("pipe", (source) => { if (source instanceof http_1.IncomingMessage) { this.options.headers = __spreadValues(__spreadValues({}, source.headers), this.options.headers); } }); const { json, body, form } = options; if (json || body || form) { this._lockWrite(); } if (exports2.kIsNormalizedAlready in options) { this.options = options; } else { try { this.options = this.constructor.normalizeArguments(url, options, defaults); } catch (error) { if (is_1.default.nodeStream(options.body)) { options.body.destroy(); } this.destroy(error); return; } } (async () => { var _a; try { if (this.options.body instanceof fs_1.ReadStream) { await waitForOpenFile(this.options.body); } const { url: normalizedURL } = this.options; if (!normalizedURL) { throw new TypeError("Missing `url` property"); } this.requestUrl = normalizedURL.toString(); decodeURI(this.requestUrl); await this._finalizeBody(); await this._makeRequest(); if (this.destroyed) { (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.destroy(); return; } for (const job of this[kJobs]) { job(); } this[kJobs].length = 0; this.requestInitialized = true; } catch (error) { if (error instanceof RequestError) { this._beforeError(error); return; } if (!this.destroyed) { this.destroy(error); } } })(); } static normalizeArguments(url, options, defaults) { var _a, _b, _c, _d, _e; const rawOptions = options; if (is_1.default.object(url) && !is_1.default.urlInstance(url)) { options = __spreadValues(__spreadValues(__spreadValues({}, defaults), url), options); } else { if (url && options && options.url !== void 0) { throw new TypeError("The `url` option is mutually exclusive with the `input` argument"); } options = __spreadValues(__spreadValues({}, defaults), options); if (url !== void 0) { options.url = url; } if (is_1.default.urlInstance(options.url)) { options.url = new url_1.URL(options.url.toString()); } } if (options.cache === false) { options.cache = void 0; } if (options.dnsCache === false) { options.dnsCache = void 0; } is_1.assert.any([is_1.default.string, is_1.default.undefined], options.method); is_1.assert.any([is_1.default.object, is_1.default.undefined], options.headers); is_1.assert.any([is_1.default.string, is_1.default.urlInstance, is_1.default.undefined], options.prefixUrl); is_1.assert.any([is_1.default.object, is_1.default.undefined], options.cookieJar); is_1.assert.any([is_1.default.object, is_1.default.string, is_1.default.undefined], options.searchParams); is_1.assert.any([is_1.default.object, is_1.default.string, is_1.default.undefined], options.cache); is_1.assert.any([is_1.default.object, is_1.default.number, is_1.default.undefined], options.timeout); is_1.assert.any([is_1.default.object, is_1.default.undefined], options.context); is_1.assert.any([is_1.default.object, is_1.default.undefined], options.hooks); is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.decompress); is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.ignoreInvalidCookies); is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.followRedirect); is_1.assert.any([is_1.default.number, is_1.default.undefined], options.maxRedirects); is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.throwHttpErrors); is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.http2); is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.allowGetBody); is_1.assert.any([is_1.default.string, is_1.default.undefined], options.localAddress); is_1.assert.any([dns_ip_version_1.isDnsLookupIpVersion, is_1.default.undefined], options.dnsLookupIpVersion); is_1.assert.any([is_1.default.object, is_1.default.undefined], options.https); is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.rejectUnauthorized); if (options.https) { is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.https.rejectUnauthorized); is_1.assert.any([is_1.default.function_, is_1.default.undefined], options.https.checkServerIdentity); is_1.assert.any([is_1.default.string, is_1.default.object, is_1.default.array, is_1.default.undefined], options.https.certificateAuthority); is_1.assert.any([is_1.default.string, is_1.default.object, is_1.default.array, is_1.default.undefined], options.https.key); is_1.assert.any([is_1.default.string, is_1.default.object, is_1.default.array, is_1.default.undefined], options.https.certificate); is_1.assert.any([is_1.default.string, is_1.default.undefined], options.https.passphrase); is_1.assert.any([is_1.default.string, is_1.default.buffer, is_1.default.array, is_1.default.undefined], options.https.pfx); } is_1.assert.any([is_1.default.object, is_1.default.undefined], options.cacheOptions); if (is_1.default.string(options.method)) { options.method = options.method.toUpperCase(); } else { options.method = "GET"; } if (options.headers === (defaults === null || defaults === void 0 ? void 0 : defaults.headers)) { options.headers = __spreadValues({}, options.headers); } else { options.headers = lowercaseKeys(__spreadValues(__spreadValues({}, defaults === null || defaults === void 0 ? void 0 : defaults.headers), options.headers)); } if ("slashes" in options) { throw new TypeError("The legacy `url.Url` has been deprecated. Use `URL` instead."); } if ("auth" in options) { throw new TypeError("Parameter `auth` is deprecated. Use `username` / `password` instead."); } if ("searchParams" in options) { if (options.searchParams && options.searchParams !== (defaults === null || defaults === void 0 ? void 0 : defaults.searchParams)) { let searchParameters; if (is_1.default.string(options.searchParams) || options.searchParams instanceof url_1.URLSearchParams) { searchParameters = new url_1.URLSearchParams(options.searchParams); } else { validateSearchParameters(options.searchParams); searchParameters = new url_1.URLSearchParams(); for (const key in options.searchParams) { const value = options.searchParams[key]; if (value === null) { searchParameters.append(key, ""); } else if (value !== void 0) { searchParameters.append(key, value); } } } (_a = defaults === null || defaults === void 0 ? void 0 : defaults.searchParams) === null || _a === void 0 ? void 0 : _a.forEach((value, key) => { if (!searchParameters.has(key)) { searchParameters.append(key, value); } }); options.searchParams = searchParameters; } } options.username = (_b = options.username) !== null && _b !== void 0 ? _b : ""; options.password = (_c = options.password) !== null && _c !== void 0 ? _c : ""; if (is_1.default.undefined(options.prefixUrl)) { options.prefixUrl = (_d = defaults === null || defaults === void 0 ? void 0 : defaults.prefixUrl) !== null && _d !== void 0 ? _d : ""; } else { options.prefixUrl = options.prefixUrl.toString(); if (options.prefixUrl !== "" && !options.prefixUrl.endsWith("/")) { options.prefixUrl += "/"; } } if (is_1.default.string(options.url)) { if (options.url.startsWith("/")) { throw new Error("`input` must not start with a slash when using `prefixUrl`"); } options.url = options_to_url_1.default(options.prefixUrl + options.url, options); } else if (is_1.default.undefined(options.url) && options.prefixUrl !== "" || options.protocol) { options.url = options_to_url_1.default(options.prefixUrl, options); } if (options.url) { if ("port" in options) { delete options.port; } let { prefixUrl } = options; Object.defineProperty(options, "prefixUrl", { set: (value) => { const url2 = options.url; if (!url2.href.startsWith(value)) { throw new Error(`Cannot change \`prefixUrl\` from ${prefixUrl} to ${value}: ${url2.href}`); } options.url = new url_1.URL(value + url2.href.slice(prefixUrl.length)); prefixUrl = value; }, get: () => prefixUrl }); let { protocol } = options.url; if (protocol === "unix:") { protocol = "http:"; options.url = new url_1.URL(`http://unix${options.url.pathname}${options.url.search}`); } if (options.searchParams) { options.url.search = options.searchParams.toString(); } if (protocol !== "http:" && protocol !== "https:") { throw new UnsupportedProtocolError(options); } if (options.username === "") { options.username = options.url.username; } else { options.url.username = options.username; } if (options.password === "") { options.password = options.url.password; } else { options.url.password = options.password; } } const { cookieJar } = options; if (cookieJar) { let { setCookie, getCookieString } = cookieJar; is_1.assert.function_(setCookie); is_1.assert.function_(getCookieString); if (setCookie.length === 4 && getCookieString.length === 0) { setCookie = util_1.promisify(setCookie.bind(options.cookieJar)); getCookieString = util_1.promisify(getCookieString.bind(options.cookieJar)); options.cookieJar = { setCookie, getCookieString }; } } const { cache } = options; if (cache) { if (!cacheableStore.has(cache)) { cacheableStore.set(cache, new CacheableRequest((requestOptions, handler) => { const result = requestOptions[kRequest](requestOptions, handler); if (is_1.default.promise(result)) { result.once = (event, handler2) => { if (event === "error") { result.catch(handler2); } else if (event === "abort") { (async () => { try { const request = await result; request.once("abort", handler2); } catch (_a2) { } })(); } else { throw new Error(`Unknown HTTP2 promise event: ${event}`); } return result; }; } return result; }, cache)); } } options.cacheOptions = __spreadValues({}, options.cacheOptions); if (options.dnsCache === true) { if (!globalDnsCache) { globalDnsCache = new cacheable_lookup_1.default(); } options.dnsCache = globalDnsCache; } else if (!is_1.default.undefined(options.dnsCache) && !options.dnsCache.lookup) { throw new TypeError(`Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${is_1.default(options.dnsCache)}`); } if (is_1.default.number(options.timeout)) { options.timeout = { request: options.timeout }; } else if (defaults && options.timeout !== defaults.timeout) { options.timeout = __spreadValues(__spreadValues({}, defaults.timeout), options.timeout); } else { options.timeout = __spreadValues({}, options.timeout); } if (!options.context) { options.context = {}; } const areHooksDefault = options.hooks === (defaults === null || defaults === void 0 ? void 0 : defaults.hooks); options.hooks = __spreadValues({}, options.hooks); for (const event of exports2.knownHookEvents) { if (event in options.hooks) { if (is_1.default.array(options.hooks[event])) { options.hooks[event] = [...options.hooks[event]]; } else { throw new TypeError(`Parameter \`${event}\` must be an Array, got ${is_1.default(options.hooks[event])}`); } } else { options.hooks[event] = []; } } if (defaults && !areHooksDefault) { for (const event of exports2.knownHookEvents) { const defaultHooks = defaults.hooks[event]; if (defaultHooks.length > 0) { options.hooks[event] = [ ...defaults.hooks[event], ...options.hooks[event] ]; } } } if ("family" in options) { deprecation_warning_1.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"'); } if (defaults === null || defaults === void 0 ? void 0 : defaults.https) { options.https = __spreadValues(__spreadValues({}, defaults.https), options.https); } if ("rejectUnauthorized" in options) { deprecation_warning_1.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"'); } if ("checkServerIdentity" in options) { deprecation_warning_1.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"'); } if ("ca" in options) { deprecation_warning_1.default('"options.ca" was never documented, please use "options.https.certificateAuthority"'); } if ("key" in options) { deprecation_warning_1.default('"options.key" was never documented, please use "options.https.key"'); } if ("cert" in options) { deprecation_warning_1.default('"options.cert" was never documented, please use "options.https.certificate"'); } if ("passphrase" in options) { deprecation_warning_1.default('"options.passphrase" was never documented, please use "options.https.passphrase"'); } if ("pfx" in options) { deprecation_warning_1.default('"options.pfx" was never documented, please use "options.https.pfx"'); } if ("followRedirects" in options) { throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead."); } if (options.agent) { for (const key in options.agent) { if (key !== "http" && key !== "https" && key !== "http2") { throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${key}\``); } } } options.maxRedirects = (_e = options.maxRedirects) !== null && _e !== void 0 ? _e : 0; exports2.setNonEnumerableProperties([defaults, rawOptions], options); return normalize_arguments_1.default(options, defaults); } _lockWrite() { const onLockedWrite = () => { throw new TypeError("The payload has been already provided"); }; this.write = onLockedWrite; this.end = onLockedWrite; } _unlockWrite() { this.write = super.write; this.end = super.end; } async _finalizeBody() { const { options } = this; const { headers } = options; const isForm = !is_1.default.undefined(options.form); const isJSON = !is_1.default.undefined(options.json); const isBody = !is_1.default.undefined(options.body); const hasPayload = isForm || isJSON || isBody; const cannotHaveBody = exports2.withoutBody.has(options.method) && !(options.method === "GET" && options.allowGetBody); this._cannotHaveBody = cannotHaveBody; if (hasPayload) { if (cannotHaveBody) { throw new TypeError(`The \`${options.method}\` method cannot be used with a body`); } if ([isBody, isForm, isJSON].filter((isTrue) => isTrue).length > 1) { throw new TypeError("The `body`, `json` and `form` options are mutually exclusive"); } if (isBody && !(options.body instanceof stream_1.Readable) && !is_1.default.string(options.body) && !is_1.default.buffer(options.body) && !is_form_data_1.default(options.body)) { throw new TypeError("The `body` option must be a stream.Readable, string or Buffer"); } if (isForm && !is_1.default.object(options.form)) { throw new TypeError("The `form` option must be an Object"); } { const noContentType = !is_1.default.string(headers["content-type"]); if (isBody) { if (is_form_data_1.default(options.body) && noContentType) { headers["content-type"] = `multipart/form-data; boundary=${options.body.getBoundary()}`; } this[kBody] = options.body; } else if (isForm) { if (noContentType) { headers["content-type"] = "application/x-www-form-urlencoded"; } this[kBody] = new url_1.URLSearchParams(options.form).toString(); } else { if (noContentType) { headers["content-type"] = "application/json"; } this[kBody] = options.stringifyJson(options.json); } const uploadBodySize = await get_body_size_1.default(this[kBody], options.headers); if (is_1.default.undefined(headers["content-length"]) && is_1.default.undefined(headers["transfer-encoding"])) { if (!cannotHaveBody && !is_1.default.undefined(uploadBodySize)) { headers["content-length"] = String(uploadBodySize); } } } } else if (cannotHaveBody) { this._lockWrite(); } else { this._unlockWrite(); } this[kBodySize] = Number(headers["content-length"]) || void 0; } async _onResponseBase(response) { const { options } = this; const { url } = options; this[kOriginalResponse] = response; if (options.decompress) { response = decompressResponse(response); } const statusCode = response.statusCode; const typedResponse = response; typedResponse.statusMessage = typedResponse.statusMessage ? typedResponse.statusMessage : http.STATUS_CODES[statusCode]; typedResponse.url = options.url.toString(); typedResponse.requestUrl = this.requestUrl; typedResponse.redirectUrls = this.redirects; typedResponse.request = this; typedResponse.isFromCache = response.fromCache || false; typedResponse.ip = this.ip; typedResponse.retryCount = this.retryCount; this[kIsFromCache] = typedResponse.isFromCache; this[kResponseSize] = Number(response.headers["content-length"]) || void 0; this[kResponse] = response; response.once("end", () => { this[kResponseSize] = this[kDownloadedSize]; this.emit("downloadProgress", this.downloadProgress); }); response.once("error", (error) => { response.destroy(); this._beforeError(new ReadError(error, this)); }); response.once("aborted", () => { this._beforeError(new ReadError({ name: "Error", message: "The server aborted pending request", code: "ECONNRESET" }, this)); }); this.emit("downloadProgress", this.downloadProgress); const rawCookies = response.headers["set-cookie"]; if (is_1.default.object(options.cookieJar) && rawCookies) { let promises = rawCookies.map(async (rawCookie) => options.cookieJar.setCookie(rawCookie, url.toString())); if (options.ignoreInvalidCookies) { promises = promises.map(async (p) => p.catch(() => { })); } try { await Promise.all(promises); } catch (error) { this._beforeError(error); return; } } if (options.followRedirect && response.headers.location && redirectCodes.has(statusCode)) { response.resume(); if (this[kRequest]) { this[kCancelTimeouts](); delete this[kRequest]; this[kUnproxyEvents](); } const shouldBeGet = statusCode === 303 && options.method !== "GET" && options.method !== "HEAD"; if (shouldBeGet || !options.methodRewriting) { options.method = "GET"; if ("body" in options) { delete options.body; } if ("json" in options) { delete options.json; } if ("form" in options) { delete options.form; } this[kBody] = void 0; delete options.headers["content-length"]; } if (this.redirects.length >= options.maxRedirects) { this._beforeError(new MaxRedirectsError(this)); return; } try { const redirectBuffer = Buffer.from(response.headers.location, "binary").toString(); const redirectUrl = new url_1.URL(redirectBuffer, url); const redirectString = redirectUrl.toString(); decodeURI(redirectString); if (redirectUrl.hostname !== url.hostname || redirectUrl.port !== url.port) { if ("host" in options.headers) { delete options.headers.host; } if ("cookie" in options.headers) { delete options.headers.cookie; } if ("authorization" in options.headers) { delete options.headers.authorization; } if (options.username || options.password) { options.username = ""; options.password = ""; } } else { redirectUrl.username = options.username; redirectUrl.password = options.password; } this.redirects.push(redirectString); options.url = redirectUrl; for (const hook of options.hooks.beforeRedirect) { await hook(options, typedResponse); } this.emit("redirect", typedResponse, options); await this._makeRequest(); } catch (error) { this._beforeError(error); return; } return; } if (options.isStream && options.throwHttpErrors && !is_response_ok_1.isResponseOk(typedResponse)) { this._beforeError(new HTTPError(typedResponse)); return; } response.on("readable", () => { if (this[kTriggerRead]) { this._read(); } }); this.on("resume", () => { response.resume(); }); this.on("pause", () => { response.pause(); }); response.once("end", () => { this.push(null); }); this.emit("response", response); for (const destination of this[kServerResponsesPiped]) { if (destination.headersSent) { continue; } for (const key in response.headers) { const isAllowed = options.decompress ? key !== "content-encoding" : true; const value = response.headers[key]; if (isAllowed) { destination.setHeader(key, value); } } destination.statusCode = statusCode; } } async _onResponse(response) { try { await this._onResponseBase(response); } catch (error) { this._beforeError(error); } } _onRequest(request) { const { options } = this; const { timeout: timeout2, url } = options; http_timer_1.default(request); this[kCancelTimeouts] = timed_out_1.default(request, timeout2, url); const responseEventName = options.cache ? "cacheableResponse" : "response"; request.once(responseEventName, (response) => { void this._onResponse(response); }); request.once("error", (error) => { var _a; request.destroy(); (_a = request.res) === null || _a === void 0 ? void 0 : _a.removeAllListeners("end"); error = error instanceof timed_out_1.TimeoutError ? new TimeoutError(error, this.timings, this) : new RequestError(error.message, error, this); this._beforeError(error); }); this[kUnproxyEvents] = proxy_events_1.default(request, this, proxiedRequestEvents); this[kRequest] = request; this.emit("uploadProgress", this.uploadProgress); const body = this[kBody]; const currentRequest = this.redirects.length === 0 ? this : request; if (is_1.default.nodeStream(body)) { body.pipe(currentRequest); body.once("error", (error) => { this._beforeError(new UploadError(error, this)); }); } else { this._unlockWrite(); if (!is_1.default.undefined(body)) { this._writeRequest(body, void 0, () => { }); currentRequest.end(); this._lockWrite(); } else if (this._cannotHaveBody || this._noPipe) { currentRequest.end(); this._lockWrite(); } } this.emit("request", request); } async _createCacheableRequest(url, options) { return new Promise((resolve, reject) => { Object.assign(options, url_to_options_1.default(url)); delete options.url; let request; const cacheRequest = cacheableStore.get(options.cache)(options, async (response) => { response._readableState.autoDestroy = false; if (request) { (await request).emit("cacheableResponse", response); } resolve(response); }); options.url = url; cacheRequest.once("error", reject); cacheRequest.once("request", async (requestOrPromise) => { request = requestOrPromise; resolve(request); }); }); } async _makeRequest() { var _a, _b, _c, _d, _e; const { options } = this; const { headers } = options; for (const key in headers) { if (is_1.default.undefined(headers[key])) { delete headers[key]; } else if (is_1.default.null_(headers[key])) { throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${key}\` header`); } } if (options.decompress && is_1.default.undefined(headers["accept-encoding"])) { headers["accept-encoding"] = supportsBrotli ? "gzip, deflate, br" : "gzip, deflate"; } if (options.cookieJar) { const cookieString = await options.cookieJar.getCookieString(options.url.toString()); if (is_1.default.nonEmptyString(cookieString)) { options.headers.cookie = cookieString; } } for (const hook of options.hooks.beforeRequest) { const result = await hook(options); if (!is_1.default.undefined(result)) { options.request = () => result; break; } } if (options.body && this[kBody] !== options.body) { this[kBody] = options.body; } const { agent, request, timeout: timeout2, url } = options; if (options.dnsCache && !("lookup" in options)) { options.lookup = options.dnsCache.lookup; } if (url.hostname === "unix") { const matches = /(?.+?):(?.+)/.exec(`${url.pathname}${url.search}`); if (matches === null || matches === void 0 ? void 0 : matches.groups) { const { socketPath, path: path2 } = matches.groups; Object.assign(options, { socketPath, path: path2, host: "" }); } } const isHttps = url.protocol === "https:"; let fallbackFn; if (options.http2) { fallbackFn = http2wrapper.auto; } else { fallbackFn = isHttps ? https.request : http.request; } const realFn = (_a = options.request) !== null && _a !== void 0 ? _a : fallbackFn; const fn = options.cache ? this._createCacheableRequest : realFn; if (agent && !options.http2) { options.agent = agent[isHttps ? "https" : "http"]; } options[kRequest] = realFn; delete options.request; delete options.timeout; const requestOptions = options; requestOptions.shared = (_b = options.cacheOptions) === null || _b === void 0 ? void 0 : _b.shared; requestOptions.cacheHeuristic = (_c = options.cacheOptions) === null || _c === void 0 ? void 0 : _c.cacheHeuristic; requestOptions.immutableMinTimeToLive = (_d = options.cacheOptions) === null || _d === void 0 ? void 0 : _d.immutableMinTimeToLive; requestOptions.ignoreCargoCult = (_e = options.cacheOptions) === null || _e === void 0 ? void 0 : _e.ignoreCargoCult; if (options.dnsLookupIpVersion !== void 0) { try { requestOptions.family = dns_ip_version_1.dnsLookupIpVersionToFamily(options.dnsLookupIpVersion); } catch (_f) { throw new Error("Invalid `dnsLookupIpVersion` option value"); } } if (options.https) { if ("rejectUnauthorized" in options.https) { requestOptions.rejectUnauthorized = options.https.rejectUnauthorized; } if (options.https.checkServerIdentity) { requestOptions.checkServerIdentity = options.https.checkServerIdentity; } if (options.https.certificateAuthority) { requestOptions.ca = options.https.certificateAuthority; } if (options.https.certificate) { requestOptions.cert = options.https.certificate; } if (options.https.key) { requestOptions.key = options.https.key; } if (options.https.passphrase) { requestOptions.passphrase = options.https.passphrase; } if (options.https.pfx) { requestOptions.pfx = options.https.pfx; } } try { let requestOrResponse = await fn(url, requestOptions); if (is_1.default.undefined(requestOrResponse)) { requestOrResponse = fallbackFn(url, requestOptions); } options.request = request; options.timeout = timeout2; options.agent = agent; if (options.https) { if ("rejectUnauthorized" in options.https) { delete requestOptions.rejectUnauthorized; } if (options.https.checkServerIdentity) { delete requestOptions.checkServerIdentity; } if (options.https.certificateAuthority) { delete requestOptions.ca; } if (options.https.certificate) { delete requestOptions.cert; } if (options.https.key) { delete requestOptions.key; } if (options.https.passphrase) { delete requestOptions.passphrase; } if (options.https.pfx) { delete requestOptions.pfx; } } if (isClientRequest(requestOrResponse)) { this._onRequest(requestOrResponse); } else if (this.writable) { this.once("finish", () => { void this._onResponse(requestOrResponse); }); this._unlockWrite(); this.end(); this._lockWrite(); } else { void this._onResponse(requestOrResponse); } } catch (error) { if (error instanceof CacheableRequest.CacheError) { throw new CacheError(error, this); } throw new RequestError(error.message, error, this); } } async _error(error) { try { for (const hook of this.options.hooks.beforeError) { error = await hook(error); } } catch (error_) { error = new RequestError(error_.message, error_, this); } this.destroy(error); } _beforeError(error) { if (this[kStopReading]) { return; } const { options } = this; const retryCount = this.retryCount + 1; this[kStopReading] = true; if (!(error instanceof RequestError)) { error = new RequestError(error.message, error, this); } const typedError = error; const { response } = typedError; void (async () => { if (response && !response.body) { response.setEncoding(this._readableState.encoding); try { response.rawBody = await get_buffer_1.default(response); response.body = response.rawBody.toString(); } catch (_a) { } } if (this.listenerCount("retry") !== 0) { let backoff; try { let retryAfter; if (response && "retry-after" in response.headers) { retryAfter = Number(response.headers["retry-after"]); if (Number.isNaN(retryAfter)) { retryAfter = Date.parse(response.headers["retry-after"]) - Date.now(); if (retryAfter <= 0) { retryAfter = 1; } } else { retryAfter *= 1e3; } } backoff = await options.retry.calculateDelay({ attemptCount: retryCount, retryOptions: options.retry, error: typedError, retryAfter, computedValue: calculate_retry_delay_1.default({ attemptCount: retryCount, retryOptions: options.retry, error: typedError, retryAfter, computedValue: 0 }) }); } catch (error_) { void this._error(new RequestError(error_.message, error_, this)); return; } if (backoff) { const retry = async () => { try { for (const hook of this.options.hooks.beforeRetry) { await hook(this.options, typedError, retryCount); } } catch (error_) { void this._error(new RequestError(error_.message, error, this)); return; } if (this.destroyed) { return; } this.destroy(); this.emit("retry", retryCount, error); }; this[kRetryTimeout] = setTimeout(retry, backoff); return; } } void this._error(typedError); })(); } _read() { this[kTriggerRead] = true; const response = this[kResponse]; if (response && !this[kStopReading]) { if (response.readableLength) { this[kTriggerRead] = false; } let data; while ((data = response.read()) !== null) { this[kDownloadedSize] += data.length; this[kStartedReading] = true; const progress = this.downloadProgress; if (progress.percent < 1) { this.emit("downloadProgress", progress); } this.push(data); } } } _write(chunk, encoding, callback) { const write = () => { this._writeRequest(chunk, encoding, callback); }; if (this.requestInitialized) { write(); } else { this[kJobs].push(write); } } _writeRequest(chunk, encoding, callback) { if (this[kRequest].destroyed) { return; } this._progressCallbacks.push(() => { this[kUploadedSize] += Buffer.byteLength(chunk, encoding); const progress = this.uploadProgress; if (progress.percent < 1) { this.emit("uploadProgress", progress); } }); this[kRequest].write(chunk, encoding, (error) => { if (!error && this._progressCallbacks.length > 0) { this._progressCallbacks.shift()(); } callback(error); }); } _final(callback) { const endRequest = () => { while (this._progressCallbacks.length !== 0) { this._progressCallbacks.shift()(); } if (!(kRequest in this)) { callback(); return; } if (this[kRequest].destroyed) { callback(); return; } this[kRequest].end((error) => { if (!error) { this[kBodySize] = this[kUploadedSize]; this.emit("uploadProgress", this.uploadProgress); this[kRequest].emit("upload-complete"); } callback(error); }); }; if (this.requestInitialized) { endRequest(); } else { this[kJobs].push(endRequest); } } _destroy(error, callback) { var _a; this[kStopReading] = true; clearTimeout(this[kRetryTimeout]); if (kRequest in this) { this[kCancelTimeouts](); if (!((_a = this[kResponse]) === null || _a === void 0 ? void 0 : _a.complete)) { this[kRequest].destroy(); } } if (error !== null && !is_1.default.undefined(error) && !(error instanceof RequestError)) { error = new RequestError(error.message, error, this); } callback(error); } get _isAboutToError() { return this[kStopReading]; } get ip() { var _a; return (_a = this.socket) === null || _a === void 0 ? void 0 : _a.remoteAddress; } get aborted() { var _a, _b, _c; return ((_b = (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.destroyed) !== null && _b !== void 0 ? _b : this.destroyed) && !((_c = this[kOriginalResponse]) === null || _c === void 0 ? void 0 : _c.complete); } get socket() { var _a, _b; return (_b = (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.socket) !== null && _b !== void 0 ? _b : void 0; } get downloadProgress() { let percent; if (this[kResponseSize]) { percent = this[kDownloadedSize] / this[kResponseSize]; } else if (this[kResponseSize] === this[kDownloadedSize]) { percent = 1; } else { percent = 0; } return { percent, transferred: this[kDownloadedSize], total: this[kResponseSize] }; } get uploadProgress() { let percent; if (this[kBodySize]) { percent = this[kUploadedSize] / this[kBodySize]; } else if (this[kBodySize] === this[kUploadedSize]) { percent = 1; } else { percent = 0; } return { percent, transferred: this[kUploadedSize], total: this[kBodySize] }; } get timings() { var _a; return (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.timings; } get isFromCache() { return this[kIsFromCache]; } pipe(destination, options) { if (this[kStartedReading]) { throw new Error("Failed to pipe. The response has been emitted already."); } if (destination instanceof http_1.ServerResponse) { this[kServerResponsesPiped].add(destination); } return super.pipe(destination, options); } unpipe(destination) { if (destination instanceof http_1.ServerResponse) { this[kServerResponsesPiped].delete(destination); } super.unpipe(destination); return this; } }; exports2.default = Request; } }); // ../../node_modules/got/dist/source/as-promise/types.js var require_types = __commonJS({ "../../node_modules/got/dist/source/as-promise/types.js"(exports2) { "use strict"; var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CancelError = exports2.ParseError = void 0; var core_1 = require_core(); var ParseError = class extends core_1.RequestError { constructor(error, response) { const { options } = response.request; super(`${error.message} in "${options.url.toString()}"`, error, response.request); this.name = "ParseError"; this.code = this.code === "ERR_GOT_REQUEST_ERROR" ? "ERR_BODY_PARSE_FAILURE" : this.code; } }; exports2.ParseError = ParseError; var CancelError = class extends core_1.RequestError { constructor(request) { super("Promise was canceled", {}, request); this.name = "CancelError"; this.code = "ERR_CANCELED"; } get isCanceled() { return true; } }; exports2.CancelError = CancelError; __exportStar(require_core(), exports2); } }); // ../../node_modules/got/dist/source/as-promise/parse-body.js var require_parse_body = __commonJS({ "../../node_modules/got/dist/source/as-promise/parse-body.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var types_1 = require_types(); var parseBody = (response, responseType, parseJson, encoding) => { const { rawBody } = response; try { if (responseType === "text") { return rawBody.toString(encoding); } if (responseType === "json") { return rawBody.length === 0 ? "" : parseJson(rawBody.toString()); } if (responseType === "buffer") { return rawBody; } throw new types_1.ParseError({ message: `Unknown body type '${responseType}'`, name: "Error" }, response); } catch (error) { throw new types_1.ParseError(error, response); } }; exports2.default = parseBody; } }); // ../../node_modules/got/dist/source/as-promise/index.js var require_as_promise = __commonJS({ "../../node_modules/got/dist/source/as-promise/index.js"(exports2) { "use strict"; var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); var events_1 = require("events"); var is_1 = require_dist(); var PCancelable = require_p_cancelable(); var types_1 = require_types(); var parse_body_1 = require_parse_body(); var core_1 = require_core(); var proxy_events_1 = require_proxy_events2(); var get_buffer_1 = require_get_buffer(); var is_response_ok_1 = require_is_response_ok(); var proxiedRequestEvents = [ "request", "response", "redirect", "uploadProgress", "downloadProgress" ]; function asPromise(normalizedOptions) { let globalRequest; let globalResponse; const emitter = new events_1.EventEmitter(); const promise = new PCancelable((resolve, reject, onCancel) => { const makeRequest = (retryCount) => { const request = new core_1.default(void 0, normalizedOptions); request.retryCount = retryCount; request._noPipe = true; onCancel(() => request.destroy()); onCancel.shouldReject = false; onCancel(() => reject(new types_1.CancelError(request))); globalRequest = request; request.once("response", async (response) => { var _a; response.retryCount = retryCount; if (response.request.aborted) { return; } let rawBody; try { rawBody = await get_buffer_1.default(request); response.rawBody = rawBody; } catch (_b) { return; } if (request._isAboutToError) { return; } const contentEncoding = ((_a = response.headers["content-encoding"]) !== null && _a !== void 0 ? _a : "").toLowerCase(); const isCompressed = ["gzip", "deflate", "br"].includes(contentEncoding); const { options } = request; if (isCompressed && !options.decompress) { response.body = rawBody; } else { try { response.body = parse_body_1.default(response, options.responseType, options.parseJson, options.encoding); } catch (error) { response.body = rawBody.toString(); if (is_response_ok_1.isResponseOk(response)) { request._beforeError(error); return; } } } try { for (const [index, hook] of options.hooks.afterResponse.entries()) { response = await hook(response, async (updatedOptions) => { const typedOptions = core_1.default.normalizeArguments(void 0, __spreadProps(__spreadValues({}, updatedOptions), { retry: { calculateDelay: () => 0 }, throwHttpErrors: false, resolveBodyOnly: false }), options); typedOptions.hooks.afterResponse = typedOptions.hooks.afterResponse.slice(0, index); for (const hook2 of typedOptions.hooks.beforeRetry) { await hook2(typedOptions); } const promise2 = asPromise(typedOptions); onCancel(() => { promise2.catch(() => { }); promise2.cancel(); }); return promise2; }); } } catch (error) { request._beforeError(new types_1.RequestError(error.message, error, request)); return; } if (!is_response_ok_1.isResponseOk(response)) { request._beforeError(new types_1.HTTPError(response)); return; } globalResponse = response; resolve(request.options.resolveBodyOnly ? response.body : response); }); const onError = (error) => { if (promise.isCanceled) { return; } const { options } = request; if (error instanceof types_1.HTTPError && !options.throwHttpErrors) { const { response } = error; resolve(request.options.resolveBodyOnly ? response.body : response); return; } reject(error); }; request.once("error", onError); const previousBody = request.options.body; request.once("retry", (newRetryCount, error) => { var _a, _b; if (previousBody === ((_a = error.request) === null || _a === void 0 ? void 0 : _a.options.body) && is_1.default.nodeStream((_b = error.request) === null || _b === void 0 ? void 0 : _b.options.body)) { onError(error); return; } makeRequest(newRetryCount); }); proxy_events_1.default(request, emitter, proxiedRequestEvents); }; makeRequest(0); }); promise.on = (event, fn) => { emitter.on(event, fn); return promise; }; const shortcut = (responseType) => { const newPromise = (async () => { await promise; const { options } = globalResponse.request; return parse_body_1.default(globalResponse, responseType, options.parseJson, options.encoding); })(); Object.defineProperties(newPromise, Object.getOwnPropertyDescriptors(promise)); return newPromise; }; promise.json = () => { const { headers } = globalRequest.options; if (!globalRequest.writableFinished && headers.accept === void 0) { headers.accept = "application/json"; } return shortcut("json"); }; promise.buffer = () => shortcut("buffer"); promise.text = () => shortcut("text"); return promise; } exports2.default = asPromise; __exportStar(require_types(), exports2); } }); // ../../node_modules/got/dist/source/as-promise/create-rejection.js var require_create_rejection = __commonJS({ "../../node_modules/got/dist/source/as-promise/create-rejection.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var types_1 = require_types(); function createRejection(error, ...beforeErrorGroups) { const promise = (async () => { if (error instanceof types_1.RequestError) { try { for (const hooks of beforeErrorGroups) { if (hooks) { for (const hook of hooks) { error = await hook(error); } } } } catch (error_) { error = error_; } } throw error; })(); const returnPromise = () => promise; promise.json = returnPromise; promise.text = returnPromise; promise.buffer = returnPromise; promise.on = returnPromise; return promise; } exports2.default = createRejection; } }); // ../../node_modules/got/dist/source/utils/deep-freeze.js var require_deep_freeze = __commonJS({ "../../node_modules/got/dist/source/utils/deep-freeze.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var is_1 = require_dist(); function deepFreeze(object) { for (const value of Object.values(object)) { if (is_1.default.plainObject(value) || is_1.default.array(value)) { deepFreeze(value); } } return Object.freeze(object); } exports2.default = deepFreeze; } }); // ../../node_modules/got/dist/source/types.js var require_types2 = __commonJS({ "../../node_modules/got/dist/source/types.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); } }); // ../../node_modules/got/dist/source/create.js var require_create = __commonJS({ "../../node_modules/got/dist/source/create.js"(exports2) { "use strict"; var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.defaultHandler = void 0; var is_1 = require_dist(); var as_promise_1 = require_as_promise(); var create_rejection_1 = require_create_rejection(); var core_1 = require_core(); var deep_freeze_1 = require_deep_freeze(); var errors = { RequestError: as_promise_1.RequestError, CacheError: as_promise_1.CacheError, ReadError: as_promise_1.ReadError, HTTPError: as_promise_1.HTTPError, MaxRedirectsError: as_promise_1.MaxRedirectsError, TimeoutError: as_promise_1.TimeoutError, ParseError: as_promise_1.ParseError, CancelError: as_promise_1.CancelError, UnsupportedProtocolError: as_promise_1.UnsupportedProtocolError, UploadError: as_promise_1.UploadError }; var delay = async (ms) => new Promise((resolve) => { setTimeout(resolve, ms); }); var { normalizeArguments } = core_1.default; var mergeOptions = (...sources) => { let mergedOptions; for (const source of sources) { mergedOptions = normalizeArguments(void 0, source, mergedOptions); } return mergedOptions; }; var getPromiseOrStream = (options) => options.isStream ? new core_1.default(void 0, options) : as_promise_1.default(options); var isGotInstance = (value) => "defaults" in value && "options" in value.defaults; var aliases = [ "get", "post", "put", "patch", "head", "delete" ]; exports2.defaultHandler = (options, next) => next(options); var callInitHooks = (hooks, options) => { if (hooks) { for (const hook of hooks) { hook(options); } } }; var create = (defaults) => { defaults._rawHandlers = defaults.handlers; defaults.handlers = defaults.handlers.map((fn) => (options, next) => { let root; const result = fn(options, (newOptions) => { root = next(newOptions); return root; }); if (result !== root && !options.isStream && root) { const typedResult = result; const { then: promiseThen, catch: promiseCatch, finally: promiseFianlly } = typedResult; Object.setPrototypeOf(typedResult, Object.getPrototypeOf(root)); Object.defineProperties(typedResult, Object.getOwnPropertyDescriptors(root)); typedResult.then = promiseThen; typedResult.catch = promiseCatch; typedResult.finally = promiseFianlly; } return result; }); const got = (url, options = {}, _defaults) => { var _a, _b; let iteration = 0; const iterateHandlers = (newOptions) => { return defaults.handlers[iteration++](newOptions, iteration === defaults.handlers.length ? getPromiseOrStream : iterateHandlers); }; if (is_1.default.plainObject(url)) { const mergedOptions = __spreadValues(__spreadValues({}, url), options); core_1.setNonEnumerableProperties([url, options], mergedOptions); options = mergedOptions; url = void 0; } try { let initHookError; try { callInitHooks(defaults.options.hooks.init, options); callInitHooks((_a = options.hooks) === null || _a === void 0 ? void 0 : _a.init, options); } catch (error) { initHookError = error; } const normalizedOptions = normalizeArguments(url, options, _defaults !== null && _defaults !== void 0 ? _defaults : defaults.options); normalizedOptions[core_1.kIsNormalizedAlready] = true; if (initHookError) { throw new as_promise_1.RequestError(initHookError.message, initHookError, normalizedOptions); } return iterateHandlers(normalizedOptions); } catch (error) { if (options.isStream) { throw error; } else { return create_rejection_1.default(error, defaults.options.hooks.beforeError, (_b = options.hooks) === null || _b === void 0 ? void 0 : _b.beforeError); } } }; got.extend = (...instancesOrOptions) => { const optionsArray = [defaults.options]; let handlers = [...defaults._rawHandlers]; let isMutableDefaults; for (const value of instancesOrOptions) { if (isGotInstance(value)) { optionsArray.push(value.defaults.options); handlers.push(...value.defaults._rawHandlers); isMutableDefaults = value.defaults.mutableDefaults; } else { optionsArray.push(value); if ("handlers" in value) { handlers.push(...value.handlers); } isMutableDefaults = value.mutableDefaults; } } handlers = handlers.filter((handler) => handler !== exports2.defaultHandler); if (handlers.length === 0) { handlers.push(exports2.defaultHandler); } return create({ options: mergeOptions(...optionsArray), handlers, mutableDefaults: Boolean(isMutableDefaults) }); }; const paginateEach = async function* (url, options) { let normalizedOptions = normalizeArguments(url, options, defaults.options); normalizedOptions.resolveBodyOnly = false; const pagination = normalizedOptions.pagination; if (!is_1.default.object(pagination)) { throw new TypeError("`options.pagination` must be implemented"); } const all = []; let { countLimit } = pagination; let numberOfRequests = 0; while (numberOfRequests < pagination.requestLimit) { if (numberOfRequests !== 0) { await delay(pagination.backoff); } const result = await got(void 0, void 0, normalizedOptions); const parsed = await pagination.transform(result); const current = []; for (const item of parsed) { if (pagination.filter(item, all, current)) { if (!pagination.shouldContinue(item, all, current)) { return; } yield item; if (pagination.stackAllItems) { all.push(item); } current.push(item); if (--countLimit <= 0) { return; } } } const optionsToMerge = pagination.paginate(result, all, current); if (optionsToMerge === false) { return; } if (optionsToMerge === result.request.options) { normalizedOptions = result.request.options; } else if (optionsToMerge !== void 0) { normalizedOptions = normalizeArguments(void 0, optionsToMerge, normalizedOptions); } numberOfRequests++; } }; got.paginate = paginateEach; got.paginate.all = async (url, options) => { const results = []; for await (const item of paginateEach(url, options)) { results.push(item); } return results; }; got.paginate.each = paginateEach; got.stream = (url, options) => got(url, __spreadProps(__spreadValues({}, options), { isStream: true })); for (const method of aliases) { got[method] = (url, options) => got(url, __spreadProps(__spreadValues({}, options), { method })); got.stream[method] = (url, options) => { return got(url, __spreadProps(__spreadValues({}, options), { method, isStream: true })); }; } Object.assign(got, errors); Object.defineProperty(got, "defaults", { value: defaults.mutableDefaults ? defaults : deep_freeze_1.default(defaults), writable: defaults.mutableDefaults, configurable: defaults.mutableDefaults, enumerable: true }); got.mergeOptions = mergeOptions; return got; }; exports2.default = create; __exportStar(require_types2(), exports2); } }); // ../../node_modules/got/dist/source/index.js var require_source5 = __commonJS({ "../../node_modules/got/dist/source/index.js"(exports2, module2) { "use strict"; var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); var url_1 = require("url"); var create_1 = require_create(); var defaults = { options: { method: "GET", retry: { limit: 2, methods: [ "GET", "PUT", "HEAD", "DELETE", "OPTIONS", "TRACE" ], statusCodes: [ 408, 413, 429, 500, 502, 503, 504, 521, 522, 524 ], errorCodes: [ "ETIMEDOUT", "ECONNRESET", "EADDRINUSE", "ECONNREFUSED", "EPIPE", "ENOTFOUND", "ENETUNREACH", "EAI_AGAIN" ], maxRetryAfter: void 0, calculateDelay: ({ computedValue }) => computedValue }, timeout: {}, headers: { "user-agent": "got (https://github.com/sindresorhus/got)" }, hooks: { init: [], beforeRequest: [], beforeRedirect: [], beforeRetry: [], beforeError: [], afterResponse: [] }, cache: void 0, dnsCache: void 0, decompress: true, throwHttpErrors: true, followRedirect: true, isStream: false, responseType: "text", resolveBodyOnly: false, maxRedirects: 10, prefixUrl: "", methodRewriting: true, ignoreInvalidCookies: false, context: {}, http2: false, allowGetBody: false, https: void 0, pagination: { transform: (response) => { if (response.request.options.responseType === "json") { return response.body; } return JSON.parse(response.body); }, paginate: (response) => { if (!Reflect.has(response.headers, "link")) { return false; } const items = response.headers.link.split(","); let next; for (const item of items) { const parsed = item.split(";"); if (parsed[1].includes("next")) { next = parsed[0].trimStart().trim(); next = next.slice(1, -1); break; } } if (next) { const options = { url: new url_1.URL(next) }; return options; } return false; }, filter: () => true, shouldContinue: () => true, countLimit: Infinity, backoff: 0, requestLimit: 1e4, stackAllItems: true }, parseJson: (text) => JSON.parse(text), stringifyJson: (object) => JSON.stringify(object), cacheOptions: {} }, handlers: [create_1.defaultHandler], mutableDefaults: false }; var got = create_1.default(defaults); exports2.default = got; module2.exports = got; module2.exports.default = got; module2.exports.__esModule = true; __exportStar(require_create(), exports2); __exportStar(require_as_promise(), exports2); } }); // ../../node_modules/logform/format.js var require_format = __commonJS({ "../../node_modules/logform/format.js"(exports2, module2) { "use strict"; var InvalidFormatError = class extends Error { constructor(formatFn) { super(`Format functions must be synchronous taking a two arguments: (info, opts) Found: ${formatFn.toString().split("\n")[0]} `); Error.captureStackTrace(this, InvalidFormatError); } }; module2.exports = (formatFn) => { if (formatFn.length > 2) { throw new InvalidFormatError(formatFn); } function Format(options = {}) { this.options = options; } Format.prototype.transform = formatFn; function createFormatWrap(opts) { return new Format(opts); } createFormatWrap.Format = Format; return createFormatWrap; }; } }); // ../../node_modules/colors/lib/styles.js var require_styles = __commonJS({ "../../node_modules/colors/lib/styles.js"(exports2, module2) { var styles = {}; module2["exports"] = styles; var codes = { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29], black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], gray: [90, 39], grey: [90, 39], brightRed: [91, 39], brightGreen: [92, 39], brightYellow: [93, 39], brightBlue: [94, 39], brightMagenta: [95, 39], brightCyan: [96, 39], brightWhite: [97, 39], bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgGray: [100, 49], bgGrey: [100, 49], bgBrightRed: [101, 49], bgBrightGreen: [102, 49], bgBrightYellow: [103, 49], bgBrightBlue: [104, 49], bgBrightMagenta: [105, 49], bgBrightCyan: [106, 49], bgBrightWhite: [107, 49], blackBG: [40, 49], redBG: [41, 49], greenBG: [42, 49], yellowBG: [43, 49], blueBG: [44, 49], magentaBG: [45, 49], cyanBG: [46, 49], whiteBG: [47, 49] }; Object.keys(codes).forEach(function(key) { var val = codes[key]; var style = styles[key] = []; style.open = "\x1B[" + val[0] + "m"; style.close = "\x1B[" + val[1] + "m"; }); } }); // ../../node_modules/colors/lib/system/has-flag.js var require_has_flag = __commonJS({ "../../node_modules/colors/lib/system/has-flag.js"(exports2, module2) { "use strict"; module2.exports = function(flag, argv) { argv = argv || process.argv; var terminatorPos = argv.indexOf("--"); var prefix = /^-{1,2}/.test(flag) ? "" : "--"; var pos = argv.indexOf(prefix + flag); return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); }; } }); // ../../node_modules/colors/lib/system/supports-colors.js var require_supports_colors = __commonJS({ "../../node_modules/colors/lib/system/supports-colors.js"(exports2, module2) { "use strict"; var os = require("os"); var hasFlag = require_has_flag(); var env = process.env; var forceColor = void 0; if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) { forceColor = false; } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { forceColor = true; } if ("FORCE_COLOR" in env) { forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; } function translateLevel(level) { if (level === 0) { return false; } return { level, hasBasic: true, has256: level >= 2, has16m: level >= 3 }; } function supportsColor(stream) { if (forceColor === false) { return 0; } if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { return 3; } if (hasFlag("color=256")) { return 2; } if (stream && !stream.isTTY && forceColor !== true) { return 0; } var min = forceColor ? 1 : 0; if (process.platform === "win32") { var osRelease = os.release().split("."); if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { return Number(osRelease[2]) >= 14931 ? 3 : 2; } return 1; } if ("CI" in env) { if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some(function(sign) { return sign in env; }) || env.CI_NAME === "codeship") { return 1; } return min; } if ("TEAMCITY_VERSION" in env) { return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; } if ("TERM_PROGRAM" in env) { var version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); switch (env.TERM_PROGRAM) { case "iTerm.app": return version >= 3 ? 3 : 2; case "Hyper": return 3; case "Apple_Terminal": return 2; } } if (/-256(color)?$/i.test(env.TERM)) { return 2; } if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { return 1; } if ("COLORTERM" in env) { return 1; } if (env.TERM === "dumb") { return min; } return min; } function getSupportLevel(stream) { var level = supportsColor(stream); return translateLevel(level); } module2.exports = { supportsColor: getSupportLevel, stdout: getSupportLevel(process.stdout), stderr: getSupportLevel(process.stderr) }; } }); // ../../node_modules/colors/lib/custom/trap.js var require_trap = __commonJS({ "../../node_modules/colors/lib/custom/trap.js"(exports2, module2) { module2["exports"] = function runTheTrap(text, options) { var result = ""; text = text || "Run the trap, drop the bass"; text = text.split(""); var trap = { a: ["@", "\u0104", "\u023A", "\u0245", "\u0394", "\u039B", "\u0414"], b: ["\xDF", "\u0181", "\u0243", "\u026E", "\u03B2", "\u0E3F"], c: ["\xA9", "\u023B", "\u03FE"], d: ["\xD0", "\u018A", "\u0500", "\u0501", "\u0502", "\u0503"], e: [ "\xCB", "\u0115", "\u018E", "\u0258", "\u03A3", "\u03BE", "\u04BC", "\u0A6C" ], f: ["\u04FA"], g: ["\u0262"], h: ["\u0126", "\u0195", "\u04A2", "\u04BA", "\u04C7", "\u050A"], i: ["\u0F0F"], j: ["\u0134"], k: ["\u0138", "\u04A0", "\u04C3", "\u051E"], l: ["\u0139"], m: ["\u028D", "\u04CD", "\u04CE", "\u0520", "\u0521", "\u0D69"], n: ["\xD1", "\u014B", "\u019D", "\u0376", "\u03A0", "\u048A"], o: [ "\xD8", "\xF5", "\xF8", "\u01FE", "\u0298", "\u047A", "\u05DD", "\u06DD", "\u0E4F" ], p: ["\u01F7", "\u048E"], q: ["\u09CD"], r: ["\xAE", "\u01A6", "\u0210", "\u024C", "\u0280", "\u042F"], s: ["\xA7", "\u03DE", "\u03DF", "\u03E8"], t: ["\u0141", "\u0166", "\u0373"], u: ["\u01B1", "\u054D"], v: ["\u05D8"], w: ["\u0428", "\u0460", "\u047C", "\u0D70"], x: ["\u04B2", "\u04FE", "\u04FC", "\u04FD"], y: ["\xA5", "\u04B0", "\u04CB"], z: ["\u01B5", "\u0240"] }; text.forEach(function(c) { c = c.toLowerCase(); var chars = trap[c] || [" "]; var rand = Math.floor(Math.random() * chars.length); if (typeof trap[c] !== "undefined") { result += trap[c][rand]; } else { result += c; } }); return result; }; } }); // ../../node_modules/colors/lib/custom/zalgo.js var require_zalgo = __commonJS({ "../../node_modules/colors/lib/custom/zalgo.js"(exports2, module2) { module2["exports"] = function zalgo(text, options) { text = text || " he is here "; var soul = { "up": [ "\u030D", "\u030E", "\u0304", "\u0305", "\u033F", "\u0311", "\u0306", "\u0310", "\u0352", "\u0357", "\u0351", "\u0307", "\u0308", "\u030A", "\u0342", "\u0313", "\u0308", "\u034A", "\u034B", "\u034C", "\u0303", "\u0302", "\u030C", "\u0350", "\u0300", "\u0301", "\u030B", "\u030F", "\u0312", "\u0313", "\u0314", "\u033D", "\u0309", "\u0363", "\u0364", "\u0365", "\u0366", "\u0367", "\u0368", "\u0369", "\u036A", "\u036B", "\u036C", "\u036D", "\u036E", "\u036F", "\u033E", "\u035B", "\u0346", "\u031A" ], "down": [ "\u0316", "\u0317", "\u0318", "\u0319", "\u031C", "\u031D", "\u031E", "\u031F", "\u0320", "\u0324", "\u0325", "\u0326", "\u0329", "\u032A", "\u032B", "\u032C", "\u032D", "\u032E", "\u032F", "\u0330", "\u0331", "\u0332", "\u0333", "\u0339", "\u033A", "\u033B", "\u033C", "\u0345", "\u0347", "\u0348", "\u0349", "\u034D", "\u034E", "\u0353", "\u0354", "\u0355", "\u0356", "\u0359", "\u035A", "\u0323" ], "mid": [ "\u0315", "\u031B", "\u0300", "\u0301", "\u0358", "\u0321", "\u0322", "\u0327", "\u0328", "\u0334", "\u0335", "\u0336", "\u035C", "\u035D", "\u035E", "\u035F", "\u0360", "\u0362", "\u0338", "\u0337", "\u0361", " \u0489" ] }; var all = [].concat(soul.up, soul.down, soul.mid); function randomNumber(range) { var r = Math.floor(Math.random() * range); return r; } function isChar(character) { var bool = false; all.filter(function(i) { bool = i === character; }); return bool; } function heComes(text2, options2) { var result = ""; var counts; var l; options2 = options2 || {}; options2["up"] = typeof options2["up"] !== "undefined" ? options2["up"] : true; options2["mid"] = typeof options2["mid"] !== "undefined" ? options2["mid"] : true; options2["down"] = typeof options2["down"] !== "undefined" ? options2["down"] : true; options2["size"] = typeof options2["size"] !== "undefined" ? options2["size"] : "maxi"; text2 = text2.split(""); for (l in text2) { if (isChar(l)) { continue; } result = result + text2[l]; counts = { "up": 0, "down": 0, "mid": 0 }; switch (options2.size) { case "mini": counts.up = randomNumber(8); counts.mid = randomNumber(2); counts.down = randomNumber(8); break; case "maxi": counts.up = randomNumber(16) + 3; counts.mid = randomNumber(4) + 1; counts.down = randomNumber(64) + 3; break; default: counts.up = randomNumber(8) + 1; counts.mid = randomNumber(6) / 2; counts.down = randomNumber(8) + 1; break; } var arr = ["up", "mid", "down"]; for (var d in arr) { var index = arr[d]; for (var i = 0; i <= counts[index]; i++) { if (options2[index]) { result = result + soul[index][randomNumber(soul[index].length)]; } } } } return result; } return heComes(text, options); }; } }); // ../../node_modules/colors/lib/maps/america.js var require_america = __commonJS({ "../../node_modules/colors/lib/maps/america.js"(exports2, module2) { module2["exports"] = function(colors) { return function(letter, i, exploded) { if (letter === " ") return letter; switch (i % 3) { case 0: return colors.red(letter); case 1: return colors.white(letter); case 2: return colors.blue(letter); } }; }; } }); // ../../node_modules/colors/lib/maps/zebra.js var require_zebra = __commonJS({ "../../node_modules/colors/lib/maps/zebra.js"(exports2, module2) { module2["exports"] = function(colors) { return function(letter, i, exploded) { return i % 2 === 0 ? letter : colors.inverse(letter); }; }; } }); // ../../node_modules/colors/lib/maps/rainbow.js var require_rainbow = __commonJS({ "../../node_modules/colors/lib/maps/rainbow.js"(exports2, module2) { module2["exports"] = function(colors) { var rainbowColors = ["red", "yellow", "green", "blue", "magenta"]; return function(letter, i, exploded) { if (letter === " ") { return letter; } else { return colors[rainbowColors[i++ % rainbowColors.length]](letter); } }; }; } }); // ../../node_modules/colors/lib/maps/random.js var require_random = __commonJS({ "../../node_modules/colors/lib/maps/random.js"(exports2, module2) { module2["exports"] = function(colors) { var available = [ "underline", "inverse", "grey", "yellow", "red", "green", "blue", "white", "cyan", "magenta", "brightYellow", "brightRed", "brightGreen", "brightBlue", "brightWhite", "brightCyan", "brightMagenta" ]; return function(letter, i, exploded) { return letter === " " ? letter : colors[available[Math.round(Math.random() * (available.length - 2))]](letter); }; }; } }); // ../../node_modules/colors/lib/colors.js var require_colors = __commonJS({ "../../node_modules/colors/lib/colors.js"(exports2, module2) { var colors = {}; module2["exports"] = colors; colors.themes = {}; var util = require("util"); var ansiStyles = colors.styles = require_styles(); var defineProps = Object.defineProperties; var newLineRegex = new RegExp(/[\r\n]+/g); colors.supportsColor = require_supports_colors().supportsColor; if (typeof colors.enabled === "undefined") { colors.enabled = colors.supportsColor() !== false; } colors.enable = function() { colors.enabled = true; }; colors.disable = function() { colors.enabled = false; }; colors.stripColors = colors.strip = function(str) { return ("" + str).replace(/\x1B\[\d+m/g, ""); }; var stylize = colors.stylize = function stylize2(str, style) { if (!colors.enabled) { return str + ""; } var styleMap = ansiStyles[style]; if (!styleMap && style in colors) { return colors[style](str); } return styleMap.open + str + styleMap.close; }; var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; var escapeStringRegexp = function(str) { if (typeof str !== "string") { throw new TypeError("Expected a string"); } return str.replace(matchOperatorsRe, "\\$&"); }; function build(_styles) { var builder = function builder2() { return applyStyle.apply(builder2, arguments); }; builder._styles = _styles; builder.__proto__ = proto; return builder; } var styles = function() { var ret = {}; ansiStyles.grey = ansiStyles.gray; Object.keys(ansiStyles).forEach(function(key) { ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g"); ret[key] = { get: function() { return build(this._styles.concat(key)); } }; }); return ret; }(); var proto = defineProps(function colors2() { }, styles); function applyStyle() { var args = Array.prototype.slice.call(arguments); var str = args.map(function(arg) { if (arg != null && arg.constructor === String) { return arg; } else { return util.inspect(arg); } }).join(" "); if (!colors.enabled || !str) { return str; } var newLinesPresent = str.indexOf("\n") != -1; var nestedStyles = this._styles; var i = nestedStyles.length; while (i--) { var code = ansiStyles[nestedStyles[i]]; str = code.open + str.replace(code.closeRe, code.open) + code.close; if (newLinesPresent) { str = str.replace(newLineRegex, function(match) { return code.close + match + code.open; }); } } return str; } colors.setTheme = function(theme) { if (typeof theme === "string") { console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));"); return; } for (var style in theme) { (function(style2) { colors[style2] = function(str) { if (typeof theme[style2] === "object") { var out = str; for (var i in theme[style2]) { out = colors[theme[style2][i]](out); } return out; } return colors[theme[style2]](str); }; })(style); } }; function init() { var ret = {}; Object.keys(styles).forEach(function(name) { ret[name] = { get: function() { return build([name]); } }; }); return ret; } var sequencer = function sequencer2(map2, str) { var exploded = str.split(""); exploded = exploded.map(map2); return exploded.join(""); }; colors.trap = require_trap(); colors.zalgo = require_zalgo(); colors.maps = {}; colors.maps.america = require_america()(colors); colors.maps.zebra = require_zebra()(colors); colors.maps.rainbow = require_rainbow()(colors); colors.maps.random = require_random()(colors); for (map in colors.maps) { (function(map2) { colors[map2] = function(str) { return sequencer(colors.maps[map2], str); }; })(map); } var map; defineProps(colors, init()); } }); // ../../node_modules/colors/safe.js var require_safe = __commonJS({ "../../node_modules/colors/safe.js"(exports2, module2) { var colors = require_colors(); module2["exports"] = colors; } }); // ../../node_modules/triple-beam/config/cli.js var require_cli = __commonJS({ "../../node_modules/triple-beam/config/cli.js"(exports2) { "use strict"; exports2.levels = { error: 0, warn: 1, help: 2, data: 3, info: 4, debug: 5, prompt: 6, verbose: 7, input: 8, silly: 9 }; exports2.colors = { error: "red", warn: "yellow", help: "cyan", data: "grey", info: "green", debug: "blue", prompt: "grey", verbose: "cyan", input: "grey", silly: "magenta" }; } }); // ../../node_modules/triple-beam/config/npm.js var require_npm = __commonJS({ "../../node_modules/triple-beam/config/npm.js"(exports2) { "use strict"; exports2.levels = { error: 0, warn: 1, info: 2, http: 3, verbose: 4, debug: 5, silly: 6 }; exports2.colors = { error: "red", warn: "yellow", info: "green", http: "green", verbose: "cyan", debug: "blue", silly: "magenta" }; } }); // ../../node_modules/triple-beam/config/syslog.js var require_syslog = __commonJS({ "../../node_modules/triple-beam/config/syslog.js"(exports2) { "use strict"; exports2.levels = { emerg: 0, alert: 1, crit: 2, error: 3, warning: 4, notice: 5, info: 6, debug: 7 }; exports2.colors = { emerg: "red", alert: "yellow", crit: "red", error: "red", warning: "red", notice: "yellow", info: "green", debug: "blue" }; } }); // ../../node_modules/triple-beam/config/index.js var require_config = __commonJS({ "../../node_modules/triple-beam/config/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "cli", { value: require_cli() }); Object.defineProperty(exports2, "npm", { value: require_npm() }); Object.defineProperty(exports2, "syslog", { value: require_syslog() }); } }); // ../../node_modules/triple-beam/index.js var require_triple_beam = __commonJS({ "../../node_modules/triple-beam/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "LEVEL", { value: Symbol.for("level") }); Object.defineProperty(exports2, "MESSAGE", { value: Symbol.for("message") }); Object.defineProperty(exports2, "SPLAT", { value: Symbol.for("splat") }); Object.defineProperty(exports2, "configs", { value: require_config() }); } }); // ../../node_modules/logform/colorize.js var require_colorize = __commonJS({ "../../node_modules/logform/colorize.js"(exports2, module2) { "use strict"; var colors = require_safe(); var { LEVEL, MESSAGE } = require_triple_beam(); colors.enabled = true; var hasSpace = /\s+/; var Colorizer = class { constructor(opts = {}) { if (opts.colors) { this.addColors(opts.colors); } this.options = opts; } static addColors(clrs) { const nextColors = Object.keys(clrs).reduce((acc, level) => { acc[level] = hasSpace.test(clrs[level]) ? clrs[level].split(hasSpace) : clrs[level]; return acc; }, {}); Colorizer.allColors = Object.assign({}, Colorizer.allColors || {}, nextColors); return Colorizer.allColors; } addColors(clrs) { return Colorizer.addColors(clrs); } colorize(lookup, level, message) { if (typeof message === "undefined") { message = level; } if (!Array.isArray(Colorizer.allColors[lookup])) { return colors[Colorizer.allColors[lookup]](message); } for (let i = 0, len = Colorizer.allColors[lookup].length; i < len; i++) { message = colors[Colorizer.allColors[lookup][i]](message); } return message; } transform(info, opts) { if (opts.all && typeof info[MESSAGE] === "string") { info[MESSAGE] = this.colorize(info[LEVEL], info.level, info[MESSAGE]); } if (opts.level || opts.all || !opts.message) { info.level = this.colorize(info[LEVEL], info.level); } if (opts.all || opts.message) { info.message = this.colorize(info[LEVEL], info.level, info.message); } return info; } }; module2.exports = (opts) => new Colorizer(opts); module2.exports.Colorizer = module2.exports.Format = Colorizer; } }); // ../../node_modules/logform/levels.js var require_levels = __commonJS({ "../../node_modules/logform/levels.js"(exports2, module2) { "use strict"; var { Colorizer } = require_colorize(); module2.exports = (config) => { Colorizer.addColors(config.colors || config); return config; }; } }); // ../../node_modules/logform/align.js var require_align = __commonJS({ "../../node_modules/logform/align.js"(exports2, module2) { "use strict"; var format = require_format(); module2.exports = format((info) => { info.message = ` ${info.message}`; return info; }); } }); // ../../node_modules/logform/errors.js var require_errors2 = __commonJS({ "../../node_modules/logform/errors.js"(exports2, module2) { "use strict"; var format = require_format(); var { LEVEL, MESSAGE } = require_triple_beam(); module2.exports = format((einfo, { stack }) => { if (einfo instanceof Error) { const info = Object.assign({}, einfo, { level: einfo.level, [LEVEL]: einfo[LEVEL] || einfo.level, message: einfo.message, [MESSAGE]: einfo[MESSAGE] || einfo.message }); if (stack) info.stack = einfo.stack; return info; } if (!(einfo.message instanceof Error)) return einfo; const err = einfo.message; Object.assign(einfo, err); einfo.message = err.message; einfo[MESSAGE] = err.message; if (stack) einfo.stack = err.stack; return einfo; }); } }); // ../../node_modules/logform/pad-levels.js var require_pad_levels = __commonJS({ "../../node_modules/logform/pad-levels.js"(exports2, module2) { "use strict"; var { configs, LEVEL, MESSAGE } = require_triple_beam(); var Padder = class { constructor(opts = { levels: configs.npm.levels }) { this.paddings = Padder.paddingForLevels(opts.levels, opts.filler); this.options = opts; } static getLongestLevel(levels) { const lvls = Object.keys(levels).map((level) => level.length); return Math.max(...lvls); } static paddingForLevel(level, filler, maxLength) { const targetLen = maxLength + 1 - level.length; const rep = Math.floor(targetLen / filler.length); const padding = `${filler}${filler.repeat(rep)}`; return padding.slice(0, targetLen); } static paddingForLevels(levels, filler = " ") { const maxLength = Padder.getLongestLevel(levels); return Object.keys(levels).reduce((acc, level) => { acc[level] = Padder.paddingForLevel(level, filler, maxLength); return acc; }, {}); } transform(info, opts) { info.message = `${this.paddings[info[LEVEL]]}${info.message}`; if (info[MESSAGE]) { info[MESSAGE] = `${this.paddings[info[LEVEL]]}${info[MESSAGE]}`; } return info; } }; module2.exports = (opts) => new Padder(opts); module2.exports.Padder = module2.exports.Format = Padder; } }); // ../../node_modules/logform/cli.js var require_cli2 = __commonJS({ "../../node_modules/logform/cli.js"(exports2, module2) { "use strict"; var { Colorizer } = require_colorize(); var { Padder } = require_pad_levels(); var { configs, MESSAGE } = require_triple_beam(); var CliFormat = class { constructor(opts = {}) { if (!opts.levels) { opts.levels = configs.npm.levels; } this.colorizer = new Colorizer(opts); this.padder = new Padder(opts); this.options = opts; } transform(info, opts) { this.colorizer.transform(this.padder.transform(info, opts), opts); info[MESSAGE] = `${info.level}:${info.message}`; return info; } }; module2.exports = (opts) => new CliFormat(opts); module2.exports.Format = CliFormat; } }); // ../../node_modules/logform/combine.js var require_combine = __commonJS({ "../../node_modules/logform/combine.js"(exports2, module2) { "use strict"; var format = require_format(); function cascade(formats) { if (!formats.every(isValidFormat)) { return; } return (info) => { let obj = info; for (let i = 0; i < formats.length; i++) { obj = formats[i].transform(obj, formats[i].options); if (!obj) { return false; } } return obj; }; } function isValidFormat(fmt) { if (typeof fmt.transform !== "function") { throw new Error([ "No transform function found on format. Did you create a format instance?", "const myFormat = format(formatFn);", "const instance = myFormat();" ].join("\n")); } return true; } module2.exports = (...formats) => { const combinedFormat = format(cascade(formats)); const instance = combinedFormat(); instance.Format = combinedFormat.Format; return instance; }; module2.exports.cascade = cascade; } }); // ../../node_modules/safe-stable-stringify/stable.js var require_stable = __commonJS({ "../../node_modules/safe-stable-stringify/stable.js"(exports2, module2) { "use strict"; module2.exports = stringify; var indentation = ""; var strEscapeSequencesRegExp = /[\x00-\x1f\x22\x5c]/; var strEscapeSequencesReplacer = /[\x00-\x1f\x22\x5c]/g; var meta = [ "\\u0000", "\\u0001", "\\u0002", "\\u0003", "\\u0004", "\\u0005", "\\u0006", "\\u0007", "\\b", "\\t", "\\n", "\\u000b", "\\f", "\\r", "\\u000e", "\\u000f", "\\u0010", "\\u0011", "\\u0012", "\\u0013", "\\u0014", "\\u0015", "\\u0016", "\\u0017", "\\u0018", "\\u0019", "\\u001a", "\\u001b", "\\u001c", "\\u001d", "\\u001e", "\\u001f", "", "", '\\"', "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "\\\\" ]; function escapeFn(str) { return meta[str.charCodeAt(0)]; } function strEscape(str) { if (str.length < 5e3 && !strEscapeSequencesRegExp.test(str)) { return str; } if (str.length > 100) { return str.replace(strEscapeSequencesReplacer, escapeFn); } var result = ""; var last = 0; for (var i = 0; i < str.length; i++) { const point = str.charCodeAt(i); if (point === 34 || point === 92 || point < 32) { if (last === i) { result += meta[point]; } else { result += `${str.slice(last, i)}${meta[point]}`; } last = i + 1; } } if (last === 0) { result = str; } else if (last !== i) { result += str.slice(last); } return result; } function stringifyFullFn(key, parent, stack, replacer, indent) { var i, res, join; const originalIndentation = indentation; var value = parent[key]; if (typeof value === "object" && value !== null && typeof value.toJSON === "function") { value = value.toJSON(key); } value = replacer.call(parent, key, value); switch (typeof value) { case "object": if (value === null) { return "null"; } for (i = 0; i < stack.length; i++) { if (stack[i] === value) { return '"[Circular]"'; } } if (Array.isArray(value)) { if (value.length === 0) { return "[]"; } stack.push(value); res = "["; indentation += indent; res += ` ${indentation}`; join = `, ${indentation}`; for (i = 0; i < value.length - 1; i++) { const tmp2 = stringifyFullFn(i, value, stack, replacer, indent); res += tmp2 !== void 0 ? tmp2 : "null"; res += join; } const tmp = stringifyFullFn(i, value, stack, replacer, indent); res += tmp !== void 0 ? tmp : "null"; if (indentation !== "") { res += ` ${originalIndentation}`; } res += "]"; stack.pop(); indentation = originalIndentation; return res; } var keys = insertSort(Object.keys(value)); if (keys.length === 0) { return "{}"; } stack.push(value); res = "{"; indentation += indent; res += ` ${indentation}`; join = `, ${indentation}`; var separator = ""; for (i = 0; i < keys.length; i++) { key = keys[i]; const tmp = stringifyFullFn(key, value, stack, replacer, indent); if (tmp !== void 0) { res += `${separator}"${strEscape(key)}": ${tmp}`; separator = join; } } if (separator !== "") { res += ` ${originalIndentation}`; } else { res = "{"; } res += "}"; stack.pop(); indentation = originalIndentation; return res; case "string": return `"${strEscape(value)}"`; case "number": return isFinite(value) ? String(value) : "null"; case "boolean": return value === true ? "true" : "false"; } } function stringifyFullArr(key, value, stack, replacer, indent) { var i, res, join; const originalIndentation = indentation; if (typeof value === "object" && value !== null && typeof value.toJSON === "function") { value = value.toJSON(key); } switch (typeof value) { case "object": if (value === null) { return "null"; } for (i = 0; i < stack.length; i++) { if (stack[i] === value) { return '"[Circular]"'; } } if (Array.isArray(value)) { if (value.length === 0) { return "[]"; } stack.push(value); res = "["; indentation += indent; res += ` ${indentation}`; join = `, ${indentation}`; for (i = 0; i < value.length - 1; i++) { const tmp2 = stringifyFullArr(i, value[i], stack, replacer, indent); res += tmp2 !== void 0 ? tmp2 : "null"; res += join; } const tmp = stringifyFullArr(i, value[i], stack, replacer, indent); res += tmp !== void 0 ? tmp : "null"; if (indentation !== "") { res += ` ${originalIndentation}`; } res += "]"; stack.pop(); indentation = originalIndentation; return res; } if (replacer.length === 0) { return "{}"; } stack.push(value); res = "{"; indentation += indent; res += ` ${indentation}`; join = `, ${indentation}`; var separator = ""; for (i = 0; i < replacer.length; i++) { if (typeof replacer[i] === "string" || typeof replacer[i] === "number") { key = replacer[i]; const tmp = stringifyFullArr(key, value[key], stack, replacer, indent); if (tmp !== void 0) { res += `${separator}"${strEscape(key)}": ${tmp}`; separator = join; } } } if (separator !== "") { res += ` ${originalIndentation}`; } else { res = "{"; } res += "}"; stack.pop(); indentation = originalIndentation; return res; case "string": return `"${strEscape(value)}"`; case "number": return isFinite(value) ? String(value) : "null"; case "boolean": return value === true ? "true" : "false"; } } function stringifyIndent(key, value, stack, indent) { var i, res, join; const originalIndentation = indentation; switch (typeof value) { case "object": if (value === null) { return "null"; } if (typeof value.toJSON === "function") { value = value.toJSON(key); if (typeof value !== "object") { return stringifyIndent(key, value, stack, indent); } if (value === null) { return "null"; } } for (i = 0; i < stack.length; i++) { if (stack[i] === value) { return '"[Circular]"'; } } if (Array.isArray(value)) { if (value.length === 0) { return "[]"; } stack.push(value); res = "["; indentation += indent; res += ` ${indentation}`; join = `, ${indentation}`; for (i = 0; i < value.length - 1; i++) { const tmp2 = stringifyIndent(i, value[i], stack, indent); res += tmp2 !== void 0 ? tmp2 : "null"; res += join; } const tmp = stringifyIndent(i, value[i], stack, indent); res += tmp !== void 0 ? tmp : "null"; if (indentation !== "") { res += ` ${originalIndentation}`; } res += "]"; stack.pop(); indentation = originalIndentation; return res; } var keys = insertSort(Object.keys(value)); if (keys.length === 0) { return "{}"; } stack.push(value); res = "{"; indentation += indent; res += ` ${indentation}`; join = `, ${indentation}`; var separator = ""; for (i = 0; i < keys.length; i++) { key = keys[i]; const tmp = stringifyIndent(key, value[key], stack, indent); if (tmp !== void 0) { res += `${separator}"${strEscape(key)}": ${tmp}`; separator = join; } } if (separator !== "") { res += ` ${originalIndentation}`; } else { res = "{"; } res += "}"; stack.pop(); indentation = originalIndentation; return res; case "string": return `"${strEscape(value)}"`; case "number": return isFinite(value) ? String(value) : "null"; case "boolean": return value === true ? "true" : "false"; } } function stringifyReplacerArr(key, value, stack, replacer) { var i, res; if (typeof value === "object" && value !== null && typeof value.toJSON === "function") { value = value.toJSON(key); } switch (typeof value) { case "object": if (value === null) { return "null"; } for (i = 0; i < stack.length; i++) { if (stack[i] === value) { return '"[Circular]"'; } } if (Array.isArray(value)) { if (value.length === 0) { return "[]"; } stack.push(value); res = "["; for (i = 0; i < value.length - 1; i++) { const tmp2 = stringifyReplacerArr(i, value[i], stack, replacer); res += tmp2 !== void 0 ? tmp2 : "null"; res += ","; } const tmp = stringifyReplacerArr(i, value[i], stack, replacer); res += tmp !== void 0 ? tmp : "null"; res += "]"; stack.pop(); return res; } if (replacer.length === 0) { return "{}"; } stack.push(value); res = "{"; var separator = ""; for (i = 0; i < replacer.length; i++) { if (typeof replacer[i] === "string" || typeof replacer[i] === "number") { key = replacer[i]; const tmp = stringifyReplacerArr(key, value[key], stack, replacer); if (tmp !== void 0) { res += `${separator}"${strEscape(key)}":${tmp}`; separator = ","; } } } res += "}"; stack.pop(); return res; case "string": return `"${strEscape(value)}"`; case "number": return isFinite(value) ? String(value) : "null"; case "boolean": return value === true ? "true" : "false"; } } function stringifyReplacerFn(key, parent, stack, replacer) { var i, res; var value = parent[key]; if (typeof value === "object" && value !== null && typeof value.toJSON === "function") { value = value.toJSON(key); } value = replacer.call(parent, key, value); switch (typeof value) { case "object": if (value === null) { return "null"; } for (i = 0; i < stack.length; i++) { if (stack[i] === value) { return '"[Circular]"'; } } if (Array.isArray(value)) { if (value.length === 0) { return "[]"; } stack.push(value); res = "["; for (i = 0; i < value.length - 1; i++) { const tmp2 = stringifyReplacerFn(i, value, stack, replacer); res += tmp2 !== void 0 ? tmp2 : "null"; res += ","; } const tmp = stringifyReplacerFn(i, value, stack, replacer); res += tmp !== void 0 ? tmp : "null"; res += "]"; stack.pop(); return res; } var keys = insertSort(Object.keys(value)); if (keys.length === 0) { return "{}"; } stack.push(value); res = "{"; var separator = ""; for (i = 0; i < keys.length; i++) { key = keys[i]; const tmp = stringifyReplacerFn(key, value, stack, replacer); if (tmp !== void 0) { res += `${separator}"${strEscape(key)}":${tmp}`; separator = ","; } } res += "}"; stack.pop(); return res; case "string": return `"${strEscape(value)}"`; case "number": return isFinite(value) ? String(value) : "null"; case "boolean": return value === true ? "true" : "false"; } } function stringifySimple(key, value, stack) { var i, res; switch (typeof value) { case "object": if (value === null) { return "null"; } if (typeof value.toJSON === "function") { value = value.toJSON(key); if (typeof value !== "object") { return stringifySimple(key, value, stack); } if (value === null) { return "null"; } } for (i = 0; i < stack.length; i++) { if (stack[i] === value) { return '"[Circular]"'; } } if (Array.isArray(value)) { if (value.length === 0) { return "[]"; } stack.push(value); res = "["; for (i = 0; i < value.length - 1; i++) { const tmp2 = stringifySimple(i, value[i], stack); res += tmp2 !== void 0 ? tmp2 : "null"; res += ","; } const tmp = stringifySimple(i, value[i], stack); res += tmp !== void 0 ? tmp : "null"; res += "]"; stack.pop(); return res; } var keys = insertSort(Object.keys(value)); if (keys.length === 0) { return "{}"; } stack.push(value); var separator = ""; res = "{"; for (i = 0; i < keys.length; i++) { key = keys[i]; const tmp = stringifySimple(key, value[key], stack); if (tmp !== void 0) { res += `${separator}"${strEscape(key)}":${tmp}`; separator = ","; } } res += "}"; stack.pop(); return res; case "string": return `"${strEscape(value)}"`; case "number": return isFinite(value) ? String(value) : "null"; case "boolean": return value === true ? "true" : "false"; } } function insertSort(arr) { for (var i = 1; i < arr.length; i++) { const tmp = arr[i]; var j = i; while (j !== 0 && arr[j - 1] > tmp) { arr[j] = arr[j - 1]; j--; } arr[j] = tmp; } return arr; } function stringify(value, replacer, spacer) { var i; var indent = ""; indentation = ""; if (arguments.length > 1) { if (typeof spacer === "number") { for (i = 0; i < spacer; i += 1) { indent += " "; } } else if (typeof spacer === "string") { indent = spacer; } if (indent !== "") { if (replacer !== void 0 && replacer !== null) { if (typeof replacer === "function") { return stringifyFullFn("", { "": value }, [], replacer, indent); } if (Array.isArray(replacer)) { return stringifyFullArr("", value, [], replacer, indent); } } return stringifyIndent("", value, [], indent); } if (typeof replacer === "function") { return stringifyReplacerFn("", { "": value }, [], replacer); } if (Array.isArray(replacer)) { return stringifyReplacerArr("", value, [], replacer); } } return stringifySimple("", value, []); } } }); // ../../node_modules/safe-stable-stringify/index.js var require_safe_stable_stringify = __commonJS({ "../../node_modules/safe-stable-stringify/index.js"(exports2, module2) { "use strict"; var stringify = require_stable(); module2.exports = stringify; stringify.default = stringify; } }); // ../../node_modules/logform/json.js var require_json2 = __commonJS({ "../../node_modules/logform/json.js"(exports2, module2) { "use strict"; var format = require_format(); var { MESSAGE } = require_triple_beam(); var jsonStringify = require_safe_stable_stringify(); function replacer(key, value) { if (value instanceof Buffer) return value.toString("base64"); if (typeof value === "bigint") return value.toString(); return value; } module2.exports = format((info, opts = {}) => { info[MESSAGE] = jsonStringify(info, opts.replacer || replacer, opts.space); return info; }); } }); // ../../node_modules/logform/label.js var require_label = __commonJS({ "../../node_modules/logform/label.js"(exports2, module2) { "use strict"; var format = require_format(); module2.exports = format((info, opts) => { if (opts.message) { info.message = `[${opts.label}] ${info.message}`; return info; } info.label = opts.label; return info; }); } }); // ../../node_modules/logform/logstash.js var require_logstash = __commonJS({ "../../node_modules/logform/logstash.js"(exports2, module2) { "use strict"; var format = require_format(); var { MESSAGE } = require_triple_beam(); var jsonStringify = require_safe_stable_stringify(); module2.exports = format((info) => { const logstash = {}; if (info.message) { logstash["@message"] = info.message; delete info.message; } if (info.timestamp) { logstash["@timestamp"] = info.timestamp; delete info.timestamp; } logstash["@fields"] = info; info[MESSAGE] = jsonStringify(logstash); return info; }); } }); // ../../node_modules/logform/metadata.js var require_metadata = __commonJS({ "../../node_modules/logform/metadata.js"(exports2, module2) { "use strict"; var format = require_format(); function fillExcept(info, fillExceptKeys, metadataKey) { const savedKeys = fillExceptKeys.reduce((acc, key) => { acc[key] = info[key]; delete info[key]; return acc; }, {}); const metadata = Object.keys(info).reduce((acc, key) => { acc[key] = info[key]; delete info[key]; return acc; }, {}); Object.assign(info, savedKeys, { [metadataKey]: metadata }); return info; } function fillWith(info, fillWithKeys, metadataKey) { info[metadataKey] = fillWithKeys.reduce((acc, key) => { acc[key] = info[key]; delete info[key]; return acc; }, {}); return info; } module2.exports = format((info, opts = {}) => { let metadataKey = "metadata"; if (opts.key) { metadataKey = opts.key; } let fillExceptKeys = []; if (!opts.fillExcept && !opts.fillWith) { fillExceptKeys.push("level"); fillExceptKeys.push("message"); } if (opts.fillExcept) { fillExceptKeys = opts.fillExcept; } if (fillExceptKeys.length > 0) { return fillExcept(info, fillExceptKeys, metadataKey); } if (opts.fillWith) { return fillWith(info, opts.fillWith, metadataKey); } return info; }); } }); // ../../node_modules/ms/index.js var require_ms = __commonJS({ "../../node_modules/ms/index.js"(exports2, module2) { var s = 1e3; var m = s * 60; var h = m * 60; var d = h * 24; var w = d * 7; var y = d * 365.25; module2.exports = function(val, options) { options = options || {}; var type = typeof val; if (type === "string" && val.length > 0) { return parse(val); } else if (type === "number" && isFinite(val)) { return options.long ? fmtLong(val) : fmtShort(val); } throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val)); }; function parse(str) { str = String(str); if (str.length > 100) { return; } var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str); if (!match) { return; } var n = parseFloat(match[1]); var type = (match[2] || "ms").toLowerCase(); switch (type) { case "years": case "year": case "yrs": case "yr": case "y": return n * y; case "weeks": case "week": case "w": return n * w; case "days": case "day": case "d": return n * d; case "hours": case "hour": case "hrs": case "hr": case "h": return n * h; case "minutes": case "minute": case "mins": case "min": case "m": return n * m; case "seconds": case "second": case "secs": case "sec": case "s": return n * s; case "milliseconds": case "millisecond": case "msecs": case "msec": case "ms": return n; default: return void 0; } } function fmtShort(ms) { var msAbs = Math.abs(ms); if (msAbs >= d) { return Math.round(ms / d) + "d"; } if (msAbs >= h) { return Math.round(ms / h) + "h"; } if (msAbs >= m) { return Math.round(ms / m) + "m"; } if (msAbs >= s) { return Math.round(ms / s) + "s"; } return ms + "ms"; } function fmtLong(ms) { var msAbs = Math.abs(ms); if (msAbs >= d) { return plural(ms, msAbs, d, "day"); } if (msAbs >= h) { return plural(ms, msAbs, h, "hour"); } if (msAbs >= m) { return plural(ms, msAbs, m, "minute"); } if (msAbs >= s) { return plural(ms, msAbs, s, "second"); } return ms + " ms"; } function plural(ms, msAbs, n, name) { var isPlural = msAbs >= n * 1.5; return Math.round(ms / n) + " " + name + (isPlural ? "s" : ""); } } }); // ../../node_modules/logform/ms.js var require_ms2 = __commonJS({ "../../node_modules/logform/ms.js"(exports2, module2) { "use strict"; var format = require_format(); var ms = require_ms(); module2.exports = format((info) => { const curr = +new Date(); exports2.diff = curr - (exports2.prevTime || curr); exports2.prevTime = curr; info.ms = `+${ms(exports2.diff)}`; return info; }); } }); // ../../node_modules/logform/pretty-print.js var require_pretty_print = __commonJS({ "../../node_modules/logform/pretty-print.js"(exports2, module2) { "use strict"; var inspect = require("util").inspect; var format = require_format(); var { LEVEL, MESSAGE, SPLAT } = require_triple_beam(); module2.exports = format((info, opts = {}) => { const stripped = Object.assign({}, info); delete stripped[LEVEL]; delete stripped[MESSAGE]; delete stripped[SPLAT]; info[MESSAGE] = inspect(stripped, false, opts.depth || null, opts.colorize); return info; }); } }); // ../../node_modules/logform/printf.js var require_printf = __commonJS({ "../../node_modules/logform/printf.js"(exports2, module2) { "use strict"; var { MESSAGE } = require_triple_beam(); var Printf = class { constructor(templateFn) { this.template = templateFn; } transform(info) { info[MESSAGE] = this.template(info); return info; } }; module2.exports = (opts) => new Printf(opts); module2.exports.Printf = module2.exports.Format = Printf; } }); // ../../node_modules/logform/simple.js var require_simple = __commonJS({ "../../node_modules/logform/simple.js"(exports2, module2) { "use strict"; var format = require_format(); var { MESSAGE } = require_triple_beam(); var jsonStringify = require_safe_stable_stringify(); module2.exports = format((info) => { const stringifiedRest = jsonStringify(Object.assign({}, info, { level: void 0, message: void 0, splat: void 0 })); const padding = info.padding && info.padding[info.level] || ""; if (stringifiedRest !== "{}") { info[MESSAGE] = `${info.level}:${padding} ${info.message} ${stringifiedRest}`; } else { info[MESSAGE] = `${info.level}:${padding} ${info.message}`; } return info; }); } }); // ../../node_modules/logform/splat.js var require_splat = __commonJS({ "../../node_modules/logform/splat.js"(exports2, module2) { "use strict"; var util = require("util"); var { SPLAT } = require_triple_beam(); var formatRegExp = /%[scdjifoO%]/g; var escapedPercent = /%%/g; var Splatter = class { constructor(opts) { this.options = opts; } _splat(info, tokens) { const msg = info.message; const splat = info[SPLAT] || info.splat || []; const percents = msg.match(escapedPercent); const escapes = percents && percents.length || 0; const expectedSplat = tokens.length - escapes; const extraSplat = expectedSplat - splat.length; const metas = extraSplat < 0 ? splat.splice(extraSplat, -1 * extraSplat) : []; const metalen = metas.length; if (metalen) { for (let i = 0; i < metalen; i++) { Object.assign(info, metas[i]); } } info.message = util.format(msg, ...splat); return info; } transform(info) { const msg = info.message; const splat = info[SPLAT] || info.splat; if (!splat || !splat.length) { return info; } const tokens = msg && msg.match && msg.match(formatRegExp); if (!tokens && (splat || splat.length)) { const metas = splat.length > 1 ? splat.splice(0) : splat; const metalen = metas.length; if (metalen) { for (let i = 0; i < metalen; i++) { Object.assign(info, metas[i]); } } return info; } if (tokens) { return this._splat(info, tokens); } return info; } }; module2.exports = (opts) => new Splatter(opts); } }); // ../../node_modules/fecha/lib/fecha.umd.js var require_fecha_umd = __commonJS({ "../../node_modules/fecha/lib/fecha.umd.js"(exports2, module2) { (function(global2, factory) { typeof exports2 === "object" && typeof module2 !== "undefined" ? factory(exports2) : typeof define === "function" && define.amd ? define(["exports"], factory) : factory(global2.fecha = {}); })(exports2, function(exports3) { "use strict"; var token = /d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g; var twoDigitsOptional = "[1-9]\\d?"; var twoDigits = "\\d\\d"; var threeDigits = "\\d{3}"; var fourDigits = "\\d{4}"; var word = "[^\\s]+"; var literal = /\[([^]*?)\]/gm; function shorten(arr, sLen) { var newArr = []; for (var i = 0, len = arr.length; i < len; i++) { newArr.push(arr[i].substr(0, sLen)); } return newArr; } var monthUpdate = function(arrName) { return function(v, i18n) { var lowerCaseArr = i18n[arrName].map(function(v2) { return v2.toLowerCase(); }); var index = lowerCaseArr.indexOf(v.toLowerCase()); if (index > -1) { return index; } return null; }; }; function assign(origObj) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } for (var _a = 0, args_1 = args; _a < args_1.length; _a++) { var obj = args_1[_a]; for (var key in obj) { origObj[key] = obj[key]; } } return origObj; } var dayNames = [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ]; var monthNames = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ]; var monthNamesShort = shorten(monthNames, 3); var dayNamesShort = shorten(dayNames, 3); var defaultI18n = { dayNamesShort, dayNames, monthNamesShort, monthNames, amPm: ["am", "pm"], DoFn: function(dayOfMonth) { return dayOfMonth + ["th", "st", "nd", "rd"][dayOfMonth % 10 > 3 ? 0 : (dayOfMonth - dayOfMonth % 10 !== 10 ? 1 : 0) * dayOfMonth % 10]; } }; var globalI18n = assign({}, defaultI18n); var setGlobalDateI18n = function(i18n) { return globalI18n = assign(globalI18n, i18n); }; var regexEscape = function(str) { return str.replace(/[|\\{()[^$+*?.-]/g, "\\$&"); }; var pad = function(val, len) { if (len === void 0) { len = 2; } val = String(val); while (val.length < len) { val = "0" + val; } return val; }; var formatFlags = { D: function(dateObj) { return String(dateObj.getDate()); }, DD: function(dateObj) { return pad(dateObj.getDate()); }, Do: function(dateObj, i18n) { return i18n.DoFn(dateObj.getDate()); }, d: function(dateObj) { return String(dateObj.getDay()); }, dd: function(dateObj) { return pad(dateObj.getDay()); }, ddd: function(dateObj, i18n) { return i18n.dayNamesShort[dateObj.getDay()]; }, dddd: function(dateObj, i18n) { return i18n.dayNames[dateObj.getDay()]; }, M: function(dateObj) { return String(dateObj.getMonth() + 1); }, MM: function(dateObj) { return pad(dateObj.getMonth() + 1); }, MMM: function(dateObj, i18n) { return i18n.monthNamesShort[dateObj.getMonth()]; }, MMMM: function(dateObj, i18n) { return i18n.monthNames[dateObj.getMonth()]; }, YY: function(dateObj) { return pad(String(dateObj.getFullYear()), 4).substr(2); }, YYYY: function(dateObj) { return pad(dateObj.getFullYear(), 4); }, h: function(dateObj) { return String(dateObj.getHours() % 12 || 12); }, hh: function(dateObj) { return pad(dateObj.getHours() % 12 || 12); }, H: function(dateObj) { return String(dateObj.getHours()); }, HH: function(dateObj) { return pad(dateObj.getHours()); }, m: function(dateObj) { return String(dateObj.getMinutes()); }, mm: function(dateObj) { return pad(dateObj.getMinutes()); }, s: function(dateObj) { return String(dateObj.getSeconds()); }, ss: function(dateObj) { return pad(dateObj.getSeconds()); }, S: function(dateObj) { return String(Math.round(dateObj.getMilliseconds() / 100)); }, SS: function(dateObj) { return pad(Math.round(dateObj.getMilliseconds() / 10), 2); }, SSS: function(dateObj) { return pad(dateObj.getMilliseconds(), 3); }, a: function(dateObj, i18n) { return dateObj.getHours() < 12 ? i18n.amPm[0] : i18n.amPm[1]; }, A: function(dateObj, i18n) { return dateObj.getHours() < 12 ? i18n.amPm[0].toUpperCase() : i18n.amPm[1].toUpperCase(); }, ZZ: function(dateObj) { var offset = dateObj.getTimezoneOffset(); return (offset > 0 ? "-" : "+") + pad(Math.floor(Math.abs(offset) / 60) * 100 + Math.abs(offset) % 60, 4); }, Z: function(dateObj) { var offset = dateObj.getTimezoneOffset(); return (offset > 0 ? "-" : "+") + pad(Math.floor(Math.abs(offset) / 60), 2) + ":" + pad(Math.abs(offset) % 60, 2); } }; var monthParse = function(v) { return +v - 1; }; var emptyDigits = [null, twoDigitsOptional]; var emptyWord = [null, word]; var amPm = [ "isPm", word, function(v, i18n) { var val = v.toLowerCase(); if (val === i18n.amPm[0]) { return 0; } else if (val === i18n.amPm[1]) { return 1; } return null; } ]; var timezoneOffset = [ "timezoneOffset", "[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?", function(v) { var parts = (v + "").match(/([+-]|\d\d)/gi); if (parts) { var minutes = +parts[1] * 60 + parseInt(parts[2], 10); return parts[0] === "+" ? minutes : -minutes; } return 0; } ]; var parseFlags = { D: ["day", twoDigitsOptional], DD: ["day", twoDigits], Do: ["day", twoDigitsOptional + word, function(v) { return parseInt(v, 10); }], M: ["month", twoDigitsOptional, monthParse], MM: ["month", twoDigits, monthParse], YY: [ "year", twoDigits, function(v) { var now = new Date(); var cent = +("" + now.getFullYear()).substr(0, 2); return +("" + (+v > 68 ? cent - 1 : cent) + v); } ], h: ["hour", twoDigitsOptional, void 0, "isPm"], hh: ["hour", twoDigits, void 0, "isPm"], H: ["hour", twoDigitsOptional], HH: ["hour", twoDigits], m: ["minute", twoDigitsOptional], mm: ["minute", twoDigits], s: ["second", twoDigitsOptional], ss: ["second", twoDigits], YYYY: ["year", fourDigits], S: ["millisecond", "\\d", function(v) { return +v * 100; }], SS: ["millisecond", twoDigits, function(v) { return +v * 10; }], SSS: ["millisecond", threeDigits], d: emptyDigits, dd: emptyDigits, ddd: emptyWord, dddd: emptyWord, MMM: ["month", word, monthUpdate("monthNamesShort")], MMMM: ["month", word, monthUpdate("monthNames")], a: amPm, A: amPm, ZZ: timezoneOffset, Z: timezoneOffset }; var globalMasks = { default: "ddd MMM DD YYYY HH:mm:ss", shortDate: "M/D/YY", mediumDate: "MMM D, YYYY", longDate: "MMMM D, YYYY", fullDate: "dddd, MMMM D, YYYY", isoDate: "YYYY-MM-DD", isoDateTime: "YYYY-MM-DDTHH:mm:ssZ", shortTime: "HH:mm", mediumTime: "HH:mm:ss", longTime: "HH:mm:ss.SSS" }; var setGlobalDateMasks = function(masks) { return assign(globalMasks, masks); }; var format = function(dateObj, mask, i18n) { if (mask === void 0) { mask = globalMasks["default"]; } if (i18n === void 0) { i18n = {}; } if (typeof dateObj === "number") { dateObj = new Date(dateObj); } if (Object.prototype.toString.call(dateObj) !== "[object Date]" || isNaN(dateObj.getTime())) { throw new Error("Invalid Date pass to format"); } mask = globalMasks[mask] || mask; var literals = []; mask = mask.replace(literal, function($0, $1) { literals.push($1); return "@@@"; }); var combinedI18nSettings = assign(assign({}, globalI18n), i18n); mask = mask.replace(token, function($0) { return formatFlags[$0](dateObj, combinedI18nSettings); }); return mask.replace(/@@@/g, function() { return literals.shift(); }); }; function parse(dateStr, format2, i18n) { if (i18n === void 0) { i18n = {}; } if (typeof format2 !== "string") { throw new Error("Invalid format in fecha parse"); } format2 = globalMasks[format2] || format2; if (dateStr.length > 1e3) { return null; } var today = new Date(); var dateInfo = { year: today.getFullYear(), month: 0, day: 1, hour: 0, minute: 0, second: 0, millisecond: 0, isPm: null, timezoneOffset: null }; var parseInfo = []; var literals = []; var newFormat = format2.replace(literal, function($0, $1) { literals.push(regexEscape($1)); return "@@@"; }); var specifiedFields = {}; var requiredFields = {}; newFormat = regexEscape(newFormat).replace(token, function($0) { var info = parseFlags[$0]; var field2 = info[0], regex = info[1], requiredField = info[3]; if (specifiedFields[field2]) { throw new Error("Invalid format. " + field2 + " specified twice in format"); } specifiedFields[field2] = true; if (requiredField) { requiredFields[requiredField] = true; } parseInfo.push(info); return "(" + regex + ")"; }); Object.keys(requiredFields).forEach(function(field2) { if (!specifiedFields[field2]) { throw new Error("Invalid format. " + field2 + " is required in specified format"); } }); newFormat = newFormat.replace(/@@@/g, function() { return literals.shift(); }); var matches = dateStr.match(new RegExp(newFormat, "i")); if (!matches) { return null; } var combinedI18nSettings = assign(assign({}, globalI18n), i18n); for (var i = 1; i < matches.length; i++) { var _a = parseInfo[i - 1], field = _a[0], parser = _a[2]; var value = parser ? parser(matches[i], combinedI18nSettings) : +matches[i]; if (value == null) { return null; } dateInfo[field] = value; } if (dateInfo.isPm === 1 && dateInfo.hour != null && +dateInfo.hour !== 12) { dateInfo.hour = +dateInfo.hour + 12; } else if (dateInfo.isPm === 0 && +dateInfo.hour === 12) { dateInfo.hour = 0; } var dateWithoutTZ = new Date(dateInfo.year, dateInfo.month, dateInfo.day, dateInfo.hour, dateInfo.minute, dateInfo.second, dateInfo.millisecond); var validateFields = [ ["month", "getMonth"], ["day", "getDate"], ["hour", "getHours"], ["minute", "getMinutes"], ["second", "getSeconds"] ]; for (var i = 0, len = validateFields.length; i < len; i++) { if (specifiedFields[validateFields[i][0]] && dateInfo[validateFields[i][0]] !== dateWithoutTZ[validateFields[i][1]]()) { return null; } } if (dateInfo.timezoneOffset == null) { return dateWithoutTZ; } return new Date(Date.UTC(dateInfo.year, dateInfo.month, dateInfo.day, dateInfo.hour, dateInfo.minute - dateInfo.timezoneOffset, dateInfo.second, dateInfo.millisecond)); } var fecha = { format, parse, defaultI18n, setGlobalDateI18n, setGlobalDateMasks }; exports3.assign = assign; exports3.default = fecha; exports3.format = format; exports3.parse = parse; exports3.defaultI18n = defaultI18n; exports3.setGlobalDateI18n = setGlobalDateI18n; exports3.setGlobalDateMasks = setGlobalDateMasks; Object.defineProperty(exports3, "__esModule", { value: true }); }); } }); // ../../node_modules/logform/timestamp.js var require_timestamp = __commonJS({ "../../node_modules/logform/timestamp.js"(exports2, module2) { "use strict"; var fecha = require_fecha_umd(); var format = require_format(); module2.exports = format((info, opts = {}) => { if (opts.format) { info.timestamp = typeof opts.format === "function" ? opts.format() : fecha.format(new Date(), opts.format); } if (!info.timestamp) { info.timestamp = new Date().toISOString(); } if (opts.alias) { info[opts.alias] = info.timestamp; } return info; }); } }); // ../../node_modules/logform/uncolorize.js var require_uncolorize = __commonJS({ "../../node_modules/logform/uncolorize.js"(exports2, module2) { "use strict"; var colors = require_safe(); var format = require_format(); var { MESSAGE } = require_triple_beam(); module2.exports = format((info, opts) => { if (opts.level !== false) { info.level = colors.strip(info.level); } if (opts.message !== false) { info.message = colors.strip(info.message); } if (opts.raw !== false && info[MESSAGE]) { info[MESSAGE] = colors.strip(info[MESSAGE]); } return info; }); } }); // ../../node_modules/logform/index.js var require_logform = __commonJS({ "../../node_modules/logform/index.js"(exports2) { "use strict"; var format = exports2.format = require_format(); exports2.levels = require_levels(); function exposeFormat(name, requireFormat) { Object.defineProperty(format, name, { get() { return requireFormat(); }, configurable: true }); } exposeFormat("align", function() { return require_align(); }); exposeFormat("errors", function() { return require_errors2(); }); exposeFormat("cli", function() { return require_cli2(); }); exposeFormat("combine", function() { return require_combine(); }); exposeFormat("colorize", function() { return require_colorize(); }); exposeFormat("json", function() { return require_json2(); }); exposeFormat("label", function() { return require_label(); }); exposeFormat("logstash", function() { return require_logstash(); }); exposeFormat("metadata", function() { return require_metadata(); }); exposeFormat("ms", function() { return require_ms2(); }); exposeFormat("padLevels", function() { return require_pad_levels(); }); exposeFormat("prettyPrint", function() { return require_pretty_print(); }); exposeFormat("printf", function() { return require_printf(); }); exposeFormat("simple", function() { return require_simple(); }); exposeFormat("splat", function() { return require_splat(); }); exposeFormat("timestamp", function() { return require_timestamp(); }); exposeFormat("uncolorize", function() { return require_uncolorize(); }); } }); // ../../node_modules/winston/lib/winston/common.js var require_common = __commonJS({ "../../node_modules/winston/lib/winston/common.js"(exports2) { "use strict"; var { format } = require("util"); exports2.warn = { deprecated(prop) { return () => { throw new Error(format("{ %s } was removed in winston@3.0.0.", prop)); }; }, useFormat(prop) { return () => { throw new Error([ format("{ %s } was removed in winston@3.0.0.", prop), "Use a custom winston.format = winston.format(function) instead." ].join("\n")); }; }, forFunctions(obj, type, props) { props.forEach((prop) => { obj[prop] = exports2.warn[type](prop); }); }, moved(obj, movedTo, prop) { function movedNotice() { return () => { throw new Error([ format("winston.%s was moved in winston@3.0.0.", prop), format("Use a winston.%s instead.", movedTo) ].join("\n")); }; } Object.defineProperty(obj, prop, { get: movedNotice, set: movedNotice }); }, forProperties(obj, type, props) { props.forEach((prop) => { const notice = exports2.warn[type](prop); Object.defineProperty(obj, prop, { get: notice, set: notice }); }); } }; } }); // ../../node_modules/winston/package.json var require_package2 = __commonJS({ "../../node_modules/winston/package.json"(exports2, module2) { module2.exports = { name: "winston", description: "A logger for just about everything.", version: "3.5.1", author: "Charlie Robbins ", maintainers: [ "David Hyde " ], repository: { type: "git", url: "https://github.com/winstonjs/winston.git" }, keywords: [ "winston", "logger", "logging", "logs", "sysadmin", "bunyan", "pino", "loglevel", "tools", "json", "stream" ], dependencies: { "@dabh/diagnostics": "^2.0.2", async: "^3.2.3", "is-stream": "^2.0.0", logform: "^2.3.2", "one-time": "^1.0.0", "readable-stream": "^3.4.0", "safe-stable-stringify": "^2.3.1", "stack-trace": "0.0.x", "triple-beam": "^1.3.0", "winston-transport": "^4.4.2" }, devDependencies: { "@babel/cli": "^7.16.7", "@babel/core": "^7.16.7", "@babel/preset-env": "^7.16.7", "@types/node": "^17.0.8", "abstract-winston-transport": "^0.5.1", assume: "^2.2.0", colors: "1.4.0", "cross-spawn-async": "^2.2.5", "eslint-config-populist": "^4.2.0", hock: "^1.4.1", mocha: "8.1.3", nyc: "^15.1.0", rimraf: "^3.0.2", split2: "^4.1.0", "std-mocks": "^1.0.1", through2: "^4.0.2", "winston-compat": "^0.1.5" }, main: "./lib/winston", browser: "./dist/winston", types: "./index.d.ts", scripts: { lint: "populist lib/*.js lib/winston/*.js lib/winston/**/*.js", pretest: "npm run lint", test: "nyc --reporter=text --reporter lcov npm run test:mocha", "test:mocha": "mocha test/*.test.js test/**/*.test.js --exit", build: "rimraf dist && babel lib -d dist", prepublishOnly: "npm run build" }, engines: { node: ">= 6.4.0" }, license: "MIT" }; } }); // ../../node_modules/util-deprecate/node.js var require_node = __commonJS({ "../../node_modules/util-deprecate/node.js"(exports2, module2) { module2.exports = require("util").deprecate; } }); // ../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/stream.js var require_stream = __commonJS({ "../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/stream.js"(exports2, module2) { module2.exports = require("stream"); } }); // ../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/destroy.js var require_destroy = __commonJS({ "../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/destroy.js"(exports2, module2) { "use strict"; function destroy(err, cb) { var _this = this; var readableDestroyed = this._readableState && this._readableState.destroyed; var writableDestroyed = this._writableState && this._writableState.destroyed; if (readableDestroyed || writableDestroyed) { if (cb) { cb(err); } else if (err) { if (!this._writableState) { process.nextTick(emitErrorNT, this, err); } else if (!this._writableState.errorEmitted) { this._writableState.errorEmitted = true; process.nextTick(emitErrorNT, this, err); } } return this; } if (this._readableState) { this._readableState.destroyed = true; } if (this._writableState) { this._writableState.destroyed = true; } this._destroy(err || null, function(err2) { if (!cb && err2) { if (!_this._writableState) { process.nextTick(emitErrorAndCloseNT, _this, err2); } else if (!_this._writableState.errorEmitted) { _this._writableState.errorEmitted = true; process.nextTick(emitErrorAndCloseNT, _this, err2); } else { process.nextTick(emitCloseNT, _this); } } else if (cb) { process.nextTick(emitCloseNT, _this); cb(err2); } else { process.nextTick(emitCloseNT, _this); } }); return this; } function emitErrorAndCloseNT(self, err) { emitErrorNT(self, err); emitCloseNT(self); } function emitCloseNT(self) { if (self._writableState && !self._writableState.emitClose) return; if (self._readableState && !self._readableState.emitClose) return; self.emit("close"); } function undestroy() { if (this._readableState) { this._readableState.destroyed = false; this._readableState.reading = false; this._readableState.ended = false; this._readableState.endEmitted = false; } if (this._writableState) { this._writableState.destroyed = false; this._writableState.ended = false; this._writableState.ending = false; this._writableState.finalCalled = false; this._writableState.prefinished = false; this._writableState.finished = false; this._writableState.errorEmitted = false; } } function emitErrorNT(self, err) { self.emit("error", err); } function errorOrDestroy(stream, err) { var rState = stream._readableState; var wState = stream._writableState; if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err); else stream.emit("error", err); } module2.exports = { destroy, undestroy, errorOrDestroy }; } }); // ../../node_modules/winston-transport/node_modules/readable-stream/errors.js var require_errors3 = __commonJS({ "../../node_modules/winston-transport/node_modules/readable-stream/errors.js"(exports2, module2) { "use strict"; var codes = {}; function createErrorType(code, message, Base) { if (!Base) { Base = Error; } function getMessage(arg1, arg2, arg3) { if (typeof message === "string") { return message; } else { return message(arg1, arg2, arg3); } } class NodeError extends Base { constructor(arg1, arg2, arg3) { super(getMessage(arg1, arg2, arg3)); } } NodeError.prototype.name = Base.name; NodeError.prototype.code = code; codes[code] = NodeError; } function oneOf(expected, thing) { if (Array.isArray(expected)) { const len = expected.length; expected = expected.map((i) => String(i)); if (len > 2) { return `one of ${thing} ${expected.slice(0, len - 1).join(", ")}, or ` + expected[len - 1]; } else if (len === 2) { return `one of ${thing} ${expected[0]} or ${expected[1]}`; } else { return `of ${thing} ${expected[0]}`; } } else { return `of ${thing} ${String(expected)}`; } } function startsWith(str, search, pos) { return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; } function endsWith(str, search, this_len) { if (this_len === void 0 || this_len > str.length) { this_len = str.length; } return str.substring(this_len - search.length, this_len) === search; } function includes(str, search, start) { if (typeof start !== "number") { start = 0; } if (start + search.length > str.length) { return false; } else { return str.indexOf(search, start) !== -1; } } createErrorType("ERR_INVALID_OPT_VALUE", function(name, value) { return 'The value "' + value + '" is invalid for option "' + name + '"'; }, TypeError); createErrorType("ERR_INVALID_ARG_TYPE", function(name, expected, actual) { let determiner; if (typeof expected === "string" && startsWith(expected, "not ")) { determiner = "must not be"; expected = expected.replace(/^not /, ""); } else { determiner = "must be"; } let msg; if (endsWith(name, " argument")) { msg = `The ${name} ${determiner} ${oneOf(expected, "type")}`; } else { const type = includes(name, ".") ? "property" : "argument"; msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, "type")}`; } msg += `. Received type ${typeof actual}`; return msg; }, TypeError); createErrorType("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"); createErrorType("ERR_METHOD_NOT_IMPLEMENTED", function(name) { return "The " + name + " method is not implemented"; }); createErrorType("ERR_STREAM_PREMATURE_CLOSE", "Premature close"); createErrorType("ERR_STREAM_DESTROYED", function(name) { return "Cannot call " + name + " after a stream was destroyed"; }); createErrorType("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"); createErrorType("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"); createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end"); createErrorType("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError); createErrorType("ERR_UNKNOWN_ENCODING", function(arg) { return "Unknown encoding: " + arg; }, TypeError); createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"); module2.exports.codes = codes; } }); // ../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/state.js var require_state = __commonJS({ "../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/state.js"(exports2, module2) { "use strict"; var ERR_INVALID_OPT_VALUE = require_errors3().codes.ERR_INVALID_OPT_VALUE; function highWaterMarkFrom(options, isDuplex, duplexKey) { return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; } function getHighWaterMark(state, options, duplexKey, isDuplex) { var hwm = highWaterMarkFrom(options, isDuplex, duplexKey); if (hwm != null) { if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) { var name = isDuplex ? duplexKey : "highWaterMark"; throw new ERR_INVALID_OPT_VALUE(name, hwm); } return Math.floor(hwm); } return state.objectMode ? 16 : 16 * 1024; } module2.exports = { getHighWaterMark }; } }); // ../../node_modules/inherits/inherits_browser.js var require_inherits_browser = __commonJS({ "../../node_modules/inherits/inherits_browser.js"(exports2, module2) { if (typeof Object.create === "function") { module2.exports = function inherits(ctor, superCtor) { if (superCtor) { ctor.super_ = superCtor; ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); } }; } else { module2.exports = function inherits(ctor, superCtor) { if (superCtor) { ctor.super_ = superCtor; var TempCtor = function() { }; TempCtor.prototype = superCtor.prototype; ctor.prototype = new TempCtor(); ctor.prototype.constructor = ctor; } }; } } }); // ../../node_modules/inherits/inherits.js var require_inherits = __commonJS({ "../../node_modules/inherits/inherits.js"(exports2, module2) { try { util = require("util"); if (typeof util.inherits !== "function") throw ""; module2.exports = util.inherits; } catch (e) { module2.exports = require_inherits_browser(); } var util; } }); // ../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/buffer_list.js var require_buffer_list = __commonJS({ "../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/buffer_list.js"(exports2, module2) { "use strict"; function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function(sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function(key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function(key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } var _require = require("buffer"); var Buffer2 = _require.Buffer; var _require2 = require("util"); var inspect = _require2.inspect; var custom = inspect && inspect.custom || "inspect"; function copyBuffer(src, target, offset) { Buffer2.prototype.copy.call(src, target, offset); } module2.exports = /* @__PURE__ */ function() { function BufferList() { _classCallCheck(this, BufferList); this.head = null; this.tail = null; this.length = 0; } _createClass(BufferList, [{ key: "push", value: function push(v) { var entry = { data: v, next: null }; if (this.length > 0) this.tail.next = entry; else this.head = entry; this.tail = entry; ++this.length; } }, { key: "unshift", value: function unshift(v) { var entry = { data: v, next: this.head }; if (this.length === 0) this.tail = entry; this.head = entry; ++this.length; } }, { key: "shift", value: function shift() { if (this.length === 0) return; var ret = this.head.data; if (this.length === 1) this.head = this.tail = null; else this.head = this.head.next; --this.length; return ret; } }, { key: "clear", value: function clear() { this.head = this.tail = null; this.length = 0; } }, { key: "join", value: function join(s) { if (this.length === 0) return ""; var p = this.head; var ret = "" + p.data; while (p = p.next) { ret += s + p.data; } return ret; } }, { key: "concat", value: function concat(n) { if (this.length === 0) return Buffer2.alloc(0); var ret = Buffer2.allocUnsafe(n >>> 0); var p = this.head; var i = 0; while (p) { copyBuffer(p.data, ret, i); i += p.data.length; p = p.next; } return ret; } }, { key: "consume", value: function consume(n, hasStrings) { var ret; if (n < this.head.data.length) { ret = this.head.data.slice(0, n); this.head.data = this.head.data.slice(n); } else if (n === this.head.data.length) { ret = this.shift(); } else { ret = hasStrings ? this._getString(n) : this._getBuffer(n); } return ret; } }, { key: "first", value: function first() { return this.head.data; } }, { key: "_getString", value: function _getString(n) { var p = this.head; var c = 1; var ret = p.data; n -= ret.length; while (p = p.next) { var str = p.data; var nb = n > str.length ? str.length : n; if (nb === str.length) ret += str; else ret += str.slice(0, n); n -= nb; if (n === 0) { if (nb === str.length) { ++c; if (p.next) this.head = p.next; else this.head = this.tail = null; } else { this.head = p; p.data = str.slice(nb); } break; } ++c; } this.length -= c; return ret; } }, { key: "_getBuffer", value: function _getBuffer(n) { var ret = Buffer2.allocUnsafe(n); var p = this.head; var c = 1; p.data.copy(ret); n -= p.data.length; while (p = p.next) { var buf = p.data; var nb = n > buf.length ? buf.length : n; buf.copy(ret, ret.length - n, 0, nb); n -= nb; if (n === 0) { if (nb === buf.length) { ++c; if (p.next) this.head = p.next; else this.head = this.tail = null; } else { this.head = p; p.data = buf.slice(nb); } break; } ++c; } this.length -= c; return ret; } }, { key: custom, value: function value(_, options) { return inspect(this, _objectSpread({}, options, { depth: 0, customInspect: false })); } }]); return BufferList; }(); } }); // ../../node_modules/safe-buffer/index.js var require_safe_buffer = __commonJS({ "../../node_modules/safe-buffer/index.js"(exports2, module2) { var buffer = require("buffer"); var Buffer2 = buffer.Buffer; function copyProps(src, dst) { for (var key in src) { dst[key] = src[key]; } } if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) { module2.exports = buffer; } else { copyProps(buffer, exports2); exports2.Buffer = SafeBuffer; } function SafeBuffer(arg, encodingOrOffset, length) { return Buffer2(arg, encodingOrOffset, length); } SafeBuffer.prototype = Object.create(Buffer2.prototype); copyProps(Buffer2, SafeBuffer); SafeBuffer.from = function(arg, encodingOrOffset, length) { if (typeof arg === "number") { throw new TypeError("Argument must not be a number"); } return Buffer2(arg, encodingOrOffset, length); }; SafeBuffer.alloc = function(size, fill, encoding) { if (typeof size !== "number") { throw new TypeError("Argument must be a number"); } var buf = Buffer2(size); if (fill !== void 0) { if (typeof encoding === "string") { buf.fill(fill, encoding); } else { buf.fill(fill); } } else { buf.fill(0); } return buf; }; SafeBuffer.allocUnsafe = function(size) { if (typeof size !== "number") { throw new TypeError("Argument must be a number"); } return Buffer2(size); }; SafeBuffer.allocUnsafeSlow = function(size) { if (typeof size !== "number") { throw new TypeError("Argument must be a number"); } return buffer.SlowBuffer(size); }; } }); // ../../node_modules/string_decoder/lib/string_decoder.js var require_string_decoder = __commonJS({ "../../node_modules/string_decoder/lib/string_decoder.js"(exports2) { "use strict"; var Buffer2 = require_safe_buffer().Buffer; var isEncoding = Buffer2.isEncoding || function(encoding) { encoding = "" + encoding; switch (encoding && encoding.toLowerCase()) { case "hex": case "utf8": case "utf-8": case "ascii": case "binary": case "base64": case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": case "raw": return true; default: return false; } }; function _normalizeEncoding(enc) { if (!enc) return "utf8"; var retried; while (true) { switch (enc) { case "utf8": case "utf-8": return "utf8"; case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return "utf16le"; case "latin1": case "binary": return "latin1"; case "base64": case "ascii": case "hex": return enc; default: if (retried) return; enc = ("" + enc).toLowerCase(); retried = true; } } } function normalizeEncoding(enc) { var nenc = _normalizeEncoding(enc); if (typeof nenc !== "string" && (Buffer2.isEncoding === isEncoding || !isEncoding(enc))) throw new Error("Unknown encoding: " + enc); return nenc || enc; } exports2.StringDecoder = StringDecoder; function StringDecoder(encoding) { this.encoding = normalizeEncoding(encoding); var nb; switch (this.encoding) { case "utf16le": this.text = utf16Text; this.end = utf16End; nb = 4; break; case "utf8": this.fillLast = utf8FillLast; nb = 4; break; case "base64": this.text = base64Text; this.end = base64End; nb = 3; break; default: this.write = simpleWrite; this.end = simpleEnd; return; } this.lastNeed = 0; this.lastTotal = 0; this.lastChar = Buffer2.allocUnsafe(nb); } StringDecoder.prototype.write = function(buf) { if (buf.length === 0) return ""; var r; var i; if (this.lastNeed) { r = this.fillLast(buf); if (r === void 0) return ""; i = this.lastNeed; this.lastNeed = 0; } else { i = 0; } if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); return r || ""; }; StringDecoder.prototype.end = utf8End; StringDecoder.prototype.text = utf8Text; StringDecoder.prototype.fillLast = function(buf) { if (this.lastNeed <= buf.length) { buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); return this.lastChar.toString(this.encoding, 0, this.lastTotal); } buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); this.lastNeed -= buf.length; }; function utf8CheckByte(byte) { if (byte <= 127) return 0; else if (byte >> 5 === 6) return 2; else if (byte >> 4 === 14) return 3; else if (byte >> 3 === 30) return 4; return byte >> 6 === 2 ? -1 : -2; } function utf8CheckIncomplete(self, buf, i) { var j = buf.length - 1; if (j < i) return 0; var nb = utf8CheckByte(buf[j]); if (nb >= 0) { if (nb > 0) self.lastNeed = nb - 1; return nb; } if (--j < i || nb === -2) return 0; nb = utf8CheckByte(buf[j]); if (nb >= 0) { if (nb > 0) self.lastNeed = nb - 2; return nb; } if (--j < i || nb === -2) return 0; nb = utf8CheckByte(buf[j]); if (nb >= 0) { if (nb > 0) { if (nb === 2) nb = 0; else self.lastNeed = nb - 3; } return nb; } return 0; } function utf8CheckExtraBytes(self, buf, p) { if ((buf[0] & 192) !== 128) { self.lastNeed = 0; return "\uFFFD"; } if (self.lastNeed > 1 && buf.length > 1) { if ((buf[1] & 192) !== 128) { self.lastNeed = 1; return "\uFFFD"; } if (self.lastNeed > 2 && buf.length > 2) { if ((buf[2] & 192) !== 128) { self.lastNeed = 2; return "\uFFFD"; } } } } function utf8FillLast(buf) { var p = this.lastTotal - this.lastNeed; var r = utf8CheckExtraBytes(this, buf, p); if (r !== void 0) return r; if (this.lastNeed <= buf.length) { buf.copy(this.lastChar, p, 0, this.lastNeed); return this.lastChar.toString(this.encoding, 0, this.lastTotal); } buf.copy(this.lastChar, p, 0, buf.length); this.lastNeed -= buf.length; } function utf8Text(buf, i) { var total = utf8CheckIncomplete(this, buf, i); if (!this.lastNeed) return buf.toString("utf8", i); this.lastTotal = total; var end = buf.length - (total - this.lastNeed); buf.copy(this.lastChar, 0, end); return buf.toString("utf8", i, end); } function utf8End(buf) { var r = buf && buf.length ? this.write(buf) : ""; if (this.lastNeed) return r + "\uFFFD"; return r; } function utf16Text(buf, i) { if ((buf.length - i) % 2 === 0) { var r = buf.toString("utf16le", i); if (r) { var c = r.charCodeAt(r.length - 1); if (c >= 55296 && c <= 56319) { this.lastNeed = 2; this.lastTotal = 4; this.lastChar[0] = buf[buf.length - 2]; this.lastChar[1] = buf[buf.length - 1]; return r.slice(0, -1); } } return r; } this.lastNeed = 1; this.lastTotal = 2; this.lastChar[0] = buf[buf.length - 1]; return buf.toString("utf16le", i, buf.length - 1); } function utf16End(buf) { var r = buf && buf.length ? this.write(buf) : ""; if (this.lastNeed) { var end = this.lastTotal - this.lastNeed; return r + this.lastChar.toString("utf16le", 0, end); } return r; } function base64Text(buf, i) { var n = (buf.length - i) % 3; if (n === 0) return buf.toString("base64", i); this.lastNeed = 3 - n; this.lastTotal = 3; if (n === 1) { this.lastChar[0] = buf[buf.length - 1]; } else { this.lastChar[0] = buf[buf.length - 2]; this.lastChar[1] = buf[buf.length - 1]; } return buf.toString("base64", i, buf.length - n); } function base64End(buf) { var r = buf && buf.length ? this.write(buf) : ""; if (this.lastNeed) return r + this.lastChar.toString("base64", 0, 3 - this.lastNeed); return r; } function simpleWrite(buf) { return buf.toString(this.encoding); } function simpleEnd(buf) { return buf && buf.length ? this.write(buf) : ""; } } }); // ../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/end-of-stream.js var require_end_of_stream2 = __commonJS({ "../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports2, module2) { "use strict"; var ERR_STREAM_PREMATURE_CLOSE = require_errors3().codes.ERR_STREAM_PREMATURE_CLOSE; function once(callback) { var called = false; return function() { if (called) return; called = true; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } callback.apply(this, args); }; } function noop() { } function isRequest(stream) { return stream.setHeader && typeof stream.abort === "function"; } function eos(stream, opts, callback) { if (typeof opts === "function") return eos(stream, null, opts); if (!opts) opts = {}; callback = once(callback || noop); var readable = opts.readable || opts.readable !== false && stream.readable; var writable = opts.writable || opts.writable !== false && stream.writable; var onlegacyfinish = function onlegacyfinish2() { if (!stream.writable) onfinish(); }; var writableEnded = stream._writableState && stream._writableState.finished; var onfinish = function onfinish2() { writable = false; writableEnded = true; if (!readable) callback.call(stream); }; var readableEnded = stream._readableState && stream._readableState.endEmitted; var onend = function onend2() { readable = false; readableEnded = true; if (!writable) callback.call(stream); }; var onerror = function onerror2(err) { callback.call(stream, err); }; var onclose = function onclose2() { var err; if (readable && !readableEnded) { if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); return callback.call(stream, err); } if (writable && !writableEnded) { if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); return callback.call(stream, err); } }; var onrequest = function onrequest2() { stream.req.on("finish", onfinish); }; if (isRequest(stream)) { stream.on("complete", onfinish); stream.on("abort", onclose); if (stream.req) onrequest(); else stream.on("request", onrequest); } else if (writable && !stream._writableState) { stream.on("end", onlegacyfinish); stream.on("close", onlegacyfinish); } stream.on("end", onend); stream.on("finish", onfinish); if (opts.error !== false) stream.on("error", onerror); stream.on("close", onclose); return function() { stream.removeListener("complete", onfinish); stream.removeListener("abort", onclose); stream.removeListener("request", onrequest); if (stream.req) stream.req.removeListener("finish", onfinish); stream.removeListener("end", onlegacyfinish); stream.removeListener("close", onlegacyfinish); stream.removeListener("finish", onfinish); stream.removeListener("end", onend); stream.removeListener("error", onerror); stream.removeListener("close", onclose); }; } module2.exports = eos; } }); // ../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/async_iterator.js var require_async_iterator = __commonJS({ "../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/async_iterator.js"(exports2, module2) { "use strict"; var _Object$setPrototypeO; function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var finished = require_end_of_stream2(); var kLastResolve = Symbol("lastResolve"); var kLastReject = Symbol("lastReject"); var kError = Symbol("error"); var kEnded = Symbol("ended"); var kLastPromise = Symbol("lastPromise"); var kHandlePromise = Symbol("handlePromise"); var kStream = Symbol("stream"); function createIterResult(value, done) { return { value, done }; } function readAndResolve(iter) { var resolve = iter[kLastResolve]; if (resolve !== null) { var data = iter[kStream].read(); if (data !== null) { iter[kLastPromise] = null; iter[kLastResolve] = null; iter[kLastReject] = null; resolve(createIterResult(data, false)); } } } function onReadable(iter) { process.nextTick(readAndResolve, iter); } function wrapForNext(lastPromise, iter) { return function(resolve, reject) { lastPromise.then(function() { if (iter[kEnded]) { resolve(createIterResult(void 0, true)); return; } iter[kHandlePromise](resolve, reject); }, reject); }; } var AsyncIteratorPrototype = Object.getPrototypeOf(function() { }); var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = { get stream() { return this[kStream]; }, next: function next() { var _this = this; var error = this[kError]; if (error !== null) { return Promise.reject(error); } if (this[kEnded]) { return Promise.resolve(createIterResult(void 0, true)); } if (this[kStream].destroyed) { return new Promise(function(resolve, reject) { process.nextTick(function() { if (_this[kError]) { reject(_this[kError]); } else { resolve(createIterResult(void 0, true)); } }); }); } var lastPromise = this[kLastPromise]; var promise; if (lastPromise) { promise = new Promise(wrapForNext(lastPromise, this)); } else { var data = this[kStream].read(); if (data !== null) { return Promise.resolve(createIterResult(data, false)); } promise = new Promise(this[kHandlePromise]); } this[kLastPromise] = promise; return promise; } }, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function() { return this; }), _defineProperty(_Object$setPrototypeO, "return", function _return() { var _this2 = this; return new Promise(function(resolve, reject) { _this2[kStream].destroy(null, function(err) { if (err) { reject(err); return; } resolve(createIterResult(void 0, true)); }); }); }), _Object$setPrototypeO), AsyncIteratorPrototype); var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator2(stream) { var _Object$create; var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, { value: stream, writable: true }), _defineProperty(_Object$create, kLastResolve, { value: null, writable: true }), _defineProperty(_Object$create, kLastReject, { value: null, writable: true }), _defineProperty(_Object$create, kError, { value: null, writable: true }), _defineProperty(_Object$create, kEnded, { value: stream._readableState.endEmitted, writable: true }), _defineProperty(_Object$create, kHandlePromise, { value: function value(resolve, reject) { var data = iterator[kStream].read(); if (data) { iterator[kLastPromise] = null; iterator[kLastResolve] = null; iterator[kLastReject] = null; resolve(createIterResult(data, false)); } else { iterator[kLastResolve] = resolve; iterator[kLastReject] = reject; } }, writable: true }), _Object$create)); iterator[kLastPromise] = null; finished(stream, function(err) { if (err && err.code !== "ERR_STREAM_PREMATURE_CLOSE") { var reject = iterator[kLastReject]; if (reject !== null) { iterator[kLastPromise] = null; iterator[kLastResolve] = null; iterator[kLastReject] = null; reject(err); } iterator[kError] = err; return; } var resolve = iterator[kLastResolve]; if (resolve !== null) { iterator[kLastPromise] = null; iterator[kLastResolve] = null; iterator[kLastReject] = null; resolve(createIterResult(void 0, true)); } iterator[kEnded] = true; }); stream.on("readable", onReadable.bind(null, iterator)); return iterator; }; module2.exports = createReadableStreamAsyncIterator; } }); // ../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/from.js var require_from = __commonJS({ "../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/from.js"(exports2, module2) { "use strict"; function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function() { var self = this, args = arguments; return new Promise(function(resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(void 0); }); }; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function(sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function(key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function(key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var ERR_INVALID_ARG_TYPE = require_errors3().codes.ERR_INVALID_ARG_TYPE; function from(Readable, iterable, opts) { var iterator; if (iterable && typeof iterable.next === "function") { iterator = iterable; } else if (iterable && iterable[Symbol.asyncIterator]) iterator = iterable[Symbol.asyncIterator](); else if (iterable && iterable[Symbol.iterator]) iterator = iterable[Symbol.iterator](); else throw new ERR_INVALID_ARG_TYPE("iterable", ["Iterable"], iterable); var readable = new Readable(_objectSpread({ objectMode: true }, opts)); var reading = false; readable._read = function() { if (!reading) { reading = true; next(); } }; function next() { return _next2.apply(this, arguments); } function _next2() { _next2 = _asyncToGenerator(function* () { try { var _ref = yield iterator.next(), value = _ref.value, done = _ref.done; if (done) { readable.push(null); } else if (readable.push(yield value)) { next(); } else { reading = false; } } catch (err) { readable.destroy(err); } }); return _next2.apply(this, arguments); } return readable; } module2.exports = from; } }); // ../../node_modules/winston-transport/node_modules/readable-stream/lib/_stream_readable.js var require_stream_readable = __commonJS({ "../../node_modules/winston-transport/node_modules/readable-stream/lib/_stream_readable.js"(exports2, module2) { "use strict"; module2.exports = Readable; var Duplex; Readable.ReadableState = ReadableState; var EE = require("events").EventEmitter; var EElistenerCount = function EElistenerCount2(emitter, type) { return emitter.listeners(type).length; }; var Stream = require_stream(); var Buffer2 = require("buffer").Buffer; var OurUint8Array = global.Uint8Array || function() { }; function _uint8ArrayToBuffer(chunk) { return Buffer2.from(chunk); } function _isUint8Array(obj) { return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; } var debugUtil = require("util"); var debug; if (debugUtil && debugUtil.debuglog) { debug = debugUtil.debuglog("stream"); } else { debug = function debug2() { }; } var BufferList = require_buffer_list(); var destroyImpl = require_destroy(); var _require = require_state(); var getHighWaterMark = _require.getHighWaterMark; var _require$codes = require_errors3().codes; var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE; var ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF; var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED; var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; var StringDecoder; var createReadableStreamAsyncIterator; var from; require_inherits()(Readable, Stream); var errorOrDestroy = destroyImpl.errorOrDestroy; var kProxyEvents = ["error", "close", "destroy", "pause", "resume"]; function prependListener(emitter, event, fn) { if (typeof emitter.prependListener === "function") return emitter.prependListener(event, fn); if (!emitter._events || !emitter._events[event]) emitter.on(event, fn); else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn); else emitter._events[event] = [fn, emitter._events[event]]; } function ReadableState(options, stream, isDuplex) { Duplex = Duplex || require_stream_duplex(); options = options || {}; if (typeof isDuplex !== "boolean") isDuplex = stream instanceof Duplex; this.objectMode = !!options.objectMode; if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; this.highWaterMark = getHighWaterMark(this, options, "readableHighWaterMark", isDuplex); this.buffer = new BufferList(); this.length = 0; this.pipes = null; this.pipesCount = 0; this.flowing = null; this.ended = false; this.endEmitted = false; this.reading = false; this.sync = true; this.needReadable = false; this.emittedReadable = false; this.readableListening = false; this.resumeScheduled = false; this.paused = true; this.emitClose = options.emitClose !== false; this.autoDestroy = !!options.autoDestroy; this.destroyed = false; this.defaultEncoding = options.defaultEncoding || "utf8"; this.awaitDrain = 0; this.readingMore = false; this.decoder = null; this.encoding = null; if (options.encoding) { if (!StringDecoder) StringDecoder = require_string_decoder().StringDecoder; this.decoder = new StringDecoder(options.encoding); this.encoding = options.encoding; } } function Readable(options) { Duplex = Duplex || require_stream_duplex(); if (!(this instanceof Readable)) return new Readable(options); var isDuplex = this instanceof Duplex; this._readableState = new ReadableState(options, this, isDuplex); this.readable = true; if (options) { if (typeof options.read === "function") this._read = options.read; if (typeof options.destroy === "function") this._destroy = options.destroy; } Stream.call(this); } Object.defineProperty(Readable.prototype, "destroyed", { enumerable: false, get: function get() { if (this._readableState === void 0) { return false; } return this._readableState.destroyed; }, set: function set(value) { if (!this._readableState) { return; } this._readableState.destroyed = value; } }); Readable.prototype.destroy = destroyImpl.destroy; Readable.prototype._undestroy = destroyImpl.undestroy; Readable.prototype._destroy = function(err, cb) { cb(err); }; Readable.prototype.push = function(chunk, encoding) { var state = this._readableState; var skipChunkCheck; if (!state.objectMode) { if (typeof chunk === "string") { encoding = encoding || state.defaultEncoding; if (encoding !== state.encoding) { chunk = Buffer2.from(chunk, encoding); encoding = ""; } skipChunkCheck = true; } } else { skipChunkCheck = true; } return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); }; Readable.prototype.unshift = function(chunk) { return readableAddChunk(this, chunk, null, true, false); }; function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { debug("readableAddChunk", chunk); var state = stream._readableState; if (chunk === null) { state.reading = false; onEofChunk(stream, state); } else { var er; if (!skipChunkCheck) er = chunkInvalid(state, chunk); if (er) { errorOrDestroy(stream, er); } else if (state.objectMode || chunk && chunk.length > 0) { if (typeof chunk !== "string" && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer2.prototype) { chunk = _uint8ArrayToBuffer(chunk); } if (addToFront) { if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT()); else addChunk(stream, state, chunk, true); } else if (state.ended) { errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); } else if (state.destroyed) { return false; } else { state.reading = false; if (state.decoder && !encoding) { chunk = state.decoder.write(chunk); if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false); else maybeReadMore(stream, state); } else { addChunk(stream, state, chunk, false); } } } else if (!addToFront) { state.reading = false; maybeReadMore(stream, state); } } return !state.ended && (state.length < state.highWaterMark || state.length === 0); } function addChunk(stream, state, chunk, addToFront) { if (state.flowing && state.length === 0 && !state.sync) { state.awaitDrain = 0; stream.emit("data", chunk); } else { state.length += state.objectMode ? 1 : chunk.length; if (addToFront) state.buffer.unshift(chunk); else state.buffer.push(chunk); if (state.needReadable) emitReadable(stream); } maybeReadMore(stream, state); } function chunkInvalid(state, chunk) { var er; if (!_isUint8Array(chunk) && typeof chunk !== "string" && chunk !== void 0 && !state.objectMode) { er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer", "Uint8Array"], chunk); } return er; } Readable.prototype.isPaused = function() { return this._readableState.flowing === false; }; Readable.prototype.setEncoding = function(enc) { if (!StringDecoder) StringDecoder = require_string_decoder().StringDecoder; var decoder = new StringDecoder(enc); this._readableState.decoder = decoder; this._readableState.encoding = this._readableState.decoder.encoding; var p = this._readableState.buffer.head; var content = ""; while (p !== null) { content += decoder.write(p.data); p = p.next; } this._readableState.buffer.clear(); if (content !== "") this._readableState.buffer.push(content); this._readableState.length = content.length; return this; }; var MAX_HWM = 1073741824; function computeNewHighWaterMark(n) { if (n >= MAX_HWM) { n = MAX_HWM; } else { n--; n |= n >>> 1; n |= n >>> 2; n |= n >>> 4; n |= n >>> 8; n |= n >>> 16; n++; } return n; } function howMuchToRead(n, state) { if (n <= 0 || state.length === 0 && state.ended) return 0; if (state.objectMode) return 1; if (n !== n) { if (state.flowing && state.length) return state.buffer.head.data.length; else return state.length; } if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); if (n <= state.length) return n; if (!state.ended) { state.needReadable = true; return 0; } return state.length; } Readable.prototype.read = function(n) { debug("read", n); n = parseInt(n, 10); var state = this._readableState; var nOrig = n; if (n !== 0) state.emittedReadable = false; if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { debug("read: emitReadable", state.length, state.ended); if (state.length === 0 && state.ended) endReadable(this); else emitReadable(this); return null; } n = howMuchToRead(n, state); if (n === 0 && state.ended) { if (state.length === 0) endReadable(this); return null; } var doRead = state.needReadable; debug("need readable", doRead); if (state.length === 0 || state.length - n < state.highWaterMark) { doRead = true; debug("length less than watermark", doRead); } if (state.ended || state.reading) { doRead = false; debug("reading or ended", doRead); } else if (doRead) { debug("do read"); state.reading = true; state.sync = true; if (state.length === 0) state.needReadable = true; this._read(state.highWaterMark); state.sync = false; if (!state.reading) n = howMuchToRead(nOrig, state); } var ret; if (n > 0) ret = fromList(n, state); else ret = null; if (ret === null) { state.needReadable = state.length <= state.highWaterMark; n = 0; } else { state.length -= n; state.awaitDrain = 0; } if (state.length === 0) { if (!state.ended) state.needReadable = true; if (nOrig !== n && state.ended) endReadable(this); } if (ret !== null) this.emit("data", ret); return ret; }; function onEofChunk(stream, state) { debug("onEofChunk"); if (state.ended) return; if (state.decoder) { var chunk = state.decoder.end(); if (chunk && chunk.length) { state.buffer.push(chunk); state.length += state.objectMode ? 1 : chunk.length; } } state.ended = true; if (state.sync) { emitReadable(stream); } else { state.needReadable = false; if (!state.emittedReadable) { state.emittedReadable = true; emitReadable_(stream); } } } function emitReadable(stream) { var state = stream._readableState; debug("emitReadable", state.needReadable, state.emittedReadable); state.needReadable = false; if (!state.emittedReadable) { debug("emitReadable", state.flowing); state.emittedReadable = true; process.nextTick(emitReadable_, stream); } } function emitReadable_(stream) { var state = stream._readableState; debug("emitReadable_", state.destroyed, state.length, state.ended); if (!state.destroyed && (state.length || state.ended)) { stream.emit("readable"); state.emittedReadable = false; } state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; flow(stream); } function maybeReadMore(stream, state) { if (!state.readingMore) { state.readingMore = true; process.nextTick(maybeReadMore_, stream, state); } } function maybeReadMore_(stream, state) { while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { var len = state.length; debug("maybeReadMore read 0"); stream.read(0); if (len === state.length) break; } state.readingMore = false; } Readable.prototype._read = function(n) { errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED("_read()")); }; Readable.prototype.pipe = function(dest, pipeOpts) { var src = this; var state = this._readableState; switch (state.pipesCount) { case 0: state.pipes = dest; break; case 1: state.pipes = [state.pipes, dest]; break; default: state.pipes.push(dest); break; } state.pipesCount += 1; debug("pipe count=%d opts=%j", state.pipesCount, pipeOpts); var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; var endFn = doEnd ? onend : unpipe; if (state.endEmitted) process.nextTick(endFn); else src.once("end", endFn); dest.on("unpipe", onunpipe); function onunpipe(readable, unpipeInfo) { debug("onunpipe"); if (readable === src) { if (unpipeInfo && unpipeInfo.hasUnpiped === false) { unpipeInfo.hasUnpiped = true; cleanup(); } } } function onend() { debug("onend"); dest.end(); } var ondrain = pipeOnDrain(src); dest.on("drain", ondrain); var cleanedUp = false; function cleanup() { debug("cleanup"); dest.removeListener("close", onclose); dest.removeListener("finish", onfinish); dest.removeListener("drain", ondrain); dest.removeListener("error", onerror); dest.removeListener("unpipe", onunpipe); src.removeListener("end", onend); src.removeListener("end", unpipe); src.removeListener("data", ondata); cleanedUp = true; if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); } src.on("data", ondata); function ondata(chunk) { debug("ondata"); var ret = dest.write(chunk); debug("dest.write", ret); if (ret === false) { if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { debug("false write response, pause", state.awaitDrain); state.awaitDrain++; } src.pause(); } } function onerror(er) { debug("onerror", er); unpipe(); dest.removeListener("error", onerror); if (EElistenerCount(dest, "error") === 0) errorOrDestroy(dest, er); } prependListener(dest, "error", onerror); function onclose() { dest.removeListener("finish", onfinish); unpipe(); } dest.once("close", onclose); function onfinish() { debug("onfinish"); dest.removeListener("close", onclose); unpipe(); } dest.once("finish", onfinish); function unpipe() { debug("unpipe"); src.unpipe(dest); } dest.emit("pipe", src); if (!state.flowing) { debug("pipe resume"); src.resume(); } return dest; }; function pipeOnDrain(src) { return function pipeOnDrainFunctionResult() { var state = src._readableState; debug("pipeOnDrain", state.awaitDrain); if (state.awaitDrain) state.awaitDrain--; if (state.awaitDrain === 0 && EElistenerCount(src, "data")) { state.flowing = true; flow(src); } }; } Readable.prototype.unpipe = function(dest) { var state = this._readableState; var unpipeInfo = { hasUnpiped: false }; if (state.pipesCount === 0) return this; if (state.pipesCount === 1) { if (dest && dest !== state.pipes) return this; if (!dest) dest = state.pipes; state.pipes = null; state.pipesCount = 0; state.flowing = false; if (dest) dest.emit("unpipe", this, unpipeInfo); return this; } if (!dest) { var dests = state.pipes; var len = state.pipesCount; state.pipes = null; state.pipesCount = 0; state.flowing = false; for (var i = 0; i < len; i++) { dests[i].emit("unpipe", this, { hasUnpiped: false }); } return this; } var index = indexOf(state.pipes, dest); if (index === -1) return this; state.pipes.splice(index, 1); state.pipesCount -= 1; if (state.pipesCount === 1) state.pipes = state.pipes[0]; dest.emit("unpipe", this, unpipeInfo); return this; }; Readable.prototype.on = function(ev, fn) { var res = Stream.prototype.on.call(this, ev, fn); var state = this._readableState; if (ev === "data") { state.readableListening = this.listenerCount("readable") > 0; if (state.flowing !== false) this.resume(); } else if (ev === "readable") { if (!state.endEmitted && !state.readableListening) { state.readableListening = state.needReadable = true; state.flowing = false; state.emittedReadable = false; debug("on readable", state.length, state.reading); if (state.length) { emitReadable(this); } else if (!state.reading) { process.nextTick(nReadingNextTick, this); } } } return res; }; Readable.prototype.addListener = Readable.prototype.on; Readable.prototype.removeListener = function(ev, fn) { var res = Stream.prototype.removeListener.call(this, ev, fn); if (ev === "readable") { process.nextTick(updateReadableListening, this); } return res; }; Readable.prototype.removeAllListeners = function(ev) { var res = Stream.prototype.removeAllListeners.apply(this, arguments); if (ev === "readable" || ev === void 0) { process.nextTick(updateReadableListening, this); } return res; }; function updateReadableListening(self) { var state = self._readableState; state.readableListening = self.listenerCount("readable") > 0; if (state.resumeScheduled && !state.paused) { state.flowing = true; } else if (self.listenerCount("data") > 0) { self.resume(); } } function nReadingNextTick(self) { debug("readable nexttick read 0"); self.read(0); } Readable.prototype.resume = function() { var state = this._readableState; if (!state.flowing) { debug("resume"); state.flowing = !state.readableListening; resume(this, state); } state.paused = false; return this; }; function resume(stream, state) { if (!state.resumeScheduled) { state.resumeScheduled = true; process.nextTick(resume_, stream, state); } } function resume_(stream, state) { debug("resume", state.reading); if (!state.reading) { stream.read(0); } state.resumeScheduled = false; stream.emit("resume"); flow(stream); if (state.flowing && !state.reading) stream.read(0); } Readable.prototype.pause = function() { debug("call pause flowing=%j", this._readableState.flowing); if (this._readableState.flowing !== false) { debug("pause"); this._readableState.flowing = false; this.emit("pause"); } this._readableState.paused = true; return this; }; function flow(stream) { var state = stream._readableState; debug("flow", state.flowing); while (state.flowing && stream.read() !== null) { ; } } Readable.prototype.wrap = function(stream) { var _this = this; var state = this._readableState; var paused = false; stream.on("end", function() { debug("wrapped end"); if (state.decoder && !state.ended) { var chunk = state.decoder.end(); if (chunk && chunk.length) _this.push(chunk); } _this.push(null); }); stream.on("data", function(chunk) { debug("wrapped data"); if (state.decoder) chunk = state.decoder.write(chunk); if (state.objectMode && (chunk === null || chunk === void 0)) return; else if (!state.objectMode && (!chunk || !chunk.length)) return; var ret = _this.push(chunk); if (!ret) { paused = true; stream.pause(); } }); for (var i in stream) { if (this[i] === void 0 && typeof stream[i] === "function") { this[i] = function methodWrap(method) { return function methodWrapReturnFunction() { return stream[method].apply(stream, arguments); }; }(i); } } for (var n = 0; n < kProxyEvents.length; n++) { stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); } this._read = function(n2) { debug("wrapped _read", n2); if (paused) { paused = false; stream.resume(); } }; return this; }; if (typeof Symbol === "function") { Readable.prototype[Symbol.asyncIterator] = function() { if (createReadableStreamAsyncIterator === void 0) { createReadableStreamAsyncIterator = require_async_iterator(); } return createReadableStreamAsyncIterator(this); }; } Object.defineProperty(Readable.prototype, "readableHighWaterMark", { enumerable: false, get: function get() { return this._readableState.highWaterMark; } }); Object.defineProperty(Readable.prototype, "readableBuffer", { enumerable: false, get: function get() { return this._readableState && this._readableState.buffer; } }); Object.defineProperty(Readable.prototype, "readableFlowing", { enumerable: false, get: function get() { return this._readableState.flowing; }, set: function set(state) { if (this._readableState) { this._readableState.flowing = state; } } }); Readable._fromList = fromList; Object.defineProperty(Readable.prototype, "readableLength", { enumerable: false, get: function get() { return this._readableState.length; } }); function fromList(n, state) { if (state.length === 0) return null; var ret; if (state.objectMode) ret = state.buffer.shift(); else if (!n || n >= state.length) { if (state.decoder) ret = state.buffer.join(""); else if (state.buffer.length === 1) ret = state.buffer.first(); else ret = state.buffer.concat(state.length); state.buffer.clear(); } else { ret = state.buffer.consume(n, state.decoder); } return ret; } function endReadable(stream) { var state = stream._readableState; debug("endReadable", state.endEmitted); if (!state.endEmitted) { state.ended = true; process.nextTick(endReadableNT, state, stream); } } function endReadableNT(state, stream) { debug("endReadableNT", state.endEmitted, state.length); if (!state.endEmitted && state.length === 0) { state.endEmitted = true; stream.readable = false; stream.emit("end"); if (state.autoDestroy) { var wState = stream._writableState; if (!wState || wState.autoDestroy && wState.finished) { stream.destroy(); } } } } if (typeof Symbol === "function") { Readable.from = function(iterable, opts) { if (from === void 0) { from = require_from(); } return from(Readable, iterable, opts); }; } function indexOf(xs, x) { for (var i = 0, l = xs.length; i < l; i++) { if (xs[i] === x) return i; } return -1; } } }); // ../../node_modules/winston-transport/node_modules/readable-stream/lib/_stream_duplex.js var require_stream_duplex = __commonJS({ "../../node_modules/winston-transport/node_modules/readable-stream/lib/_stream_duplex.js"(exports2, module2) { "use strict"; var objectKeys = Object.keys || function(obj) { var keys2 = []; for (var key in obj) { keys2.push(key); } return keys2; }; module2.exports = Duplex; var Readable = require_stream_readable(); var Writable = require_stream_writable(); require_inherits()(Duplex, Readable); { keys = objectKeys(Writable.prototype); for (v = 0; v < keys.length; v++) { method = keys[v]; if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; } } var keys; var method; var v; function Duplex(options) { if (!(this instanceof Duplex)) return new Duplex(options); Readable.call(this, options); Writable.call(this, options); this.allowHalfOpen = true; if (options) { if (options.readable === false) this.readable = false; if (options.writable === false) this.writable = false; if (options.allowHalfOpen === false) { this.allowHalfOpen = false; this.once("end", onend); } } } Object.defineProperty(Duplex.prototype, "writableHighWaterMark", { enumerable: false, get: function get() { return this._writableState.highWaterMark; } }); Object.defineProperty(Duplex.prototype, "writableBuffer", { enumerable: false, get: function get() { return this._writableState && this._writableState.getBuffer(); } }); Object.defineProperty(Duplex.prototype, "writableLength", { enumerable: false, get: function get() { return this._writableState.length; } }); function onend() { if (this._writableState.ended) return; process.nextTick(onEndNT, this); } function onEndNT(self) { self.end(); } Object.defineProperty(Duplex.prototype, "destroyed", { enumerable: false, get: function get() { if (this._readableState === void 0 || this._writableState === void 0) { return false; } return this._readableState.destroyed && this._writableState.destroyed; }, set: function set(value) { if (this._readableState === void 0 || this._writableState === void 0) { return; } this._readableState.destroyed = value; this._writableState.destroyed = value; } }); } }); // ../../node_modules/winston-transport/node_modules/readable-stream/lib/_stream_writable.js var require_stream_writable = __commonJS({ "../../node_modules/winston-transport/node_modules/readable-stream/lib/_stream_writable.js"(exports2, module2) { "use strict"; module2.exports = Writable; function CorkedRequest(state) { var _this = this; this.next = null; this.entry = null; this.finish = function() { onCorkedFinish(_this, state); }; } var Duplex; Writable.WritableState = WritableState; var internalUtil = { deprecate: require_node() }; var Stream = require_stream(); var Buffer2 = require("buffer").Buffer; var OurUint8Array = global.Uint8Array || function() { }; function _uint8ArrayToBuffer(chunk) { return Buffer2.from(chunk); } function _isUint8Array(obj) { return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; } var destroyImpl = require_destroy(); var _require = require_state(); var getHighWaterMark = _require.getHighWaterMark; var _require$codes = require_errors3().codes; var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE; var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED; var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK; var ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE; var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; var ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES; var ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END; var ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; var errorOrDestroy = destroyImpl.errorOrDestroy; require_inherits()(Writable, Stream); function nop() { } function WritableState(options, stream, isDuplex) { Duplex = Duplex || require_stream_duplex(); options = options || {}; if (typeof isDuplex !== "boolean") isDuplex = stream instanceof Duplex; this.objectMode = !!options.objectMode; if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; this.highWaterMark = getHighWaterMark(this, options, "writableHighWaterMark", isDuplex); this.finalCalled = false; this.needDrain = false; this.ending = false; this.ended = false; this.finished = false; this.destroyed = false; var noDecode = options.decodeStrings === false; this.decodeStrings = !noDecode; this.defaultEncoding = options.defaultEncoding || "utf8"; this.length = 0; this.writing = false; this.corked = 0; this.sync = true; this.bufferProcessing = false; this.onwrite = function(er) { onwrite(stream, er); }; this.writecb = null; this.writelen = 0; this.bufferedRequest = null; this.lastBufferedRequest = null; this.pendingcb = 0; this.prefinished = false; this.errorEmitted = false; this.emitClose = options.emitClose !== false; this.autoDestroy = !!options.autoDestroy; this.bufferedRequestCount = 0; this.corkedRequestsFree = new CorkedRequest(this); } WritableState.prototype.getBuffer = function getBuffer() { var current = this.bufferedRequest; var out = []; while (current) { out.push(current); current = current.next; } return out; }; (function() { try { Object.defineProperty(WritableState.prototype, "buffer", { get: internalUtil.deprecate(function writableStateBufferGetter() { return this.getBuffer(); }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") }); } catch (_) { } })(); var realHasInstance; if (typeof Symbol === "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === "function") { realHasInstance = Function.prototype[Symbol.hasInstance]; Object.defineProperty(Writable, Symbol.hasInstance, { value: function value(object) { if (realHasInstance.call(this, object)) return true; if (this !== Writable) return false; return object && object._writableState instanceof WritableState; } }); } else { realHasInstance = function realHasInstance2(object) { return object instanceof this; }; } function Writable(options) { Duplex = Duplex || require_stream_duplex(); var isDuplex = this instanceof Duplex; if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options); this._writableState = new WritableState(options, this, isDuplex); this.writable = true; if (options) { if (typeof options.write === "function") this._write = options.write; if (typeof options.writev === "function") this._writev = options.writev; if (typeof options.destroy === "function") this._destroy = options.destroy; if (typeof options.final === "function") this._final = options.final; } Stream.call(this); } Writable.prototype.pipe = function() { errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); }; function writeAfterEnd(stream, cb) { var er = new ERR_STREAM_WRITE_AFTER_END(); errorOrDestroy(stream, er); process.nextTick(cb, er); } function validChunk(stream, state, chunk, cb) { var er; if (chunk === null) { er = new ERR_STREAM_NULL_VALUES(); } else if (typeof chunk !== "string" && !state.objectMode) { er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer"], chunk); } if (er) { errorOrDestroy(stream, er); process.nextTick(cb, er); return false; } return true; } Writable.prototype.write = function(chunk, encoding, cb) { var state = this._writableState; var ret = false; var isBuf = !state.objectMode && _isUint8Array(chunk); if (isBuf && !Buffer2.isBuffer(chunk)) { chunk = _uint8ArrayToBuffer(chunk); } if (typeof encoding === "function") { cb = encoding; encoding = null; } if (isBuf) encoding = "buffer"; else if (!encoding) encoding = state.defaultEncoding; if (typeof cb !== "function") cb = nop; if (state.ending) writeAfterEnd(this, cb); else if (isBuf || validChunk(this, state, chunk, cb)) { state.pendingcb++; ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); } return ret; }; Writable.prototype.cork = function() { this._writableState.corked++; }; Writable.prototype.uncork = function() { var state = this._writableState; if (state.corked) { state.corked--; if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); } }; Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { if (typeof encoding === "string") encoding = encoding.toLowerCase(); if (!(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((encoding + "").toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding); this._writableState.defaultEncoding = encoding; return this; }; Object.defineProperty(Writable.prototype, "writableBuffer", { enumerable: false, get: function get() { return this._writableState && this._writableState.getBuffer(); } }); function decodeChunk(state, chunk, encoding) { if (!state.objectMode && state.decodeStrings !== false && typeof chunk === "string") { chunk = Buffer2.from(chunk, encoding); } return chunk; } Object.defineProperty(Writable.prototype, "writableHighWaterMark", { enumerable: false, get: function get() { return this._writableState.highWaterMark; } }); function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { if (!isBuf) { var newChunk = decodeChunk(state, chunk, encoding); if (chunk !== newChunk) { isBuf = true; encoding = "buffer"; chunk = newChunk; } } var len = state.objectMode ? 1 : chunk.length; state.length += len; var ret = state.length < state.highWaterMark; if (!ret) state.needDrain = true; if (state.writing || state.corked) { var last = state.lastBufferedRequest; state.lastBufferedRequest = { chunk, encoding, isBuf, callback: cb, next: null }; if (last) { last.next = state.lastBufferedRequest; } else { state.bufferedRequest = state.lastBufferedRequest; } state.bufferedRequestCount += 1; } else { doWrite(stream, state, false, len, chunk, encoding, cb); } return ret; } function doWrite(stream, state, writev, len, chunk, encoding, cb) { state.writelen = len; state.writecb = cb; state.writing = true; state.sync = true; if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED("write")); else if (writev) stream._writev(chunk, state.onwrite); else stream._write(chunk, encoding, state.onwrite); state.sync = false; } function onwriteError(stream, state, sync, er, cb) { --state.pendingcb; if (sync) { process.nextTick(cb, er); process.nextTick(finishMaybe, stream, state); stream._writableState.errorEmitted = true; errorOrDestroy(stream, er); } else { cb(er); stream._writableState.errorEmitted = true; errorOrDestroy(stream, er); finishMaybe(stream, state); } } function onwriteStateUpdate(state) { state.writing = false; state.writecb = null; state.length -= state.writelen; state.writelen = 0; } function onwrite(stream, er) { var state = stream._writableState; var sync = state.sync; var cb = state.writecb; if (typeof cb !== "function") throw new ERR_MULTIPLE_CALLBACK(); onwriteStateUpdate(state); if (er) onwriteError(stream, state, sync, er, cb); else { var finished = needFinish(state) || stream.destroyed; if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { clearBuffer(stream, state); } if (sync) { process.nextTick(afterWrite, stream, state, finished, cb); } else { afterWrite(stream, state, finished, cb); } } } function afterWrite(stream, state, finished, cb) { if (!finished) onwriteDrain(stream, state); state.pendingcb--; cb(); finishMaybe(stream, state); } function onwriteDrain(stream, state) { if (state.length === 0 && state.needDrain) { state.needDrain = false; stream.emit("drain"); } } function clearBuffer(stream, state) { state.bufferProcessing = true; var entry = state.bufferedRequest; if (stream._writev && entry && entry.next) { var l = state.bufferedRequestCount; var buffer = new Array(l); var holder = state.corkedRequestsFree; holder.entry = entry; var count = 0; var allBuffers = true; while (entry) { buffer[count] = entry; if (!entry.isBuf) allBuffers = false; entry = entry.next; count += 1; } buffer.allBuffers = allBuffers; doWrite(stream, state, true, state.length, buffer, "", holder.finish); state.pendingcb++; state.lastBufferedRequest = null; if (holder.next) { state.corkedRequestsFree = holder.next; holder.next = null; } else { state.corkedRequestsFree = new CorkedRequest(state); } state.bufferedRequestCount = 0; } else { while (entry) { var chunk = entry.chunk; var encoding = entry.encoding; var cb = entry.callback; var len = state.objectMode ? 1 : chunk.length; doWrite(stream, state, false, len, chunk, encoding, cb); entry = entry.next; state.bufferedRequestCount--; if (state.writing) { break; } } if (entry === null) state.lastBufferedRequest = null; } state.bufferedRequest = entry; state.bufferProcessing = false; } Writable.prototype._write = function(chunk, encoding, cb) { cb(new ERR_METHOD_NOT_IMPLEMENTED("_write()")); }; Writable.prototype._writev = null; Writable.prototype.end = function(chunk, encoding, cb) { var state = this._writableState; if (typeof chunk === "function") { cb = chunk; chunk = null; encoding = null; } else if (typeof encoding === "function") { cb = encoding; encoding = null; } if (chunk !== null && chunk !== void 0) this.write(chunk, encoding); if (state.corked) { state.corked = 1; this.uncork(); } if (!state.ending) endWritable(this, state, cb); return this; }; Object.defineProperty(Writable.prototype, "writableLength", { enumerable: false, get: function get() { return this._writableState.length; } }); function needFinish(state) { return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; } function callFinal(stream, state) { stream._final(function(err) { state.pendingcb--; if (err) { errorOrDestroy(stream, err); } state.prefinished = true; stream.emit("prefinish"); finishMaybe(stream, state); }); } function prefinish(stream, state) { if (!state.prefinished && !state.finalCalled) { if (typeof stream._final === "function" && !state.destroyed) { state.pendingcb++; state.finalCalled = true; process.nextTick(callFinal, stream, state); } else { state.prefinished = true; stream.emit("prefinish"); } } } function finishMaybe(stream, state) { var need = needFinish(state); if (need) { prefinish(stream, state); if (state.pendingcb === 0) { state.finished = true; stream.emit("finish"); if (state.autoDestroy) { var rState = stream._readableState; if (!rState || rState.autoDestroy && rState.endEmitted) { stream.destroy(); } } } } return need; } function endWritable(stream, state, cb) { state.ending = true; finishMaybe(stream, state); if (cb) { if (state.finished) process.nextTick(cb); else stream.once("finish", cb); } state.ended = true; stream.writable = false; } function onCorkedFinish(corkReq, state, err) { var entry = corkReq.entry; corkReq.entry = null; while (entry) { var cb = entry.callback; state.pendingcb--; cb(err); entry = entry.next; } state.corkedRequestsFree.next = corkReq; } Object.defineProperty(Writable.prototype, "destroyed", { enumerable: false, get: function get() { if (this._writableState === void 0) { return false; } return this._writableState.destroyed; }, set: function set(value) { if (!this._writableState) { return; } this._writableState.destroyed = value; } }); Writable.prototype.destroy = destroyImpl.destroy; Writable.prototype._undestroy = destroyImpl.undestroy; Writable.prototype._destroy = function(err, cb) { cb(err); }; } }); // ../../node_modules/winston-transport/legacy.js var require_legacy = __commonJS({ "../../node_modules/winston-transport/legacy.js"(exports2, module2) { "use strict"; var util = require("util"); var { LEVEL } = require_triple_beam(); var TransportStream = require_winston_transport(); var LegacyTransportStream = module2.exports = function LegacyTransportStream2(options = {}) { TransportStream.call(this, options); if (!options.transport || typeof options.transport.log !== "function") { throw new Error("Invalid transport, must be an object with a log method."); } this.transport = options.transport; this.level = this.level || options.transport.level; this.handleExceptions = this.handleExceptions || options.transport.handleExceptions; this._deprecated(); function transportError(err) { this.emit("error", err, this.transport); } if (!this.transport.__winstonError) { this.transport.__winstonError = transportError.bind(this); this.transport.on("error", this.transport.__winstonError); } }; util.inherits(LegacyTransportStream, TransportStream); LegacyTransportStream.prototype._write = function _write(info, enc, callback) { if (this.silent || info.exception === true && !this.handleExceptions) { return callback(null); } if (!this.level || this.levels[this.level] >= this.levels[info[LEVEL]]) { this.transport.log(info[LEVEL], info.message, info, this._nop); } callback(null); }; LegacyTransportStream.prototype._writev = function _writev(chunks, callback) { for (let i = 0; i < chunks.length; i++) { if (this._accept(chunks[i])) { this.transport.log(chunks[i].chunk[LEVEL], chunks[i].chunk.message, chunks[i].chunk, this._nop); chunks[i].callback(); } } return callback(null); }; LegacyTransportStream.prototype._deprecated = function _deprecated() { console.error([ `${this.transport.name} is a legacy winston transport. Consider upgrading: `, "- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md" ].join("\n")); }; LegacyTransportStream.prototype.close = function close() { if (this.transport.close) { this.transport.close(); } if (this.transport.__winstonError) { this.transport.removeListener("error", this.transport.__winstonError); this.transport.__winstonError = null; } }; } }); // ../../node_modules/winston-transport/index.js var require_winston_transport = __commonJS({ "../../node_modules/winston-transport/index.js"(exports2, module2) { "use strict"; var util = require("util"); var Writable = require_stream_writable(); var { LEVEL } = require_triple_beam(); var TransportStream = module2.exports = function TransportStream2(options = {}) { Writable.call(this, { objectMode: true, highWaterMark: options.highWaterMark }); this.format = options.format; this.level = options.level; this.handleExceptions = options.handleExceptions; this.handleRejections = options.handleRejections; this.silent = options.silent; if (options.log) this.log = options.log; if (options.logv) this.logv = options.logv; if (options.close) this.close = options.close; this.once("pipe", (logger) => { this.levels = logger.levels; this.parent = logger; }); this.once("unpipe", (src) => { if (src === this.parent) { this.parent = null; if (this.close) { this.close(); } } }); }; util.inherits(TransportStream, Writable); TransportStream.prototype._write = function _write(info, enc, callback) { if (this.silent || info.exception === true && !this.handleExceptions) { return callback(null); } const level = this.level || this.parent && this.parent.level; if (!level || this.levels[level] >= this.levels[info[LEVEL]]) { if (info && !this.format) { return this.log(info, callback); } let errState; let transformed; try { transformed = this.format.transform(Object.assign({}, info), this.format.options); } catch (err) { errState = err; } if (errState || !transformed) { callback(); if (errState) throw errState; return; } return this.log(transformed, callback); } this._writableState.sync = false; return callback(null); }; TransportStream.prototype._writev = function _writev(chunks, callback) { if (this.logv) { const infos = chunks.filter(this._accept, this); if (!infos.length) { return callback(null); } return this.logv(infos, callback); } for (let i = 0; i < chunks.length; i++) { if (!this._accept(chunks[i])) continue; if (chunks[i].chunk && !this.format) { this.log(chunks[i].chunk, chunks[i].callback); continue; } let errState; let transformed; try { transformed = this.format.transform(Object.assign({}, chunks[i].chunk), this.format.options); } catch (err) { errState = err; } if (errState || !transformed) { chunks[i].callback(); if (errState) { callback(null); throw errState; } } else { this.log(transformed, chunks[i].callback); } } return callback(null); }; TransportStream.prototype._accept = function _accept(write) { const info = write.chunk; if (this.silent) { return false; } const level = this.level || this.parent && this.parent.level; if (info.exception === true || !level || this.levels[level] >= this.levels[info[LEVEL]]) { if (this.handleExceptions || info.exception !== true) { return true; } } return false; }; TransportStream.prototype._nop = function _nop() { return void 0; }; module2.exports.LegacyTransportStream = require_legacy(); } }); // ../../node_modules/winston/lib/winston/transports/console.js var require_console = __commonJS({ "../../node_modules/winston/lib/winston/transports/console.js"(exports2, module2) { "use strict"; var os = require("os"); var { LEVEL, MESSAGE } = require_triple_beam(); var TransportStream = require_winston_transport(); module2.exports = class Console extends TransportStream { constructor(options = {}) { super(options); this.name = options.name || "console"; this.stderrLevels = this._stringArrayToSet(options.stderrLevels); this.consoleWarnLevels = this._stringArrayToSet(options.consoleWarnLevels); this.eol = typeof options.eol === "string" ? options.eol : os.EOL; this.setMaxListeners(30); } log(info, callback) { setImmediate(() => this.emit("logged", info)); if (this.stderrLevels[info[LEVEL]]) { if (console._stderr) { console._stderr.write(`${info[MESSAGE]}${this.eol}`); } else { console.error(info[MESSAGE]); } if (callback) { callback(); } return; } else if (this.consoleWarnLevels[info[LEVEL]]) { if (console._stderr) { console._stderr.write(`${info[MESSAGE]}${this.eol}`); } else { console.warn(info[MESSAGE]); } if (callback) { callback(); } return; } if (console._stdout) { console._stdout.write(`${info[MESSAGE]}${this.eol}`); } else { console.log(info[MESSAGE]); } if (callback) { callback(); } } _stringArrayToSet(strArray, errMsg) { if (!strArray) return {}; errMsg = errMsg || "Cannot make set from type other than Array of string elements"; if (!Array.isArray(strArray)) { throw new Error(errMsg); } return strArray.reduce((set, el) => { if (typeof el !== "string") { throw new Error(errMsg); } set[el] = true; return set; }, {}); } }; } }); // ../../node_modules/async/internal/isArrayLike.js var require_isArrayLike = __commonJS({ "../../node_modules/async/internal/isArrayLike.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isArrayLike; function isArrayLike(value) { return value && typeof value.length === "number" && value.length >= 0 && value.length % 1 === 0; } module2.exports = exports2["default"]; } }); // ../../node_modules/async/internal/initialParams.js var require_initialParams = __commonJS({ "../../node_modules/async/internal/initialParams.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = function(fn) { return function(...args) { var callback = args.pop(); return fn.call(this, args, callback); }; }; module2.exports = exports2["default"]; } }); // ../../node_modules/async/internal/setImmediate.js var require_setImmediate = __commonJS({ "../../node_modules/async/internal/setImmediate.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.fallback = fallback; exports2.wrap = wrap; var hasQueueMicrotask = exports2.hasQueueMicrotask = typeof queueMicrotask === "function" && queueMicrotask; var hasSetImmediate = exports2.hasSetImmediate = typeof setImmediate === "function" && setImmediate; var hasNextTick = exports2.hasNextTick = typeof process === "object" && typeof process.nextTick === "function"; function fallback(fn) { setTimeout(fn, 0); } function wrap(defer) { return (fn, ...args) => defer(() => fn(...args)); } var _defer; if (hasQueueMicrotask) { _defer = queueMicrotask; } else if (hasSetImmediate) { _defer = setImmediate; } else if (hasNextTick) { _defer = process.nextTick; } else { _defer = fallback; } exports2.default = wrap(_defer); } }); // ../../node_modules/async/asyncify.js var require_asyncify = __commonJS({ "../../node_modules/async/asyncify.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = asyncify; var _initialParams = require_initialParams(); var _initialParams2 = _interopRequireDefault(_initialParams); var _setImmediate = require_setImmediate(); var _setImmediate2 = _interopRequireDefault(_setImmediate); var _wrapAsync = require_wrapAsync(); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function asyncify(func) { if ((0, _wrapAsync.isAsync)(func)) { return function(...args) { const callback = args.pop(); const promise = func.apply(this, args); return handlePromise(promise, callback); }; } return (0, _initialParams2.default)(function(args, callback) { var result; try { result = func.apply(this, args); } catch (e) { return callback(e); } if (result && typeof result.then === "function") { return handlePromise(result, callback); } else { callback(null, result); } }); } function handlePromise(promise, callback) { return promise.then((value) => { invokeCallback(callback, null, value); }, (err) => { invokeCallback(callback, err && err.message ? err : new Error(err)); }); } function invokeCallback(callback, error, value) { try { callback(error, value); } catch (err) { (0, _setImmediate2.default)((e) => { throw e; }, err); } } module2.exports = exports2["default"]; } }); // ../../node_modules/async/internal/wrapAsync.js var require_wrapAsync = __commonJS({ "../../node_modules/async/internal/wrapAsync.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isAsyncIterable = exports2.isAsyncGenerator = exports2.isAsync = void 0; var _asyncify = require_asyncify(); var _asyncify2 = _interopRequireDefault(_asyncify); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function isAsync(fn) { return fn[Symbol.toStringTag] === "AsyncFunction"; } function isAsyncGenerator(fn) { return fn[Symbol.toStringTag] === "AsyncGenerator"; } function isAsyncIterable(obj) { return typeof obj[Symbol.asyncIterator] === "function"; } function wrapAsync(asyncFn) { if (typeof asyncFn !== "function") throw new Error("expected a function"); return isAsync(asyncFn) ? (0, _asyncify2.default)(asyncFn) : asyncFn; } exports2.default = wrapAsync; exports2.isAsync = isAsync; exports2.isAsyncGenerator = isAsyncGenerator; exports2.isAsyncIterable = isAsyncIterable; } }); // ../../node_modules/async/internal/awaitify.js var require_awaitify = __commonJS({ "../../node_modules/async/internal/awaitify.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = awaitify; function awaitify(asyncFn, arity = asyncFn.length) { if (!arity) throw new Error("arity is undefined"); function awaitable(...args) { if (typeof args[arity - 1] === "function") { return asyncFn.apply(this, args); } return new Promise((resolve, reject) => { args[arity - 1] = (err, ...cbArgs) => { if (err) return reject(err); resolve(cbArgs.length > 1 ? cbArgs : cbArgs[0]); }; asyncFn.apply(this, args); }); } return awaitable; } module2.exports = exports2["default"]; } }); // ../../node_modules/async/internal/parallel.js var require_parallel = __commonJS({ "../../node_modules/async/internal/parallel.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var _isArrayLike = require_isArrayLike(); var _isArrayLike2 = _interopRequireDefault(_isArrayLike); var _wrapAsync = require_wrapAsync(); var _wrapAsync2 = _interopRequireDefault(_wrapAsync); var _awaitify = require_awaitify(); var _awaitify2 = _interopRequireDefault(_awaitify); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports2.default = (0, _awaitify2.default)((eachfn, tasks, callback) => { var results = (0, _isArrayLike2.default)(tasks) ? [] : {}; eachfn(tasks, (task, key, taskCb) => { (0, _wrapAsync2.default)(task)((err, ...result) => { if (result.length < 2) { [result] = result; } results[key] = result; taskCb(err); }); }, (err) => callback(err, results)); }, 3); module2.exports = exports2["default"]; } }); // ../../node_modules/async/internal/once.js var require_once2 = __commonJS({ "../../node_modules/async/internal/once.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = once; function once(fn) { function wrapper(...args) { if (fn === null) return; var callFn = fn; fn = null; callFn.apply(this, args); } Object.assign(wrapper, fn); return wrapper; } module2.exports = exports2["default"]; } }); // ../../node_modules/async/internal/getIterator.js var require_getIterator = __commonJS({ "../../node_modules/async/internal/getIterator.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = function(coll) { return coll[Symbol.iterator] && coll[Symbol.iterator](); }; module2.exports = exports2["default"]; } }); // ../../node_modules/async/internal/iterator.js var require_iterator2 = __commonJS({ "../../node_modules/async/internal/iterator.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = createIterator; var _isArrayLike = require_isArrayLike(); var _isArrayLike2 = _interopRequireDefault(_isArrayLike); var _getIterator = require_getIterator(); var _getIterator2 = _interopRequireDefault(_getIterator); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function createArrayIterator(coll) { var i = -1; var len = coll.length; return function next() { return ++i < len ? { value: coll[i], key: i } : null; }; } function createES2015Iterator(iterator) { var i = -1; return function next() { var item = iterator.next(); if (item.done) return null; i++; return { value: item.value, key: i }; }; } function createObjectIterator(obj) { var okeys = obj ? Object.keys(obj) : []; var i = -1; var len = okeys.length; return function next() { var key = okeys[++i]; if (key === "__proto__") { return next(); } return i < len ? { value: obj[key], key } : null; }; } function createIterator(coll) { if ((0, _isArrayLike2.default)(coll)) { return createArrayIterator(coll); } var iterator = (0, _getIterator2.default)(coll); return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll); } module2.exports = exports2["default"]; } }); // ../../node_modules/async/internal/onlyOnce.js var require_onlyOnce = __commonJS({ "../../node_modules/async/internal/onlyOnce.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = onlyOnce; function onlyOnce(fn) { return function(...args) { if (fn === null) throw new Error("Callback was already called."); var callFn = fn; fn = null; callFn.apply(this, args); }; } module2.exports = exports2["default"]; } }); // ../../node_modules/async/internal/breakLoop.js var require_breakLoop = __commonJS({ "../../node_modules/async/internal/breakLoop.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var breakLoop = {}; exports2.default = breakLoop; module2.exports = exports2["default"]; } }); // ../../node_modules/async/internal/asyncEachOfLimit.js var require_asyncEachOfLimit = __commonJS({ "../../node_modules/async/internal/asyncEachOfLimit.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = asyncEachOfLimit; var _breakLoop = require_breakLoop(); var _breakLoop2 = _interopRequireDefault(_breakLoop); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function asyncEachOfLimit(generator, limit, iteratee, callback) { let done = false; let canceled = false; let awaiting = false; let running = 0; let idx = 0; function replenish() { if (running >= limit || awaiting || done) return; awaiting = true; generator.next().then(({ value, done: iterDone }) => { if (canceled || done) return; awaiting = false; if (iterDone) { done = true; if (running <= 0) { callback(null); } return; } running++; iteratee(value, idx, iterateeCallback); idx++; replenish(); }).catch(handleError); } function iterateeCallback(err, result) { running -= 1; if (canceled) return; if (err) return handleError(err); if (err === false) { done = true; canceled = true; return; } if (result === _breakLoop2.default || done && running <= 0) { done = true; return callback(null); } replenish(); } function handleError(err) { if (canceled) return; awaiting = false; done = true; callback(err); } replenish(); } module2.exports = exports2["default"]; } }); // ../../node_modules/async/internal/eachOfLimit.js var require_eachOfLimit = __commonJS({ "../../node_modules/async/internal/eachOfLimit.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var _once = require_once2(); var _once2 = _interopRequireDefault(_once); var _iterator = require_iterator2(); var _iterator2 = _interopRequireDefault(_iterator); var _onlyOnce = require_onlyOnce(); var _onlyOnce2 = _interopRequireDefault(_onlyOnce); var _wrapAsync = require_wrapAsync(); var _asyncEachOfLimit = require_asyncEachOfLimit(); var _asyncEachOfLimit2 = _interopRequireDefault(_asyncEachOfLimit); var _breakLoop = require_breakLoop(); var _breakLoop2 = _interopRequireDefault(_breakLoop); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports2.default = (limit) => { return (obj, iteratee, callback) => { callback = (0, _once2.default)(callback); if (limit <= 0) { throw new RangeError("concurrency limit cannot be less than 1"); } if (!obj) { return callback(null); } if ((0, _wrapAsync.isAsyncGenerator)(obj)) { return (0, _asyncEachOfLimit2.default)(obj, limit, iteratee, callback); } if ((0, _wrapAsync.isAsyncIterable)(obj)) { return (0, _asyncEachOfLimit2.default)(obj[Symbol.asyncIterator](), limit, iteratee, callback); } var nextElem = (0, _iterator2.default)(obj); var done = false; var canceled = false; var running = 0; var looping = false; function iterateeCallback(err, value) { if (canceled) return; running -= 1; if (err) { done = true; callback(err); } else if (err === false) { done = true; canceled = true; } else if (value === _breakLoop2.default || done && running <= 0) { done = true; return callback(null); } else if (!looping) { replenish(); } } function replenish() { looping = true; while (running < limit && !done) { var elem = nextElem(); if (elem === null) { done = true; if (running <= 0) { callback(null); } return; } running += 1; iteratee(elem.value, elem.key, (0, _onlyOnce2.default)(iterateeCallback)); } looping = false; } replenish(); }; }; module2.exports = exports2["default"]; } }); // ../../node_modules/async/eachOfLimit.js var require_eachOfLimit2 = __commonJS({ "../../node_modules/async/eachOfLimit.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var _eachOfLimit2 = require_eachOfLimit(); var _eachOfLimit3 = _interopRequireDefault(_eachOfLimit2); var _wrapAsync = require_wrapAsync(); var _wrapAsync2 = _interopRequireDefault(_wrapAsync); var _awaitify = require_awaitify(); var _awaitify2 = _interopRequireDefault(_awaitify); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function eachOfLimit(coll, limit, iteratee, callback) { return (0, _eachOfLimit3.default)(limit)(coll, (0, _wrapAsync2.default)(iteratee), callback); } exports2.default = (0, _awaitify2.default)(eachOfLimit, 4); module2.exports = exports2["default"]; } }); // ../../node_modules/async/eachOfSeries.js var require_eachOfSeries = __commonJS({ "../../node_modules/async/eachOfSeries.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var _eachOfLimit = require_eachOfLimit2(); var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); var _awaitify = require_awaitify(); var _awaitify2 = _interopRequireDefault(_awaitify); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function eachOfSeries(coll, iteratee, callback) { return (0, _eachOfLimit2.default)(coll, 1, iteratee, callback); } exports2.default = (0, _awaitify2.default)(eachOfSeries, 3); module2.exports = exports2["default"]; } }); // ../../node_modules/async/series.js var require_series = __commonJS({ "../../node_modules/async/series.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = series; var _parallel2 = require_parallel(); var _parallel3 = _interopRequireDefault(_parallel2); var _eachOfSeries = require_eachOfSeries(); var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function series(tasks, callback) { return (0, _parallel3.default)(_eachOfSeries2.default, tasks, callback); } module2.exports = exports2["default"]; } }); // ../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/stream.js var require_stream2 = __commonJS({ "../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/stream.js"(exports2, module2) { module2.exports = require("stream"); } }); // ../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/buffer_list.js var require_buffer_list2 = __commonJS({ "../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/buffer_list.js"(exports2, module2) { "use strict"; function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function(sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function(key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function(key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } var _require = require("buffer"); var Buffer2 = _require.Buffer; var _require2 = require("util"); var inspect = _require2.inspect; var custom = inspect && inspect.custom || "inspect"; function copyBuffer(src, target, offset) { Buffer2.prototype.copy.call(src, target, offset); } module2.exports = /* @__PURE__ */ function() { function BufferList() { _classCallCheck(this, BufferList); this.head = null; this.tail = null; this.length = 0; } _createClass(BufferList, [{ key: "push", value: function push(v) { var entry = { data: v, next: null }; if (this.length > 0) this.tail.next = entry; else this.head = entry; this.tail = entry; ++this.length; } }, { key: "unshift", value: function unshift(v) { var entry = { data: v, next: this.head }; if (this.length === 0) this.tail = entry; this.head = entry; ++this.length; } }, { key: "shift", value: function shift() { if (this.length === 0) return; var ret = this.head.data; if (this.length === 1) this.head = this.tail = null; else this.head = this.head.next; --this.length; return ret; } }, { key: "clear", value: function clear() { this.head = this.tail = null; this.length = 0; } }, { key: "join", value: function join(s) { if (this.length === 0) return ""; var p = this.head; var ret = "" + p.data; while (p = p.next) { ret += s + p.data; } return ret; } }, { key: "concat", value: function concat(n) { if (this.length === 0) return Buffer2.alloc(0); var ret = Buffer2.allocUnsafe(n >>> 0); var p = this.head; var i = 0; while (p) { copyBuffer(p.data, ret, i); i += p.data.length; p = p.next; } return ret; } }, { key: "consume", value: function consume(n, hasStrings) { var ret; if (n < this.head.data.length) { ret = this.head.data.slice(0, n); this.head.data = this.head.data.slice(n); } else if (n === this.head.data.length) { ret = this.shift(); } else { ret = hasStrings ? this._getString(n) : this._getBuffer(n); } return ret; } }, { key: "first", value: function first() { return this.head.data; } }, { key: "_getString", value: function _getString(n) { var p = this.head; var c = 1; var ret = p.data; n -= ret.length; while (p = p.next) { var str = p.data; var nb = n > str.length ? str.length : n; if (nb === str.length) ret += str; else ret += str.slice(0, n); n -= nb; if (n === 0) { if (nb === str.length) { ++c; if (p.next) this.head = p.next; else this.head = this.tail = null; } else { this.head = p; p.data = str.slice(nb); } break; } ++c; } this.length -= c; return ret; } }, { key: "_getBuffer", value: function _getBuffer(n) { var ret = Buffer2.allocUnsafe(n); var p = this.head; var c = 1; p.data.copy(ret); n -= p.data.length; while (p = p.next) { var buf = p.data; var nb = n > buf.length ? buf.length : n; buf.copy(ret, ret.length - n, 0, nb); n -= nb; if (n === 0) { if (nb === buf.length) { ++c; if (p.next) this.head = p.next; else this.head = this.tail = null; } else { this.head = p; p.data = buf.slice(nb); } break; } ++c; } this.length -= c; return ret; } }, { key: custom, value: function value(_, options) { return inspect(this, _objectSpread({}, options, { depth: 0, customInspect: false })); } }]); return BufferList; }(); } }); // ../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/destroy.js var require_destroy2 = __commonJS({ "../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/destroy.js"(exports2, module2) { "use strict"; function destroy(err, cb) { var _this = this; var readableDestroyed = this._readableState && this._readableState.destroyed; var writableDestroyed = this._writableState && this._writableState.destroyed; if (readableDestroyed || writableDestroyed) { if (cb) { cb(err); } else if (err) { if (!this._writableState) { process.nextTick(emitErrorNT, this, err); } else if (!this._writableState.errorEmitted) { this._writableState.errorEmitted = true; process.nextTick(emitErrorNT, this, err); } } return this; } if (this._readableState) { this._readableState.destroyed = true; } if (this._writableState) { this._writableState.destroyed = true; } this._destroy(err || null, function(err2) { if (!cb && err2) { if (!_this._writableState) { process.nextTick(emitErrorAndCloseNT, _this, err2); } else if (!_this._writableState.errorEmitted) { _this._writableState.errorEmitted = true; process.nextTick(emitErrorAndCloseNT, _this, err2); } else { process.nextTick(emitCloseNT, _this); } } else if (cb) { process.nextTick(emitCloseNT, _this); cb(err2); } else { process.nextTick(emitCloseNT, _this); } }); return this; } function emitErrorAndCloseNT(self, err) { emitErrorNT(self, err); emitCloseNT(self); } function emitCloseNT(self) { if (self._writableState && !self._writableState.emitClose) return; if (self._readableState && !self._readableState.emitClose) return; self.emit("close"); } function undestroy() { if (this._readableState) { this._readableState.destroyed = false; this._readableState.reading = false; this._readableState.ended = false; this._readableState.endEmitted = false; } if (this._writableState) { this._writableState.destroyed = false; this._writableState.ended = false; this._writableState.ending = false; this._writableState.finalCalled = false; this._writableState.prefinished = false; this._writableState.finished = false; this._writableState.errorEmitted = false; } } function emitErrorNT(self, err) { self.emit("error", err); } function errorOrDestroy(stream, err) { var rState = stream._readableState; var wState = stream._writableState; if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err); else stream.emit("error", err); } module2.exports = { destroy, undestroy, errorOrDestroy }; } }); // ../../node_modules/winston/node_modules/readable-stream/errors.js var require_errors4 = __commonJS({ "../../node_modules/winston/node_modules/readable-stream/errors.js"(exports2, module2) { "use strict"; var codes = {}; function createErrorType(code, message, Base) { if (!Base) { Base = Error; } function getMessage(arg1, arg2, arg3) { if (typeof message === "string") { return message; } else { return message(arg1, arg2, arg3); } } class NodeError extends Base { constructor(arg1, arg2, arg3) { super(getMessage(arg1, arg2, arg3)); } } NodeError.prototype.name = Base.name; NodeError.prototype.code = code; codes[code] = NodeError; } function oneOf(expected, thing) { if (Array.isArray(expected)) { const len = expected.length; expected = expected.map((i) => String(i)); if (len > 2) { return `one of ${thing} ${expected.slice(0, len - 1).join(", ")}, or ` + expected[len - 1]; } else if (len === 2) { return `one of ${thing} ${expected[0]} or ${expected[1]}`; } else { return `of ${thing} ${expected[0]}`; } } else { return `of ${thing} ${String(expected)}`; } } function startsWith(str, search, pos) { return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; } function endsWith(str, search, this_len) { if (this_len === void 0 || this_len > str.length) { this_len = str.length; } return str.substring(this_len - search.length, this_len) === search; } function includes(str, search, start) { if (typeof start !== "number") { start = 0; } if (start + search.length > str.length) { return false; } else { return str.indexOf(search, start) !== -1; } } createErrorType("ERR_INVALID_OPT_VALUE", function(name, value) { return 'The value "' + value + '" is invalid for option "' + name + '"'; }, TypeError); createErrorType("ERR_INVALID_ARG_TYPE", function(name, expected, actual) { let determiner; if (typeof expected === "string" && startsWith(expected, "not ")) { determiner = "must not be"; expected = expected.replace(/^not /, ""); } else { determiner = "must be"; } let msg; if (endsWith(name, " argument")) { msg = `The ${name} ${determiner} ${oneOf(expected, "type")}`; } else { const type = includes(name, ".") ? "property" : "argument"; msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, "type")}`; } msg += `. Received type ${typeof actual}`; return msg; }, TypeError); createErrorType("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"); createErrorType("ERR_METHOD_NOT_IMPLEMENTED", function(name) { return "The " + name + " method is not implemented"; }); createErrorType("ERR_STREAM_PREMATURE_CLOSE", "Premature close"); createErrorType("ERR_STREAM_DESTROYED", function(name) { return "Cannot call " + name + " after a stream was destroyed"; }); createErrorType("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"); createErrorType("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"); createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end"); createErrorType("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError); createErrorType("ERR_UNKNOWN_ENCODING", function(arg) { return "Unknown encoding: " + arg; }, TypeError); createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"); module2.exports.codes = codes; } }); // ../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/state.js var require_state2 = __commonJS({ "../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/state.js"(exports2, module2) { "use strict"; var ERR_INVALID_OPT_VALUE = require_errors4().codes.ERR_INVALID_OPT_VALUE; function highWaterMarkFrom(options, isDuplex, duplexKey) { return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; } function getHighWaterMark(state, options, duplexKey, isDuplex) { var hwm = highWaterMarkFrom(options, isDuplex, duplexKey); if (hwm != null) { if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) { var name = isDuplex ? duplexKey : "highWaterMark"; throw new ERR_INVALID_OPT_VALUE(name, hwm); } return Math.floor(hwm); } return state.objectMode ? 16 : 16 * 1024; } module2.exports = { getHighWaterMark }; } }); // ../../node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js var require_stream_writable2 = __commonJS({ "../../node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js"(exports2, module2) { "use strict"; module2.exports = Writable; function CorkedRequest(state) { var _this = this; this.next = null; this.entry = null; this.finish = function() { onCorkedFinish(_this, state); }; } var Duplex; Writable.WritableState = WritableState; var internalUtil = { deprecate: require_node() }; var Stream = require_stream2(); var Buffer2 = require("buffer").Buffer; var OurUint8Array = global.Uint8Array || function() { }; function _uint8ArrayToBuffer(chunk) { return Buffer2.from(chunk); } function _isUint8Array(obj) { return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; } var destroyImpl = require_destroy2(); var _require = require_state2(); var getHighWaterMark = _require.getHighWaterMark; var _require$codes = require_errors4().codes; var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE; var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED; var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK; var ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE; var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; var ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES; var ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END; var ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; var errorOrDestroy = destroyImpl.errorOrDestroy; require_inherits()(Writable, Stream); function nop() { } function WritableState(options, stream, isDuplex) { Duplex = Duplex || require_stream_duplex2(); options = options || {}; if (typeof isDuplex !== "boolean") isDuplex = stream instanceof Duplex; this.objectMode = !!options.objectMode; if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; this.highWaterMark = getHighWaterMark(this, options, "writableHighWaterMark", isDuplex); this.finalCalled = false; this.needDrain = false; this.ending = false; this.ended = false; this.finished = false; this.destroyed = false; var noDecode = options.decodeStrings === false; this.decodeStrings = !noDecode; this.defaultEncoding = options.defaultEncoding || "utf8"; this.length = 0; this.writing = false; this.corked = 0; this.sync = true; this.bufferProcessing = false; this.onwrite = function(er) { onwrite(stream, er); }; this.writecb = null; this.writelen = 0; this.bufferedRequest = null; this.lastBufferedRequest = null; this.pendingcb = 0; this.prefinished = false; this.errorEmitted = false; this.emitClose = options.emitClose !== false; this.autoDestroy = !!options.autoDestroy; this.bufferedRequestCount = 0; this.corkedRequestsFree = new CorkedRequest(this); } WritableState.prototype.getBuffer = function getBuffer() { var current = this.bufferedRequest; var out = []; while (current) { out.push(current); current = current.next; } return out; }; (function() { try { Object.defineProperty(WritableState.prototype, "buffer", { get: internalUtil.deprecate(function writableStateBufferGetter() { return this.getBuffer(); }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") }); } catch (_) { } })(); var realHasInstance; if (typeof Symbol === "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === "function") { realHasInstance = Function.prototype[Symbol.hasInstance]; Object.defineProperty(Writable, Symbol.hasInstance, { value: function value(object) { if (realHasInstance.call(this, object)) return true; if (this !== Writable) return false; return object && object._writableState instanceof WritableState; } }); } else { realHasInstance = function realHasInstance2(object) { return object instanceof this; }; } function Writable(options) { Duplex = Duplex || require_stream_duplex2(); var isDuplex = this instanceof Duplex; if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options); this._writableState = new WritableState(options, this, isDuplex); this.writable = true; if (options) { if (typeof options.write === "function") this._write = options.write; if (typeof options.writev === "function") this._writev = options.writev; if (typeof options.destroy === "function") this._destroy = options.destroy; if (typeof options.final === "function") this._final = options.final; } Stream.call(this); } Writable.prototype.pipe = function() { errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); }; function writeAfterEnd(stream, cb) { var er = new ERR_STREAM_WRITE_AFTER_END(); errorOrDestroy(stream, er); process.nextTick(cb, er); } function validChunk(stream, state, chunk, cb) { var er; if (chunk === null) { er = new ERR_STREAM_NULL_VALUES(); } else if (typeof chunk !== "string" && !state.objectMode) { er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer"], chunk); } if (er) { errorOrDestroy(stream, er); process.nextTick(cb, er); return false; } return true; } Writable.prototype.write = function(chunk, encoding, cb) { var state = this._writableState; var ret = false; var isBuf = !state.objectMode && _isUint8Array(chunk); if (isBuf && !Buffer2.isBuffer(chunk)) { chunk = _uint8ArrayToBuffer(chunk); } if (typeof encoding === "function") { cb = encoding; encoding = null; } if (isBuf) encoding = "buffer"; else if (!encoding) encoding = state.defaultEncoding; if (typeof cb !== "function") cb = nop; if (state.ending) writeAfterEnd(this, cb); else if (isBuf || validChunk(this, state, chunk, cb)) { state.pendingcb++; ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); } return ret; }; Writable.prototype.cork = function() { this._writableState.corked++; }; Writable.prototype.uncork = function() { var state = this._writableState; if (state.corked) { state.corked--; if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); } }; Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { if (typeof encoding === "string") encoding = encoding.toLowerCase(); if (!(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((encoding + "").toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding); this._writableState.defaultEncoding = encoding; return this; }; Object.defineProperty(Writable.prototype, "writableBuffer", { enumerable: false, get: function get() { return this._writableState && this._writableState.getBuffer(); } }); function decodeChunk(state, chunk, encoding) { if (!state.objectMode && state.decodeStrings !== false && typeof chunk === "string") { chunk = Buffer2.from(chunk, encoding); } return chunk; } Object.defineProperty(Writable.prototype, "writableHighWaterMark", { enumerable: false, get: function get() { return this._writableState.highWaterMark; } }); function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { if (!isBuf) { var newChunk = decodeChunk(state, chunk, encoding); if (chunk !== newChunk) { isBuf = true; encoding = "buffer"; chunk = newChunk; } } var len = state.objectMode ? 1 : chunk.length; state.length += len; var ret = state.length < state.highWaterMark; if (!ret) state.needDrain = true; if (state.writing || state.corked) { var last = state.lastBufferedRequest; state.lastBufferedRequest = { chunk, encoding, isBuf, callback: cb, next: null }; if (last) { last.next = state.lastBufferedRequest; } else { state.bufferedRequest = state.lastBufferedRequest; } state.bufferedRequestCount += 1; } else { doWrite(stream, state, false, len, chunk, encoding, cb); } return ret; } function doWrite(stream, state, writev, len, chunk, encoding, cb) { state.writelen = len; state.writecb = cb; state.writing = true; state.sync = true; if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED("write")); else if (writev) stream._writev(chunk, state.onwrite); else stream._write(chunk, encoding, state.onwrite); state.sync = false; } function onwriteError(stream, state, sync, er, cb) { --state.pendingcb; if (sync) { process.nextTick(cb, er); process.nextTick(finishMaybe, stream, state); stream._writableState.errorEmitted = true; errorOrDestroy(stream, er); } else { cb(er); stream._writableState.errorEmitted = true; errorOrDestroy(stream, er); finishMaybe(stream, state); } } function onwriteStateUpdate(state) { state.writing = false; state.writecb = null; state.length -= state.writelen; state.writelen = 0; } function onwrite(stream, er) { var state = stream._writableState; var sync = state.sync; var cb = state.writecb; if (typeof cb !== "function") throw new ERR_MULTIPLE_CALLBACK(); onwriteStateUpdate(state); if (er) onwriteError(stream, state, sync, er, cb); else { var finished = needFinish(state) || stream.destroyed; if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { clearBuffer(stream, state); } if (sync) { process.nextTick(afterWrite, stream, state, finished, cb); } else { afterWrite(stream, state, finished, cb); } } } function afterWrite(stream, state, finished, cb) { if (!finished) onwriteDrain(stream, state); state.pendingcb--; cb(); finishMaybe(stream, state); } function onwriteDrain(stream, state) { if (state.length === 0 && state.needDrain) { state.needDrain = false; stream.emit("drain"); } } function clearBuffer(stream, state) { state.bufferProcessing = true; var entry = state.bufferedRequest; if (stream._writev && entry && entry.next) { var l = state.bufferedRequestCount; var buffer = new Array(l); var holder = state.corkedRequestsFree; holder.entry = entry; var count = 0; var allBuffers = true; while (entry) { buffer[count] = entry; if (!entry.isBuf) allBuffers = false; entry = entry.next; count += 1; } buffer.allBuffers = allBuffers; doWrite(stream, state, true, state.length, buffer, "", holder.finish); state.pendingcb++; state.lastBufferedRequest = null; if (holder.next) { state.corkedRequestsFree = holder.next; holder.next = null; } else { state.corkedRequestsFree = new CorkedRequest(state); } state.bufferedRequestCount = 0; } else { while (entry) { var chunk = entry.chunk; var encoding = entry.encoding; var cb = entry.callback; var len = state.objectMode ? 1 : chunk.length; doWrite(stream, state, false, len, chunk, encoding, cb); entry = entry.next; state.bufferedRequestCount--; if (state.writing) { break; } } if (entry === null) state.lastBufferedRequest = null; } state.bufferedRequest = entry; state.bufferProcessing = false; } Writable.prototype._write = function(chunk, encoding, cb) { cb(new ERR_METHOD_NOT_IMPLEMENTED("_write()")); }; Writable.prototype._writev = null; Writable.prototype.end = function(chunk, encoding, cb) { var state = this._writableState; if (typeof chunk === "function") { cb = chunk; chunk = null; encoding = null; } else if (typeof encoding === "function") { cb = encoding; encoding = null; } if (chunk !== null && chunk !== void 0) this.write(chunk, encoding); if (state.corked) { state.corked = 1; this.uncork(); } if (!state.ending) endWritable(this, state, cb); return this; }; Object.defineProperty(Writable.prototype, "writableLength", { enumerable: false, get: function get() { return this._writableState.length; } }); function needFinish(state) { return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; } function callFinal(stream, state) { stream._final(function(err) { state.pendingcb--; if (err) { errorOrDestroy(stream, err); } state.prefinished = true; stream.emit("prefinish"); finishMaybe(stream, state); }); } function prefinish(stream, state) { if (!state.prefinished && !state.finalCalled) { if (typeof stream._final === "function" && !state.destroyed) { state.pendingcb++; state.finalCalled = true; process.nextTick(callFinal, stream, state); } else { state.prefinished = true; stream.emit("prefinish"); } } } function finishMaybe(stream, state) { var need = needFinish(state); if (need) { prefinish(stream, state); if (state.pendingcb === 0) { state.finished = true; stream.emit("finish"); if (state.autoDestroy) { var rState = stream._readableState; if (!rState || rState.autoDestroy && rState.endEmitted) { stream.destroy(); } } } } return need; } function endWritable(stream, state, cb) { state.ending = true; finishMaybe(stream, state); if (cb) { if (state.finished) process.nextTick(cb); else stream.once("finish", cb); } state.ended = true; stream.writable = false; } function onCorkedFinish(corkReq, state, err) { var entry = corkReq.entry; corkReq.entry = null; while (entry) { var cb = entry.callback; state.pendingcb--; cb(err); entry = entry.next; } state.corkedRequestsFree.next = corkReq; } Object.defineProperty(Writable.prototype, "destroyed", { enumerable: false, get: function get() { if (this._writableState === void 0) { return false; } return this._writableState.destroyed; }, set: function set(value) { if (!this._writableState) { return; } this._writableState.destroyed = value; } }); Writable.prototype.destroy = destroyImpl.destroy; Writable.prototype._undestroy = destroyImpl.undestroy; Writable.prototype._destroy = function(err, cb) { cb(err); }; } }); // ../../node_modules/winston/node_modules/readable-stream/lib/_stream_duplex.js var require_stream_duplex2 = __commonJS({ "../../node_modules/winston/node_modules/readable-stream/lib/_stream_duplex.js"(exports2, module2) { "use strict"; var objectKeys = Object.keys || function(obj) { var keys2 = []; for (var key in obj) { keys2.push(key); } return keys2; }; module2.exports = Duplex; var Readable = require_stream_readable2(); var Writable = require_stream_writable2(); require_inherits()(Duplex, Readable); { keys = objectKeys(Writable.prototype); for (v = 0; v < keys.length; v++) { method = keys[v]; if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; } } var keys; var method; var v; function Duplex(options) { if (!(this instanceof Duplex)) return new Duplex(options); Readable.call(this, options); Writable.call(this, options); this.allowHalfOpen = true; if (options) { if (options.readable === false) this.readable = false; if (options.writable === false) this.writable = false; if (options.allowHalfOpen === false) { this.allowHalfOpen = false; this.once("end", onend); } } } Object.defineProperty(Duplex.prototype, "writableHighWaterMark", { enumerable: false, get: function get() { return this._writableState.highWaterMark; } }); Object.defineProperty(Duplex.prototype, "writableBuffer", { enumerable: false, get: function get() { return this._writableState && this._writableState.getBuffer(); } }); Object.defineProperty(Duplex.prototype, "writableLength", { enumerable: false, get: function get() { return this._writableState.length; } }); function onend() { if (this._writableState.ended) return; process.nextTick(onEndNT, this); } function onEndNT(self) { self.end(); } Object.defineProperty(Duplex.prototype, "destroyed", { enumerable: false, get: function get() { if (this._readableState === void 0 || this._writableState === void 0) { return false; } return this._readableState.destroyed && this._writableState.destroyed; }, set: function set(value) { if (this._readableState === void 0 || this._writableState === void 0) { return; } this._readableState.destroyed = value; this._writableState.destroyed = value; } }); } }); // ../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/end-of-stream.js var require_end_of_stream3 = __commonJS({ "../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports2, module2) { "use strict"; var ERR_STREAM_PREMATURE_CLOSE = require_errors4().codes.ERR_STREAM_PREMATURE_CLOSE; function once(callback) { var called = false; return function() { if (called) return; called = true; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } callback.apply(this, args); }; } function noop() { } function isRequest(stream) { return stream.setHeader && typeof stream.abort === "function"; } function eos(stream, opts, callback) { if (typeof opts === "function") return eos(stream, null, opts); if (!opts) opts = {}; callback = once(callback || noop); var readable = opts.readable || opts.readable !== false && stream.readable; var writable = opts.writable || opts.writable !== false && stream.writable; var onlegacyfinish = function onlegacyfinish2() { if (!stream.writable) onfinish(); }; var writableEnded = stream._writableState && stream._writableState.finished; var onfinish = function onfinish2() { writable = false; writableEnded = true; if (!readable) callback.call(stream); }; var readableEnded = stream._readableState && stream._readableState.endEmitted; var onend = function onend2() { readable = false; readableEnded = true; if (!writable) callback.call(stream); }; var onerror = function onerror2(err) { callback.call(stream, err); }; var onclose = function onclose2() { var err; if (readable && !readableEnded) { if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); return callback.call(stream, err); } if (writable && !writableEnded) { if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); return callback.call(stream, err); } }; var onrequest = function onrequest2() { stream.req.on("finish", onfinish); }; if (isRequest(stream)) { stream.on("complete", onfinish); stream.on("abort", onclose); if (stream.req) onrequest(); else stream.on("request", onrequest); } else if (writable && !stream._writableState) { stream.on("end", onlegacyfinish); stream.on("close", onlegacyfinish); } stream.on("end", onend); stream.on("finish", onfinish); if (opts.error !== false) stream.on("error", onerror); stream.on("close", onclose); return function() { stream.removeListener("complete", onfinish); stream.removeListener("abort", onclose); stream.removeListener("request", onrequest); if (stream.req) stream.req.removeListener("finish", onfinish); stream.removeListener("end", onlegacyfinish); stream.removeListener("close", onlegacyfinish); stream.removeListener("finish", onfinish); stream.removeListener("end", onend); stream.removeListener("error", onerror); stream.removeListener("close", onclose); }; } module2.exports = eos; } }); // ../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/async_iterator.js var require_async_iterator2 = __commonJS({ "../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/async_iterator.js"(exports2, module2) { "use strict"; var _Object$setPrototypeO; function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var finished = require_end_of_stream3(); var kLastResolve = Symbol("lastResolve"); var kLastReject = Symbol("lastReject"); var kError = Symbol("error"); var kEnded = Symbol("ended"); var kLastPromise = Symbol("lastPromise"); var kHandlePromise = Symbol("handlePromise"); var kStream = Symbol("stream"); function createIterResult(value, done) { return { value, done }; } function readAndResolve(iter) { var resolve = iter[kLastResolve]; if (resolve !== null) { var data = iter[kStream].read(); if (data !== null) { iter[kLastPromise] = null; iter[kLastResolve] = null; iter[kLastReject] = null; resolve(createIterResult(data, false)); } } } function onReadable(iter) { process.nextTick(readAndResolve, iter); } function wrapForNext(lastPromise, iter) { return function(resolve, reject) { lastPromise.then(function() { if (iter[kEnded]) { resolve(createIterResult(void 0, true)); return; } iter[kHandlePromise](resolve, reject); }, reject); }; } var AsyncIteratorPrototype = Object.getPrototypeOf(function() { }); var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = { get stream() { return this[kStream]; }, next: function next() { var _this = this; var error = this[kError]; if (error !== null) { return Promise.reject(error); } if (this[kEnded]) { return Promise.resolve(createIterResult(void 0, true)); } if (this[kStream].destroyed) { return new Promise(function(resolve, reject) { process.nextTick(function() { if (_this[kError]) { reject(_this[kError]); } else { resolve(createIterResult(void 0, true)); } }); }); } var lastPromise = this[kLastPromise]; var promise; if (lastPromise) { promise = new Promise(wrapForNext(lastPromise, this)); } else { var data = this[kStream].read(); if (data !== null) { return Promise.resolve(createIterResult(data, false)); } promise = new Promise(this[kHandlePromise]); } this[kLastPromise] = promise; return promise; } }, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function() { return this; }), _defineProperty(_Object$setPrototypeO, "return", function _return() { var _this2 = this; return new Promise(function(resolve, reject) { _this2[kStream].destroy(null, function(err) { if (err) { reject(err); return; } resolve(createIterResult(void 0, true)); }); }); }), _Object$setPrototypeO), AsyncIteratorPrototype); var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator2(stream) { var _Object$create; var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, { value: stream, writable: true }), _defineProperty(_Object$create, kLastResolve, { value: null, writable: true }), _defineProperty(_Object$create, kLastReject, { value: null, writable: true }), _defineProperty(_Object$create, kError, { value: null, writable: true }), _defineProperty(_Object$create, kEnded, { value: stream._readableState.endEmitted, writable: true }), _defineProperty(_Object$create, kHandlePromise, { value: function value(resolve, reject) { var data = iterator[kStream].read(); if (data) { iterator[kLastPromise] = null; iterator[kLastResolve] = null; iterator[kLastReject] = null; resolve(createIterResult(data, false)); } else { iterator[kLastResolve] = resolve; iterator[kLastReject] = reject; } }, writable: true }), _Object$create)); iterator[kLastPromise] = null; finished(stream, function(err) { if (err && err.code !== "ERR_STREAM_PREMATURE_CLOSE") { var reject = iterator[kLastReject]; if (reject !== null) { iterator[kLastPromise] = null; iterator[kLastResolve] = null; iterator[kLastReject] = null; reject(err); } iterator[kError] = err; return; } var resolve = iterator[kLastResolve]; if (resolve !== null) { iterator[kLastPromise] = null; iterator[kLastResolve] = null; iterator[kLastReject] = null; resolve(createIterResult(void 0, true)); } iterator[kEnded] = true; }); stream.on("readable", onReadable.bind(null, iterator)); return iterator; }; module2.exports = createReadableStreamAsyncIterator; } }); // ../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/from.js var require_from2 = __commonJS({ "../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/from.js"(exports2, module2) { "use strict"; function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function() { var self = this, args = arguments; return new Promise(function(resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(void 0); }); }; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function(sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function(key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function(key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var ERR_INVALID_ARG_TYPE = require_errors4().codes.ERR_INVALID_ARG_TYPE; function from(Readable, iterable, opts) { var iterator; if (iterable && typeof iterable.next === "function") { iterator = iterable; } else if (iterable && iterable[Symbol.asyncIterator]) iterator = iterable[Symbol.asyncIterator](); else if (iterable && iterable[Symbol.iterator]) iterator = iterable[Symbol.iterator](); else throw new ERR_INVALID_ARG_TYPE("iterable", ["Iterable"], iterable); var readable = new Readable(_objectSpread({ objectMode: true }, opts)); var reading = false; readable._read = function() { if (!reading) { reading = true; next(); } }; function next() { return _next2.apply(this, arguments); } function _next2() { _next2 = _asyncToGenerator(function* () { try { var _ref = yield iterator.next(), value = _ref.value, done = _ref.done; if (done) { readable.push(null); } else if (readable.push(yield value)) { next(); } else { reading = false; } } catch (err) { readable.destroy(err); } }); return _next2.apply(this, arguments); } return readable; } module2.exports = from; } }); // ../../node_modules/winston/node_modules/readable-stream/lib/_stream_readable.js var require_stream_readable2 = __commonJS({ "../../node_modules/winston/node_modules/readable-stream/lib/_stream_readable.js"(exports2, module2) { "use strict"; module2.exports = Readable; var Duplex; Readable.ReadableState = ReadableState; var EE = require("events").EventEmitter; var EElistenerCount = function EElistenerCount2(emitter, type) { return emitter.listeners(type).length; }; var Stream = require_stream2(); var Buffer2 = require("buffer").Buffer; var OurUint8Array = global.Uint8Array || function() { }; function _uint8ArrayToBuffer(chunk) { return Buffer2.from(chunk); } function _isUint8Array(obj) { return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; } var debugUtil = require("util"); var debug; if (debugUtil && debugUtil.debuglog) { debug = debugUtil.debuglog("stream"); } else { debug = function debug2() { }; } var BufferList = require_buffer_list2(); var destroyImpl = require_destroy2(); var _require = require_state2(); var getHighWaterMark = _require.getHighWaterMark; var _require$codes = require_errors4().codes; var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE; var ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF; var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED; var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; var StringDecoder; var createReadableStreamAsyncIterator; var from; require_inherits()(Readable, Stream); var errorOrDestroy = destroyImpl.errorOrDestroy; var kProxyEvents = ["error", "close", "destroy", "pause", "resume"]; function prependListener(emitter, event, fn) { if (typeof emitter.prependListener === "function") return emitter.prependListener(event, fn); if (!emitter._events || !emitter._events[event]) emitter.on(event, fn); else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn); else emitter._events[event] = [fn, emitter._events[event]]; } function ReadableState(options, stream, isDuplex) { Duplex = Duplex || require_stream_duplex2(); options = options || {}; if (typeof isDuplex !== "boolean") isDuplex = stream instanceof Duplex; this.objectMode = !!options.objectMode; if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; this.highWaterMark = getHighWaterMark(this, options, "readableHighWaterMark", isDuplex); this.buffer = new BufferList(); this.length = 0; this.pipes = null; this.pipesCount = 0; this.flowing = null; this.ended = false; this.endEmitted = false; this.reading = false; this.sync = true; this.needReadable = false; this.emittedReadable = false; this.readableListening = false; this.resumeScheduled = false; this.paused = true; this.emitClose = options.emitClose !== false; this.autoDestroy = !!options.autoDestroy; this.destroyed = false; this.defaultEncoding = options.defaultEncoding || "utf8"; this.awaitDrain = 0; this.readingMore = false; this.decoder = null; this.encoding = null; if (options.encoding) { if (!StringDecoder) StringDecoder = require_string_decoder().StringDecoder; this.decoder = new StringDecoder(options.encoding); this.encoding = options.encoding; } } function Readable(options) { Duplex = Duplex || require_stream_duplex2(); if (!(this instanceof Readable)) return new Readable(options); var isDuplex = this instanceof Duplex; this._readableState = new ReadableState(options, this, isDuplex); this.readable = true; if (options) { if (typeof options.read === "function") this._read = options.read; if (typeof options.destroy === "function") this._destroy = options.destroy; } Stream.call(this); } Object.defineProperty(Readable.prototype, "destroyed", { enumerable: false, get: function get() { if (this._readableState === void 0) { return false; } return this._readableState.destroyed; }, set: function set(value) { if (!this._readableState) { return; } this._readableState.destroyed = value; } }); Readable.prototype.destroy = destroyImpl.destroy; Readable.prototype._undestroy = destroyImpl.undestroy; Readable.prototype._destroy = function(err, cb) { cb(err); }; Readable.prototype.push = function(chunk, encoding) { var state = this._readableState; var skipChunkCheck; if (!state.objectMode) { if (typeof chunk === "string") { encoding = encoding || state.defaultEncoding; if (encoding !== state.encoding) { chunk = Buffer2.from(chunk, encoding); encoding = ""; } skipChunkCheck = true; } } else { skipChunkCheck = true; } return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); }; Readable.prototype.unshift = function(chunk) { return readableAddChunk(this, chunk, null, true, false); }; function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { debug("readableAddChunk", chunk); var state = stream._readableState; if (chunk === null) { state.reading = false; onEofChunk(stream, state); } else { var er; if (!skipChunkCheck) er = chunkInvalid(state, chunk); if (er) { errorOrDestroy(stream, er); } else if (state.objectMode || chunk && chunk.length > 0) { if (typeof chunk !== "string" && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer2.prototype) { chunk = _uint8ArrayToBuffer(chunk); } if (addToFront) { if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT()); else addChunk(stream, state, chunk, true); } else if (state.ended) { errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); } else if (state.destroyed) { return false; } else { state.reading = false; if (state.decoder && !encoding) { chunk = state.decoder.write(chunk); if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false); else maybeReadMore(stream, state); } else { addChunk(stream, state, chunk, false); } } } else if (!addToFront) { state.reading = false; maybeReadMore(stream, state); } } return !state.ended && (state.length < state.highWaterMark || state.length === 0); } function addChunk(stream, state, chunk, addToFront) { if (state.flowing && state.length === 0 && !state.sync) { state.awaitDrain = 0; stream.emit("data", chunk); } else { state.length += state.objectMode ? 1 : chunk.length; if (addToFront) state.buffer.unshift(chunk); else state.buffer.push(chunk); if (state.needReadable) emitReadable(stream); } maybeReadMore(stream, state); } function chunkInvalid(state, chunk) { var er; if (!_isUint8Array(chunk) && typeof chunk !== "string" && chunk !== void 0 && !state.objectMode) { er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer", "Uint8Array"], chunk); } return er; } Readable.prototype.isPaused = function() { return this._readableState.flowing === false; }; Readable.prototype.setEncoding = function(enc) { if (!StringDecoder) StringDecoder = require_string_decoder().StringDecoder; var decoder = new StringDecoder(enc); this._readableState.decoder = decoder; this._readableState.encoding = this._readableState.decoder.encoding; var p = this._readableState.buffer.head; var content = ""; while (p !== null) { content += decoder.write(p.data); p = p.next; } this._readableState.buffer.clear(); if (content !== "") this._readableState.buffer.push(content); this._readableState.length = content.length; return this; }; var MAX_HWM = 1073741824; function computeNewHighWaterMark(n) { if (n >= MAX_HWM) { n = MAX_HWM; } else { n--; n |= n >>> 1; n |= n >>> 2; n |= n >>> 4; n |= n >>> 8; n |= n >>> 16; n++; } return n; } function howMuchToRead(n, state) { if (n <= 0 || state.length === 0 && state.ended) return 0; if (state.objectMode) return 1; if (n !== n) { if (state.flowing && state.length) return state.buffer.head.data.length; else return state.length; } if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); if (n <= state.length) return n; if (!state.ended) { state.needReadable = true; return 0; } return state.length; } Readable.prototype.read = function(n) { debug("read", n); n = parseInt(n, 10); var state = this._readableState; var nOrig = n; if (n !== 0) state.emittedReadable = false; if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { debug("read: emitReadable", state.length, state.ended); if (state.length === 0 && state.ended) endReadable(this); else emitReadable(this); return null; } n = howMuchToRead(n, state); if (n === 0 && state.ended) { if (state.length === 0) endReadable(this); return null; } var doRead = state.needReadable; debug("need readable", doRead); if (state.length === 0 || state.length - n < state.highWaterMark) { doRead = true; debug("length less than watermark", doRead); } if (state.ended || state.reading) { doRead = false; debug("reading or ended", doRead); } else if (doRead) { debug("do read"); state.reading = true; state.sync = true; if (state.length === 0) state.needReadable = true; this._read(state.highWaterMark); state.sync = false; if (!state.reading) n = howMuchToRead(nOrig, state); } var ret; if (n > 0) ret = fromList(n, state); else ret = null; if (ret === null) { state.needReadable = state.length <= state.highWaterMark; n = 0; } else { state.length -= n; state.awaitDrain = 0; } if (state.length === 0) { if (!state.ended) state.needReadable = true; if (nOrig !== n && state.ended) endReadable(this); } if (ret !== null) this.emit("data", ret); return ret; }; function onEofChunk(stream, state) { debug("onEofChunk"); if (state.ended) return; if (state.decoder) { var chunk = state.decoder.end(); if (chunk && chunk.length) { state.buffer.push(chunk); state.length += state.objectMode ? 1 : chunk.length; } } state.ended = true; if (state.sync) { emitReadable(stream); } else { state.needReadable = false; if (!state.emittedReadable) { state.emittedReadable = true; emitReadable_(stream); } } } function emitReadable(stream) { var state = stream._readableState; debug("emitReadable", state.needReadable, state.emittedReadable); state.needReadable = false; if (!state.emittedReadable) { debug("emitReadable", state.flowing); state.emittedReadable = true; process.nextTick(emitReadable_, stream); } } function emitReadable_(stream) { var state = stream._readableState; debug("emitReadable_", state.destroyed, state.length, state.ended); if (!state.destroyed && (state.length || state.ended)) { stream.emit("readable"); state.emittedReadable = false; } state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; flow(stream); } function maybeReadMore(stream, state) { if (!state.readingMore) { state.readingMore = true; process.nextTick(maybeReadMore_, stream, state); } } function maybeReadMore_(stream, state) { while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { var len = state.length; debug("maybeReadMore read 0"); stream.read(0); if (len === state.length) break; } state.readingMore = false; } Readable.prototype._read = function(n) { errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED("_read()")); }; Readable.prototype.pipe = function(dest, pipeOpts) { var src = this; var state = this._readableState; switch (state.pipesCount) { case 0: state.pipes = dest; break; case 1: state.pipes = [state.pipes, dest]; break; default: state.pipes.push(dest); break; } state.pipesCount += 1; debug("pipe count=%d opts=%j", state.pipesCount, pipeOpts); var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; var endFn = doEnd ? onend : unpipe; if (state.endEmitted) process.nextTick(endFn); else src.once("end", endFn); dest.on("unpipe", onunpipe); function onunpipe(readable, unpipeInfo) { debug("onunpipe"); if (readable === src) { if (unpipeInfo && unpipeInfo.hasUnpiped === false) { unpipeInfo.hasUnpiped = true; cleanup(); } } } function onend() { debug("onend"); dest.end(); } var ondrain = pipeOnDrain(src); dest.on("drain", ondrain); var cleanedUp = false; function cleanup() { debug("cleanup"); dest.removeListener("close", onclose); dest.removeListener("finish", onfinish); dest.removeListener("drain", ondrain); dest.removeListener("error", onerror); dest.removeListener("unpipe", onunpipe); src.removeListener("end", onend); src.removeListener("end", unpipe); src.removeListener("data", ondata); cleanedUp = true; if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); } src.on("data", ondata); function ondata(chunk) { debug("ondata"); var ret = dest.write(chunk); debug("dest.write", ret); if (ret === false) { if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { debug("false write response, pause", state.awaitDrain); state.awaitDrain++; } src.pause(); } } function onerror(er) { debug("onerror", er); unpipe(); dest.removeListener("error", onerror); if (EElistenerCount(dest, "error") === 0) errorOrDestroy(dest, er); } prependListener(dest, "error", onerror); function onclose() { dest.removeListener("finish", onfinish); unpipe(); } dest.once("close", onclose); function onfinish() { debug("onfinish"); dest.removeListener("close", onclose); unpipe(); } dest.once("finish", onfinish); function unpipe() { debug("unpipe"); src.unpipe(dest); } dest.emit("pipe", src); if (!state.flowing) { debug("pipe resume"); src.resume(); } return dest; }; function pipeOnDrain(src) { return function pipeOnDrainFunctionResult() { var state = src._readableState; debug("pipeOnDrain", state.awaitDrain); if (state.awaitDrain) state.awaitDrain--; if (state.awaitDrain === 0 && EElistenerCount(src, "data")) { state.flowing = true; flow(src); } }; } Readable.prototype.unpipe = function(dest) { var state = this._readableState; var unpipeInfo = { hasUnpiped: false }; if (state.pipesCount === 0) return this; if (state.pipesCount === 1) { if (dest && dest !== state.pipes) return this; if (!dest) dest = state.pipes; state.pipes = null; state.pipesCount = 0; state.flowing = false; if (dest) dest.emit("unpipe", this, unpipeInfo); return this; } if (!dest) { var dests = state.pipes; var len = state.pipesCount; state.pipes = null; state.pipesCount = 0; state.flowing = false; for (var i = 0; i < len; i++) { dests[i].emit("unpipe", this, { hasUnpiped: false }); } return this; } var index = indexOf(state.pipes, dest); if (index === -1) return this; state.pipes.splice(index, 1); state.pipesCount -= 1; if (state.pipesCount === 1) state.pipes = state.pipes[0]; dest.emit("unpipe", this, unpipeInfo); return this; }; Readable.prototype.on = function(ev, fn) { var res = Stream.prototype.on.call(this, ev, fn); var state = this._readableState; if (ev === "data") { state.readableListening = this.listenerCount("readable") > 0; if (state.flowing !== false) this.resume(); } else if (ev === "readable") { if (!state.endEmitted && !state.readableListening) { state.readableListening = state.needReadable = true; state.flowing = false; state.emittedReadable = false; debug("on readable", state.length, state.reading); if (state.length) { emitReadable(this); } else if (!state.reading) { process.nextTick(nReadingNextTick, this); } } } return res; }; Readable.prototype.addListener = Readable.prototype.on; Readable.prototype.removeListener = function(ev, fn) { var res = Stream.prototype.removeListener.call(this, ev, fn); if (ev === "readable") { process.nextTick(updateReadableListening, this); } return res; }; Readable.prototype.removeAllListeners = function(ev) { var res = Stream.prototype.removeAllListeners.apply(this, arguments); if (ev === "readable" || ev === void 0) { process.nextTick(updateReadableListening, this); } return res; }; function updateReadableListening(self) { var state = self._readableState; state.readableListening = self.listenerCount("readable") > 0; if (state.resumeScheduled && !state.paused) { state.flowing = true; } else if (self.listenerCount("data") > 0) { self.resume(); } } function nReadingNextTick(self) { debug("readable nexttick read 0"); self.read(0); } Readable.prototype.resume = function() { var state = this._readableState; if (!state.flowing) { debug("resume"); state.flowing = !state.readableListening; resume(this, state); } state.paused = false; return this; }; function resume(stream, state) { if (!state.resumeScheduled) { state.resumeScheduled = true; process.nextTick(resume_, stream, state); } } function resume_(stream, state) { debug("resume", state.reading); if (!state.reading) { stream.read(0); } state.resumeScheduled = false; stream.emit("resume"); flow(stream); if (state.flowing && !state.reading) stream.read(0); } Readable.prototype.pause = function() { debug("call pause flowing=%j", this._readableState.flowing); if (this._readableState.flowing !== false) { debug("pause"); this._readableState.flowing = false; this.emit("pause"); } this._readableState.paused = true; return this; }; function flow(stream) { var state = stream._readableState; debug("flow", state.flowing); while (state.flowing && stream.read() !== null) { ; } } Readable.prototype.wrap = function(stream) { var _this = this; var state = this._readableState; var paused = false; stream.on("end", function() { debug("wrapped end"); if (state.decoder && !state.ended) { var chunk = state.decoder.end(); if (chunk && chunk.length) _this.push(chunk); } _this.push(null); }); stream.on("data", function(chunk) { debug("wrapped data"); if (state.decoder) chunk = state.decoder.write(chunk); if (state.objectMode && (chunk === null || chunk === void 0)) return; else if (!state.objectMode && (!chunk || !chunk.length)) return; var ret = _this.push(chunk); if (!ret) { paused = true; stream.pause(); } }); for (var i in stream) { if (this[i] === void 0 && typeof stream[i] === "function") { this[i] = function methodWrap(method) { return function methodWrapReturnFunction() { return stream[method].apply(stream, arguments); }; }(i); } } for (var n = 0; n < kProxyEvents.length; n++) { stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); } this._read = function(n2) { debug("wrapped _read", n2); if (paused) { paused = false; stream.resume(); } }; return this; }; if (typeof Symbol === "function") { Readable.prototype[Symbol.asyncIterator] = function() { if (createReadableStreamAsyncIterator === void 0) { createReadableStreamAsyncIterator = require_async_iterator2(); } return createReadableStreamAsyncIterator(this); }; } Object.defineProperty(Readable.prototype, "readableHighWaterMark", { enumerable: false, get: function get() { return this._readableState.highWaterMark; } }); Object.defineProperty(Readable.prototype, "readableBuffer", { enumerable: false, get: function get() { return this._readableState && this._readableState.buffer; } }); Object.defineProperty(Readable.prototype, "readableFlowing", { enumerable: false, get: function get() { return this._readableState.flowing; }, set: function set(state) { if (this._readableState) { this._readableState.flowing = state; } } }); Readable._fromList = fromList; Object.defineProperty(Readable.prototype, "readableLength", { enumerable: false, get: function get() { return this._readableState.length; } }); function fromList(n, state) { if (state.length === 0) return null; var ret; if (state.objectMode) ret = state.buffer.shift(); else if (!n || n >= state.length) { if (state.decoder) ret = state.buffer.join(""); else if (state.buffer.length === 1) ret = state.buffer.first(); else ret = state.buffer.concat(state.length); state.buffer.clear(); } else { ret = state.buffer.consume(n, state.decoder); } return ret; } function endReadable(stream) { var state = stream._readableState; debug("endReadable", state.endEmitted); if (!state.endEmitted) { state.ended = true; process.nextTick(endReadableNT, state, stream); } } function endReadableNT(state, stream) { debug("endReadableNT", state.endEmitted, state.length); if (!state.endEmitted && state.length === 0) { state.endEmitted = true; stream.readable = false; stream.emit("end"); if (state.autoDestroy) { var wState = stream._writableState; if (!wState || wState.autoDestroy && wState.finished) { stream.destroy(); } } } } if (typeof Symbol === "function") { Readable.from = function(iterable, opts) { if (from === void 0) { from = require_from2(); } return from(Readable, iterable, opts); }; } function indexOf(xs, x) { for (var i = 0, l = xs.length; i < l; i++) { if (xs[i] === x) return i; } return -1; } } }); // ../../node_modules/winston/node_modules/readable-stream/lib/_stream_transform.js var require_stream_transform = __commonJS({ "../../node_modules/winston/node_modules/readable-stream/lib/_stream_transform.js"(exports2, module2) { "use strict"; module2.exports = Transform; var _require$codes = require_errors4().codes; var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED; var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK; var ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING; var ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0; var Duplex = require_stream_duplex2(); require_inherits()(Transform, Duplex); function afterTransform(er, data) { var ts = this._transformState; ts.transforming = false; var cb = ts.writecb; if (cb === null) { return this.emit("error", new ERR_MULTIPLE_CALLBACK()); } ts.writechunk = null; ts.writecb = null; if (data != null) this.push(data); cb(er); var rs = this._readableState; rs.reading = false; if (rs.needReadable || rs.length < rs.highWaterMark) { this._read(rs.highWaterMark); } } function Transform(options) { if (!(this instanceof Transform)) return new Transform(options); Duplex.call(this, options); this._transformState = { afterTransform: afterTransform.bind(this), needTransform: false, transforming: false, writecb: null, writechunk: null, writeencoding: null }; this._readableState.needReadable = true; this._readableState.sync = false; if (options) { if (typeof options.transform === "function") this._transform = options.transform; if (typeof options.flush === "function") this._flush = options.flush; } this.on("prefinish", prefinish); } function prefinish() { var _this = this; if (typeof this._flush === "function" && !this._readableState.destroyed) { this._flush(function(er, data) { done(_this, er, data); }); } else { done(this, null, null); } } Transform.prototype.push = function(chunk, encoding) { this._transformState.needTransform = false; return Duplex.prototype.push.call(this, chunk, encoding); }; Transform.prototype._transform = function(chunk, encoding, cb) { cb(new ERR_METHOD_NOT_IMPLEMENTED("_transform()")); }; Transform.prototype._write = function(chunk, encoding, cb) { var ts = this._transformState; ts.writecb = cb; ts.writechunk = chunk; ts.writeencoding = encoding; if (!ts.transforming) { var rs = this._readableState; if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); } }; Transform.prototype._read = function(n) { var ts = this._transformState; if (ts.writechunk !== null && !ts.transforming) { ts.transforming = true; this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); } else { ts.needTransform = true; } }; Transform.prototype._destroy = function(err, cb) { Duplex.prototype._destroy.call(this, err, function(err2) { cb(err2); }); }; function done(stream, er, data) { if (er) return stream.emit("error", er); if (data != null) stream.push(data); if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0(); if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING(); return stream.push(null); } } }); // ../../node_modules/winston/node_modules/readable-stream/lib/_stream_passthrough.js var require_stream_passthrough = __commonJS({ "../../node_modules/winston/node_modules/readable-stream/lib/_stream_passthrough.js"(exports2, module2) { "use strict"; module2.exports = PassThrough; var Transform = require_stream_transform(); require_inherits()(PassThrough, Transform); function PassThrough(options) { if (!(this instanceof PassThrough)) return new PassThrough(options); Transform.call(this, options); } PassThrough.prototype._transform = function(chunk, encoding, cb) { cb(null, chunk); }; } }); // ../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/pipeline.js var require_pipeline = __commonJS({ "../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports2, module2) { "use strict"; var eos; function once(callback) { var called = false; return function() { if (called) return; called = true; callback.apply(void 0, arguments); }; } var _require$codes = require_errors4().codes; var ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS; var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; function noop(err) { if (err) throw err; } function isRequest(stream) { return stream.setHeader && typeof stream.abort === "function"; } function destroyer(stream, reading, writing, callback) { callback = once(callback); var closed = false; stream.on("close", function() { closed = true; }); if (eos === void 0) eos = require_end_of_stream3(); eos(stream, { readable: reading, writable: writing }, function(err) { if (err) return callback(err); closed = true; callback(); }); var destroyed = false; return function(err) { if (closed) return; if (destroyed) return; destroyed = true; if (isRequest(stream)) return stream.abort(); if (typeof stream.destroy === "function") return stream.destroy(); callback(err || new ERR_STREAM_DESTROYED("pipe")); }; } function call(fn) { fn(); } function pipe(from, to) { return from.pipe(to); } function popCallback(streams) { if (!streams.length) return noop; if (typeof streams[streams.length - 1] !== "function") return noop; return streams.pop(); } function pipeline() { for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) { streams[_key] = arguments[_key]; } var callback = popCallback(streams); if (Array.isArray(streams[0])) streams = streams[0]; if (streams.length < 2) { throw new ERR_MISSING_ARGS("streams"); } var error; var destroys = streams.map(function(stream, i) { var reading = i < streams.length - 1; var writing = i > 0; return destroyer(stream, reading, writing, function(err) { if (!error) error = err; if (err) destroys.forEach(call); if (reading) return; destroys.forEach(call); callback(error); }); }); return streams.reduce(pipe); } module2.exports = pipeline; } }); // ../../node_modules/winston/node_modules/readable-stream/readable.js var require_readable = __commonJS({ "../../node_modules/winston/node_modules/readable-stream/readable.js"(exports2, module2) { var Stream = require("stream"); if (process.env.READABLE_STREAM === "disable" && Stream) { module2.exports = Stream.Readable; Object.assign(module2.exports, Stream); module2.exports.Stream = Stream; } else { exports2 = module2.exports = require_stream_readable2(); exports2.Stream = Stream || exports2; exports2.Readable = exports2; exports2.Writable = require_stream_writable2(); exports2.Duplex = require_stream_duplex2(); exports2.Transform = require_stream_transform(); exports2.PassThrough = require_stream_passthrough(); exports2.finished = require_end_of_stream3(); exports2.pipeline = require_pipeline(); } } }); // ../../node_modules/@dabh/diagnostics/diagnostics.js var require_diagnostics = __commonJS({ "../../node_modules/@dabh/diagnostics/diagnostics.js"(exports2, module2) { var adapters = []; var modifiers = []; var logger = function devnull() { }; function use(adapter) { if (~adapters.indexOf(adapter)) return false; adapters.push(adapter); return true; } function set(custom) { logger = custom; } function enabled(namespace) { var async = []; for (var i = 0; i < adapters.length; i++) { if (adapters[i].async) { async.push(adapters[i]); continue; } if (adapters[i](namespace)) return true; } if (!async.length) return false; return new Promise(function pinky(resolve) { Promise.all(async.map(function prebind(fn) { return fn(namespace); })).then(function resolved(values) { resolve(values.some(Boolean)); }); }); } function modify(fn) { if (~modifiers.indexOf(fn)) return false; modifiers.push(fn); return true; } function write() { logger.apply(logger, arguments); } function process2(message) { for (var i = 0; i < modifiers.length; i++) { message = modifiers[i].apply(modifiers[i], arguments); } return message; } function introduce(fn, options) { var has = Object.prototype.hasOwnProperty; for (var key in options) { if (has.call(options, key)) { fn[key] = options[key]; } } return fn; } function nope(options) { options.enabled = false; options.modify = modify; options.set = set; options.use = use; return introduce(function diagnopes() { return false; }, options); } function yep(options) { function diagnostics() { var args = Array.prototype.slice.call(arguments, 0); write.call(write, options, process2(args, options)); return true; } options.enabled = true; options.modify = modify; options.set = set; options.use = use; return introduce(diagnostics, options); } module2.exports = function create(diagnostics) { diagnostics.introduce = introduce; diagnostics.enabled = enabled; diagnostics.process = process2; diagnostics.modify = modify; diagnostics.write = write; diagnostics.nope = nope; diagnostics.yep = yep; diagnostics.set = set; diagnostics.use = use; return diagnostics; }; } }); // ../../node_modules/@dabh/diagnostics/node/production.js var require_production = __commonJS({ "../../node_modules/@dabh/diagnostics/node/production.js"(exports2, module2) { var create = require_diagnostics(); var diagnostics = create(function prod(namespace, options) { options = options || {}; options.namespace = namespace; options.prod = true; options.dev = false; if (!(options.force || prod.force)) return prod.nope(options); return prod.yep(options); }); module2.exports = diagnostics; } }); // ../../node_modules/simple-swizzle/node_modules/is-arrayish/index.js var require_is_arrayish = __commonJS({ "../../node_modules/simple-swizzle/node_modules/is-arrayish/index.js"(exports2, module2) { module2.exports = function isArrayish(obj) { if (!obj || typeof obj === "string") { return false; } return obj instanceof Array || Array.isArray(obj) || obj.length >= 0 && (obj.splice instanceof Function || Object.getOwnPropertyDescriptor(obj, obj.length - 1) && obj.constructor.name !== "String"); }; } }); // ../../node_modules/simple-swizzle/index.js var require_simple_swizzle = __commonJS({ "../../node_modules/simple-swizzle/index.js"(exports2, module2) { "use strict"; var isArrayish = require_is_arrayish(); var concat = Array.prototype.concat; var slice = Array.prototype.slice; var swizzle = module2.exports = function swizzle2(args) { var results = []; for (var i = 0, len = args.length; i < len; i++) { var arg = args[i]; if (isArrayish(arg)) { results = concat.call(results, slice.call(arg)); } else { results.push(arg); } } return results; }; swizzle.wrap = function(fn) { return function() { return fn(swizzle(arguments)); }; }; } }); // ../../node_modules/color-string/index.js var require_color_string = __commonJS({ "../../node_modules/color-string/index.js"(exports2, module2) { var colorNames = require_color_name(); var swizzle = require_simple_swizzle(); var reverseNames = {}; for (name in colorNames) { if (colorNames.hasOwnProperty(name)) { reverseNames[colorNames[name]] = name; } } var name; var cs = module2.exports = { to: {}, get: {} }; cs.get = function(string) { var prefix = string.substring(0, 3).toLowerCase(); var val; var model; switch (prefix) { case "hsl": val = cs.get.hsl(string); model = "hsl"; break; case "hwb": val = cs.get.hwb(string); model = "hwb"; break; default: val = cs.get.rgb(string); model = "rgb"; break; } if (!val) { return null; } return { model, value: val }; }; cs.get.rgb = function(string) { if (!string) { return null; } var abbr = /^#([a-f0-9]{3,4})$/i; var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i; var rgba = /^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; var keyword = /(\D+)/; var rgb = [0, 0, 0, 1]; var match; var i; var hexAlpha; if (match = string.match(hex)) { hexAlpha = match[2]; match = match[1]; for (i = 0; i < 3; i++) { var i2 = i * 2; rgb[i] = parseInt(match.slice(i2, i2 + 2), 16); } if (hexAlpha) { rgb[3] = parseInt(hexAlpha, 16) / 255; } } else if (match = string.match(abbr)) { match = match[1]; hexAlpha = match[3]; for (i = 0; i < 3; i++) { rgb[i] = parseInt(match[i] + match[i], 16); } if (hexAlpha) { rgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255; } } else if (match = string.match(rgba)) { for (i = 0; i < 3; i++) { rgb[i] = parseInt(match[i + 1], 0); } if (match[4]) { rgb[3] = parseFloat(match[4]); } } else if (match = string.match(per)) { for (i = 0; i < 3; i++) { rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55); } if (match[4]) { rgb[3] = parseFloat(match[4]); } } else if (match = string.match(keyword)) { if (match[1] === "transparent") { return [0, 0, 0, 0]; } rgb = colorNames[match[1]]; if (!rgb) { return null; } rgb[3] = 1; return rgb; } else { return null; } for (i = 0; i < 3; i++) { rgb[i] = clamp(rgb[i], 0, 255); } rgb[3] = clamp(rgb[3], 0, 1); return rgb; }; cs.get.hsl = function(string) { if (!string) { return null; } var hsl = /^hsla?\(\s*([+-]?(?:\d*\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; var match = string.match(hsl); if (match) { var alpha = parseFloat(match[4]); var h = (parseFloat(match[1]) + 360) % 360; var s = clamp(parseFloat(match[2]), 0, 100); var l = clamp(parseFloat(match[3]), 0, 100); var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); return [h, s, l, a]; } return null; }; cs.get.hwb = function(string) { if (!string) { return null; } var hwb = /^hwb\(\s*([+-]?\d*[\.]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; var match = string.match(hwb); if (match) { var alpha = parseFloat(match[4]); var h = (parseFloat(match[1]) % 360 + 360) % 360; var w = clamp(parseFloat(match[2]), 0, 100); var b = clamp(parseFloat(match[3]), 0, 100); var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); return [h, w, b, a]; } return null; }; cs.to.hex = function() { var rgba = swizzle(arguments); return "#" + hexDouble(rgba[0]) + hexDouble(rgba[1]) + hexDouble(rgba[2]) + (rgba[3] < 1 ? hexDouble(Math.round(rgba[3] * 255)) : ""); }; cs.to.rgb = function() { var rgba = swizzle(arguments); return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ")" : "rgba(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ", " + rgba[3] + ")"; }; cs.to.rgb.percent = function() { var rgba = swizzle(arguments); var r = Math.round(rgba[0] / 255 * 100); var g = Math.round(rgba[1] / 255 * 100); var b = Math.round(rgba[2] / 255 * 100); return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r + "%, " + g + "%, " + b + "%)" : "rgba(" + r + "%, " + g + "%, " + b + "%, " + rgba[3] + ")"; }; cs.to.hsl = function() { var hsla = swizzle(arguments); return hsla.length < 4 || hsla[3] === 1 ? "hsl(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%)" : "hsla(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%, " + hsla[3] + ")"; }; cs.to.hwb = function() { var hwba = swizzle(arguments); var a = ""; if (hwba.length >= 4 && hwba[3] !== 1) { a = ", " + hwba[3]; } return "hwb(" + hwba[0] + ", " + hwba[1] + "%, " + hwba[2] + "%" + a + ")"; }; cs.to.keyword = function(rgb) { return reverseNames[rgb.slice(0, 3)]; }; function clamp(num, min, max) { return Math.min(Math.max(min, num), max); } function hexDouble(num) { var str = num.toString(16).toUpperCase(); return str.length < 2 ? "0" + str : str; } } }); // ../../node_modules/color-convert/node_modules/color-name/index.js var require_color_name2 = __commonJS({ "../../node_modules/color-convert/node_modules/color-name/index.js"(exports2, module2) { "use strict"; module2.exports = { "aliceblue": [240, 248, 255], "antiquewhite": [250, 235, 215], "aqua": [0, 255, 255], "aquamarine": [127, 255, 212], "azure": [240, 255, 255], "beige": [245, 245, 220], "bisque": [255, 228, 196], "black": [0, 0, 0], "blanchedalmond": [255, 235, 205], "blue": [0, 0, 255], "blueviolet": [138, 43, 226], "brown": [165, 42, 42], "burlywood": [222, 184, 135], "cadetblue": [95, 158, 160], "chartreuse": [127, 255, 0], "chocolate": [210, 105, 30], "coral": [255, 127, 80], "cornflowerblue": [100, 149, 237], "cornsilk": [255, 248, 220], "crimson": [220, 20, 60], "cyan": [0, 255, 255], "darkblue": [0, 0, 139], "darkcyan": [0, 139, 139], "darkgoldenrod": [184, 134, 11], "darkgray": [169, 169, 169], "darkgreen": [0, 100, 0], "darkgrey": [169, 169, 169], "darkkhaki": [189, 183, 107], "darkmagenta": [139, 0, 139], "darkolivegreen": [85, 107, 47], "darkorange": [255, 140, 0], "darkorchid": [153, 50, 204], "darkred": [139, 0, 0], "darksalmon": [233, 150, 122], "darkseagreen": [143, 188, 143], "darkslateblue": [72, 61, 139], "darkslategray": [47, 79, 79], "darkslategrey": [47, 79, 79], "darkturquoise": [0, 206, 209], "darkviolet": [148, 0, 211], "deeppink": [255, 20, 147], "deepskyblue": [0, 191, 255], "dimgray": [105, 105, 105], "dimgrey": [105, 105, 105], "dodgerblue": [30, 144, 255], "firebrick": [178, 34, 34], "floralwhite": [255, 250, 240], "forestgreen": [34, 139, 34], "fuchsia": [255, 0, 255], "gainsboro": [220, 220, 220], "ghostwhite": [248, 248, 255], "gold": [255, 215, 0], "goldenrod": [218, 165, 32], "gray": [128, 128, 128], "green": [0, 128, 0], "greenyellow": [173, 255, 47], "grey": [128, 128, 128], "honeydew": [240, 255, 240], "hotpink": [255, 105, 180], "indianred": [205, 92, 92], "indigo": [75, 0, 130], "ivory": [255, 255, 240], "khaki": [240, 230, 140], "lavender": [230, 230, 250], "lavenderblush": [255, 240, 245], "lawngreen": [124, 252, 0], "lemonchiffon": [255, 250, 205], "lightblue": [173, 216, 230], "lightcoral": [240, 128, 128], "lightcyan": [224, 255, 255], "lightgoldenrodyellow": [250, 250, 210], "lightgray": [211, 211, 211], "lightgreen": [144, 238, 144], "lightgrey": [211, 211, 211], "lightpink": [255, 182, 193], "lightsalmon": [255, 160, 122], "lightseagreen": [32, 178, 170], "lightskyblue": [135, 206, 250], "lightslategray": [119, 136, 153], "lightslategrey": [119, 136, 153], "lightsteelblue": [176, 196, 222], "lightyellow": [255, 255, 224], "lime": [0, 255, 0], "limegreen": [50, 205, 50], "linen": [250, 240, 230], "magenta": [255, 0, 255], "maroon": [128, 0, 0], "mediumaquamarine": [102, 205, 170], "mediumblue": [0, 0, 205], "mediumorchid": [186, 85, 211], "mediumpurple": [147, 112, 219], "mediumseagreen": [60, 179, 113], "mediumslateblue": [123, 104, 238], "mediumspringgreen": [0, 250, 154], "mediumturquoise": [72, 209, 204], "mediumvioletred": [199, 21, 133], "midnightblue": [25, 25, 112], "mintcream": [245, 255, 250], "mistyrose": [255, 228, 225], "moccasin": [255, 228, 181], "navajowhite": [255, 222, 173], "navy": [0, 0, 128], "oldlace": [253, 245, 230], "olive": [128, 128, 0], "olivedrab": [107, 142, 35], "orange": [255, 165, 0], "orangered": [255, 69, 0], "orchid": [218, 112, 214], "palegoldenrod": [238, 232, 170], "palegreen": [152, 251, 152], "paleturquoise": [175, 238, 238], "palevioletred": [219, 112, 147], "papayawhip": [255, 239, 213], "peachpuff": [255, 218, 185], "peru": [205, 133, 63], "pink": [255, 192, 203], "plum": [221, 160, 221], "powderblue": [176, 224, 230], "purple": [128, 0, 128], "rebeccapurple": [102, 51, 153], "red": [255, 0, 0], "rosybrown": [188, 143, 143], "royalblue": [65, 105, 225], "saddlebrown": [139, 69, 19], "salmon": [250, 128, 114], "sandybrown": [244, 164, 96], "seagreen": [46, 139, 87], "seashell": [255, 245, 238], "sienna": [160, 82, 45], "silver": [192, 192, 192], "skyblue": [135, 206, 235], "slateblue": [106, 90, 205], "slategray": [112, 128, 144], "slategrey": [112, 128, 144], "snow": [255, 250, 250], "springgreen": [0, 255, 127], "steelblue": [70, 130, 180], "tan": [210, 180, 140], "teal": [0, 128, 128], "thistle": [216, 191, 216], "tomato": [255, 99, 71], "turquoise": [64, 224, 208], "violet": [238, 130, 238], "wheat": [245, 222, 179], "white": [255, 255, 255], "whitesmoke": [245, 245, 245], "yellow": [255, 255, 0], "yellowgreen": [154, 205, 50] }; } }); // ../../node_modules/color-convert/conversions.js var require_conversions2 = __commonJS({ "../../node_modules/color-convert/conversions.js"(exports2, module2) { var cssKeywords = require_color_name2(); var reverseKeywords = {}; for (key in cssKeywords) { if (cssKeywords.hasOwnProperty(key)) { reverseKeywords[cssKeywords[key]] = key; } } var key; var convert = module2.exports = { rgb: { channels: 3, labels: "rgb" }, hsl: { channels: 3, labels: "hsl" }, hsv: { channels: 3, labels: "hsv" }, hwb: { channels: 3, labels: "hwb" }, cmyk: { channels: 4, labels: "cmyk" }, xyz: { channels: 3, labels: "xyz" }, lab: { channels: 3, labels: "lab" }, lch: { channels: 3, labels: "lch" }, hex: { channels: 1, labels: ["hex"] }, keyword: { channels: 1, labels: ["keyword"] }, ansi16: { channels: 1, labels: ["ansi16"] }, ansi256: { channels: 1, labels: ["ansi256"] }, hcg: { channels: 3, labels: ["h", "c", "g"] }, apple: { channels: 3, labels: ["r16", "g16", "b16"] }, gray: { channels: 1, labels: ["gray"] } }; for (model in convert) { if (convert.hasOwnProperty(model)) { if (!("channels" in convert[model])) { throw new Error("missing channels property: " + model); } if (!("labels" in convert[model])) { throw new Error("missing channel labels property: " + model); } if (convert[model].labels.length !== convert[model].channels) { throw new Error("channel and label counts mismatch: " + model); } channels = convert[model].channels; labels = convert[model].labels; delete convert[model].channels; delete convert[model].labels; Object.defineProperty(convert[model], "channels", { value: channels }); Object.defineProperty(convert[model], "labels", { value: labels }); } } var channels; var labels; var model; convert.rgb.hsl = function(rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var min = Math.min(r, g, b); var max = Math.max(r, g, b); var delta = max - min; var h; var s; var l; if (max === min) { h = 0; } else if (r === max) { h = (g - b) / delta; } else if (g === max) { h = 2 + (b - r) / delta; } else if (b === max) { h = 4 + (r - g) / delta; } h = Math.min(h * 60, 360); if (h < 0) { h += 360; } l = (min + max) / 2; if (max === min) { s = 0; } else if (l <= 0.5) { s = delta / (max + min); } else { s = delta / (2 - max - min); } return [h, s * 100, l * 100]; }; convert.rgb.hsv = function(rgb) { var rdif; var gdif; var bdif; var h; var s; var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var v = Math.max(r, g, b); var diff = v - Math.min(r, g, b); var diffc = function(c) { return (v - c) / 6 / diff + 1 / 2; }; if (diff === 0) { h = s = 0; } else { s = diff / v; rdif = diffc(r); gdif = diffc(g); bdif = diffc(b); if (r === v) { h = bdif - gdif; } else if (g === v) { h = 1 / 3 + rdif - bdif; } else if (b === v) { h = 2 / 3 + gdif - rdif; } if (h < 0) { h += 1; } else if (h > 1) { h -= 1; } } return [ h * 360, s * 100, v * 100 ]; }; convert.rgb.hwb = function(rgb) { var r = rgb[0]; var g = rgb[1]; var b = rgb[2]; var h = convert.rgb.hsl(rgb)[0]; var w = 1 / 255 * Math.min(r, Math.min(g, b)); b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); return [h, w * 100, b * 100]; }; convert.rgb.cmyk = function(rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var c; var m; var y; var k; k = Math.min(1 - r, 1 - g, 1 - b); c = (1 - r - k) / (1 - k) || 0; m = (1 - g - k) / (1 - k) || 0; y = (1 - b - k) / (1 - k) || 0; return [c * 100, m * 100, y * 100, k * 100]; }; function comparativeDistance(x, y) { return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2); } convert.rgb.keyword = function(rgb) { var reversed = reverseKeywords[rgb]; if (reversed) { return reversed; } var currentClosestDistance = Infinity; var currentClosestKeyword; for (var keyword in cssKeywords) { if (cssKeywords.hasOwnProperty(keyword)) { var value = cssKeywords[keyword]; var distance = comparativeDistance(rgb, value); if (distance < currentClosestDistance) { currentClosestDistance = distance; currentClosestKeyword = keyword; } } } return currentClosestKeyword; }; convert.keyword.rgb = function(keyword) { return cssKeywords[keyword]; }; convert.rgb.xyz = function(rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92; g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92; b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92; var x = r * 0.4124 + g * 0.3576 + b * 0.1805; var y = r * 0.2126 + g * 0.7152 + b * 0.0722; var z = r * 0.0193 + g * 0.1192 + b * 0.9505; return [x * 100, y * 100, z * 100]; }; convert.rgb.lab = function(rgb) { var xyz = convert.rgb.xyz(rgb); var x = xyz[0]; var y = xyz[1]; var z = xyz[2]; var l; var a; var b; x /= 95.047; y /= 100; z /= 108.883; x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116; y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116; z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116; l = 116 * y - 16; a = 500 * (x - y); b = 200 * (y - z); return [l, a, b]; }; convert.hsl.rgb = function(hsl) { var h = hsl[0] / 360; var s = hsl[1] / 100; var l = hsl[2] / 100; var t1; var t2; var t3; var rgb; var val; if (s === 0) { val = l * 255; return [val, val, val]; } if (l < 0.5) { t2 = l * (1 + s); } else { t2 = l + s - l * s; } t1 = 2 * l - t2; rgb = [0, 0, 0]; for (var i = 0; i < 3; i++) { t3 = h + 1 / 3 * -(i - 1); if (t3 < 0) { t3++; } if (t3 > 1) { t3--; } if (6 * t3 < 1) { val = t1 + (t2 - t1) * 6 * t3; } else if (2 * t3 < 1) { val = t2; } else if (3 * t3 < 2) { val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; } else { val = t1; } rgb[i] = val * 255; } return rgb; }; convert.hsl.hsv = function(hsl) { var h = hsl[0]; var s = hsl[1] / 100; var l = hsl[2] / 100; var smin = s; var lmin = Math.max(l, 0.01); var sv; var v; l *= 2; s *= l <= 1 ? l : 2 - l; smin *= lmin <= 1 ? lmin : 2 - lmin; v = (l + s) / 2; sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s); return [h, sv * 100, v * 100]; }; convert.hsv.rgb = function(hsv) { var h = hsv[0] / 60; var s = hsv[1] / 100; var v = hsv[2] / 100; var hi = Math.floor(h) % 6; var f = h - Math.floor(h); var p = 255 * v * (1 - s); var q = 255 * v * (1 - s * f); var t = 255 * v * (1 - s * (1 - f)); v *= 255; switch (hi) { case 0: return [v, t, p]; case 1: return [q, v, p]; case 2: return [p, v, t]; case 3: return [p, q, v]; case 4: return [t, p, v]; case 5: return [v, p, q]; } }; convert.hsv.hsl = function(hsv) { var h = hsv[0]; var s = hsv[1] / 100; var v = hsv[2] / 100; var vmin = Math.max(v, 0.01); var lmin; var sl; var l; l = (2 - s) * v; lmin = (2 - s) * vmin; sl = s * vmin; sl /= lmin <= 1 ? lmin : 2 - lmin; sl = sl || 0; l /= 2; return [h, sl * 100, l * 100]; }; convert.hwb.rgb = function(hwb) { var h = hwb[0] / 360; var wh = hwb[1] / 100; var bl = hwb[2] / 100; var ratio = wh + bl; var i; var v; var f; var n; if (ratio > 1) { wh /= ratio; bl /= ratio; } i = Math.floor(6 * h); v = 1 - bl; f = 6 * h - i; if ((i & 1) !== 0) { f = 1 - f; } n = wh + f * (v - wh); var r; var g; var b; switch (i) { default: case 6: case 0: r = v; g = n; b = wh; break; case 1: r = n; g = v; b = wh; break; case 2: r = wh; g = v; b = n; break; case 3: r = wh; g = n; b = v; break; case 4: r = n; g = wh; b = v; break; case 5: r = v; g = wh; b = n; break; } return [r * 255, g * 255, b * 255]; }; convert.cmyk.rgb = function(cmyk) { var c = cmyk[0] / 100; var m = cmyk[1] / 100; var y = cmyk[2] / 100; var k = cmyk[3] / 100; var r; var g; var b; r = 1 - Math.min(1, c * (1 - k) + k); g = 1 - Math.min(1, m * (1 - k) + k); b = 1 - Math.min(1, y * (1 - k) + k); return [r * 255, g * 255, b * 255]; }; convert.xyz.rgb = function(xyz) { var x = xyz[0] / 100; var y = xyz[1] / 100; var z = xyz[2] / 100; var r; var g; var b; r = x * 3.2406 + y * -1.5372 + z * -0.4986; g = x * -0.9689 + y * 1.8758 + z * 0.0415; b = x * 0.0557 + y * -0.204 + z * 1.057; r = r > 31308e-7 ? 1.055 * Math.pow(r, 1 / 2.4) - 0.055 : r * 12.92; g = g > 31308e-7 ? 1.055 * Math.pow(g, 1 / 2.4) - 0.055 : g * 12.92; b = b > 31308e-7 ? 1.055 * Math.pow(b, 1 / 2.4) - 0.055 : b * 12.92; r = Math.min(Math.max(0, r), 1); g = Math.min(Math.max(0, g), 1); b = Math.min(Math.max(0, b), 1); return [r * 255, g * 255, b * 255]; }; convert.xyz.lab = function(xyz) { var x = xyz[0]; var y = xyz[1]; var z = xyz[2]; var l; var a; var b; x /= 95.047; y /= 100; z /= 108.883; x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116; y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116; z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116; l = 116 * y - 16; a = 500 * (x - y); b = 200 * (y - z); return [l, a, b]; }; convert.lab.xyz = function(lab) { var l = lab[0]; var a = lab[1]; var b = lab[2]; var x; var y; var z; y = (l + 16) / 116; x = a / 500 + y; z = y - b / 200; var y2 = Math.pow(y, 3); var x2 = Math.pow(x, 3); var z2 = Math.pow(z, 3); y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787; x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787; z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787; x *= 95.047; y *= 100; z *= 108.883; return [x, y, z]; }; convert.lab.lch = function(lab) { var l = lab[0]; var a = lab[1]; var b = lab[2]; var hr; var h; var c; hr = Math.atan2(b, a); h = hr * 360 / 2 / Math.PI; if (h < 0) { h += 360; } c = Math.sqrt(a * a + b * b); return [l, c, h]; }; convert.lch.lab = function(lch) { var l = lch[0]; var c = lch[1]; var h = lch[2]; var a; var b; var hr; hr = h / 360 * 2 * Math.PI; a = c * Math.cos(hr); b = c * Math.sin(hr); return [l, a, b]; }; convert.rgb.ansi16 = function(args) { var r = args[0]; var g = args[1]; var b = args[2]; var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; value = Math.round(value / 50); if (value === 0) { return 30; } var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255)); if (value === 2) { ansi += 60; } return ansi; }; convert.hsv.ansi16 = function(args) { return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); }; convert.rgb.ansi256 = function(args) { var r = args[0]; var g = args[1]; var b = args[2]; if (r === g && g === b) { if (r < 8) { return 16; } if (r > 248) { return 231; } return Math.round((r - 8) / 247 * 24) + 232; } var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5); return ansi; }; convert.ansi16.rgb = function(args) { var color = args % 10; if (color === 0 || color === 7) { if (args > 50) { color += 3.5; } color = color / 10.5 * 255; return [color, color, color]; } var mult = (~~(args > 50) + 1) * 0.5; var r = (color & 1) * mult * 255; var g = (color >> 1 & 1) * mult * 255; var b = (color >> 2 & 1) * mult * 255; return [r, g, b]; }; convert.ansi256.rgb = function(args) { if (args >= 232) { var c = (args - 232) * 10 + 8; return [c, c, c]; } args -= 16; var rem; var r = Math.floor(args / 36) / 5 * 255; var g = Math.floor((rem = args % 36) / 6) / 5 * 255; var b = rem % 6 / 5 * 255; return [r, g, b]; }; convert.rgb.hex = function(args) { var integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255); var string = integer.toString(16).toUpperCase(); return "000000".substring(string.length) + string; }; convert.hex.rgb = function(args) { var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); if (!match) { return [0, 0, 0]; } var colorString = match[0]; if (match[0].length === 3) { colorString = colorString.split("").map(function(char) { return char + char; }).join(""); } var integer = parseInt(colorString, 16); var r = integer >> 16 & 255; var g = integer >> 8 & 255; var b = integer & 255; return [r, g, b]; }; convert.rgb.hcg = function(rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var max = Math.max(Math.max(r, g), b); var min = Math.min(Math.min(r, g), b); var chroma = max - min; var grayscale; var hue; if (chroma < 1) { grayscale = min / (1 - chroma); } else { grayscale = 0; } if (chroma <= 0) { hue = 0; } else if (max === r) { hue = (g - b) / chroma % 6; } else if (max === g) { hue = 2 + (b - r) / chroma; } else { hue = 4 + (r - g) / chroma + 4; } hue /= 6; hue %= 1; return [hue * 360, chroma * 100, grayscale * 100]; }; convert.hsl.hcg = function(hsl) { var s = hsl[1] / 100; var l = hsl[2] / 100; var c = 1; var f = 0; if (l < 0.5) { c = 2 * s * l; } else { c = 2 * s * (1 - l); } if (c < 1) { f = (l - 0.5 * c) / (1 - c); } return [hsl[0], c * 100, f * 100]; }; convert.hsv.hcg = function(hsv) { var s = hsv[1] / 100; var v = hsv[2] / 100; var c = s * v; var f = 0; if (c < 1) { f = (v - c) / (1 - c); } return [hsv[0], c * 100, f * 100]; }; convert.hcg.rgb = function(hcg) { var h = hcg[0] / 360; var c = hcg[1] / 100; var g = hcg[2] / 100; if (c === 0) { return [g * 255, g * 255, g * 255]; } var pure = [0, 0, 0]; var hi = h % 1 * 6; var v = hi % 1; var w = 1 - v; var mg = 0; switch (Math.floor(hi)) { case 0: pure[0] = 1; pure[1] = v; pure[2] = 0; break; case 1: pure[0] = w; pure[1] = 1; pure[2] = 0; break; case 2: pure[0] = 0; pure[1] = 1; pure[2] = v; break; case 3: pure[0] = 0; pure[1] = w; pure[2] = 1; break; case 4: pure[0] = v; pure[1] = 0; pure[2] = 1; break; default: pure[0] = 1; pure[1] = 0; pure[2] = w; } mg = (1 - c) * g; return [ (c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255 ]; }; convert.hcg.hsv = function(hcg) { var c = hcg[1] / 100; var g = hcg[2] / 100; var v = c + g * (1 - c); var f = 0; if (v > 0) { f = c / v; } return [hcg[0], f * 100, v * 100]; }; convert.hcg.hsl = function(hcg) { var c = hcg[1] / 100; var g = hcg[2] / 100; var l = g * (1 - c) + 0.5 * c; var s = 0; if (l > 0 && l < 0.5) { s = c / (2 * l); } else if (l >= 0.5 && l < 1) { s = c / (2 * (1 - l)); } return [hcg[0], s * 100, l * 100]; }; convert.hcg.hwb = function(hcg) { var c = hcg[1] / 100; var g = hcg[2] / 100; var v = c + g * (1 - c); return [hcg[0], (v - c) * 100, (1 - v) * 100]; }; convert.hwb.hcg = function(hwb) { var w = hwb[1] / 100; var b = hwb[2] / 100; var v = 1 - b; var c = v - w; var g = 0; if (c < 1) { g = (v - c) / (1 - c); } return [hwb[0], c * 100, g * 100]; }; convert.apple.rgb = function(apple) { return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255]; }; convert.rgb.apple = function(rgb) { return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535]; }; convert.gray.rgb = function(args) { return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; }; convert.gray.hsl = convert.gray.hsv = function(args) { return [0, 0, args[0]]; }; convert.gray.hwb = function(gray) { return [0, 100, gray[0]]; }; convert.gray.cmyk = function(gray) { return [0, 0, 0, gray[0]]; }; convert.gray.lab = function(gray) { return [gray[0], 0, 0]; }; convert.gray.hex = function(gray) { var val = Math.round(gray[0] / 100 * 255) & 255; var integer = (val << 16) + (val << 8) + val; var string = integer.toString(16).toUpperCase(); return "000000".substring(string.length) + string; }; convert.rgb.gray = function(rgb) { var val = (rgb[0] + rgb[1] + rgb[2]) / 3; return [val / 255 * 100]; }; } }); // ../../node_modules/color-convert/route.js var require_route2 = __commonJS({ "../../node_modules/color-convert/route.js"(exports2, module2) { var conversions = require_conversions2(); function buildGraph() { var graph = {}; var models = Object.keys(conversions); for (var len = models.length, i = 0; i < len; i++) { graph[models[i]] = { distance: -1, parent: null }; } return graph; } function deriveBFS(fromModel) { var graph = buildGraph(); var queue = [fromModel]; graph[fromModel].distance = 0; while (queue.length) { var current = queue.pop(); var adjacents = Object.keys(conversions[current]); for (var len = adjacents.length, i = 0; i < len; i++) { var adjacent = adjacents[i]; var node = graph[adjacent]; if (node.distance === -1) { node.distance = graph[current].distance + 1; node.parent = current; queue.unshift(adjacent); } } } return graph; } function link(from, to) { return function(args) { return to(from(args)); }; } function wrapConversion(toModel, graph) { var path2 = [graph[toModel].parent, toModel]; var fn = conversions[graph[toModel].parent][toModel]; var cur = graph[toModel].parent; while (graph[cur].parent) { path2.unshift(graph[cur].parent); fn = link(conversions[graph[cur].parent][cur], fn); cur = graph[cur].parent; } fn.conversion = path2; return fn; } module2.exports = function(fromModel) { var graph = deriveBFS(fromModel); var conversion = {}; var models = Object.keys(graph); for (var len = models.length, i = 0; i < len; i++) { var toModel = models[i]; var node = graph[toModel]; if (node.parent === null) { continue; } conversion[toModel] = wrapConversion(toModel, graph); } return conversion; }; } }); // ../../node_modules/color-convert/index.js var require_color_convert2 = __commonJS({ "../../node_modules/color-convert/index.js"(exports2, module2) { var conversions = require_conversions2(); var route = require_route2(); var convert = {}; var models = Object.keys(conversions); function wrapRaw(fn) { var wrappedFn = function(args) { if (args === void 0 || args === null) { return args; } if (arguments.length > 1) { args = Array.prototype.slice.call(arguments); } return fn(args); }; if ("conversion" in fn) { wrappedFn.conversion = fn.conversion; } return wrappedFn; } function wrapRounded(fn) { var wrappedFn = function(args) { if (args === void 0 || args === null) { return args; } if (arguments.length > 1) { args = Array.prototype.slice.call(arguments); } var result = fn(args); if (typeof result === "object") { for (var len = result.length, i = 0; i < len; i++) { result[i] = Math.round(result[i]); } } return result; }; if ("conversion" in fn) { wrappedFn.conversion = fn.conversion; } return wrappedFn; } models.forEach(function(fromModel) { convert[fromModel] = {}; Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels }); Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels }); var routes = route(fromModel); var routeModels = Object.keys(routes); routeModels.forEach(function(toModel) { var fn = routes[toModel]; convert[fromModel][toModel] = wrapRounded(fn); convert[fromModel][toModel].raw = wrapRaw(fn); }); }); module2.exports = convert; } }); // ../../node_modules/color/index.js var require_color = __commonJS({ "../../node_modules/color/index.js"(exports2, module2) { "use strict"; var colorString = require_color_string(); var convert = require_color_convert2(); var _slice = [].slice; var skippedModels = [ "keyword", "gray", "hex" ]; var hashedModelKeys = {}; Object.keys(convert).forEach(function(model) { hashedModelKeys[_slice.call(convert[model].labels).sort().join("")] = model; }); var limiters = {}; function Color(obj, model) { if (!(this instanceof Color)) { return new Color(obj, model); } if (model && model in skippedModels) { model = null; } if (model && !(model in convert)) { throw new Error("Unknown model: " + model); } var i; var channels; if (!obj) { this.model = "rgb"; this.color = [0, 0, 0]; this.valpha = 1; } else if (obj instanceof Color) { this.model = obj.model; this.color = obj.color.slice(); this.valpha = obj.valpha; } else if (typeof obj === "string") { var result = colorString.get(obj); if (result === null) { throw new Error("Unable to parse color from string: " + obj); } this.model = result.model; channels = convert[this.model].channels; this.color = result.value.slice(0, channels); this.valpha = typeof result.value[channels] === "number" ? result.value[channels] : 1; } else if (obj.length) { this.model = model || "rgb"; channels = convert[this.model].channels; var newArr = _slice.call(obj, 0, channels); this.color = zeroArray(newArr, channels); this.valpha = typeof obj[channels] === "number" ? obj[channels] : 1; } else if (typeof obj === "number") { obj &= 16777215; this.model = "rgb"; this.color = [ obj >> 16 & 255, obj >> 8 & 255, obj & 255 ]; this.valpha = 1; } else { this.valpha = 1; var keys = Object.keys(obj); if ("alpha" in obj) { keys.splice(keys.indexOf("alpha"), 1); this.valpha = typeof obj.alpha === "number" ? obj.alpha : 0; } var hashedKeys = keys.sort().join(""); if (!(hashedKeys in hashedModelKeys)) { throw new Error("Unable to parse color from object: " + JSON.stringify(obj)); } this.model = hashedModelKeys[hashedKeys]; var labels = convert[this.model].labels; var color = []; for (i = 0; i < labels.length; i++) { color.push(obj[labels[i]]); } this.color = zeroArray(color); } if (limiters[this.model]) { channels = convert[this.model].channels; for (i = 0; i < channels; i++) { var limit = limiters[this.model][i]; if (limit) { this.color[i] = limit(this.color[i]); } } } this.valpha = Math.max(0, Math.min(1, this.valpha)); if (Object.freeze) { Object.freeze(this); } } Color.prototype = { toString: function() { return this.string(); }, toJSON: function() { return this[this.model](); }, string: function(places) { var self = this.model in colorString.to ? this : this.rgb(); self = self.round(typeof places === "number" ? places : 1); var args = self.valpha === 1 ? self.color : self.color.concat(this.valpha); return colorString.to[self.model](args); }, percentString: function(places) { var self = this.rgb().round(typeof places === "number" ? places : 1); var args = self.valpha === 1 ? self.color : self.color.concat(this.valpha); return colorString.to.rgb.percent(args); }, array: function() { return this.valpha === 1 ? this.color.slice() : this.color.concat(this.valpha); }, object: function() { var result = {}; var channels = convert[this.model].channels; var labels = convert[this.model].labels; for (var i = 0; i < channels; i++) { result[labels[i]] = this.color[i]; } if (this.valpha !== 1) { result.alpha = this.valpha; } return result; }, unitArray: function() { var rgb = this.rgb().color; rgb[0] /= 255; rgb[1] /= 255; rgb[2] /= 255; if (this.valpha !== 1) { rgb.push(this.valpha); } return rgb; }, unitObject: function() { var rgb = this.rgb().object(); rgb.r /= 255; rgb.g /= 255; rgb.b /= 255; if (this.valpha !== 1) { rgb.alpha = this.valpha; } return rgb; }, round: function(places) { places = Math.max(places || 0, 0); return new Color(this.color.map(roundToPlace(places)).concat(this.valpha), this.model); }, alpha: function(val) { if (arguments.length) { return new Color(this.color.concat(Math.max(0, Math.min(1, val))), this.model); } return this.valpha; }, red: getset("rgb", 0, maxfn(255)), green: getset("rgb", 1, maxfn(255)), blue: getset("rgb", 2, maxfn(255)), hue: getset(["hsl", "hsv", "hsl", "hwb", "hcg"], 0, function(val) { return (val % 360 + 360) % 360; }), saturationl: getset("hsl", 1, maxfn(100)), lightness: getset("hsl", 2, maxfn(100)), saturationv: getset("hsv", 1, maxfn(100)), value: getset("hsv", 2, maxfn(100)), chroma: getset("hcg", 1, maxfn(100)), gray: getset("hcg", 2, maxfn(100)), white: getset("hwb", 1, maxfn(100)), wblack: getset("hwb", 2, maxfn(100)), cyan: getset("cmyk", 0, maxfn(100)), magenta: getset("cmyk", 1, maxfn(100)), yellow: getset("cmyk", 2, maxfn(100)), black: getset("cmyk", 3, maxfn(100)), x: getset("xyz", 0, maxfn(100)), y: getset("xyz", 1, maxfn(100)), z: getset("xyz", 2, maxfn(100)), l: getset("lab", 0, maxfn(100)), a: getset("lab", 1), b: getset("lab", 2), keyword: function(val) { if (arguments.length) { return new Color(val); } return convert[this.model].keyword(this.color); }, hex: function(val) { if (arguments.length) { return new Color(val); } return colorString.to.hex(this.rgb().round().color); }, rgbNumber: function() { var rgb = this.rgb().color; return (rgb[0] & 255) << 16 | (rgb[1] & 255) << 8 | rgb[2] & 255; }, luminosity: function() { var rgb = this.rgb().color; var lum = []; for (var i = 0; i < rgb.length; i++) { var chan = rgb[i] / 255; lum[i] = chan <= 0.03928 ? chan / 12.92 : Math.pow((chan + 0.055) / 1.055, 2.4); } return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2]; }, contrast: function(color2) { var lum1 = this.luminosity(); var lum2 = color2.luminosity(); if (lum1 > lum2) { return (lum1 + 0.05) / (lum2 + 0.05); } return (lum2 + 0.05) / (lum1 + 0.05); }, level: function(color2) { var contrastRatio = this.contrast(color2); if (contrastRatio >= 7.1) { return "AAA"; } return contrastRatio >= 4.5 ? "AA" : ""; }, isDark: function() { var rgb = this.rgb().color; var yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1e3; return yiq < 128; }, isLight: function() { return !this.isDark(); }, negate: function() { var rgb = this.rgb(); for (var i = 0; i < 3; i++) { rgb.color[i] = 255 - rgb.color[i]; } return rgb; }, lighten: function(ratio) { var hsl = this.hsl(); hsl.color[2] += hsl.color[2] * ratio; return hsl; }, darken: function(ratio) { var hsl = this.hsl(); hsl.color[2] -= hsl.color[2] * ratio; return hsl; }, saturate: function(ratio) { var hsl = this.hsl(); hsl.color[1] += hsl.color[1] * ratio; return hsl; }, desaturate: function(ratio) { var hsl = this.hsl(); hsl.color[1] -= hsl.color[1] * ratio; return hsl; }, whiten: function(ratio) { var hwb = this.hwb(); hwb.color[1] += hwb.color[1] * ratio; return hwb; }, blacken: function(ratio) { var hwb = this.hwb(); hwb.color[2] += hwb.color[2] * ratio; return hwb; }, grayscale: function() { var rgb = this.rgb().color; var val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11; return Color.rgb(val, val, val); }, fade: function(ratio) { return this.alpha(this.valpha - this.valpha * ratio); }, opaquer: function(ratio) { return this.alpha(this.valpha + this.valpha * ratio); }, rotate: function(degrees) { var hsl = this.hsl(); var hue = hsl.color[0]; hue = (hue + degrees) % 360; hue = hue < 0 ? 360 + hue : hue; hsl.color[0] = hue; return hsl; }, mix: function(mixinColor, weight) { var color1 = mixinColor.rgb(); var color2 = this.rgb(); var p = weight === void 0 ? 0.5 : weight; var w = 2 * p - 1; var a = color1.alpha() - color2.alpha(); var w1 = ((w * a === -1 ? w : (w + a) / (1 + w * a)) + 1) / 2; var w2 = 1 - w1; return Color.rgb(w1 * color1.red() + w2 * color2.red(), w1 * color1.green() + w2 * color2.green(), w1 * color1.blue() + w2 * color2.blue(), color1.alpha() * p + color2.alpha() * (1 - p)); } }; Object.keys(convert).forEach(function(model) { if (skippedModels.indexOf(model) !== -1) { return; } var channels = convert[model].channels; Color.prototype[model] = function() { if (this.model === model) { return new Color(this); } if (arguments.length) { return new Color(arguments, model); } var newAlpha = typeof arguments[channels] === "number" ? channels : this.valpha; return new Color(assertArray(convert[this.model][model].raw(this.color)).concat(newAlpha), model); }; Color[model] = function(color) { if (typeof color === "number") { color = zeroArray(_slice.call(arguments), channels); } return new Color(color, model); }; }); function roundTo(num, places) { return Number(num.toFixed(places)); } function roundToPlace(places) { return function(num) { return roundTo(num, places); }; } function getset(model, channel, modifier) { model = Array.isArray(model) ? model : [model]; model.forEach(function(m) { (limiters[m] || (limiters[m] = []))[channel] = modifier; }); model = model[0]; return function(val) { var result; if (arguments.length) { if (modifier) { val = modifier(val); } result = this[model](); result.color[channel] = val; return result; } result = this[model]().color[channel]; if (modifier) { result = modifier(result); } return result; }; } function maxfn(max) { return function(v) { return Math.max(0, Math.min(max, v)); }; } function assertArray(val) { return Array.isArray(val) ? val : [val]; } function zeroArray(arr, length) { for (var i = 0; i < length; i++) { if (typeof arr[i] !== "number") { arr[i] = 0; } } return arr; } module2.exports = Color; } }); // ../../node_modules/text-hex/index.js var require_text_hex = __commonJS({ "../../node_modules/text-hex/index.js"(exports2, module2) { "use strict"; module2.exports = function hex(str) { for (var i = 0, hash2 = 0; i < str.length; hash2 = str.charCodeAt(i++) + ((hash2 << 5) - hash2)) ; var color = Math.floor(Math.abs(Math.sin(hash2) * 1e4 % 1 * 16777216)).toString(16); return "#" + Array(6 - color.length + 1).join("0") + color; }; } }); // ../../node_modules/colorspace/index.js var require_colorspace = __commonJS({ "../../node_modules/colorspace/index.js"(exports2, module2) { "use strict"; var color = require_color(); var hex = require_text_hex(); module2.exports = function colorspace(namespace, delimiter) { var split = namespace.split(delimiter || ":"); var base = hex(split[0]); if (!split.length) return base; for (var i = 0, l = split.length - 1; i < l; i++) { base = color(base).mix(color(hex(split[i + 1]))).saturate(1).hex(); } return base; }; } }); // ../../node_modules/kuler/index.js var require_kuler = __commonJS({ "../../node_modules/kuler/index.js"(exports2, module2) { "use strict"; function Kuler(text, color) { if (color) return new Kuler(text).style(color); if (!(this instanceof Kuler)) return new Kuler(text); this.text = text; } Kuler.prototype.prefix = "\x1B["; Kuler.prototype.suffix = "m"; Kuler.prototype.hex = function hex(color) { color = color[0] === "#" ? color.substring(1) : color; if (color.length === 3) { color = color.split(""); color[5] = color[2]; color[4] = color[2]; color[3] = color[1]; color[2] = color[1]; color[1] = color[0]; color = color.join(""); } var r = color.substring(0, 2), g = color.substring(2, 4), b = color.substring(4, 6); return [parseInt(r, 16), parseInt(g, 16), parseInt(b, 16)]; }; Kuler.prototype.rgb = function rgb(r, g, b) { var red = r / 255 * 5, green = g / 255 * 5, blue = b / 255 * 5; return this.ansi(red, green, blue); }; Kuler.prototype.ansi = function ansi(r, g, b) { var red = Math.round(r), green = Math.round(g), blue = Math.round(b); return 16 + red * 36 + green * 6 + blue; }; Kuler.prototype.reset = function reset() { return this.prefix + "39;49" + this.suffix; }; Kuler.prototype.style = function style(color) { return this.prefix + "38;5;" + this.rgb.apply(this, this.hex(color)) + this.suffix + this.text + this.reset(); }; module2.exports = Kuler; } }); // ../../node_modules/@dabh/diagnostics/modifiers/namespace-ansi.js var require_namespace_ansi = __commonJS({ "../../node_modules/@dabh/diagnostics/modifiers/namespace-ansi.js"(exports2, module2) { var colorspace = require_colorspace(); var kuler = require_kuler(); module2.exports = function ansiModifier(args, options) { var namespace = options.namespace; var ansi = options.colors !== false ? kuler(namespace + ":", colorspace(namespace)) : namespace + ":"; args[0] = ansi + " " + args[0]; return args; }; } }); // ../../node_modules/enabled/index.js var require_enabled = __commonJS({ "../../node_modules/enabled/index.js"(exports2, module2) { "use strict"; module2.exports = function enabled(name, variable) { if (!variable) return false; var variables = variable.split(/[\s,]+/), i = 0; for (; i < variables.length; i++) { variable = variables[i].replace("*", ".*?"); if (variable.charAt(0) === "-") { if (new RegExp("^" + variable.substr(1) + "$").test(name)) { return false; } continue; } if (new RegExp("^" + variable + "$").test(name)) { return true; } } return false; }; } }); // ../../node_modules/@dabh/diagnostics/adapters/index.js var require_adapters = __commonJS({ "../../node_modules/@dabh/diagnostics/adapters/index.js"(exports2, module2) { var enabled = require_enabled(); module2.exports = function create(fn) { return function adapter(namespace) { try { return enabled(namespace, fn()); } catch (e) { } return false; }; }; } }); // ../../node_modules/@dabh/diagnostics/adapters/process.env.js var require_process_env = __commonJS({ "../../node_modules/@dabh/diagnostics/adapters/process.env.js"(exports2, module2) { var adapter = require_adapters(); module2.exports = adapter(function processenv() { return process.env.DEBUG || process.env.DIAGNOSTICS; }); } }); // ../../node_modules/@dabh/diagnostics/logger/console.js var require_console2 = __commonJS({ "../../node_modules/@dabh/diagnostics/logger/console.js"(exports2, module2) { module2.exports = function(meta, messages) { try { Function.prototype.apply.call(console.log, console, messages); } catch (e) { } }; } }); // ../../node_modules/@dabh/diagnostics/node/development.js var require_development = __commonJS({ "../../node_modules/@dabh/diagnostics/node/development.js"(exports2, module2) { var create = require_diagnostics(); var tty = require("tty").isatty(1); var diagnostics = create(function dev(namespace, options) { options = options || {}; options.colors = "colors" in options ? options.colors : tty; options.namespace = namespace; options.prod = false; options.dev = true; if (!dev.enabled(namespace) && !(options.force || dev.force)) { return dev.nope(options); } return dev.yep(options); }); diagnostics.modify(require_namespace_ansi()); diagnostics.use(require_process_env()); diagnostics.set(require_console2()); module2.exports = diagnostics; } }); // ../../node_modules/@dabh/diagnostics/node/index.js var require_node2 = __commonJS({ "../../node_modules/@dabh/diagnostics/node/index.js"(exports2, module2) { if (process.env.NODE_ENV === "production") { module2.exports = require_production(); } else { module2.exports = require_development(); } } }); // ../../node_modules/winston/lib/winston/tail-file.js var require_tail_file = __commonJS({ "../../node_modules/winston/lib/winston/tail-file.js"(exports2, module2) { "use strict"; var fs2 = require("fs"); var { StringDecoder } = require("string_decoder"); var { Stream } = require_readable(); function noop() { } module2.exports = (options, iter) => { const buffer = Buffer.alloc(64 * 1024); const decode = new StringDecoder("utf8"); const stream = new Stream(); let buff = ""; let pos = 0; let row = 0; if (options.start === -1) { delete options.start; } stream.readable = true; stream.destroy = () => { stream.destroyed = true; stream.emit("end"); stream.emit("close"); }; fs2.open(options.file, "a+", "0644", (err, fd) => { if (err) { if (!iter) { stream.emit("error", err); } else { iter(err); } stream.destroy(); return; } (function read() { if (stream.destroyed) { fs2.close(fd, noop); return; } return fs2.read(fd, buffer, 0, buffer.length, pos, (error, bytes) => { if (error) { if (!iter) { stream.emit("error", error); } else { iter(error); } stream.destroy(); return; } if (!bytes) { if (buff) { if (options.start == null || row > options.start) { if (!iter) { stream.emit("line", buff); } else { iter(null, buff); } } row++; buff = ""; } return setTimeout(read, 1e3); } let data = decode.write(buffer.slice(0, bytes)); if (!iter) { stream.emit("data", data); } data = (buff + data).split(/\n+/); const l = data.length - 1; let i = 0; for (; i < l; i++) { if (options.start == null || row > options.start) { if (!iter) { stream.emit("line", data[i]); } else { iter(null, data[i]); } } row++; } buff = data[l]; pos += bytes; return read(); }); })(); }); if (!iter) { return stream; } return stream.destroy; }; } }); // ../../node_modules/winston/lib/winston/transports/file.js var require_file2 = __commonJS({ "../../node_modules/winston/lib/winston/transports/file.js"(exports2, module2) { "use strict"; var fs2 = require("fs"); var path2 = require("path"); var asyncSeries = require_series(); var zlib = require("zlib"); var { MESSAGE } = require_triple_beam(); var { Stream, PassThrough } = require_readable(); var TransportStream = require_winston_transport(); var debug = require_node2()("winston:file"); var os = require("os"); var tailFile = require_tail_file(); module2.exports = class File extends TransportStream { constructor(options = {}) { super(options); this.name = options.name || "file"; function throwIf(target, ...args) { args.slice(1).forEach((name) => { if (options[name]) { throw new Error(`Cannot set ${name} and ${target} together`); } }); } this._stream = new PassThrough(); this._stream.setMaxListeners(30); this._onError = this._onError.bind(this); if (options.filename || options.dirname) { throwIf("filename or dirname", "stream"); this._basename = this.filename = options.filename ? path2.basename(options.filename) : "winston.log"; this.dirname = options.dirname || path2.dirname(options.filename); this.options = options.options || { flags: "a" }; } else if (options.stream) { console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"); throwIf("stream", "filename", "maxsize"); this._dest = this._stream.pipe(this._setupStream(options.stream)); this.dirname = path2.dirname(this._dest.path); } else { throw new Error("Cannot log to file without filename or stream."); } this.maxsize = options.maxsize || null; this.rotationFormat = options.rotationFormat || false; this.zippedArchive = options.zippedArchive || false; this.maxFiles = options.maxFiles || null; this.eol = typeof options.eol === "string" ? options.eol : os.EOL; this.tailable = options.tailable || false; this._size = 0; this._pendingSize = 0; this._created = 0; this._drain = false; this._opening = false; this._ending = false; if (this.dirname) this._createLogDirIfNotExist(this.dirname); this.open(); } finishIfEnding() { if (this._ending) { if (this._opening) { this.once("open", () => { this._stream.once("finish", () => this.emit("finish")); setImmediate(() => this._stream.end()); }); } else { this._stream.once("finish", () => this.emit("finish")); setImmediate(() => this._stream.end()); } } } log(info, callback = () => { }) { if (this.silent) { callback(); return true; } if (this._drain) { this._stream.once("drain", () => { this._drain = false; this.log(info, callback); }); return; } if (this._rotate) { this._stream.once("rotate", () => { this._rotate = false; this.log(info, callback); }); return; } const output = `${info[MESSAGE]}${this.eol}`; const bytes = Buffer.byteLength(output); function logged() { this._size += bytes; this._pendingSize -= bytes; debug("logged %s %s", this._size, output); this.emit("logged", info); if (this._opening) { return; } if (!this._needsNewFile()) { return; } this._rotate = true; this._endStream(() => this._rotateFile()); } this._pendingSize += bytes; if (this._opening && !this.rotatedWhileOpening && this._needsNewFile(this._size + this._pendingSize)) { this.rotatedWhileOpening = true; } const written = this._stream.write(output, logged.bind(this)); if (!written) { this._drain = true; this._stream.once("drain", () => { this._drain = false; callback(); }); } else { callback(); } debug("written", written, this._drain); this.finishIfEnding(); return written; } query(options, callback) { if (typeof options === "function") { callback = options; options = {}; } options = normalizeQuery(options); const file = path2.join(this.dirname, this.filename); let buff = ""; let results = []; let row = 0; const stream = fs2.createReadStream(file, { encoding: "utf8" }); stream.on("error", (err) => { if (stream.readable) { stream.destroy(); } if (!callback) { return; } return err.code !== "ENOENT" ? callback(err) : callback(null, results); }); stream.on("data", (data) => { data = (buff + data).split(/\n+/); const l = data.length - 1; let i = 0; for (; i < l; i++) { if (!options.start || row >= options.start) { add(data[i]); } row++; } buff = data[l]; }); stream.on("close", () => { if (buff) { add(buff, true); } if (options.order === "desc") { results = results.reverse(); } if (callback) callback(null, results); }); function add(buff2, attempt) { try { const log = JSON.parse(buff2); if (check(log)) { push(log); } } catch (e) { if (!attempt) { stream.emit("error", e); } } } function push(log) { if (options.rows && results.length >= options.rows && options.order !== "desc") { if (stream.readable) { stream.destroy(); } return; } if (options.fields) { log = options.fields.reduce((obj, key) => { obj[key] = log[key]; return obj; }, {}); } if (options.order === "desc") { if (results.length >= options.rows) { results.shift(); } } results.push(log); } function check(log) { if (!log) { return; } if (typeof log !== "object") { return; } const time = new Date(log.timestamp); if (options.from && time < options.from || options.until && time > options.until || options.level && options.level !== log.level) { return; } return true; } function normalizeQuery(options2) { options2 = options2 || {}; options2.rows = options2.rows || options2.limit || 10; options2.start = options2.start || 0; options2.until = options2.until || new Date(); if (typeof options2.until !== "object") { options2.until = new Date(options2.until); } options2.from = options2.from || options2.until - 24 * 60 * 60 * 1e3; if (typeof options2.from !== "object") { options2.from = new Date(options2.from); } options2.order = options2.order || "desc"; return options2; } } stream(options = {}) { const file = path2.join(this.dirname, this.filename); const stream = new Stream(); const tail = { file, start: options.start }; stream.destroy = tailFile(tail, (err, line) => { if (err) { return stream.emit("error", err); } try { stream.emit("data", line); line = JSON.parse(line); stream.emit("log", line); } catch (e) { stream.emit("error", e); } }); return stream; } open() { if (!this.filename) return; if (this._opening) return; this._opening = true; this.stat((err, size) => { if (err) { return this.emit("error", err); } debug("stat done: %s { size: %s }", this.filename, size); this._size = size; this._dest = this._createStream(this._stream); this._opening = false; this.once("open", () => { if (this._stream.eventNames().includes("rotate")) { this._stream.emit("rotate"); } else { this._rotate = false; } }); }); } stat(callback) { const target = this._getFile(); const fullpath = path2.join(this.dirname, target); fs2.stat(fullpath, (err, stat) => { if (err && err.code === "ENOENT") { debug("ENOENT\xA0ok", fullpath); this.filename = target; return callback(null, 0); } if (err) { debug(`err ${err.code} ${fullpath}`); return callback(err); } if (!stat || this._needsNewFile(stat.size)) { return this._incFile(() => this.stat(callback)); } this.filename = target; callback(null, stat.size); }); } close(cb) { if (!this._stream) { return; } this._stream.end(() => { if (cb) { cb(); } this.emit("flush"); this.emit("closed"); }); } _needsNewFile(size) { size = size || this._size; return this.maxsize && size >= this.maxsize; } _onError(err) { this.emit("error", err); } _setupStream(stream) { stream.on("error", this._onError); return stream; } _cleanupStream(stream) { stream.removeListener("error", this._onError); return stream; } _rotateFile() { this._incFile(() => this.open()); } _endStream(callback = () => { }) { if (this._dest) { this._stream.unpipe(this._dest); this._dest.end(() => { this._cleanupStream(this._dest); callback(); }); } else { callback(); } } _createStream(source) { const fullpath = path2.join(this.dirname, this.filename); debug("create stream start", fullpath, this.options); const dest = fs2.createWriteStream(fullpath, this.options).on("error", (err) => debug(err)).on("close", () => debug("close", dest.path, dest.bytesWritten)).on("open", () => { debug("file open ok", fullpath); this.emit("open", fullpath); source.pipe(dest); if (this.rotatedWhileOpening) { this._stream = new PassThrough(); this._stream.setMaxListeners(30); this._rotateFile(); this.rotatedWhileOpening = false; this._cleanupStream(dest); source.end(); } }); debug("create stream ok", fullpath); if (this.zippedArchive) { const gzip = zlib.createGzip(); gzip.pipe(dest); return gzip; } return dest; } _incFile(callback) { debug("_incFile", this.filename); const ext = path2.extname(this._basename); const basename = path2.basename(this._basename, ext); if (!this.tailable) { this._created += 1; this._checkMaxFilesIncrementing(ext, basename, callback); } else { this._checkMaxFilesTailable(ext, basename, callback); } } _getFile() { const ext = path2.extname(this._basename); const basename = path2.basename(this._basename, ext); const isRotation = this.rotationFormat ? this.rotationFormat() : this._created; const target = !this.tailable && this._created ? `${basename}${isRotation}${ext}` : `${basename}${ext}`; return this.zippedArchive && !this.tailable ? `${target}.gz` : target; } _checkMaxFilesIncrementing(ext, basename, callback) { if (!this.maxFiles || this._created < this.maxFiles) { return setImmediate(callback); } const oldest = this._created - this.maxFiles; const isOldest = oldest !== 0 ? oldest : ""; const isZipped = this.zippedArchive ? ".gz" : ""; const filePath = `${basename}${isOldest}${ext}${isZipped}`; const target = path2.join(this.dirname, filePath); fs2.unlink(target, callback); } _checkMaxFilesTailable(ext, basename, callback) { const tasks = []; if (!this.maxFiles) { return; } const isZipped = this.zippedArchive ? ".gz" : ""; for (let x = this.maxFiles - 1; x > 1; x--) { tasks.push(function(i, cb) { let fileName = `${basename}${i - 1}${ext}${isZipped}`; const tmppath = path2.join(this.dirname, fileName); fs2.exists(tmppath, (exists) => { if (!exists) { return cb(null); } fileName = `${basename}${i}${ext}${isZipped}`; fs2.rename(tmppath, path2.join(this.dirname, fileName), cb); }); }.bind(this, x)); } asyncSeries(tasks, () => { fs2.rename(path2.join(this.dirname, `${basename}${ext}`), path2.join(this.dirname, `${basename}1${ext}${isZipped}`), callback); }); } _createLogDirIfNotExist(dirPath) { if (!fs2.existsSync(dirPath)) { fs2.mkdirSync(dirPath, { recursive: true }); } } }; } }); // ../../node_modules/winston/node_modules/safe-stable-stringify/index.js var require_safe_stable_stringify2 = __commonJS({ "../../node_modules/winston/node_modules/safe-stable-stringify/index.js"(exports2, module2) { "use strict"; var stringify = configure(); stringify.configure = configure; stringify.stringify = stringify; stringify.default = stringify; exports2.stringify = stringify; exports2.configure = configure; module2.exports = stringify; var strEscapeSequencesRegExp = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/; var strEscapeSequencesReplacer = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/g; var meta = [ "\\u0000", "\\u0001", "\\u0002", "\\u0003", "\\u0004", "\\u0005", "\\u0006", "\\u0007", "\\b", "\\t", "\\n", "\\u000b", "\\f", "\\r", "\\u000e", "\\u000f", "\\u0010", "\\u0011", "\\u0012", "\\u0013", "\\u0014", "\\u0015", "\\u0016", "\\u0017", "\\u0018", "\\u0019", "\\u001a", "\\u001b", "\\u001c", "\\u001d", "\\u001e", "\\u001f", "", "", '\\"', "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "\\\\" ]; function escapeFn(str) { if (str.length === 2) { const charCode2 = str.charCodeAt(1); return `${str[0]}\\u${charCode2.toString(16)}`; } const charCode = str.charCodeAt(0); return meta.length > charCode ? meta[charCode] : `\\u${charCode.toString(16)}`; } function strEscape(str) { if (str.length < 5e3 && !strEscapeSequencesRegExp.test(str)) { return str; } if (str.length > 100) { return str.replace(strEscapeSequencesReplacer, escapeFn); } let result = ""; let last = 0; for (let i = 0; i < str.length; i++) { const point = str.charCodeAt(i); if (point === 34 || point === 92 || point < 32) { result += `${str.slice(last, i)}${meta[point]}`; last = i + 1; } else if (point >= 55296 && point <= 57343) { if (point <= 56319 && i + 1 < str.length) { const point2 = str.charCodeAt(i + 1); if (point2 >= 56320 && point2 <= 57343) { i++; continue; } } result += `${str.slice(last, i)}${`\\u${point.toString(16)}`}`; last = i + 1; } } result += str.slice(last); return result; } function insertSort(array) { if (array.length > 200) { return array.sort(); } for (let i = 1; i < array.length; i++) { const currentValue = array[i]; let position = i; while (position !== 0 && array[position - 1] > currentValue) { array[position] = array[position - 1]; position--; } array[position] = currentValue; } return array; } var typedArrayPrototypeGetSymbolToStringTag = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Uint8Array())), Symbol.toStringTag).get; function isTypedArrayWithEntries(value) { return typedArrayPrototypeGetSymbolToStringTag.call(value) !== void 0 && value.length !== 0; } function stringifyTypedArray(array, separator, maximumBreadth) { if (array.length < maximumBreadth) { maximumBreadth = array.length; } const whitespace = separator === "," ? "" : " "; let res = `"0":${whitespace}${array[0]}`; for (let i = 1; i < maximumBreadth; i++) { res += `${separator}"${i}":${whitespace}${array[i]}`; } return res; } function getCircularValueOption(options) { if (options && Object.prototype.hasOwnProperty.call(options, "circularValue")) { var circularValue = options.circularValue; if (typeof circularValue === "string") { return `"${circularValue}"`; } if (circularValue == null) { return circularValue; } if (circularValue === Error || circularValue === TypeError) { return { toString() { throw new TypeError("Converting circular structure to JSON"); } }; } throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined'); } return '"[Circular]"'; } function getBooleanOption(options, key) { if (options && Object.prototype.hasOwnProperty.call(options, key)) { var value = options[key]; if (typeof value !== "boolean") { throw new TypeError(`The "${key}" argument must be of type boolean`); } } return value === void 0 ? true : value; } function getPositiveIntegerOption(options, key) { if (options && Object.prototype.hasOwnProperty.call(options, key)) { var value = options[key]; if (typeof value !== "number") { throw new TypeError(`The "${key}" argument must be of type number`); } if (!Number.isInteger(value)) { throw new TypeError(`The "${key}" argument must be an integer`); } if (value < 1) { throw new RangeError(`The "${key}" argument must be >= 1`); } } return value === void 0 ? Infinity : value; } function getItemCount(number) { if (number === 1) { return "1 item"; } return `${number} items`; } function getUniqueReplacerSet(replacerArray) { const replacerSet = /* @__PURE__ */ new Set(); for (const value of replacerArray) { if (typeof value === "string") { replacerSet.add(value); } else if (typeof value === "number") { replacerSet.add(String(value)); } } return replacerSet; } function configure(options) { const circularValue = getCircularValueOption(options); const bigint = getBooleanOption(options, "bigint"); const deterministic = getBooleanOption(options, "deterministic"); const maximumDepth = getPositiveIntegerOption(options, "maximumDepth"); const maximumBreadth = getPositiveIntegerOption(options, "maximumBreadth"); function stringifyFnReplacer(key, parent, stack, replacer, spacer, indentation) { let value = parent[key]; if (typeof value === "object" && value !== null && typeof value.toJSON === "function") { value = value.toJSON(key); } value = replacer.call(parent, key, value); switch (typeof value) { case "string": return `"${strEscape(value)}"`; case "object": { if (value === null) { return "null"; } if (stack.indexOf(value) !== -1) { return circularValue; } let res = ""; let join = ","; const originalIndentation = indentation; if (Array.isArray(value)) { if (value.length === 0) { return "[]"; } if (maximumDepth < stack.length + 1) { return '"[Array]"'; } stack.push(value); if (spacer !== "") { indentation += spacer; res += ` ${indentation}`; join = `, ${indentation}`; } const maximumValuesToStringify = Math.min(value.length, maximumBreadth); let i = 0; for (; i < maximumValuesToStringify - 1; i++) { const tmp2 = stringifyFnReplacer(i, value, stack, replacer, spacer, indentation); res += tmp2 !== void 0 ? tmp2 : "null"; res += join; } const tmp = stringifyFnReplacer(i, value, stack, replacer, spacer, indentation); res += tmp !== void 0 ? tmp : "null"; if (value.length - 1 > maximumBreadth) { const removedKeys = value.length - maximumBreadth - 1; res += `${join}"... ${getItemCount(removedKeys)} not stringified"`; } if (spacer !== "") { res += ` ${originalIndentation}`; } stack.pop(); return `[${res}]`; } let keys = Object.keys(value); const keyLength = keys.length; if (keyLength === 0) { return "{}"; } if (maximumDepth < stack.length + 1) { return '"[Object]"'; } let whitespace = ""; let separator = ""; if (spacer !== "") { indentation += spacer; join = `, ${indentation}`; whitespace = " "; } let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth); if (isTypedArrayWithEntries(value)) { res += stringifyTypedArray(value, join, maximumBreadth); keys = keys.slice(value.length); maximumPropertiesToStringify -= value.length; separator = join; } if (deterministic) { keys = insertSort(keys); } stack.push(value); for (let i = 0; i < maximumPropertiesToStringify; i++) { const key2 = keys[i]; const tmp = stringifyFnReplacer(key2, value, stack, replacer, spacer, indentation); if (tmp !== void 0) { res += `${separator}"${strEscape(key2)}":${whitespace}${tmp}`; separator = join; } } if (keyLength > maximumBreadth) { const removedKeys = keyLength - maximumBreadth; res += `${separator}"...":${whitespace}"${getItemCount(removedKeys)} not stringified"`; separator = join; } if (spacer !== "" && separator.length > 1) { res = ` ${indentation}${res} ${originalIndentation}`; } stack.pop(); return `{${res}}`; } case "number": return isFinite(value) ? String(value) : "null"; case "boolean": return value === true ? "true" : "false"; case "bigint": return bigint ? String(value) : void 0; } } function stringifyArrayReplacer(key, value, stack, replacer, spacer, indentation) { if (typeof value === "object" && value !== null && typeof value.toJSON === "function") { value = value.toJSON(key); } switch (typeof value) { case "string": return `"${strEscape(value)}"`; case "object": { if (value === null) { return "null"; } if (stack.indexOf(value) !== -1) { return circularValue; } const originalIndentation = indentation; let res = ""; let join = ","; if (Array.isArray(value)) { if (value.length === 0) { return "[]"; } if (maximumDepth < stack.length + 1) { return '"[Array]"'; } stack.push(value); if (spacer !== "") { indentation += spacer; res += ` ${indentation}`; join = `, ${indentation}`; } const maximumValuesToStringify = Math.min(value.length, maximumBreadth); let i = 0; for (; i < maximumValuesToStringify - 1; i++) { const tmp2 = stringifyArrayReplacer(i, value[i], stack, replacer, spacer, indentation); res += tmp2 !== void 0 ? tmp2 : "null"; res += join; } const tmp = stringifyArrayReplacer(i, value[i], stack, replacer, spacer, indentation); res += tmp !== void 0 ? tmp : "null"; if (value.length - 1 > maximumBreadth) { const removedKeys = value.length - maximumBreadth - 1; res += `${join}"... ${getItemCount(removedKeys)} not stringified"`; } if (spacer !== "") { res += ` ${originalIndentation}`; } stack.pop(); return `[${res}]`; } if (replacer.size === 0) { return "{}"; } stack.push(value); let whitespace = ""; if (spacer !== "") { indentation += spacer; join = `, ${indentation}`; whitespace = " "; } let separator = ""; for (const key2 of replacer) { const tmp = stringifyArrayReplacer(key2, value[key2], stack, replacer, spacer, indentation); if (tmp !== void 0) { res += `${separator}"${strEscape(key2)}":${whitespace}${tmp}`; separator = join; } } if (spacer !== "" && separator.length > 1) { res = ` ${indentation}${res} ${originalIndentation}`; } stack.pop(); return `{${res}}`; } case "number": return isFinite(value) ? String(value) : "null"; case "boolean": return value === true ? "true" : "false"; case "bigint": return bigint ? String(value) : void 0; } } function stringifyIndent(key, value, stack, spacer, indentation) { switch (typeof value) { case "string": return `"${strEscape(value)}"`; case "object": { if (value === null) { return "null"; } if (typeof value.toJSON === "function") { value = value.toJSON(key); if (typeof value !== "object") { return stringifyIndent(key, value, stack, spacer, indentation); } if (value === null) { return "null"; } } if (stack.indexOf(value) !== -1) { return circularValue; } const originalIndentation = indentation; if (Array.isArray(value)) { if (value.length === 0) { return "[]"; } if (maximumDepth < stack.length + 1) { return '"[Array]"'; } stack.push(value); indentation += spacer; let res2 = ` ${indentation}`; const join2 = `, ${indentation}`; const maximumValuesToStringify = Math.min(value.length, maximumBreadth); let i = 0; for (; i < maximumValuesToStringify - 1; i++) { const tmp2 = stringifyIndent(i, value[i], stack, spacer, indentation); res2 += tmp2 !== void 0 ? tmp2 : "null"; res2 += join2; } const tmp = stringifyIndent(i, value[i], stack, spacer, indentation); res2 += tmp !== void 0 ? tmp : "null"; if (value.length - 1 > maximumBreadth) { const removedKeys = value.length - maximumBreadth - 1; res2 += `${join2}"... ${getItemCount(removedKeys)} not stringified"`; } res2 += ` ${originalIndentation}`; stack.pop(); return `[${res2}]`; } let keys = Object.keys(value); const keyLength = keys.length; if (keyLength === 0) { return "{}"; } if (maximumDepth < stack.length + 1) { return '"[Object]"'; } indentation += spacer; const join = `, ${indentation}`; let res = ""; let separator = ""; let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth); if (isTypedArrayWithEntries(value)) { res += stringifyTypedArray(value, join, maximumBreadth); keys = keys.slice(value.length); maximumPropertiesToStringify -= value.length; separator = join; } if (deterministic) { keys = insertSort(keys); } stack.push(value); for (let i = 0; i < maximumPropertiesToStringify; i++) { const key2 = keys[i]; const tmp = stringifyIndent(key2, value[key2], stack, spacer, indentation); if (tmp !== void 0) { res += `${separator}"${strEscape(key2)}": ${tmp}`; separator = join; } } if (keyLength > maximumBreadth) { const removedKeys = keyLength - maximumBreadth; res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"`; separator = join; } if (separator !== "") { res = ` ${indentation}${res} ${originalIndentation}`; } stack.pop(); return `{${res}}`; } case "number": return isFinite(value) ? String(value) : "null"; case "boolean": return value === true ? "true" : "false"; case "bigint": return bigint ? String(value) : void 0; } } function stringifySimple(key, value, stack) { switch (typeof value) { case "string": return `"${strEscape(value)}"`; case "object": { if (value === null) { return "null"; } if (typeof value.toJSON === "function") { value = value.toJSON(key); if (typeof value !== "object") { return stringifySimple(key, value, stack); } if (value === null) { return "null"; } } if (stack.indexOf(value) !== -1) { return circularValue; } let res = ""; if (Array.isArray(value)) { if (value.length === 0) { return "[]"; } if (maximumDepth < stack.length + 1) { return '"[Array]"'; } stack.push(value); const maximumValuesToStringify = Math.min(value.length, maximumBreadth); let i = 0; for (; i < maximumValuesToStringify - 1; i++) { const tmp2 = stringifySimple(i, value[i], stack); res += tmp2 !== void 0 ? tmp2 : "null"; res += ","; } const tmp = stringifySimple(i, value[i], stack); res += tmp !== void 0 ? tmp : "null"; if (value.length - 1 > maximumBreadth) { const removedKeys = value.length - maximumBreadth - 1; res += `,"... ${getItemCount(removedKeys)} not stringified"`; } stack.pop(); return `[${res}]`; } let keys = Object.keys(value); const keyLength = keys.length; if (keyLength === 0) { return "{}"; } if (maximumDepth < stack.length + 1) { return '"[Object]"'; } let separator = ""; let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth); if (isTypedArrayWithEntries(value)) { res += stringifyTypedArray(value, ",", maximumBreadth); keys = keys.slice(value.length); maximumPropertiesToStringify -= value.length; separator = ","; } if (deterministic) { keys = insertSort(keys); } stack.push(value); for (let i = 0; i < maximumPropertiesToStringify; i++) { const key2 = keys[i]; const tmp = stringifySimple(key2, value[key2], stack); if (tmp !== void 0) { res += `${separator}"${strEscape(key2)}":${tmp}`; separator = ","; } } if (keyLength > maximumBreadth) { const removedKeys = keyLength - maximumBreadth; res += `${separator}"...":"${getItemCount(removedKeys)} not stringified"`; } stack.pop(); return `{${res}}`; } case "number": return isFinite(value) ? String(value) : "null"; case "boolean": return value === true ? "true" : "false"; case "bigint": return bigint ? String(value) : void 0; } } function stringify2(value, replacer, space) { if (arguments.length > 1) { let spacer = ""; if (typeof space === "number") { spacer = " ".repeat(Math.min(space, 10)); } else if (typeof space === "string") { spacer = space.slice(0, 10); } if (replacer != null) { if (typeof replacer === "function") { return stringifyFnReplacer("", { "": value }, [], replacer, spacer, ""); } if (Array.isArray(replacer)) { return stringifyArrayReplacer("", value, [], getUniqueReplacerSet(replacer), spacer, ""); } } if (spacer.length !== 0) { return stringifyIndent("", value, [], spacer, ""); } } return stringifySimple("", value, []); } return stringify2; } } }); // ../../node_modules/winston/lib/winston/transports/http.js var require_http = __commonJS({ "../../node_modules/winston/lib/winston/transports/http.js"(exports2, module2) { "use strict"; var http = require("http"); var https = require("https"); var { Stream } = require_readable(); var TransportStream = require_winston_transport(); var jsonStringify = require_safe_stable_stringify2(); module2.exports = class Http extends TransportStream { constructor(options = {}) { super(options); this.options = options; this.name = options.name || "http"; this.ssl = !!options.ssl; this.host = options.host || "localhost"; this.port = options.port; this.auth = options.auth; this.path = options.path || ""; this.agent = options.agent; this.headers = options.headers || {}; this.headers["content-type"] = "application/json"; this.batch = options.batch || false; this.batchInterval = options.batchInterval || 5e3; this.batchCount = options.batchCount || 10; this.batchOptions = []; this.batchTimeoutID = -1; this.batchCallback = {}; if (!this.port) { this.port = this.ssl ? 443 : 80; } } log(info, callback) { this._request(info, (err, res) => { if (res && res.statusCode !== 200) { err = new Error(`Invalid HTTP Status Code: ${res.statusCode}`); } if (err) { this.emit("warn", err); } else { this.emit("logged", info); } }); if (callback) { setImmediate(callback); } } query(options, callback) { if (typeof options === "function") { callback = options; options = {}; } options = { method: "query", params: this.normalizeQuery(options) }; if (options.params.path) { options.path = options.params.path; delete options.params.path; } if (options.params.auth) { options.auth = options.params.auth; delete options.params.auth; } this._request(options, (err, res, body) => { if (res && res.statusCode !== 200) { err = new Error(`Invalid HTTP Status Code: ${res.statusCode}`); } if (err) { return callback(err); } if (typeof body === "string") { try { body = JSON.parse(body); } catch (e) { return callback(e); } } callback(null, body); }); } stream(options = {}) { const stream = new Stream(); options = { method: "stream", params: options }; if (options.params.path) { options.path = options.params.path; delete options.params.path; } if (options.params.auth) { options.auth = options.params.auth; delete options.params.auth; } let buff = ""; const req = this._request(options); stream.destroy = () => req.destroy(); req.on("data", (data) => { data = (buff + data).split(/\n+/); const l = data.length - 1; let i = 0; for (; i < l; i++) { try { stream.emit("log", JSON.parse(data[i])); } catch (e) { stream.emit("error", e); } } buff = data[l]; }); req.on("error", (err) => stream.emit("error", err)); return stream; } _request(options, callback) { options = options || {}; const auth = options.auth || this.auth; const path2 = options.path || this.path || ""; delete options.auth; delete options.path; if (this.batch) { this._doBatch(options, callback, auth, path2); } else { this._doRequest(options, callback, auth, path2); } } _doBatch(options, callback, auth, path2) { this.batchOptions.push(options); if (this.batchOptions.length === 1) { const me = this; this.batchCallback = callback; this.batchTimeoutID = setTimeout(function() { me.batchTimeoutID = -1; me._doBatchRequest(me.batchCallback, auth, path2); }, this.batchInterval); } if (this.batchOptions.length === this.batchCount) { this._doBatchRequest(this.batchCallback, auth, path2); } } _doBatchRequest(callback, auth, path2) { if (this.batchTimeoutID > 0) { clearTimeout(this.batchTimeoutID); this.batchTimeoutID = -1; } const batchOptionsCopy = this.batchOptions.slice(); this.batchOptions = []; this._doRequest(batchOptionsCopy, callback, auth, path2); } _doRequest(options, callback, auth, path2) { const headers = Object.assign({}, this.headers); if (auth && auth.bearer) { headers.Authorization = `Bearer ${auth.bearer}`; } const req = (this.ssl ? https : http).request(__spreadProps(__spreadValues({}, this.options), { method: "POST", host: this.host, port: this.port, path: `/${path2.replace(/^\//, "")}`, headers, auth: auth && auth.username && auth.password ? `${auth.username}:${auth.password}` : "", agent: this.agent })); req.on("error", callback); req.on("response", (res) => res.on("end", () => callback(null, res)).resume()); req.end(Buffer.from(jsonStringify(options), "utf8")); } }; } }); // ../../node_modules/is-stream/index.js var require_is_stream = __commonJS({ "../../node_modules/is-stream/index.js"(exports2, module2) { "use strict"; var isStream = (stream) => stream !== null && typeof stream === "object" && typeof stream.pipe === "function"; isStream.writable = (stream) => isStream(stream) && stream.writable !== false && typeof stream._write === "function" && typeof stream._writableState === "object"; isStream.readable = (stream) => isStream(stream) && stream.readable !== false && typeof stream._read === "function" && typeof stream._readableState === "object"; isStream.duplex = (stream) => isStream.writable(stream) && isStream.readable(stream); isStream.transform = (stream) => isStream.duplex(stream) && typeof stream._transform === "function" && typeof stream._transformState === "object"; module2.exports = isStream; } }); // ../../node_modules/winston/lib/winston/transports/stream.js var require_stream3 = __commonJS({ "../../node_modules/winston/lib/winston/transports/stream.js"(exports2, module2) { "use strict"; var isStream = require_is_stream(); var { MESSAGE } = require_triple_beam(); var os = require("os"); var TransportStream = require_winston_transport(); module2.exports = class Stream extends TransportStream { constructor(options = {}) { super(options); if (!options.stream || !isStream(options.stream)) { throw new Error("options.stream is required."); } this._stream = options.stream; this._stream.setMaxListeners(Infinity); this.isObjectMode = options.stream._writableState.objectMode; this.eol = typeof options.eol === "string" ? options.eol : os.EOL; } log(info, callback) { setImmediate(() => this.emit("logged", info)); if (this.isObjectMode) { this._stream.write(info); if (callback) { callback(); } return; } this._stream.write(`${info[MESSAGE]}${this.eol}`); if (callback) { callback(); } return; } }; } }); // ../../node_modules/winston/lib/winston/transports/index.js var require_transports = __commonJS({ "../../node_modules/winston/lib/winston/transports/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "Console", { configurable: true, enumerable: true, get() { return require_console(); } }); Object.defineProperty(exports2, "File", { configurable: true, enumerable: true, get() { return require_file2(); } }); Object.defineProperty(exports2, "Http", { configurable: true, enumerable: true, get() { return require_http(); } }); Object.defineProperty(exports2, "Stream", { configurable: true, enumerable: true, get() { return require_stream3(); } }); } }); // ../../node_modules/winston/lib/winston/config/index.js var require_config2 = __commonJS({ "../../node_modules/winston/lib/winston/config/index.js"(exports2) { "use strict"; var logform = require_logform(); var { configs } = require_triple_beam(); exports2.cli = logform.levels(configs.cli); exports2.npm = logform.levels(configs.npm); exports2.syslog = logform.levels(configs.syslog); exports2.addColors = logform.levels; } }); // ../../node_modules/async/eachOf.js var require_eachOf = __commonJS({ "../../node_modules/async/eachOf.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var _isArrayLike = require_isArrayLike(); var _isArrayLike2 = _interopRequireDefault(_isArrayLike); var _breakLoop = require_breakLoop(); var _breakLoop2 = _interopRequireDefault(_breakLoop); var _eachOfLimit = require_eachOfLimit2(); var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); var _once = require_once2(); var _once2 = _interopRequireDefault(_once); var _onlyOnce = require_onlyOnce(); var _onlyOnce2 = _interopRequireDefault(_onlyOnce); var _wrapAsync = require_wrapAsync(); var _wrapAsync2 = _interopRequireDefault(_wrapAsync); var _awaitify = require_awaitify(); var _awaitify2 = _interopRequireDefault(_awaitify); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function eachOfArrayLike(coll, iteratee, callback) { callback = (0, _once2.default)(callback); var index = 0, completed = 0, { length } = coll, canceled = false; if (length === 0) { callback(null); } function iteratorCallback(err, value) { if (err === false) { canceled = true; } if (canceled === true) return; if (err) { callback(err); } else if (++completed === length || value === _breakLoop2.default) { callback(null); } } for (; index < length; index++) { iteratee(coll[index], index, (0, _onlyOnce2.default)(iteratorCallback)); } } function eachOfGeneric(coll, iteratee, callback) { return (0, _eachOfLimit2.default)(coll, Infinity, iteratee, callback); } function eachOf(coll, iteratee, callback) { var eachOfImplementation = (0, _isArrayLike2.default)(coll) ? eachOfArrayLike : eachOfGeneric; return eachOfImplementation(coll, (0, _wrapAsync2.default)(iteratee), callback); } exports2.default = (0, _awaitify2.default)(eachOf, 3); module2.exports = exports2["default"]; } }); // ../../node_modules/async/internal/withoutIndex.js var require_withoutIndex = __commonJS({ "../../node_modules/async/internal/withoutIndex.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = _withoutIndex; function _withoutIndex(iteratee) { return (value, index, callback) => iteratee(value, callback); } module2.exports = exports2["default"]; } }); // ../../node_modules/async/forEach.js var require_forEach = __commonJS({ "../../node_modules/async/forEach.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var _eachOf = require_eachOf(); var _eachOf2 = _interopRequireDefault(_eachOf); var _withoutIndex = require_withoutIndex(); var _withoutIndex2 = _interopRequireDefault(_withoutIndex); var _wrapAsync = require_wrapAsync(); var _wrapAsync2 = _interopRequireDefault(_wrapAsync); var _awaitify = require_awaitify(); var _awaitify2 = _interopRequireDefault(_awaitify); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function eachLimit(coll, iteratee, callback) { return (0, _eachOf2.default)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback); } exports2.default = (0, _awaitify2.default)(eachLimit, 3); module2.exports = exports2["default"]; } }); // ../../node_modules/fn.name/index.js var require_fn = __commonJS({ "../../node_modules/fn.name/index.js"(exports2, module2) { "use strict"; var toString = Object.prototype.toString; module2.exports = function name(fn) { if (typeof fn.displayName === "string" && fn.constructor.name) { return fn.displayName; } else if (typeof fn.name === "string" && fn.name) { return fn.name; } if (typeof fn === "object" && fn.constructor && typeof fn.constructor.name === "string") return fn.constructor.name; var named = fn.toString(), type = toString.call(fn).slice(8, -1); if (type === "Function") { named = named.substring(named.indexOf("(") + 1, named.indexOf(")")); } else { named = type; } return named || "anonymous"; }; } }); // ../../node_modules/one-time/index.js var require_one_time = __commonJS({ "../../node_modules/one-time/index.js"(exports2, module2) { "use strict"; var name = require_fn(); module2.exports = function one(fn) { var called = 0, value; function onetime() { if (called) return value; called = 1; value = fn.apply(this, arguments); fn = null; return value; } onetime.displayName = name(fn); return onetime; }; } }); // ../../node_modules/stack-trace/lib/stack-trace.js var require_stack_trace = __commonJS({ "../../node_modules/stack-trace/lib/stack-trace.js"(exports2) { exports2.get = function(belowFn) { var oldLimit = Error.stackTraceLimit; Error.stackTraceLimit = Infinity; var dummyObject = {}; var v8Handler = Error.prepareStackTrace; Error.prepareStackTrace = function(dummyObject2, v8StackTrace2) { return v8StackTrace2; }; Error.captureStackTrace(dummyObject, belowFn || exports2.get); var v8StackTrace = dummyObject.stack; Error.prepareStackTrace = v8Handler; Error.stackTraceLimit = oldLimit; return v8StackTrace; }; exports2.parse = function(err) { if (!err.stack) { return []; } var self = this; var lines = err.stack.split("\n").slice(1); return lines.map(function(line) { if (line.match(/^\s*[-]{4,}$/)) { return self._createParsedCallSite({ fileName: line, lineNumber: null, functionName: null, typeName: null, methodName: null, columnNumber: null, "native": null }); } var lineMatch = line.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/); if (!lineMatch) { return; } var object = null; var method = null; var functionName = null; var typeName = null; var methodName = null; var isNative = lineMatch[5] === "native"; if (lineMatch[1]) { functionName = lineMatch[1]; var methodStart = functionName.lastIndexOf("."); if (functionName[methodStart - 1] == ".") methodStart--; if (methodStart > 0) { object = functionName.substr(0, methodStart); method = functionName.substr(methodStart + 1); var objectEnd = object.indexOf(".Module"); if (objectEnd > 0) { functionName = functionName.substr(objectEnd + 1); object = object.substr(0, objectEnd); } } typeName = null; } if (method) { typeName = object; methodName = method; } if (method === "") { methodName = null; functionName = null; } var properties = { fileName: lineMatch[2] || null, lineNumber: parseInt(lineMatch[3], 10) || null, functionName, typeName, methodName, columnNumber: parseInt(lineMatch[4], 10) || null, "native": isNative }; return self._createParsedCallSite(properties); }).filter(function(callSite) { return !!callSite; }); }; function CallSite(properties) { for (var property in properties) { this[property] = properties[property]; } } var strProperties = [ "this", "typeName", "functionName", "methodName", "fileName", "lineNumber", "columnNumber", "function", "evalOrigin" ]; var boolProperties = [ "topLevel", "eval", "native", "constructor" ]; strProperties.forEach(function(property) { CallSite.prototype[property] = null; CallSite.prototype["get" + property[0].toUpperCase() + property.substr(1)] = function() { return this[property]; }; }); boolProperties.forEach(function(property) { CallSite.prototype[property] = false; CallSite.prototype["is" + property[0].toUpperCase() + property.substr(1)] = function() { return this[property]; }; }); exports2._createParsedCallSite = function(properties) { return new CallSite(properties); }; } }); // ../../node_modules/winston/lib/winston/exception-stream.js var require_exception_stream = __commonJS({ "../../node_modules/winston/lib/winston/exception-stream.js"(exports2, module2) { "use strict"; var { Writable } = require_readable(); module2.exports = class ExceptionStream extends Writable { constructor(transport) { super({ objectMode: true }); if (!transport) { throw new Error("ExceptionStream requires a TransportStream instance."); } this.handleExceptions = true; this.transport = transport; } _write(info, enc, callback) { if (info.exception) { return this.transport.log(info, callback); } callback(); return true; } }; } }); // ../../node_modules/winston/lib/winston/exception-handler.js var require_exception_handler = __commonJS({ "../../node_modules/winston/lib/winston/exception-handler.js"(exports2, module2) { "use strict"; var os = require("os"); var asyncForEach = require_forEach(); var debug = require_node2()("winston:exception"); var once = require_one_time(); var stackTrace = require_stack_trace(); var ExceptionStream = require_exception_stream(); module2.exports = class ExceptionHandler { constructor(logger) { if (!logger) { throw new Error("Logger is required to handle exceptions"); } this.logger = logger; this.handlers = /* @__PURE__ */ new Map(); } handle(...args) { args.forEach((arg) => { if (Array.isArray(arg)) { return arg.forEach((handler) => this._addHandler(handler)); } this._addHandler(arg); }); if (!this.catcher) { this.catcher = this._uncaughtException.bind(this); process.on("uncaughtException", this.catcher); } } unhandle() { if (this.catcher) { process.removeListener("uncaughtException", this.catcher); this.catcher = false; Array.from(this.handlers.values()).forEach((wrapper) => this.logger.unpipe(wrapper)); } } getAllInfo(err) { let { message } = err; if (!message && typeof err === "string") { message = err; } return { error: err, level: "error", message: [ `uncaughtException: ${message || "(no error message)"}`, err.stack || " No stack trace" ].join("\n"), stack: err.stack, exception: true, date: new Date().toString(), process: this.getProcessInfo(), os: this.getOsInfo(), trace: this.getTrace(err) }; } getProcessInfo() { return { pid: process.pid, uid: process.getuid ? process.getuid() : null, gid: process.getgid ? process.getgid() : null, cwd: process.cwd(), execPath: process.execPath, version: process.version, argv: process.argv, memoryUsage: process.memoryUsage() }; } getOsInfo() { return { loadavg: os.loadavg(), uptime: os.uptime() }; } getTrace(err) { const trace = err ? stackTrace.parse(err) : stackTrace.get(); return trace.map((site) => { return { column: site.getColumnNumber(), file: site.getFileName(), function: site.getFunctionName(), line: site.getLineNumber(), method: site.getMethodName(), native: site.isNative() }; }); } _addHandler(handler) { if (!this.handlers.has(handler)) { handler.handleExceptions = true; const wrapper = new ExceptionStream(handler); this.handlers.set(handler, wrapper); this.logger.pipe(wrapper); } } _uncaughtException(err) { const info = this.getAllInfo(err); const handlers = this._getExceptionHandlers(); let doExit = typeof this.logger.exitOnError === "function" ? this.logger.exitOnError(err) : this.logger.exitOnError; let timeout2; if (!handlers.length && doExit) { console.warn("winston: exitOnError cannot be true with no exception handlers."); console.warn("winston: not exiting process."); doExit = false; } function gracefulExit() { debug("doExit", doExit); debug("process._exiting", process._exiting); if (doExit && !process._exiting) { if (timeout2) { clearTimeout(timeout2); } process.exit(1); } } if (!handlers || handlers.length === 0) { return process.nextTick(gracefulExit); } asyncForEach(handlers, (handler, next) => { const done = once(next); const transport = handler.transport || handler; function onDone(event) { return () => { debug(event); done(); }; } transport._ending = true; transport.once("finish", onDone("finished")); transport.once("error", onDone("error")); }, () => doExit && gracefulExit()); this.logger.log(info); if (doExit) { timeout2 = setTimeout(gracefulExit, 3e3); } } _getExceptionHandlers() { return this.logger.transports.filter((wrap) => { const transport = wrap.transport || wrap; return transport.handleExceptions; }); } }; } }); // ../../node_modules/winston/lib/winston/rejection-handler.js var require_rejection_handler = __commonJS({ "../../node_modules/winston/lib/winston/rejection-handler.js"(exports2, module2) { "use strict"; var os = require("os"); var asyncForEach = require_forEach(); var debug = require_node2()("winston:rejection"); var once = require_one_time(); var stackTrace = require_stack_trace(); var ExceptionStream = require_exception_stream(); module2.exports = class RejectionHandler { constructor(logger) { if (!logger) { throw new Error("Logger is required to handle rejections"); } this.logger = logger; this.handlers = /* @__PURE__ */ new Map(); } handle(...args) { args.forEach((arg) => { if (Array.isArray(arg)) { return arg.forEach((handler) => this._addHandler(handler)); } this._addHandler(arg); }); if (!this.catcher) { this.catcher = this._unhandledRejection.bind(this); process.on("unhandledRejection", this.catcher); } } unhandle() { if (this.catcher) { process.removeListener("unhandledRejection", this.catcher); this.catcher = false; Array.from(this.handlers.values()).forEach((wrapper) => this.logger.unpipe(wrapper)); } } getAllInfo(err) { let message = null; if (err) { message = typeof err === "string" ? err : err.message; } return { error: err, level: "error", message: [ `unhandledRejection: ${message || "(no error message)"}`, err && err.stack || " No stack trace" ].join("\n"), stack: err && err.stack, exception: true, date: new Date().toString(), process: this.getProcessInfo(), os: this.getOsInfo(), trace: this.getTrace(err) }; } getProcessInfo() { return { pid: process.pid, uid: process.getuid ? process.getuid() : null, gid: process.getgid ? process.getgid() : null, cwd: process.cwd(), execPath: process.execPath, version: process.version, argv: process.argv, memoryUsage: process.memoryUsage() }; } getOsInfo() { return { loadavg: os.loadavg(), uptime: os.uptime() }; } getTrace(err) { const trace = err ? stackTrace.parse(err) : stackTrace.get(); return trace.map((site) => { return { column: site.getColumnNumber(), file: site.getFileName(), function: site.getFunctionName(), line: site.getLineNumber(), method: site.getMethodName(), native: site.isNative() }; }); } _addHandler(handler) { if (!this.handlers.has(handler)) { handler.handleRejections = true; const wrapper = new ExceptionStream(handler); this.handlers.set(handler, wrapper); this.logger.pipe(wrapper); } } _unhandledRejection(err) { const info = this.getAllInfo(err); const handlers = this._getRejectionHandlers(); let doExit = typeof this.logger.exitOnError === "function" ? this.logger.exitOnError(err) : this.logger.exitOnError; let timeout2; if (!handlers.length && doExit) { console.warn("winston: exitOnError cannot be true with no rejection handlers."); console.warn("winston: not exiting process."); doExit = false; } function gracefulExit() { debug("doExit", doExit); debug("process._exiting", process._exiting); if (doExit && !process._exiting) { if (timeout2) { clearTimeout(timeout2); } process.exit(1); } } if (!handlers || handlers.length === 0) { return process.nextTick(gracefulExit); } asyncForEach(handlers, (handler, next) => { const done = once(next); const transport = handler.transport || handler; function onDone(event) { return () => { debug(event); done(); }; } transport._ending = true; transport.once("finish", onDone("finished")); transport.once("error", onDone("error")); }, () => doExit && gracefulExit()); this.logger.log(info); if (doExit) { timeout2 = setTimeout(gracefulExit, 3e3); } } _getRejectionHandlers() { return this.logger.transports.filter((wrap) => { const transport = wrap.transport || wrap; return transport.handleRejections; }); } }; } }); // ../../node_modules/winston/lib/winston/profiler.js var require_profiler = __commonJS({ "../../node_modules/winston/lib/winston/profiler.js"(exports2, module2) { "use strict"; module2.exports = class Profiler { constructor(logger) { if (!logger) { throw new Error("Logger is required for profiling."); } this.logger = logger; this.start = Date.now(); } done(...args) { if (typeof args[args.length - 1] === "function") { console.warn("Callback function no longer supported as of winston@3.0.0"); args.pop(); } const info = typeof args[args.length - 1] === "object" ? args.pop() : {}; info.level = info.level || "info"; info.durationMs = Date.now() - this.start; return this.logger.write(info); } }; } }); // ../../node_modules/winston/lib/winston/logger.js var require_logger = __commonJS({ "../../node_modules/winston/lib/winston/logger.js"(exports2, module2) { "use strict"; var { Stream, Transform } = require_readable(); var asyncForEach = require_forEach(); var { LEVEL, SPLAT } = require_triple_beam(); var isStream = require_is_stream(); var ExceptionHandler = require_exception_handler(); var RejectionHandler = require_rejection_handler(); var LegacyTransportStream = require_legacy(); var Profiler = require_profiler(); var { warn } = require_common(); var config = require_config2(); var formatRegExp = /%[scdjifoO%]/g; var Logger = class extends Transform { constructor(options) { super({ objectMode: true }); this.configure(options); } child(defaultRequestMetadata) { const logger = this; return Object.create(logger, { write: { value: function(info) { const infoClone = Object.assign({}, defaultRequestMetadata, info); if (info instanceof Error) { infoClone.stack = info.stack; infoClone.message = info.message; } logger.write(infoClone); } } }); } configure({ silent, format, defaultMeta, levels, level = "info", exitOnError = true, transports, colors, emitErrs, formatters, padLevels, rewriters, stripColors, exceptionHandlers, rejectionHandlers } = {}) { if (this.transports.length) { this.clear(); } this.silent = silent; this.format = format || this.format || require_json2()(); this.defaultMeta = defaultMeta || null; this.levels = levels || this.levels || config.npm.levels; this.level = level; if (this.exceptions) { this.exceptions.unhandle(); } if (this.rejections) { this.rejections.unhandle(); } this.exceptions = new ExceptionHandler(this); this.rejections = new RejectionHandler(this); this.profilers = {}; this.exitOnError = exitOnError; if (transports) { transports = Array.isArray(transports) ? transports : [transports]; transports.forEach((transport) => this.add(transport)); } if (colors || emitErrs || formatters || padLevels || rewriters || stripColors) { throw new Error([ "{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.", "Use a custom winston.format(function) instead.", "See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md" ].join("\n")); } if (exceptionHandlers) { this.exceptions.handle(exceptionHandlers); } if (rejectionHandlers) { this.rejections.handle(rejectionHandlers); } } isLevelEnabled(level) { const givenLevelValue = getLevelValue(this.levels, level); if (givenLevelValue === null) { return false; } const configuredLevelValue = getLevelValue(this.levels, this.level); if (configuredLevelValue === null) { return false; } if (!this.transports || this.transports.length === 0) { return configuredLevelValue >= givenLevelValue; } const index = this.transports.findIndex((transport) => { let transportLevelValue = getLevelValue(this.levels, transport.level); if (transportLevelValue === null) { transportLevelValue = configuredLevelValue; } return transportLevelValue >= givenLevelValue; }); return index !== -1; } log(level, msg, ...splat) { if (arguments.length === 1) { level[LEVEL] = level.level; this._addDefaultMeta(level); this.write(level); return this; } if (arguments.length === 2) { if (msg && typeof msg === "object") { msg[LEVEL] = msg.level = level; this._addDefaultMeta(msg); this.write(msg); return this; } msg = { [LEVEL]: level, level, message: msg }; this._addDefaultMeta(msg); this.write(msg); return this; } const [meta] = splat; if (typeof meta === "object" && meta !== null) { const tokens = msg && msg.match && msg.match(formatRegExp); if (!tokens) { const info = Object.assign({}, this.defaultMeta, meta, { [LEVEL]: level, [SPLAT]: splat, level, message: msg }); if (meta.message) info.message = `${info.message} ${meta.message}`; if (meta.stack) info.stack = meta.stack; this.write(info); return this; } } this.write(Object.assign({}, this.defaultMeta, { [LEVEL]: level, [SPLAT]: splat, level, message: msg })); return this; } _transform(info, enc, callback) { if (this.silent) { return callback(); } if (!info[LEVEL]) { info[LEVEL] = info.level; } if (!this.levels[info[LEVEL]] && this.levels[info[LEVEL]] !== 0) { console.error("[winston] Unknown logger level: %s", info[LEVEL]); } if (!this._readableState.pipes) { console.error("[winston] Attempt to write logs with no transports %j", info); } try { this.push(this.format.transform(info, this.format.options)); } catch (ex) { throw ex; } finally { callback(); } } _final(callback) { const transports = this.transports.slice(); asyncForEach(transports, (transport, next) => { if (!transport || transport.finished) return setImmediate(next); transport.once("finish", next); transport.end(); }, callback); } add(transport) { const target = !isStream(transport) || transport.log.length > 2 ? new LegacyTransportStream({ transport }) : transport; if (!target._writableState || !target._writableState.objectMode) { throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }."); } this._onEvent("error", target); this._onEvent("warn", target); this.pipe(target); if (transport.handleExceptions) { this.exceptions.handle(); } if (transport.handleRejections) { this.rejections.handle(); } return this; } remove(transport) { if (!transport) return this; let target = transport; if (!isStream(transport) || transport.log.length > 2) { target = this.transports.filter((match) => match.transport === transport)[0]; } if (target) { this.unpipe(target); } return this; } clear() { this.unpipe(); return this; } close() { this.exceptions.unhandle(); this.rejections.unhandle(); this.clear(); this.emit("close"); return this; } setLevels() { warn.deprecated("setLevels"); } query(options, callback) { if (typeof options === "function") { callback = options; options = {}; } options = options || {}; const results = {}; const queryObject = Object.assign({}, options.query || {}); function queryTransport(transport, next) { if (options.query && typeof transport.formatQuery === "function") { options.query = transport.formatQuery(queryObject); } transport.query(options, (err, res) => { if (err) { return next(err); } if (typeof transport.formatResults === "function") { res = transport.formatResults(res, options.format); } next(null, res); }); } function addResults(transport, next) { queryTransport(transport, (err, result) => { if (next) { result = err || result; if (result) { results[transport.name] = result; } next(); } next = null; }); } asyncForEach(this.transports.filter((transport) => !!transport.query), addResults, () => callback(null, results)); } stream(options = {}) { const out = new Stream(); const streams = []; out._streams = streams; out.destroy = () => { let i = streams.length; while (i--) { streams[i].destroy(); } }; this.transports.filter((transport) => !!transport.stream).forEach((transport) => { const str = transport.stream(options); if (!str) { return; } streams.push(str); str.on("log", (log) => { log.transport = log.transport || []; log.transport.push(transport.name); out.emit("log", log); }); str.on("error", (err) => { err.transport = err.transport || []; err.transport.push(transport.name); out.emit("error", err); }); }); return out; } startTimer() { return new Profiler(this); } profile(id, ...args) { const time = Date.now(); if (this.profilers[id]) { const timeEnd = this.profilers[id]; delete this.profilers[id]; if (typeof args[args.length - 2] === "function") { console.warn("Callback function no longer supported as of winston@3.0.0"); args.pop(); } const info = typeof args[args.length - 1] === "object" ? args.pop() : {}; info.level = info.level || "info"; info.durationMs = time - timeEnd; info.message = info.message || id; return this.write(info); } this.profilers[id] = time; return this; } handleExceptions(...args) { console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"); this.exceptions.handle(...args); } unhandleExceptions(...args) { console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"); this.exceptions.unhandle(...args); } cli() { throw new Error([ "Logger.cli() was removed in winston@3.0.0", "Use a custom winston.formats.cli() instead.", "See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md" ].join("\n")); } _onEvent(event, transport) { function transportEvent(err) { if (event === "error" && !this.transports.includes(transport)) { this.add(transport); } this.emit(event, err, transport); } if (!transport["__winston" + event]) { transport["__winston" + event] = transportEvent.bind(this); transport.on(event, transport["__winston" + event]); } } _addDefaultMeta(msg) { if (this.defaultMeta) { Object.assign(msg, this.defaultMeta); } } }; function getLevelValue(levels, level) { const value = levels[level]; if (!value && value !== 0) { return null; } return value; } Object.defineProperty(Logger.prototype, "transports", { configurable: false, enumerable: true, get() { const { pipes } = this._readableState; return !Array.isArray(pipes) ? [pipes].filter(Boolean) : pipes; } }); module2.exports = Logger; } }); // ../../node_modules/winston/lib/winston/create-logger.js var require_create_logger = __commonJS({ "../../node_modules/winston/lib/winston/create-logger.js"(exports2, module2) { "use strict"; var { LEVEL } = require_triple_beam(); var config = require_config2(); var Logger = require_logger(); var debug = require_node2()("winston:create-logger"); function isLevelEnabledFunctionName(level) { return "is" + level.charAt(0).toUpperCase() + level.slice(1) + "Enabled"; } module2.exports = function(opts = {}) { opts.levels = opts.levels || config.npm.levels; class DerivedLogger extends Logger { constructor(options) { super(options); } } const logger = new DerivedLogger(opts); Object.keys(opts.levels).forEach(function(level) { debug('Define prototype method for "%s"', level); if (level === "log") { console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.'); return; } DerivedLogger.prototype[level] = function(...args) { const self = this || logger; if (args.length === 1) { const [msg] = args; const info = msg && msg.message && msg || { message: msg }; info.level = info[LEVEL] = level; self._addDefaultMeta(info); self.write(info); return this || logger; } if (args.length === 0) { self.log(level, ""); return self; } return self.log(level, ...args); }; DerivedLogger.prototype[isLevelEnabledFunctionName(level)] = function() { return (this || logger).isLevelEnabled(level); }; }); return logger; }; } }); // ../../node_modules/winston/lib/winston/container.js var require_container = __commonJS({ "../../node_modules/winston/lib/winston/container.js"(exports2, module2) { "use strict"; var createLogger = require_create_logger(); module2.exports = class Container { constructor(options = {}) { this.loggers = /* @__PURE__ */ new Map(); this.options = options; } add(id, options) { if (!this.loggers.has(id)) { options = Object.assign({}, options || this.options); const existing = options.transports || this.options.transports; options.transports = existing ? existing.slice() : []; const logger = createLogger(options); logger.on("close", () => this._delete(id)); this.loggers.set(id, logger); } return this.loggers.get(id); } get(id, options) { return this.add(id, options); } has(id) { return !!this.loggers.has(id); } close(id) { if (id) { return this._removeLogger(id); } this.loggers.forEach((val, key) => this._removeLogger(key)); } _removeLogger(id) { if (!this.loggers.has(id)) { return; } const logger = this.loggers.get(id); logger.close(); this._delete(id); } _delete(id) { this.loggers.delete(id); } }; } }); // ../../node_modules/winston/lib/winston.js var require_winston = __commonJS({ "../../node_modules/winston/lib/winston.js"(exports2) { "use strict"; var logform = require_logform(); var { warn } = require_common(); exports2.version = require_package2().version; exports2.transports = require_transports(); exports2.config = require_config2(); exports2.addColors = logform.levels; exports2.format = logform.format; exports2.createLogger = require_create_logger(); exports2.ExceptionHandler = require_exception_handler(); exports2.RejectionHandler = require_rejection_handler(); exports2.Container = require_container(); exports2.Transport = require_winston_transport(); exports2.loggers = new exports2.Container(); var defaultLogger = exports2.createLogger(); Object.keys(exports2.config.npm.levels).concat([ "log", "query", "stream", "add", "remove", "clear", "profile", "startTimer", "handleExceptions", "unhandleExceptions", "handleRejections", "unhandleRejections", "configure", "child" ]).forEach((method) => exports2[method] = (...args) => defaultLogger[method](...args)); Object.defineProperty(exports2, "level", { get() { return defaultLogger.level; }, set(val) { defaultLogger.level = val; } }); Object.defineProperty(exports2, "exceptions", { get() { return defaultLogger.exceptions; } }); ["exitOnError"].forEach((prop) => { Object.defineProperty(exports2, prop, { get() { return defaultLogger[prop]; }, set(val) { defaultLogger[prop] = val; } }); }); Object.defineProperty(exports2, "default", { get() { return { exceptionHandlers: defaultLogger.exceptionHandlers, rejectionHandlers: defaultLogger.rejectionHandlers, transports: defaultLogger.transports }; } }); warn.deprecated(exports2, "setLevels"); warn.forFunctions(exports2, "useFormat", ["cli"]); warn.forProperties(exports2, "useFormat", ["padLevels", "stripColors"]); warn.forFunctions(exports2, "deprecated", [ "addRewriter", "addFilter", "clone", "extend" ]); warn.forProperties(exports2, "deprecated", ["emitErrs", "levelLength"]); warn.moved(exports2, "createLogger", "Logger"); } }); // src/logger.js var require_logger2 = __commonJS({ "src/logger.js"(exports2, module2) { "use strict"; var { createLogger, format, transports } = require_winston(); var { LOG_LEVEL = "info", NODE_ENV = "development", CARBON_TELEMETRY_DEBUG } = process.env; var { combine, errors, label, prettyPrint, splat, timestamp } = format; var logger = createLogger({ silent: !CARBON_TELEMETRY_DEBUG, level: LOG_LEVEL, format: combine(label({ label: "carbon.telemetry" }), splat(), timestamp(), errors({ stack: true }), prettyPrint()), transports: [new transports.Console()] }); module2.exports = { logger }; } }); // src/network.js var require_network = __commonJS({ "src/network.js"(exports2, module2) { "use strict"; var got = require_source5(); var { logger } = require_logger2(); var Network = { async send(endpoint, query, variables = {}) { logger.debug(endpoint); logger.debug(query); logger.debug(variables); if (!endpoint) { logger.info("No endpoint provided for telemetry to report data. No request was made."); return; } await got.post(endpoint, { headers: { "Content-Type": "application/json" }, body: JSON.stringify({ query, variables }), timeout: 1e3 * 15 }); } }; module2.exports = { Network }; } }); // src/collect/install.js var require_install = __commonJS({ "src/collect/install.js"(exports2, module2) { "use strict"; var { Network } = require_network(); async function install(env, project, pkg) { const query = ` mutation PackageInstall($input: PackageInstallInput!) { packageInstall(input: $input) { job { done } } } `; const input = { package: { name: pkg.packageJson.name, version: pkg.packageJson.version }, project: { id: project.id, remote: project.remote, commit: project.commit } }; await Network.send(env.endpoint, query, { input }); } module2.exports = install; } }); // node_modules/@babel/parser/lib/index.js var require_lib2 = __commonJS({ "node_modules/@babel/parser/lib/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var BaseParser = class { constructor() { this.sawUnambiguousESM = false; this.ambiguousScriptDifferentAst = false; } hasPlugin(pluginConfig) { if (typeof pluginConfig === "string") { return this.plugins.has(pluginConfig); } else { const [pluginName, pluginOptions] = pluginConfig; if (!this.hasPlugin(pluginName)) { return false; } const actualOptions = this.plugins.get(pluginName); for (const key of Object.keys(pluginOptions)) { if ((actualOptions == null ? void 0 : actualOptions[key]) !== pluginOptions[key]) { return false; } } return true; } } getPluginOption(plugin, name) { var _this$plugins$get; return (_this$plugins$get = this.plugins.get(plugin)) == null ? void 0 : _this$plugins$get[name]; } }; function setTrailingComments(node, comments) { if (node.trailingComments === void 0) { node.trailingComments = comments; } else { node.trailingComments.unshift(...comments); } } function setLeadingComments(node, comments) { if (node.leadingComments === void 0) { node.leadingComments = comments; } else { node.leadingComments.unshift(...comments); } } function setInnerComments(node, comments) { if (node.innerComments === void 0) { node.innerComments = comments; } else { node.innerComments.unshift(...comments); } } function adjustInnerComments(node, elements, commentWS) { let lastElement = null; let i = elements.length; while (lastElement === null && i > 0) { lastElement = elements[--i]; } if (lastElement === null || lastElement.start > commentWS.start) { setInnerComments(node, commentWS.comments); } else { setTrailingComments(lastElement, commentWS.comments); } } var CommentsParser = class extends BaseParser { addComment(comment) { if (this.filename) comment.loc.filename = this.filename; this.state.comments.push(comment); } processComment(node) { const { commentStack } = this.state; const commentStackLength = commentStack.length; if (commentStackLength === 0) return; let i = commentStackLength - 1; const lastCommentWS = commentStack[i]; if (lastCommentWS.start === node.end) { lastCommentWS.leadingNode = node; i--; } const { start: nodeStart } = node; for (; i >= 0; i--) { const commentWS = commentStack[i]; const commentEnd = commentWS.end; if (commentEnd > nodeStart) { commentWS.containingNode = node; this.finalizeComment(commentWS); commentStack.splice(i, 1); } else { if (commentEnd === nodeStart) { commentWS.trailingNode = node; } break; } } } finalizeComment(commentWS) { const { comments } = commentWS; if (commentWS.leadingNode !== null || commentWS.trailingNode !== null) { if (commentWS.leadingNode !== null) { setTrailingComments(commentWS.leadingNode, comments); } if (commentWS.trailingNode !== null) { setLeadingComments(commentWS.trailingNode, comments); } } else { const { containingNode: node, start: commentStart } = commentWS; if (this.input.charCodeAt(commentStart - 1) === 44) { switch (node.type) { case "ObjectExpression": case "ObjectPattern": case "RecordExpression": adjustInnerComments(node, node.properties, commentWS); break; case "CallExpression": case "OptionalCallExpression": adjustInnerComments(node, node.arguments, commentWS); break; case "FunctionDeclaration": case "FunctionExpression": case "ArrowFunctionExpression": case "ObjectMethod": case "ClassMethod": case "ClassPrivateMethod": adjustInnerComments(node, node.params, commentWS); break; case "ArrayExpression": case "ArrayPattern": case "TupleExpression": adjustInnerComments(node, node.elements, commentWS); break; case "ExportNamedDeclaration": case "ImportDeclaration": adjustInnerComments(node, node.specifiers, commentWS); break; default: { setInnerComments(node, comments); } } } else { setInnerComments(node, comments); } } } finalizeRemainingComments() { const { commentStack } = this.state; for (let i = commentStack.length - 1; i >= 0; i--) { this.finalizeComment(commentStack[i]); } this.state.commentStack = []; } resetPreviousNodeTrailingComments(node) { const { commentStack } = this.state; const { length } = commentStack; if (length === 0) return; const commentWS = commentStack[length - 1]; if (commentWS.leadingNode === node) { commentWS.leadingNode = null; } } takeSurroundingComments(node, start, end) { const { commentStack } = this.state; const commentStackLength = commentStack.length; if (commentStackLength === 0) return; let i = commentStackLength - 1; for (; i >= 0; i--) { const commentWS = commentStack[i]; const commentEnd = commentWS.end; const commentStart = commentWS.start; if (commentStart === end) { commentWS.leadingNode = node; } else if (commentEnd === start) { commentWS.trailingNode = node; } else if (commentEnd < start) { break; } } } }; var ErrorCodes = Object.freeze({ SyntaxError: "BABEL_PARSER_SYNTAX_ERROR", SourceTypeModuleError: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED" }); var ErrorMessages = makeErrorTemplates({ AccessorIsGenerator: "A %0ter 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.", 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' accesor must not have any formal parameters.", BadSetterArity: "A 'set' accesor must have exactly one formal parameter.", BadSetterRestParameter: "A 'set' accesor 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: "'%0' require an initialization value.", DecoratorBeforeExport: "Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax.", DecoratorConstructor: "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?", DecoratorExportClass: "Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.", DecoratorSemicolon: "Decorators must not be followed by a semicolon.", DecoratorStaticBlock: "Decorators can't be used with a static block.", 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: "`%0` has already been exported. Exported identifiers must be unique.", DuplicateProto: "Redefinition of __proto__ property.", DuplicateRegExpFlags: "Duplicate regular expression flag.", ElementAfterRest: "Rest element must be last element.", EscapedCharNotAnIdentifier: "Invalid Unicode escape.", ExportBindingIsString: "A string literal cannot be used as an exported binding without `from`.\n- Did you mean `export { '%0' as '%1' } from 'some-module'`?", ExportDefaultFromAsIdentifier: "'from' is not allowed as an identifier after 'export default'.", ForInOfLoopInitializer: "'%0' loop variable declaration may not have an initializer.", 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: "Unsyntactic %0.", IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list.", IllegalReturn: "'return' outside of function.", ImportBindingIsString: 'A string literal cannot be used as an imported binding.\n- Did you mean `import { "%0" as foo }`?', ImportCallArgumentTrailingComma: "Trailing comma is disallowed inside import(...) arguments.", ImportCallArity: "`import()` requires exactly %0.", ImportCallNotNewExpression: "Cannot use new with import(...).", ImportCallSpreadArgument: "`...` is not allowed in `import()`.", 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: "Expected number in radix %0.", InvalidEscapeSequence: "Bad character escape sequence.", InvalidEscapeSequenceTemplate: "Invalid escape sequence in template.", InvalidEscapedReservedWord: "Escape sequence in keyword %0.", InvalidIdentifier: "Invalid identifier %0.", InvalidLhs: "Invalid left-hand side in %0.", InvalidLhsBinding: "Binding invalid left-hand side in %0.", InvalidNumber: "Invalid number.", InvalidOrMissingExponent: "Floating-point numbers require a valid exponent after the 'e'.", InvalidOrUnexpectedToken: "Unexpected character '%0'.", InvalidParenthesizedAssignment: "Invalid parenthesized assignment pattern.", InvalidPrivateFieldResolution: "Private name #%0 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: "Label '%0' is already declared.", LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations.", 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.", 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: 'Duplicate key "%0" is not allowed in module attributes.', ModuleExportNameHasLoneSurrogate: "An export name cannot include a lone surrogate, found '\\u%0'.", ModuleExportUndefined: "Export '%0' 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.", PipeBodyIsTighter: "Unexpected %0 after pipeline body; any %0 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: 'Invalid topic token %0. In order to use %0 as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "%0" }.', PipeTopicUnused: "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.", PipeUnparenthesizedBody: "Hack-style pipe body cannot be an unparenthesized %0 expression; 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.', PrivateInExpectedIn: "Private names are only allowed in property accesses (`obj.#%0`) or in `in` expressions (`#%0 in obj`).", PrivateNameRedeclaration: "Duplicate private name #%0.", 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, inside a block, or as the body of an if statement.", StaticPrototype: "Classes may not have static property named prototype.", StrictDelete: "Deleting local variable in strict mode.", StrictEvalArguments: "Assigning to '%0' in strict mode.", StrictEvalArgumentsBinding: "Binding '%0' 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.", 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: "Unexpected keyword '%0'.", 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: "Unexpected reserved word '%0'.", UnexpectedSuper: "'super' is only allowed in object methods and classes.", UnexpectedToken: "Unexpected token '%0'.", UnexpectedTokenUnaryExponentiation: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.", 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: "The only valid meta property for %0 is %0.%1.", 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.", VarRedeclaration: "Identifier '%0' 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." }, ErrorCodes.SyntaxError); var SourceTypeModuleErrorMessages = makeErrorTemplates({ ImportMetaOutsideModule: `import.meta may appear only with 'sourceType: "module"'`, ImportOutsideModule: `'import' and 'export' may appear only with 'sourceType: "module"'` }, ErrorCodes.SourceTypeModuleError); function keepReasonCodeCompat(reasonCode, syntaxPlugin) { { if (syntaxPlugin === "flow" && reasonCode === "PatternIsOptional") { return "OptionalBindingPattern"; } } return reasonCode; } function makeErrorTemplates(messages, code, syntaxPlugin) { const templates = {}; Object.keys(messages).forEach((reasonCode) => { templates[reasonCode] = Object.freeze({ code, reasonCode: keepReasonCodeCompat(reasonCode, syntaxPlugin), template: messages[reasonCode] }); }); return Object.freeze(templates); } var ParserError = class extends CommentsParser { raise({ code, reasonCode, template }, origin, ...params) { return this.raiseWithData(origin.node ? origin.node.loc.start : origin.at, { code, reasonCode }, template, ...params); } raiseOverwrite(loc, { code, template }, ...params) { const pos = loc.index; const message = template.replace(/%(\d+)/g, (_, i) => params[i]) + ` (${loc.line}:${loc.column})`; if (this.options.errorRecovery) { const errors = this.state.errors; for (let i = errors.length - 1; i >= 0; i--) { const error = errors[i]; if (error.pos === pos) { return Object.assign(error, { message }); } else if (error.pos < pos) { break; } } } return this._raise({ code, loc, pos }, message); } raiseWithData(loc, data, errorTemplate, ...params) { const pos = loc.index; const message = errorTemplate.replace(/%(\d+)/g, (_, i) => params[i]) + ` (${loc.line}:${loc.column})`; return this._raise(Object.assign({ loc, pos }, data), message); } _raise(errorContext, message) { const err = new SyntaxError(message); Object.assign(err, errorContext); if (this.options.errorRecovery) { if (!this.isLookahead) this.state.errors.push(err); return err; } else { throw err; } } }; var { defineProperty } = Object; var toUnenumerable = (object, key) => defineProperty(object, key, { enumerable: false, value: object[key] }); function toESTreeLocation(node) { toUnenumerable(node.loc.start, "index"); toUnenumerable(node.loc.end, "index"); return node; } var estree = (superClass) => class extends superClass { parse() { const file = toESTreeLocation(super.parse()); if (this.options.tokens) { file.tokens = file.tokens.map(toESTreeLocation); } return file; } parseRegExpLiteral({ pattern, flags }) { let regex = null; try { regex = new RegExp(pattern, flags); } catch (e) { } const node = this.estreeParseLiteral(regex); node.regex = { pattern, flags }; return node; } parseBigIntLiteral(value) { let bigInt; try { bigInt = BigInt(value); } catch (_unused) { bigInt = null; } const node = this.estreeParseLiteral(bigInt); node.bigint = String(node.value || value); return node; } parseDecimalLiteral(value) { const decimal = null; const node = this.estreeParseLiteral(decimal); node.decimal = String(node.value || value); return node; } estreeParseLiteral(value) { return this.parseLiteral(value, "Literal"); } parseStringLiteral(value) { return this.estreeParseLiteral(value); } parseNumericLiteral(value) { return this.estreeParseLiteral(value); } parseNullLiteral() { return this.estreeParseLiteral(null); } parseBooleanLiteral(value) { return this.estreeParseLiteral(value); } directiveToStmt(directive) { const directiveLiteral = directive.value; const stmt = this.startNodeAt(directive.start, directive.loc.start); const expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start); expression.value = directiveLiteral.extra.expressionValue; expression.raw = directiveLiteral.extra.raw; stmt.expression = this.finishNodeAt(expression, "Literal", directiveLiteral.loc.end); stmt.directive = directiveLiteral.extra.raw.slice(1, -1); return this.finishNodeAt(stmt, "ExpressionStatement", directive.loc.end); } initFunction(node, isAsync) { super.initFunction(node, isAsync); node.expression = false; } checkDeclaration(node) { if (node != null && this.isObjectProperty(node)) { this.checkDeclaration(node.value); } else { super.checkDeclaration(node); } } getObjectOrClassMethodParams(method) { return method.value.params; } isValidDirective(stmt) { var _stmt$expression$extr; return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && !((_stmt$expression$extr = stmt.expression.extra) != null && _stmt$expression$extr.parenthesized); } parseBlockBody(node, ...args) { super.parseBlockBody(node, ...args); const directiveStatements = node.directives.map((d) => this.directiveToStmt(d)); node.body = directiveStatements.concat(node.body); delete node.directives; } pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true); if (method.typeParameters) { method.value.typeParameters = method.typeParameters; delete method.typeParameters; } classBody.body.push(method); } parsePrivateName() { const node = super.parsePrivateName(); { if (!this.getPluginOption("estree", "classFeatures")) { return node; } } return this.convertPrivateNameToPrivateIdentifier(node); } convertPrivateNameToPrivateIdentifier(node) { const name = super.getPrivateNameSV(node); node = node; delete node.id; node.name = name; node.type = "PrivateIdentifier"; return node; } isPrivateName(node) { { if (!this.getPluginOption("estree", "classFeatures")) { return super.isPrivateName(node); } } return node.type === "PrivateIdentifier"; } getPrivateNameSV(node) { { if (!this.getPluginOption("estree", "classFeatures")) { return super.getPrivateNameSV(node); } } return node.name; } parseLiteral(value, type) { const node = super.parseLiteral(value, type); node.raw = node.extra.raw; delete node.extra; return node; } parseFunctionBody(node, allowExpression, isMethod = false) { super.parseFunctionBody(node, allowExpression, isMethod); node.expression = node.body.type !== "BlockStatement"; } parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) { let funcNode = this.startNode(); funcNode.kind = node.kind; funcNode = super.parseMethod(funcNode, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope); funcNode.type = "FunctionExpression"; delete funcNode.kind; node.value = funcNode; if (type === "ClassPrivateMethod") { node.computed = false; } type = "MethodDefinition"; return this.finishNode(node, type); } parseClassProperty(...args) { const propertyNode = super.parseClassProperty(...args); { if (!this.getPluginOption("estree", "classFeatures")) { return propertyNode; } } propertyNode.type = "PropertyDefinition"; return propertyNode; } parseClassPrivateProperty(...args) { const propertyNode = super.parseClassPrivateProperty(...args); { if (!this.getPluginOption("estree", "classFeatures")) { return propertyNode; } } propertyNode.type = "PropertyDefinition"; propertyNode.computed = false; return propertyNode; } parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) { const node = super.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor); if (node) { node.type = "Property"; if (node.kind === "method") node.kind = "init"; node.shorthand = false; } return node; } parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors) { const node = super.parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors); if (node) { node.kind = "init"; node.type = "Property"; } return node; } isAssignable(node, isBinding) { if (node != null && this.isObjectProperty(node)) { return this.isAssignable(node.value, isBinding); } return super.isAssignable(node, isBinding); } toAssignable(node, isLHS = false) { if (node != null && this.isObjectProperty(node)) { const { key, value } = node; if (this.isPrivateName(key)) { this.classScope.usePrivateName(this.getPrivateNameSV(key), key.loc.start); } this.toAssignable(value, isLHS); return node; } return super.toAssignable(node, isLHS); } toAssignableObjectExpressionProp(prop, ...args) { if (prop.kind === "get" || prop.kind === "set") { this.raise(ErrorMessages.PatternHasAccessor, { node: prop.key }); } else if (prop.method) { this.raise(ErrorMessages.PatternHasMethod, { node: prop.key }); } else { super.toAssignableObjectExpressionProp(prop, ...args); } } finishCallExpression(node, optional) { super.finishCallExpression(node, optional); if (node.callee.type === "Import") { node.type = "ImportExpression"; node.source = node.arguments[0]; if (this.hasPlugin("importAssertions")) { var _node$arguments$; node.attributes = (_node$arguments$ = node.arguments[1]) != null ? _node$arguments$ : null; } delete node.arguments; delete node.callee; } return node; } toReferencedArguments(node) { if (node.type === "ImportExpression") { return; } super.toReferencedArguments(node); } parseExport(node) { super.parseExport(node); switch (node.type) { case "ExportAllDeclaration": node.exported = null; break; case "ExportNamedDeclaration": if (node.specifiers.length === 1 && node.specifiers[0].type === "ExportNamespaceSpecifier") { node.type = "ExportAllDeclaration"; node.exported = node.specifiers[0].exported; delete node.specifiers; } break; } return node; } parseSubscript(base, startPos, startLoc, noCalls, state) { const node = super.parseSubscript(base, startPos, startLoc, noCalls, state); if (state.optionalChainMember) { if (node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression") { node.type = node.type.substring(8); } if (state.stop) { const chain = this.startNodeAtNode(node); chain.expression = node; return this.finishNode(chain, "ChainExpression"); } } else if (node.type === "MemberExpression" || node.type === "CallExpression") { node.optional = false; } return node; } hasPropertyAsPrivateName(node) { if (node.type === "ChainExpression") { node = node.expression; } return super.hasPropertyAsPrivateName(node); } isOptionalChain(node) { return node.type === "ChainExpression"; } isObjectProperty(node) { return node.type === "Property" && node.kind === "init" && !node.method; } isObjectMethod(node) { return node.method || node.kind === "get" || node.kind === "set"; } finishNodeAt(node, type, endLoc) { return toESTreeLocation(super.finishNodeAt(node, type, endLoc)); } resetEndLocation(node, endLoc = this.state.lastTokEndLoc) { super.resetEndLocation(node, endLoc); toESTreeLocation(node); } }; var TokContext = class { constructor(token, preserveSpace) { this.token = void 0; this.preserveSpace = void 0; this.token = token; this.preserveSpace = !!preserveSpace; } }; var types = { brace: new TokContext("{"), j_oTag: new TokContext("...", true) }; { types.template = new TokContext("`", true); } var beforeExpr = true; var startsExpr = true; var isLoop = true; var isAssign = true; var prefix = true; var postfix = true; var ExportedTokenType = class { constructor(label, conf = {}) { 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 = label; this.keyword = conf.keyword; this.beforeExpr = !!conf.beforeExpr; this.startsExpr = !!conf.startsExpr; this.rightAssociative = !!conf.rightAssociative; this.isLoop = !!conf.isLoop; this.isAssign = !!conf.isAssign; this.prefix = !!conf.prefix; this.postfix = !!conf.postfix; this.binop = conf.binop != null ? conf.binop : null; { this.updateContext = null; } } }; var keywords$1 = /* @__PURE__ */ new Map(); function createKeyword(name, options = {}) { options.keyword = name; const token = createToken(name, options); keywords$1.set(name, token); return token; } function createBinop(name, binop) { return createToken(name, { beforeExpr, binop }); } var tokenTypeCounter = -1; var tokenTypes = []; var tokenLabels = []; var tokenBinops = []; var tokenBeforeExprs = []; var tokenStartsExprs = []; var tokenPrefixes = []; function createToken(name, options = {}) { var _options$binop, _options$beforeExpr, _options$startsExpr, _options$prefix; ++tokenTypeCounter; tokenLabels.push(name); tokenBinops.push((_options$binop = options.binop) != null ? _options$binop : -1); tokenBeforeExprs.push((_options$beforeExpr = options.beforeExpr) != null ? _options$beforeExpr : false); tokenStartsExprs.push((_options$startsExpr = options.startsExpr) != null ? _options$startsExpr : false); tokenPrefixes.push((_options$prefix = options.prefix) != null ? _options$prefix : false); tokenTypes.push(new ExportedTokenType(name, options)); return tokenTypeCounter; } function createKeywordLike(name, options = {}) { var _options$binop2, _options$beforeExpr2, _options$startsExpr2, _options$prefix2; ++tokenTypeCounter; keywords$1.set(name, tokenTypeCounter); tokenLabels.push(name); tokenBinops.push((_options$binop2 = options.binop) != null ? _options$binop2 : -1); tokenBeforeExprs.push((_options$beforeExpr2 = options.beforeExpr) != null ? _options$beforeExpr2 : false); tokenStartsExprs.push((_options$startsExpr2 = options.startsExpr) != null ? _options$startsExpr2 : false); tokenPrefixes.push((_options$prefix2 = options.prefix) != null ? _options$prefix2 : false); tokenTypes.push(new ExportedTokenType("name", options)); return tokenTypeCounter; } var tt = { bracketL: createToken("[", { beforeExpr, startsExpr }), bracketHashL: createToken("#[", { beforeExpr, startsExpr }), bracketBarL: createToken("[|", { beforeExpr, startsExpr }), bracketR: createToken("]"), bracketBarR: createToken("|]"), braceL: createToken("{", { beforeExpr, startsExpr }), braceBarL: createToken("{|", { beforeExpr, startsExpr }), braceHashL: createToken("#{", { beforeExpr, startsExpr }), braceR: createToken("}", { beforeExpr }), braceBarR: createToken("|}"), parenL: createToken("(", { beforeExpr, startsExpr }), parenR: createToken(")"), comma: createToken(",", { beforeExpr }), semi: createToken(";", { beforeExpr }), colon: createToken(":", { beforeExpr }), doubleColon: createToken("::", { beforeExpr }), dot: createToken("."), question: createToken("?", { beforeExpr }), questionDot: createToken("?."), arrow: createToken("=>", { beforeExpr }), template: createToken("template"), ellipsis: createToken("...", { beforeExpr }), backQuote: createToken("`", { startsExpr }), dollarBraceL: createToken("${", { beforeExpr, startsExpr }), templateTail: createToken("...`", { startsExpr }), templateNonTail: createToken("...${", { beforeExpr, startsExpr }), at: createToken("@"), hash: createToken("#", { startsExpr }), interpreterDirective: createToken("#!..."), eq: createToken("=", { beforeExpr, isAssign }), assign: createToken("_=", { beforeExpr, isAssign }), slashAssign: createToken("_=", { beforeExpr, isAssign }), xorAssign: createToken("_=", { beforeExpr, isAssign }), moduloAssign: createToken("_=", { beforeExpr, isAssign }), incDec: createToken("++/--", { prefix, postfix, startsExpr }), bang: createToken("!", { beforeExpr, prefix, startsExpr }), tilde: createToken("~", { beforeExpr, prefix, startsExpr }), doubleCaret: createToken("^^", { startsExpr }), doubleAt: createToken("@@", { startsExpr }), pipeline: createBinop("|>", 0), nullishCoalescing: createBinop("??", 1), logicalOR: createBinop("||", 1), logicalAND: createBinop("&&", 2), bitwiseOR: createBinop("|", 3), bitwiseXOR: createBinop("^", 4), bitwiseAND: createBinop("&", 5), equality: createBinop("==/!=/===/!==", 6), lt: createBinop("/<=/>=", 7), gt: createBinop("/<=/>=", 7), relational: createBinop("/<=/>=", 7), bitShift: createBinop("<>/>>>", 8), bitShiftL: createBinop("<>/>>>", 8), bitShiftR: createBinop("<>/>>>", 8), plusMin: createToken("+/-", { beforeExpr, binop: 9, prefix, startsExpr }), modulo: createToken("%", { binop: 10, startsExpr }), star: createToken("*", { binop: 10 }), slash: createBinop("/", 10), exponent: createToken("**", { beforeExpr, binop: 11, rightAssociative: true }), _in: createKeyword("in", { beforeExpr, binop: 7 }), _instanceof: createKeyword("instanceof", { beforeExpr, binop: 7 }), _break: createKeyword("break"), _case: createKeyword("case", { beforeExpr }), _catch: createKeyword("catch"), _continue: createKeyword("continue"), _debugger: createKeyword("debugger"), _default: createKeyword("default", { beforeExpr }), _else: createKeyword("else", { beforeExpr }), _finally: createKeyword("finally"), _function: createKeyword("function", { startsExpr }), _if: createKeyword("if"), _return: createKeyword("return", { beforeExpr }), _switch: createKeyword("switch"), _throw: createKeyword("throw", { beforeExpr, prefix, startsExpr }), _try: createKeyword("try"), _var: createKeyword("var"), _const: createKeyword("const"), _with: createKeyword("with"), _new: createKeyword("new", { beforeExpr, startsExpr }), _this: createKeyword("this", { startsExpr }), _super: createKeyword("super", { startsExpr }), _class: createKeyword("class", { startsExpr }), _extends: createKeyword("extends", { beforeExpr }), _export: createKeyword("export"), _import: createKeyword("import", { startsExpr }), _null: createKeyword("null", { startsExpr }), _true: createKeyword("true", { startsExpr }), _false: createKeyword("false", { startsExpr }), _typeof: createKeyword("typeof", { beforeExpr, prefix, startsExpr }), _void: createKeyword("void", { beforeExpr, prefix, startsExpr }), _delete: createKeyword("delete", { beforeExpr, prefix, startsExpr }), _do: createKeyword("do", { isLoop, beforeExpr }), _for: createKeyword("for", { isLoop }), _while: createKeyword("while", { isLoop }), _as: createKeywordLike("as", { startsExpr }), _assert: createKeywordLike("assert", { startsExpr }), _async: createKeywordLike("async", { startsExpr }), _await: createKeywordLike("await", { startsExpr }), _from: createKeywordLike("from", { startsExpr }), _get: createKeywordLike("get", { startsExpr }), _let: createKeywordLike("let", { startsExpr }), _meta: createKeywordLike("meta", { startsExpr }), _of: createKeywordLike("of", { startsExpr }), _sent: createKeywordLike("sent", { startsExpr }), _set: createKeywordLike("set", { startsExpr }), _static: createKeywordLike("static", { startsExpr }), _yield: createKeywordLike("yield", { startsExpr }), _asserts: createKeywordLike("asserts", { startsExpr }), _checks: createKeywordLike("checks", { startsExpr }), _exports: createKeywordLike("exports", { startsExpr }), _global: createKeywordLike("global", { startsExpr }), _implements: createKeywordLike("implements", { startsExpr }), _intrinsic: createKeywordLike("intrinsic", { startsExpr }), _infer: createKeywordLike("infer", { startsExpr }), _is: createKeywordLike("is", { startsExpr }), _mixins: createKeywordLike("mixins", { startsExpr }), _proto: createKeywordLike("proto", { startsExpr }), _require: createKeywordLike("require", { startsExpr }), _keyof: createKeywordLike("keyof", { startsExpr }), _readonly: createKeywordLike("readonly", { startsExpr }), _unique: createKeywordLike("unique", { startsExpr }), _abstract: createKeywordLike("abstract", { startsExpr }), _declare: createKeywordLike("declare", { startsExpr }), _enum: createKeywordLike("enum", { startsExpr }), _module: createKeywordLike("module", { startsExpr }), _namespace: createKeywordLike("namespace", { startsExpr }), _interface: createKeywordLike("interface", { startsExpr }), _type: createKeywordLike("type", { startsExpr }), _opaque: createKeywordLike("opaque", { startsExpr }), name: createToken("name", { startsExpr }), string: createToken("string", { startsExpr }), num: createToken("num", { startsExpr }), bigint: createToken("bigint", { startsExpr }), decimal: createToken("decimal", { startsExpr }), regexp: createToken("regexp", { startsExpr }), privateName: createToken("#name", { startsExpr }), eof: createToken("eof"), jsxName: createToken("jsxName"), jsxText: createToken("jsxText", { beforeExpr: true }), jsxTagStart: createToken("jsxTagStart", { startsExpr: true }), jsxTagEnd: createToken("jsxTagEnd"), placeholder: createToken("%%", { startsExpr: true }) }; function tokenIsIdentifier(token) { return token >= 93 && token <= 128; } function tokenKeywordOrIdentifierIsKeyword(token) { return token <= 92; } function tokenIsKeywordOrIdentifier(token) { return token >= 58 && token <= 128; } function tokenIsLiteralPropertyName(token) { return token >= 58 && token <= 132; } function tokenComesBeforeExpression(token) { return tokenBeforeExprs[token]; } function tokenCanStartExpression(token) { return tokenStartsExprs[token]; } function tokenIsAssignment(token) { return token >= 29 && token <= 33; } function tokenIsFlowInterfaceOrTypeOrOpaque(token) { return token >= 125 && token <= 127; } function tokenIsLoop(token) { return token >= 90 && token <= 92; } function tokenIsKeyword(token) { return token >= 58 && token <= 92; } function tokenIsOperator(token) { return token >= 39 && token <= 59; } function tokenIsPostfix(token) { return token === 34; } function tokenIsPrefix(token) { return tokenPrefixes[token]; } function tokenIsTSTypeOperator(token) { return token >= 117 && token <= 119; } function tokenIsTSDeclarationStart(token) { return token >= 120 && token <= 126; } function tokenLabelName(token) { return tokenLabels[token]; } function tokenOperatorPrecedence(token) { return tokenBinops[token]; } function tokenIsRightAssociative(token) { return token === 57; } function tokenIsTemplate(token) { return token >= 24 && token <= 25; } function getExportedToken(token) { return tokenTypes[token]; } { tokenTypes[8].updateContext = (context) => { context.pop(); }; tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => { context.push(types.brace); }; tokenTypes[22].updateContext = (context) => { if (context[context.length - 1] === types.template) { context.pop(); } else { context.push(types.template); } }; tokenTypes[138].updateContext = (context) => { context.push(types.j_expr, types.j_oTag); }; } var Position = class { constructor(line, col, index) { this.line = void 0; this.column = void 0; this.index = void 0; this.line = line; this.column = col; this.index = index; } }; var SourceLocation = class { constructor(start, end) { this.start = void 0; this.end = void 0; this.filename = void 0; this.identifierName = void 0; this.start = start; this.end = end; } }; function createPositionWithColumnOffset(position, columnOffset) { const { line, column, index } = position; return new Position(line, column + columnOffset, index + columnOffset); } var nonASCIIidentifierStartChars = "\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"; var nonASCIIidentifierChars = "\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\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-\u0ECD\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\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\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"; var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; var astralIdentifierStartCodes = [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, 85, 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, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 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, 46, 2, 18, 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, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 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, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938]; var astralIdentifierCodes = [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, 154, 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, 161, 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, 19306, 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, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; function isInAstralSet(code, set) { let pos = 65536; for (let i = 0, length = set.length; i < length; i += 2) { pos += set[i]; if (pos > code) return false; pos += set[i + 1]; if (pos >= code) return true; } return false; } function isIdentifierStart(code) { if (code < 65) return code === 36; if (code <= 90) return true; if (code < 97) return code === 95; if (code <= 122) return true; if (code <= 65535) { return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code)); } return isInAstralSet(code, astralIdentifierStartCodes); } function isIdentifierChar(code) { if (code < 48) return code === 36; if (code < 58) return true; if (code < 65) return false; if (code <= 90) return true; if (code < 97) return code === 95; if (code <= 122) return true; if (code <= 65535) { return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code)); } return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); } var reservedWords = { 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"] }; var keywords = new Set(reservedWords.keyword); var reservedWordsStrictSet = new Set(reservedWords.strict); var reservedWordsStrictBindSet = new Set(reservedWords.strictBind); function isReservedWord(word, inModule) { return inModule && word === "await" || word === "enum"; } function isStrictReservedWord(word, inModule) { return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); } function isStrictBindOnlyReservedWord(word) { return reservedWordsStrictBindSet.has(word); } function isStrictBindReservedWord(word, inModule) { return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); } function isKeyword(word) { return keywords.has(word); } function isIteratorStart(current, next, next2) { return current === 64 && next === 64 && isIdentifierStart(next2); } var reservedWordLikeSet = /* @__PURE__ */ 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 canBeReservedWord(word) { return reservedWordLikeSet.has(word); } var SCOPE_OTHER = 0; var SCOPE_PROGRAM = 1; var SCOPE_FUNCTION = 2; var SCOPE_ARROW = 4; var SCOPE_SIMPLE_CATCH = 8; var SCOPE_SUPER = 16; var SCOPE_DIRECT_SUPER = 32; var SCOPE_CLASS = 64; var SCOPE_STATIC_BLOCK = 128; var SCOPE_TS_MODULE = 256; var SCOPE_VAR = SCOPE_PROGRAM | SCOPE_FUNCTION | SCOPE_TS_MODULE; var BIND_KIND_VALUE = 1; var BIND_KIND_TYPE = 2; var BIND_SCOPE_VAR = 4; var BIND_SCOPE_LEXICAL = 8; var BIND_SCOPE_FUNCTION = 16; var BIND_FLAGS_NONE = 64; var BIND_FLAGS_CLASS = 128; var BIND_FLAGS_TS_ENUM = 256; var BIND_FLAGS_TS_CONST_ENUM = 512; var BIND_FLAGS_TS_EXPORT_ONLY = 1024; var BIND_FLAGS_FLOW_DECLARE_FN = 2048; var BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS; var BIND_LEXICAL = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0; var BIND_VAR = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0; var BIND_FUNCTION = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0; var BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS; var BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0; var BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM; var BIND_TS_AMBIENT = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY; var BIND_NONE = 0 | 0 | 0 | BIND_FLAGS_NONE; var BIND_OUTSIDE = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE; var BIND_TS_CONST_ENUM = BIND_TS_ENUM | BIND_FLAGS_TS_CONST_ENUM; var BIND_TS_NAMESPACE = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY; var BIND_FLOW_DECLARE_FN = BIND_FLAGS_FLOW_DECLARE_FN; var CLASS_ELEMENT_FLAG_STATIC = 4; var CLASS_ELEMENT_KIND_GETTER = 2; var CLASS_ELEMENT_KIND_SETTER = 1; var CLASS_ELEMENT_KIND_ACCESSOR = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_KIND_SETTER; var CLASS_ELEMENT_STATIC_GETTER = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_FLAG_STATIC; var CLASS_ELEMENT_STATIC_SETTER = CLASS_ELEMENT_KIND_SETTER | CLASS_ELEMENT_FLAG_STATIC; var CLASS_ELEMENT_INSTANCE_GETTER = CLASS_ELEMENT_KIND_GETTER; var CLASS_ELEMENT_INSTANCE_SETTER = CLASS_ELEMENT_KIND_SETTER; var CLASS_ELEMENT_OTHER = 0; var Scope = class { constructor(flags) { this.var = /* @__PURE__ */ new Set(); this.lexical = /* @__PURE__ */ new Set(); this.functions = /* @__PURE__ */ new Set(); this.flags = flags; } }; var ScopeHandler = class { constructor(raise, inModule) { this.scopeStack = []; this.undefinedExports = /* @__PURE__ */ new Map(); this.raise = raise; this.inModule = inModule; } get inFunction() { return (this.currentVarScopeFlags() & SCOPE_FUNCTION) > 0; } get allowSuper() { return (this.currentThisScopeFlags() & SCOPE_SUPER) > 0; } get allowDirectSuper() { return (this.currentThisScopeFlags() & SCOPE_DIRECT_SUPER) > 0; } get inClass() { return (this.currentThisScopeFlags() & SCOPE_CLASS) > 0; } get inClassAndNotInNonArrowFunction() { const flags = this.currentThisScopeFlags(); return (flags & SCOPE_CLASS) > 0 && (flags & SCOPE_FUNCTION) === 0; } get inStaticBlock() { for (let i = this.scopeStack.length - 1; ; i--) { const { flags } = this.scopeStack[i]; if (flags & SCOPE_STATIC_BLOCK) { return true; } if (flags & (SCOPE_VAR | SCOPE_CLASS)) { return false; } } } get inNonArrowFunction() { return (this.currentThisScopeFlags() & SCOPE_FUNCTION) > 0; } get treatFunctionsAsVar() { return this.treatFunctionsAsVarInScope(this.currentScope()); } createScope(flags) { return new Scope(flags); } enter(flags) { this.scopeStack.push(this.createScope(flags)); } exit() { this.scopeStack.pop(); } treatFunctionsAsVarInScope(scope) { return !!(scope.flags & SCOPE_FUNCTION || !this.inModule && scope.flags & SCOPE_PROGRAM); } declareName(name, bindingType, loc) { let scope = this.currentScope(); if (bindingType & BIND_SCOPE_LEXICAL || bindingType & BIND_SCOPE_FUNCTION) { this.checkRedeclarationInScope(scope, name, bindingType, loc); if (bindingType & BIND_SCOPE_FUNCTION) { scope.functions.add(name); } else { scope.lexical.add(name); } if (bindingType & BIND_SCOPE_LEXICAL) { this.maybeExportDefined(scope, name); } } else if (bindingType & BIND_SCOPE_VAR) { for (let i = this.scopeStack.length - 1; i >= 0; --i) { scope = this.scopeStack[i]; this.checkRedeclarationInScope(scope, name, bindingType, loc); scope.var.add(name); this.maybeExportDefined(scope, name); if (scope.flags & SCOPE_VAR) break; } } if (this.inModule && scope.flags & SCOPE_PROGRAM) { this.undefinedExports.delete(name); } } maybeExportDefined(scope, name) { if (this.inModule && scope.flags & SCOPE_PROGRAM) { this.undefinedExports.delete(name); } } checkRedeclarationInScope(scope, name, bindingType, loc) { if (this.isRedeclaredInScope(scope, name, bindingType)) { this.raise(ErrorMessages.VarRedeclaration, { at: loc }, name); } } isRedeclaredInScope(scope, name, bindingType) { if (!(bindingType & BIND_KIND_VALUE)) return false; if (bindingType & BIND_SCOPE_LEXICAL) { return scope.lexical.has(name) || scope.functions.has(name) || scope.var.has(name); } if (bindingType & BIND_SCOPE_FUNCTION) { return scope.lexical.has(name) || !this.treatFunctionsAsVarInScope(scope) && scope.var.has(name); } return scope.lexical.has(name) && !(scope.flags & SCOPE_SIMPLE_CATCH && scope.lexical.values().next().value === name) || !this.treatFunctionsAsVarInScope(scope) && scope.functions.has(name); } checkLocalExport(id) { const { name } = id; const topLevelScope = this.scopeStack[0]; if (!topLevelScope.lexical.has(name) && !topLevelScope.var.has(name) && !topLevelScope.functions.has(name)) { this.undefinedExports.set(name, id.loc.start); } } currentScope() { return this.scopeStack[this.scopeStack.length - 1]; } currentVarScopeFlags() { for (let i = this.scopeStack.length - 1; ; i--) { const { flags } = this.scopeStack[i]; if (flags & SCOPE_VAR) { return flags; } } } currentThisScopeFlags() { for (let i = this.scopeStack.length - 1; ; i--) { const { flags } = this.scopeStack[i]; if (flags & (SCOPE_VAR | SCOPE_CLASS) && !(flags & SCOPE_ARROW)) { return flags; } } } }; var FlowScope = class extends Scope { constructor(...args) { super(...args); this.declareFunctions = /* @__PURE__ */ new Set(); } }; var FlowScopeHandler = class extends ScopeHandler { createScope(flags) { return new FlowScope(flags); } declareName(name, bindingType, loc) { const scope = this.currentScope(); if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) { this.checkRedeclarationInScope(scope, name, bindingType, loc); this.maybeExportDefined(scope, name); scope.declareFunctions.add(name); return; } super.declareName(...arguments); } isRedeclaredInScope(scope, name, bindingType) { if (super.isRedeclaredInScope(...arguments)) return true; if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) { return !scope.declareFunctions.has(name) && (scope.lexical.has(name) || scope.functions.has(name)); } return false; } checkLocalExport(id) { if (!this.scopeStack[0].declareFunctions.has(id.name)) { super.checkLocalExport(id); } } }; var lineBreak = /\r\n?|[\n\u2028\u2029]/; var lineBreakG = new RegExp(lineBreak.source, "g"); function isNewLine(code) { switch (code) { case 10: case 13: case 8232: case 8233: return true; default: return false; } } var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; var skipWhiteSpaceInLine = /(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/y; var skipWhiteSpaceToLineBreak = new RegExp("(?=(" + skipWhiteSpaceInLine.source + "))\\1" + /(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source, "y"); function isWhitespace(code) { switch (code) { 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 true; default: return false; } } var State = class { constructor() { this.strict = void 0; 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.maybeInArrowParameters = false; this.inType = false; this.noAnonFunctionType = false; this.hasFlowComment = false; this.isAmbientContext = false; this.inAbstractClass = false; this.topicContext = { maxNumOfResolvableTopics: 0, maxTopicIndex: null }; this.soloAwait = false; this.inFSharpPipelineDirectBody = false; this.labels = []; this.decoratorStack = [[]]; this.comments = []; this.commentStack = []; this.pos = 0; this.type = 135; this.value = null; this.start = 0; this.end = 0; this.lastTokEndLoc = null; this.lastTokStartLoc = null; this.lastTokStart = 0; this.context = [types.brace]; this.canStartJSXElement = true; this.containsEsc = false; this.strictErrors = /* @__PURE__ */ new Map(); this.tokensLength = 0; } init({ strictMode, sourceType, startLine, startColumn }) { this.strict = strictMode === false ? false : strictMode === true ? true : sourceType === "module"; this.curLine = startLine; this.lineStart = -startColumn; this.startLoc = this.endLoc = new Position(startLine, startColumn, 0); } curPosition() { return new Position(this.curLine, this.pos - this.lineStart, this.pos); } clone(skipArrays) { const state = new State(); const keys = Object.keys(this); for (let i = 0, length = keys.length; i < length; i++) { const key = keys[i]; let val = this[key]; if (!skipArrays && Array.isArray(val)) { val = val.slice(); } state[key] = val; } return state; } }; var _isDigit = function isDigit(code) { return code >= 48 && code <= 57; }; var VALID_REGEX_FLAGS = /* @__PURE__ */ new Set([103, 109, 115, 105, 121, 117, 100, 118]); var forbiddenNumericSeparatorSiblings = { decBinOct: [46, 66, 69, 79, 95, 98, 101, 111], hex: [46, 88, 95, 120] }; var allowedNumericSeparatorSiblings = {}; allowedNumericSeparatorSiblings.bin = [48, 49]; allowedNumericSeparatorSiblings.oct = [...allowedNumericSeparatorSiblings.bin, 50, 51, 52, 53, 54, 55]; allowedNumericSeparatorSiblings.dec = [...allowedNumericSeparatorSiblings.oct, 56, 57]; allowedNumericSeparatorSiblings.hex = [...allowedNumericSeparatorSiblings.dec, 65, 66, 67, 68, 69, 70, 97, 98, 99, 100, 101, 102]; var Token = class { constructor(state) { this.type = state.type; this.value = state.value; this.start = state.start; this.end = state.end; this.loc = new SourceLocation(state.startLoc, state.endLoc); } }; var Tokenizer = class extends ParserError { constructor(options, input) { super(); this.isLookahead = void 0; this.tokens = []; this.state = new State(); this.state.init(options); this.input = input; this.length = input.length; this.isLookahead = false; } pushToken(token) { this.tokens.length = this.state.tokensLength; this.tokens.push(token); ++this.state.tokensLength; } next() { this.checkKeywordEscapes(); if (this.options.tokens) { this.pushToken(new Token(this.state)); } this.state.lastTokStart = this.state.start; this.state.lastTokEndLoc = this.state.endLoc; this.state.lastTokStartLoc = this.state.startLoc; this.nextToken(); } eat(type) { if (this.match(type)) { this.next(); return true; } else { return false; } } match(type) { return this.state.type === type; } createLookaheadState(state) { return { pos: state.pos, value: null, type: state.type, start: state.start, end: state.end, context: [this.curContext()], inType: state.inType, startLoc: state.startLoc, lastTokEndLoc: state.lastTokEndLoc, curLine: state.curLine, lineStart: state.lineStart, curPosition: state.curPosition }; } lookahead() { const old = this.state; this.state = this.createLookaheadState(old); this.isLookahead = true; this.nextToken(); this.isLookahead = false; const curr = this.state; this.state = old; return curr; } nextTokenStart() { return this.nextTokenStartSince(this.state.pos); } nextTokenStartSince(pos) { skipWhiteSpace.lastIndex = pos; return skipWhiteSpace.test(this.input) ? skipWhiteSpace.lastIndex : pos; } lookaheadCharCode() { return this.input.charCodeAt(this.nextTokenStart()); } codePointAtPos(pos) { let cp = this.input.charCodeAt(pos); if ((cp & 64512) === 55296 && ++pos < this.input.length) { const trail = this.input.charCodeAt(pos); if ((trail & 64512) === 56320) { cp = 65536 + ((cp & 1023) << 10) + (trail & 1023); } } return cp; } setStrict(strict) { this.state.strict = strict; if (strict) { this.state.strictErrors.forEach(({ message, loc }) => this.raise(message, { at: loc })); this.state.strictErrors.clear(); } } curContext() { return this.state.context[this.state.context.length - 1]; } nextToken() { this.skipSpace(); this.state.start = this.state.pos; if (!this.isLookahead) this.state.startLoc = this.state.curPosition(); if (this.state.pos >= this.length) { this.finishToken(135); return; } this.getTokenFromCode(this.codePointAtPos(this.state.pos)); } skipBlockComment() { let startLoc; if (!this.isLookahead) startLoc = this.state.curPosition(); const start = this.state.pos; const end = this.input.indexOf("*/", start + 2); if (end === -1) { throw this.raise(ErrorMessages.UnterminatedComment, { at: this.state.curPosition() }); } this.state.pos = end + 2; lineBreakG.lastIndex = start + 2; while (lineBreakG.test(this.input) && lineBreakG.lastIndex <= end) { ++this.state.curLine; this.state.lineStart = lineBreakG.lastIndex; } if (this.isLookahead) return; const comment = { type: "CommentBlock", value: this.input.slice(start + 2, end), start, end: end + 2, loc: new SourceLocation(startLoc, this.state.curPosition()) }; if (this.options.tokens) this.pushToken(comment); return comment; } skipLineComment(startSkip) { const start = this.state.pos; let startLoc; if (!this.isLookahead) startLoc = this.state.curPosition(); let ch = this.input.charCodeAt(this.state.pos += startSkip); if (this.state.pos < this.length) { while (!isNewLine(ch) && ++this.state.pos < this.length) { ch = this.input.charCodeAt(this.state.pos); } } if (this.isLookahead) return; const end = this.state.pos; const value = this.input.slice(start + startSkip, end); const comment = { type: "CommentLine", value, start, end, loc: new SourceLocation(startLoc, this.state.curPosition()) }; if (this.options.tokens) this.pushToken(comment); return comment; } skipSpace() { const spaceStart = this.state.pos; const comments = []; loop: while (this.state.pos < this.length) { const ch = this.input.charCodeAt(this.state.pos); switch (ch) { case 32: case 160: case 9: ++this.state.pos; break; case 13: if (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: { const comment = this.skipBlockComment(); if (comment !== void 0) { this.addComment(comment); if (this.options.attachComment) comments.push(comment); } break; } case 47: { const comment = this.skipLineComment(2); if (comment !== void 0) { this.addComment(comment); if (this.options.attachComment) comments.push(comment); } break; } default: break loop; } break; default: if (isWhitespace(ch)) { ++this.state.pos; } else if (ch === 45 && !this.inModule) { const pos = this.state.pos; if (this.input.charCodeAt(pos + 1) === 45 && this.input.charCodeAt(pos + 2) === 62 && (spaceStart === 0 || this.state.lineStart > spaceStart)) { const comment = this.skipLineComment(3); if (comment !== void 0) { this.addComment(comment); if (this.options.attachComment) comments.push(comment); } } else { break loop; } } else if (ch === 60 && !this.inModule) { const pos = this.state.pos; if (this.input.charCodeAt(pos + 1) === 33 && this.input.charCodeAt(pos + 2) === 45 && this.input.charCodeAt(pos + 3) === 45) { const comment = this.skipLineComment(4); if (comment !== void 0) { this.addComment(comment); if (this.options.attachComment) comments.push(comment); } } else { break loop; } } else { break loop; } } } if (comments.length > 0) { const end = this.state.pos; const CommentWhitespace = { start: spaceStart, end, comments, leadingNode: null, trailingNode: null, containingNode: null }; this.state.commentStack.push(CommentWhitespace); } } finishToken(type, val) { this.state.end = this.state.pos; this.state.endLoc = this.state.curPosition(); const prevType = this.state.type; this.state.type = type; this.state.value = val; if (!this.isLookahead) { this.updateContext(prevType); } } replaceToken(type) { this.state.type = type; this.updateContext(); } readToken_numberSign() { if (this.state.pos === 0 && this.readToken_interpreter()) { return; } const nextPos = this.state.pos + 1; const next = this.codePointAtPos(nextPos); if (next >= 48 && next <= 57) { throw this.raise(ErrorMessages.UnexpectedDigitAfterHash, { at: this.state.curPosition() }); } if (next === 123 || next === 91 && this.hasPlugin("recordAndTuple")) { this.expectPlugin("recordAndTuple"); if (this.getPluginOption("recordAndTuple", "syntaxType") !== "hash") { throw this.raise(next === 123 ? ErrorMessages.RecordExpressionHashIncorrectStartSyntaxType : ErrorMessages.TupleExpressionHashIncorrectStartSyntaxType, { at: this.state.curPosition() }); } this.state.pos += 2; if (next === 123) { this.finishToken(7); } else { this.finishToken(1); } } else if (isIdentifierStart(next)) { ++this.state.pos; this.finishToken(134, this.readWord1(next)); } else if (next === 92) { ++this.state.pos; this.finishToken(134, this.readWord1()); } else { this.finishOp(27, 1); } } readToken_dot() { const next = this.input.charCodeAt(this.state.pos + 1); if (next >= 48 && next <= 57) { this.readNumber(true); return; } if (next === 46 && this.input.charCodeAt(this.state.pos + 2) === 46) { this.state.pos += 3; this.finishToken(21); } else { ++this.state.pos; this.finishToken(16); } } readToken_slash() { const next = this.input.charCodeAt(this.state.pos + 1); if (next === 61) { this.finishOp(31, 2); } else { this.finishOp(56, 1); } } readToken_interpreter() { if (this.state.pos !== 0 || this.length < 2) return false; let ch = this.input.charCodeAt(this.state.pos + 1); if (ch !== 33) return false; const start = this.state.pos; this.state.pos += 1; while (!isNewLine(ch) && ++this.state.pos < this.length) { ch = this.input.charCodeAt(this.state.pos); } const value = this.input.slice(start + 2, this.state.pos); this.finishToken(28, value); return true; } readToken_mult_modulo(code) { let type = code === 42 ? 55 : 54; let width = 1; let next = this.input.charCodeAt(this.state.pos + 1); if (code === 42 && next === 42) { width++; next = this.input.charCodeAt(this.state.pos + 2); type = 57; } if (next === 61 && !this.state.inType) { width++; type = code === 37 ? 33 : 30; } this.finishOp(type, width); } readToken_pipe_amp(code) { const next = this.input.charCodeAt(this.state.pos + 1); if (next === code) { if (this.input.charCodeAt(this.state.pos + 2) === 61) { this.finishOp(30, 3); } else { this.finishOp(code === 124 ? 41 : 42, 2); } return; } if (code === 124) { if (next === 62) { this.finishOp(39, 2); return; } if (this.hasPlugin("recordAndTuple") && next === 125) { if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { throw this.raise(ErrorMessages.RecordExpressionBarIncorrectEndSyntaxType, { at: this.state.curPosition() }); } this.state.pos += 2; this.finishToken(9); return; } if (this.hasPlugin("recordAndTuple") && next === 93) { if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { throw this.raise(ErrorMessages.TupleExpressionBarIncorrectEndSyntaxType, { at: this.state.curPosition() }); } this.state.pos += 2; this.finishToken(4); return; } } if (next === 61) { this.finishOp(30, 2); return; } this.finishOp(code === 124 ? 43 : 45, 1); } readToken_caret() { const next = this.input.charCodeAt(this.state.pos + 1); if (next === 61 && !this.state.inType) { this.finishOp(32, 2); } else if (next === 94 && this.hasPlugin(["pipelineOperator", { proposal: "hack", topicToken: "^^" }])) { this.finishOp(37, 2); const lookaheadCh = this.input.codePointAt(this.state.pos); if (lookaheadCh === 94) { throw this.unexpected(); } } else { this.finishOp(44, 1); } } readToken_atSign() { const next = this.input.charCodeAt(this.state.pos + 1); if (next === 64 && this.hasPlugin(["pipelineOperator", { proposal: "hack", topicToken: "@@" }])) { this.finishOp(38, 2); } else { this.finishOp(26, 1); } } readToken_plus_min(code) { const next = this.input.charCodeAt(this.state.pos + 1); if (next === code) { this.finishOp(34, 2); return; } if (next === 61) { this.finishOp(30, 2); } else { this.finishOp(53, 1); } } readToken_lt() { const { pos } = this.state; const next = this.input.charCodeAt(pos + 1); if (next === 60) { if (this.input.charCodeAt(pos + 2) === 61) { this.finishOp(30, 3); return; } this.finishOp(51, 2); return; } if (next === 61) { this.finishOp(49, 2); return; } this.finishOp(47, 1); } readToken_gt() { const { pos } = this.state; const next = this.input.charCodeAt(pos + 1); if (next === 62) { const size = this.input.charCodeAt(pos + 2) === 62 ? 3 : 2; if (this.input.charCodeAt(pos + size) === 61) { this.finishOp(30, size + 1); return; } this.finishOp(52, size); return; } if (next === 61) { this.finishOp(49, 2); return; } this.finishOp(48, 1); } readToken_eq_excl(code) { const next = this.input.charCodeAt(this.state.pos + 1); if (next === 61) { this.finishOp(46, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2); return; } if (code === 61 && next === 62) { this.state.pos += 2; this.finishToken(19); return; } this.finishOp(code === 61 ? 29 : 35, 1); } readToken_question() { const next = this.input.charCodeAt(this.state.pos + 1); const next2 = this.input.charCodeAt(this.state.pos + 2); if (next === 63) { if (next2 === 61) { this.finishOp(30, 3); } else { this.finishOp(40, 2); } } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) { this.state.pos += 2; this.finishToken(18); } else { ++this.state.pos; this.finishToken(17); } } getTokenFromCode(code) { switch (code) { 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(ErrorMessages.TupleExpressionBarIncorrectStartSyntaxType, { at: 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(ErrorMessages.RecordExpressionBarIncorrectStartSyntaxType, { at: 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: if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) { this.finishOp(15, 2); } else { ++this.state.pos; this.finishToken(14); } return; case 63: this.readToken_question(); return; case 96: this.readTemplateToken(); return; case 48: { const next = this.input.charCodeAt(this.state.pos + 1); if (next === 120 || next === 88) { this.readRadixNumber(16); return; } if (next === 111 || next === 79) { this.readRadixNumber(8); return; } if (next === 98 || next === 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(false); return; case 34: case 39: this.readString(code); return; case 47: this.readToken_slash(); return; case 37: case 42: this.readToken_mult_modulo(code); return; case 124: case 38: this.readToken_pipe_amp(code); return; case 94: this.readToken_caret(); return; case 43: case 45: this.readToken_plus_min(code); return; case 60: this.readToken_lt(); return; case 62: this.readToken_gt(); return; case 61: case 33: this.readToken_eq_excl(code); 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 (isIdentifierStart(code)) { this.readWord(code); return; } } throw this.raise(ErrorMessages.InvalidOrUnexpectedToken, { at: this.state.curPosition() }, String.fromCodePoint(code)); } finishOp(type, size) { const str = this.input.slice(this.state.pos, this.state.pos + size); this.state.pos += size; this.finishToken(type, str); } readRegexp() { const startLoc = this.state.startLoc; const start = this.state.start + 1; let escaped, inClass; let { pos } = this.state; for (; ; ++pos) { if (pos >= this.length) { throw this.raise(ErrorMessages.UnterminatedRegExp, { at: createPositionWithColumnOffset(startLoc, 1) }); } const ch = this.input.charCodeAt(pos); if (isNewLine(ch)) { throw this.raise(ErrorMessages.UnterminatedRegExp, { at: createPositionWithColumnOffset(startLoc, 1) }); } if (escaped) { escaped = false; } else { if (ch === 91) { inClass = true; } else if (ch === 93 && inClass) { inClass = false; } else if (ch === 47 && !inClass) { break; } escaped = ch === 92; } } const content = this.input.slice(start, pos); ++pos; let mods = ""; const nextPos = () => createPositionWithColumnOffset(startLoc, pos + 2 - start); while (pos < this.length) { const cp = this.codePointAtPos(pos); const char = String.fromCharCode(cp); if (VALID_REGEX_FLAGS.has(cp)) { if (cp === 118) { this.expectPlugin("regexpUnicodeSets", nextPos()); if (mods.includes("u")) { this.raise(ErrorMessages.IncompatibleRegExpUVFlags, { at: nextPos() }); } } else if (cp === 117) { if (mods.includes("v")) { this.raise(ErrorMessages.IncompatibleRegExpUVFlags, { at: nextPos() }); } } if (mods.includes(char)) { this.raise(ErrorMessages.DuplicateRegExpFlags, { at: nextPos() }); } } else if (isIdentifierChar(cp) || cp === 92) { this.raise(ErrorMessages.MalformedRegExpFlags, { at: nextPos() }); } else { break; } ++pos; mods += char; } this.state.pos = pos; this.finishToken(133, { pattern: content, flags: mods }); } readInt(radix, len, forceLen, allowNumSeparator = true) { const start = this.state.pos; const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct; const allowedSiblings = radix === 16 ? allowedNumericSeparatorSiblings.hex : radix === 10 ? allowedNumericSeparatorSiblings.dec : radix === 8 ? allowedNumericSeparatorSiblings.oct : allowedNumericSeparatorSiblings.bin; let invalid = false; let total = 0; for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) { const code = this.input.charCodeAt(this.state.pos); let val; if (code === 95) { const prev = this.input.charCodeAt(this.state.pos - 1); const next = this.input.charCodeAt(this.state.pos + 1); if (allowedSiblings.indexOf(next) === -1) { this.raise(ErrorMessages.UnexpectedNumericSeparator, { at: this.state.curPosition() }); } else if (forbiddenSiblings.indexOf(prev) > -1 || forbiddenSiblings.indexOf(next) > -1 || Number.isNaN(next)) { this.raise(ErrorMessages.UnexpectedNumericSeparator, { at: this.state.curPosition() }); } if (!allowNumSeparator) { this.raise(ErrorMessages.NumericSeparatorInEscapeSequence, { at: this.state.curPosition() }); } ++this.state.pos; continue; } if (code >= 97) { val = code - 97 + 10; } else if (code >= 65) { val = code - 65 + 10; } else if (_isDigit(code)) { val = code - 48; } else { val = Infinity; } if (val >= radix) { if (this.options.errorRecovery && val <= 9) { val = 0; this.raise(ErrorMessages.InvalidDigit, { at: this.state.curPosition() }, radix); } else if (forceLen) { val = 0; invalid = true; } else { break; } } ++this.state.pos; total = total * radix + val; } if (this.state.pos === start || len != null && this.state.pos - start !== len || invalid) { return null; } return total; } readRadixNumber(radix) { const startLoc = this.state.curPosition(); let isBigInt = false; this.state.pos += 2; const val = this.readInt(radix); if (val == null) { this.raise(ErrorMessages.InvalidDigit, { at: createPositionWithColumnOffset(startLoc, 2) }, radix); } const next = this.input.charCodeAt(this.state.pos); if (next === 110) { ++this.state.pos; isBigInt = true; } else if (next === 109) { throw this.raise(ErrorMessages.InvalidDecimal, { at: startLoc }); } if (isIdentifierStart(this.codePointAtPos(this.state.pos))) { throw this.raise(ErrorMessages.NumberIdentifier, { at: this.state.curPosition() }); } if (isBigInt) { const str = this.input.slice(startLoc.index, this.state.pos).replace(/[_n]/g, ""); this.finishToken(131, str); return; } this.finishToken(130, val); } readNumber(startsWithDot) { const start = this.state.pos; const startLoc = this.state.curPosition(); let isFloat = false; let isBigInt = false; let isDecimal = false; let hasExponent = false; let isOctal = false; if (!startsWithDot && this.readInt(10) === null) { this.raise(ErrorMessages.InvalidNumber, { at: this.state.curPosition() }); } const hasLeadingZero = this.state.pos - start >= 2 && this.input.charCodeAt(start) === 48; if (hasLeadingZero) { const integer = this.input.slice(start, this.state.pos); this.recordStrictModeErrors(ErrorMessages.StrictOctalLiteral, startLoc); if (!this.state.strict) { const underscorePos = integer.indexOf("_"); if (underscorePos > 0) { this.raise(ErrorMessages.ZeroDigitNumericSeparator, { at: createPositionWithColumnOffset(startLoc, underscorePos) }); } } isOctal = hasLeadingZero && !/[89]/.test(integer); } let next = this.input.charCodeAt(this.state.pos); if (next === 46 && !isOctal) { ++this.state.pos; this.readInt(10); isFloat = true; next = this.input.charCodeAt(this.state.pos); } if ((next === 69 || next === 101) && !isOctal) { next = this.input.charCodeAt(++this.state.pos); if (next === 43 || next === 45) { ++this.state.pos; } if (this.readInt(10) === null) { this.raise(ErrorMessages.InvalidOrMissingExponent, { at: startLoc }); } isFloat = true; hasExponent = true; next = this.input.charCodeAt(this.state.pos); } if (next === 110) { if (isFloat || hasLeadingZero) { this.raise(ErrorMessages.InvalidBigIntLiteral, { at: startLoc }); } ++this.state.pos; isBigInt = true; } if (next === 109) { this.expectPlugin("decimal", this.state.curPosition()); if (hasExponent || hasLeadingZero) { this.raise(ErrorMessages.InvalidDecimal, { at: startLoc }); } ++this.state.pos; isDecimal = true; } if (isIdentifierStart(this.codePointAtPos(this.state.pos))) { throw this.raise(ErrorMessages.NumberIdentifier, { at: this.state.curPosition() }); } const str = this.input.slice(start, this.state.pos).replace(/[_mn]/g, ""); if (isBigInt) { this.finishToken(131, str); return; } if (isDecimal) { this.finishToken(132, str); return; } const val = isOctal ? parseInt(str, 8) : parseFloat(str); this.finishToken(130, val); } readCodePoint(throwOnInvalid) { const ch = this.input.charCodeAt(this.state.pos); let code; if (ch === 123) { ++this.state.pos; code = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, true, throwOnInvalid); ++this.state.pos; if (code !== null && code > 1114111) { if (throwOnInvalid) { this.raise(ErrorMessages.InvalidCodePoint, { at: this.state.curPosition() }); } else { return null; } } } else { code = this.readHexChar(4, false, throwOnInvalid); } return code; } readString(quote) { let out = "", chunkStart = ++this.state.pos; for (; ; ) { if (this.state.pos >= this.length) { throw this.raise(ErrorMessages.UnterminatedString, { at: this.state.startLoc }); } const ch = this.input.charCodeAt(this.state.pos); if (ch === quote) break; if (ch === 92) { out += this.input.slice(chunkStart, this.state.pos); out += this.readEscapedChar(false); chunkStart = this.state.pos; } else if (ch === 8232 || ch === 8233) { ++this.state.pos; ++this.state.curLine; this.state.lineStart = this.state.pos; } else if (isNewLine(ch)) { throw this.raise(ErrorMessages.UnterminatedString, { at: this.state.startLoc }); } else { ++this.state.pos; } } out += this.input.slice(chunkStart, this.state.pos++); this.finishToken(129, out); } readTemplateContinuation() { if (!this.match(8)) { this.unexpected(null, 8); } this.state.pos--; this.readTemplateToken(); } readTemplateToken() { let out = "", chunkStart = this.state.pos, containsInvalid = false; ++this.state.pos; for (; ; ) { if (this.state.pos >= this.length) { throw this.raise(ErrorMessages.UnterminatedTemplate, { at: createPositionWithColumnOffset(this.state.startLoc, 1) }); } const ch = this.input.charCodeAt(this.state.pos); if (ch === 96) { ++this.state.pos; out += this.input.slice(chunkStart, this.state.pos); this.finishToken(24, containsInvalid ? null : out); return; } if (ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) { this.state.pos += 2; out += this.input.slice(chunkStart, this.state.pos); this.finishToken(25, containsInvalid ? null : out); return; } if (ch === 92) { out += this.input.slice(chunkStart, this.state.pos); const escaped = this.readEscapedChar(true); if (escaped === null) { containsInvalid = true; } else { out += escaped; } chunkStart = this.state.pos; } else if (isNewLine(ch)) { out += this.input.slice(chunkStart, this.state.pos); ++this.state.pos; switch (ch) { case 13: if (this.input.charCodeAt(this.state.pos) === 10) { ++this.state.pos; } case 10: out += "\n"; break; default: out += String.fromCharCode(ch); break; } ++this.state.curLine; this.state.lineStart = this.state.pos; chunkStart = this.state.pos; } else { ++this.state.pos; } } } recordStrictModeErrors(message, loc) { if (this.state.strict && !this.state.strictErrors.has(loc.index)) { this.raise(message, { at: loc }); } else { this.state.strictErrors.set(loc.index, { loc, message }); } } readEscapedChar(inTemplate) { const throwOnInvalid = !inTemplate; const ch = this.input.charCodeAt(++this.state.pos); ++this.state.pos; switch (ch) { case 110: return "\n"; case 114: return "\r"; case 120: { const code = this.readHexChar(2, false, throwOnInvalid); return code === null ? null : String.fromCharCode(code); } case 117: { const code = this.readCodePoint(throwOnInvalid); return code === null ? null : String.fromCodePoint(code); } case 116: return " "; case 98: return "\b"; case 118: return "\v"; case 102: return "\f"; case 13: if (this.input.charCodeAt(this.state.pos) === 10) { ++this.state.pos; } case 10: this.state.lineStart = this.state.pos; ++this.state.curLine; case 8232: case 8233: return ""; case 56: case 57: if (inTemplate) { return null; } else { this.recordStrictModeErrors(ErrorMessages.StrictNumericEscape, createPositionWithColumnOffset(this.state.curPosition(), -1)); } default: if (ch >= 48 && ch <= 55) { const codePos = createPositionWithColumnOffset(this.state.curPosition(), -1); const match = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/); let octalStr = match[0]; let octal = parseInt(octalStr, 8); if (octal > 255) { octalStr = octalStr.slice(0, -1); octal = parseInt(octalStr, 8); } this.state.pos += octalStr.length - 1; const next = this.input.charCodeAt(this.state.pos); if (octalStr !== "0" || next === 56 || next === 57) { if (inTemplate) { return null; } else { this.recordStrictModeErrors(ErrorMessages.StrictNumericEscape, codePos); } } return String.fromCharCode(octal); } return String.fromCharCode(ch); } } readHexChar(len, forceLen, throwOnInvalid) { const codeLoc = this.state.curPosition(); const n = this.readInt(16, len, forceLen, false); if (n === null) { if (throwOnInvalid) { this.raise(ErrorMessages.InvalidEscapeSequence, { at: codeLoc }); } else { this.state.pos = codeLoc.index - 1; } } return n; } readWord1(firstCode) { this.state.containsEsc = false; let word = ""; const start = this.state.pos; let chunkStart = this.state.pos; if (firstCode !== void 0) { this.state.pos += firstCode <= 65535 ? 1 : 2; } while (this.state.pos < this.length) { const ch = this.codePointAtPos(this.state.pos); if (isIdentifierChar(ch)) { this.state.pos += ch <= 65535 ? 1 : 2; } else if (ch === 92) { this.state.containsEsc = true; word += this.input.slice(chunkStart, this.state.pos); const escStart = this.state.curPosition(); const identifierCheck = this.state.pos === start ? isIdentifierStart : isIdentifierChar; if (this.input.charCodeAt(++this.state.pos) !== 117) { this.raise(ErrorMessages.MissingUnicodeEscape, { at: this.state.curPosition() }); chunkStart = this.state.pos - 1; continue; } ++this.state.pos; const esc = this.readCodePoint(true); if (esc !== null) { if (!identifierCheck(esc)) { this.raise(ErrorMessages.EscapedCharNotAnIdentifier, { at: escStart }); } word += String.fromCodePoint(esc); } chunkStart = this.state.pos; } else { break; } } return word + this.input.slice(chunkStart, this.state.pos); } readWord(firstCode) { const word = this.readWord1(firstCode); const type = keywords$1.get(word); if (type !== void 0) { this.finishToken(type, tokenLabelName(type)); } else { this.finishToken(128, word); } } checkKeywordEscapes() { const { type } = this.state; if (tokenIsKeyword(type) && this.state.containsEsc) { this.raise(ErrorMessages.InvalidEscapedReservedWord, { at: this.state.startLoc }, tokenLabelName(type)); } } updateContext(prevType) { } }; var ClassScope = class { constructor() { this.privateNames = /* @__PURE__ */ new Set(); this.loneAccessors = /* @__PURE__ */ new Map(); this.undefinedPrivateNames = /* @__PURE__ */ new Map(); } }; var ClassScopeHandler = class { constructor(raise) { this.stack = []; this.undefinedPrivateNames = /* @__PURE__ */ new Map(); this.raise = raise; } current() { return this.stack[this.stack.length - 1]; } enter() { this.stack.push(new ClassScope()); } exit() { const oldClassScope = this.stack.pop(); const current = this.current(); for (const [name, loc] of Array.from(oldClassScope.undefinedPrivateNames)) { if (current) { if (!current.undefinedPrivateNames.has(name)) { current.undefinedPrivateNames.set(name, loc); } } else { this.raise(ErrorMessages.InvalidPrivateFieldResolution, { at: loc }, name); } } } declarePrivateName(name, elementType, loc) { const { privateNames, loneAccessors, undefinedPrivateNames } = this.current(); let redefined = privateNames.has(name); if (elementType & CLASS_ELEMENT_KIND_ACCESSOR) { const accessor = redefined && loneAccessors.get(name); if (accessor) { const oldStatic = accessor & CLASS_ELEMENT_FLAG_STATIC; const newStatic = elementType & CLASS_ELEMENT_FLAG_STATIC; const oldKind = accessor & CLASS_ELEMENT_KIND_ACCESSOR; const newKind = elementType & CLASS_ELEMENT_KIND_ACCESSOR; redefined = oldKind === newKind || oldStatic !== newStatic; if (!redefined) loneAccessors.delete(name); } else if (!redefined) { loneAccessors.set(name, elementType); } } if (redefined) { this.raise(ErrorMessages.PrivateNameRedeclaration, { at: loc }, name); } privateNames.add(name); undefinedPrivateNames.delete(name); } usePrivateName(name, loc) { let classScope; for (classScope of this.stack) { if (classScope.privateNames.has(name)) return; } if (classScope) { classScope.undefinedPrivateNames.set(name, loc); } else { this.raise(ErrorMessages.InvalidPrivateFieldResolution, { at: loc }, name); } } }; var kExpression = 0; var kMaybeArrowParameterDeclaration = 1; var kMaybeAsyncArrowParameterDeclaration = 2; var kParameterDeclaration = 3; var ExpressionScope = class { constructor(type = kExpression) { this.type = void 0; this.type = type; } canBeArrowParameterDeclaration() { return this.type === kMaybeAsyncArrowParameterDeclaration || this.type === kMaybeArrowParameterDeclaration; } isCertainlyParameterDeclaration() { return this.type === kParameterDeclaration; } }; var ArrowHeadParsingScope = class extends ExpressionScope { constructor(type) { super(type); this.errors = /* @__PURE__ */ new Map(); } recordDeclarationError(message, loc) { this.errors.set(loc.index, { message, loc }); } clearDeclarationError(loc) { this.errors.delete(loc.index); } iterateErrors(iterator) { this.errors.forEach(iterator); } }; var ExpressionScopeHandler = class { constructor(raise) { this.stack = [new ExpressionScope()]; this.raise = raise; } enter(scope) { this.stack.push(scope); } exit() { this.stack.pop(); } recordParameterInitializerError(loc, template) { const { stack } = this; let i = stack.length - 1; let scope = stack[i]; while (!scope.isCertainlyParameterDeclaration()) { if (scope.canBeArrowParameterDeclaration()) { scope.recordDeclarationError(template, loc); } else { return; } scope = stack[--i]; } this.raise(template, { at: loc }); } recordParenthesizedIdentifierError(template, loc) { const { stack } = this; const scope = stack[stack.length - 1]; if (scope.isCertainlyParameterDeclaration()) { this.raise(template, { at: loc }); } else if (scope.canBeArrowParameterDeclaration()) { scope.recordDeclarationError(template, loc); } else { return; } } recordAsyncArrowParametersError(template, loc) { const { stack } = this; let i = stack.length - 1; let scope = stack[i]; while (scope.canBeArrowParameterDeclaration()) { if (scope.type === kMaybeAsyncArrowParameterDeclaration) { scope.recordDeclarationError(template, loc); } scope = stack[--i]; } } validateAsPattern() { const { stack } = this; const currentScope = stack[stack.length - 1]; if (!currentScope.canBeArrowParameterDeclaration()) return; currentScope.iterateErrors(({ message, loc }) => { this.raise(message, { at: loc }); let i = stack.length - 2; let scope = stack[i]; while (scope.canBeArrowParameterDeclaration()) { scope.clearDeclarationError(loc); scope = stack[--i]; } }); } }; function newParameterDeclarationScope() { return new ExpressionScope(kParameterDeclaration); } function newArrowHeadScope() { return new ArrowHeadParsingScope(kMaybeArrowParameterDeclaration); } function newAsyncArrowScope() { return new ArrowHeadParsingScope(kMaybeAsyncArrowParameterDeclaration); } function newExpressionScope() { return new ExpressionScope(); } var PARAM = 0; var PARAM_YIELD = 1; var PARAM_AWAIT = 2; var PARAM_RETURN = 4; var PARAM_IN = 8; var ProductionParameterHandler = class { constructor() { this.stacks = []; } enter(flags) { this.stacks.push(flags); } exit() { this.stacks.pop(); } currentFlags() { return this.stacks[this.stacks.length - 1]; } get hasAwait() { return (this.currentFlags() & PARAM_AWAIT) > 0; } get hasYield() { return (this.currentFlags() & PARAM_YIELD) > 0; } get hasReturn() { return (this.currentFlags() & PARAM_RETURN) > 0; } get hasIn() { return (this.currentFlags() & PARAM_IN) > 0; } }; function functionFlags(isAsync, isGenerator) { return (isAsync ? PARAM_AWAIT : 0) | (isGenerator ? PARAM_YIELD : 0); } var UtilParser = class extends Tokenizer { addExtra(node, key, value, enumerable = true) { if (!node) return; const extra = node.extra = node.extra || {}; if (enumerable) { extra[key] = value; } else { Object.defineProperty(extra, key, { enumerable, value }); } } isContextual(token) { return this.state.type === token && !this.state.containsEsc; } isUnparsedContextual(nameStart, name) { const nameEnd = nameStart + name.length; if (this.input.slice(nameStart, nameEnd) === name) { const nextCh = this.input.charCodeAt(nameEnd); return !(isIdentifierChar(nextCh) || (nextCh & 64512) === 55296); } return false; } isLookaheadContextual(name) { const next = this.nextTokenStart(); return this.isUnparsedContextual(next, name); } eatContextual(token) { if (this.isContextual(token)) { this.next(); return true; } return false; } expectContextual(token, template) { if (!this.eatContextual(token)) { if (template != null) { throw this.raise(template, { at: this.state.startLoc }); } throw this.unexpected(null, token); } } canInsertSemicolon() { return this.match(135) || this.match(8) || this.hasPrecedingLineBreak(); } hasPrecedingLineBreak() { return lineBreak.test(this.input.slice(this.state.lastTokEndLoc.index, this.state.start)); } hasFollowingLineBreak() { skipWhiteSpaceToLineBreak.lastIndex = this.state.end; return skipWhiteSpaceToLineBreak.test(this.input); } isLineTerminator() { return this.eat(13) || this.canInsertSemicolon(); } semicolon(allowAsi = true) { if (allowAsi ? this.isLineTerminator() : this.eat(13)) return; this.raise(ErrorMessages.MissingSemicolon, { at: this.state.lastTokEndLoc }); } expect(type, loc) { this.eat(type) || this.unexpected(loc, type); } assertNoSpace(message = "Unexpected space.") { if (this.state.start > this.state.lastTokEndLoc.index) { this.raise({ code: ErrorCodes.SyntaxError, reasonCode: "UnexpectedSpace", template: message }, { at: this.state.lastTokEndLoc }); } } unexpected(loc, type) { throw this.raise({ code: ErrorCodes.SyntaxError, reasonCode: "UnexpectedToken", template: type != null ? `Unexpected token, expected "${tokenLabelName(type)}"` : "Unexpected token" }, { at: loc != null ? loc : this.state.startLoc }); } getPluginNamesFromConfigs(pluginConfigs) { return pluginConfigs.map((c) => { if (typeof c === "string") { return c; } else { return c[0]; } }); } expectPlugin(pluginConfig, loc) { if (!this.hasPlugin(pluginConfig)) { throw this.raiseWithData(loc != null ? loc : this.state.startLoc, { missingPlugin: this.getPluginNamesFromConfigs([pluginConfig]) }, `This experimental syntax requires enabling the parser plugin: ${JSON.stringify(pluginConfig)}.`); } return true; } expectOnePlugin(pluginConfigs) { if (!pluginConfigs.some((c) => this.hasPlugin(c))) { throw this.raiseWithData(this.state.startLoc, { missingPlugin: this.getPluginNamesFromConfigs(pluginConfigs) }, `This experimental syntax requires enabling one of the following parser plugin(s): ${pluginConfigs.map((c) => JSON.stringify(c)).join(", ")}.`); } } tryParse(fn, oldState = this.state.clone()) { const abortSignal = { node: null }; try { const node = fn((node2 = null) => { abortSignal.node = node2; throw abortSignal; }); if (this.state.errors.length > oldState.errors.length) { const failState = this.state; this.state = oldState; this.state.tokensLength = failState.tokensLength; return { node, error: failState.errors[oldState.errors.length], thrown: false, aborted: false, failState }; } return { node, error: null, thrown: false, aborted: false, failState: null }; } catch (error) { const failState = this.state; this.state = oldState; if (error instanceof SyntaxError) { return { node: null, error, thrown: true, aborted: false, failState }; } if (error === abortSignal) { return { node: abortSignal.node, error: null, thrown: false, aborted: true, failState }; } throw error; } } checkExpressionErrors(refExpressionErrors, andThrow) { if (!refExpressionErrors) return false; const { shorthandAssignLoc, doubleProtoLoc, privateKeyLoc, optionalParametersLoc } = refExpressionErrors; const hasErrors = !!shorthandAssignLoc || !!doubleProtoLoc || !!optionalParametersLoc || !!privateKeyLoc; if (!andThrow) { return hasErrors; } if (shorthandAssignLoc != null) { this.raise(ErrorMessages.InvalidCoverInitializedName, { at: shorthandAssignLoc }); } if (doubleProtoLoc != null) { this.raise(ErrorMessages.DuplicateProto, { at: doubleProtoLoc }); } if (privateKeyLoc != null) { this.raise(ErrorMessages.UnexpectedPrivateField, { at: privateKeyLoc }); } if (optionalParametersLoc != null) { this.unexpected(optionalParametersLoc); } } isLiteralPropertyName() { return tokenIsLiteralPropertyName(this.state.type); } isPrivateName(node) { return node.type === "PrivateName"; } getPrivateNameSV(node) { return node.id.name; } hasPropertyAsPrivateName(node) { return (node.type === "MemberExpression" || node.type === "OptionalMemberExpression") && this.isPrivateName(node.property); } isOptionalChain(node) { return node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression"; } isObjectProperty(node) { return node.type === "ObjectProperty"; } isObjectMethod(node) { return node.type === "ObjectMethod"; } initializeScopes(inModule = this.options.sourceType === "module") { const oldLabels = this.state.labels; this.state.labels = []; const oldExportedIdentifiers = this.exportedIdentifiers; this.exportedIdentifiers = /* @__PURE__ */ new Set(); const oldInModule = this.inModule; this.inModule = inModule; const oldScope = this.scope; const ScopeHandler2 = this.getScopeHandler(); this.scope = new ScopeHandler2(this.raise.bind(this), this.inModule); const oldProdParam = this.prodParam; this.prodParam = new ProductionParameterHandler(); const oldClassScope = this.classScope; this.classScope = new ClassScopeHandler(this.raise.bind(this)); const oldExpressionScope = this.expressionScope; this.expressionScope = new ExpressionScopeHandler(this.raise.bind(this)); return () => { this.state.labels = oldLabels; this.exportedIdentifiers = oldExportedIdentifiers; this.inModule = oldInModule; this.scope = oldScope; this.prodParam = oldProdParam; this.classScope = oldClassScope; this.expressionScope = oldExpressionScope; }; } enterInitialScopes() { let paramFlags = PARAM; if (this.inModule) { paramFlags |= PARAM_AWAIT; } this.scope.enter(SCOPE_PROGRAM); this.prodParam.enter(paramFlags); } checkDestructuringPrivate(refExpressionErrors) { const { privateKeyLoc } = refExpressionErrors; if (privateKeyLoc !== null) { this.expectPlugin("destructuringPrivate", privateKeyLoc); } } }; var ExpressionErrors = class { constructor() { this.shorthandAssignLoc = null; this.doubleProtoLoc = null; this.privateKeyLoc = null; this.optionalParametersLoc = null; } }; var Node = class { constructor(parser, pos, loc) { this.type = ""; this.start = pos; this.end = 0; this.loc = new SourceLocation(loc); if (parser != null && parser.options.ranges) this.range = [pos, 0]; if (parser != null && parser.filename) this.loc.filename = parser.filename; } }; var NodePrototype = Node.prototype; { NodePrototype.__clone = function() { const newNode = new Node(); const keys = Object.keys(this); for (let i = 0, length = keys.length; i < length; i++) { const key = keys[i]; if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") { newNode[key] = this[key]; } } return newNode; }; } function clonePlaceholder(node) { return cloneIdentifier(node); } function cloneIdentifier(node) { const { type, start, end, loc, range, extra, name } = node; const cloned = Object.create(NodePrototype); cloned.type = type; cloned.start = start; cloned.end = end; cloned.loc = loc; cloned.range = range; cloned.extra = extra; cloned.name = name; if (type === "Placeholder") { cloned.expectedNode = node.expectedNode; } return cloned; } function cloneStringLiteral(node) { const { type, start, end, loc, range, extra } = node; if (type === "Placeholder") { return clonePlaceholder(node); } const cloned = Object.create(NodePrototype); cloned.type = type; cloned.start = start; cloned.end = end; cloned.loc = loc; cloned.range = range; if (node.raw !== void 0) { cloned.raw = node.raw; } else { cloned.extra = extra; } cloned.value = node.value; return cloned; } var NodeUtils = class extends UtilParser { startNode() { return new Node(this, this.state.start, this.state.startLoc); } startNodeAt(pos, loc) { return new Node(this, pos, loc); } startNodeAtNode(type) { return this.startNodeAt(type.start, type.loc.start); } finishNode(node, type) { return this.finishNodeAt(node, type, this.state.lastTokEndLoc); } finishNodeAt(node, type, endLoc) { node.type = type; node.end = endLoc.index; node.loc.end = endLoc; if (this.options.ranges) node.range[1] = endLoc.index; if (this.options.attachComment) this.processComment(node); return node; } resetStartLocation(node, start, startLoc) { node.start = start; node.loc.start = startLoc; if (this.options.ranges) node.range[0] = start; } resetEndLocation(node, endLoc = this.state.lastTokEndLoc) { node.end = endLoc.index; node.loc.end = endLoc; if (this.options.ranges) node.range[1] = endLoc.index; } resetStartLocationFromNode(node, locationNode) { this.resetStartLocation(node, locationNode.start, locationNode.loc.start); } }; var reservedTypes = /* @__PURE__ */ new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]); var FlowErrors = makeErrorTemplates({ 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: "Cannot overwrite reserved type %0.", 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: "Boolean enum members need to be initialized. Use either `%0 = true,` or `%0 = false,` in enum `%1`.", EnumDuplicateMemberName: "Enum member names need to be unique, but the name `%0` has already been used before in enum `%1`.", EnumInconsistentMemberValues: "Enum `%0` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.", EnumInvalidExplicitType: "Enum type `%1` is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.", EnumInvalidExplicitTypeUnknownSupplied: "Supplied enum type is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.", EnumInvalidMemberInitializerPrimaryType: "Enum `%0` has type `%2`, so the initializer of `%1` needs to be a %2 literal.", EnumInvalidMemberInitializerSymbolType: "Symbol enum members cannot be initialized. Use `%1,` in enum `%0`.", EnumInvalidMemberInitializerUnknownType: "The enum member initializer for `%1` needs to be a literal (either a boolean, number, or string) in enum `%0`.", EnumInvalidMemberName: "Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%0`, consider using `%1`, in enum `%2`.", EnumNumberMemberNotInitialized: "Number enum members need to be initialized, e.g. `%1 = 1` in enum `%0`.", EnumStringMemberInconsistentlyInitailized: "String enum members need to consistently either all use initializers, or use no initializers, in enum `%0`.", GetterMayNotHaveThisParam: "A getter cannot have a `this` parameter.", 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: "A binding pattern parameter cannot be optional in an implementation signature.", 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: "Unexpected reserved type %0.", 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 ` async () => {}`, use `async () => {}`.", UnsupportedDeclareExportKind: "`declare export %0` is not supported. Use `%1` instead.", UnsupportedStatementInDeclareModule: "Only declares and type imports are allowed inside declare module.", UnterminatedFlowComment: "Unterminated flow-comment." }, ErrorCodes.SyntaxError, "flow"); function isEsModuleType(bodyElement) { return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration"); } function hasTypeImportKind(node) { return node.importKind === "type" || node.importKind === "typeof"; } function isMaybeDefaultImport(type) { return tokenIsKeywordOrIdentifier(type) && type !== 97; } var exportSuggestions = { const: "declare export var", let: "declare export var", type: "export type", interface: "export interface" }; function partition(list, test) { const list1 = []; const list2 = []; for (let i = 0; i < list.length; i++) { (test(list[i], i, list) ? list1 : list2).push(list[i]); } return [list1, list2]; } var FLOW_PRAGMA_REGEX = /\*?\s*@((?:no)?flow)\b/; var flow = (superClass) => class extends superClass { constructor(...args) { super(...args); this.flowPragma = void 0; } getScopeHandler() { return FlowScopeHandler; } shouldParseTypes() { return this.getPluginOption("flow", "all") || this.flowPragma === "flow"; } shouldParseEnums() { return !!this.getPluginOption("flow", "enums"); } finishToken(type, val) { if (type !== 129 && type !== 13 && type !== 28) { if (this.flowPragma === void 0) { this.flowPragma = null; } } return super.finishToken(type, val); } addComment(comment) { if (this.flowPragma === void 0) { const matches = FLOW_PRAGMA_REGEX.exec(comment.value); if (!matches) ; else if (matches[1] === "flow") { this.flowPragma = "flow"; } else if (matches[1] === "noflow") { this.flowPragma = "noflow"; } else { throw new Error("Unexpected flow pragma"); } } return super.addComment(comment); } flowParseTypeInitialiser(tok) { const oldInType = this.state.inType; this.state.inType = true; this.expect(tok || 14); const type = this.flowParseType(); this.state.inType = oldInType; return type; } flowParsePredicate() { const node = this.startNode(); const moduloLoc = this.state.startLoc; this.next(); this.expectContextual(107); if (this.state.lastTokStart > moduloLoc.index + 1) { this.raise(FlowErrors.UnexpectedSpaceBetweenModuloChecks, { at: moduloLoc }); } if (this.eat(10)) { node.value = this.parseExpression(); this.expect(11); return this.finishNode(node, "DeclaredPredicate"); } else { return this.finishNode(node, "InferredPredicate"); } } flowParseTypeAndPredicateInitialiser() { const oldInType = this.state.inType; this.state.inType = true; this.expect(14); let type = null; let predicate = null; if (this.match(54)) { this.state.inType = oldInType; predicate = this.flowParsePredicate(); } else { type = this.flowParseType(); this.state.inType = oldInType; if (this.match(54)) { predicate = this.flowParsePredicate(); } } return [type, predicate]; } flowParseDeclareClass(node) { this.next(); this.flowParseInterfaceish(node, true); return this.finishNode(node, "DeclareClass"); } flowParseDeclareFunction(node) { this.next(); const id = node.id = this.parseIdentifier(); const typeNode = this.startNode(); const typeContainer = this.startNode(); if (this.match(47)) { typeNode.typeParameters = this.flowParseTypeParameterDeclaration(); } else { typeNode.typeParameters = null; } this.expect(10); const tmp = this.flowParseFunctionTypeParams(); typeNode.params = tmp.params; typeNode.rest = tmp.rest; typeNode.this = tmp._this; this.expect(11); [typeNode.returnType, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation"); id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation"); this.resetEndLocation(id); this.semicolon(); this.scope.declareName(node.id.name, BIND_FLOW_DECLARE_FN, node.id.loc.start); return this.finishNode(node, "DeclareFunction"); } flowParseDeclare(node, insideModule) { if (this.match(80)) { return this.flowParseDeclareClass(node); } else if (this.match(68)) { return this.flowParseDeclareFunction(node); } else if (this.match(74)) { return this.flowParseDeclareVariable(node); } else if (this.eatContextual(123)) { if (this.match(16)) { return this.flowParseDeclareModuleExports(node); } else { if (insideModule) { this.raise(FlowErrors.NestedDeclareModule, { at: this.state.lastTokStartLoc }); } return this.flowParseDeclareModule(node); } } else if (this.isContextual(126)) { return this.flowParseDeclareTypeAlias(node); } else if (this.isContextual(127)) { return this.flowParseDeclareOpaqueType(node); } else if (this.isContextual(125)) { return this.flowParseDeclareInterface(node); } else if (this.match(82)) { return this.flowParseDeclareExportDeclaration(node, insideModule); } else { throw this.unexpected(); } } flowParseDeclareVariable(node) { this.next(); node.id = this.flowParseTypeAnnotatableIdentifier(true); this.scope.declareName(node.id.name, BIND_VAR, node.id.loc.start); this.semicolon(); return this.finishNode(node, "DeclareVariable"); } flowParseDeclareModule(node) { this.scope.enter(SCOPE_OTHER); if (this.match(129)) { node.id = this.parseExprAtom(); } else { node.id = this.parseIdentifier(); } const bodyNode = node.body = this.startNode(); const body = bodyNode.body = []; this.expect(5); while (!this.match(8)) { let bodyNode2 = this.startNode(); if (this.match(83)) { this.next(); if (!this.isContextual(126) && !this.match(87)) { this.raise(FlowErrors.InvalidNonTypeImportInDeclareModule, { at: this.state.lastTokStartLoc }); } this.parseImport(bodyNode2); } else { this.expectContextual(121, FlowErrors.UnsupportedStatementInDeclareModule); bodyNode2 = this.flowParseDeclare(bodyNode2, true); } body.push(bodyNode2); } this.scope.exit(); this.expect(8); this.finishNode(bodyNode, "BlockStatement"); let kind = null; let hasModuleExport = false; body.forEach((bodyElement) => { if (isEsModuleType(bodyElement)) { if (kind === "CommonJS") { this.raise(FlowErrors.AmbiguousDeclareModuleKind, { node: bodyElement }); } kind = "ES"; } else if (bodyElement.type === "DeclareModuleExports") { if (hasModuleExport) { this.raise(FlowErrors.DuplicateDeclareModuleExports, { node: bodyElement }); } if (kind === "ES") { this.raise(FlowErrors.AmbiguousDeclareModuleKind, { node: bodyElement }); } kind = "CommonJS"; hasModuleExport = true; } }); node.kind = kind || "CommonJS"; return this.finishNode(node, "DeclareModule"); } flowParseDeclareExportDeclaration(node, insideModule) { this.expect(82); if (this.eat(65)) { if (this.match(68) || this.match(80)) { node.declaration = this.flowParseDeclare(this.startNode()); } else { node.declaration = this.flowParseType(); this.semicolon(); } node.default = true; return this.finishNode(node, "DeclareExportDeclaration"); } else { if (this.match(75) || this.isLet() || (this.isContextual(126) || this.isContextual(125)) && !insideModule) { const label = this.state.value; const suggestion = exportSuggestions[label]; throw this.raise(FlowErrors.UnsupportedDeclareExportKind, { at: this.state.startLoc }, label, suggestion); } if (this.match(74) || this.match(68) || this.match(80) || this.isContextual(127)) { node.declaration = this.flowParseDeclare(this.startNode()); node.default = false; return this.finishNode(node, "DeclareExportDeclaration"); } else if (this.match(55) || this.match(5) || this.isContextual(125) || this.isContextual(126) || this.isContextual(127)) { node = this.parseExport(node); if (node.type === "ExportNamedDeclaration") { node.type = "ExportDeclaration"; node.default = false; delete node.exportKind; } node.type = "Declare" + node.type; return node; } } throw this.unexpected(); } flowParseDeclareModuleExports(node) { this.next(); this.expectContextual(108); node.typeAnnotation = this.flowParseTypeAnnotation(); this.semicolon(); return this.finishNode(node, "DeclareModuleExports"); } flowParseDeclareTypeAlias(node) { this.next(); this.flowParseTypeAlias(node); node.type = "DeclareTypeAlias"; return node; } flowParseDeclareOpaqueType(node) { this.next(); this.flowParseOpaqueType(node, true); node.type = "DeclareOpaqueType"; return node; } flowParseDeclareInterface(node) { this.next(); this.flowParseInterfaceish(node); return this.finishNode(node, "DeclareInterface"); } flowParseInterfaceish(node, isClass = false) { node.id = this.flowParseRestrictedIdentifier(!isClass, true); this.scope.declareName(node.id.name, isClass ? BIND_FUNCTION : BIND_LEXICAL, node.id.loc.start); if (this.match(47)) { node.typeParameters = this.flowParseTypeParameterDeclaration(); } else { node.typeParameters = null; } node.extends = []; node.implements = []; node.mixins = []; if (this.eat(81)) { do { node.extends.push(this.flowParseInterfaceExtends()); } while (!isClass && this.eat(12)); } if (this.isContextual(114)) { this.next(); do { node.mixins.push(this.flowParseInterfaceExtends()); } while (this.eat(12)); } if (this.isContextual(110)) { this.next(); do { node.implements.push(this.flowParseInterfaceExtends()); } while (this.eat(12)); } node.body = this.flowParseObjectType({ allowStatic: isClass, allowExact: false, allowSpread: false, allowProto: isClass, allowInexact: false }); } flowParseInterfaceExtends() { const node = this.startNode(); node.id = this.flowParseQualifiedTypeIdentifier(); if (this.match(47)) { node.typeParameters = this.flowParseTypeParameterInstantiation(); } else { node.typeParameters = null; } return this.finishNode(node, "InterfaceExtends"); } flowParseInterface(node) { this.flowParseInterfaceish(node); return this.finishNode(node, "InterfaceDeclaration"); } checkNotUnderscore(word) { if (word === "_") { this.raise(FlowErrors.UnexpectedReservedUnderscore, { at: this.state.startLoc }); } } checkReservedType(word, startLoc, declaration) { if (!reservedTypes.has(word)) return; this.raise(declaration ? FlowErrors.AssignReservedType : FlowErrors.UnexpectedReservedType, { at: startLoc }, word); } flowParseRestrictedIdentifier(liberal, declaration) { this.checkReservedType(this.state.value, this.state.startLoc, declaration); return this.parseIdentifier(liberal); } flowParseTypeAlias(node) { node.id = this.flowParseRestrictedIdentifier(false, true); this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.loc.start); if (this.match(47)) { node.typeParameters = this.flowParseTypeParameterDeclaration(); } else { node.typeParameters = null; } node.right = this.flowParseTypeInitialiser(29); this.semicolon(); return this.finishNode(node, "TypeAlias"); } flowParseOpaqueType(node, declare) { this.expectContextual(126); node.id = this.flowParseRestrictedIdentifier(true, true); this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.loc.start); if (this.match(47)) { node.typeParameters = this.flowParseTypeParameterDeclaration(); } else { node.typeParameters = null; } node.supertype = null; if (this.match(14)) { node.supertype = this.flowParseTypeInitialiser(14); } node.impltype = null; if (!declare) { node.impltype = this.flowParseTypeInitialiser(29); } this.semicolon(); return this.finishNode(node, "OpaqueType"); } flowParseTypeParameter(requireDefault = false) { const nodeStartLoc = this.state.startLoc; const node = this.startNode(); const variance = this.flowParseVariance(); const ident = this.flowParseTypeAnnotatableIdentifier(); node.name = ident.name; node.variance = variance; node.bound = ident.typeAnnotation; if (this.match(29)) { this.eat(29); node.default = this.flowParseType(); } else { if (requireDefault) { this.raise(FlowErrors.MissingTypeParamDefault, { at: nodeStartLoc }); } } return this.finishNode(node, "TypeParameter"); } flowParseTypeParameterDeclaration() { const oldInType = this.state.inType; const node = this.startNode(); node.params = []; this.state.inType = true; if (this.match(47) || this.match(138)) { this.next(); } else { this.unexpected(); } let defaultRequired = false; do { const typeParameter = this.flowParseTypeParameter(defaultRequired); node.params.push(typeParameter); if (typeParameter.default) { defaultRequired = true; } if (!this.match(48)) { this.expect(12); } } while (!this.match(48)); this.expect(48); this.state.inType = oldInType; return this.finishNode(node, "TypeParameterDeclaration"); } flowParseTypeParameterInstantiation() { const node = this.startNode(); const oldInType = this.state.inType; node.params = []; this.state.inType = true; this.expect(47); const oldNoAnonFunctionType = this.state.noAnonFunctionType; this.state.noAnonFunctionType = false; while (!this.match(48)) { node.params.push(this.flowParseType()); if (!this.match(48)) { this.expect(12); } } this.state.noAnonFunctionType = oldNoAnonFunctionType; this.expect(48); this.state.inType = oldInType; return this.finishNode(node, "TypeParameterInstantiation"); } flowParseTypeParameterInstantiationCallOrNew() { const node = this.startNode(); const oldInType = this.state.inType; node.params = []; this.state.inType = true; this.expect(47); while (!this.match(48)) { node.params.push(this.flowParseTypeOrImplicitInstantiation()); if (!this.match(48)) { this.expect(12); } } this.expect(48); this.state.inType = oldInType; return this.finishNode(node, "TypeParameterInstantiation"); } flowParseInterfaceType() { const node = this.startNode(); this.expectContextual(125); node.extends = []; if (this.eat(81)) { do { node.extends.push(this.flowParseInterfaceExtends()); } while (this.eat(12)); } node.body = this.flowParseObjectType({ allowStatic: false, allowExact: false, allowSpread: false, allowProto: false, allowInexact: false }); return this.finishNode(node, "InterfaceTypeAnnotation"); } flowParseObjectPropertyKey() { return this.match(130) || this.match(129) ? this.parseExprAtom() : this.parseIdentifier(true); } flowParseObjectTypeIndexer(node, isStatic, variance) { node.static = isStatic; if (this.lookahead().type === 14) { node.id = this.flowParseObjectPropertyKey(); node.key = this.flowParseTypeInitialiser(); } else { node.id = null; node.key = this.flowParseType(); } this.expect(3); node.value = this.flowParseTypeInitialiser(); node.variance = variance; return this.finishNode(node, "ObjectTypeIndexer"); } flowParseObjectTypeInternalSlot(node, isStatic) { node.static = isStatic; node.id = this.flowParseObjectPropertyKey(); this.expect(3); this.expect(3); if (this.match(47) || this.match(10)) { node.method = true; node.optional = false; node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start)); } else { node.method = false; if (this.eat(17)) { node.optional = true; } node.value = this.flowParseTypeInitialiser(); } return this.finishNode(node, "ObjectTypeInternalSlot"); } flowParseObjectTypeMethodish(node) { node.params = []; node.rest = null; node.typeParameters = null; node.this = null; if (this.match(47)) { node.typeParameters = this.flowParseTypeParameterDeclaration(); } this.expect(10); if (this.match(78)) { node.this = this.flowParseFunctionTypeParam(true); node.this.name = null; if (!this.match(11)) { this.expect(12); } } while (!this.match(11) && !this.match(21)) { node.params.push(this.flowParseFunctionTypeParam(false)); if (!this.match(11)) { this.expect(12); } } if (this.eat(21)) { node.rest = this.flowParseFunctionTypeParam(false); } this.expect(11); node.returnType = this.flowParseTypeInitialiser(); return this.finishNode(node, "FunctionTypeAnnotation"); } flowParseObjectTypeCallProperty(node, isStatic) { const valueNode = this.startNode(); node.static = isStatic; node.value = this.flowParseObjectTypeMethodish(valueNode); return this.finishNode(node, "ObjectTypeCallProperty"); } flowParseObjectType({ allowStatic, allowExact, allowSpread, allowProto, allowInexact }) { const oldInType = this.state.inType; this.state.inType = true; const nodeStart = this.startNode(); nodeStart.callProperties = []; nodeStart.properties = []; nodeStart.indexers = []; nodeStart.internalSlots = []; let endDelim; let exact; let inexact = false; if (allowExact && this.match(6)) { this.expect(6); endDelim = 9; exact = true; } else { this.expect(5); endDelim = 8; exact = false; } nodeStart.exact = exact; while (!this.match(endDelim)) { let isStatic = false; let protoStartLoc = null; let inexactStartLoc = null; const node = this.startNode(); if (allowProto && this.isContextual(115)) { const lookahead = this.lookahead(); if (lookahead.type !== 14 && lookahead.type !== 17) { this.next(); protoStartLoc = this.state.startLoc; allowStatic = false; } } if (allowStatic && this.isContextual(104)) { const lookahead = this.lookahead(); if (lookahead.type !== 14 && lookahead.type !== 17) { this.next(); isStatic = true; } } const variance = this.flowParseVariance(); if (this.eat(0)) { if (protoStartLoc != null) { this.unexpected(protoStartLoc); } if (this.eat(0)) { if (variance) { this.unexpected(variance.loc.start); } nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node, isStatic)); } else { nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance)); } } else if (this.match(10) || this.match(47)) { if (protoStartLoc != null) { this.unexpected(protoStartLoc); } if (variance) { this.unexpected(variance.loc.start); } nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic)); } else { let kind = "init"; if (this.isContextual(98) || this.isContextual(103)) { const lookahead = this.lookahead(); if (tokenIsLiteralPropertyName(lookahead.type)) { kind = this.state.value; this.next(); } } const propOrInexact = this.flowParseObjectTypeProperty(node, isStatic, protoStartLoc, variance, kind, allowSpread, allowInexact != null ? allowInexact : !exact); if (propOrInexact === null) { inexact = true; inexactStartLoc = this.state.lastTokStartLoc; } else { nodeStart.properties.push(propOrInexact); } } this.flowObjectTypeSemicolon(); if (inexactStartLoc && !this.match(8) && !this.match(9)) { this.raise(FlowErrors.UnexpectedExplicitInexactInObject, { at: inexactStartLoc }); } } this.expect(endDelim); if (allowSpread) { nodeStart.inexact = inexact; } const out = this.finishNode(nodeStart, "ObjectTypeAnnotation"); this.state.inType = oldInType; return out; } flowParseObjectTypeProperty(node, isStatic, protoStartLoc, variance, kind, allowSpread, allowInexact) { if (this.eat(21)) { const isInexactToken = this.match(12) || this.match(13) || this.match(8) || this.match(9); if (isInexactToken) { if (!allowSpread) { this.raise(FlowErrors.InexactInsideNonObject, { at: this.state.lastTokStartLoc }); } else if (!allowInexact) { this.raise(FlowErrors.InexactInsideExact, { at: this.state.lastTokStartLoc }); } if (variance) { this.raise(FlowErrors.InexactVariance, { node: variance }); } return null; } if (!allowSpread) { this.raise(FlowErrors.UnexpectedSpreadType, { at: this.state.lastTokStartLoc }); } if (protoStartLoc != null) { this.unexpected(protoStartLoc); } if (variance) { this.raise(FlowErrors.SpreadVariance, { node: variance }); } node.argument = this.flowParseType(); return this.finishNode(node, "ObjectTypeSpreadProperty"); } else { node.key = this.flowParseObjectPropertyKey(); node.static = isStatic; node.proto = protoStartLoc != null; node.kind = kind; let optional = false; if (this.match(47) || this.match(10)) { node.method = true; if (protoStartLoc != null) { this.unexpected(protoStartLoc); } if (variance) { this.unexpected(variance.loc.start); } node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start)); if (kind === "get" || kind === "set") { this.flowCheckGetterSetterParams(node); } if (!allowSpread && node.key.name === "constructor" && node.value.this) { this.raise(FlowErrors.ThisParamBannedInConstructor, { node: node.value.this }); } } else { if (kind !== "init") this.unexpected(); node.method = false; if (this.eat(17)) { optional = true; } node.value = this.flowParseTypeInitialiser(); node.variance = variance; } node.optional = optional; return this.finishNode(node, "ObjectTypeProperty"); } } flowCheckGetterSetterParams(property) { const paramCount = property.kind === "get" ? 0 : 1; const length = property.value.params.length + (property.value.rest ? 1 : 0); if (property.value.this) { this.raise(property.kind === "get" ? FlowErrors.GetterMayNotHaveThisParam : FlowErrors.SetterMayNotHaveThisParam, { node: property.value.this }); } if (length !== paramCount) { this.raise(property.kind === "get" ? ErrorMessages.BadGetterArity : ErrorMessages.BadSetterArity, { node: property }); } if (property.kind === "set" && property.value.rest) { this.raise(ErrorMessages.BadSetterRestParameter, { node: property }); } } flowObjectTypeSemicolon() { if (!this.eat(13) && !this.eat(12) && !this.match(8) && !this.match(9)) { this.unexpected(); } } flowParseQualifiedTypeIdentifier(startPos, startLoc, id) { startPos = startPos || this.state.start; startLoc = startLoc || this.state.startLoc; let node = id || this.flowParseRestrictedIdentifier(true); while (this.eat(16)) { const node2 = this.startNodeAt(startPos, startLoc); node2.qualification = node; node2.id = this.flowParseRestrictedIdentifier(true); node = this.finishNode(node2, "QualifiedTypeIdentifier"); } return node; } flowParseGenericType(startPos, startLoc, id) { const node = this.startNodeAt(startPos, startLoc); node.typeParameters = null; node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id); if (this.match(47)) { node.typeParameters = this.flowParseTypeParameterInstantiation(); } return this.finishNode(node, "GenericTypeAnnotation"); } flowParseTypeofType() { const node = this.startNode(); this.expect(87); node.argument = this.flowParsePrimaryType(); return this.finishNode(node, "TypeofTypeAnnotation"); } flowParseTupleType() { const node = this.startNode(); node.types = []; this.expect(0); while (this.state.pos < this.length && !this.match(3)) { node.types.push(this.flowParseType()); if (this.match(3)) break; this.expect(12); } this.expect(3); return this.finishNode(node, "TupleTypeAnnotation"); } flowParseFunctionTypeParam(first) { let name = null; let optional = false; let typeAnnotation = null; const node = this.startNode(); const lh = this.lookahead(); const isThis = this.state.type === 78; if (lh.type === 14 || lh.type === 17) { if (isThis && !first) { this.raise(FlowErrors.ThisParamMustBeFirst, { node }); } name = this.parseIdentifier(isThis); if (this.eat(17)) { optional = true; if (isThis) { this.raise(FlowErrors.ThisParamMayNotBeOptional, { node }); } } typeAnnotation = this.flowParseTypeInitialiser(); } else { typeAnnotation = this.flowParseType(); } node.name = name; node.optional = optional; node.typeAnnotation = typeAnnotation; return this.finishNode(node, "FunctionTypeParam"); } reinterpretTypeAsFunctionTypeParam(type) { const node = this.startNodeAt(type.start, type.loc.start); node.name = null; node.optional = false; node.typeAnnotation = type; return this.finishNode(node, "FunctionTypeParam"); } flowParseFunctionTypeParams(params = []) { let rest = null; let _this = null; if (this.match(78)) { _this = this.flowParseFunctionTypeParam(true); _this.name = null; if (!this.match(11)) { this.expect(12); } } while (!this.match(11) && !this.match(21)) { params.push(this.flowParseFunctionTypeParam(false)); if (!this.match(11)) { this.expect(12); } } if (this.eat(21)) { rest = this.flowParseFunctionTypeParam(false); } return { params, rest, _this }; } flowIdentToTypeAnnotation(startPos, startLoc, node, id) { switch (id.name) { case "any": return this.finishNode(node, "AnyTypeAnnotation"); case "bool": case "boolean": return this.finishNode(node, "BooleanTypeAnnotation"); case "mixed": return this.finishNode(node, "MixedTypeAnnotation"); case "empty": return this.finishNode(node, "EmptyTypeAnnotation"); case "number": return this.finishNode(node, "NumberTypeAnnotation"); case "string": return this.finishNode(node, "StringTypeAnnotation"); case "symbol": return this.finishNode(node, "SymbolTypeAnnotation"); default: this.checkNotUnderscore(id.name); return this.flowParseGenericType(startPos, startLoc, id); } } flowParsePrimaryType() { const startPos = this.state.start; const startLoc = this.state.startLoc; const node = this.startNode(); let tmp; let type; let isGroupedType = false; const oldNoAnonFunctionType = this.state.noAnonFunctionType; switch (this.state.type) { case 5: return this.flowParseObjectType({ allowStatic: false, allowExact: false, allowSpread: true, allowProto: false, allowInexact: true }); case 6: return this.flowParseObjectType({ allowStatic: false, allowExact: true, allowSpread: true, allowProto: false, allowInexact: false }); case 0: this.state.noAnonFunctionType = false; type = this.flowParseTupleType(); this.state.noAnonFunctionType = oldNoAnonFunctionType; return type; case 47: node.typeParameters = this.flowParseTypeParameterDeclaration(); this.expect(10); tmp = this.flowParseFunctionTypeParams(); node.params = tmp.params; node.rest = tmp.rest; node.this = tmp._this; this.expect(11); this.expect(19); node.returnType = this.flowParseType(); return this.finishNode(node, "FunctionTypeAnnotation"); case 10: this.next(); if (!this.match(11) && !this.match(21)) { if (tokenIsIdentifier(this.state.type) || this.match(78)) { const token = this.lookahead().type; isGroupedType = token !== 17 && token !== 14; } else { isGroupedType = true; } } if (isGroupedType) { this.state.noAnonFunctionType = false; type = this.flowParseType(); this.state.noAnonFunctionType = oldNoAnonFunctionType; if (this.state.noAnonFunctionType || !(this.match(12) || this.match(11) && this.lookahead().type === 19)) { this.expect(11); return type; } else { this.eat(12); } } if (type) { tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]); } else { tmp = this.flowParseFunctionTypeParams(); } node.params = tmp.params; node.rest = tmp.rest; node.this = tmp._this; this.expect(11); this.expect(19); node.returnType = this.flowParseType(); node.typeParameters = null; return this.finishNode(node, "FunctionTypeAnnotation"); case 129: return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation"); case 85: case 86: node.value = this.match(85); this.next(); return this.finishNode(node, "BooleanLiteralTypeAnnotation"); case 53: if (this.state.value === "-") { this.next(); if (this.match(130)) { return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", node); } if (this.match(131)) { return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", node); } throw this.raise(FlowErrors.UnexpectedSubtractionOperand, { at: this.state.startLoc }); } throw this.unexpected(); case 130: return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation"); case 131: return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation"); case 88: this.next(); return this.finishNode(node, "VoidTypeAnnotation"); case 84: this.next(); return this.finishNode(node, "NullLiteralTypeAnnotation"); case 78: this.next(); return this.finishNode(node, "ThisTypeAnnotation"); case 55: this.next(); return this.finishNode(node, "ExistsTypeAnnotation"); case 87: return this.flowParseTypeofType(); default: if (tokenIsKeyword(this.state.type)) { const label = tokenLabelName(this.state.type); this.next(); return super.createIdentifier(node, label); } else if (tokenIsIdentifier(this.state.type)) { if (this.isContextual(125)) { return this.flowParseInterfaceType(); } return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier()); } } throw this.unexpected(); } flowParsePostfixType() { const startPos = this.state.start; const startLoc = this.state.startLoc; let type = this.flowParsePrimaryType(); let seenOptionalIndexedAccess = false; while ((this.match(0) || this.match(18)) && !this.canInsertSemicolon()) { const node = this.startNodeAt(startPos, startLoc); const optional = this.eat(18); seenOptionalIndexedAccess = seenOptionalIndexedAccess || optional; this.expect(0); if (!optional && this.match(3)) { node.elementType = type; this.next(); type = this.finishNode(node, "ArrayTypeAnnotation"); } else { node.objectType = type; node.indexType = this.flowParseType(); this.expect(3); if (seenOptionalIndexedAccess) { node.optional = optional; type = this.finishNode(node, "OptionalIndexedAccessType"); } else { type = this.finishNode(node, "IndexedAccessType"); } } } return type; } flowParsePrefixType() { const node = this.startNode(); if (this.eat(17)) { node.typeAnnotation = this.flowParsePrefixType(); return this.finishNode(node, "NullableTypeAnnotation"); } else { return this.flowParsePostfixType(); } } flowParseAnonFunctionWithoutParens() { const param = this.flowParsePrefixType(); if (!this.state.noAnonFunctionType && this.eat(19)) { const node = this.startNodeAt(param.start, param.loc.start); node.params = [this.reinterpretTypeAsFunctionTypeParam(param)]; node.rest = null; node.this = null; node.returnType = this.flowParseType(); node.typeParameters = null; return this.finishNode(node, "FunctionTypeAnnotation"); } return param; } flowParseIntersectionType() { const node = this.startNode(); this.eat(45); const type = this.flowParseAnonFunctionWithoutParens(); node.types = [type]; while (this.eat(45)) { node.types.push(this.flowParseAnonFunctionWithoutParens()); } return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation"); } flowParseUnionType() { const node = this.startNode(); this.eat(43); const type = this.flowParseIntersectionType(); node.types = [type]; while (this.eat(43)) { node.types.push(this.flowParseIntersectionType()); } return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation"); } flowParseType() { const oldInType = this.state.inType; this.state.inType = true; const type = this.flowParseUnionType(); this.state.inType = oldInType; return type; } flowParseTypeOrImplicitInstantiation() { if (this.state.type === 128 && this.state.value === "_") { const startPos = this.state.start; const startLoc = this.state.startLoc; const node = this.parseIdentifier(); return this.flowParseGenericType(startPos, startLoc, node); } else { return this.flowParseType(); } } flowParseTypeAnnotation() { const node = this.startNode(); node.typeAnnotation = this.flowParseTypeInitialiser(); return this.finishNode(node, "TypeAnnotation"); } flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) { const ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier(); if (this.match(14)) { ident.typeAnnotation = this.flowParseTypeAnnotation(); this.resetEndLocation(ident); } return ident; } typeCastToParameter(node) { node.expression.typeAnnotation = node.typeAnnotation; this.resetEndLocation(node.expression, node.typeAnnotation.loc.end); return node.expression; } flowParseVariance() { let variance = null; if (this.match(53)) { variance = this.startNode(); if (this.state.value === "+") { variance.kind = "plus"; } else { variance.kind = "minus"; } this.next(); this.finishNode(variance, "Variance"); } return variance; } parseFunctionBody(node, allowExpressionBody, isMethod = false) { if (allowExpressionBody) { return this.forwardNoArrowParamsConversionAt(node, () => super.parseFunctionBody(node, true, isMethod)); } return super.parseFunctionBody(node, false, isMethod); } parseFunctionBodyAndFinish(node, type, isMethod = false) { if (this.match(14)) { const typeNode = this.startNode(); [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null; } super.parseFunctionBodyAndFinish(node, type, isMethod); } parseStatement(context, topLevel) { if (this.state.strict && this.isContextual(125)) { const lookahead = this.lookahead(); if (tokenIsKeywordOrIdentifier(lookahead.type)) { const node = this.startNode(); this.next(); return this.flowParseInterface(node); } } else if (this.shouldParseEnums() && this.isContextual(122)) { const node = this.startNode(); this.next(); return this.flowParseEnumDeclaration(node); } const stmt = super.parseStatement(context, topLevel); if (this.flowPragma === void 0 && !this.isValidDirective(stmt)) { this.flowPragma = null; } return stmt; } parseExpressionStatement(node, expr) { if (expr.type === "Identifier") { if (expr.name === "declare") { if (this.match(80) || tokenIsIdentifier(this.state.type) || this.match(68) || this.match(74) || this.match(82)) { return this.flowParseDeclare(node); } } else if (tokenIsIdentifier(this.state.type)) { if (expr.name === "interface") { return this.flowParseInterface(node); } else if (expr.name === "type") { return this.flowParseTypeAlias(node); } else if (expr.name === "opaque") { return this.flowParseOpaqueType(node, false); } } } return super.parseExpressionStatement(node, expr); } shouldParseExportDeclaration() { const { type } = this.state; if (tokenIsFlowInterfaceOrTypeOrOpaque(type) || this.shouldParseEnums() && type === 122) { return !this.state.containsEsc; } return super.shouldParseExportDeclaration(); } isExportDefaultSpecifier() { const { type } = this.state; if (tokenIsFlowInterfaceOrTypeOrOpaque(type) || this.shouldParseEnums() && type === 122) { return this.state.containsEsc; } return super.isExportDefaultSpecifier(); } parseExportDefaultExpression() { if (this.shouldParseEnums() && this.isContextual(122)) { const node = this.startNode(); this.next(); return this.flowParseEnumDeclaration(node); } return super.parseExportDefaultExpression(); } parseConditional(expr, startPos, startLoc, refExpressionErrors) { if (!this.match(17)) return expr; if (this.state.maybeInArrowParameters) { const nextCh = this.lookaheadCharCode(); if (nextCh === 44 || nextCh === 61 || nextCh === 58 || nextCh === 41) { this.setOptionalParametersError(refExpressionErrors); return expr; } } this.expect(17); const state = this.state.clone(); const originalNoArrowAt = this.state.noArrowAt; const node = this.startNodeAt(startPos, startLoc); let { consequent, failed } = this.tryParseConditionalConsequent(); let [valid, invalid] = this.getArrowLikeExpressions(consequent); if (failed || invalid.length > 0) { const noArrowAt = [...originalNoArrowAt]; if (invalid.length > 0) { this.state = state; this.state.noArrowAt = noArrowAt; for (let i = 0; i < invalid.length; i++) { noArrowAt.push(invalid[i].start); } ({ consequent, failed } = this.tryParseConditionalConsequent()); [valid, invalid] = this.getArrowLikeExpressions(consequent); } if (failed && valid.length > 1) { this.raise(FlowErrors.AmbiguousConditionalArrow, { at: state.startLoc }); } if (failed && valid.length === 1) { this.state = state; noArrowAt.push(valid[0].start); this.state.noArrowAt = noArrowAt; ({ consequent, failed } = this.tryParseConditionalConsequent()); } } this.getArrowLikeExpressions(consequent, true); this.state.noArrowAt = originalNoArrowAt; this.expect(14); node.test = expr; node.consequent = consequent; node.alternate = this.forwardNoArrowParamsConversionAt(node, () => this.parseMaybeAssign(void 0, void 0)); return this.finishNode(node, "ConditionalExpression"); } tryParseConditionalConsequent() { this.state.noArrowParamsConversionAt.push(this.state.start); const consequent = this.parseMaybeAssignAllowIn(); const failed = !this.match(14); this.state.noArrowParamsConversionAt.pop(); return { consequent, failed }; } getArrowLikeExpressions(node, disallowInvalid) { const stack = [node]; const arrows = []; while (stack.length !== 0) { const node2 = stack.pop(); if (node2.type === "ArrowFunctionExpression") { if (node2.typeParameters || !node2.returnType) { this.finishArrowValidation(node2); } else { arrows.push(node2); } stack.push(node2.body); } else if (node2.type === "ConditionalExpression") { stack.push(node2.consequent); stack.push(node2.alternate); } } if (disallowInvalid) { arrows.forEach((node2) => this.finishArrowValidation(node2)); return [arrows, []]; } return partition(arrows, (node2) => node2.params.every((param) => this.isAssignable(param, true))); } finishArrowValidation(node) { var _node$extra; this.toAssignableList(node.params, (_node$extra = node.extra) == null ? void 0 : _node$extra.trailingCommaLoc, false); this.scope.enter(SCOPE_FUNCTION | SCOPE_ARROW); super.checkParams(node, false, true); this.scope.exit(); } forwardNoArrowParamsConversionAt(node, parse2) { let result; if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { this.state.noArrowParamsConversionAt.push(this.state.start); result = parse2(); this.state.noArrowParamsConversionAt.pop(); } else { result = parse2(); } return result; } parseParenItem(node, startPos, startLoc) { node = super.parseParenItem(node, startPos, startLoc); if (this.eat(17)) { node.optional = true; this.resetEndLocation(node); } if (this.match(14)) { const typeCastNode = this.startNodeAt(startPos, startLoc); typeCastNode.expression = node; typeCastNode.typeAnnotation = this.flowParseTypeAnnotation(); return this.finishNode(typeCastNode, "TypeCastExpression"); } return node; } assertModuleNodeAllowed(node) { if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") { return; } super.assertModuleNodeAllowed(node); } parseExport(node) { const decl = super.parseExport(node); if (decl.type === "ExportNamedDeclaration" || decl.type === "ExportAllDeclaration") { decl.exportKind = decl.exportKind || "value"; } return decl; } parseExportDeclaration(node) { if (this.isContextual(126)) { node.exportKind = "type"; const declarationNode = this.startNode(); this.next(); if (this.match(5)) { node.specifiers = this.parseExportSpecifiers(true); this.parseExportFrom(node); return null; } else { return this.flowParseTypeAlias(declarationNode); } } else if (this.isContextual(127)) { node.exportKind = "type"; const declarationNode = this.startNode(); this.next(); return this.flowParseOpaqueType(declarationNode, false); } else if (this.isContextual(125)) { node.exportKind = "type"; const declarationNode = this.startNode(); this.next(); return this.flowParseInterface(declarationNode); } else if (this.shouldParseEnums() && this.isContextual(122)) { node.exportKind = "value"; const declarationNode = this.startNode(); this.next(); return this.flowParseEnumDeclaration(declarationNode); } else { return super.parseExportDeclaration(node); } } eatExportStar(node) { if (super.eatExportStar(...arguments)) return true; if (this.isContextual(126) && this.lookahead().type === 55) { node.exportKind = "type"; this.next(); this.next(); return true; } return false; } maybeParseExportNamespaceSpecifier(node) { const { startLoc } = this.state; const hasNamespace = super.maybeParseExportNamespaceSpecifier(node); if (hasNamespace && node.exportKind === "type") { this.unexpected(startLoc); } return hasNamespace; } parseClassId(node, isStatement, optionalId) { super.parseClassId(node, isStatement, optionalId); if (this.match(47)) { node.typeParameters = this.flowParseTypeParameterDeclaration(); } } parseClassMember(classBody, member, state) { const { startLoc } = this.state; if (this.isContextual(121)) { if (this.parseClassMemberFromModifier(classBody, member)) { return; } member.declare = true; } super.parseClassMember(classBody, member, state); if (member.declare) { if (member.type !== "ClassProperty" && member.type !== "ClassPrivateProperty" && member.type !== "PropertyDefinition") { this.raise(FlowErrors.DeclareClassElement, { at: startLoc }); } else if (member.value) { this.raise(FlowErrors.DeclareClassFieldInitializer, { node: member.value }); } } } isIterator(word) { return word === "iterator" || word === "asyncIterator"; } readIterator() { const word = super.readWord1(); const fullWord = "@@" + word; if (!this.isIterator(word) || !this.state.inType) { this.raise(ErrorMessages.InvalidIdentifier, { at: this.state.curPosition() }, fullWord); } this.finishToken(128, fullWord); } getTokenFromCode(code) { const next = this.input.charCodeAt(this.state.pos + 1); if (code === 123 && next === 124) { return this.finishOp(6, 2); } else if (this.state.inType && (code === 62 || code === 60)) { return this.finishOp(code === 62 ? 48 : 47, 1); } else if (this.state.inType && code === 63) { if (next === 46) { return this.finishOp(18, 2); } return this.finishOp(17, 1); } else if (isIteratorStart(code, next, this.input.charCodeAt(this.state.pos + 2))) { this.state.pos += 2; return this.readIterator(); } else { return super.getTokenFromCode(code); } } isAssignable(node, isBinding) { if (node.type === "TypeCastExpression") { return this.isAssignable(node.expression, isBinding); } else { return super.isAssignable(node, isBinding); } } toAssignable(node, isLHS = false) { if (node.type === "TypeCastExpression") { return super.toAssignable(this.typeCastToParameter(node), isLHS); } else { return super.toAssignable(node, isLHS); } } toAssignableList(exprList, trailingCommaLoc, isLHS) { for (let i = 0; i < exprList.length; i++) { const expr = exprList[i]; if ((expr == null ? void 0 : expr.type) === "TypeCastExpression") { exprList[i] = this.typeCastToParameter(expr); } } return super.toAssignableList(exprList, trailingCommaLoc, isLHS); } toReferencedList(exprList, isParenthesizedExpr) { for (let i = 0; i < exprList.length; i++) { var _expr$extra; const expr = exprList[i]; if (expr && expr.type === "TypeCastExpression" && !((_expr$extra = expr.extra) != null && _expr$extra.parenthesized) && (exprList.length > 1 || !isParenthesizedExpr)) { this.raise(FlowErrors.TypeCastInPattern, { node: expr.typeAnnotation }); } } return exprList; } parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) { const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors); if (canBePattern && !this.state.maybeInArrowParameters) { this.toReferencedList(node.elements); } return node; } checkLVal(expr, ...args) { if (expr.type !== "TypeCastExpression") { return super.checkLVal(expr, ...args); } } parseClassProperty(node) { if (this.match(14)) { node.typeAnnotation = this.flowParseTypeAnnotation(); } return super.parseClassProperty(node); } parseClassPrivateProperty(node) { if (this.match(14)) { node.typeAnnotation = this.flowParseTypeAnnotation(); } return super.parseClassPrivateProperty(node); } isClassMethod() { return this.match(47) || super.isClassMethod(); } isClassProperty() { return this.match(14) || super.isClassProperty(); } isNonstaticConstructor(method) { return !this.match(14) && super.isNonstaticConstructor(method); } pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { if (method.variance) { this.unexpected(method.variance.loc.start); } delete method.variance; if (this.match(47)) { method.typeParameters = this.flowParseTypeParameterDeclaration(); } super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper); if (method.params && isConstructor) { const params = method.params; if (params.length > 0 && this.isThisParam(params[0])) { this.raise(FlowErrors.ThisParamBannedInConstructor, { node: method }); } } else if (method.type === "MethodDefinition" && isConstructor && method.value.params) { const params = method.value.params; if (params.length > 0 && this.isThisParam(params[0])) { this.raise(FlowErrors.ThisParamBannedInConstructor, { node: method }); } } } pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { if (method.variance) { this.unexpected(method.variance.loc.start); } delete method.variance; if (this.match(47)) { method.typeParameters = this.flowParseTypeParameterDeclaration(); } super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync); } parseClassSuper(node) { super.parseClassSuper(node); if (node.superClass && this.match(47)) { node.superTypeParameters = this.flowParseTypeParameterInstantiation(); } if (this.isContextual(110)) { this.next(); const implemented = node.implements = []; do { const node2 = this.startNode(); node2.id = this.flowParseRestrictedIdentifier(true); if (this.match(47)) { node2.typeParameters = this.flowParseTypeParameterInstantiation(); } else { node2.typeParameters = null; } implemented.push(this.finishNode(node2, "ClassImplements")); } while (this.eat(12)); } } checkGetterSetterParams(method) { super.checkGetterSetterParams(method); const params = this.getObjectOrClassMethodParams(method); if (params.length > 0) { const param = params[0]; if (this.isThisParam(param) && method.kind === "get") { this.raise(FlowErrors.GetterMayNotHaveThisParam, { node: param }); } else if (this.isThisParam(param)) { this.raise(FlowErrors.SetterMayNotHaveThisParam, { node: param }); } } } parsePropertyNamePrefixOperator(node) { node.variance = this.flowParseVariance(); } parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) { if (prop.variance) { this.unexpected(prop.variance.loc.start); } delete prop.variance; let typeParameters; if (this.match(47) && !isAccessor) { typeParameters = this.flowParseTypeParameterDeclaration(); if (!this.match(10)) this.unexpected(); } super.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors); if (typeParameters) { (prop.value || prop).typeParameters = typeParameters; } } parseAssignableListItemTypes(param) { if (this.eat(17)) { if (param.type !== "Identifier") { this.raise(FlowErrors.PatternIsOptional, { node: param }); } if (this.isThisParam(param)) { this.raise(FlowErrors.ThisParamMayNotBeOptional, { node: param }); } param.optional = true; } if (this.match(14)) { param.typeAnnotation = this.flowParseTypeAnnotation(); } else if (this.isThisParam(param)) { this.raise(FlowErrors.ThisParamAnnotationRequired, { node: param }); } if (this.match(29) && this.isThisParam(param)) { this.raise(FlowErrors.ThisParamNoDefault, { node: param }); } this.resetEndLocation(param); return param; } parseMaybeDefault(startPos, startLoc, left) { const node = super.parseMaybeDefault(startPos, startLoc, left); if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { this.raise(FlowErrors.TypeBeforeInitializer, { node: node.typeAnnotation }); } return node; } shouldParseDefaultImport(node) { if (!hasTypeImportKind(node)) { return super.shouldParseDefaultImport(node); } return isMaybeDefaultImport(this.state.type); } parseImportSpecifierLocal(node, specifier, type, contextDescription) { specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true, true) : this.parseIdentifier(); this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL); node.specifiers.push(this.finishNode(specifier, type)); } maybeParseDefaultImportSpecifier(node) { node.importKind = "value"; let kind = null; if (this.match(87)) { kind = "typeof"; } else if (this.isContextual(126)) { kind = "type"; } if (kind) { const lh = this.lookahead(); const { type } = lh; if (kind === "type" && type === 55) { this.unexpected(null, lh.type); } if (isMaybeDefaultImport(type) || type === 5 || type === 55) { this.next(); node.importKind = kind; } } return super.maybeParseDefaultImportSpecifier(node); } parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly) { const firstIdent = specifier.imported; let specifierTypeKind = null; if (firstIdent.type === "Identifier") { if (firstIdent.name === "type") { specifierTypeKind = "type"; } else if (firstIdent.name === "typeof") { specifierTypeKind = "typeof"; } } let isBinding = false; if (this.isContextual(93) && !this.isLookaheadContextual("as")) { const as_ident = this.parseIdentifier(true); if (specifierTypeKind !== null && !tokenIsKeywordOrIdentifier(this.state.type)) { specifier.imported = as_ident; specifier.importKind = specifierTypeKind; specifier.local = cloneIdentifier(as_ident); } else { specifier.imported = firstIdent; specifier.importKind = null; specifier.local = this.parseIdentifier(); } } else { if (specifierTypeKind !== null && tokenIsKeywordOrIdentifier(this.state.type)) { specifier.imported = this.parseIdentifier(true); specifier.importKind = specifierTypeKind; } else { if (importedIsString) { throw this.raise(ErrorMessages.ImportBindingIsString, { node: specifier }, firstIdent.value); } specifier.imported = firstIdent; specifier.importKind = null; } if (this.eatContextual(93)) { specifier.local = this.parseIdentifier(); } else { isBinding = true; specifier.local = cloneIdentifier(specifier.imported); } } const specifierIsTypeImport = hasTypeImportKind(specifier); if (isInTypeOnlyImport && specifierIsTypeImport) { this.raise(FlowErrors.ImportTypeShorthandOnlyInPureImport, { node: specifier }); } if (isInTypeOnlyImport || specifierIsTypeImport) { this.checkReservedType(specifier.local.name, specifier.local.loc.start, true); } if (isBinding && !isInTypeOnlyImport && !specifierIsTypeImport) { this.checkReservedWord(specifier.local.name, specifier.loc.start, true, true); } this.checkLVal(specifier.local, "import specifier", BIND_LEXICAL); return this.finishNode(specifier, "ImportSpecifier"); } parseBindingAtom() { switch (this.state.type) { case 78: return this.parseIdentifier(true); default: return super.parseBindingAtom(); } } parseFunctionParams(node, allowModifiers) { const kind = node.kind; if (kind !== "get" && kind !== "set" && this.match(47)) { node.typeParameters = this.flowParseTypeParameterDeclaration(); } super.parseFunctionParams(node, allowModifiers); } parseVarId(decl, kind) { super.parseVarId(decl, kind); if (this.match(14)) { decl.id.typeAnnotation = this.flowParseTypeAnnotation(); this.resetEndLocation(decl.id); } } parseAsyncArrowFromCallExpression(node, call) { if (this.match(14)) { const oldNoAnonFunctionType = this.state.noAnonFunctionType; this.state.noAnonFunctionType = true; node.returnType = this.flowParseTypeAnnotation(); this.state.noAnonFunctionType = oldNoAnonFunctionType; } return super.parseAsyncArrowFromCallExpression(node, call); } shouldParseAsyncArrow() { return this.match(14) || super.shouldParseAsyncArrow(); } parseMaybeAssign(refExpressionErrors, afterLeftParse) { var _jsx; let state = null; let jsx2; if (this.hasPlugin("jsx") && (this.match(138) || this.match(47))) { state = this.state.clone(); jsx2 = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state); if (!jsx2.error) return jsx2.node; const { context } = this.state; const currentContext = context[context.length - 1]; if (currentContext === types.j_oTag || currentContext === types.j_expr) { context.pop(); } } if ((_jsx = jsx2) != null && _jsx.error || this.match(47)) { var _jsx2, _jsx3; state = state || this.state.clone(); let typeParameters; const arrow = this.tryParse((abort) => { var _arrowExpression$extr; typeParameters = this.flowParseTypeParameterDeclaration(); const arrowExpression2 = this.forwardNoArrowParamsConversionAt(typeParameters, () => { const result = super.parseMaybeAssign(refExpressionErrors, afterLeftParse); this.resetStartLocationFromNode(result, typeParameters); return result; }); if ((_arrowExpression$extr = arrowExpression2.extra) != null && _arrowExpression$extr.parenthesized) abort(); const expr = this.maybeUnwrapTypeCastExpression(arrowExpression2); if (expr.type !== "ArrowFunctionExpression") abort(); expr.typeParameters = typeParameters; this.resetStartLocationFromNode(expr, typeParameters); return arrowExpression2; }, state); let arrowExpression = null; if (arrow.node && this.maybeUnwrapTypeCastExpression(arrow.node).type === "ArrowFunctionExpression") { if (!arrow.error && !arrow.aborted) { if (arrow.node.async) { this.raise(FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction, { node: typeParameters }); } return arrow.node; } arrowExpression = arrow.node; } if ((_jsx2 = jsx2) != null && _jsx2.node) { this.state = jsx2.failState; return jsx2.node; } if (arrowExpression) { this.state = arrow.failState; return arrowExpression; } if ((_jsx3 = jsx2) != null && _jsx3.thrown) throw jsx2.error; if (arrow.thrown) throw arrow.error; throw this.raise(FlowErrors.UnexpectedTokenAfterTypeParameter, { node: typeParameters }); } return super.parseMaybeAssign(refExpressionErrors, afterLeftParse); } parseArrow(node) { if (this.match(14)) { const result = this.tryParse(() => { const oldNoAnonFunctionType = this.state.noAnonFunctionType; this.state.noAnonFunctionType = true; const typeNode = this.startNode(); [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); this.state.noAnonFunctionType = oldNoAnonFunctionType; if (this.canInsertSemicolon()) this.unexpected(); if (!this.match(19)) this.unexpected(); return typeNode; }); if (result.thrown) return null; if (result.error) this.state = result.failState; node.returnType = result.node.typeAnnotation ? this.finishNode(result.node, "TypeAnnotation") : null; } return super.parseArrow(node); } shouldParseArrow(params) { return this.match(14) || super.shouldParseArrow(params); } setArrowFunctionParameters(node, params) { if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { node.params = params; } else { super.setArrowFunctionParameters(node, params); } } checkParams(node, allowDuplicates, isArrowFunction) { if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { return; } for (let i = 0; i < node.params.length; i++) { if (this.isThisParam(node.params[i]) && i > 0) { this.raise(FlowErrors.ThisParamMustBeFirst, { node: node.params[i] }); } } return super.checkParams(...arguments); } parseParenAndDistinguishExpression(canBeArrow) { return super.parseParenAndDistinguishExpression(canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1); } parseSubscripts(base, startPos, startLoc, noCalls) { if (base.type === "Identifier" && base.name === "async" && this.state.noArrowAt.indexOf(startPos) !== -1) { this.next(); const node = this.startNodeAt(startPos, startLoc); node.callee = base; node.arguments = this.parseCallExpressionArguments(11, false); base = this.finishNode(node, "CallExpression"); } else if (base.type === "Identifier" && base.name === "async" && this.match(47)) { const state = this.state.clone(); const arrow = this.tryParse((abort) => this.parseAsyncArrowWithTypeParameters(startPos, startLoc) || abort(), state); if (!arrow.error && !arrow.aborted) return arrow.node; const result = this.tryParse(() => super.parseSubscripts(base, startPos, startLoc, noCalls), state); if (result.node && !result.error) return result.node; if (arrow.node) { this.state = arrow.failState; return arrow.node; } if (result.node) { this.state = result.failState; return result.node; } throw arrow.error || result.error; } return super.parseSubscripts(base, startPos, startLoc, noCalls); } parseSubscript(base, startPos, startLoc, noCalls, subscriptState) { if (this.match(18) && this.isLookaheadToken_lt()) { subscriptState.optionalChainMember = true; if (noCalls) { subscriptState.stop = true; return base; } this.next(); const node = this.startNodeAt(startPos, startLoc); node.callee = base; node.typeArguments = this.flowParseTypeParameterInstantiation(); this.expect(10); node.arguments = this.parseCallExpressionArguments(11, false); node.optional = true; return this.finishCallExpression(node, true); } else if (!noCalls && this.shouldParseTypes() && this.match(47)) { const node = this.startNodeAt(startPos, startLoc); node.callee = base; const result = this.tryParse(() => { node.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew(); this.expect(10); node.arguments = this.parseCallExpressionArguments(11, false); if (subscriptState.optionalChainMember) node.optional = false; return this.finishCallExpression(node, subscriptState.optionalChainMember); }); if (result.node) { if (result.error) this.state = result.failState; return result.node; } } return super.parseSubscript(base, startPos, startLoc, noCalls, subscriptState); } parseNewArguments(node) { let targs = null; if (this.shouldParseTypes() && this.match(47)) { targs = this.tryParse(() => this.flowParseTypeParameterInstantiationCallOrNew()).node; } node.typeArguments = targs; super.parseNewArguments(node); } parseAsyncArrowWithTypeParameters(startPos, startLoc) { const node = this.startNodeAt(startPos, startLoc); this.parseFunctionParams(node); if (!this.parseArrow(node)) return; return this.parseArrowExpression(node, void 0, true); } readToken_mult_modulo(code) { const next = this.input.charCodeAt(this.state.pos + 1); if (code === 42 && next === 47 && this.state.hasFlowComment) { this.state.hasFlowComment = false; this.state.pos += 2; this.nextToken(); return; } super.readToken_mult_modulo(code); } readToken_pipe_amp(code) { const next = this.input.charCodeAt(this.state.pos + 1); if (code === 124 && next === 125) { this.finishOp(9, 2); return; } super.readToken_pipe_amp(code); } parseTopLevel(file, program) { const fileNode = super.parseTopLevel(file, program); if (this.state.hasFlowComment) { this.raise(FlowErrors.UnterminatedFlowComment, { at: this.state.curPosition() }); } return fileNode; } skipBlockComment() { if (this.hasPlugin("flowComments") && this.skipFlowComment()) { if (this.state.hasFlowComment) { throw this.raise(FlowErrors.NestedFlowComment, { at: this.state.startLoc }); } this.hasFlowCommentCompletion(); this.state.pos += this.skipFlowComment(); this.state.hasFlowComment = true; return; } if (this.state.hasFlowComment) { const end = this.input.indexOf("*-/", this.state.pos + 2); if (end === -1) { throw this.raise(ErrorMessages.UnterminatedComment, { at: this.state.curPosition() }); } this.state.pos = end + 2 + 3; return; } return super.skipBlockComment(); } skipFlowComment() { const { pos } = this.state; let shiftToFirstNonWhiteSpace = 2; while ([32, 9].includes(this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace))) { shiftToFirstNonWhiteSpace++; } const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos); const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1); if (ch2 === 58 && ch3 === 58) { return shiftToFirstNonWhiteSpace + 2; } if (this.input.slice(shiftToFirstNonWhiteSpace + pos, shiftToFirstNonWhiteSpace + pos + 12) === "flow-include") { return shiftToFirstNonWhiteSpace + 12; } if (ch2 === 58 && ch3 !== 58) { return shiftToFirstNonWhiteSpace; } return false; } hasFlowCommentCompletion() { const end = this.input.indexOf("*/", this.state.pos); if (end === -1) { throw this.raise(ErrorMessages.UnterminatedComment, { at: this.state.curPosition() }); } } flowEnumErrorBooleanMemberNotInitialized(loc, { enumName, memberName }) { this.raise(FlowErrors.EnumBooleanMemberNotInitialized, { at: loc }, memberName, enumName); } flowEnumErrorInvalidExplicitType(loc, { enumName, suppliedType }) { return this.raise(suppliedType === null ? FlowErrors.EnumInvalidExplicitTypeUnknownSupplied : FlowErrors.EnumInvalidExplicitType, { at: loc }, enumName, suppliedType); } flowEnumErrorInvalidMemberInitializer(loc, { enumName, explicitType, memberName }) { return this.raise(explicitType === "boolean" || explicitType === "number" || explicitType === "string" ? FlowErrors.EnumInvalidMemberInitializerPrimaryType : explicitType === "symbol" ? FlowErrors.EnumInvalidMemberInitializerSymbolType : FlowErrors.EnumInvalidMemberInitializerUnknownType, { at: loc }, enumName, memberName, explicitType); } flowEnumErrorNumberMemberNotInitialized(loc, { enumName, memberName }) { this.raise(FlowErrors.EnumNumberMemberNotInitialized, { at: loc }, enumName, memberName); } flowEnumErrorStringMemberInconsistentlyInitailized(node, { enumName }) { this.raise(FlowErrors.EnumStringMemberInconsistentlyInitailized, { node }, enumName); } flowEnumMemberInit() { const startLoc = this.state.startLoc; const endOfInit = () => this.match(12) || this.match(8); switch (this.state.type) { case 130: { const literal = this.parseNumericLiteral(this.state.value); if (endOfInit()) { return { type: "number", loc: literal.loc.start, value: literal }; } return { type: "invalid", loc: startLoc }; } case 129: { const literal = this.parseStringLiteral(this.state.value); if (endOfInit()) { return { type: "string", loc: literal.loc.start, value: literal }; } return { type: "invalid", loc: startLoc }; } case 85: case 86: { const literal = this.parseBooleanLiteral(this.match(85)); if (endOfInit()) { return { type: "boolean", loc: literal.loc.start, value: literal }; } return { type: "invalid", loc: startLoc }; } default: return { type: "invalid", loc: startLoc }; } } flowEnumMemberRaw() { const loc = this.state.startLoc; const id = this.parseIdentifier(true); const init = this.eat(29) ? this.flowEnumMemberInit() : { type: "none", loc }; return { id, init }; } flowEnumCheckExplicitTypeMismatch(loc, context, expectedType) { const { explicitType } = context; if (explicitType === null) { return; } if (explicitType !== expectedType) { this.flowEnumErrorInvalidMemberInitializer(loc, context); } } flowEnumMembers({ enumName, explicitType }) { const seenNames = /* @__PURE__ */ new Set(); const members = { booleanMembers: [], numberMembers: [], stringMembers: [], defaultedMembers: [] }; let hasUnknownMembers = false; while (!this.match(8)) { if (this.eat(21)) { hasUnknownMembers = true; break; } const memberNode = this.startNode(); const { id, init } = this.flowEnumMemberRaw(); const memberName = id.name; if (memberName === "") { continue; } if (/^[a-z]/.test(memberName)) { this.raise(FlowErrors.EnumInvalidMemberName, { node: id }, memberName, memberName[0].toUpperCase() + memberName.slice(1), enumName); } if (seenNames.has(memberName)) { this.raise(FlowErrors.EnumDuplicateMemberName, { node: id }, memberName, enumName); } seenNames.add(memberName); const context = { enumName, explicitType, memberName }; memberNode.id = id; switch (init.type) { case "boolean": { this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "boolean"); memberNode.init = init.value; members.booleanMembers.push(this.finishNode(memberNode, "EnumBooleanMember")); break; } case "number": { this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "number"); memberNode.init = init.value; members.numberMembers.push(this.finishNode(memberNode, "EnumNumberMember")); break; } case "string": { this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "string"); memberNode.init = init.value; members.stringMembers.push(this.finishNode(memberNode, "EnumStringMember")); break; } case "invalid": { throw this.flowEnumErrorInvalidMemberInitializer(init.loc, context); } case "none": { switch (explicitType) { case "boolean": this.flowEnumErrorBooleanMemberNotInitialized(init.loc, context); break; case "number": this.flowEnumErrorNumberMemberNotInitialized(init.loc, context); break; default: members.defaultedMembers.push(this.finishNode(memberNode, "EnumDefaultedMember")); } } } if (!this.match(8)) { this.expect(12); } } return { members, hasUnknownMembers }; } flowEnumStringMembers(initializedMembers, defaultedMembers, { enumName }) { if (initializedMembers.length === 0) { return defaultedMembers; } else if (defaultedMembers.length === 0) { return initializedMembers; } else if (defaultedMembers.length > initializedMembers.length) { for (const member of initializedMembers) { this.flowEnumErrorStringMemberInconsistentlyInitailized(member, { enumName }); } return defaultedMembers; } else { for (const member of defaultedMembers) { this.flowEnumErrorStringMemberInconsistentlyInitailized(member, { enumName }); } return initializedMembers; } } flowEnumParseExplicitType({ enumName }) { if (this.eatContextual(101)) { if (!tokenIsIdentifier(this.state.type)) { throw this.flowEnumErrorInvalidExplicitType(this.state.startLoc, { enumName, suppliedType: null }); } const { value } = this.state; this.next(); if (value !== "boolean" && value !== "number" && value !== "string" && value !== "symbol") { this.flowEnumErrorInvalidExplicitType(this.state.startLoc, { enumName, suppliedType: value }); } return value; } return null; } flowEnumBody(node, id) { const enumName = id.name; const nameLoc = id.loc.start; const explicitType = this.flowEnumParseExplicitType({ enumName }); this.expect(5); const { members, hasUnknownMembers } = this.flowEnumMembers({ enumName, explicitType }); node.hasUnknownMembers = hasUnknownMembers; switch (explicitType) { case "boolean": node.explicitType = true; node.members = members.booleanMembers; this.expect(8); return this.finishNode(node, "EnumBooleanBody"); case "number": node.explicitType = true; node.members = members.numberMembers; this.expect(8); return this.finishNode(node, "EnumNumberBody"); case "string": node.explicitType = true; node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, { enumName }); this.expect(8); return this.finishNode(node, "EnumStringBody"); case "symbol": node.members = members.defaultedMembers; this.expect(8); return this.finishNode(node, "EnumSymbolBody"); default: { const empty = () => { node.members = []; this.expect(8); return this.finishNode(node, "EnumStringBody"); }; node.explicitType = false; const boolsLen = members.booleanMembers.length; const numsLen = members.numberMembers.length; const strsLen = members.stringMembers.length; const defaultedLen = members.defaultedMembers.length; if (!boolsLen && !numsLen && !strsLen && !defaultedLen) { return empty(); } else if (!boolsLen && !numsLen) { node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, { enumName }); this.expect(8); return this.finishNode(node, "EnumStringBody"); } else if (!numsLen && !strsLen && boolsLen >= defaultedLen) { for (const member of members.defaultedMembers) { this.flowEnumErrorBooleanMemberNotInitialized(member.loc.start, { enumName, memberName: member.id.name }); } node.members = members.booleanMembers; this.expect(8); return this.finishNode(node, "EnumBooleanBody"); } else if (!boolsLen && !strsLen && numsLen >= defaultedLen) { for (const member of members.defaultedMembers) { this.flowEnumErrorNumberMemberNotInitialized(member.loc.start, { enumName, memberName: member.id.name }); } node.members = members.numberMembers; this.expect(8); return this.finishNode(node, "EnumNumberBody"); } else { this.raise(FlowErrors.EnumInconsistentMemberValues, { at: nameLoc }, enumName); return empty(); } } } } flowParseEnumDeclaration(node) { const id = this.parseIdentifier(); node.id = id; node.body = this.flowEnumBody(this.startNode(), id); return this.finishNode(node, "EnumDeclaration"); } isLookaheadToken_lt() { const next = this.nextTokenStart(); if (this.input.charCodeAt(next) === 60) { const afterNext = this.input.charCodeAt(next + 1); return afterNext !== 60 && afterNext !== 61; } return false; } maybeUnwrapTypeCastExpression(node) { return node.type === "TypeCastExpression" ? node.expression : node; } }; var entities = { 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" }; var HEX_NUMBER = /^[\da-fA-F]+$/; var DECIMAL_NUMBER = /^\d+$/; var JsxErrors = makeErrorTemplates({ AttributeIsEmpty: "JSX attributes must only be assigned a non-empty expression.", MissingClosingTagElement: "Expected corresponding JSX closing tag for <%0>.", MissingClosingTagFragment: "Expected corresponding JSX closing tag for <>.", UnexpectedSequenceExpression: "Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?", 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 <>...?" }, ErrorCodes.SyntaxError, "jsx"); function isFragment(object) { return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false; } function getQualifiedJSXName(object) { if (object.type === "JSXIdentifier") { return object.name; } if (object.type === "JSXNamespacedName") { return object.namespace.name + ":" + object.name.name; } if (object.type === "JSXMemberExpression") { return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property); } throw new Error("Node had unexpected type: " + object.type); } var jsx = (superClass) => class extends superClass { jsxReadToken() { let out = ""; let chunkStart = this.state.pos; for (; ; ) { if (this.state.pos >= this.length) { throw this.raise(JsxErrors.UnterminatedJsxContent, { at: this.state.startLoc }); } const ch = this.input.charCodeAt(this.state.pos); switch (ch) { case 60: case 123: if (this.state.pos === this.state.start) { if (ch === 60 && this.state.canStartJSXElement) { ++this.state.pos; return this.finishToken(138); } return super.getTokenFromCode(ch); } out += this.input.slice(chunkStart, this.state.pos); return this.finishToken(137, out); case 38: out += this.input.slice(chunkStart, this.state.pos); out += this.jsxReadEntity(); chunkStart = this.state.pos; break; case 62: case 125: default: if (isNewLine(ch)) { out += this.input.slice(chunkStart, this.state.pos); out += this.jsxReadNewLine(true); chunkStart = this.state.pos; } else { ++this.state.pos; } } } } jsxReadNewLine(normalizeCRLF) { const ch = this.input.charCodeAt(this.state.pos); let out; ++this.state.pos; if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) { ++this.state.pos; out = normalizeCRLF ? "\n" : "\r\n"; } else { out = String.fromCharCode(ch); } ++this.state.curLine; this.state.lineStart = this.state.pos; return out; } jsxReadString(quote) { let out = ""; let chunkStart = ++this.state.pos; for (; ; ) { if (this.state.pos >= this.length) { throw this.raise(ErrorMessages.UnterminatedString, { at: this.state.startLoc }); } const ch = this.input.charCodeAt(this.state.pos); if (ch === quote) break; if (ch === 38) { out += this.input.slice(chunkStart, this.state.pos); out += this.jsxReadEntity(); chunkStart = this.state.pos; } else if (isNewLine(ch)) { out += this.input.slice(chunkStart, this.state.pos); out += this.jsxReadNewLine(false); chunkStart = this.state.pos; } else { ++this.state.pos; } } out += this.input.slice(chunkStart, this.state.pos++); return this.finishToken(129, out); } jsxReadEntity() { let str = ""; let count = 0; let entity; let ch = this.input[this.state.pos]; const startPos = ++this.state.pos; while (this.state.pos < this.length && count++ < 10) { ch = this.input[this.state.pos++]; if (ch === ";") { if (str[0] === "#") { if (str[1] === "x") { str = str.substr(2); if (HEX_NUMBER.test(str)) { entity = String.fromCodePoint(parseInt(str, 16)); } } else { str = str.substr(1); if (DECIMAL_NUMBER.test(str)) { entity = String.fromCodePoint(parseInt(str, 10)); } } } else { entity = entities[str]; } break; } str += ch; } if (!entity) { this.state.pos = startPos; return "&"; } return entity; } jsxReadWord() { let ch; const start = this.state.pos; do { ch = this.input.charCodeAt(++this.state.pos); } while (isIdentifierChar(ch) || ch === 45); return this.finishToken(136, this.input.slice(start, this.state.pos)); } jsxParseIdentifier() { const node = this.startNode(); if (this.match(136)) { node.name = this.state.value; } else if (tokenIsKeyword(this.state.type)) { node.name = tokenLabelName(this.state.type); } else { this.unexpected(); } this.next(); return this.finishNode(node, "JSXIdentifier"); } jsxParseNamespacedName() { const startPos = this.state.start; const startLoc = this.state.startLoc; const name = this.jsxParseIdentifier(); if (!this.eat(14)) return name; const node = this.startNodeAt(startPos, startLoc); node.namespace = name; node.name = this.jsxParseIdentifier(); return this.finishNode(node, "JSXNamespacedName"); } jsxParseElementName() { const startPos = this.state.start; const startLoc = this.state.startLoc; let node = this.jsxParseNamespacedName(); if (node.type === "JSXNamespacedName") { return node; } while (this.eat(16)) { const newNode = this.startNodeAt(startPos, startLoc); newNode.object = node; newNode.property = this.jsxParseIdentifier(); node = this.finishNode(newNode, "JSXMemberExpression"); } return node; } jsxParseAttributeValue() { let node; switch (this.state.type) { case 5: node = this.startNode(); this.setContext(types.brace); this.next(); node = this.jsxParseExpressionContainer(node, types.j_oTag); if (node.expression.type === "JSXEmptyExpression") { this.raise(JsxErrors.AttributeIsEmpty, { node }); } return node; case 138: case 129: return this.parseExprAtom(); default: throw this.raise(JsxErrors.UnsupportedJsxValue, { at: this.state.startLoc }); } } jsxParseEmptyExpression() { const node = this.startNodeAt(this.state.lastTokEndLoc.index, this.state.lastTokEndLoc); return this.finishNodeAt(node, "JSXEmptyExpression", this.state.startLoc); } jsxParseSpreadChild(node) { this.next(); node.expression = this.parseExpression(); this.setContext(types.j_oTag); this.expect(8); return this.finishNode(node, "JSXSpreadChild"); } jsxParseExpressionContainer(node, previousContext) { if (this.match(8)) { node.expression = this.jsxParseEmptyExpression(); } else { const expression = this.parseExpression(); node.expression = expression; } this.setContext(previousContext); this.expect(8); return this.finishNode(node, "JSXExpressionContainer"); } jsxParseAttribute() { const node = this.startNode(); if (this.match(5)) { this.setContext(types.brace); this.next(); this.expect(21); node.argument = this.parseMaybeAssignAllowIn(); this.setContext(types.j_oTag); this.expect(8); return this.finishNode(node, "JSXSpreadAttribute"); } node.name = this.jsxParseNamespacedName(); node.value = this.eat(29) ? this.jsxParseAttributeValue() : null; return this.finishNode(node, "JSXAttribute"); } jsxParseOpeningElementAt(startPos, startLoc) { const node = this.startNodeAt(startPos, startLoc); if (this.match(139)) { this.expect(139); return this.finishNode(node, "JSXOpeningFragment"); } node.name = this.jsxParseElementName(); return this.jsxParseOpeningElementAfterName(node); } jsxParseOpeningElementAfterName(node) { const attributes = []; while (!this.match(56) && !this.match(139)) { attributes.push(this.jsxParseAttribute()); } node.attributes = attributes; node.selfClosing = this.eat(56); this.expect(139); return this.finishNode(node, "JSXOpeningElement"); } jsxParseClosingElementAt(startPos, startLoc) { const node = this.startNodeAt(startPos, startLoc); if (this.match(139)) { this.expect(139); return this.finishNode(node, "JSXClosingFragment"); } node.name = this.jsxParseElementName(); this.expect(139); return this.finishNode(node, "JSXClosingElement"); } jsxParseElementAt(startPos, startLoc) { const node = this.startNodeAt(startPos, startLoc); const children = []; const openingElement = this.jsxParseOpeningElementAt(startPos, startLoc); let closingElement = null; if (!openingElement.selfClosing) { contents: for (; ; ) { switch (this.state.type) { case 138: startPos = this.state.start; startLoc = this.state.startLoc; this.next(); if (this.eat(56)) { closingElement = this.jsxParseClosingElementAt(startPos, startLoc); break contents; } children.push(this.jsxParseElementAt(startPos, startLoc)); break; case 137: children.push(this.parseExprAtom()); break; case 5: { const node2 = this.startNode(); this.setContext(types.brace); this.next(); if (this.match(21)) { children.push(this.jsxParseSpreadChild(node2)); } else { children.push(this.jsxParseExpressionContainer(node2, types.j_expr)); } break; } default: throw this.unexpected(); } } if (isFragment(openingElement) && !isFragment(closingElement) && closingElement !== null) { this.raise(JsxErrors.MissingClosingTagFragment, { node: closingElement }); } else if (!isFragment(openingElement) && isFragment(closingElement)) { this.raise(JsxErrors.MissingClosingTagElement, { node: closingElement }, getQualifiedJSXName(openingElement.name)); } else if (!isFragment(openingElement) && !isFragment(closingElement)) { if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) { this.raise(JsxErrors.MissingClosingTagElement, { node: closingElement }, getQualifiedJSXName(openingElement.name)); } } } if (isFragment(openingElement)) { node.openingFragment = openingElement; node.closingFragment = closingElement; } else { node.openingElement = openingElement; node.closingElement = closingElement; } node.children = children; if (this.match(47)) { throw this.raise(JsxErrors.UnwrappedAdjacentJSXElements, { at: this.state.startLoc }); } return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement"); } jsxParseElement() { const startPos = this.state.start; const startLoc = this.state.startLoc; this.next(); return this.jsxParseElementAt(startPos, startLoc); } setContext(newContext) { const { context } = this.state; context[context.length - 1] = newContext; } parseExprAtom(refExpressionErrors) { if (this.match(137)) { return this.parseLiteral(this.state.value, "JSXText"); } else if (this.match(138)) { return this.jsxParseElement(); } else if (this.match(47) && this.input.charCodeAt(this.state.pos) !== 33) { this.replaceToken(138); return this.jsxParseElement(); } else { return super.parseExprAtom(refExpressionErrors); } } skipSpace() { const curContext = this.curContext(); if (!curContext.preserveSpace) super.skipSpace(); } getTokenFromCode(code) { const context = this.curContext(); if (context === types.j_expr) { return this.jsxReadToken(); } if (context === types.j_oTag || context === types.j_cTag) { if (isIdentifierStart(code)) { return this.jsxReadWord(); } if (code === 62) { ++this.state.pos; return this.finishToken(139); } if ((code === 34 || code === 39) && context === types.j_oTag) { return this.jsxReadString(code); } } if (code === 60 && this.state.canStartJSXElement && this.input.charCodeAt(this.state.pos + 1) !== 33) { ++this.state.pos; return this.finishToken(138); } return super.getTokenFromCode(code); } updateContext(prevType) { const { context, type } = this.state; if (type === 56 && prevType === 138) { context.splice(-2, 2, types.j_cTag); this.state.canStartJSXElement = false; } else if (type === 138) { context.push(types.j_oTag); } else if (type === 139) { const out = context[context.length - 1]; if (out === types.j_oTag && prevType === 56 || out === types.j_cTag) { context.pop(); this.state.canStartJSXElement = context[context.length - 1] === types.j_expr; } else { this.setContext(types.j_expr); this.state.canStartJSXElement = true; } } else { this.state.canStartJSXElement = tokenComesBeforeExpression(type); } } }; var TypeScriptScope = class extends Scope { constructor(...args) { super(...args); this.types = /* @__PURE__ */ new Set(); this.enums = /* @__PURE__ */ new Set(); this.constEnums = /* @__PURE__ */ new Set(); this.classes = /* @__PURE__ */ new Set(); this.exportOnlyBindings = /* @__PURE__ */ new Set(); } }; var TypeScriptScopeHandler = class extends ScopeHandler { createScope(flags) { return new TypeScriptScope(flags); } declareName(name, bindingType, loc) { const scope = this.currentScope(); if (bindingType & BIND_FLAGS_TS_EXPORT_ONLY) { this.maybeExportDefined(scope, name); scope.exportOnlyBindings.add(name); return; } super.declareName(...arguments); if (bindingType & BIND_KIND_TYPE) { if (!(bindingType & BIND_KIND_VALUE)) { this.checkRedeclarationInScope(scope, name, bindingType, loc); this.maybeExportDefined(scope, name); } scope.types.add(name); } if (bindingType & BIND_FLAGS_TS_ENUM) scope.enums.add(name); if (bindingType & BIND_FLAGS_TS_CONST_ENUM) scope.constEnums.add(name); if (bindingType & BIND_FLAGS_CLASS) scope.classes.add(name); } isRedeclaredInScope(scope, name, bindingType) { if (scope.enums.has(name)) { if (bindingType & BIND_FLAGS_TS_ENUM) { const isConst = !!(bindingType & BIND_FLAGS_TS_CONST_ENUM); const wasConst = scope.constEnums.has(name); return isConst !== wasConst; } return true; } if (bindingType & BIND_FLAGS_CLASS && scope.classes.has(name)) { if (scope.lexical.has(name)) { return !!(bindingType & BIND_KIND_VALUE); } else { return false; } } if (bindingType & BIND_KIND_TYPE && scope.types.has(name)) { return true; } return super.isRedeclaredInScope(...arguments); } checkLocalExport(id) { const topLevelScope = this.scopeStack[0]; const { name } = id; if (!topLevelScope.types.has(name) && !topLevelScope.exportOnlyBindings.has(name)) { super.checkLocalExport(id); } } }; function nonNull(x) { if (x == null) { throw new Error(`Unexpected ${x} value.`); } return x; } function assert(x) { if (!x) { throw new Error("Assert fail"); } } var TSErrors = makeErrorTemplates({ AbstractMethodHasImplementation: "Method '%0' cannot have an implementation because it is marked abstract.", AbstractPropertyHasInitializer: "Property '%0' 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.", ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.", ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.", ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.", DeclareAccessor: "'declare' is not allowed in %0ters.", DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.", DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.", DuplicateAccessibilityModifier: "Accessibility modifier already seen.", DuplicateModifier: "Duplicate modifier: '%0'.", EmptyHeritageClauseType: "'%0' 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'.", IncompatibleModifiers: "'%0' modifier cannot be used with '%1' modifier.", IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier.", IndexSignatureHasAccessibility: "Index signatures cannot have an accessibility modifier ('%0').", 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.", InvalidModifierOnTypeMember: "'%0' modifier cannot appear on a type member.", InvalidModifiersOrder: "'%0' modifier must precede '%1' modifier.", InvalidTupleMemberLabel: "Tuple members must be labeled with a simple identifier.", MissingInterfaceName: "'interface' declarations must be followed by an identifier.", MixedLabeledAndUnlabeledElements: "Tuple members must all have names or all not have names.", 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: "Private elements cannot have an accessibility modifier ('%0').", 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 `() => ...`.", 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.", StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.", 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: "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got %0." }, ErrorCodes.SyntaxError, "typescript"); function keywordTypeFromName(value) { switch (value) { 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 void 0; } } function tsIsAccessModifier(modifier) { return modifier === "private" || modifier === "public" || modifier === "protected"; } var typescript = (superClass) => class extends superClass { getScopeHandler() { return TypeScriptScopeHandler; } tsIsIdentifier() { return tokenIsIdentifier(this.state.type); } tsTokenCanFollowModifier() { return (this.match(0) || this.match(5) || this.match(55) || this.match(21) || this.match(134) || this.isLiteralPropertyName()) && !this.hasPrecedingLineBreak(); } tsNextTokenCanFollowModifier() { this.next(); return this.tsTokenCanFollowModifier(); } tsParseModifier(allowedModifiers, stopOnStartOfClassStaticBlock) { if (!tokenIsIdentifier(this.state.type)) { return void 0; } const modifier = this.state.value; if (allowedModifiers.indexOf(modifier) !== -1) { if (stopOnStartOfClassStaticBlock && this.tsIsStartOfStaticBlocks()) { return void 0; } if (this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) { return modifier; } } return void 0; } tsParseModifiers(modified, allowedModifiers, disallowedModifiers, errorTemplate, stopOnStartOfClassStaticBlock) { const enforceOrder = (loc, modifier, before, after) => { if (modifier === before && modified[after]) { this.raise(TSErrors.InvalidModifiersOrder, { at: loc }, before, after); } }; const incompatible = (loc, modifier, mod1, mod2) => { if (modified[mod1] && modifier === mod2 || modified[mod2] && modifier === mod1) { this.raise(TSErrors.IncompatibleModifiers, { at: loc }, mod1, mod2); } }; for (; ; ) { const { startLoc } = this.state; const modifier = this.tsParseModifier(allowedModifiers.concat(disallowedModifiers != null ? disallowedModifiers : []), stopOnStartOfClassStaticBlock); if (!modifier) break; if (tsIsAccessModifier(modifier)) { if (modified.accessibility) { this.raise(TSErrors.DuplicateAccessibilityModifier, { at: startLoc }); } else { enforceOrder(startLoc, modifier, modifier, "override"); enforceOrder(startLoc, modifier, modifier, "static"); enforceOrder(startLoc, modifier, modifier, "readonly"); modified.accessibility = modifier; } } else { if (Object.hasOwnProperty.call(modified, modifier)) { this.raise(TSErrors.DuplicateModifier, { at: startLoc }, modifier); } else { enforceOrder(startLoc, modifier, "static", "readonly"); enforceOrder(startLoc, modifier, "static", "override"); enforceOrder(startLoc, modifier, "override", "readonly"); enforceOrder(startLoc, modifier, "abstract", "override"); incompatible(startLoc, modifier, "declare", "override"); incompatible(startLoc, modifier, "static", "abstract"); } modified[modifier] = true; } if (disallowedModifiers != null && disallowedModifiers.includes(modifier)) { this.raise(errorTemplate, { at: startLoc }, modifier); } } } tsIsListTerminator(kind) { switch (kind) { 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); } throw new Error("Unreachable"); } tsParseList(kind, parseElement) { const result = []; while (!this.tsIsListTerminator(kind)) { result.push(parseElement()); } return result; } tsParseDelimitedList(kind, parseElement, refTrailingCommaPos) { return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true, refTrailingCommaPos)); } tsParseDelimitedListWorker(kind, parseElement, expectSuccess, refTrailingCommaPos) { const result = []; let trailingCommaPos = -1; for (; ; ) { if (this.tsIsListTerminator(kind)) { break; } trailingCommaPos = -1; const element = parseElement(); if (element == null) { return void 0; } result.push(element); if (this.eat(12)) { trailingCommaPos = this.state.lastTokStart; continue; } if (this.tsIsListTerminator(kind)) { break; } if (expectSuccess) { this.expect(12); } return void 0; } if (refTrailingCommaPos) { refTrailingCommaPos.value = trailingCommaPos; } return result; } tsParseBracketedList(kind, parseElement, bracket, skipFirstToken, refTrailingCommaPos) { if (!skipFirstToken) { if (bracket) { this.expect(0); } else { this.expect(47); } } const result = this.tsParseDelimitedList(kind, parseElement, refTrailingCommaPos); if (bracket) { this.expect(3); } else { this.expect(48); } return result; } tsParseImportType() { const node = this.startNode(); this.expect(83); this.expect(10); if (!this.match(129)) { this.raise(TSErrors.UnsupportedImportTypeArgument, { at: this.state.startLoc }); } node.argument = this.parseExprAtom(); this.expect(11); if (this.eat(16)) { node.qualifier = this.tsParseEntityName(true); } if (this.match(47)) { node.typeParameters = this.tsParseTypeArguments(); } return this.finishNode(node, "TSImportType"); } tsParseEntityName(allowReservedWords) { let entity = this.parseIdentifier(); while (this.eat(16)) { const node = this.startNodeAtNode(entity); node.left = entity; node.right = this.parseIdentifier(allowReservedWords); entity = this.finishNode(node, "TSQualifiedName"); } return entity; } tsParseTypeReference() { const node = this.startNode(); node.typeName = this.tsParseEntityName(false); if (!this.hasPrecedingLineBreak() && this.match(47)) { node.typeParameters = this.tsParseTypeArguments(); } return this.finishNode(node, "TSTypeReference"); } tsParseThisTypePredicate(lhs) { this.next(); const node = this.startNodeAtNode(lhs); node.parameterName = lhs; node.typeAnnotation = this.tsParseTypeAnnotation(false); node.asserts = false; return this.finishNode(node, "TSTypePredicate"); } tsParseThisTypeNode() { const node = this.startNode(); this.next(); return this.finishNode(node, "TSThisType"); } tsParseTypeQuery() { const node = this.startNode(); this.expect(87); if (this.match(83)) { node.exprName = this.tsParseImportType(); } else { node.exprName = this.tsParseEntityName(true); } return this.finishNode(node, "TSTypeQuery"); } tsParseTypeParameter() { const node = this.startNode(); node.name = this.tsParseTypeParameterName(); node.constraint = this.tsEatThenParseType(81); node.default = this.tsEatThenParseType(29); return this.finishNode(node, "TSTypeParameter"); } tsTryParseTypeParameters() { if (this.match(47)) { return this.tsParseTypeParameters(); } } tsParseTypeParameters() { const node = this.startNode(); if (this.match(47) || this.match(138)) { this.next(); } else { this.unexpected(); } const refTrailingCommaPos = { value: -1 }; node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this), false, true, refTrailingCommaPos); if (node.params.length === 0) { this.raise(TSErrors.EmptyTypeParameters, { node }); } if (refTrailingCommaPos.value !== -1) { this.addExtra(node, "trailingComma", refTrailingCommaPos.value); } return this.finishNode(node, "TSTypeParameterDeclaration"); } tsTryNextParseConstantContext() { if (this.lookahead().type === 75) { this.next(); return this.tsParseTypeReference(); } return null; } tsFillSignature(returnToken, signature) { const returnTokenRequired = returnToken === 19; const paramsKey = "parameters"; const returnTypeKey = "typeAnnotation"; signature.typeParameters = this.tsTryParseTypeParameters(); this.expect(10); signature[paramsKey] = this.tsParseBindingListForSignature(); if (returnTokenRequired) { signature[returnTypeKey] = this.tsParseTypeOrTypePredicateAnnotation(returnToken); } else if (this.match(returnToken)) { signature[returnTypeKey] = this.tsParseTypeOrTypePredicateAnnotation(returnToken); } } tsParseBindingListForSignature() { return this.parseBindingList(11, 41).map((pattern) => { if (pattern.type !== "Identifier" && pattern.type !== "RestElement" && pattern.type !== "ObjectPattern" && pattern.type !== "ArrayPattern") { this.raise(TSErrors.UnsupportedSignatureParameterKind, { node: pattern }, pattern.type); } return pattern; }); } tsParseTypeMemberSemicolon() { if (!this.eat(12) && !this.isLineTerminator()) { this.expect(13); } } tsParseSignatureMember(kind, node) { this.tsFillSignature(14, node); this.tsParseTypeMemberSemicolon(); return this.finishNode(node, kind); } tsIsUnambiguouslyIndexSignature() { this.next(); if (tokenIsIdentifier(this.state.type)) { this.next(); return this.match(14); } return false; } tsTryParseIndexSignature(node) { if (!(this.match(0) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) { return void 0; } this.expect(0); const id = this.parseIdentifier(); id.typeAnnotation = this.tsParseTypeAnnotation(); this.resetEndLocation(id); this.expect(3); node.parameters = [id]; const type = this.tsTryParseTypeAnnotation(); if (type) node.typeAnnotation = type; this.tsParseTypeMemberSemicolon(); return this.finishNode(node, "TSIndexSignature"); } tsParsePropertyOrMethodSignature(node, readonly) { if (this.eat(17)) node.optional = true; const nodeAny = node; if (this.match(10) || this.match(47)) { if (readonly) { this.raise(TSErrors.ReadonlyForMethodSignature, { node }); } const method = nodeAny; if (method.kind && this.match(47)) { this.raise(TSErrors.AccesorCannotHaveTypeParameters, { at: this.state.curPosition() }); } this.tsFillSignature(14, method); this.tsParseTypeMemberSemicolon(); const paramsKey = "parameters"; const returnTypeKey = "typeAnnotation"; if (method.kind === "get") { if (method[paramsKey].length > 0) { this.raise(ErrorMessages.BadGetterArity, { at: this.state.curPosition() }); if (this.isThisParam(method[paramsKey][0])) { this.raise(TSErrors.AccesorCannotDeclareThisParameter, { at: this.state.curPosition() }); } } } else if (method.kind === "set") { if (method[paramsKey].length !== 1) { this.raise(ErrorMessages.BadSetterArity, { at: this.state.curPosition() }); } else { const firstParameter = method[paramsKey][0]; if (this.isThisParam(firstParameter)) { this.raise(TSErrors.AccesorCannotDeclareThisParameter, { at: this.state.curPosition() }); } if (firstParameter.type === "Identifier" && firstParameter.optional) { this.raise(TSErrors.SetAccesorCannotHaveOptionalParameter, { at: this.state.curPosition() }); } if (firstParameter.type === "RestElement") { this.raise(TSErrors.SetAccesorCannotHaveRestParameter, { at: this.state.curPosition() }); } } if (method[returnTypeKey]) { this.raise(TSErrors.SetAccesorCannotHaveReturnType, { node: method[returnTypeKey] }); } } else { method.kind = "method"; } return this.finishNode(method, "TSMethodSignature"); } else { const property = nodeAny; if (readonly) property.readonly = true; const type = this.tsTryParseTypeAnnotation(); if (type) property.typeAnnotation = type; this.tsParseTypeMemberSemicolon(); return this.finishNode(property, "TSPropertySignature"); } } tsParseTypeMember() { const node = this.startNode(); if (this.match(10) || this.match(47)) { return this.tsParseSignatureMember("TSCallSignatureDeclaration", node); } if (this.match(77)) { const id = this.startNode(); this.next(); if (this.match(10) || this.match(47)) { return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node); } else { node.key = this.createIdentifier(id, "new"); return this.tsParsePropertyOrMethodSignature(node, false); } } this.tsParseModifiers(node, ["readonly"], ["declare", "abstract", "private", "protected", "public", "static", "override"], TSErrors.InvalidModifierOnTypeMember); const idx = this.tsTryParseIndexSignature(node); if (idx) { return idx; } this.parsePropertyName(node); if (!node.computed && node.key.type === "Identifier" && (node.key.name === "get" || node.key.name === "set") && this.tsTokenCanFollowModifier()) { node.kind = node.key.name; this.parsePropertyName(node); } return this.tsParsePropertyOrMethodSignature(node, !!node.readonly); } tsParseTypeLiteral() { const node = this.startNode(); node.members = this.tsParseObjectTypeMembers(); return this.finishNode(node, "TSTypeLiteral"); } tsParseObjectTypeMembers() { this.expect(5); const members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this)); this.expect(8); return members; } tsIsStartOfMappedType() { this.next(); if (this.eat(53)) { return this.isContextual(118); } if (this.isContextual(118)) { this.next(); } if (!this.match(0)) { return false; } this.next(); if (!this.tsIsIdentifier()) { return false; } this.next(); return this.match(58); } tsParseMappedTypeParameter() { const node = this.startNode(); node.name = this.tsParseTypeParameterName(); node.constraint = this.tsExpectThenParseType(58); return this.finishNode(node, "TSTypeParameter"); } tsParseMappedType() { const node = this.startNode(); this.expect(5); if (this.match(53)) { node.readonly = this.state.value; this.next(); this.expectContextual(118); } else if (this.eatContextual(118)) { node.readonly = true; } this.expect(0); node.typeParameter = this.tsParseMappedTypeParameter(); node.nameType = this.eatContextual(93) ? this.tsParseType() : null; this.expect(3); if (this.match(53)) { node.optional = this.state.value; this.next(); this.expect(17); } else if (this.eat(17)) { node.optional = true; } node.typeAnnotation = this.tsTryParseType(); this.semicolon(); this.expect(8); return this.finishNode(node, "TSMappedType"); } tsParseTupleType() { const node = this.startNode(); node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false); let seenOptionalElement = false; let labeledElements = null; node.elementTypes.forEach((elementNode) => { var _labeledElements; let { type } = elementNode; if (seenOptionalElement && type !== "TSRestType" && type !== "TSOptionalType" && !(type === "TSNamedTupleMember" && elementNode.optional)) { this.raise(TSErrors.OptionalTypeBeforeRequired, { node: elementNode }); } seenOptionalElement = seenOptionalElement || type === "TSNamedTupleMember" && elementNode.optional || type === "TSOptionalType"; if (type === "TSRestType") { elementNode = elementNode.typeAnnotation; type = elementNode.type; } const isLabeled = type === "TSNamedTupleMember"; labeledElements = (_labeledElements = labeledElements) != null ? _labeledElements : isLabeled; if (labeledElements !== isLabeled) { this.raise(TSErrors.MixedLabeledAndUnlabeledElements, { node: elementNode }); } }); return this.finishNode(node, "TSTupleType"); } tsParseTupleElementType() { const { start: startPos, startLoc } = this.state; const rest = this.eat(21); let type = this.tsParseType(); const optional = this.eat(17); const labeled = this.eat(14); if (labeled) { const labeledNode = this.startNodeAtNode(type); labeledNode.optional = optional; if (type.type === "TSTypeReference" && !type.typeParameters && type.typeName.type === "Identifier") { labeledNode.label = type.typeName; } else { this.raise(TSErrors.InvalidTupleMemberLabel, { node: type }); labeledNode.label = type; } labeledNode.elementType = this.tsParseType(); type = this.finishNode(labeledNode, "TSNamedTupleMember"); } else if (optional) { const optionalTypeNode = this.startNodeAtNode(type); optionalTypeNode.typeAnnotation = type; type = this.finishNode(optionalTypeNode, "TSOptionalType"); } if (rest) { const restNode = this.startNodeAt(startPos, startLoc); restNode.typeAnnotation = type; type = this.finishNode(restNode, "TSRestType"); } return type; } tsParseParenthesizedType() { const node = this.startNode(); this.expect(10); node.typeAnnotation = this.tsParseType(); this.expect(11); return this.finishNode(node, "TSParenthesizedType"); } tsParseFunctionOrConstructorType(type, abstract) { const node = this.startNode(); if (type === "TSConstructorType") { node.abstract = !!abstract; if (abstract) this.next(); this.next(); } this.tsFillSignature(19, node); return this.finishNode(node, type); } tsParseLiteralTypeNode() { const node = this.startNode(); node.literal = (() => { switch (this.state.type) { case 130: case 131: case 129: case 85: case 86: return this.parseExprAtom(); default: throw this.unexpected(); } })(); return this.finishNode(node, "TSLiteralType"); } tsParseTemplateLiteralType() { const node = this.startNode(); node.literal = this.parseTemplate(false); return this.finishNode(node, "TSLiteralType"); } parseTemplateSubstitution() { if (this.state.inType) return this.tsParseType(); return super.parseTemplateSubstitution(); } tsParseThisTypeOrThisTypePredicate() { const thisKeyword = this.tsParseThisTypeNode(); if (this.isContextual(113) && !this.hasPrecedingLineBreak()) { return this.tsParseThisTypePredicate(thisKeyword); } else { return thisKeyword; } } tsParseNonArrayType() { switch (this.state.type) { case 129: case 130: case 131: case 85: case 86: return this.tsParseLiteralTypeNode(); case 53: if (this.state.value === "-") { const node = this.startNode(); const nextToken = this.lookahead(); if (nextToken.type !== 130 && nextToken.type !== 131) { throw this.unexpected(); } node.literal = this.parseMaybeUnary(); return this.finishNode(node, "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: { const { type } = this.state; if (tokenIsIdentifier(type) || type === 88 || type === 84) { const nodeType = type === 88 ? "TSVoidKeyword" : type === 84 ? "TSNullKeyword" : keywordTypeFromName(this.state.value); if (nodeType !== void 0 && this.lookaheadCharCode() !== 46) { const node = this.startNode(); this.next(); return this.finishNode(node, nodeType); } return this.tsParseTypeReference(); } } } throw this.unexpected(); } tsParseArrayTypeOrHigher() { let type = this.tsParseNonArrayType(); while (!this.hasPrecedingLineBreak() && this.eat(0)) { if (this.match(3)) { const node = this.startNodeAtNode(type); node.elementType = type; this.expect(3); type = this.finishNode(node, "TSArrayType"); } else { const node = this.startNodeAtNode(type); node.objectType = type; node.indexType = this.tsParseType(); this.expect(3); type = this.finishNode(node, "TSIndexedAccessType"); } } return type; } tsParseTypeOperator() { const node = this.startNode(); const operator = this.state.value; this.next(); node.operator = operator; node.typeAnnotation = this.tsParseTypeOperatorOrHigher(); if (operator === "readonly") { this.tsCheckTypeAnnotationForReadOnly(node); } return this.finishNode(node, "TSTypeOperator"); } tsCheckTypeAnnotationForReadOnly(node) { switch (node.typeAnnotation.type) { case "TSTupleType": case "TSArrayType": return; default: this.raise(TSErrors.UnexpectedReadonly, { node }); } } tsParseInferType() { const node = this.startNode(); this.expectContextual(112); const typeParameter = this.startNode(); typeParameter.name = this.tsParseTypeParameterName(); node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter"); return this.finishNode(node, "TSInferType"); } tsParseTypeOperatorOrHigher() { const isTypeOperator = tokenIsTSTypeOperator(this.state.type) && !this.state.containsEsc; return isTypeOperator ? this.tsParseTypeOperator() : this.isContextual(112) ? this.tsParseInferType() : this.tsParseArrayTypeOrHigher(); } tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) { const node = this.startNode(); const hasLeadingOperator = this.eat(operator); const types2 = []; do { types2.push(parseConstituentType()); } while (this.eat(operator)); if (types2.length === 1 && !hasLeadingOperator) { return types2[0]; } node.types = types2; return this.finishNode(node, kind); } tsParseIntersectionTypeOrHigher() { return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), 45); } tsParseUnionTypeOrHigher() { return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), 43); } tsIsStartOfFunctionType() { if (this.match(47)) { return true; } return this.match(10) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this)); } tsSkipParameterStart() { if (tokenIsIdentifier(this.state.type) || this.match(78)) { this.next(); return true; } if (this.match(5)) { let braceStackCounter = 1; this.next(); while (braceStackCounter > 0) { if (this.match(5)) { ++braceStackCounter; } else if (this.match(8)) { --braceStackCounter; } this.next(); } return true; } if (this.match(0)) { let braceStackCounter = 1; this.next(); while (braceStackCounter > 0) { if (this.match(0)) { ++braceStackCounter; } else if (this.match(3)) { --braceStackCounter; } this.next(); } return true; } return false; } tsIsUnambiguouslyStartOfFunctionType() { this.next(); if (this.match(11) || this.match(21)) { return true; } if (this.tsSkipParameterStart()) { if (this.match(14) || this.match(12) || this.match(17) || this.match(29)) { return true; } if (this.match(11)) { this.next(); if (this.match(19)) { return true; } } } return false; } tsParseTypeOrTypePredicateAnnotation(returnToken) { return this.tsInType(() => { const t = this.startNode(); this.expect(returnToken); const node = this.startNode(); const asserts = !!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this)); if (asserts && this.match(78)) { let thisTypePredicate = this.tsParseThisTypeOrThisTypePredicate(); if (thisTypePredicate.type === "TSThisType") { node.parameterName = thisTypePredicate; node.asserts = true; node.typeAnnotation = null; thisTypePredicate = this.finishNode(node, "TSTypePredicate"); } else { this.resetStartLocationFromNode(thisTypePredicate, node); thisTypePredicate.asserts = true; } t.typeAnnotation = thisTypePredicate; return this.finishNode(t, "TSTypeAnnotation"); } const typePredicateVariable = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this)); if (!typePredicateVariable) { if (!asserts) { return this.tsParseTypeAnnotation(false, t); } node.parameterName = this.parseIdentifier(); node.asserts = asserts; node.typeAnnotation = null; t.typeAnnotation = this.finishNode(node, "TSTypePredicate"); return this.finishNode(t, "TSTypeAnnotation"); } const type = this.tsParseTypeAnnotation(false); node.parameterName = typePredicateVariable; node.typeAnnotation = type; node.asserts = asserts; t.typeAnnotation = this.finishNode(node, "TSTypePredicate"); return this.finishNode(t, "TSTypeAnnotation"); }); } tsTryParseTypeOrTypePredicateAnnotation() { return this.match(14) ? this.tsParseTypeOrTypePredicateAnnotation(14) : void 0; } tsTryParseTypeAnnotation() { return this.match(14) ? this.tsParseTypeAnnotation() : void 0; } tsTryParseType() { return this.tsEatThenParseType(14); } tsParseTypePredicatePrefix() { const id = this.parseIdentifier(); if (this.isContextual(113) && !this.hasPrecedingLineBreak()) { this.next(); return id; } } tsParseTypePredicateAsserts() { if (this.state.type !== 106) { return false; } const containsEsc = this.state.containsEsc; this.next(); if (!tokenIsIdentifier(this.state.type) && !this.match(78)) { return false; } if (containsEsc) { this.raise(ErrorMessages.InvalidEscapedReservedWord, { at: this.state.lastTokStartLoc }, "asserts"); } return true; } tsParseTypeAnnotation(eatColon = true, t = this.startNode()) { this.tsInType(() => { if (eatColon) this.expect(14); t.typeAnnotation = this.tsParseType(); }); return this.finishNode(t, "TSTypeAnnotation"); } tsParseType() { assert(this.state.inType); const type = this.tsParseNonConditionalType(); if (this.hasPrecedingLineBreak() || !this.eat(81)) { return type; } const node = this.startNodeAtNode(type); node.checkType = type; node.extendsType = this.tsParseNonConditionalType(); this.expect(17); node.trueType = this.tsParseType(); this.expect(14); node.falseType = this.tsParseType(); return this.finishNode(node, "TSConditionalType"); } isAbstractConstructorSignature() { return this.isContextual(120) && this.lookahead().type === 77; } tsParseNonConditionalType() { if (this.tsIsStartOfFunctionType()) { return this.tsParseFunctionOrConstructorType("TSFunctionType"); } if (this.match(77)) { return this.tsParseFunctionOrConstructorType("TSConstructorType"); } else if (this.isAbstractConstructorSignature()) { return this.tsParseFunctionOrConstructorType("TSConstructorType", true); } return this.tsParseUnionTypeOrHigher(); } tsParseTypeAssertion() { if (this.getPluginOption("typescript", "disallowAmbiguousJSXLike")) { this.raise(TSErrors.ReservedTypeAssertion, { at: this.state.startLoc }); } const node = this.startNode(); const _const = this.tsTryNextParseConstantContext(); node.typeAnnotation = _const || this.tsNextThenParseType(); this.expect(48); node.expression = this.parseMaybeUnary(); return this.finishNode(node, "TSTypeAssertion"); } tsParseHeritageClause(descriptor) { const originalStartLoc = this.state.startLoc; const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", this.tsParseExpressionWithTypeArguments.bind(this)); if (!delimitedList.length) { this.raise(TSErrors.EmptyHeritageClauseType, { at: originalStartLoc }, descriptor); } return delimitedList; } tsParseExpressionWithTypeArguments() { const node = this.startNode(); node.expression = this.tsParseEntityName(false); if (this.match(47)) { node.typeParameters = this.tsParseTypeArguments(); } return this.finishNode(node, "TSExpressionWithTypeArguments"); } tsParseInterfaceDeclaration(node) { if (tokenIsIdentifier(this.state.type)) { node.id = this.parseIdentifier(); this.checkLVal(node.id, "typescript interface declaration", BIND_TS_INTERFACE); } else { node.id = null; this.raise(TSErrors.MissingInterfaceName, { at: this.state.startLoc }); } node.typeParameters = this.tsTryParseTypeParameters(); if (this.eat(81)) { node.extends = this.tsParseHeritageClause("extends"); } const body = this.startNode(); body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)); node.body = this.finishNode(body, "TSInterfaceBody"); return this.finishNode(node, "TSInterfaceDeclaration"); } tsParseTypeAliasDeclaration(node) { node.id = this.parseIdentifier(); this.checkLVal(node.id, "typescript type alias", BIND_TS_TYPE); node.typeParameters = this.tsTryParseTypeParameters(); node.typeAnnotation = this.tsInType(() => { this.expect(29); if (this.isContextual(111) && this.lookahead().type !== 16) { const node2 = this.startNode(); this.next(); return this.finishNode(node2, "TSIntrinsicKeyword"); } return this.tsParseType(); }); this.semicolon(); return this.finishNode(node, "TSTypeAliasDeclaration"); } tsInNoContext(cb) { const oldContext = this.state.context; this.state.context = [oldContext[0]]; try { return cb(); } finally { this.state.context = oldContext; } } tsInType(cb) { const oldInType = this.state.inType; this.state.inType = true; try { return cb(); } finally { this.state.inType = oldInType; } } tsEatThenParseType(token) { return !this.match(token) ? void 0 : this.tsNextThenParseType(); } tsExpectThenParseType(token) { return this.tsDoThenParseType(() => this.expect(token)); } tsNextThenParseType() { return this.tsDoThenParseType(() => this.next()); } tsDoThenParseType(cb) { return this.tsInType(() => { cb(); return this.tsParseType(); }); } tsParseEnumMember() { const node = this.startNode(); node.id = this.match(129) ? this.parseExprAtom() : this.parseIdentifier(true); if (this.eat(29)) { node.initializer = this.parseMaybeAssignAllowIn(); } return this.finishNode(node, "TSEnumMember"); } tsParseEnumDeclaration(node, isConst) { if (isConst) node.const = true; node.id = this.parseIdentifier(); this.checkLVal(node.id, "typescript enum declaration", isConst ? BIND_TS_CONST_ENUM : BIND_TS_ENUM); this.expect(5); node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)); this.expect(8); return this.finishNode(node, "TSEnumDeclaration"); } tsParseModuleBlock() { const node = this.startNode(); this.scope.enter(SCOPE_OTHER); this.expect(5); this.parseBlockOrModuleBlockBody(node.body = [], void 0, true, 8); this.scope.exit(); return this.finishNode(node, "TSModuleBlock"); } tsParseModuleOrNamespaceDeclaration(node, nested = false) { node.id = this.parseIdentifier(); if (!nested) { this.checkLVal(node.id, "module or namespace declaration", BIND_TS_NAMESPACE); } if (this.eat(16)) { const inner = this.startNode(); this.tsParseModuleOrNamespaceDeclaration(inner, true); node.body = inner; } else { this.scope.enter(SCOPE_TS_MODULE); this.prodParam.enter(PARAM); node.body = this.tsParseModuleBlock(); this.prodParam.exit(); this.scope.exit(); } return this.finishNode(node, "TSModuleDeclaration"); } tsParseAmbientExternalModuleDeclaration(node) { if (this.isContextual(109)) { node.global = true; node.id = this.parseIdentifier(); } else if (this.match(129)) { node.id = this.parseExprAtom(); } else { this.unexpected(); } if (this.match(5)) { this.scope.enter(SCOPE_TS_MODULE); this.prodParam.enter(PARAM); node.body = this.tsParseModuleBlock(); this.prodParam.exit(); this.scope.exit(); } else { this.semicolon(); } return this.finishNode(node, "TSModuleDeclaration"); } tsParseImportEqualsDeclaration(node, isExport) { node.isExport = isExport || false; node.id = this.parseIdentifier(); this.checkLVal(node.id, "import equals declaration", BIND_LEXICAL); this.expect(29); const moduleReference = this.tsParseModuleReference(); if (node.importKind === "type" && moduleReference.type !== "TSExternalModuleReference") { this.raise(TSErrors.ImportAliasHasImportType, { node: moduleReference }); } node.moduleReference = moduleReference; this.semicolon(); return this.finishNode(node, "TSImportEqualsDeclaration"); } tsIsExternalModuleReference() { return this.isContextual(116) && this.lookaheadCharCode() === 40; } tsParseModuleReference() { return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false); } tsParseExternalModuleReference() { const node = this.startNode(); this.expectContextual(116); this.expect(10); if (!this.match(129)) { throw this.unexpected(); } node.expression = this.parseExprAtom(); this.expect(11); return this.finishNode(node, "TSExternalModuleReference"); } tsLookAhead(f) { const state = this.state.clone(); const res = f(); this.state = state; return res; } tsTryParseAndCatch(f) { const result = this.tryParse((abort) => f() || abort()); if (result.aborted || !result.node) return void 0; if (result.error) this.state = result.failState; return result.node; } tsTryParse(f) { const state = this.state.clone(); const result = f(); if (result !== void 0 && result !== false) { return result; } else { this.state = state; return void 0; } } tsTryParseDeclare(nany) { if (this.isLineTerminator()) { return; } let starttype = this.state.type; let kind; if (this.isContextual(99)) { starttype = 74; kind = "let"; } return this.tsInAmbientContext(() => { switch (starttype) { case 68: nany.declare = true; return this.parseFunctionStatement(nany, false, true); case 80: nany.declare = true; return this.parseClass(nany, true, false); case 75: if (this.match(75) && this.isLookaheadContextual("enum")) { this.expect(75); this.expectContextual(122); return this.tsParseEnumDeclaration(nany, true); } case 74: kind = kind || this.state.value; return this.parseVarStatement(nany, kind); case 109: return this.tsParseAmbientExternalModuleDeclaration(nany); default: { if (tokenIsIdentifier(starttype)) { return this.tsParseDeclaration(nany, this.state.value, true); } } } }); } tsTryParseExportDeclaration() { return this.tsParseDeclaration(this.startNode(), this.state.value, true); } tsParseExpressionStatement(node, expr) { switch (expr.name) { case "declare": { const declaration = this.tsTryParseDeclare(node); if (declaration) { declaration.declare = true; return declaration; } break; } case "global": if (this.match(5)) { this.scope.enter(SCOPE_TS_MODULE); this.prodParam.enter(PARAM); const mod = node; mod.global = true; mod.id = expr; mod.body = this.tsParseModuleBlock(); this.scope.exit(); this.prodParam.exit(); return this.finishNode(mod, "TSModuleDeclaration"); } break; default: return this.tsParseDeclaration(node, expr.name, false); } } tsParseDeclaration(node, value, next) { switch (value) { case "abstract": if (this.tsCheckLineTerminator(next) && (this.match(80) || tokenIsIdentifier(this.state.type))) { return this.tsParseAbstractDeclaration(node); } break; case "enum": if (next || tokenIsIdentifier(this.state.type)) { if (next) this.next(); return this.tsParseEnumDeclaration(node, false); } break; case "interface": if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) { return this.tsParseInterfaceDeclaration(node); } break; case "module": if (this.tsCheckLineTerminator(next)) { if (this.match(129)) { return this.tsParseAmbientExternalModuleDeclaration(node); } else if (tokenIsIdentifier(this.state.type)) { return this.tsParseModuleOrNamespaceDeclaration(node); } } break; case "namespace": if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) { return this.tsParseModuleOrNamespaceDeclaration(node); } break; case "type": if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) { return this.tsParseTypeAliasDeclaration(node); } break; } } tsCheckLineTerminator(next) { if (next) { if (this.hasFollowingLineBreak()) return false; this.next(); return true; } return !this.isLineTerminator(); } tsTryParseGenericAsyncArrowFunction(startPos, startLoc) { if (!this.match(47)) { return void 0; } const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; this.state.maybeInArrowParameters = true; const res = this.tsTryParseAndCatch(() => { const node = this.startNodeAt(startPos, startLoc); node.typeParameters = this.tsParseTypeParameters(); super.parseFunctionParams(node); node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation(); this.expect(19); return node; }); this.state.maybeInArrowParameters = oldMaybeInArrowParameters; if (!res) { return void 0; } return this.parseArrowExpression(res, null, true); } tsParseTypeArgumentsInExpression() { if (this.reScan_lt() !== 47) { return void 0; } return this.tsParseTypeArguments(); } tsParseTypeArguments() { const node = this.startNode(); node.params = this.tsInType(() => this.tsInNoContext(() => { this.expect(47); return this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this)); })); if (node.params.length === 0) { this.raise(TSErrors.EmptyTypeArguments, { node }); } this.expect(48); return this.finishNode(node, "TSTypeParameterInstantiation"); } tsIsDeclarationStart() { return tokenIsTSDeclarationStart(this.state.type); } isExportDefaultSpecifier() { if (this.tsIsDeclarationStart()) return false; return super.isExportDefaultSpecifier(); } parseAssignableListItem(allowModifiers, decorators) { const startPos = this.state.start; const startLoc = this.state.startLoc; let accessibility; let readonly = false; let override = false; if (allowModifiers !== void 0) { const modified = {}; this.tsParseModifiers(modified, ["public", "private", "protected", "override", "readonly"]); accessibility = modified.accessibility; override = modified.override; readonly = modified.readonly; if (allowModifiers === false && (accessibility || readonly || override)) { this.raise(TSErrors.UnexpectedParameterModifier, { at: startLoc }); } } const left = this.parseMaybeDefault(); this.parseAssignableListItemTypes(left); const elt = this.parseMaybeDefault(left.start, left.loc.start, left); if (accessibility || readonly || override) { const pp = this.startNodeAt(startPos, startLoc); if (decorators.length) { pp.decorators = decorators; } if (accessibility) pp.accessibility = accessibility; if (readonly) pp.readonly = readonly; if (override) pp.override = override; if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") { this.raise(TSErrors.UnsupportedParameterPropertyKind, { node: pp }); } pp.parameter = elt; return this.finishNode(pp, "TSParameterProperty"); } if (decorators.length) { left.decorators = decorators; } return elt; } parseFunctionBodyAndFinish(node, type, isMethod = false) { if (this.match(14)) { node.returnType = this.tsParseTypeOrTypePredicateAnnotation(14); } const bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" || type === "ClassPrivateMethod" ? "TSDeclareMethod" : void 0; if (bodilessType && !this.match(5) && this.isLineTerminator()) { this.finishNode(node, bodilessType); return; } if (bodilessType === "TSDeclareFunction" && this.state.isAmbientContext) { this.raise(TSErrors.DeclareFunctionHasImplementation, { node }); if (node.declare) { super.parseFunctionBodyAndFinish(node, bodilessType, isMethod); return; } } super.parseFunctionBodyAndFinish(node, type, isMethod); } registerFunctionStatementId(node) { if (!node.body && node.id) { this.checkLVal(node.id, "function name", BIND_TS_AMBIENT); } else { super.registerFunctionStatementId(...arguments); } } tsCheckForInvalidTypeCasts(items) { items.forEach((node) => { if ((node == null ? void 0 : node.type) === "TSTypeCastExpression") { this.raise(TSErrors.UnexpectedTypeAnnotation, { node: node.typeAnnotation }); } }); } toReferencedList(exprList, isInParens) { this.tsCheckForInvalidTypeCasts(exprList); return exprList; } parseArrayLike(...args) { const node = super.parseArrayLike(...args); if (node.type === "ArrayExpression") { this.tsCheckForInvalidTypeCasts(node.elements); } return node; } parseSubscript(base, startPos, startLoc, noCalls, state) { if (!this.hasPrecedingLineBreak() && this.match(35)) { this.state.canStartJSXElement = false; this.next(); const nonNullExpression = this.startNodeAt(startPos, startLoc); nonNullExpression.expression = base; return this.finishNode(nonNullExpression, "TSNonNullExpression"); } let isOptionalCall = false; if (this.match(18) && this.lookaheadCharCode() === 60) { if (noCalls) { state.stop = true; return base; } state.optionalChainMember = isOptionalCall = true; this.next(); } if (this.match(47) || this.match(51)) { let missingParenErrorLoc; const result = this.tsTryParseAndCatch(() => { if (!noCalls && this.atPossibleAsyncArrow(base)) { const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startPos, startLoc); if (asyncArrowFn) { return asyncArrowFn; } } const node = this.startNodeAt(startPos, startLoc); node.callee = base; const typeArguments = this.tsParseTypeArgumentsInExpression(); if (typeArguments) { if (isOptionalCall && !this.match(10)) { missingParenErrorLoc = this.state.curPosition(); this.unexpected(); } if (!noCalls && this.eat(10)) { node.arguments = this.parseCallExpressionArguments(11, false); this.tsCheckForInvalidTypeCasts(node.arguments); node.typeParameters = typeArguments; if (state.optionalChainMember) { node.optional = isOptionalCall; } return this.finishCallExpression(node, state.optionalChainMember); } else if (tokenIsTemplate(this.state.type)) { const result2 = this.parseTaggedTemplateExpression(base, startPos, startLoc, state); result2.typeParameters = typeArguments; return result2; } } this.unexpected(); }); if (missingParenErrorLoc) { this.unexpected(missingParenErrorLoc, 10); } if (result) return result; } return super.parseSubscript(base, startPos, startLoc, noCalls, state); } parseNewArguments(node) { if (this.match(47) || this.match(51)) { const typeParameters = this.tsTryParseAndCatch(() => { const args = this.tsParseTypeArgumentsInExpression(); if (!this.match(10)) this.unexpected(); return args; }); if (typeParameters) { node.typeParameters = typeParameters; } } super.parseNewArguments(node); } parseExprOp(left, leftStartPos, leftStartLoc, minPrec) { if (tokenOperatorPrecedence(58) > minPrec && !this.hasPrecedingLineBreak() && this.isContextual(93)) { const node = this.startNodeAt(leftStartPos, leftStartLoc); node.expression = left; const _const = this.tsTryNextParseConstantContext(); if (_const) { node.typeAnnotation = _const; } else { node.typeAnnotation = this.tsNextThenParseType(); } this.finishNode(node, "TSAsExpression"); this.reScan_lt_gt(); return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec); } return super.parseExprOp(left, leftStartPos, leftStartLoc, minPrec); } checkReservedWord(word, startLoc, checkKeywords, isBinding) { } checkDuplicateExports() { } parseImport(node) { node.importKind = "value"; if (tokenIsIdentifier(this.state.type) || this.match(55) || this.match(5)) { let ahead = this.lookahead(); if (this.isContextual(126) && ahead.type !== 12 && ahead.type !== 97 && ahead.type !== 29) { node.importKind = "type"; this.next(); ahead = this.lookahead(); } if (tokenIsIdentifier(this.state.type) && ahead.type === 29) { return this.tsParseImportEqualsDeclaration(node); } } const importNode = super.parseImport(node); if (importNode.importKind === "type" && importNode.specifiers.length > 1 && importNode.specifiers[0].type === "ImportDefaultSpecifier") { this.raise(TSErrors.TypeImportCannotSpecifyDefaultAndNamed, { node: importNode }); } return importNode; } parseExport(node) { if (this.match(83)) { this.next(); if (this.isContextual(126) && this.lookaheadCharCode() !== 61) { node.importKind = "type"; this.next(); } else { node.importKind = "value"; } return this.tsParseImportEqualsDeclaration(node, true); } else if (this.eat(29)) { const assign = node; assign.expression = this.parseExpression(); this.semicolon(); return this.finishNode(assign, "TSExportAssignment"); } else if (this.eatContextual(93)) { const decl = node; this.expectContextual(124); decl.id = this.parseIdentifier(); this.semicolon(); return this.finishNode(decl, "TSNamespaceExportDeclaration"); } else { if (this.isContextual(126) && this.lookahead().type === 5) { this.next(); node.exportKind = "type"; } else { node.exportKind = "value"; } return super.parseExport(node); } } isAbstractClass() { return this.isContextual(120) && this.lookahead().type === 80; } parseExportDefaultExpression() { if (this.isAbstractClass()) { const cls = this.startNode(); this.next(); cls.abstract = true; this.parseClass(cls, true, true); return cls; } if (this.match(125)) { const interfaceNode = this.startNode(); this.next(); const result = this.tsParseInterfaceDeclaration(interfaceNode); if (result) return result; } return super.parseExportDefaultExpression(); } parseStatementContent(context, topLevel) { if (this.state.type === 75) { const ahead = this.lookahead(); if (ahead.type === 122) { const node = this.startNode(); this.next(); this.expectContextual(122); return this.tsParseEnumDeclaration(node, true); } } return super.parseStatementContent(context, topLevel); } parseAccessModifier() { return this.tsParseModifier(["public", "protected", "private"]); } tsHasSomeModifiers(member, modifiers) { return modifiers.some((modifier) => { if (tsIsAccessModifier(modifier)) { return member.accessibility === modifier; } return !!member[modifier]; }); } tsIsStartOfStaticBlocks() { return this.isContextual(104) && this.lookaheadCharCode() === 123; } parseClassMember(classBody, member, state) { const modifiers = ["declare", "private", "public", "protected", "override", "abstract", "readonly", "static"]; this.tsParseModifiers(member, modifiers, void 0, void 0, true); const callParseClassMemberWithIsStatic = () => { if (this.tsIsStartOfStaticBlocks()) { this.next(); this.next(); if (this.tsHasSomeModifiers(member, modifiers)) { this.raise(TSErrors.StaticBlockCannotHaveModifier, { at: this.state.curPosition() }); } this.parseClassStaticBlock(classBody, member); } else { this.parseClassMemberWithIsStatic(classBody, member, state, !!member.static); } }; if (member.declare) { this.tsInAmbientContext(callParseClassMemberWithIsStatic); } else { callParseClassMemberWithIsStatic(); } } parseClassMemberWithIsStatic(classBody, member, state, isStatic) { const idx = this.tsTryParseIndexSignature(member); if (idx) { classBody.body.push(idx); if (member.abstract) { this.raise(TSErrors.IndexSignatureHasAbstract, { node: member }); } if (member.accessibility) { this.raise(TSErrors.IndexSignatureHasAccessibility, { node: member }, member.accessibility); } if (member.declare) { this.raise(TSErrors.IndexSignatureHasDeclare, { node: member }); } if (member.override) { this.raise(TSErrors.IndexSignatureHasOverride, { node: member }); } return; } if (!this.state.inAbstractClass && member.abstract) { this.raise(TSErrors.NonAbstractClassHasAbstractMethod, { node: member }); } if (member.override) { if (!state.hadSuperClass) { this.raise(TSErrors.OverrideNotInSubClass, { node: member }); } } super.parseClassMemberWithIsStatic(classBody, member, state, isStatic); } parsePostMemberNameModifiers(methodOrProp) { const optional = this.eat(17); if (optional) methodOrProp.optional = true; if (methodOrProp.readonly && this.match(10)) { this.raise(TSErrors.ClassMethodHasReadonly, { node: methodOrProp }); } if (methodOrProp.declare && this.match(10)) { this.raise(TSErrors.ClassMethodHasDeclare, { node: methodOrProp }); } } parseExpressionStatement(node, expr) { const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr) : void 0; return decl || super.parseExpressionStatement(node, expr); } shouldParseExportDeclaration() { if (this.tsIsDeclarationStart()) return true; return super.shouldParseExportDeclaration(); } parseConditional(expr, startPos, startLoc, refExpressionErrors) { if (!this.state.maybeInArrowParameters || !this.match(17)) { return super.parseConditional(expr, startPos, startLoc, refExpressionErrors); } const result = this.tryParse(() => super.parseConditional(expr, startPos, startLoc)); if (!result.node) { if (result.error) { super.setOptionalParametersError(refExpressionErrors, result.error); } return expr; } if (result.error) this.state = result.failState; return result.node; } parseParenItem(node, startPos, startLoc) { node = super.parseParenItem(node, startPos, startLoc); if (this.eat(17)) { node.optional = true; this.resetEndLocation(node); } if (this.match(14)) { const typeCastNode = this.startNodeAt(startPos, startLoc); typeCastNode.expression = node; typeCastNode.typeAnnotation = this.tsParseTypeAnnotation(); return this.finishNode(typeCastNode, "TSTypeCastExpression"); } return node; } parseExportDeclaration(node) { const startPos = this.state.start; const startLoc = this.state.startLoc; const isDeclare = this.eatContextual(121); if (isDeclare && (this.isContextual(121) || !this.shouldParseExportDeclaration())) { throw this.raise(TSErrors.ExpectedAmbientAfterExportDeclare, { at: this.state.startLoc }); } let declaration; if (tokenIsIdentifier(this.state.type)) { declaration = this.tsTryParseExportDeclaration(); } if (!declaration) { declaration = super.parseExportDeclaration(node); } if (declaration && (declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare)) { node.exportKind = "type"; } if (declaration && isDeclare) { this.resetStartLocation(declaration, startPos, startLoc); declaration.declare = true; } return declaration; } parseClassId(node, isStatement, optionalId) { if ((!isStatement || optionalId) && this.isContextual(110)) { return; } super.parseClassId(node, isStatement, optionalId, node.declare ? BIND_TS_AMBIENT : BIND_CLASS); const typeParameters = this.tsTryParseTypeParameters(); if (typeParameters) node.typeParameters = typeParameters; } parseClassPropertyAnnotation(node) { if (!node.optional && this.eat(35)) { node.definite = true; } const type = this.tsTryParseTypeAnnotation(); if (type) node.typeAnnotation = type; } parseClassProperty(node) { this.parseClassPropertyAnnotation(node); if (this.state.isAmbientContext && this.match(29)) { this.raise(TSErrors.DeclareClassFieldHasInitializer, { at: this.state.startLoc }); } if (node.abstract && this.match(29)) { const { key } = node; this.raise(TSErrors.AbstractPropertyHasInitializer, { at: this.state.startLoc }, key.type === "Identifier" && !node.computed ? key.name : `[${this.input.slice(key.start, key.end)}]`); } return super.parseClassProperty(node); } parseClassPrivateProperty(node) { if (node.abstract) { this.raise(TSErrors.PrivateElementHasAbstract, { node }); } if (node.accessibility) { this.raise(TSErrors.PrivateElementHasAccessibility, { node }, node.accessibility); } this.parseClassPropertyAnnotation(node); return super.parseClassPrivateProperty(node); } pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { const typeParameters = this.tsTryParseTypeParameters(); if (typeParameters && isConstructor) { this.raise(TSErrors.ConstructorHasTypeParameters, { node: typeParameters }); } if (method.declare && (method.kind === "get" || method.kind === "set")) { this.raise(TSErrors.DeclareAccessor, { node: method }, method.kind); } if (typeParameters) method.typeParameters = typeParameters; super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper); } pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { const typeParameters = this.tsTryParseTypeParameters(); if (typeParameters) method.typeParameters = typeParameters; super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync); } declareClassPrivateMethodInScope(node, kind) { if (node.type === "TSDeclareMethod") return; if (node.type === "MethodDefinition" && !node.value.body) return; super.declareClassPrivateMethodInScope(node, kind); } parseClassSuper(node) { super.parseClassSuper(node); if (node.superClass && (this.match(47) || this.match(51))) { node.superTypeParameters = this.tsParseTypeArgumentsInExpression(); } if (this.eatContextual(110)) { node.implements = this.tsParseHeritageClause("implements"); } } parseObjPropValue(prop, ...args) { const typeParameters = this.tsTryParseTypeParameters(); if (typeParameters) prop.typeParameters = typeParameters; super.parseObjPropValue(prop, ...args); } parseFunctionParams(node, allowModifiers) { const typeParameters = this.tsTryParseTypeParameters(); if (typeParameters) node.typeParameters = typeParameters; super.parseFunctionParams(node, allowModifiers); } parseVarId(decl, kind) { super.parseVarId(decl, kind); if (decl.id.type === "Identifier" && !this.hasPrecedingLineBreak() && this.eat(35)) { decl.definite = true; } const type = this.tsTryParseTypeAnnotation(); if (type) { decl.id.typeAnnotation = type; this.resetEndLocation(decl.id); } } parseAsyncArrowFromCallExpression(node, call) { if (this.match(14)) { node.returnType = this.tsParseTypeAnnotation(); } return super.parseAsyncArrowFromCallExpression(node, call); } parseMaybeAssign(...args) { var _jsx, _jsx2, _typeCast, _jsx3, _typeCast2, _jsx4, _typeCast3; let state; let jsx2; let typeCast; if (this.hasPlugin("jsx") && (this.match(138) || this.match(47))) { state = this.state.clone(); jsx2 = this.tryParse(() => super.parseMaybeAssign(...args), state); if (!jsx2.error) return jsx2.node; const { context } = this.state; const currentContext = context[context.length - 1]; if (currentContext === types.j_oTag || currentContext === types.j_expr) { context.pop(); } } if (!((_jsx = jsx2) != null && _jsx.error) && !this.match(47)) { return super.parseMaybeAssign(...args); } let typeParameters; state = state || this.state.clone(); const arrow = this.tryParse((abort) => { var _expr$extra, _typeParameters; typeParameters = this.tsParseTypeParameters(); const expr = super.parseMaybeAssign(...args); if (expr.type !== "ArrowFunctionExpression" || (_expr$extra = expr.extra) != null && _expr$extra.parenthesized) { abort(); } if (((_typeParameters = typeParameters) == null ? void 0 : _typeParameters.params.length) !== 0) { this.resetStartLocationFromNode(expr, typeParameters); } expr.typeParameters = typeParameters; return expr; }, state); if (!arrow.error && !arrow.aborted) { if (typeParameters) this.reportReservedArrowTypeParam(typeParameters); return arrow.node; } if (!jsx2) { assert(!this.hasPlugin("jsx")); typeCast = this.tryParse(() => super.parseMaybeAssign(...args), state); if (!typeCast.error) return typeCast.node; } if ((_jsx2 = jsx2) != null && _jsx2.node) { this.state = jsx2.failState; return jsx2.node; } if (arrow.node) { this.state = arrow.failState; if (typeParameters) this.reportReservedArrowTypeParam(typeParameters); return arrow.node; } if ((_typeCast = typeCast) != null && _typeCast.node) { this.state = typeCast.failState; return typeCast.node; } if ((_jsx3 = jsx2) != null && _jsx3.thrown) throw jsx2.error; if (arrow.thrown) throw arrow.error; if ((_typeCast2 = typeCast) != null && _typeCast2.thrown) throw typeCast.error; throw ((_jsx4 = jsx2) == null ? void 0 : _jsx4.error) || arrow.error || ((_typeCast3 = typeCast) == null ? void 0 : _typeCast3.error); } reportReservedArrowTypeParam(node) { var _node$extra; if (node.params.length === 1 && !((_node$extra = node.extra) != null && _node$extra.trailingComma) && this.getPluginOption("typescript", "disallowAmbiguousJSXLike")) { this.raise(TSErrors.ReservedArrowTypeParam, { node }); } } parseMaybeUnary(refExpressionErrors) { if (!this.hasPlugin("jsx") && this.match(47)) { return this.tsParseTypeAssertion(); } else { return super.parseMaybeUnary(refExpressionErrors); } } parseArrow(node) { if (this.match(14)) { const result = this.tryParse((abort) => { const returnType = this.tsParseTypeOrTypePredicateAnnotation(14); if (this.canInsertSemicolon() || !this.match(19)) abort(); return returnType; }); if (result.aborted) return; if (!result.thrown) { if (result.error) this.state = result.failState; node.returnType = result.node; } } return super.parseArrow(node); } parseAssignableListItemTypes(param) { if (this.eat(17)) { if (param.type !== "Identifier" && !this.state.isAmbientContext && !this.state.inType) { this.raise(TSErrors.PatternIsOptional, { node: param }); } param.optional = true; } const type = this.tsTryParseTypeAnnotation(); if (type) param.typeAnnotation = type; this.resetEndLocation(param); return param; } isAssignable(node, isBinding) { switch (node.type) { case "TSTypeCastExpression": return this.isAssignable(node.expression, isBinding); case "TSParameterProperty": return true; default: return super.isAssignable(node, isBinding); } } toAssignable(node, isLHS = false) { switch (node.type) { case "TSTypeCastExpression": return super.toAssignable(this.typeCastToParameter(node), isLHS); case "TSParameterProperty": return super.toAssignable(node, isLHS); case "ParenthesizedExpression": return this.toAssignableParenthesizedExpression(node, isLHS); case "TSAsExpression": case "TSNonNullExpression": case "TSTypeAssertion": node.expression = this.toAssignable(node.expression, isLHS); return node; default: return super.toAssignable(node, isLHS); } } toAssignableParenthesizedExpression(node, isLHS) { switch (node.expression.type) { case "TSAsExpression": case "TSNonNullExpression": case "TSTypeAssertion": case "ParenthesizedExpression": node.expression = this.toAssignable(node.expression, isLHS); return node; default: return super.toAssignable(node, isLHS); } } checkLVal(expr, contextDescription, ...args) { var _expr$extra2; switch (expr.type) { case "TSTypeCastExpression": return; case "TSParameterProperty": this.checkLVal(expr.parameter, "parameter property", ...args); return; case "TSAsExpression": case "TSTypeAssertion": if (!args[0] && contextDescription !== "parenthesized expression" && !((_expr$extra2 = expr.extra) != null && _expr$extra2.parenthesized)) { this.raise(ErrorMessages.InvalidLhs, { node: expr }, contextDescription); break; } this.checkLVal(expr.expression, "parenthesized expression", ...args); return; case "TSNonNullExpression": this.checkLVal(expr.expression, contextDescription, ...args); return; default: super.checkLVal(expr, contextDescription, ...args); return; } } parseBindingAtom() { switch (this.state.type) { case 78: return this.parseIdentifier(true); default: return super.parseBindingAtom(); } } parseMaybeDecoratorArguments(expr) { if (this.match(47) || this.match(51)) { const typeArguments = this.tsParseTypeArgumentsInExpression(); if (this.match(10)) { const call = super.parseMaybeDecoratorArguments(expr); call.typeParameters = typeArguments; return call; } this.unexpected(null, 10); } return super.parseMaybeDecoratorArguments(expr); } checkCommaAfterRest(close) { if (this.state.isAmbientContext && this.match(12) && this.lookaheadCharCode() === close) { this.next(); return false; } else { return super.checkCommaAfterRest(close); } } isClassMethod() { return this.match(47) || super.isClassMethod(); } isClassProperty() { return this.match(35) || this.match(14) || super.isClassProperty(); } parseMaybeDefault(...args) { const node = super.parseMaybeDefault(...args); if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { this.raise(TSErrors.TypeAnnotationAfterAssign, { node: node.typeAnnotation }); } return node; } getTokenFromCode(code) { if (this.state.inType) { if (code === 62) { return this.finishOp(48, 1); } if (code === 60) { return this.finishOp(47, 1); } } return super.getTokenFromCode(code); } reScan_lt_gt() { const { type } = this.state; if (type === 47) { this.state.pos -= 1; this.readToken_lt(); } else if (type === 48) { this.state.pos -= 1; this.readToken_gt(); } } reScan_lt() { const { type } = this.state; if (type === 51) { this.state.pos -= 2; this.finishOp(47, 1); return 47; } return type; } toAssignableList(exprList) { for (let i = 0; i < exprList.length; i++) { const expr = exprList[i]; if (!expr) continue; switch (expr.type) { case "TSTypeCastExpression": exprList[i] = this.typeCastToParameter(expr); break; case "TSAsExpression": case "TSTypeAssertion": if (!this.state.maybeInArrowParameters) { exprList[i] = this.typeCastToParameter(expr); } else { this.raise(TSErrors.UnexpectedTypeCastInParameter, { node: expr }); } break; } } return super.toAssignableList(...arguments); } typeCastToParameter(node) { node.expression.typeAnnotation = node.typeAnnotation; this.resetEndLocation(node.expression, node.typeAnnotation.loc.end); return node.expression; } shouldParseArrow(params) { if (this.match(14)) { return params.every((expr) => this.isAssignable(expr, true)); } return super.shouldParseArrow(params); } shouldParseAsyncArrow() { return this.match(14) || super.shouldParseAsyncArrow(); } canHaveLeadingDecorator() { return super.canHaveLeadingDecorator() || this.isAbstractClass(); } jsxParseOpeningElementAfterName(node) { if (this.match(47) || this.match(51)) { const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArgumentsInExpression()); if (typeArguments) node.typeParameters = typeArguments; } return super.jsxParseOpeningElementAfterName(node); } getGetterSetterExpectedParamCount(method) { const baseCount = super.getGetterSetterExpectedParamCount(method); const params = this.getObjectOrClassMethodParams(method); const firstParam = params[0]; const hasContextParam = firstParam && this.isThisParam(firstParam); return hasContextParam ? baseCount + 1 : baseCount; } parseCatchClauseParam() { const param = super.parseCatchClauseParam(); const type = this.tsTryParseTypeAnnotation(); if (type) { param.typeAnnotation = type; this.resetEndLocation(param); } return param; } tsInAmbientContext(cb) { const oldIsAmbientContext = this.state.isAmbientContext; this.state.isAmbientContext = true; try { return cb(); } finally { this.state.isAmbientContext = oldIsAmbientContext; } } parseClass(node, ...args) { const oldInAbstractClass = this.state.inAbstractClass; this.state.inAbstractClass = !!node.abstract; try { return super.parseClass(node, ...args); } finally { this.state.inAbstractClass = oldInAbstractClass; } } tsParseAbstractDeclaration(node) { if (this.match(80)) { node.abstract = true; return this.parseClass(node, true, false); } else if (this.isContextual(125)) { if (!this.hasFollowingLineBreak()) { node.abstract = true; this.raise(TSErrors.NonClassMethodPropertyHasAbstractModifer, { node }); this.next(); return this.tsParseInterfaceDeclaration(node); } } else { this.unexpected(null, 80); } } parseMethod(...args) { const method = super.parseMethod(...args); if (method.abstract) { const hasBody = this.hasPlugin("estree") ? !!method.value.body : !!method.body; if (hasBody) { const { key } = method; this.raise(TSErrors.AbstractMethodHasImplementation, { node: method }, key.type === "Identifier" && !method.computed ? key.name : `[${this.input.slice(key.start, key.end)}]`); } } return method; } tsParseTypeParameterName() { const typeName = this.parseIdentifier(); return typeName.name; } shouldParseAsAmbientContext() { return !!this.getPluginOption("typescript", "dts"); } parse() { if (this.shouldParseAsAmbientContext()) { this.state.isAmbientContext = true; } return super.parse(); } getExpression() { if (this.shouldParseAsAmbientContext()) { this.state.isAmbientContext = true; } return super.getExpression(); } parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly) { if (!isString && isMaybeTypeOnly) { this.parseTypeOnlyImportExportSpecifier(node, false, isInTypeExport); return this.finishNode(node, "ExportSpecifier"); } node.exportKind = "value"; return super.parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly); } parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly) { if (!importedIsString && isMaybeTypeOnly) { this.parseTypeOnlyImportExportSpecifier(specifier, true, isInTypeOnlyImport); return this.finishNode(specifier, "ImportSpecifier"); } specifier.importKind = "value"; return super.parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly); } parseTypeOnlyImportExportSpecifier(node, isImport, isInTypeOnlyImportExport) { const leftOfAsKey = isImport ? "imported" : "local"; const rightOfAsKey = isImport ? "local" : "exported"; let leftOfAs = node[leftOfAsKey]; let rightOfAs; let hasTypeSpecifier = false; let canParseAsKeyword = true; const loc = leftOfAs.loc.start; if (this.isContextual(93)) { const firstAs = this.parseIdentifier(); if (this.isContextual(93)) { const secondAs = this.parseIdentifier(); if (tokenIsKeywordOrIdentifier(this.state.type)) { hasTypeSpecifier = true; leftOfAs = firstAs; rightOfAs = this.parseIdentifier(); canParseAsKeyword = false; } else { rightOfAs = secondAs; canParseAsKeyword = false; } } else if (tokenIsKeywordOrIdentifier(this.state.type)) { canParseAsKeyword = false; rightOfAs = this.parseIdentifier(); } else { hasTypeSpecifier = true; leftOfAs = firstAs; } } else if (tokenIsKeywordOrIdentifier(this.state.type)) { hasTypeSpecifier = true; leftOfAs = this.parseIdentifier(); } if (hasTypeSpecifier && isInTypeOnlyImportExport) { this.raise(isImport ? TSErrors.TypeModifierIsUsedInTypeImports : TSErrors.TypeModifierIsUsedInTypeExports, { at: loc }); } node[leftOfAsKey] = leftOfAs; node[rightOfAsKey] = rightOfAs; const kindKey = isImport ? "importKind" : "exportKind"; node[kindKey] = hasTypeSpecifier ? "type" : "value"; if (canParseAsKeyword && this.eatContextual(93)) { node[rightOfAsKey] = isImport ? this.parseIdentifier() : this.parseModuleExportName(); } if (!node[rightOfAsKey]) { node[rightOfAsKey] = cloneIdentifier(node[leftOfAsKey]); } if (isImport) { this.checkLVal(node[rightOfAsKey], "import specifier", BIND_LEXICAL); } } }; var PlaceholderErrors = makeErrorTemplates({ ClassNameIsRequired: "A class name is required." }, ErrorCodes.SyntaxError, "placeholders"); var placeholders = (superClass) => class extends superClass { parsePlaceholder(expectedNode) { if (this.match(140)) { const node = this.startNode(); this.next(); this.assertNoSpace("Unexpected space in placeholder."); node.name = super.parseIdentifier(true); this.assertNoSpace("Unexpected space in placeholder."); this.expect(140); return this.finishPlaceholder(node, expectedNode); } } finishPlaceholder(node, expectedNode) { const isFinished = !!(node.expectedNode && node.type === "Placeholder"); node.expectedNode = expectedNode; return isFinished ? node : this.finishNode(node, "Placeholder"); } getTokenFromCode(code) { if (code === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) { return this.finishOp(140, 2); } return super.getTokenFromCode(...arguments); } parseExprAtom() { return this.parsePlaceholder("Expression") || super.parseExprAtom(...arguments); } parseIdentifier() { return this.parsePlaceholder("Identifier") || super.parseIdentifier(...arguments); } checkReservedWord(word) { if (word !== void 0) super.checkReservedWord(...arguments); } parseBindingAtom() { return this.parsePlaceholder("Pattern") || super.parseBindingAtom(...arguments); } checkLVal(expr) { if (expr.type !== "Placeholder") super.checkLVal(...arguments); } toAssignable(node) { if (node && node.type === "Placeholder" && node.expectedNode === "Expression") { node.expectedNode = "Pattern"; return node; } return super.toAssignable(...arguments); } isLet(context) { if (super.isLet(context)) { return true; } if (!this.isContextual(99)) { return false; } if (context) return false; const nextToken = this.lookahead(); if (nextToken.type === 140) { return true; } return false; } verifyBreakContinue(node) { if (node.label && node.label.type === "Placeholder") return; super.verifyBreakContinue(...arguments); } parseExpressionStatement(node, expr) { if (expr.type !== "Placeholder" || expr.extra && expr.extra.parenthesized) { return super.parseExpressionStatement(...arguments); } if (this.match(14)) { const stmt = node; stmt.label = this.finishPlaceholder(expr, "Identifier"); this.next(); stmt.body = this.parseStatement("label"); return this.finishNode(stmt, "LabeledStatement"); } this.semicolon(); node.name = expr.name; return this.finishPlaceholder(node, "Statement"); } parseBlock() { return this.parsePlaceholder("BlockStatement") || super.parseBlock(...arguments); } parseFunctionId() { return this.parsePlaceholder("Identifier") || super.parseFunctionId(...arguments); } parseClass(node, isStatement, optionalId) { const type = isStatement ? "ClassDeclaration" : "ClassExpression"; this.next(); this.takeDecorators(node); const oldStrict = this.state.strict; const placeholder = this.parsePlaceholder("Identifier"); if (placeholder) { if (this.match(81) || this.match(140) || this.match(5)) { node.id = placeholder; } else if (optionalId || !isStatement) { node.id = null; node.body = this.finishPlaceholder(placeholder, "ClassBody"); return this.finishNode(node, type); } else { throw this.raise(PlaceholderErrors.ClassNameIsRequired, { at: this.state.startLoc }); } } else { this.parseClassId(node, isStatement, optionalId); } this.parseClassSuper(node); node.body = this.parsePlaceholder("ClassBody") || this.parseClassBody(!!node.superClass, oldStrict); return this.finishNode(node, type); } parseExport(node) { const placeholder = this.parsePlaceholder("Identifier"); if (!placeholder) return super.parseExport(...arguments); if (!this.isContextual(97) && !this.match(12)) { node.specifiers = []; node.source = null; node.declaration = this.finishPlaceholder(placeholder, "Declaration"); return this.finishNode(node, "ExportNamedDeclaration"); } this.expectPlugin("exportDefaultFrom"); const specifier = this.startNode(); specifier.exported = placeholder; node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; return super.parseExport(node); } isExportDefaultSpecifier() { if (this.match(65)) { const next = this.nextTokenStart(); if (this.isUnparsedContextual(next, "from")) { if (this.input.startsWith(tokenLabelName(140), this.nextTokenStartSince(next + 4))) { return true; } } } return super.isExportDefaultSpecifier(); } maybeParseExportDefaultSpecifier(node) { if (node.specifiers && node.specifiers.length > 0) { return true; } return super.maybeParseExportDefaultSpecifier(...arguments); } checkExport(node) { const { specifiers } = node; if (specifiers != null && specifiers.length) { node.specifiers = specifiers.filter((node2) => node2.exported.type === "Placeholder"); } super.checkExport(node); node.specifiers = specifiers; } parseImport(node) { const placeholder = this.parsePlaceholder("Identifier"); if (!placeholder) return super.parseImport(...arguments); node.specifiers = []; if (!this.isContextual(97) && !this.match(12)) { node.source = this.finishPlaceholder(placeholder, "StringLiteral"); this.semicolon(); return this.finishNode(node, "ImportDeclaration"); } const specifier = this.startNodeAtNode(placeholder); specifier.local = placeholder; this.finishNode(specifier, "ImportDefaultSpecifier"); node.specifiers.push(specifier); if (this.eat(12)) { const hasStarImport = this.maybeParseStarImportSpecifier(node); if (!hasStarImport) this.parseNamedImportSpecifiers(node); } this.expectContextual(97); node.source = this.parseImportSource(); this.semicolon(); return this.finishNode(node, "ImportDeclaration"); } parseImportSource() { return this.parsePlaceholder("StringLiteral") || super.parseImportSource(...arguments); } }; var v8intrinsic = (superClass) => class extends superClass { parseV8Intrinsic() { if (this.match(54)) { const v8IntrinsicStartLoc = this.state.startLoc; const node = this.startNode(); this.next(); if (tokenIsIdentifier(this.state.type)) { const name = this.parseIdentifierName(this.state.start); const identifier = this.createIdentifier(node, name); identifier.type = "V8IntrinsicIdentifier"; if (this.match(10)) { return identifier; } } this.unexpected(v8IntrinsicStartLoc); } } parseExprAtom() { return this.parseV8Intrinsic() || super.parseExprAtom(...arguments); } }; function hasPlugin(plugins, expectedConfig) { const [expectedName, expectedOptions] = typeof expectedConfig === "string" ? [expectedConfig, {}] : expectedConfig; const expectedKeys = Object.keys(expectedOptions); const expectedOptionsIsEmpty = expectedKeys.length === 0; return plugins.some((p) => { if (typeof p === "string") { return expectedOptionsIsEmpty && p === expectedName; } else { const [pluginName, pluginOptions] = p; if (pluginName !== expectedName) { return false; } for (const key of expectedKeys) { if (pluginOptions[key] !== expectedOptions[key]) { return false; } } return true; } }); } function getPluginOption(plugins, name, option) { const plugin = plugins.find((plugin2) => { if (Array.isArray(plugin2)) { return plugin2[0] === name; } else { return plugin2 === name; } }); if (plugin && Array.isArray(plugin)) { return plugin[1][option]; } return null; } var PIPELINE_PROPOSALS = ["minimal", "fsharp", "hack", "smart"]; var TOPIC_TOKENS = ["^^", "@@", "^", "%", "#"]; var RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"]; function validatePlugins(plugins) { if (hasPlugin(plugins, "decorators")) { if (hasPlugin(plugins, "decorators-legacy")) { throw new Error("Cannot use the decorators and decorators-legacy plugin together"); } const decoratorsBeforeExport = getPluginOption(plugins, "decorators", "decoratorsBeforeExport"); if (decoratorsBeforeExport == null) { throw new Error("The 'decorators' plugin requires a 'decoratorsBeforeExport' option, whose value must be a boolean. If you are migrating from Babylon/Babel 6 or want to use the old decorators proposal, you should use the 'decorators-legacy' plugin instead of 'decorators'."); } else if (typeof decoratorsBeforeExport !== "boolean") { throw new Error("'decoratorsBeforeExport' must be a boolean."); } } if (hasPlugin(plugins, "flow") && hasPlugin(plugins, "typescript")) { throw new Error("Cannot combine flow and typescript plugins."); } if (hasPlugin(plugins, "placeholders") && hasPlugin(plugins, "v8intrinsic")) { throw new Error("Cannot combine placeholders and v8intrinsic plugins."); } if (hasPlugin(plugins, "pipelineOperator")) { const proposal = getPluginOption(plugins, "pipelineOperator", "proposal"); if (!PIPELINE_PROPOSALS.includes(proposal)) { const proposalList = PIPELINE_PROPOSALS.map((p) => `"${p}"`).join(", "); throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${proposalList}.`); } const tupleSyntaxIsHash = hasPlugin(plugins, ["recordAndTuple", { syntaxType: "hash" }]); if (proposal === "hack") { if (hasPlugin(plugins, "placeholders")) { throw new Error("Cannot combine placeholders plugin and Hack-style pipes."); } if (hasPlugin(plugins, "v8intrinsic")) { throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes."); } const topicToken = getPluginOption(plugins, "pipelineOperator", "topicToken"); if (!TOPIC_TOKENS.includes(topicToken)) { const tokenList = TOPIC_TOKENS.map((t) => `"${t}"`).join(", "); throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${tokenList}.`); } if (topicToken === "#" && tupleSyntaxIsHash) { throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.'); } } else if (proposal === "smart" && tupleSyntaxIsHash) { throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.'); } } if (hasPlugin(plugins, "moduleAttributes")) { { if (hasPlugin(plugins, "importAssertions")) { throw new Error("Cannot combine importAssertions and moduleAttributes plugins."); } const moduleAttributesVerionPluginOption = getPluginOption(plugins, "moduleAttributes", "version"); if (moduleAttributesVerionPluginOption !== "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 (hasPlugin(plugins, "recordAndTuple") && !RECORD_AND_TUPLE_SYNTAX_TYPES.includes(getPluginOption(plugins, "recordAndTuple", "syntaxType"))) { throw new Error("'recordAndTuple' requires 'syntaxType' option whose value should be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map((p) => `'${p}'`).join(", ")); } if (hasPlugin(plugins, "asyncDoExpressions") && !hasPlugin(plugins, "doExpressions")) { const error = new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins."); error.missingPlugins = "doExpressions"; throw error; } } var mixinPlugins = { estree, jsx, flow, typescript, v8intrinsic, placeholders }; var mixinPluginNames = Object.keys(mixinPlugins); var defaultOptions = { sourceType: "script", sourceFilename: void 0, startColumn: 0, startLine: 1, allowAwaitOutsideFunction: false, allowReturnOutsideFunction: false, allowImportExportEverywhere: false, allowSuperOutsideMethod: false, allowUndeclaredExports: false, plugins: [], strictMode: null, ranges: false, tokens: false, createParenthesizedExpressions: false, errorRecovery: false, attachComment: true }; function getOptions(opts) { const options = {}; for (const key of Object.keys(defaultOptions)) { options[key] = opts && opts[key] != null ? opts[key] : defaultOptions[key]; } return options; } var unwrapParenthesizedExpression = (node) => { return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node; }; var LValParser = class extends NodeUtils { toAssignable(node, isLHS = false) { var _node$extra, _node$extra3; let parenthesized = void 0; if (node.type === "ParenthesizedExpression" || (_node$extra = node.extra) != null && _node$extra.parenthesized) { parenthesized = unwrapParenthesizedExpression(node); if (isLHS) { if (parenthesized.type === "Identifier") { this.expressionScope.recordParenthesizedIdentifierError(ErrorMessages.InvalidParenthesizedAssignment, node.loc.start); } else if (parenthesized.type !== "MemberExpression") { this.raise(ErrorMessages.InvalidParenthesizedAssignment, { node }); } } else { this.raise(ErrorMessages.InvalidParenthesizedAssignment, { node }); } } switch (node.type) { case "Identifier": case "ObjectPattern": case "ArrayPattern": case "AssignmentPattern": case "RestElement": break; case "ObjectExpression": node.type = "ObjectPattern"; for (let i = 0, length = node.properties.length, last = length - 1; i < length; i++) { var _node$extra2; const prop = node.properties[i]; const isLast = i === last; this.toAssignableObjectExpressionProp(prop, isLast, isLHS); if (isLast && prop.type === "RestElement" && (_node$extra2 = node.extra) != null && _node$extra2.trailingCommaLoc) { this.raise(ErrorMessages.RestTrailingComma, { at: node.extra.trailingCommaLoc }); } } break; case "ObjectProperty": { const { key, value } = node; if (this.isPrivateName(key)) { this.classScope.usePrivateName(this.getPrivateNameSV(key), key.loc.start); } this.toAssignable(value, isLHS); break; } case "SpreadElement": { this.checkToRestConversion(node); node.type = "RestElement"; const arg = node.argument; this.toAssignable(arg, isLHS); break; } case "ArrayExpression": node.type = "ArrayPattern"; this.toAssignableList(node.elements, (_node$extra3 = node.extra) == null ? void 0 : _node$extra3.trailingCommaLoc, isLHS); break; case "AssignmentExpression": if (node.operator !== "=") { this.raise(ErrorMessages.MissingEqInAssignment, { at: node.left.loc.end }); } node.type = "AssignmentPattern"; delete node.operator; this.toAssignable(node.left, isLHS); break; case "ParenthesizedExpression": this.toAssignable(parenthesized, isLHS); break; } return node; } toAssignableObjectExpressionProp(prop, isLast, isLHS) { if (prop.type === "ObjectMethod") { this.raise(prop.kind === "get" || prop.kind === "set" ? ErrorMessages.PatternHasAccessor : ErrorMessages.PatternHasMethod, { node: prop.key }); } else if (prop.type === "SpreadElement" && !isLast) { this.raise(ErrorMessages.RestTrailingComma, { node: prop }); } else { this.toAssignable(prop, isLHS); } } toAssignableList(exprList, trailingCommaLoc, isLHS) { let end = exprList.length; if (end) { const last = exprList[end - 1]; if ((last == null ? void 0 : last.type) === "RestElement") { --end; } else if ((last == null ? void 0 : last.type) === "SpreadElement") { last.type = "RestElement"; let arg = last.argument; this.toAssignable(arg, isLHS); arg = unwrapParenthesizedExpression(arg); if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern" && arg.type !== "ObjectPattern") { this.unexpected(arg.start); } if (trailingCommaLoc) { this.raise(ErrorMessages.RestTrailingComma, { at: trailingCommaLoc }); } --end; } } for (let i = 0; i < end; i++) { const elt = exprList[i]; if (elt) { this.toAssignable(elt, isLHS); if (elt.type === "RestElement") { this.raise(ErrorMessages.RestTrailingComma, { node: elt }); } } } return exprList; } isAssignable(node, isBinding) { switch (node.type) { case "Identifier": case "ObjectPattern": case "ArrayPattern": case "AssignmentPattern": case "RestElement": return true; case "ObjectExpression": { const last = node.properties.length - 1; return node.properties.every((prop, i) => { return prop.type !== "ObjectMethod" && (i === last || prop.type !== "SpreadElement") && this.isAssignable(prop); }); } case "ObjectProperty": return this.isAssignable(node.value); case "SpreadElement": return this.isAssignable(node.argument); case "ArrayExpression": return node.elements.every((element) => element === null || this.isAssignable(element)); case "AssignmentExpression": return node.operator === "="; case "ParenthesizedExpression": return this.isAssignable(node.expression); case "MemberExpression": case "OptionalMemberExpression": return !isBinding; default: return false; } } toReferencedList(exprList, isParenthesizedExpr) { return exprList; } toReferencedListDeep(exprList, isParenthesizedExpr) { this.toReferencedList(exprList, isParenthesizedExpr); for (const expr of exprList) { if ((expr == null ? void 0 : expr.type) === "ArrayExpression") { this.toReferencedListDeep(expr.elements); } } } parseSpread(refExpressionErrors, refNeedsArrowPos) { const node = this.startNode(); this.next(); node.argument = this.parseMaybeAssignAllowIn(refExpressionErrors, void 0, refNeedsArrowPos); return this.finishNode(node, "SpreadElement"); } parseRestBinding() { const node = this.startNode(); this.next(); node.argument = this.parseBindingAtom(); return this.finishNode(node, "RestElement"); } parseBindingAtom() { switch (this.state.type) { case 0: { const node = this.startNode(); this.next(); node.elements = this.parseBindingList(3, 93, true); return this.finishNode(node, "ArrayPattern"); } case 5: return this.parseObjectLike(8, true); } return this.parseIdentifier(); } parseBindingList(close, closeCharCode, allowEmpty, allowModifiers) { const elts = []; let first = true; while (!this.eat(close)) { if (first) { first = false; } else { this.expect(12); } if (allowEmpty && this.match(12)) { elts.push(null); } else if (this.eat(close)) { break; } else if (this.match(21)) { elts.push(this.parseAssignableListItemTypes(this.parseRestBinding())); if (!this.checkCommaAfterRest(closeCharCode)) { this.expect(close); break; } } else { const decorators = []; if (this.match(26) && this.hasPlugin("decorators")) { this.raise(ErrorMessages.UnsupportedParameterDecorator, { at: this.state.startLoc }); } while (this.match(26)) { decorators.push(this.parseDecorator()); } elts.push(this.parseAssignableListItem(allowModifiers, decorators)); } } return elts; } parseBindingRestProperty(prop) { this.next(); prop.argument = this.parseIdentifier(); this.checkCommaAfterRest(125); return this.finishNode(prop, "RestElement"); } parseBindingProperty() { const prop = this.startNode(); const { type, start: startPos, startLoc } = this.state; if (type === 21) { return this.parseBindingRestProperty(prop); } else if (type === 134) { this.expectPlugin("destructuringPrivate", startLoc); this.classScope.usePrivateName(this.state.value, startLoc); prop.key = this.parsePrivateName(); } else { this.parsePropertyName(prop); } prop.method = false; this.parseObjPropValue(prop, startPos, startLoc, false, false, true, false); return prop; } parseAssignableListItem(allowModifiers, decorators) { const left = this.parseMaybeDefault(); this.parseAssignableListItemTypes(left); const elt = this.parseMaybeDefault(left.start, left.loc.start, left); if (decorators.length) { left.decorators = decorators; } return elt; } parseAssignableListItemTypes(param) { return param; } parseMaybeDefault(startPos, startLoc, left) { var _startLoc, _startPos, _left; startLoc = (_startLoc = startLoc) != null ? _startLoc : this.state.startLoc; startPos = (_startPos = startPos) != null ? _startPos : this.state.start; left = (_left = left) != null ? _left : this.parseBindingAtom(); if (!this.eat(29)) return left; const node = this.startNodeAt(startPos, startLoc); node.left = left; node.right = this.parseMaybeAssignAllowIn(); return this.finishNode(node, "AssignmentPattern"); } checkLVal(expr, contextDescription, bindingType = BIND_NONE, checkClashes, disallowLetBinding, strictModeChanged = false) { switch (expr.type) { case "Identifier": { const { name } = expr; if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(name, this.inModule) : isStrictBindOnlyReservedWord(name))) { this.raise(bindingType === BIND_NONE ? ErrorMessages.StrictEvalArguments : ErrorMessages.StrictEvalArgumentsBinding, { node: expr }, name); } if (checkClashes) { if (checkClashes.has(name)) { this.raise(ErrorMessages.ParamDupe, { node: expr }); } else { checkClashes.add(name); } } if (disallowLetBinding && name === "let") { this.raise(ErrorMessages.LetInLexicalBinding, { node: expr }); } if (!(bindingType & BIND_NONE)) { this.scope.declareName(name, bindingType, expr.loc.start); } break; } case "MemberExpression": if (bindingType !== BIND_NONE) { this.raise(ErrorMessages.InvalidPropertyBindingPattern, { node: expr }); } break; case "ObjectPattern": for (let prop of expr.properties) { if (this.isObjectProperty(prop)) prop = prop.value; else if (this.isObjectMethod(prop)) continue; this.checkLVal(prop, "object destructuring pattern", bindingType, checkClashes, disallowLetBinding); } break; case "ArrayPattern": for (const elem of expr.elements) { if (elem) { this.checkLVal(elem, "array destructuring pattern", bindingType, checkClashes, disallowLetBinding); } } break; case "AssignmentPattern": this.checkLVal(expr.left, "assignment pattern", bindingType, checkClashes); break; case "RestElement": this.checkLVal(expr.argument, "rest element", bindingType, checkClashes); break; case "ParenthesizedExpression": this.checkLVal(expr.expression, "parenthesized expression", bindingType, checkClashes); break; default: { this.raise(bindingType === BIND_NONE ? ErrorMessages.InvalidLhs : ErrorMessages.InvalidLhsBinding, { node: expr }, contextDescription); } } } checkToRestConversion(node) { if (node.argument.type !== "Identifier" && node.argument.type !== "MemberExpression") { this.raise(ErrorMessages.InvalidRestAssignmentPattern, { node: node.argument }); } } checkCommaAfterRest(close) { if (!this.match(12)) { return false; } this.raise(this.lookaheadCharCode() === close ? ErrorMessages.RestTrailingComma : ErrorMessages.ElementAfterRest, { at: this.state.startLoc }); return true; } }; var invalidHackPipeBodies = /* @__PURE__ */ new Map([["ArrowFunctionExpression", "arrow function"], ["AssignmentExpression", "assignment"], ["ConditionalExpression", "conditional"], ["YieldExpression", "yield"]]); var ExpressionParser = class extends LValParser { checkProto(prop, isRecord, protoRef, refExpressionErrors) { if (prop.type === "SpreadElement" || this.isObjectMethod(prop) || prop.computed || prop.shorthand) { return; } const key = prop.key; const name = key.type === "Identifier" ? key.name : key.value; if (name === "__proto__") { if (isRecord) { this.raise(ErrorMessages.RecordNoProto, { node: key }); return; } if (protoRef.used) { if (refExpressionErrors) { if (refExpressionErrors.doubleProtoLoc === null) { refExpressionErrors.doubleProtoLoc = key.loc.start; } } else { this.raise(ErrorMessages.DuplicateProto, { node: key }); } } protoRef.used = true; } } shouldExitDescending(expr, potentialArrowAt) { return expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt; } getExpression() { this.enterInitialScopes(); this.nextToken(); const expr = this.parseExpression(); if (!this.match(135)) { this.unexpected(); } this.finalizeRemainingComments(); expr.comments = this.state.comments; expr.errors = this.state.errors; if (this.options.tokens) { expr.tokens = this.tokens; } return expr; } parseExpression(disallowIn, refExpressionErrors) { if (disallowIn) { return this.disallowInAnd(() => this.parseExpressionBase(refExpressionErrors)); } return this.allowInAnd(() => this.parseExpressionBase(refExpressionErrors)); } parseExpressionBase(refExpressionErrors) { const startPos = this.state.start; const startLoc = this.state.startLoc; const expr = this.parseMaybeAssign(refExpressionErrors); if (this.match(12)) { const node = this.startNodeAt(startPos, startLoc); node.expressions = [expr]; while (this.eat(12)) { node.expressions.push(this.parseMaybeAssign(refExpressionErrors)); } this.toReferencedList(node.expressions); return this.finishNode(node, "SequenceExpression"); } return expr; } parseMaybeAssignDisallowIn(refExpressionErrors, afterLeftParse) { return this.disallowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse)); } parseMaybeAssignAllowIn(refExpressionErrors, afterLeftParse) { return this.allowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse)); } setOptionalParametersError(refExpressionErrors, resultError) { var _resultError$loc; refExpressionErrors.optionalParametersLoc = (_resultError$loc = resultError == null ? void 0 : resultError.loc) != null ? _resultError$loc : this.state.startLoc; } parseMaybeAssign(refExpressionErrors, afterLeftParse) { const startPos = this.state.start; const startLoc = this.state.startLoc; if (this.isContextual(105)) { if (this.prodParam.hasYield) { let left2 = this.parseYield(); if (afterLeftParse) { left2 = afterLeftParse.call(this, left2, startPos, startLoc); } return left2; } } let ownExpressionErrors; if (refExpressionErrors) { ownExpressionErrors = false; } else { refExpressionErrors = new ExpressionErrors(); ownExpressionErrors = true; } const { type } = this.state; if (type === 10 || tokenIsIdentifier(type)) { this.state.potentialArrowAt = this.state.start; } let left = this.parseMaybeConditional(refExpressionErrors); if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); } if (tokenIsAssignment(this.state.type)) { const node = this.startNodeAt(startPos, startLoc); const operator = this.state.value; node.operator = operator; if (this.match(29)) { node.left = this.toAssignable(left, true); if (refExpressionErrors.doubleProtoLoc != null && refExpressionErrors.doubleProtoLoc.index >= startPos) { refExpressionErrors.doubleProtoLoc = null; } if (refExpressionErrors.shorthandAssignLoc != null && refExpressionErrors.shorthandAssignLoc.index >= startPos) { refExpressionErrors.shorthandAssignLoc = null; } if (refExpressionErrors.privateKeyLoc != null && refExpressionErrors.privateKeyLoc.index >= startPos) { this.checkDestructuringPrivate(refExpressionErrors); refExpressionErrors.privateKeyLoc = null; } } else { node.left = left; } this.checkLVal(left, "assignment expression"); this.next(); node.right = this.parseMaybeAssign(); return this.finishNode(node, "AssignmentExpression"); } else if (ownExpressionErrors) { this.checkExpressionErrors(refExpressionErrors, true); } return left; } parseMaybeConditional(refExpressionErrors) { const startPos = this.state.start; const startLoc = this.state.startLoc; const potentialArrowAt = this.state.potentialArrowAt; const expr = this.parseExprOps(refExpressionErrors); if (this.shouldExitDescending(expr, potentialArrowAt)) { return expr; } return this.parseConditional(expr, startPos, startLoc, refExpressionErrors); } parseConditional(expr, startPos, startLoc, refExpressionErrors) { if (this.eat(17)) { const node = this.startNodeAt(startPos, startLoc); node.test = expr; node.consequent = this.parseMaybeAssignAllowIn(); this.expect(14); node.alternate = this.parseMaybeAssign(); return this.finishNode(node, "ConditionalExpression"); } return expr; } parseMaybeUnaryOrPrivate(refExpressionErrors) { return this.match(134) ? this.parsePrivateName() : this.parseMaybeUnary(refExpressionErrors); } parseExprOps(refExpressionErrors) { const startPos = this.state.start; const startLoc = this.state.startLoc; const potentialArrowAt = this.state.potentialArrowAt; const expr = this.parseMaybeUnaryOrPrivate(refExpressionErrors); if (this.shouldExitDescending(expr, potentialArrowAt)) { return expr; } return this.parseExprOp(expr, startPos, startLoc, -1); } parseExprOp(left, leftStartPos, leftStartLoc, minPrec) { if (this.isPrivateName(left)) { const value = this.getPrivateNameSV(left); if (minPrec >= tokenOperatorPrecedence(58) || !this.prodParam.hasIn || !this.match(58)) { this.raise(ErrorMessages.PrivateInExpectedIn, { node: left }, value); } this.classScope.usePrivateName(value, left.loc.start); } const op = this.state.type; if (tokenIsOperator(op) && (this.prodParam.hasIn || !this.match(58))) { let prec = tokenOperatorPrecedence(op); if (prec > minPrec) { if (op === 39) { this.expectPlugin("pipelineOperator"); if (this.state.inFSharpPipelineDirectBody) { return left; } this.checkPipelineAtInfixOperator(left, leftStartLoc); } const node = this.startNodeAt(leftStartPos, leftStartLoc); node.left = left; node.operator = this.state.value; const logical = op === 41 || op === 42; const coalesce = op === 40; if (coalesce) { prec = tokenOperatorPrecedence(42); } this.next(); if (op === 39 && this.hasPlugin(["pipelineOperator", { proposal: "minimal" }])) { if (this.state.type === 96 && this.prodParam.hasAwait) { throw this.raise(ErrorMessages.UnexpectedAwaitAfterPipelineBody, { at: this.state.startLoc }); } } node.right = this.parseExprOpRightExpr(op, prec); this.finishNode(node, logical || coalesce ? "LogicalExpression" : "BinaryExpression"); const nextOp = this.state.type; if (coalesce && (nextOp === 41 || nextOp === 42) || logical && nextOp === 40) { throw this.raise(ErrorMessages.MixingCoalesceWithLogical, { at: this.state.startLoc }); } return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec); } } return left; } parseExprOpRightExpr(op, prec) { const startPos = this.state.start; const startLoc = this.state.startLoc; switch (op) { case 39: switch (this.getPluginOption("pipelineOperator", "proposal")) { case "hack": return this.withTopicBindingContext(() => { return this.parseHackPipeBody(); }); case "smart": return this.withTopicBindingContext(() => { if (this.prodParam.hasYield && this.isContextual(105)) { throw this.raise(ErrorMessages.PipeBodyIsTighter, { at: this.state.startLoc }, this.state.value); } return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(op, prec), startPos, startLoc); }); case "fsharp": return this.withSoloAwaitPermittingContext(() => { return this.parseFSharpPipelineBody(prec); }); } default: return this.parseExprOpBaseRightExpr(op, prec); } } parseExprOpBaseRightExpr(op, prec) { const startPos = this.state.start; const startLoc = this.state.startLoc; return this.parseExprOp(this.parseMaybeUnaryOrPrivate(), startPos, startLoc, tokenIsRightAssociative(op) ? prec - 1 : prec); } parseHackPipeBody() { var _body$extra; const { startLoc } = this.state; const body = this.parseMaybeAssign(); if (invalidHackPipeBodies.has(body.type) && !((_body$extra = body.extra) != null && _body$extra.parenthesized)) { this.raise(ErrorMessages.PipeUnparenthesizedBody, { at: startLoc }, invalidHackPipeBodies.get(body.type)); } if (!this.topicReferenceWasUsedInCurrentContext()) { this.raise(ErrorMessages.PipeTopicUnused, { at: startLoc }); } return body; } checkExponentialAfterUnary(node) { if (this.match(57)) { this.raise(ErrorMessages.UnexpectedTokenUnaryExponentiation, { node: node.argument }); } } parseMaybeUnary(refExpressionErrors, sawUnary) { const startPos = this.state.start; const startLoc = this.state.startLoc; const isAwait = this.isContextual(96); if (isAwait && this.isAwaitAllowed()) { this.next(); const expr2 = this.parseAwait(startPos, startLoc); if (!sawUnary) this.checkExponentialAfterUnary(expr2); return expr2; } const update = this.match(34); const node = this.startNode(); if (tokenIsPrefix(this.state.type)) { node.operator = this.state.value; node.prefix = true; if (this.match(72)) { this.expectPlugin("throwExpressions"); } const isDelete = this.match(89); this.next(); node.argument = this.parseMaybeUnary(null, true); this.checkExpressionErrors(refExpressionErrors, true); if (this.state.strict && isDelete) { const arg = node.argument; if (arg.type === "Identifier") { this.raise(ErrorMessages.StrictDelete, { node }); } else if (this.hasPropertyAsPrivateName(arg)) { this.raise(ErrorMessages.DeletePrivateField, { node }); } } if (!update) { if (!sawUnary) this.checkExponentialAfterUnary(node); return this.finishNode(node, "UnaryExpression"); } } const expr = this.parseUpdate(node, update, refExpressionErrors); if (isAwait) { const { type } = this.state; const startsExpr2 = this.hasPlugin("v8intrinsic") ? tokenCanStartExpression(type) : tokenCanStartExpression(type) && !this.match(54); if (startsExpr2 && !this.isAmbiguousAwait()) { this.raiseOverwrite(startLoc, ErrorMessages.AwaitNotInAsyncContext); return this.parseAwait(startPos, startLoc); } } return expr; } parseUpdate(node, update, refExpressionErrors) { if (update) { this.checkLVal(node.argument, "prefix operation"); return this.finishNode(node, "UpdateExpression"); } const startPos = this.state.start; const startLoc = this.state.startLoc; let expr = this.parseExprSubscripts(refExpressionErrors); if (this.checkExpressionErrors(refExpressionErrors, false)) return expr; while (tokenIsPostfix(this.state.type) && !this.canInsertSemicolon()) { const node2 = this.startNodeAt(startPos, startLoc); node2.operator = this.state.value; node2.prefix = false; node2.argument = expr; this.checkLVal(expr, "postfix operation"); this.next(); expr = this.finishNode(node2, "UpdateExpression"); } return expr; } parseExprSubscripts(refExpressionErrors) { const startPos = this.state.start; const startLoc = this.state.startLoc; const potentialArrowAt = this.state.potentialArrowAt; const expr = this.parseExprAtom(refExpressionErrors); if (this.shouldExitDescending(expr, potentialArrowAt)) { return expr; } return this.parseSubscripts(expr, startPos, startLoc); } parseSubscripts(base, startPos, startLoc, noCalls) { const state = { optionalChainMember: false, maybeAsyncArrow: this.atPossibleAsyncArrow(base), stop: false }; do { base = this.parseSubscript(base, startPos, startLoc, noCalls, state); state.maybeAsyncArrow = false; } while (!state.stop); return base; } parseSubscript(base, startPos, startLoc, noCalls, state) { const { type } = this.state; if (!noCalls && type === 15) { return this.parseBind(base, startPos, startLoc, noCalls, state); } else if (tokenIsTemplate(type)) { return this.parseTaggedTemplateExpression(base, startPos, startLoc, state); } let optional = false; if (type === 18) { if (noCalls && this.lookaheadCharCode() === 40) { state.stop = true; return base; } state.optionalChainMember = optional = true; this.next(); } if (!noCalls && this.match(10)) { return this.parseCoverCallAndAsyncArrowHead(base, startPos, startLoc, state, optional); } else { const computed = this.eat(0); if (computed || optional || this.eat(16)) { return this.parseMember(base, startPos, startLoc, state, computed, optional); } else { state.stop = true; return base; } } } parseMember(base, startPos, startLoc, state, computed, optional) { const node = this.startNodeAt(startPos, startLoc); node.object = base; node.computed = computed; if (computed) { node.property = this.parseExpression(); this.expect(3); } else if (this.match(134)) { if (base.type === "Super") { this.raise(ErrorMessages.SuperPrivateField, { at: startLoc }); } this.classScope.usePrivateName(this.state.value, this.state.startLoc); node.property = this.parsePrivateName(); } else { node.property = this.parseIdentifier(true); } if (state.optionalChainMember) { node.optional = optional; return this.finishNode(node, "OptionalMemberExpression"); } else { return this.finishNode(node, "MemberExpression"); } } parseBind(base, startPos, startLoc, noCalls, state) { const node = this.startNodeAt(startPos, startLoc); node.object = base; this.next(); node.callee = this.parseNoCallExpr(); state.stop = true; return this.parseSubscripts(this.finishNode(node, "BindExpression"), startPos, startLoc, noCalls); } parseCoverCallAndAsyncArrowHead(base, startPos, startLoc, state, optional) { const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; let refExpressionErrors = null; this.state.maybeInArrowParameters = true; this.next(); let node = this.startNodeAt(startPos, startLoc); node.callee = base; const { maybeAsyncArrow, optionalChainMember } = state; if (maybeAsyncArrow) { this.expressionScope.enter(newAsyncArrowScope()); refExpressionErrors = new ExpressionErrors(); } if (optionalChainMember) { node.optional = optional; } if (optional) { node.arguments = this.parseCallExpressionArguments(11); } else { node.arguments = this.parseCallExpressionArguments(11, base.type === "Import", base.type !== "Super", node, refExpressionErrors); } this.finishCallExpression(node, optionalChainMember); if (maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) { state.stop = true; this.checkDestructuringPrivate(refExpressionErrors); this.expressionScope.validateAsPattern(); this.expressionScope.exit(); node = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), node); } else { if (maybeAsyncArrow) { this.checkExpressionErrors(refExpressionErrors, true); this.expressionScope.exit(); } this.toReferencedArguments(node); } this.state.maybeInArrowParameters = oldMaybeInArrowParameters; return node; } toReferencedArguments(node, isParenthesizedExpr) { this.toReferencedListDeep(node.arguments, isParenthesizedExpr); } parseTaggedTemplateExpression(base, startPos, startLoc, state) { const node = this.startNodeAt(startPos, startLoc); node.tag = base; node.quasi = this.parseTemplate(true); if (state.optionalChainMember) { this.raise(ErrorMessages.OptionalChainingNoTemplate, { at: startLoc }); } return this.finishNode(node, "TaggedTemplateExpression"); } atPossibleAsyncArrow(base) { return base.type === "Identifier" && base.name === "async" && this.state.lastTokEndLoc.index === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && base.start === this.state.potentialArrowAt; } finishCallExpression(node, optional) { if (node.callee.type === "Import") { if (node.arguments.length === 2) { { if (!this.hasPlugin("moduleAttributes")) { this.expectPlugin("importAssertions"); } } } if (node.arguments.length === 0 || node.arguments.length > 2) { this.raise(ErrorMessages.ImportCallArity, { node }, this.hasPlugin("importAssertions") || this.hasPlugin("moduleAttributes") ? "one or two arguments" : "one argument"); } else { for (const arg of node.arguments) { if (arg.type === "SpreadElement") { this.raise(ErrorMessages.ImportCallSpreadArgument, { node: arg }); } } } } return this.finishNode(node, optional ? "OptionalCallExpression" : "CallExpression"); } parseCallExpressionArguments(close, dynamicImport, allowPlaceholder, nodeForExtra, refExpressionErrors) { const elts = []; let first = true; const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; this.state.inFSharpPipelineDirectBody = false; while (!this.eat(close)) { if (first) { first = false; } else { this.expect(12); if (this.match(close)) { if (dynamicImport && !this.hasPlugin("importAssertions") && !this.hasPlugin("moduleAttributes")) { this.raise(ErrorMessages.ImportCallArgumentTrailingComma, { at: this.state.lastTokStartLoc }); } if (nodeForExtra) { this.addTrailingCommaExtraToNode(nodeForExtra); } this.next(); break; } } elts.push(this.parseExprListItem(false, refExpressionErrors, allowPlaceholder)); } this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; return elts; } shouldParseAsyncArrow() { return this.match(19) && !this.canInsertSemicolon(); } parseAsyncArrowFromCallExpression(node, call) { var _call$extra; this.resetPreviousNodeTrailingComments(call); this.expect(19); this.parseArrowExpression(node, call.arguments, true, (_call$extra = call.extra) == null ? void 0 : _call$extra.trailingCommaLoc); if (call.innerComments) { setInnerComments(node, call.innerComments); } if (call.callee.trailingComments) { setInnerComments(node, call.callee.trailingComments); } return node; } parseNoCallExpr() { const startPos = this.state.start; const startLoc = this.state.startLoc; return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); } parseExprAtom(refExpressionErrors) { let node; const { type } = this.state; switch (type) { case 79: return this.parseSuper(); case 83: node = this.startNode(); this.next(); if (this.match(16)) { return this.parseImportMetaProperty(node); } if (!this.match(10)) { this.raise(ErrorMessages.UnsupportedImport, { at: this.state.lastTokStartLoc }); } return this.finishNode(node, "Import"); case 78: node = this.startNode(); this.next(); return this.finishNode(node, "ThisExpression"); case 90: { return this.parseDo(this.startNode(), false); } case 56: case 31: { this.readRegexp(); return this.parseRegExpLiteral(this.state.value); } case 130: return this.parseNumericLiteral(this.state.value); case 131: return this.parseBigIntLiteral(this.state.value); case 132: return this.parseDecimalLiteral(this.state.value); case 129: return this.parseStringLiteral(this.state.value); case 84: return this.parseNullLiteral(); case 85: return this.parseBooleanLiteral(true); case 86: return this.parseBooleanLiteral(false); case 10: { const canBeArrow = this.state.potentialArrowAt === this.state.start; return this.parseParenAndDistinguishExpression(canBeArrow); } case 2: case 1: { return this.parseArrayLike(this.state.type === 2 ? 4 : 3, false, true); } case 0: { return this.parseArrayLike(3, true, false, refExpressionErrors); } case 6: case 7: { return this.parseObjectLike(this.state.type === 6 ? 9 : 8, false, true); } case 5: { return this.parseObjectLike(8, false, false, refExpressionErrors); } case 68: return this.parseFunctionOrFunctionSent(); case 26: this.parseDecorators(); case 80: node = this.startNode(); this.takeDecorators(node); return this.parseClass(node, false); case 77: return this.parseNewOrNewTarget(); case 25: case 24: return this.parseTemplate(false); case 15: { node = this.startNode(); this.next(); node.object = null; const callee = node.callee = this.parseNoCallExpr(); if (callee.type === "MemberExpression") { return this.finishNode(node, "BindExpression"); } else { throw this.raise(ErrorMessages.UnsupportedBind, { node: callee }); } } case 134: { this.raise(ErrorMessages.PrivateInExpectedIn, { at: this.state.startLoc }, this.state.value); return 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: { const pipeProposal = this.getPluginOption("pipelineOperator", "proposal"); if (pipeProposal) { return this.parseTopicReference(pipeProposal); } else { throw this.unexpected(); } } case 47: { const lookaheadCh = this.input.codePointAt(this.nextTokenStart()); if (isIdentifierStart(lookaheadCh) || lookaheadCh === 62) { this.expectOnePlugin(["jsx", "flow", "typescript"]); break; } else { throw this.unexpected(); } } default: if (tokenIsIdentifier(type)) { if (this.isContextual(123) && this.lookaheadCharCode() === 123 && !this.hasFollowingLineBreak()) { return this.parseModuleExpression(); } const canBeArrow = this.state.potentialArrowAt === this.state.start; const containsEsc = this.state.containsEsc; const id = this.parseIdentifier(); if (!containsEsc && id.name === "async" && !this.canInsertSemicolon()) { const { type: type2 } = this.state; if (type2 === 68) { this.resetPreviousNodeTrailingComments(id); this.next(); return this.parseFunction(this.startNodeAtNode(id), void 0, true); } else if (tokenIsIdentifier(type2)) { if (this.lookaheadCharCode() === 61) { return this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(id)); } else { return id; } } else if (type2 === 90) { this.resetPreviousNodeTrailingComments(id); return this.parseDo(this.startNodeAtNode(id), true); } } if (canBeArrow && this.match(19) && !this.canInsertSemicolon()) { this.next(); return this.parseArrowExpression(this.startNodeAtNode(id), [id], false); } return id; } else { throw this.unexpected(); } } } parseTopicReferenceThenEqualsSign(topicTokenType, topicTokenValue) { const pipeProposal = this.getPluginOption("pipelineOperator", "proposal"); if (pipeProposal) { this.state.type = topicTokenType; this.state.value = topicTokenValue; this.state.pos--; this.state.end--; this.state.endLoc = createPositionWithColumnOffset(this.state.endLoc, -1); return this.parseTopicReference(pipeProposal); } else { throw this.unexpected(); } } parseTopicReference(pipeProposal) { const node = this.startNode(); const startLoc = this.state.startLoc; const tokenType = this.state.type; this.next(); return this.finishTopicReference(node, startLoc, pipeProposal, tokenType); } finishTopicReference(node, startLoc, pipeProposal, tokenType) { if (this.testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType)) { const nodeType = pipeProposal === "smart" ? "PipelinePrimaryTopicReference" : "TopicReference"; if (!this.topicReferenceIsAllowedInCurrentContext()) { this.raise(pipeProposal === "smart" ? ErrorMessages.PrimaryTopicNotAllowed : ErrorMessages.PipeTopicUnbound, { at: startLoc }); } this.registerTopicReference(); return this.finishNode(node, nodeType); } else { throw this.raise(ErrorMessages.PipeTopicUnconfiguredToken, { at: startLoc }, tokenLabelName(tokenType)); } } testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType) { switch (pipeProposal) { case "hack": { return this.hasPlugin(["pipelineOperator", { topicToken: tokenLabelName(tokenType) }]); } case "smart": return tokenType === 27; default: throw this.raise(ErrorMessages.PipeTopicRequiresHackPipes, { at: startLoc }); } } parseAsyncArrowUnaryFunction(node) { this.prodParam.enter(functionFlags(true, this.prodParam.hasYield)); const params = [this.parseIdentifier()]; this.prodParam.exit(); if (this.hasPrecedingLineBreak()) { this.raise(ErrorMessages.LineTerminatorBeforeArrow, { at: this.state.curPosition() }); } this.expect(19); this.parseArrowExpression(node, params, true); return node; } parseDo(node, isAsync) { this.expectPlugin("doExpressions"); if (isAsync) { this.expectPlugin("asyncDoExpressions"); } node.async = isAsync; this.next(); const oldLabels = this.state.labels; this.state.labels = []; if (isAsync) { this.prodParam.enter(PARAM_AWAIT); node.body = this.parseBlock(); this.prodParam.exit(); } else { node.body = this.parseBlock(); } this.state.labels = oldLabels; return this.finishNode(node, "DoExpression"); } parseSuper() { const node = this.startNode(); this.next(); if (this.match(10) && !this.scope.allowDirectSuper && !this.options.allowSuperOutsideMethod) { this.raise(ErrorMessages.SuperNotAllowed, { node }); } else if (!this.scope.allowSuper && !this.options.allowSuperOutsideMethod) { this.raise(ErrorMessages.UnexpectedSuper, { node }); } if (!this.match(10) && !this.match(0) && !this.match(16)) { this.raise(ErrorMessages.UnsupportedSuper, { node }); } return this.finishNode(node, "Super"); } parsePrivateName() { const node = this.startNode(); const id = this.startNodeAt(this.state.start + 1, new Position(this.state.curLine, this.state.start + 1 - this.state.lineStart, this.state.start + 1)); const name = this.state.value; this.next(); node.id = this.createIdentifier(id, name); return this.finishNode(node, "PrivateName"); } parseFunctionOrFunctionSent() { const node = this.startNode(); this.next(); if (this.prodParam.hasYield && this.match(16)) { const meta = this.createIdentifier(this.startNodeAtNode(node), "function"); this.next(); if (this.match(102)) { this.expectPlugin("functionSent"); } else if (!this.hasPlugin("functionSent")) { this.unexpected(); } return this.parseMetaProperty(node, meta, "sent"); } return this.parseFunction(node); } parseMetaProperty(node, meta, propertyName) { node.meta = meta; const containsEsc = this.state.containsEsc; node.property = this.parseIdentifier(true); if (node.property.name !== propertyName || containsEsc) { this.raise(ErrorMessages.UnsupportedMetaProperty, { node: node.property }, meta.name, propertyName); } return this.finishNode(node, "MetaProperty"); } parseImportMetaProperty(node) { const id = this.createIdentifier(this.startNodeAtNode(node), "import"); this.next(); if (this.isContextual(100)) { if (!this.inModule) { this.raise(SourceTypeModuleErrorMessages.ImportMetaOutsideModule, { node: id }); } this.sawUnambiguousESM = true; } return this.parseMetaProperty(node, id, "meta"); } parseLiteralAtNode(value, type, node) { this.addExtra(node, "rawValue", value); this.addExtra(node, "raw", this.input.slice(node.start, this.state.end)); node.value = value; this.next(); return this.finishNode(node, type); } parseLiteral(value, type) { const node = this.startNode(); return this.parseLiteralAtNode(value, type, node); } parseStringLiteral(value) { return this.parseLiteral(value, "StringLiteral"); } parseNumericLiteral(value) { return this.parseLiteral(value, "NumericLiteral"); } parseBigIntLiteral(value) { return this.parseLiteral(value, "BigIntLiteral"); } parseDecimalLiteral(value) { return this.parseLiteral(value, "DecimalLiteral"); } parseRegExpLiteral(value) { const node = this.parseLiteral(value.value, "RegExpLiteral"); node.pattern = value.pattern; node.flags = value.flags; return node; } parseBooleanLiteral(value) { const node = this.startNode(); node.value = value; this.next(); return this.finishNode(node, "BooleanLiteral"); } parseNullLiteral() { const node = this.startNode(); this.next(); return this.finishNode(node, "NullLiteral"); } parseParenAndDistinguishExpression(canBeArrow) { const startPos = this.state.start; const startLoc = this.state.startLoc; let val; this.next(); this.expressionScope.enter(newArrowHeadScope()); const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; this.state.maybeInArrowParameters = true; this.state.inFSharpPipelineDirectBody = false; const innerStartPos = this.state.start; const innerStartLoc = this.state.startLoc; const exprList = []; const refExpressionErrors = new ExpressionErrors(); let first = true; let spreadStartLoc; let optionalCommaStartLoc; while (!this.match(11)) { if (first) { first = false; } else { this.expect(12, refExpressionErrors.optionalParametersLoc === null ? null : refExpressionErrors.optionalParametersLoc); if (this.match(11)) { optionalCommaStartLoc = this.state.startLoc; break; } } if (this.match(21)) { const spreadNodeStartPos = this.state.start; const spreadNodeStartLoc = this.state.startLoc; spreadStartLoc = this.state.startLoc; exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartPos, spreadNodeStartLoc)); if (!this.checkCommaAfterRest(41)) { break; } } else { exprList.push(this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem)); } } const innerEndLoc = this.state.lastTokEndLoc; this.expect(11); this.state.maybeInArrowParameters = oldMaybeInArrowParameters; this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; let arrowNode = this.startNodeAt(startPos, startLoc); if (canBeArrow && this.shouldParseArrow(exprList) && (arrowNode = this.parseArrow(arrowNode))) { this.checkDestructuringPrivate(refExpressionErrors); this.expressionScope.validateAsPattern(); this.expressionScope.exit(); this.parseArrowExpression(arrowNode, exprList, false); return arrowNode; } this.expressionScope.exit(); if (!exprList.length) { this.unexpected(this.state.lastTokStartLoc); } if (optionalCommaStartLoc) this.unexpected(optionalCommaStartLoc); if (spreadStartLoc) this.unexpected(spreadStartLoc); this.checkExpressionErrors(refExpressionErrors, true); this.toReferencedListDeep(exprList, true); if (exprList.length > 1) { val = this.startNodeAt(innerStartPos, innerStartLoc); val.expressions = exprList; this.finishNode(val, "SequenceExpression"); this.resetEndLocation(val, innerEndLoc); } else { val = exprList[0]; } if (!this.options.createParenthesizedExpressions) { this.addExtra(val, "parenthesized", true); this.addExtra(val, "parenStart", startPos); this.takeSurroundingComments(val, startPos, this.state.lastTokEndLoc.index); return val; } const parenExpression = this.startNodeAt(startPos, startLoc); parenExpression.expression = val; this.finishNode(parenExpression, "ParenthesizedExpression"); return parenExpression; } shouldParseArrow(params) { return !this.canInsertSemicolon(); } parseArrow(node) { if (this.eat(19)) { return node; } } parseParenItem(node, startPos, startLoc) { return node; } parseNewOrNewTarget() { const node = this.startNode(); this.next(); if (this.match(16)) { const meta = this.createIdentifier(this.startNodeAtNode(node), "new"); this.next(); const metaProp = this.parseMetaProperty(node, meta, "target"); if (!this.scope.inNonArrowFunction && !this.scope.inClass) { this.raise(ErrorMessages.UnexpectedNewTarget, { node: metaProp }); } return metaProp; } return this.parseNew(node); } parseNew(node) { node.callee = this.parseNoCallExpr(); if (node.callee.type === "Import") { this.raise(ErrorMessages.ImportCallNotNewExpression, { node: node.callee }); } else if (this.isOptionalChain(node.callee)) { this.raise(ErrorMessages.OptionalChainingNoNew, { at: this.state.lastTokEndLoc }); } else if (this.eat(18)) { this.raise(ErrorMessages.OptionalChainingNoNew, { at: this.state.startLoc }); } this.parseNewArguments(node); return this.finishNode(node, "NewExpression"); } parseNewArguments(node) { if (this.eat(10)) { const args = this.parseExprList(11); this.toReferencedList(args); node.arguments = args; } else { node.arguments = []; } } parseTemplateElement(isTagged) { const { start, startLoc, end, value } = this.state; const elemStart = start + 1; const elem = this.startNodeAt(elemStart, createPositionWithColumnOffset(startLoc, 1)); if (value === null) { if (!isTagged) { this.raise(ErrorMessages.InvalidEscapeSequenceTemplate, { at: createPositionWithColumnOffset(startLoc, 2) }); } } const isTail = this.match(24); const endOffset = isTail ? -1 : -2; const elemEnd = end + endOffset; elem.value = { raw: this.input.slice(elemStart, elemEnd).replace(/\r\n?/g, "\n"), cooked: value === null ? null : value.slice(1, endOffset) }; elem.tail = isTail; this.next(); this.finishNode(elem, "TemplateElement"); this.resetEndLocation(elem, createPositionWithColumnOffset(this.state.lastTokEndLoc, endOffset)); return elem; } parseTemplate(isTagged) { const node = this.startNode(); node.expressions = []; let curElt = this.parseTemplateElement(isTagged); node.quasis = [curElt]; while (!curElt.tail) { node.expressions.push(this.parseTemplateSubstitution()); this.readTemplateContinuation(); node.quasis.push(curElt = this.parseTemplateElement(isTagged)); } return this.finishNode(node, "TemplateLiteral"); } parseTemplateSubstitution() { return this.parseExpression(); } parseObjectLike(close, isPattern, isRecord, refExpressionErrors) { if (isRecord) { this.expectPlugin("recordAndTuple"); } const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; this.state.inFSharpPipelineDirectBody = false; const propHash = /* @__PURE__ */ Object.create(null); let first = true; const node = this.startNode(); node.properties = []; this.next(); while (!this.match(close)) { if (first) { first = false; } else { this.expect(12); if (this.match(close)) { this.addTrailingCommaExtraToNode(node); break; } } let prop; if (isPattern) { prop = this.parseBindingProperty(); } else { prop = this.parsePropertyDefinition(refExpressionErrors); this.checkProto(prop, isRecord, propHash, refExpressionErrors); } if (isRecord && !this.isObjectProperty(prop) && prop.type !== "SpreadElement") { this.raise(ErrorMessages.InvalidRecordProperty, { node: prop }); } if (prop.shorthand) { this.addExtra(prop, "shorthand", true); } node.properties.push(prop); } this.next(); this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; let type = "ObjectExpression"; if (isPattern) { type = "ObjectPattern"; } else if (isRecord) { type = "RecordExpression"; } return this.finishNode(node, type); } addTrailingCommaExtraToNode(node) { this.addExtra(node, "trailingComma", this.state.lastTokStart); this.addExtra(node, "trailingCommaLoc", this.state.lastTokStartLoc, false); } maybeAsyncOrAccessorProp(prop) { return !prop.computed && prop.key.type === "Identifier" && (this.isLiteralPropertyName() || this.match(0) || this.match(55)); } parsePropertyDefinition(refExpressionErrors) { let decorators = []; if (this.match(26)) { if (this.hasPlugin("decorators")) { this.raise(ErrorMessages.UnsupportedPropertyDecorator, { at: this.state.startLoc }); } while (this.match(26)) { decorators.push(this.parseDecorator()); } } const prop = this.startNode(); let isAsync = false; let isAccessor = false; let startPos; let startLoc; if (this.match(21)) { if (decorators.length) this.unexpected(); return this.parseSpread(); } if (decorators.length) { prop.decorators = decorators; decorators = []; } prop.method = false; if (refExpressionErrors) { startPos = this.state.start; startLoc = this.state.startLoc; } let isGenerator = this.eat(55); this.parsePropertyNamePrefixOperator(prop); const containsEsc = this.state.containsEsc; const key = this.parsePropertyName(prop, refExpressionErrors); if (!isGenerator && !containsEsc && this.maybeAsyncOrAccessorProp(prop)) { const keyName = key.name; if (keyName === "async" && !this.hasPrecedingLineBreak()) { isAsync = true; this.resetPreviousNodeTrailingComments(key); isGenerator = this.eat(55); this.parsePropertyName(prop); } if (keyName === "get" || keyName === "set") { isAccessor = true; this.resetPreviousNodeTrailingComments(key); prop.kind = keyName; if (this.match(55)) { isGenerator = true; this.raise(ErrorMessages.AccessorIsGenerator, { at: this.state.curPosition() }, keyName); this.next(); } this.parsePropertyName(prop); } } this.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, false, isAccessor, refExpressionErrors); return prop; } getGetterSetterExpectedParamCount(method) { return method.kind === "get" ? 0 : 1; } getObjectOrClassMethodParams(method) { return method.params; } checkGetterSetterParams(method) { var _params; const paramCount = this.getGetterSetterExpectedParamCount(method); const params = this.getObjectOrClassMethodParams(method); if (params.length !== paramCount) { this.raise(method.kind === "get" ? ErrorMessages.BadGetterArity : ErrorMessages.BadSetterArity, { node: method }); } if (method.kind === "set" && ((_params = params[params.length - 1]) == null ? void 0 : _params.type) === "RestElement") { this.raise(ErrorMessages.BadSetterRestParameter, { node: method }); } } parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) { if (isAccessor) { this.parseMethod(prop, isGenerator, false, false, false, "ObjectMethod"); this.checkGetterSetterParams(prop); return prop; } if (isAsync || isGenerator || this.match(10)) { if (isPattern) this.unexpected(); prop.kind = "method"; prop.method = true; return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod"); } } parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors) { prop.shorthand = false; if (this.eat(14)) { prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssignAllowIn(refExpressionErrors); return this.finishNode(prop, "ObjectProperty"); } if (!prop.computed && prop.key.type === "Identifier") { this.checkReservedWord(prop.key.name, prop.key.loc.start, true, false); if (isPattern) { prop.value = this.parseMaybeDefault(startPos, startLoc, cloneIdentifier(prop.key)); } else if (this.match(29)) { const shorthandAssignLoc = this.state.startLoc; if (refExpressionErrors != null) { if (refExpressionErrors.shorthandAssignLoc === null) { refExpressionErrors.shorthandAssignLoc = shorthandAssignLoc; } } else { this.raise(ErrorMessages.InvalidCoverInitializedName, { at: shorthandAssignLoc }); } prop.value = this.parseMaybeDefault(startPos, startLoc, cloneIdentifier(prop.key)); } else { prop.value = cloneIdentifier(prop.key); } prop.shorthand = true; return this.finishNode(prop, "ObjectProperty"); } } parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) { const node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors); if (!node) this.unexpected(); return node; } parsePropertyName(prop, refExpressionErrors) { if (this.eat(0)) { prop.computed = true; prop.key = this.parseMaybeAssignAllowIn(); this.expect(3); } else { const { type, value } = this.state; let key; if (tokenIsKeywordOrIdentifier(type)) { key = this.parseIdentifier(true); } else { switch (type) { case 130: key = this.parseNumericLiteral(value); break; case 129: key = this.parseStringLiteral(value); break; case 131: key = this.parseBigIntLiteral(value); break; case 132: key = this.parseDecimalLiteral(value); break; case 134: { const privateKeyLoc = this.state.startLoc; if (refExpressionErrors != null) { if (refExpressionErrors.privateKeyLoc === null) { refExpressionErrors.privateKeyLoc = privateKeyLoc; } } else { this.raise(ErrorMessages.UnexpectedPrivateField, { at: privateKeyLoc }); } key = this.parsePrivateName(); break; } default: throw this.unexpected(); } } prop.key = key; if (type !== 134) { prop.computed = false; } } return prop.key; } initFunction(node, isAsync) { node.id = null; node.generator = false; node.async = !!isAsync; } parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) { this.initFunction(node, isAsync); node.generator = !!isGenerator; const allowModifiers = isConstructor; this.scope.enter(SCOPE_FUNCTION | SCOPE_SUPER | (inClassScope ? SCOPE_CLASS : 0) | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); this.prodParam.enter(functionFlags(isAsync, node.generator)); this.parseFunctionParams(node, allowModifiers); this.parseFunctionBodyAndFinish(node, type, true); this.prodParam.exit(); this.scope.exit(); return node; } parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) { if (isTuple) { this.expectPlugin("recordAndTuple"); } const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; this.state.inFSharpPipelineDirectBody = false; const node = this.startNode(); this.next(); node.elements = this.parseExprList(close, !isTuple, refExpressionErrors, node); this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; return this.finishNode(node, isTuple ? "TupleExpression" : "ArrayExpression"); } parseArrowExpression(node, params, isAsync, trailingCommaLoc) { this.scope.enter(SCOPE_FUNCTION | SCOPE_ARROW); let flags = functionFlags(isAsync, false); if (!this.match(5) && this.prodParam.hasIn) { flags |= PARAM_IN; } this.prodParam.enter(flags); this.initFunction(node, isAsync); const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; if (params) { this.state.maybeInArrowParameters = true; this.setArrowFunctionParameters(node, params, trailingCommaLoc); } this.state.maybeInArrowParameters = false; this.parseFunctionBody(node, true); this.prodParam.exit(); this.scope.exit(); this.state.maybeInArrowParameters = oldMaybeInArrowParameters; return this.finishNode(node, "ArrowFunctionExpression"); } setArrowFunctionParameters(node, params, trailingCommaLoc) { node.params = this.toAssignableList(params, trailingCommaLoc, false); } parseFunctionBodyAndFinish(node, type, isMethod = false) { this.parseFunctionBody(node, false, isMethod); this.finishNode(node, type); } parseFunctionBody(node, allowExpression, isMethod = false) { const isExpression = allowExpression && !this.match(5); this.expressionScope.enter(newExpressionScope()); if (isExpression) { node.body = this.parseMaybeAssign(); this.checkParams(node, false, allowExpression, false); } else { const oldStrict = this.state.strict; const oldLabels = this.state.labels; this.state.labels = []; this.prodParam.enter(this.prodParam.currentFlags() | PARAM_RETURN); node.body = this.parseBlock(true, false, (hasStrictModeDirective) => { const nonSimple = !this.isSimpleParamList(node.params); if (hasStrictModeDirective && nonSimple) { const errorOrigin = (node.kind === "method" || node.kind === "constructor") && !!node.key ? { at: node.key.loc.end } : { node }; this.raise(ErrorMessages.IllegalLanguageModeDirective, errorOrigin); } const strictModeChanged = !oldStrict && this.state.strict; this.checkParams(node, !this.state.strict && !allowExpression && !isMethod && !nonSimple, allowExpression, strictModeChanged); if (this.state.strict && node.id) { this.checkLVal(node.id, "function name", BIND_OUTSIDE, void 0, void 0, strictModeChanged); } }); this.prodParam.exit(); this.state.labels = oldLabels; } this.expressionScope.exit(); } isSimpleParamList(params) { for (let i = 0, len = params.length; i < len; i++) { if (params[i].type !== "Identifier") return false; } return true; } checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged = true) { const checkClashes = /* @__PURE__ */ new Set(); for (const param of node.params) { this.checkLVal(param, "function parameter list", BIND_VAR, allowDuplicates ? null : checkClashes, void 0, strictModeChanged); } } parseExprList(close, allowEmpty, refExpressionErrors, nodeForExtra) { const elts = []; let first = true; while (!this.eat(close)) { if (first) { first = false; } else { this.expect(12); if (this.match(close)) { if (nodeForExtra) { this.addTrailingCommaExtraToNode(nodeForExtra); } this.next(); break; } } elts.push(this.parseExprListItem(allowEmpty, refExpressionErrors)); } return elts; } parseExprListItem(allowEmpty, refExpressionErrors, allowPlaceholder) { let elt; if (this.match(12)) { if (!allowEmpty) { this.raise(ErrorMessages.UnexpectedToken, { at: this.state.curPosition() }, ","); } elt = null; } else if (this.match(21)) { const spreadNodeStartPos = this.state.start; const spreadNodeStartLoc = this.state.startLoc; elt = this.parseParenItem(this.parseSpread(refExpressionErrors), spreadNodeStartPos, spreadNodeStartLoc); } else if (this.match(17)) { this.expectPlugin("partialApplication"); if (!allowPlaceholder) { this.raise(ErrorMessages.UnexpectedArgumentPlaceholder, { at: this.state.startLoc }); } const node = this.startNode(); this.next(); elt = this.finishNode(node, "ArgumentPlaceholder"); } else { elt = this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem); } return elt; } parseIdentifier(liberal) { const node = this.startNode(); const name = this.parseIdentifierName(node.start, liberal); return this.createIdentifier(node, name); } createIdentifier(node, name) { node.name = name; node.loc.identifierName = name; return this.finishNode(node, "Identifier"); } parseIdentifierName(pos, liberal) { let name; const { startLoc, type } = this.state; if (tokenIsKeywordOrIdentifier(type)) { name = this.state.value; } else { throw this.unexpected(); } const tokenIsKeyword2 = tokenKeywordOrIdentifierIsKeyword(type); if (liberal) { if (tokenIsKeyword2) { this.replaceToken(128); } } else { this.checkReservedWord(name, startLoc, tokenIsKeyword2, false); } this.next(); return name; } checkReservedWord(word, startLoc, checkKeywords, isBinding) { if (word.length > 10) { return; } if (!canBeReservedWord(word)) { return; } if (word === "yield") { if (this.prodParam.hasYield) { this.raise(ErrorMessages.YieldBindingIdentifier, { at: startLoc }); return; } } else if (word === "await") { if (this.prodParam.hasAwait) { this.raise(ErrorMessages.AwaitBindingIdentifier, { at: startLoc }); return; } if (this.scope.inStaticBlock) { this.raise(ErrorMessages.AwaitBindingIdentifierInStaticBlock, { at: startLoc }); return; } this.expressionScope.recordAsyncArrowParametersError(ErrorMessages.AwaitBindingIdentifier, startLoc); } else if (word === "arguments") { if (this.scope.inClassAndNotInNonArrowFunction) { this.raise(ErrorMessages.ArgumentsInClass, { at: startLoc }); return; } } if (checkKeywords && isKeyword(word)) { this.raise(ErrorMessages.UnexpectedKeyword, { at: startLoc }, word); return; } const reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord; if (reservedTest(word, this.inModule)) { this.raise(ErrorMessages.UnexpectedReservedWord, { at: startLoc }, word); } } isAwaitAllowed() { if (this.prodParam.hasAwait) return true; if (this.options.allowAwaitOutsideFunction && !this.scope.inFunction) { return true; } return false; } parseAwait(startPos, startLoc) { const node = this.startNodeAt(startPos, startLoc); this.expressionScope.recordParameterInitializerError(node.loc.start, ErrorMessages.AwaitExpressionFormalParameter); if (this.eat(55)) { this.raise(ErrorMessages.ObsoleteAwaitStar, { node }); } if (!this.scope.inFunction && !this.options.allowAwaitOutsideFunction) { if (this.isAmbiguousAwait()) { this.ambiguousScriptDifferentAst = true; } else { this.sawUnambiguousESM = true; } } if (!this.state.soloAwait) { node.argument = this.parseMaybeUnary(null, true); } return this.finishNode(node, "AwaitExpression"); } isAmbiguousAwait() { if (this.hasPrecedingLineBreak()) return true; const { type } = this.state; return type === 53 || type === 10 || type === 0 || tokenIsTemplate(type) || type === 133 || type === 56 || this.hasPlugin("v8intrinsic") && type === 54; } parseYield() { const node = this.startNode(); this.expressionScope.recordParameterInitializerError(node.loc.start, ErrorMessages.YieldInParameter); this.next(); let delegating = false; let argument = null; if (!this.hasPrecedingLineBreak()) { delegating = this.eat(55); switch (this.state.type) { case 13: case 135: case 8: case 11: case 3: case 9: case 14: case 12: if (!delegating) break; default: argument = this.parseMaybeAssign(); } } node.delegate = delegating; node.argument = argument; return this.finishNode(node, "YieldExpression"); } checkPipelineAtInfixOperator(left, leftStartLoc) { if (this.hasPlugin(["pipelineOperator", { proposal: "smart" }])) { if (left.type === "SequenceExpression") { this.raise(ErrorMessages.PipelineHeadSequenceExpression, { at: leftStartLoc }); } } } parseSmartPipelineBodyInStyle(childExpr, startPos, startLoc) { const bodyNode = this.startNodeAt(startPos, startLoc); if (this.isSimpleReference(childExpr)) { bodyNode.callee = childExpr; return this.finishNode(bodyNode, "PipelineBareFunction"); } else { this.checkSmartPipeTopicBodyEarlyErrors(startLoc); bodyNode.expression = childExpr; return this.finishNode(bodyNode, "PipelineTopicExpression"); } } isSimpleReference(expression) { switch (expression.type) { case "MemberExpression": return !expression.computed && this.isSimpleReference(expression.object); case "Identifier": return true; default: return false; } } checkSmartPipeTopicBodyEarlyErrors(startLoc) { if (this.match(19)) { throw this.raise(ErrorMessages.PipelineBodyNoArrow, { at: this.state.startLoc }); } if (!this.topicReferenceWasUsedInCurrentContext()) { this.raise(ErrorMessages.PipelineTopicUnused, { at: startLoc }); } } withTopicBindingContext(callback) { const outerContextTopicState = this.state.topicContext; this.state.topicContext = { maxNumOfResolvableTopics: 1, maxTopicIndex: null }; try { return callback(); } finally { this.state.topicContext = outerContextTopicState; } } withSmartMixTopicForbiddingContext(callback) { if (this.hasPlugin(["pipelineOperator", { proposal: "smart" }])) { const outerContextTopicState = this.state.topicContext; this.state.topicContext = { maxNumOfResolvableTopics: 0, maxTopicIndex: null }; try { return callback(); } finally { this.state.topicContext = outerContextTopicState; } } else { return callback(); } } withSoloAwaitPermittingContext(callback) { const outerContextSoloAwaitState = this.state.soloAwait; this.state.soloAwait = true; try { return callback(); } finally { this.state.soloAwait = outerContextSoloAwaitState; } } allowInAnd(callback) { const flags = this.prodParam.currentFlags(); const prodParamToSet = PARAM_IN & ~flags; if (prodParamToSet) { this.prodParam.enter(flags | PARAM_IN); try { return callback(); } finally { this.prodParam.exit(); } } return callback(); } disallowInAnd(callback) { const flags = this.prodParam.currentFlags(); const prodParamToClear = PARAM_IN & flags; if (prodParamToClear) { this.prodParam.enter(flags & ~PARAM_IN); try { return callback(); } finally { this.prodParam.exit(); } } return callback(); } registerTopicReference() { this.state.topicContext.maxTopicIndex = 0; } topicReferenceIsAllowedInCurrentContext() { return this.state.topicContext.maxNumOfResolvableTopics >= 1; } topicReferenceWasUsedInCurrentContext() { return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0; } parseFSharpPipelineBody(prec) { const startPos = this.state.start; const startLoc = this.state.startLoc; this.state.potentialArrowAt = this.state.start; const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; this.state.inFSharpPipelineDirectBody = true; const ret = this.parseExprOp(this.parseMaybeUnaryOrPrivate(), startPos, startLoc, prec); this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; return ret; } parseModuleExpression() { this.expectPlugin("moduleBlocks"); const node = this.startNode(); this.next(); this.eat(5); const revertScopes = this.initializeScopes(true); this.enterInitialScopes(); const program = this.startNode(); try { node.body = this.parseProgram(program, 8, "module"); } finally { revertScopes(); } this.eat(8); return this.finishNode(node, "ModuleExpression"); } parsePropertyNamePrefixOperator(prop) { } }; var loopLabel = { kind: "loop" }; var switchLabel = { kind: "switch" }; var FUNC_NO_FLAGS = 0; var FUNC_STATEMENT = 1; var FUNC_HANGING_STATEMENT = 2; var FUNC_NULLABLE_ID = 4; var loneSurrogate = /[\uD800-\uDFFF]/u; var keywordRelationalOperator = /in(?:stanceof)?/y; function babel7CompatTokens(tokens, input) { for (let i = 0; i < tokens.length; i++) { const token = tokens[i]; const { type } = token; if (typeof type === "number") { { if (type === 134) { const { loc, start, value, end } = token; const hashEndPos = start + 1; const hashEndLoc = createPositionWithColumnOffset(loc.start, 1); tokens.splice(i, 1, new Token({ type: getExportedToken(27), value: "#", start, end: hashEndPos, startLoc: loc.start, endLoc: hashEndLoc }), new Token({ type: getExportedToken(128), value, start: hashEndPos, end, startLoc: hashEndLoc, endLoc: loc.end })); i++; continue; } if (tokenIsTemplate(type)) { const { loc, start, value, end } = token; const backquoteEnd = start + 1; const backquoteEndLoc = createPositionWithColumnOffset(loc.start, 1); let startToken; if (input.charCodeAt(start) === 96) { startToken = new Token({ type: getExportedToken(22), value: "`", start, end: backquoteEnd, startLoc: loc.start, endLoc: backquoteEndLoc }); } else { startToken = new Token({ type: getExportedToken(8), value: "}", start, end: backquoteEnd, startLoc: loc.start, endLoc: backquoteEndLoc }); } let templateValue, templateElementEnd, templateElementEndLoc, endToken; if (type === 24) { templateElementEnd = end - 1; templateElementEndLoc = createPositionWithColumnOffset(loc.end, -1); templateValue = value === null ? null : value.slice(1, -1); endToken = new Token({ type: getExportedToken(22), value: "`", start: templateElementEnd, end, startLoc: templateElementEndLoc, endLoc: loc.end }); } else { templateElementEnd = end - 2; templateElementEndLoc = createPositionWithColumnOffset(loc.end, -2); templateValue = value === null ? null : value.slice(1, -2); endToken = new Token({ type: getExportedToken(23), value: "${", start: templateElementEnd, end, startLoc: templateElementEndLoc, endLoc: loc.end }); } tokens.splice(i, 1, startToken, new Token({ type: getExportedToken(20), value: templateValue, start: backquoteEnd, end: templateElementEnd, startLoc: backquoteEndLoc, endLoc: templateElementEndLoc }), endToken); i += 2; continue; } } token.type = getExportedToken(type); } } return tokens; } var StatementParser = class extends ExpressionParser { parseTopLevel(file, program) { file.program = this.parseProgram(program); file.comments = this.state.comments; if (this.options.tokens) { file.tokens = babel7CompatTokens(this.tokens, this.input); } return this.finishNode(file, "File"); } parseProgram(program, end = 135, sourceType = this.options.sourceType) { program.sourceType = sourceType; program.interpreter = this.parseInterpreterDirective(); this.parseBlockBody(program, true, true, end); if (this.inModule && !this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) { for (const [name, loc] of Array.from(this.scope.undefinedExports)) { this.raise(ErrorMessages.ModuleExportUndefined, { at: loc }, name); } } return this.finishNode(program, "Program"); } stmtToDirective(stmt) { const directive = stmt; directive.type = "Directive"; directive.value = directive.expression; delete directive.expression; const directiveLiteral = directive.value; const expressionValue = directiveLiteral.value; const raw = this.input.slice(directiveLiteral.start, directiveLiteral.end); const val = directiveLiteral.value = raw.slice(1, -1); this.addExtra(directiveLiteral, "raw", raw); this.addExtra(directiveLiteral, "rawValue", val); this.addExtra(directiveLiteral, "expressionValue", expressionValue); directiveLiteral.type = "DirectiveLiteral"; return directive; } parseInterpreterDirective() { if (!this.match(28)) { return null; } const node = this.startNode(); node.value = this.state.value; this.next(); return this.finishNode(node, "InterpreterDirective"); } isLet(context) { if (!this.isContextual(99)) { return false; } return this.isLetKeyword(context); } isLetKeyword(context) { const next = this.nextTokenStart(); const nextCh = this.codePointAtPos(next); if (nextCh === 92 || nextCh === 91) { return true; } if (context) return false; if (nextCh === 123) return true; if (isIdentifierStart(nextCh)) { keywordRelationalOperator.lastIndex = next; if (keywordRelationalOperator.test(this.input)) { const endCh = this.codePointAtPos(keywordRelationalOperator.lastIndex); if (!isIdentifierChar(endCh) && endCh !== 92) { return false; } } return true; } return false; } parseStatement(context, topLevel) { if (this.match(26)) { this.parseDecorators(true); } return this.parseStatementContent(context, topLevel); } parseStatementContent(context, topLevel) { let starttype = this.state.type; const node = this.startNode(); let kind; if (this.isLet(context)) { starttype = 74; kind = "let"; } switch (starttype) { case 60: return this.parseBreakContinueStatement(node, true); case 63: return this.parseBreakContinueStatement(node, false); case 64: return this.parseDebuggerStatement(node); case 90: return this.parseDoStatement(node); case 91: return this.parseForStatement(node); case 68: if (this.lookaheadCharCode() === 46) break; if (context) { if (this.state.strict) { this.raise(ErrorMessages.StrictFunction, { at: this.state.startLoc }); } else if (context !== "if" && context !== "label") { this.raise(ErrorMessages.SloppyFunction, { at: this.state.startLoc }); } } return this.parseFunctionStatement(node, false, !context); case 80: if (context) this.unexpected(); return this.parseClass(node, true); case 69: return this.parseIfStatement(node); case 70: return this.parseReturnStatement(node); case 71: return this.parseSwitchStatement(node); case 72: return this.parseThrowStatement(node); case 73: return this.parseTryStatement(node); case 75: case 74: kind = kind || this.state.value; if (context && kind !== "var") { this.raise(ErrorMessages.UnexpectedLexicalDeclaration, { at: this.state.startLoc }); } return this.parseVarStatement(node, kind); case 92: return this.parseWhileStatement(node); case 76: return this.parseWithStatement(node); case 5: return this.parseBlock(); case 13: return this.parseEmptyStatement(node); case 83: { const nextTokenCharCode = this.lookaheadCharCode(); if (nextTokenCharCode === 40 || nextTokenCharCode === 46) { break; } } case 82: { if (!this.options.allowImportExportEverywhere && !topLevel) { this.raise(ErrorMessages.UnexpectedImportExport, { at: this.state.startLoc }); } this.next(); let result; if (starttype === 83) { result = this.parseImport(node); if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) { this.sawUnambiguousESM = true; } } else { result = this.parseExport(node); if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") { this.sawUnambiguousESM = true; } } this.assertModuleNodeAllowed(node); return result; } default: { if (this.isAsyncFunction()) { if (context) { this.raise(ErrorMessages.AsyncFunctionInSingleStatementContext, { at: this.state.startLoc }); } this.next(); return this.parseFunctionStatement(node, true, !context); } } } const maybeName = this.state.value; const expr = this.parseExpression(); if (tokenIsIdentifier(starttype) && expr.type === "Identifier" && this.eat(14)) { return this.parseLabeledStatement(node, maybeName, expr, context); } else { return this.parseExpressionStatement(node, expr); } } assertModuleNodeAllowed(node) { if (!this.options.allowImportExportEverywhere && !this.inModule) { this.raise(SourceTypeModuleErrorMessages.ImportOutsideModule, { node }); } } takeDecorators(node) { const decorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; if (decorators.length) { node.decorators = decorators; this.resetStartLocationFromNode(node, decorators[0]); this.state.decoratorStack[this.state.decoratorStack.length - 1] = []; } } canHaveLeadingDecorator() { return this.match(80); } parseDecorators(allowExport) { const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; while (this.match(26)) { const decorator = this.parseDecorator(); currentContextDecorators.push(decorator); } if (this.match(82)) { if (!allowExport) { this.unexpected(); } if (this.hasPlugin("decorators") && !this.getPluginOption("decorators", "decoratorsBeforeExport")) { this.raise(ErrorMessages.DecoratorExportClass, { at: this.state.startLoc }); } } else if (!this.canHaveLeadingDecorator()) { throw this.raise(ErrorMessages.UnexpectedLeadingDecorator, { at: this.state.startLoc }); } } parseDecorator() { this.expectOnePlugin(["decorators-legacy", "decorators"]); const node = this.startNode(); this.next(); if (this.hasPlugin("decorators")) { this.state.decoratorStack.push([]); const startPos = this.state.start; const startLoc = this.state.startLoc; let expr; if (this.eat(10)) { expr = this.parseExpression(); this.expect(11); } else { expr = this.parseIdentifier(false); while (this.eat(16)) { const node2 = this.startNodeAt(startPos, startLoc); node2.object = expr; node2.property = this.parseIdentifier(true); node2.computed = false; expr = this.finishNode(node2, "MemberExpression"); } } node.expression = this.parseMaybeDecoratorArguments(expr); this.state.decoratorStack.pop(); } else { node.expression = this.parseExprSubscripts(); } return this.finishNode(node, "Decorator"); } parseMaybeDecoratorArguments(expr) { if (this.eat(10)) { const node = this.startNodeAtNode(expr); node.callee = expr; node.arguments = this.parseCallExpressionArguments(11, false); this.toReferencedList(node.arguments); return this.finishNode(node, "CallExpression"); } return expr; } parseBreakContinueStatement(node, isBreak) { this.next(); if (this.isLineTerminator()) { node.label = null; } else { node.label = this.parseIdentifier(); this.semicolon(); } this.verifyBreakContinue(node, isBreak); return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); } verifyBreakContinue(node, isBreak) { let i; for (i = 0; i < this.state.labels.length; ++i) { const lab = this.state.labels[i]; if (node.label == null || lab.name === node.label.name) { if (lab.kind != null && (isBreak || lab.kind === "loop")) break; if (node.label && isBreak) break; } } if (i === this.state.labels.length) { this.raise(ErrorMessages.IllegalBreakContinue, { node }, isBreak ? "break" : "continue"); } } parseDebuggerStatement(node) { this.next(); this.semicolon(); return this.finishNode(node, "DebuggerStatement"); } parseHeaderExpression() { this.expect(10); const val = this.parseExpression(); this.expect(11); return val; } parseDoStatement(node) { this.next(); this.state.labels.push(loopLabel); node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement("do")); this.state.labels.pop(); this.expect(92); node.test = this.parseHeaderExpression(); this.eat(13); return this.finishNode(node, "DoWhileStatement"); } parseForStatement(node) { this.next(); this.state.labels.push(loopLabel); let awaitAt = null; if (this.isAwaitAllowed() && this.eatContextual(96)) { awaitAt = this.state.lastTokStartLoc; } this.scope.enter(SCOPE_OTHER); this.expect(10); if (this.match(13)) { if (awaitAt !== null) { this.unexpected(awaitAt); } return this.parseFor(node, null); } const startsWithLet = this.isContextual(99); const isLet = startsWithLet && this.isLetKeyword(); if (this.match(74) || this.match(75) || isLet) { const init2 = this.startNode(); const kind = isLet ? "let" : this.state.value; this.next(); this.parseVar(init2, true, kind); this.finishNode(init2, "VariableDeclaration"); if ((this.match(58) || this.isContextual(101)) && init2.declarations.length === 1) { return this.parseForIn(node, init2, awaitAt); } if (awaitAt !== null) { this.unexpected(awaitAt); } return this.parseFor(node, init2); } const startsWithAsync = this.isContextual(95); const refExpressionErrors = new ExpressionErrors(); const init = this.parseExpression(true, refExpressionErrors); const isForOf = this.isContextual(101); if (isForOf) { if (startsWithLet) { this.raise(ErrorMessages.ForOfLet, { node: init }); } if (awaitAt === null && startsWithAsync && init.type === "Identifier") { this.raise(ErrorMessages.ForOfAsync, { node: init }); } } if (isForOf || this.match(58)) { this.checkDestructuringPrivate(refExpressionErrors); this.toAssignable(init, true); const description = isForOf ? "for-of statement" : "for-in statement"; this.checkLVal(init, description); return this.parseForIn(node, init, awaitAt); } else { this.checkExpressionErrors(refExpressionErrors, true); } if (awaitAt !== null) { this.unexpected(awaitAt); } return this.parseFor(node, init); } parseFunctionStatement(node, isAsync, declarationPosition) { this.next(); return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), isAsync); } parseIfStatement(node) { this.next(); node.test = this.parseHeaderExpression(); node.consequent = this.parseStatement("if"); node.alternate = this.eat(66) ? this.parseStatement("if") : null; return this.finishNode(node, "IfStatement"); } parseReturnStatement(node) { if (!this.prodParam.hasReturn && !this.options.allowReturnOutsideFunction) { this.raise(ErrorMessages.IllegalReturn, { at: this.state.startLoc }); } this.next(); if (this.isLineTerminator()) { node.argument = null; } else { node.argument = this.parseExpression(); this.semicolon(); } return this.finishNode(node, "ReturnStatement"); } parseSwitchStatement(node) { this.next(); node.discriminant = this.parseHeaderExpression(); const cases = node.cases = []; this.expect(5); this.state.labels.push(switchLabel); this.scope.enter(SCOPE_OTHER); let cur; for (let sawDefault; !this.match(8); ) { if (this.match(61) || this.match(65)) { const isCase = this.match(61); if (cur) this.finishNode(cur, "SwitchCase"); cases.push(cur = this.startNode()); cur.consequent = []; this.next(); if (isCase) { cur.test = this.parseExpression(); } else { if (sawDefault) { this.raise(ErrorMessages.MultipleDefaultsInSwitch, { at: this.state.lastTokStartLoc }); } sawDefault = true; cur.test = null; } this.expect(14); } else { if (cur) { cur.consequent.push(this.parseStatement(null)); } else { this.unexpected(); } } } this.scope.exit(); if (cur) this.finishNode(cur, "SwitchCase"); this.next(); this.state.labels.pop(); return this.finishNode(node, "SwitchStatement"); } parseThrowStatement(node) { this.next(); if (this.hasPrecedingLineBreak()) { this.raise(ErrorMessages.NewlineAfterThrow, { at: this.state.lastTokEndLoc }); } node.argument = this.parseExpression(); this.semicolon(); return this.finishNode(node, "ThrowStatement"); } parseCatchClauseParam() { const param = this.parseBindingAtom(); const simple = param.type === "Identifier"; this.scope.enter(simple ? SCOPE_SIMPLE_CATCH : 0); this.checkLVal(param, "catch clause", BIND_LEXICAL); return param; } parseTryStatement(node) { this.next(); node.block = this.parseBlock(); node.handler = null; if (this.match(62)) { const clause = this.startNode(); this.next(); if (this.match(10)) { this.expect(10); clause.param = this.parseCatchClauseParam(); this.expect(11); } else { clause.param = null; this.scope.enter(SCOPE_OTHER); } clause.body = this.withSmartMixTopicForbiddingContext(() => this.parseBlock(false, false)); this.scope.exit(); node.handler = this.finishNode(clause, "CatchClause"); } node.finalizer = this.eat(67) ? this.parseBlock() : null; if (!node.handler && !node.finalizer) { this.raise(ErrorMessages.NoCatchOrFinally, { node }); } return this.finishNode(node, "TryStatement"); } parseVarStatement(node, kind) { this.next(); this.parseVar(node, false, kind); this.semicolon(); return this.finishNode(node, "VariableDeclaration"); } parseWhileStatement(node) { this.next(); node.test = this.parseHeaderExpression(); this.state.labels.push(loopLabel); node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement("while")); this.state.labels.pop(); return this.finishNode(node, "WhileStatement"); } parseWithStatement(node) { if (this.state.strict) { this.raise(ErrorMessages.StrictWith, { at: this.state.startLoc }); } this.next(); node.object = this.parseHeaderExpression(); node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement("with")); return this.finishNode(node, "WithStatement"); } parseEmptyStatement(node) { this.next(); return this.finishNode(node, "EmptyStatement"); } parseLabeledStatement(node, maybeName, expr, context) { for (const label of this.state.labels) { if (label.name === maybeName) { this.raise(ErrorMessages.LabelRedeclaration, { node: expr }, maybeName); } } const kind = tokenIsLoop(this.state.type) ? "loop" : this.match(71) ? "switch" : null; for (let i = this.state.labels.length - 1; i >= 0; i--) { const label = this.state.labels[i]; if (label.statementStart === node.start) { label.statementStart = this.state.start; label.kind = kind; } else { break; } } this.state.labels.push({ name: maybeName, kind, statementStart: this.state.start }); node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); this.state.labels.pop(); node.label = expr; return this.finishNode(node, "LabeledStatement"); } parseExpressionStatement(node, expr) { node.expression = expr; this.semicolon(); return this.finishNode(node, "ExpressionStatement"); } parseBlock(allowDirectives = false, createNewLexicalScope = true, afterBlockParse) { const node = this.startNode(); if (allowDirectives) { this.state.strictErrors.clear(); } this.expect(5); if (createNewLexicalScope) { this.scope.enter(SCOPE_OTHER); } this.parseBlockBody(node, allowDirectives, false, 8, afterBlockParse); if (createNewLexicalScope) { this.scope.exit(); } return this.finishNode(node, "BlockStatement"); } isValidDirective(stmt) { return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized; } parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse) { const body = node.body = []; const directives = node.directives = []; this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : void 0, topLevel, end, afterBlockParse); } parseBlockOrModuleBlockBody(body, directives, topLevel, end, afterBlockParse) { const oldStrict = this.state.strict; let hasStrictModeDirective = false; let parsedNonDirective = false; while (!this.match(end)) { const stmt = this.parseStatement(null, topLevel); if (directives && !parsedNonDirective) { if (this.isValidDirective(stmt)) { const directive = this.stmtToDirective(stmt); directives.push(directive); if (!hasStrictModeDirective && directive.value.value === "use strict") { hasStrictModeDirective = true; this.setStrict(true); } continue; } parsedNonDirective = true; this.state.strictErrors.clear(); } body.push(stmt); } if (afterBlockParse) { afterBlockParse.call(this, hasStrictModeDirective); } if (!oldStrict) { this.setStrict(false); } this.next(); } parseFor(node, init) { node.init = init; this.semicolon(false); node.test = this.match(13) ? null : this.parseExpression(); this.semicolon(false); node.update = this.match(11) ? null : this.parseExpression(); this.expect(11); node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement("for")); this.scope.exit(); this.state.labels.pop(); return this.finishNode(node, "ForStatement"); } parseForIn(node, init, awaitAt) { const isForIn = this.match(58); this.next(); if (isForIn) { if (awaitAt !== null) this.unexpected(awaitAt); } else { node.await = awaitAt !== null; } if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.state.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) { this.raise(ErrorMessages.ForInOfLoopInitializer, { node: init }, isForIn ? "for-in" : "for-of"); } if (init.type === "AssignmentPattern") { this.raise(ErrorMessages.InvalidLhs, { node: init }, "for-loop"); } node.left = init; node.right = isForIn ? this.parseExpression() : this.parseMaybeAssignAllowIn(); this.expect(11); node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement("for")); this.scope.exit(); this.state.labels.pop(); return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement"); } parseVar(node, isFor, kind) { const declarations = node.declarations = []; const isTypescript = this.hasPlugin("typescript"); node.kind = kind; for (; ; ) { const decl = this.startNode(); this.parseVarId(decl, kind); if (this.eat(29)) { decl.init = isFor ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn(); } else { if (kind === "const" && !(this.match(58) || this.isContextual(101))) { if (!isTypescript) { this.raise(ErrorMessages.DeclarationMissingInitializer, { at: this.state.lastTokEndLoc }, "Const declarations"); } } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(58) || this.isContextual(101)))) { this.raise(ErrorMessages.DeclarationMissingInitializer, { at: this.state.lastTokEndLoc }, "Complex binding patterns"); } decl.init = null; } declarations.push(this.finishNode(decl, "VariableDeclarator")); if (!this.eat(12)) break; } return node; } parseVarId(decl, kind) { decl.id = this.parseBindingAtom(); this.checkLVal(decl.id, "variable declaration", kind === "var" ? BIND_VAR : BIND_LEXICAL, void 0, kind !== "var"); } parseFunction(node, statement = FUNC_NO_FLAGS, isAsync = false) { const isStatement = statement & FUNC_STATEMENT; const isHangingStatement = statement & FUNC_HANGING_STATEMENT; const requireId = !!isStatement && !(statement & FUNC_NULLABLE_ID); this.initFunction(node, isAsync); if (this.match(55) && isHangingStatement) { this.raise(ErrorMessages.GeneratorInSingleStatementContext, { at: this.state.startLoc }); } node.generator = this.eat(55); if (isStatement) { node.id = this.parseFunctionId(requireId); } const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; this.state.maybeInArrowParameters = false; this.scope.enter(SCOPE_FUNCTION); this.prodParam.enter(functionFlags(isAsync, node.generator)); if (!isStatement) { node.id = this.parseFunctionId(); } this.parseFunctionParams(node, false); this.withSmartMixTopicForbiddingContext(() => { this.parseFunctionBodyAndFinish(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); }); this.prodParam.exit(); this.scope.exit(); if (isStatement && !isHangingStatement) { this.registerFunctionStatementId(node); } this.state.maybeInArrowParameters = oldMaybeInArrowParameters; return node; } parseFunctionId(requireId) { return requireId || tokenIsIdentifier(this.state.type) ? this.parseIdentifier() : null; } parseFunctionParams(node, allowModifiers) { this.expect(10); this.expressionScope.enter(newParameterDeclarationScope()); node.params = this.parseBindingList(11, 41, false, allowModifiers); this.expressionScope.exit(); } registerFunctionStatementId(node) { if (!node.id) return; this.scope.declareName(node.id.name, this.state.strict || node.generator || node.async ? this.scope.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION, node.id.loc.start); } parseClass(node, isStatement, optionalId) { this.next(); this.takeDecorators(node); const oldStrict = this.state.strict; this.state.strict = true; this.parseClassId(node, isStatement, optionalId); this.parseClassSuper(node); node.body = this.parseClassBody(!!node.superClass, oldStrict); return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); } isClassProperty() { return this.match(29) || this.match(13) || this.match(8); } isClassMethod() { return this.match(10); } isNonstaticConstructor(method) { return !method.computed && !method.static && (method.key.name === "constructor" || method.key.value === "constructor"); } parseClassBody(hadSuperClass, oldStrict) { this.classScope.enter(); const state = { hadConstructor: false, hadSuperClass }; let decorators = []; const classBody = this.startNode(); classBody.body = []; this.expect(5); this.withSmartMixTopicForbiddingContext(() => { while (!this.match(8)) { if (this.eat(13)) { if (decorators.length > 0) { throw this.raise(ErrorMessages.DecoratorSemicolon, { at: this.state.lastTokEndLoc }); } continue; } if (this.match(26)) { decorators.push(this.parseDecorator()); continue; } const member = this.startNode(); if (decorators.length) { member.decorators = decorators; this.resetStartLocationFromNode(member, decorators[0]); decorators = []; } this.parseClassMember(classBody, member, state); if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) { this.raise(ErrorMessages.DecoratorConstructor, { node: member }); } } }); this.state.strict = oldStrict; this.next(); if (decorators.length) { throw this.raise(ErrorMessages.TrailingDecorator, { at: this.state.startLoc }); } this.classScope.exit(); return this.finishNode(classBody, "ClassBody"); } parseClassMemberFromModifier(classBody, member) { const key = this.parseIdentifier(true); if (this.isClassMethod()) { const method = member; method.kind = "method"; method.computed = false; method.key = key; method.static = false; this.pushClassMethod(classBody, method, false, false, false, false); return true; } else if (this.isClassProperty()) { const prop = member; prop.computed = false; prop.key = key; prop.static = false; classBody.body.push(this.parseClassProperty(prop)); return true; } this.resetPreviousNodeTrailingComments(key); return false; } parseClassMember(classBody, member, state) { const isStatic = this.isContextual(104); if (isStatic) { if (this.parseClassMemberFromModifier(classBody, member)) { return; } if (this.eat(5)) { this.parseClassStaticBlock(classBody, member); return; } } this.parseClassMemberWithIsStatic(classBody, member, state, isStatic); } parseClassMemberWithIsStatic(classBody, member, state, isStatic) { const publicMethod = member; const privateMethod = member; const publicProp = member; const privateProp = member; const accessorProp = member; const method = publicMethod; const publicMember = publicMethod; member.static = isStatic; this.parsePropertyNamePrefixOperator(member); if (this.eat(55)) { method.kind = "method"; const isPrivateName = this.match(134); this.parseClassElementName(method); if (isPrivateName) { this.pushClassPrivateMethod(classBody, privateMethod, true, false); return; } if (this.isNonstaticConstructor(publicMethod)) { this.raise(ErrorMessages.ConstructorIsGenerator, { node: publicMethod.key }); } this.pushClassMethod(classBody, publicMethod, true, false, false, false); return; } const isContextual = tokenIsIdentifier(this.state.type) && !this.state.containsEsc; const isPrivate = this.match(134); const key = this.parseClassElementName(member); const maybeQuestionTokenStartLoc = this.state.startLoc; this.parsePostMemberNameModifiers(publicMember); if (this.isClassMethod()) { method.kind = "method"; if (isPrivate) { this.pushClassPrivateMethod(classBody, privateMethod, false, false); return; } const isConstructor = this.isNonstaticConstructor(publicMethod); let allowsDirectSuper = false; if (isConstructor) { publicMethod.kind = "constructor"; if (state.hadConstructor && !this.hasPlugin("typescript")) { this.raise(ErrorMessages.DuplicateConstructor, { node: key }); } if (isConstructor && this.hasPlugin("typescript") && member.override) { this.raise(ErrorMessages.OverrideOnConstructor, { node: key }); } state.hadConstructor = true; allowsDirectSuper = state.hadSuperClass; } this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper); } else if (this.isClassProperty()) { if (isPrivate) { this.pushClassPrivateProperty(classBody, privateProp); } else { this.pushClassProperty(classBody, publicProp); } } else if (isContextual && key.name === "async" && !this.isLineTerminator()) { this.resetPreviousNodeTrailingComments(key); const isGenerator = this.eat(55); if (publicMember.optional) { this.unexpected(maybeQuestionTokenStartLoc); } method.kind = "method"; const isPrivate2 = this.match(134); this.parseClassElementName(method); this.parsePostMemberNameModifiers(publicMember); if (isPrivate2) { this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true); } else { if (this.isNonstaticConstructor(publicMethod)) { this.raise(ErrorMessages.ConstructorIsAsync, { node: publicMethod.key }); } this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false); } } else if (isContextual && (key.name === "get" || key.name === "set") && !(this.match(55) && this.isLineTerminator())) { this.resetPreviousNodeTrailingComments(key); method.kind = key.name; const isPrivate2 = this.match(134); this.parseClassElementName(publicMethod); if (isPrivate2) { this.pushClassPrivateMethod(classBody, privateMethod, false, false); } else { if (this.isNonstaticConstructor(publicMethod)) { this.raise(ErrorMessages.ConstructorIsAccessor, { node: publicMethod.key }); } this.pushClassMethod(classBody, publicMethod, false, false, false, false); } this.checkGetterSetterParams(publicMethod); } else if (isContextual && key.name === "accessor" && !this.isLineTerminator()) { this.expectPlugin("decoratorAutoAccessors"); this.resetPreviousNodeTrailingComments(key); const isPrivate2 = this.match(134); this.parseClassElementName(publicProp); this.pushClassAccessorProperty(classBody, accessorProp, isPrivate2); } else if (this.isLineTerminator()) { if (isPrivate) { this.pushClassPrivateProperty(classBody, privateProp); } else { this.pushClassProperty(classBody, publicProp); } } else { this.unexpected(); } } parseClassElementName(member) { const { type, value } = this.state; if ((type === 128 || type === 129) && member.static && value === "prototype") { this.raise(ErrorMessages.StaticPrototype, { at: this.state.startLoc }); } if (type === 134) { if (value === "constructor") { this.raise(ErrorMessages.ConstructorClassPrivateField, { at: this.state.startLoc }); } const key = this.parsePrivateName(); member.key = key; return key; } return this.parsePropertyName(member); } parseClassStaticBlock(classBody, member) { var _member$decorators; this.scope.enter(SCOPE_CLASS | SCOPE_STATIC_BLOCK | SCOPE_SUPER); const oldLabels = this.state.labels; this.state.labels = []; this.prodParam.enter(PARAM); const body = member.body = []; this.parseBlockOrModuleBlockBody(body, void 0, false, 8); this.prodParam.exit(); this.scope.exit(); this.state.labels = oldLabels; classBody.body.push(this.finishNode(member, "StaticBlock")); if ((_member$decorators = member.decorators) != null && _member$decorators.length) { this.raise(ErrorMessages.DecoratorStaticBlock, { node: member }); } } pushClassProperty(classBody, prop) { if (!prop.computed && (prop.key.name === "constructor" || prop.key.value === "constructor")) { this.raise(ErrorMessages.ConstructorClassField, { node: prop.key }); } classBody.body.push(this.parseClassProperty(prop)); } pushClassPrivateProperty(classBody, prop) { const node = this.parseClassPrivateProperty(prop); classBody.body.push(node); this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), CLASS_ELEMENT_OTHER, node.key.loc.start); } pushClassAccessorProperty(classBody, prop, isPrivate) { if (!isPrivate && !prop.computed) { const key = prop.key; if (key.name === "constructor" || key.value === "constructor") { this.raise(ErrorMessages.ConstructorClassField, { node: key }); } } const node = this.parseClassAccessorProperty(prop); classBody.body.push(node); if (isPrivate) { this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), CLASS_ELEMENT_OTHER, node.key.loc.start); } } pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true)); } pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { const node = this.parseMethod(method, isGenerator, isAsync, false, false, "ClassPrivateMethod", true); classBody.body.push(node); const kind = node.kind === "get" ? node.static ? CLASS_ELEMENT_STATIC_GETTER : CLASS_ELEMENT_INSTANCE_GETTER : node.kind === "set" ? node.static ? CLASS_ELEMENT_STATIC_SETTER : CLASS_ELEMENT_INSTANCE_SETTER : CLASS_ELEMENT_OTHER; this.declareClassPrivateMethodInScope(node, kind); } declareClassPrivateMethodInScope(node, kind) { this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), kind, node.key.loc.start); } parsePostMemberNameModifiers(methodOrProp) { } parseClassPrivateProperty(node) { this.parseInitializer(node); this.semicolon(); return this.finishNode(node, "ClassPrivateProperty"); } parseClassProperty(node) { this.parseInitializer(node); this.semicolon(); return this.finishNode(node, "ClassProperty"); } parseClassAccessorProperty(node) { this.parseInitializer(node); this.semicolon(); return this.finishNode(node, "ClassAccessorProperty"); } parseInitializer(node) { this.scope.enter(SCOPE_CLASS | SCOPE_SUPER); this.expressionScope.enter(newExpressionScope()); this.prodParam.enter(PARAM); node.value = this.eat(29) ? this.parseMaybeAssignAllowIn() : null; this.expressionScope.exit(); this.prodParam.exit(); this.scope.exit(); } parseClassId(node, isStatement, optionalId, bindingType = BIND_CLASS) { if (tokenIsIdentifier(this.state.type)) { node.id = this.parseIdentifier(); if (isStatement) { this.checkLVal(node.id, "class name", bindingType); } } else { if (optionalId || !isStatement) { node.id = null; } else { throw this.raise(ErrorMessages.MissingClassName, { at: this.state.startLoc }); } } } parseClassSuper(node) { node.superClass = this.eat(81) ? this.parseExprSubscripts() : null; } parseExport(node) { const hasDefault = this.maybeParseExportDefaultSpecifier(node); const parseAfterDefault = !hasDefault || this.eat(12); const hasStar = parseAfterDefault && this.eatExportStar(node); const hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node); const parseAfterNamespace = parseAfterDefault && (!hasNamespace || this.eat(12)); const isFromRequired = hasDefault || hasStar; if (hasStar && !hasNamespace) { if (hasDefault) this.unexpected(); this.parseExportFrom(node, true); return this.finishNode(node, "ExportAllDeclaration"); } const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node); if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers || hasNamespace && parseAfterNamespace && !hasSpecifiers) { throw this.unexpected(null, 5); } let hasDeclaration; if (isFromRequired || hasSpecifiers) { hasDeclaration = false; this.parseExportFrom(node, isFromRequired); } else { hasDeclaration = this.maybeParseExportDeclaration(node); } if (isFromRequired || hasSpecifiers || hasDeclaration) { this.checkExport(node, true, false, !!node.source); return this.finishNode(node, "ExportNamedDeclaration"); } if (this.eat(65)) { node.declaration = this.parseExportDefaultExpression(); this.checkExport(node, true, true); return this.finishNode(node, "ExportDefaultDeclaration"); } throw this.unexpected(null, 5); } eatExportStar(node) { return this.eat(55); } maybeParseExportDefaultSpecifier(node) { if (this.isExportDefaultSpecifier()) { this.expectPlugin("exportDefaultFrom"); const specifier = this.startNode(); specifier.exported = this.parseIdentifier(true); node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; return true; } return false; } maybeParseExportNamespaceSpecifier(node) { if (this.isContextual(93)) { if (!node.specifiers) node.specifiers = []; const specifier = this.startNodeAt(this.state.lastTokStart, this.state.lastTokStartLoc); this.next(); specifier.exported = this.parseModuleExportName(); node.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier")); return true; } return false; } maybeParseExportNamedSpecifiers(node) { if (this.match(5)) { if (!node.specifiers) node.specifiers = []; const isTypeExport = node.exportKind === "type"; node.specifiers.push(...this.parseExportSpecifiers(isTypeExport)); node.source = null; node.declaration = null; if (this.hasPlugin("importAssertions")) { node.assertions = []; } return true; } return false; } maybeParseExportDeclaration(node) { if (this.shouldParseExportDeclaration()) { node.specifiers = []; node.source = null; if (this.hasPlugin("importAssertions")) { node.assertions = []; } node.declaration = this.parseExportDeclaration(node); return true; } return false; } isAsyncFunction() { if (!this.isContextual(95)) return false; const next = this.nextTokenStart(); return !lineBreak.test(this.input.slice(this.state.pos, next)) && this.isUnparsedContextual(next, "function"); } parseExportDefaultExpression() { const expr = this.startNode(); const isAsync = this.isAsyncFunction(); if (this.match(68) || isAsync) { this.next(); if (isAsync) { this.next(); } return this.parseFunction(expr, FUNC_STATEMENT | FUNC_NULLABLE_ID, isAsync); } if (this.match(80)) { return this.parseClass(expr, true, true); } if (this.match(26)) { if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport")) { this.raise(ErrorMessages.DecoratorBeforeExport, { at: this.state.startLoc }); } this.parseDecorators(false); return this.parseClass(expr, true, true); } if (this.match(75) || this.match(74) || this.isLet()) { throw this.raise(ErrorMessages.UnsupportedDefaultExport, { at: this.state.startLoc }); } const res = this.parseMaybeAssignAllowIn(); this.semicolon(); return res; } parseExportDeclaration(node) { return this.parseStatement(null); } isExportDefaultSpecifier() { const { type } = this.state; if (tokenIsIdentifier(type)) { if (type === 95 && !this.state.containsEsc || type === 99) { return false; } if ((type === 126 || type === 125) && !this.state.containsEsc) { const { type: nextType } = this.lookahead(); if (tokenIsIdentifier(nextType) && nextType !== 97 || nextType === 5) { this.expectOnePlugin(["flow", "typescript"]); return false; } } } else if (!this.match(65)) { return false; } const next = this.nextTokenStart(); const hasFrom = this.isUnparsedContextual(next, "from"); if (this.input.charCodeAt(next) === 44 || tokenIsIdentifier(this.state.type) && hasFrom) { return true; } if (this.match(65) && hasFrom) { const nextAfterFrom = this.input.charCodeAt(this.nextTokenStartSince(next + 4)); return nextAfterFrom === 34 || nextAfterFrom === 39; } return false; } parseExportFrom(node, expect) { if (this.eatContextual(97)) { node.source = this.parseImportSource(); this.checkExport(node); const assertions = this.maybeParseImportAssertions(); if (assertions) { node.assertions = assertions; } } else if (expect) { this.unexpected(); } this.semicolon(); } shouldParseExportDeclaration() { const { type } = this.state; if (type === 26) { this.expectOnePlugin(["decorators", "decorators-legacy"]); if (this.hasPlugin("decorators")) { if (this.getPluginOption("decorators", "decoratorsBeforeExport")) { throw this.raise(ErrorMessages.DecoratorBeforeExport, { at: this.state.startLoc }); } return true; } } return type === 74 || type === 75 || type === 68 || type === 80 || this.isLet() || this.isAsyncFunction(); } checkExport(node, checkNames, isDefault, isFrom) { if (checkNames) { if (isDefault) { this.checkDuplicateExports(node, "default"); if (this.hasPlugin("exportDefaultFrom")) { var _declaration$extra; const declaration = node.declaration; if (declaration.type === "Identifier" && declaration.name === "from" && declaration.end - declaration.start === 4 && !((_declaration$extra = declaration.extra) != null && _declaration$extra.parenthesized)) { this.raise(ErrorMessages.ExportDefaultFromAsIdentifier, { node: declaration }); } } } else if (node.specifiers && node.specifiers.length) { for (const specifier of node.specifiers) { const { exported } = specifier; const exportedName = exported.type === "Identifier" ? exported.name : exported.value; this.checkDuplicateExports(specifier, exportedName); if (!isFrom && specifier.local) { const { local } = specifier; if (local.type !== "Identifier") { this.raise(ErrorMessages.ExportBindingIsString, { node: specifier }, local.value, exportedName); } else { this.checkReservedWord(local.name, local.loc.start, true, false); this.scope.checkLocalExport(local); } } } } else if (node.declaration) { if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") { const id = node.declaration.id; if (!id) throw new Error("Assertion failure"); this.checkDuplicateExports(node, id.name); } else if (node.declaration.type === "VariableDeclaration") { for (const declaration of node.declaration.declarations) { this.checkDeclaration(declaration.id); } } } } const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; if (currentContextDecorators.length) { throw this.raise(ErrorMessages.UnsupportedDecoratorExport, { node }); } } checkDeclaration(node) { if (node.type === "Identifier") { this.checkDuplicateExports(node, node.name); } else if (node.type === "ObjectPattern") { for (const prop of node.properties) { this.checkDeclaration(prop); } } else if (node.type === "ArrayPattern") { for (const elem of node.elements) { if (elem) { this.checkDeclaration(elem); } } } else if (node.type === "ObjectProperty") { this.checkDeclaration(node.value); } else if (node.type === "RestElement") { this.checkDeclaration(node.argument); } else if (node.type === "AssignmentPattern") { this.checkDeclaration(node.left); } } checkDuplicateExports(node, name) { if (this.exportedIdentifiers.has(name)) { this.raise(name === "default" ? ErrorMessages.DuplicateDefaultExport : ErrorMessages.DuplicateExport, { node }, name); } this.exportedIdentifiers.add(name); } parseExportSpecifiers(isInTypeExport) { const nodes = []; let first = true; this.expect(5); while (!this.eat(8)) { if (first) { first = false; } else { this.expect(12); if (this.eat(8)) break; } const isMaybeTypeOnly = this.isContextual(126); const isString = this.match(129); const node = this.startNode(); node.local = this.parseModuleExportName(); nodes.push(this.parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly)); } return nodes; } parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly) { if (this.eatContextual(93)) { node.exported = this.parseModuleExportName(); } else if (isString) { node.exported = cloneStringLiteral(node.local); } else if (!node.exported) { node.exported = cloneIdentifier(node.local); } return this.finishNode(node, "ExportSpecifier"); } parseModuleExportName() { if (this.match(129)) { const result = this.parseStringLiteral(this.state.value); const surrogate = result.value.match(loneSurrogate); if (surrogate) { this.raise(ErrorMessages.ModuleExportNameHasLoneSurrogate, { node: result }, surrogate[0].charCodeAt(0).toString(16)); } return result; } return this.parseIdentifier(true); } parseImport(node) { node.specifiers = []; if (!this.match(129)) { const hasDefault = this.maybeParseDefaultImportSpecifier(node); const parseNext = !hasDefault || this.eat(12); const hasStar = parseNext && this.maybeParseStarImportSpecifier(node); if (parseNext && !hasStar) this.parseNamedImportSpecifiers(node); this.expectContextual(97); } node.source = this.parseImportSource(); const assertions = this.maybeParseImportAssertions(); if (assertions) { node.assertions = assertions; } else { const attributes = this.maybeParseModuleAttributes(); if (attributes) { node.attributes = attributes; } } this.semicolon(); return this.finishNode(node, "ImportDeclaration"); } parseImportSource() { if (!this.match(129)) this.unexpected(); return this.parseExprAtom(); } shouldParseDefaultImport(node) { return tokenIsIdentifier(this.state.type); } parseImportSpecifierLocal(node, specifier, type, contextDescription) { specifier.local = this.parseIdentifier(); this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL); node.specifiers.push(this.finishNode(specifier, type)); } parseAssertEntries() { const attrs = []; const attrNames = /* @__PURE__ */ new Set(); do { if (this.match(8)) { break; } const node = this.startNode(); const keyName = this.state.value; if (attrNames.has(keyName)) { this.raise(ErrorMessages.ModuleAttributesWithDuplicateKeys, { at: this.state.startLoc }, keyName); } attrNames.add(keyName); if (this.match(129)) { node.key = this.parseStringLiteral(keyName); } else { node.key = this.parseIdentifier(true); } this.expect(14); if (!this.match(129)) { throw this.raise(ErrorMessages.ModuleAttributeInvalidValue, { at: this.state.startLoc }); } node.value = this.parseStringLiteral(this.state.value); this.finishNode(node, "ImportAttribute"); attrs.push(node); } while (this.eat(12)); return attrs; } maybeParseModuleAttributes() { if (this.match(76) && !this.hasPrecedingLineBreak()) { this.expectPlugin("moduleAttributes"); this.next(); } else { if (this.hasPlugin("moduleAttributes")) return []; return null; } const attrs = []; const attributes = /* @__PURE__ */ new Set(); do { const node = this.startNode(); node.key = this.parseIdentifier(true); if (node.key.name !== "type") { this.raise(ErrorMessages.ModuleAttributeDifferentFromType, { node: node.key }, node.key.name); } if (attributes.has(node.key.name)) { this.raise(ErrorMessages.ModuleAttributesWithDuplicateKeys, { node: node.key }, node.key.name); } attributes.add(node.key.name); this.expect(14); if (!this.match(129)) { throw this.raise(ErrorMessages.ModuleAttributeInvalidValue, { at: this.state.startLoc }); } node.value = this.parseStringLiteral(this.state.value); this.finishNode(node, "ImportAttribute"); attrs.push(node); } while (this.eat(12)); return attrs; } maybeParseImportAssertions() { if (this.isContextual(94) && !this.hasPrecedingLineBreak()) { this.expectPlugin("importAssertions"); this.next(); } else { if (this.hasPlugin("importAssertions")) return []; return null; } this.eat(5); const attrs = this.parseAssertEntries(); this.eat(8); return attrs; } maybeParseDefaultImportSpecifier(node) { if (this.shouldParseDefaultImport(node)) { this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier", "default import specifier"); return true; } return false; } maybeParseStarImportSpecifier(node) { if (this.match(55)) { const specifier = this.startNode(); this.next(); this.expectContextual(93); this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier", "import namespace specifier"); return true; } return false; } parseNamedImportSpecifiers(node) { let first = true; this.expect(5); while (!this.eat(8)) { if (first) { first = false; } else { if (this.eat(14)) { throw this.raise(ErrorMessages.DestructureNamedImport, { at: this.state.startLoc }); } this.expect(12); if (this.eat(8)) break; } const specifier = this.startNode(); const importedIsString = this.match(129); const isMaybeTypeOnly = this.isContextual(126); specifier.imported = this.parseModuleExportName(); const importSpecifier = this.parseImportSpecifier(specifier, importedIsString, node.importKind === "type" || node.importKind === "typeof", isMaybeTypeOnly); node.specifiers.push(importSpecifier); } } parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly) { if (this.eatContextual(93)) { specifier.local = this.parseIdentifier(); } else { const { imported } = specifier; if (importedIsString) { throw this.raise(ErrorMessages.ImportBindingIsString, { node: specifier }, imported.value); } this.checkReservedWord(imported.name, specifier.loc.start, true, true); if (!specifier.local) { specifier.local = cloneIdentifier(imported); } } this.checkLVal(specifier.local, "import specifier", BIND_LEXICAL); return this.finishNode(specifier, "ImportSpecifier"); } isThisParam(param) { return param.type === "Identifier" && param.name === "this"; } }; var Parser = class extends StatementParser { constructor(options, input) { options = getOptions(options); super(options, input); this.options = options; this.initializeScopes(); this.plugins = pluginsMap(this.options.plugins); this.filename = options.sourceFilename; } getScopeHandler() { return ScopeHandler; } parse() { this.enterInitialScopes(); const file = this.startNode(); const program = this.startNode(); this.nextToken(); file.errors = null; this.parseTopLevel(file, program); file.errors = this.state.errors; return file; } }; function pluginsMap(plugins) { const pluginMap = /* @__PURE__ */ new Map(); for (const plugin of plugins) { const [name, options] = Array.isArray(plugin) ? plugin : [plugin, {}]; if (!pluginMap.has(name)) pluginMap.set(name, options || {}); } return pluginMap; } function parse(input, options) { var _options; if (((_options = options) == null ? void 0 : _options.sourceType) === "unambiguous") { options = Object.assign({}, options); try { options.sourceType = "module"; const parser = getParser(options, input); const ast = parser.parse(); if (parser.sawUnambiguousESM) { return ast; } if (parser.ambiguousScriptDifferentAst) { try { options.sourceType = "script"; return getParser(options, input).parse(); } catch (_unused) { } } else { ast.program.sourceType = "script"; } return ast; } catch (moduleError) { try { options.sourceType = "script"; return getParser(options, input).parse(); } catch (_unused2) { } throw moduleError; } } else { return getParser(options, input).parse(); } } function parseExpression(input, options) { const parser = getParser(options, input); if (parser.options.strictMode) { parser.state.strict = true; } return parser.getExpression(); } function generateExportedTokenTypes(internalTokenTypes) { const tokenTypes2 = {}; for (const typeName of Object.keys(internalTokenTypes)) { tokenTypes2[typeName] = getExportedToken(internalTokenTypes[typeName]); } return tokenTypes2; } var tokTypes = generateExportedTokenTypes(tt); function getParser(options, input) { let cls = Parser; if (options != null && options.plugins) { validatePlugins(options.plugins); cls = getParserClass(options.plugins); } return new cls(options, input); } var parserClassCache = {}; function getParserClass(pluginsFromOptions) { const pluginList = mixinPluginNames.filter((name) => hasPlugin(pluginsFromOptions, name)); const key = pluginList.join("/"); let cls = parserClassCache[key]; if (!cls) { cls = Parser; for (const plugin of pluginList) { cls = mixinPlugins[plugin](cls); } parserClassCache[key] = cls; } return cls; } exports2.parse = parse; exports2.parseExpression = parseExpression; exports2.tokTypes = tokTypes; } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/utils/shallowEqual.js var require_shallowEqual = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/utils/shallowEqual.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = shallowEqual; function shallowEqual(actual, expected) { const keys = Object.keys(expected); for (const key of keys) { if (actual[key] !== expected[key]) { return false; } } return true; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/generated/index.js var require_generated = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/generated/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isAccessor = isAccessor; exports2.isAnyTypeAnnotation = isAnyTypeAnnotation; exports2.isArgumentPlaceholder = isArgumentPlaceholder; exports2.isArrayExpression = isArrayExpression; exports2.isArrayPattern = isArrayPattern; exports2.isArrayTypeAnnotation = isArrayTypeAnnotation; exports2.isArrowFunctionExpression = isArrowFunctionExpression; exports2.isAssignmentExpression = isAssignmentExpression; exports2.isAssignmentPattern = isAssignmentPattern; exports2.isAwaitExpression = isAwaitExpression; exports2.isBigIntLiteral = isBigIntLiteral; exports2.isBinary = isBinary; exports2.isBinaryExpression = isBinaryExpression; exports2.isBindExpression = isBindExpression; exports2.isBlock = isBlock; exports2.isBlockParent = isBlockParent; exports2.isBlockStatement = isBlockStatement; exports2.isBooleanLiteral = isBooleanLiteral; exports2.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation; exports2.isBooleanTypeAnnotation = isBooleanTypeAnnotation; exports2.isBreakStatement = isBreakStatement; exports2.isCallExpression = isCallExpression; exports2.isCatchClause = isCatchClause; exports2.isClass = isClass; exports2.isClassAccessorProperty = isClassAccessorProperty; exports2.isClassBody = isClassBody; exports2.isClassDeclaration = isClassDeclaration; exports2.isClassExpression = isClassExpression; exports2.isClassImplements = isClassImplements; exports2.isClassMethod = isClassMethod; exports2.isClassPrivateMethod = isClassPrivateMethod; exports2.isClassPrivateProperty = isClassPrivateProperty; exports2.isClassProperty = isClassProperty; exports2.isCompletionStatement = isCompletionStatement; exports2.isConditional = isConditional; exports2.isConditionalExpression = isConditionalExpression; exports2.isContinueStatement = isContinueStatement; exports2.isDebuggerStatement = isDebuggerStatement; exports2.isDecimalLiteral = isDecimalLiteral; exports2.isDeclaration = isDeclaration; exports2.isDeclareClass = isDeclareClass; exports2.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration; exports2.isDeclareExportDeclaration = isDeclareExportDeclaration; exports2.isDeclareFunction = isDeclareFunction; exports2.isDeclareInterface = isDeclareInterface; exports2.isDeclareModule = isDeclareModule; exports2.isDeclareModuleExports = isDeclareModuleExports; exports2.isDeclareOpaqueType = isDeclareOpaqueType; exports2.isDeclareTypeAlias = isDeclareTypeAlias; exports2.isDeclareVariable = isDeclareVariable; exports2.isDeclaredPredicate = isDeclaredPredicate; exports2.isDecorator = isDecorator; exports2.isDirective = isDirective; exports2.isDirectiveLiteral = isDirectiveLiteral; exports2.isDoExpression = isDoExpression; exports2.isDoWhileStatement = isDoWhileStatement; exports2.isEmptyStatement = isEmptyStatement; exports2.isEmptyTypeAnnotation = isEmptyTypeAnnotation; exports2.isEnumBody = isEnumBody; exports2.isEnumBooleanBody = isEnumBooleanBody; exports2.isEnumBooleanMember = isEnumBooleanMember; exports2.isEnumDeclaration = isEnumDeclaration; exports2.isEnumDefaultedMember = isEnumDefaultedMember; exports2.isEnumMember = isEnumMember; exports2.isEnumNumberBody = isEnumNumberBody; exports2.isEnumNumberMember = isEnumNumberMember; exports2.isEnumStringBody = isEnumStringBody; exports2.isEnumStringMember = isEnumStringMember; exports2.isEnumSymbolBody = isEnumSymbolBody; exports2.isExistsTypeAnnotation = isExistsTypeAnnotation; exports2.isExportAllDeclaration = isExportAllDeclaration; exports2.isExportDeclaration = isExportDeclaration; exports2.isExportDefaultDeclaration = isExportDefaultDeclaration; exports2.isExportDefaultSpecifier = isExportDefaultSpecifier; exports2.isExportNamedDeclaration = isExportNamedDeclaration; exports2.isExportNamespaceSpecifier = isExportNamespaceSpecifier; exports2.isExportSpecifier = isExportSpecifier; exports2.isExpression = isExpression; exports2.isExpressionStatement = isExpressionStatement; exports2.isExpressionWrapper = isExpressionWrapper; exports2.isFile = isFile; exports2.isFlow = isFlow; exports2.isFlowBaseAnnotation = isFlowBaseAnnotation; exports2.isFlowDeclaration = isFlowDeclaration; exports2.isFlowPredicate = isFlowPredicate; exports2.isFlowType = isFlowType; exports2.isFor = isFor; exports2.isForInStatement = isForInStatement; exports2.isForOfStatement = isForOfStatement; exports2.isForStatement = isForStatement; exports2.isForXStatement = isForXStatement; exports2.isFunction = isFunction; exports2.isFunctionDeclaration = isFunctionDeclaration; exports2.isFunctionExpression = isFunctionExpression; exports2.isFunctionParent = isFunctionParent; exports2.isFunctionTypeAnnotation = isFunctionTypeAnnotation; exports2.isFunctionTypeParam = isFunctionTypeParam; exports2.isGenericTypeAnnotation = isGenericTypeAnnotation; exports2.isIdentifier = isIdentifier; exports2.isIfStatement = isIfStatement; exports2.isImmutable = isImmutable; exports2.isImport = isImport; exports2.isImportAttribute = isImportAttribute; exports2.isImportDeclaration = isImportDeclaration; exports2.isImportDefaultSpecifier = isImportDefaultSpecifier; exports2.isImportNamespaceSpecifier = isImportNamespaceSpecifier; exports2.isImportSpecifier = isImportSpecifier; exports2.isIndexedAccessType = isIndexedAccessType; exports2.isInferredPredicate = isInferredPredicate; exports2.isInterfaceDeclaration = isInterfaceDeclaration; exports2.isInterfaceExtends = isInterfaceExtends; exports2.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation; exports2.isInterpreterDirective = isInterpreterDirective; exports2.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation; exports2.isJSX = isJSX; exports2.isJSXAttribute = isJSXAttribute; exports2.isJSXClosingElement = isJSXClosingElement; exports2.isJSXClosingFragment = isJSXClosingFragment; exports2.isJSXElement = isJSXElement; exports2.isJSXEmptyExpression = isJSXEmptyExpression; exports2.isJSXExpressionContainer = isJSXExpressionContainer; exports2.isJSXFragment = isJSXFragment; exports2.isJSXIdentifier = isJSXIdentifier; exports2.isJSXMemberExpression = isJSXMemberExpression; exports2.isJSXNamespacedName = isJSXNamespacedName; exports2.isJSXOpeningElement = isJSXOpeningElement; exports2.isJSXOpeningFragment = isJSXOpeningFragment; exports2.isJSXSpreadAttribute = isJSXSpreadAttribute; exports2.isJSXSpreadChild = isJSXSpreadChild; exports2.isJSXText = isJSXText; exports2.isLVal = isLVal; exports2.isLabeledStatement = isLabeledStatement; exports2.isLiteral = isLiteral; exports2.isLogicalExpression = isLogicalExpression; exports2.isLoop = isLoop; exports2.isMemberExpression = isMemberExpression; exports2.isMetaProperty = isMetaProperty; exports2.isMethod = isMethod; exports2.isMiscellaneous = isMiscellaneous; exports2.isMixedTypeAnnotation = isMixedTypeAnnotation; exports2.isModuleDeclaration = isModuleDeclaration; exports2.isModuleExpression = isModuleExpression; exports2.isModuleSpecifier = isModuleSpecifier; exports2.isNewExpression = isNewExpression; exports2.isNoop = isNoop; exports2.isNullLiteral = isNullLiteral; exports2.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation; exports2.isNullableTypeAnnotation = isNullableTypeAnnotation; exports2.isNumberLiteral = isNumberLiteral; exports2.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation; exports2.isNumberTypeAnnotation = isNumberTypeAnnotation; exports2.isNumericLiteral = isNumericLiteral; exports2.isObjectExpression = isObjectExpression; exports2.isObjectMember = isObjectMember; exports2.isObjectMethod = isObjectMethod; exports2.isObjectPattern = isObjectPattern; exports2.isObjectProperty = isObjectProperty; exports2.isObjectTypeAnnotation = isObjectTypeAnnotation; exports2.isObjectTypeCallProperty = isObjectTypeCallProperty; exports2.isObjectTypeIndexer = isObjectTypeIndexer; exports2.isObjectTypeInternalSlot = isObjectTypeInternalSlot; exports2.isObjectTypeProperty = isObjectTypeProperty; exports2.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty; exports2.isOpaqueType = isOpaqueType; exports2.isOptionalCallExpression = isOptionalCallExpression; exports2.isOptionalIndexedAccessType = isOptionalIndexedAccessType; exports2.isOptionalMemberExpression = isOptionalMemberExpression; exports2.isParenthesizedExpression = isParenthesizedExpression; exports2.isPattern = isPattern; exports2.isPatternLike = isPatternLike; exports2.isPipelineBareFunction = isPipelineBareFunction; exports2.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference; exports2.isPipelineTopicExpression = isPipelineTopicExpression; exports2.isPlaceholder = isPlaceholder; exports2.isPrivate = isPrivate; exports2.isPrivateName = isPrivateName; exports2.isProgram = isProgram; exports2.isProperty = isProperty; exports2.isPureish = isPureish; exports2.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier; exports2.isRecordExpression = isRecordExpression; exports2.isRegExpLiteral = isRegExpLiteral; exports2.isRegexLiteral = isRegexLiteral; exports2.isRestElement = isRestElement; exports2.isRestProperty = isRestProperty; exports2.isReturnStatement = isReturnStatement; exports2.isScopable = isScopable; exports2.isSequenceExpression = isSequenceExpression; exports2.isSpreadElement = isSpreadElement; exports2.isSpreadProperty = isSpreadProperty; exports2.isStandardized = isStandardized; exports2.isStatement = isStatement; exports2.isStaticBlock = isStaticBlock; exports2.isStringLiteral = isStringLiteral; exports2.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation; exports2.isStringTypeAnnotation = isStringTypeAnnotation; exports2.isSuper = isSuper; exports2.isSwitchCase = isSwitchCase; exports2.isSwitchStatement = isSwitchStatement; exports2.isSymbolTypeAnnotation = isSymbolTypeAnnotation; exports2.isTSAnyKeyword = isTSAnyKeyword; exports2.isTSArrayType = isTSArrayType; exports2.isTSAsExpression = isTSAsExpression; exports2.isTSBaseType = isTSBaseType; exports2.isTSBigIntKeyword = isTSBigIntKeyword; exports2.isTSBooleanKeyword = isTSBooleanKeyword; exports2.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration; exports2.isTSConditionalType = isTSConditionalType; exports2.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration; exports2.isTSConstructorType = isTSConstructorType; exports2.isTSDeclareFunction = isTSDeclareFunction; exports2.isTSDeclareMethod = isTSDeclareMethod; exports2.isTSEntityName = isTSEntityName; exports2.isTSEnumDeclaration = isTSEnumDeclaration; exports2.isTSEnumMember = isTSEnumMember; exports2.isTSExportAssignment = isTSExportAssignment; exports2.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments; exports2.isTSExternalModuleReference = isTSExternalModuleReference; exports2.isTSFunctionType = isTSFunctionType; exports2.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration; exports2.isTSImportType = isTSImportType; exports2.isTSIndexSignature = isTSIndexSignature; exports2.isTSIndexedAccessType = isTSIndexedAccessType; exports2.isTSInferType = isTSInferType; exports2.isTSInterfaceBody = isTSInterfaceBody; exports2.isTSInterfaceDeclaration = isTSInterfaceDeclaration; exports2.isTSIntersectionType = isTSIntersectionType; exports2.isTSIntrinsicKeyword = isTSIntrinsicKeyword; exports2.isTSLiteralType = isTSLiteralType; exports2.isTSMappedType = isTSMappedType; exports2.isTSMethodSignature = isTSMethodSignature; exports2.isTSModuleBlock = isTSModuleBlock; exports2.isTSModuleDeclaration = isTSModuleDeclaration; exports2.isTSNamedTupleMember = isTSNamedTupleMember; exports2.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration; exports2.isTSNeverKeyword = isTSNeverKeyword; exports2.isTSNonNullExpression = isTSNonNullExpression; exports2.isTSNullKeyword = isTSNullKeyword; exports2.isTSNumberKeyword = isTSNumberKeyword; exports2.isTSObjectKeyword = isTSObjectKeyword; exports2.isTSOptionalType = isTSOptionalType; exports2.isTSParameterProperty = isTSParameterProperty; exports2.isTSParenthesizedType = isTSParenthesizedType; exports2.isTSPropertySignature = isTSPropertySignature; exports2.isTSQualifiedName = isTSQualifiedName; exports2.isTSRestType = isTSRestType; exports2.isTSStringKeyword = isTSStringKeyword; exports2.isTSSymbolKeyword = isTSSymbolKeyword; exports2.isTSThisType = isTSThisType; exports2.isTSTupleType = isTSTupleType; exports2.isTSType = isTSType; exports2.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration; exports2.isTSTypeAnnotation = isTSTypeAnnotation; exports2.isTSTypeAssertion = isTSTypeAssertion; exports2.isTSTypeElement = isTSTypeElement; exports2.isTSTypeLiteral = isTSTypeLiteral; exports2.isTSTypeOperator = isTSTypeOperator; exports2.isTSTypeParameter = isTSTypeParameter; exports2.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration; exports2.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation; exports2.isTSTypePredicate = isTSTypePredicate; exports2.isTSTypeQuery = isTSTypeQuery; exports2.isTSTypeReference = isTSTypeReference; exports2.isTSUndefinedKeyword = isTSUndefinedKeyword; exports2.isTSUnionType = isTSUnionType; exports2.isTSUnknownKeyword = isTSUnknownKeyword; exports2.isTSVoidKeyword = isTSVoidKeyword; exports2.isTaggedTemplateExpression = isTaggedTemplateExpression; exports2.isTemplateElement = isTemplateElement; exports2.isTemplateLiteral = isTemplateLiteral; exports2.isTerminatorless = isTerminatorless; exports2.isThisExpression = isThisExpression; exports2.isThisTypeAnnotation = isThisTypeAnnotation; exports2.isThrowStatement = isThrowStatement; exports2.isTopicReference = isTopicReference; exports2.isTryStatement = isTryStatement; exports2.isTupleExpression = isTupleExpression; exports2.isTupleTypeAnnotation = isTupleTypeAnnotation; exports2.isTypeAlias = isTypeAlias; exports2.isTypeAnnotation = isTypeAnnotation; exports2.isTypeCastExpression = isTypeCastExpression; exports2.isTypeParameter = isTypeParameter; exports2.isTypeParameterDeclaration = isTypeParameterDeclaration; exports2.isTypeParameterInstantiation = isTypeParameterInstantiation; exports2.isTypeScript = isTypeScript; exports2.isTypeofTypeAnnotation = isTypeofTypeAnnotation; exports2.isUnaryExpression = isUnaryExpression; exports2.isUnaryLike = isUnaryLike; exports2.isUnionTypeAnnotation = isUnionTypeAnnotation; exports2.isUpdateExpression = isUpdateExpression; exports2.isUserWhitespacable = isUserWhitespacable; exports2.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier; exports2.isVariableDeclaration = isVariableDeclaration; exports2.isVariableDeclarator = isVariableDeclarator; exports2.isVariance = isVariance; exports2.isVoidTypeAnnotation = isVoidTypeAnnotation; exports2.isWhile = isWhile; exports2.isWhileStatement = isWhileStatement; exports2.isWithStatement = isWithStatement; exports2.isYieldExpression = isYieldExpression; var _shallowEqual = require_shallowEqual(); function isArrayExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ArrayExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isAssignmentExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AssignmentExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBinaryExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BinaryExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isInterpreterDirective(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "InterpreterDirective") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDirective(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Directive") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDirectiveLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DirectiveLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBlockStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BlockStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBreakStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BreakStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isCallExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "CallExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isCatchClause(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "CatchClause") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isConditionalExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ConditionalExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isContinueStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ContinueStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDebuggerStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DebuggerStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDoWhileStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DoWhileStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEmptyStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EmptyStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExpressionStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExpressionStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFile(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "File") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isForInStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ForInStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isForStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ForStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFunctionDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFunctionExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isIdentifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Identifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isIfStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "IfStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isLabeledStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "LabeledStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isStringLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "StringLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNumericLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "NumericLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNullLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "NullLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBooleanLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BooleanLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isRegExpLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "RegExpLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isLogicalExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "LogicalExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isMemberExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "MemberExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNewExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "NewExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isProgram(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Program") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectMethod(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectMethod") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isRestElement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "RestElement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isReturnStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ReturnStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isSequenceExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "SequenceExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isParenthesizedExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ParenthesizedExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isSwitchCase(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "SwitchCase") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isSwitchStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "SwitchStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isThisExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ThisExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isThrowStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ThrowStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTryStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TryStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isUnaryExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "UnaryExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isUpdateExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "UpdateExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isVariableDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "VariableDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isVariableDeclarator(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "VariableDeclarator") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isWhileStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "WhileStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isWithStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "WithStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isAssignmentPattern(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AssignmentPattern") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isArrayPattern(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ArrayPattern") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isArrowFunctionExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ArrowFunctionExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassBody(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassBody") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExportAllDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportAllDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExportDefaultDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportDefaultDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExportNamedDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportNamedDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExportSpecifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportSpecifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isForOfStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ForOfStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isImportDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ImportDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isImportDefaultSpecifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ImportDefaultSpecifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isImportNamespaceSpecifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ImportNamespaceSpecifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isImportSpecifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ImportSpecifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isMetaProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "MetaProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassMethod(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassMethod") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectPattern(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectPattern") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isSpreadElement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "SpreadElement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isSuper(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Super") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTaggedTemplateExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TaggedTemplateExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTemplateElement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TemplateElement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTemplateLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TemplateLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isYieldExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "YieldExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isAwaitExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AwaitExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isImport(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Import") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBigIntLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BigIntLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExportNamespaceSpecifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportNamespaceSpecifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isOptionalMemberExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "OptionalMemberExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isOptionalCallExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "OptionalCallExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassAccessorProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassAccessorProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassPrivateProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassPrivateProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassPrivateMethod(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassPrivateMethod") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPrivateName(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "PrivateName") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isStaticBlock(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "StaticBlock") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isAnyTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AnyTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isArrayTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ArrayTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBooleanTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BooleanTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBooleanLiteralTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BooleanLiteralTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNullLiteralTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "NullLiteralTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassImplements(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassImplements") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareClass(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareClass") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareFunction(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareFunction") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareInterface(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareInterface") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareModule(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareModule") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareModuleExports(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareModuleExports") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareTypeAlias(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareTypeAlias") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareOpaqueType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareOpaqueType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareVariable(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareVariable") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareExportDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareExportDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareExportAllDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareExportAllDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclaredPredicate(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclaredPredicate") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExistsTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExistsTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFunctionTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFunctionTypeParam(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionTypeParam") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isGenericTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "GenericTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isInferredPredicate(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "InferredPredicate") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isInterfaceExtends(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "InterfaceExtends") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isInterfaceDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "InterfaceDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isInterfaceTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "InterfaceTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isIntersectionTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "IntersectionTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isMixedTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "MixedTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEmptyTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EmptyTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNullableTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "NullableTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNumberLiteralTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "NumberLiteralTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNumberTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "NumberTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectTypeInternalSlot(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectTypeInternalSlot") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectTypeCallProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectTypeCallProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectTypeIndexer(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectTypeIndexer") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectTypeProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectTypeProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectTypeSpreadProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectTypeSpreadProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isOpaqueType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "OpaqueType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isQualifiedTypeIdentifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "QualifiedTypeIdentifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isStringLiteralTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "StringLiteralTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isStringTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "StringTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isSymbolTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "SymbolTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isThisTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ThisTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTupleTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TupleTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeofTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TypeofTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeAlias(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TypeAlias") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeCastExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TypeCastExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeParameter(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TypeParameter") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeParameterDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TypeParameterDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeParameterInstantiation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TypeParameterInstantiation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isUnionTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "UnionTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isVariance(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Variance") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isVoidTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "VoidTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumBooleanBody(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumBooleanBody") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumNumberBody(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumNumberBody") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumStringBody(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumStringBody") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumSymbolBody(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumSymbolBody") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumBooleanMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumBooleanMember") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumNumberMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumNumberMember") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumStringMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumStringMember") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumDefaultedMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumDefaultedMember") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isIndexedAccessType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "IndexedAccessType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isOptionalIndexedAccessType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "OptionalIndexedAccessType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXAttribute(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXAttribute") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXClosingElement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXClosingElement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXElement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXElement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXEmptyExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXEmptyExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXExpressionContainer(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXExpressionContainer") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXSpreadChild(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXSpreadChild") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXIdentifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXIdentifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXMemberExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXMemberExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXNamespacedName(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXNamespacedName") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXOpeningElement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXOpeningElement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXSpreadAttribute(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXSpreadAttribute") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXText(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXText") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXFragment(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXFragment") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXOpeningFragment(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXOpeningFragment") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXClosingFragment(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXClosingFragment") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNoop(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Noop") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPlaceholder(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Placeholder") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isV8IntrinsicIdentifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "V8IntrinsicIdentifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isArgumentPlaceholder(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ArgumentPlaceholder") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBindExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BindExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isImportAttribute(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ImportAttribute") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDecorator(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Decorator") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDoExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DoExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExportDefaultSpecifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportDefaultSpecifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isRecordExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "RecordExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTupleExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TupleExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDecimalLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DecimalLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isModuleExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ModuleExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTopicReference(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TopicReference") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPipelineTopicExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "PipelineTopicExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPipelineBareFunction(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "PipelineBareFunction") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPipelinePrimaryTopicReference(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "PipelinePrimaryTopicReference") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSParameterProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSParameterProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSDeclareFunction(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSDeclareFunction") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSDeclareMethod(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSDeclareMethod") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSQualifiedName(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSQualifiedName") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSCallSignatureDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSCallSignatureDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSConstructSignatureDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSConstructSignatureDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSPropertySignature(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSPropertySignature") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSMethodSignature(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSMethodSignature") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSIndexSignature(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSIndexSignature") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSAnyKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSAnyKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSBooleanKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSBooleanKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSBigIntKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSBigIntKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSIntrinsicKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSIntrinsicKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSNeverKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSNeverKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSNullKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSNullKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSNumberKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSNumberKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSObjectKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSObjectKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSStringKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSStringKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSSymbolKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSSymbolKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSUndefinedKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSUndefinedKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSUnknownKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSUnknownKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSVoidKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSVoidKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSThisType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSThisType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSFunctionType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSFunctionType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSConstructorType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSConstructorType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeReference(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeReference") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypePredicate(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypePredicate") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeQuery(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeQuery") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSArrayType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSArrayType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTupleType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTupleType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSOptionalType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSOptionalType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSRestType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSRestType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSNamedTupleMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSNamedTupleMember") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSUnionType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSUnionType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSIntersectionType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSIntersectionType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSConditionalType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSConditionalType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSInferType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSInferType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSParenthesizedType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSParenthesizedType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeOperator(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeOperator") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSIndexedAccessType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSIndexedAccessType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSMappedType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSMappedType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSLiteralType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSLiteralType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSExpressionWithTypeArguments(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSExpressionWithTypeArguments") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSInterfaceDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSInterfaceDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSInterfaceBody(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSInterfaceBody") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeAliasDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeAliasDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSAsExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSAsExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeAssertion(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeAssertion") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSEnumDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSEnumDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSEnumMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSEnumMember") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSModuleDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSModuleDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSModuleBlock(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSModuleBlock") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSImportType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSImportType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSImportEqualsDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSImportEqualsDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSExternalModuleReference(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSExternalModuleReference") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSNonNullExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSNonNullExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSExportAssignment(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSExportAssignment") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSNamespaceExportDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSNamespaceExportDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeParameterInstantiation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeParameterInstantiation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeParameterDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeParameterDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeParameter(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeParameter") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isStandardized(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ArrayExpression" || nodeType === "AssignmentExpression" || nodeType === "BinaryExpression" || nodeType === "InterpreterDirective" || nodeType === "Directive" || nodeType === "DirectiveLiteral" || nodeType === "BlockStatement" || nodeType === "BreakStatement" || nodeType === "CallExpression" || nodeType === "CatchClause" || nodeType === "ConditionalExpression" || nodeType === "ContinueStatement" || nodeType === "DebuggerStatement" || nodeType === "DoWhileStatement" || nodeType === "EmptyStatement" || nodeType === "ExpressionStatement" || nodeType === "File" || nodeType === "ForInStatement" || nodeType === "ForStatement" || nodeType === "FunctionDeclaration" || nodeType === "FunctionExpression" || nodeType === "Identifier" || nodeType === "IfStatement" || nodeType === "LabeledStatement" || nodeType === "StringLiteral" || nodeType === "NumericLiteral" || nodeType === "NullLiteral" || nodeType === "BooleanLiteral" || nodeType === "RegExpLiteral" || nodeType === "LogicalExpression" || nodeType === "MemberExpression" || nodeType === "NewExpression" || nodeType === "Program" || nodeType === "ObjectExpression" || nodeType === "ObjectMethod" || nodeType === "ObjectProperty" || nodeType === "RestElement" || nodeType === "ReturnStatement" || nodeType === "SequenceExpression" || nodeType === "ParenthesizedExpression" || nodeType === "SwitchCase" || nodeType === "SwitchStatement" || nodeType === "ThisExpression" || nodeType === "ThrowStatement" || nodeType === "TryStatement" || nodeType === "UnaryExpression" || nodeType === "UpdateExpression" || nodeType === "VariableDeclaration" || nodeType === "VariableDeclarator" || nodeType === "WhileStatement" || nodeType === "WithStatement" || nodeType === "AssignmentPattern" || nodeType === "ArrayPattern" || nodeType === "ArrowFunctionExpression" || nodeType === "ClassBody" || nodeType === "ClassExpression" || nodeType === "ClassDeclaration" || nodeType === "ExportAllDeclaration" || nodeType === "ExportDefaultDeclaration" || nodeType === "ExportNamedDeclaration" || nodeType === "ExportSpecifier" || nodeType === "ForOfStatement" || nodeType === "ImportDeclaration" || nodeType === "ImportDefaultSpecifier" || nodeType === "ImportNamespaceSpecifier" || nodeType === "ImportSpecifier" || nodeType === "MetaProperty" || nodeType === "ClassMethod" || nodeType === "ObjectPattern" || nodeType === "SpreadElement" || nodeType === "Super" || nodeType === "TaggedTemplateExpression" || nodeType === "TemplateElement" || nodeType === "TemplateLiteral" || nodeType === "YieldExpression" || nodeType === "AwaitExpression" || nodeType === "Import" || nodeType === "BigIntLiteral" || nodeType === "ExportNamespaceSpecifier" || nodeType === "OptionalMemberExpression" || nodeType === "OptionalCallExpression" || nodeType === "ClassProperty" || nodeType === "ClassAccessorProperty" || nodeType === "ClassPrivateProperty" || nodeType === "ClassPrivateMethod" || nodeType === "PrivateName" || nodeType === "StaticBlock" || nodeType === "Placeholder" && (node.expectedNode === "Identifier" || node.expectedNode === "StringLiteral" || node.expectedNode === "BlockStatement" || node.expectedNode === "ClassBody")) { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ArrayExpression" || nodeType === "AssignmentExpression" || nodeType === "BinaryExpression" || nodeType === "CallExpression" || nodeType === "ConditionalExpression" || nodeType === "FunctionExpression" || nodeType === "Identifier" || nodeType === "StringLiteral" || nodeType === "NumericLiteral" || nodeType === "NullLiteral" || nodeType === "BooleanLiteral" || nodeType === "RegExpLiteral" || nodeType === "LogicalExpression" || nodeType === "MemberExpression" || nodeType === "NewExpression" || nodeType === "ObjectExpression" || nodeType === "SequenceExpression" || nodeType === "ParenthesizedExpression" || nodeType === "ThisExpression" || nodeType === "UnaryExpression" || nodeType === "UpdateExpression" || nodeType === "ArrowFunctionExpression" || nodeType === "ClassExpression" || nodeType === "MetaProperty" || nodeType === "Super" || nodeType === "TaggedTemplateExpression" || nodeType === "TemplateLiteral" || nodeType === "YieldExpression" || nodeType === "AwaitExpression" || nodeType === "Import" || nodeType === "BigIntLiteral" || nodeType === "OptionalMemberExpression" || nodeType === "OptionalCallExpression" || nodeType === "TypeCastExpression" || nodeType === "JSXElement" || nodeType === "JSXFragment" || nodeType === "BindExpression" || nodeType === "DoExpression" || nodeType === "RecordExpression" || nodeType === "TupleExpression" || nodeType === "DecimalLiteral" || nodeType === "ModuleExpression" || nodeType === "TopicReference" || nodeType === "PipelineTopicExpression" || nodeType === "PipelineBareFunction" || nodeType === "PipelinePrimaryTopicReference" || nodeType === "TSAsExpression" || nodeType === "TSTypeAssertion" || nodeType === "TSNonNullExpression" || nodeType === "Placeholder" && (node.expectedNode === "Expression" || node.expectedNode === "Identifier" || node.expectedNode === "StringLiteral")) { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBinary(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BinaryExpression" || nodeType === "LogicalExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isScopable(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BlockStatement" || nodeType === "CatchClause" || nodeType === "DoWhileStatement" || nodeType === "ForInStatement" || nodeType === "ForStatement" || nodeType === "FunctionDeclaration" || nodeType === "FunctionExpression" || nodeType === "Program" || nodeType === "ObjectMethod" || nodeType === "SwitchStatement" || nodeType === "WhileStatement" || nodeType === "ArrowFunctionExpression" || nodeType === "ClassExpression" || nodeType === "ClassDeclaration" || nodeType === "ForOfStatement" || nodeType === "ClassMethod" || nodeType === "ClassPrivateMethod" || nodeType === "StaticBlock" || nodeType === "TSModuleBlock" || nodeType === "Placeholder" && node.expectedNode === "BlockStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBlockParent(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BlockStatement" || nodeType === "CatchClause" || nodeType === "DoWhileStatement" || nodeType === "ForInStatement" || nodeType === "ForStatement" || nodeType === "FunctionDeclaration" || nodeType === "FunctionExpression" || nodeType === "Program" || nodeType === "ObjectMethod" || nodeType === "SwitchStatement" || nodeType === "WhileStatement" || nodeType === "ArrowFunctionExpression" || nodeType === "ForOfStatement" || nodeType === "ClassMethod" || nodeType === "ClassPrivateMethod" || nodeType === "StaticBlock" || nodeType === "TSModuleBlock" || nodeType === "Placeholder" && node.expectedNode === "BlockStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBlock(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BlockStatement" || nodeType === "Program" || nodeType === "TSModuleBlock" || nodeType === "Placeholder" && node.expectedNode === "BlockStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BlockStatement" || nodeType === "BreakStatement" || nodeType === "ContinueStatement" || nodeType === "DebuggerStatement" || nodeType === "DoWhileStatement" || nodeType === "EmptyStatement" || nodeType === "ExpressionStatement" || nodeType === "ForInStatement" || nodeType === "ForStatement" || nodeType === "FunctionDeclaration" || nodeType === "IfStatement" || nodeType === "LabeledStatement" || nodeType === "ReturnStatement" || nodeType === "SwitchStatement" || nodeType === "ThrowStatement" || nodeType === "TryStatement" || nodeType === "VariableDeclaration" || nodeType === "WhileStatement" || nodeType === "WithStatement" || nodeType === "ClassDeclaration" || nodeType === "ExportAllDeclaration" || nodeType === "ExportDefaultDeclaration" || nodeType === "ExportNamedDeclaration" || nodeType === "ForOfStatement" || nodeType === "ImportDeclaration" || nodeType === "DeclareClass" || nodeType === "DeclareFunction" || nodeType === "DeclareInterface" || nodeType === "DeclareModule" || nodeType === "DeclareModuleExports" || nodeType === "DeclareTypeAlias" || nodeType === "DeclareOpaqueType" || nodeType === "DeclareVariable" || nodeType === "DeclareExportDeclaration" || nodeType === "DeclareExportAllDeclaration" || nodeType === "InterfaceDeclaration" || nodeType === "OpaqueType" || nodeType === "TypeAlias" || nodeType === "EnumDeclaration" || nodeType === "TSDeclareFunction" || nodeType === "TSInterfaceDeclaration" || nodeType === "TSTypeAliasDeclaration" || nodeType === "TSEnumDeclaration" || nodeType === "TSModuleDeclaration" || nodeType === "TSImportEqualsDeclaration" || nodeType === "TSExportAssignment" || nodeType === "TSNamespaceExportDeclaration" || nodeType === "Placeholder" && (node.expectedNode === "Statement" || node.expectedNode === "Declaration" || node.expectedNode === "BlockStatement")) { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTerminatorless(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BreakStatement" || nodeType === "ContinueStatement" || nodeType === "ReturnStatement" || nodeType === "ThrowStatement" || nodeType === "YieldExpression" || nodeType === "AwaitExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isCompletionStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BreakStatement" || nodeType === "ContinueStatement" || nodeType === "ReturnStatement" || nodeType === "ThrowStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isConditional(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ConditionalExpression" || nodeType === "IfStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isLoop(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DoWhileStatement" || nodeType === "ForInStatement" || nodeType === "ForStatement" || nodeType === "WhileStatement" || nodeType === "ForOfStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isWhile(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DoWhileStatement" || nodeType === "WhileStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExpressionWrapper(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExpressionStatement" || nodeType === "ParenthesizedExpression" || nodeType === "TypeCastExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFor(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ForInStatement" || nodeType === "ForStatement" || nodeType === "ForOfStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isForXStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ForInStatement" || nodeType === "ForOfStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFunction(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionDeclaration" || nodeType === "FunctionExpression" || nodeType === "ObjectMethod" || nodeType === "ArrowFunctionExpression" || nodeType === "ClassMethod" || nodeType === "ClassPrivateMethod") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFunctionParent(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionDeclaration" || nodeType === "FunctionExpression" || nodeType === "ObjectMethod" || nodeType === "ArrowFunctionExpression" || nodeType === "ClassMethod" || nodeType === "ClassPrivateMethod" || nodeType === "StaticBlock") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPureish(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionDeclaration" || nodeType === "FunctionExpression" || nodeType === "StringLiteral" || nodeType === "NumericLiteral" || nodeType === "NullLiteral" || nodeType === "BooleanLiteral" || nodeType === "RegExpLiteral" || nodeType === "ArrowFunctionExpression" || nodeType === "BigIntLiteral" || nodeType === "DecimalLiteral" || nodeType === "Placeholder" && node.expectedNode === "StringLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionDeclaration" || nodeType === "VariableDeclaration" || nodeType === "ClassDeclaration" || nodeType === "ExportAllDeclaration" || nodeType === "ExportDefaultDeclaration" || nodeType === "ExportNamedDeclaration" || nodeType === "ImportDeclaration" || nodeType === "DeclareClass" || nodeType === "DeclareFunction" || nodeType === "DeclareInterface" || nodeType === "DeclareModule" || nodeType === "DeclareModuleExports" || nodeType === "DeclareTypeAlias" || nodeType === "DeclareOpaqueType" || nodeType === "DeclareVariable" || nodeType === "DeclareExportDeclaration" || nodeType === "DeclareExportAllDeclaration" || nodeType === "InterfaceDeclaration" || nodeType === "OpaqueType" || nodeType === "TypeAlias" || nodeType === "EnumDeclaration" || nodeType === "TSDeclareFunction" || nodeType === "TSInterfaceDeclaration" || nodeType === "TSTypeAliasDeclaration" || nodeType === "TSEnumDeclaration" || nodeType === "TSModuleDeclaration" || nodeType === "Placeholder" && node.expectedNode === "Declaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPatternLike(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Identifier" || nodeType === "RestElement" || nodeType === "AssignmentPattern" || nodeType === "ArrayPattern" || nodeType === "ObjectPattern" || nodeType === "Placeholder" && (node.expectedNode === "Pattern" || node.expectedNode === "Identifier")) { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isLVal(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Identifier" || nodeType === "MemberExpression" || nodeType === "RestElement" || nodeType === "AssignmentPattern" || nodeType === "ArrayPattern" || nodeType === "ObjectPattern" || nodeType === "TSParameterProperty" || nodeType === "Placeholder" && (node.expectedNode === "Pattern" || node.expectedNode === "Identifier")) { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSEntityName(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Identifier" || nodeType === "TSQualifiedName" || nodeType === "Placeholder" && node.expectedNode === "Identifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "StringLiteral" || nodeType === "NumericLiteral" || nodeType === "NullLiteral" || nodeType === "BooleanLiteral" || nodeType === "RegExpLiteral" || nodeType === "TemplateLiteral" || nodeType === "BigIntLiteral" || nodeType === "DecimalLiteral" || nodeType === "Placeholder" && node.expectedNode === "StringLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isImmutable(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "StringLiteral" || nodeType === "NumericLiteral" || nodeType === "NullLiteral" || nodeType === "BooleanLiteral" || nodeType === "BigIntLiteral" || nodeType === "JSXAttribute" || nodeType === "JSXClosingElement" || nodeType === "JSXElement" || nodeType === "JSXExpressionContainer" || nodeType === "JSXSpreadChild" || nodeType === "JSXOpeningElement" || nodeType === "JSXText" || nodeType === "JSXFragment" || nodeType === "JSXOpeningFragment" || nodeType === "JSXClosingFragment" || nodeType === "DecimalLiteral" || nodeType === "Placeholder" && node.expectedNode === "StringLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isUserWhitespacable(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectMethod" || nodeType === "ObjectProperty" || nodeType === "ObjectTypeInternalSlot" || nodeType === "ObjectTypeCallProperty" || nodeType === "ObjectTypeIndexer" || nodeType === "ObjectTypeProperty" || nodeType === "ObjectTypeSpreadProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isMethod(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectMethod" || nodeType === "ClassMethod" || nodeType === "ClassPrivateMethod") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectMethod" || nodeType === "ObjectProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectProperty" || nodeType === "ClassProperty" || nodeType === "ClassAccessorProperty" || nodeType === "ClassPrivateProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isUnaryLike(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "UnaryExpression" || nodeType === "SpreadElement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPattern(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AssignmentPattern" || nodeType === "ArrayPattern" || nodeType === "ObjectPattern" || nodeType === "Placeholder" && node.expectedNode === "Pattern") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClass(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassExpression" || nodeType === "ClassDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isModuleDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportAllDeclaration" || nodeType === "ExportDefaultDeclaration" || nodeType === "ExportNamedDeclaration" || nodeType === "ImportDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExportDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportAllDeclaration" || nodeType === "ExportDefaultDeclaration" || nodeType === "ExportNamedDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isModuleSpecifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportSpecifier" || nodeType === "ImportDefaultSpecifier" || nodeType === "ImportNamespaceSpecifier" || nodeType === "ImportSpecifier" || nodeType === "ExportNamespaceSpecifier" || nodeType === "ExportDefaultSpecifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isAccessor(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassAccessorProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPrivate(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassPrivateProperty" || nodeType === "ClassPrivateMethod" || nodeType === "PrivateName") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFlow(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AnyTypeAnnotation" || nodeType === "ArrayTypeAnnotation" || nodeType === "BooleanTypeAnnotation" || nodeType === "BooleanLiteralTypeAnnotation" || nodeType === "NullLiteralTypeAnnotation" || nodeType === "ClassImplements" || nodeType === "DeclareClass" || nodeType === "DeclareFunction" || nodeType === "DeclareInterface" || nodeType === "DeclareModule" || nodeType === "DeclareModuleExports" || nodeType === "DeclareTypeAlias" || nodeType === "DeclareOpaqueType" || nodeType === "DeclareVariable" || nodeType === "DeclareExportDeclaration" || nodeType === "DeclareExportAllDeclaration" || nodeType === "DeclaredPredicate" || nodeType === "ExistsTypeAnnotation" || nodeType === "FunctionTypeAnnotation" || nodeType === "FunctionTypeParam" || nodeType === "GenericTypeAnnotation" || nodeType === "InferredPredicate" || nodeType === "InterfaceExtends" || nodeType === "InterfaceDeclaration" || nodeType === "InterfaceTypeAnnotation" || nodeType === "IntersectionTypeAnnotation" || nodeType === "MixedTypeAnnotation" || nodeType === "EmptyTypeAnnotation" || nodeType === "NullableTypeAnnotation" || nodeType === "NumberLiteralTypeAnnotation" || nodeType === "NumberTypeAnnotation" || nodeType === "ObjectTypeAnnotation" || nodeType === "ObjectTypeInternalSlot" || nodeType === "ObjectTypeCallProperty" || nodeType === "ObjectTypeIndexer" || nodeType === "ObjectTypeProperty" || nodeType === "ObjectTypeSpreadProperty" || nodeType === "OpaqueType" || nodeType === "QualifiedTypeIdentifier" || nodeType === "StringLiteralTypeAnnotation" || nodeType === "StringTypeAnnotation" || nodeType === "SymbolTypeAnnotation" || nodeType === "ThisTypeAnnotation" || nodeType === "TupleTypeAnnotation" || nodeType === "TypeofTypeAnnotation" || nodeType === "TypeAlias" || nodeType === "TypeAnnotation" || nodeType === "TypeCastExpression" || nodeType === "TypeParameter" || nodeType === "TypeParameterDeclaration" || nodeType === "TypeParameterInstantiation" || nodeType === "UnionTypeAnnotation" || nodeType === "Variance" || nodeType === "VoidTypeAnnotation" || nodeType === "EnumDeclaration" || nodeType === "EnumBooleanBody" || nodeType === "EnumNumberBody" || nodeType === "EnumStringBody" || nodeType === "EnumSymbolBody" || nodeType === "EnumBooleanMember" || nodeType === "EnumNumberMember" || nodeType === "EnumStringMember" || nodeType === "EnumDefaultedMember" || nodeType === "IndexedAccessType" || nodeType === "OptionalIndexedAccessType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFlowType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AnyTypeAnnotation" || nodeType === "ArrayTypeAnnotation" || nodeType === "BooleanTypeAnnotation" || nodeType === "BooleanLiteralTypeAnnotation" || nodeType === "NullLiteralTypeAnnotation" || nodeType === "ExistsTypeAnnotation" || nodeType === "FunctionTypeAnnotation" || nodeType === "GenericTypeAnnotation" || nodeType === "InterfaceTypeAnnotation" || nodeType === "IntersectionTypeAnnotation" || nodeType === "MixedTypeAnnotation" || nodeType === "EmptyTypeAnnotation" || nodeType === "NullableTypeAnnotation" || nodeType === "NumberLiteralTypeAnnotation" || nodeType === "NumberTypeAnnotation" || nodeType === "ObjectTypeAnnotation" || nodeType === "StringLiteralTypeAnnotation" || nodeType === "StringTypeAnnotation" || nodeType === "SymbolTypeAnnotation" || nodeType === "ThisTypeAnnotation" || nodeType === "TupleTypeAnnotation" || nodeType === "TypeofTypeAnnotation" || nodeType === "UnionTypeAnnotation" || nodeType === "VoidTypeAnnotation" || nodeType === "IndexedAccessType" || nodeType === "OptionalIndexedAccessType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFlowBaseAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AnyTypeAnnotation" || nodeType === "BooleanTypeAnnotation" || nodeType === "NullLiteralTypeAnnotation" || nodeType === "MixedTypeAnnotation" || nodeType === "EmptyTypeAnnotation" || nodeType === "NumberTypeAnnotation" || nodeType === "StringTypeAnnotation" || nodeType === "SymbolTypeAnnotation" || nodeType === "ThisTypeAnnotation" || nodeType === "VoidTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFlowDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareClass" || nodeType === "DeclareFunction" || nodeType === "DeclareInterface" || nodeType === "DeclareModule" || nodeType === "DeclareModuleExports" || nodeType === "DeclareTypeAlias" || nodeType === "DeclareOpaqueType" || nodeType === "DeclareVariable" || nodeType === "DeclareExportDeclaration" || nodeType === "DeclareExportAllDeclaration" || nodeType === "InterfaceDeclaration" || nodeType === "OpaqueType" || nodeType === "TypeAlias") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFlowPredicate(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclaredPredicate" || nodeType === "InferredPredicate") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumBody(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumBooleanBody" || nodeType === "EnumNumberBody" || nodeType === "EnumStringBody" || nodeType === "EnumSymbolBody") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumBooleanMember" || nodeType === "EnumNumberMember" || nodeType === "EnumStringMember" || nodeType === "EnumDefaultedMember") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSX(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXAttribute" || nodeType === "JSXClosingElement" || nodeType === "JSXElement" || nodeType === "JSXEmptyExpression" || nodeType === "JSXExpressionContainer" || nodeType === "JSXSpreadChild" || nodeType === "JSXIdentifier" || nodeType === "JSXMemberExpression" || nodeType === "JSXNamespacedName" || nodeType === "JSXOpeningElement" || nodeType === "JSXSpreadAttribute" || nodeType === "JSXText" || nodeType === "JSXFragment" || nodeType === "JSXOpeningFragment" || nodeType === "JSXClosingFragment") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isMiscellaneous(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Noop" || nodeType === "Placeholder" || nodeType === "V8IntrinsicIdentifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeScript(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSParameterProperty" || nodeType === "TSDeclareFunction" || nodeType === "TSDeclareMethod" || nodeType === "TSQualifiedName" || nodeType === "TSCallSignatureDeclaration" || nodeType === "TSConstructSignatureDeclaration" || nodeType === "TSPropertySignature" || nodeType === "TSMethodSignature" || nodeType === "TSIndexSignature" || nodeType === "TSAnyKeyword" || nodeType === "TSBooleanKeyword" || nodeType === "TSBigIntKeyword" || nodeType === "TSIntrinsicKeyword" || nodeType === "TSNeverKeyword" || nodeType === "TSNullKeyword" || nodeType === "TSNumberKeyword" || nodeType === "TSObjectKeyword" || nodeType === "TSStringKeyword" || nodeType === "TSSymbolKeyword" || nodeType === "TSUndefinedKeyword" || nodeType === "TSUnknownKeyword" || nodeType === "TSVoidKeyword" || nodeType === "TSThisType" || nodeType === "TSFunctionType" || nodeType === "TSConstructorType" || nodeType === "TSTypeReference" || nodeType === "TSTypePredicate" || nodeType === "TSTypeQuery" || nodeType === "TSTypeLiteral" || nodeType === "TSArrayType" || nodeType === "TSTupleType" || nodeType === "TSOptionalType" || nodeType === "TSRestType" || nodeType === "TSNamedTupleMember" || nodeType === "TSUnionType" || nodeType === "TSIntersectionType" || nodeType === "TSConditionalType" || nodeType === "TSInferType" || nodeType === "TSParenthesizedType" || nodeType === "TSTypeOperator" || nodeType === "TSIndexedAccessType" || nodeType === "TSMappedType" || nodeType === "TSLiteralType" || nodeType === "TSExpressionWithTypeArguments" || nodeType === "TSInterfaceDeclaration" || nodeType === "TSInterfaceBody" || nodeType === "TSTypeAliasDeclaration" || nodeType === "TSAsExpression" || nodeType === "TSTypeAssertion" || nodeType === "TSEnumDeclaration" || nodeType === "TSEnumMember" || nodeType === "TSModuleDeclaration" || nodeType === "TSModuleBlock" || nodeType === "TSImportType" || nodeType === "TSImportEqualsDeclaration" || nodeType === "TSExternalModuleReference" || nodeType === "TSNonNullExpression" || nodeType === "TSExportAssignment" || nodeType === "TSNamespaceExportDeclaration" || nodeType === "TSTypeAnnotation" || nodeType === "TSTypeParameterInstantiation" || nodeType === "TSTypeParameterDeclaration" || nodeType === "TSTypeParameter") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeElement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSCallSignatureDeclaration" || nodeType === "TSConstructSignatureDeclaration" || nodeType === "TSPropertySignature" || nodeType === "TSMethodSignature" || nodeType === "TSIndexSignature") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSAnyKeyword" || nodeType === "TSBooleanKeyword" || nodeType === "TSBigIntKeyword" || nodeType === "TSIntrinsicKeyword" || nodeType === "TSNeverKeyword" || nodeType === "TSNullKeyword" || nodeType === "TSNumberKeyword" || nodeType === "TSObjectKeyword" || nodeType === "TSStringKeyword" || nodeType === "TSSymbolKeyword" || nodeType === "TSUndefinedKeyword" || nodeType === "TSUnknownKeyword" || nodeType === "TSVoidKeyword" || nodeType === "TSThisType" || nodeType === "TSFunctionType" || nodeType === "TSConstructorType" || nodeType === "TSTypeReference" || nodeType === "TSTypePredicate" || nodeType === "TSTypeQuery" || nodeType === "TSTypeLiteral" || nodeType === "TSArrayType" || nodeType === "TSTupleType" || nodeType === "TSOptionalType" || nodeType === "TSRestType" || nodeType === "TSUnionType" || nodeType === "TSIntersectionType" || nodeType === "TSConditionalType" || nodeType === "TSInferType" || nodeType === "TSParenthesizedType" || nodeType === "TSTypeOperator" || nodeType === "TSIndexedAccessType" || nodeType === "TSMappedType" || nodeType === "TSLiteralType" || nodeType === "TSExpressionWithTypeArguments" || nodeType === "TSImportType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSBaseType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSAnyKeyword" || nodeType === "TSBooleanKeyword" || nodeType === "TSBigIntKeyword" || nodeType === "TSIntrinsicKeyword" || nodeType === "TSNeverKeyword" || nodeType === "TSNullKeyword" || nodeType === "TSNumberKeyword" || nodeType === "TSObjectKeyword" || nodeType === "TSStringKeyword" || nodeType === "TSSymbolKeyword" || nodeType === "TSUndefinedKeyword" || nodeType === "TSUnknownKeyword" || nodeType === "TSVoidKeyword" || nodeType === "TSThisType" || nodeType === "TSLiteralType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNumberLiteral(node, opts) { console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); if (!node) return false; const nodeType = node.type; if (nodeType === "NumberLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isRegexLiteral(node, opts) { console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); if (!node) return false; const nodeType = node.type; if (nodeType === "RegexLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isRestProperty(node, opts) { console.trace("The node type RestProperty has been renamed to RestElement"); if (!node) return false; const nodeType = node.type; if (nodeType === "RestProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isSpreadProperty(node, opts) { console.trace("The node type SpreadProperty has been renamed to SpreadElement"); if (!node) return false; const nodeType = node.type; if (nodeType === "SpreadProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/matchesPattern.js var require_matchesPattern = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/matchesPattern.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = matchesPattern; var _generated = require_generated(); function matchesPattern(member, match, allowPartial) { if (!(0, _generated.isMemberExpression)(member)) return false; const parts = Array.isArray(match) ? match : match.split("."); const nodes = []; let node; for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) { nodes.push(node.property); } nodes.push(node); if (nodes.length < parts.length) return false; if (!allowPartial && nodes.length > parts.length) return false; for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) { const node2 = nodes[j]; let value; if ((0, _generated.isIdentifier)(node2)) { value = node2.name; } else if ((0, _generated.isStringLiteral)(node2)) { value = node2.value; } else if ((0, _generated.isThisExpression)(node2)) { value = "this"; } else { return false; } if (parts[i] !== value) return false; } return true; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js var require_buildMatchMemberExpression = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = buildMatchMemberExpression; var _matchesPattern = require_matchesPattern(); function buildMatchMemberExpression(match, allowPartial) { const parts = match.split("."); return (member) => (0, _matchesPattern.default)(member, parts, allowPartial); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/react/isReactComponent.js var require_isReactComponent = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/react/isReactComponent.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var _buildMatchMemberExpression = require_buildMatchMemberExpression(); var isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component"); var _default = isReactComponent; exports2.default = _default; } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/react/isCompatTag.js var require_isCompatTag = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/react/isCompatTag.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isCompatTag; function isCompatTag(tagName) { return !!tagName && /^[a-z]/.test(tagName); } } }); // ../../node_modules/to-fast-properties/index.js var require_to_fast_properties = __commonJS({ "../../node_modules/to-fast-properties/index.js"(exports2, module2) { "use strict"; var fastProto = null; function FastObject(o) { if (fastProto !== null && typeof fastProto.property) { const result = fastProto; fastProto = FastObject.prototype = null; return result; } fastProto = FastObject.prototype = o == null ? /* @__PURE__ */ Object.create(null) : o; return new FastObject(); } FastObject(); module2.exports = function toFastproperties(o) { return FastObject(o); }; } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isType.js var require_isType = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isType.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isType; var _definitions = require_definitions(); function isType(nodeType, targetType) { if (nodeType === targetType) return true; if (_definitions.ALIAS_KEYS[targetType]) return false; const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType]; if (aliases) { if (aliases[0] === nodeType) return true; for (const alias of aliases) { if (nodeType === alias) return true; } } return false; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isPlaceholderType.js var require_isPlaceholderType = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isPlaceholderType.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isPlaceholderType; var _definitions = require_definitions(); function isPlaceholderType(placeholderType, targetType) { if (placeholderType === targetType) return true; const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType]; if (aliases) { for (const alias of aliases) { if (targetType === alias) return true; } } return false; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/is.js var require_is = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/is.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = is; var _shallowEqual = require_shallowEqual(); var _isType = require_isType(); var _isPlaceholderType = require_isPlaceholderType(); var _definitions = require_definitions(); function is(type, node, opts) { if (!node) return false; const matches = (0, _isType.default)(node.type, type); if (!matches) { if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) { return (0, _isPlaceholderType.default)(node.expectedNode, type); } return false; } if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } } }); // node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier/lib/identifier.js var require_identifier = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isIdentifierChar = isIdentifierChar; exports2.isIdentifierName = isIdentifierName; exports2.isIdentifierStart = isIdentifierStart; var nonASCIIidentifierStartChars = "\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"; var nonASCIIidentifierChars = "\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\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-\u0ECD\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\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\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"; var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; var astralIdentifierStartCodes = [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, 85, 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, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 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, 46, 2, 18, 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, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 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, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938]; var astralIdentifierCodes = [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, 154, 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, 161, 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, 19306, 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, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; function isInAstralSet(code, set) { let pos = 65536; for (let i = 0, length = set.length; i < length; i += 2) { pos += set[i]; if (pos > code) return false; pos += set[i + 1]; if (pos >= code) return true; } return false; } function isIdentifierStart(code) { if (code < 65) return code === 36; if (code <= 90) return true; if (code < 97) return code === 95; if (code <= 122) return true; if (code <= 65535) { return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code)); } return isInAstralSet(code, astralIdentifierStartCodes); } function isIdentifierChar(code) { if (code < 48) return code === 36; if (code < 58) return true; if (code < 65) return false; if (code <= 90) return true; if (code < 97) return code === 95; if (code <= 122) return true; if (code <= 65535) { return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code)); } return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); } function isIdentifierName(name) { let isFirst = true; for (let i = 0; i < name.length; i++) { let cp = name.charCodeAt(i); if ((cp & 64512) === 55296 && i + 1 < name.length) { const trail = name.charCodeAt(++i); if ((trail & 64512) === 56320) { cp = 65536 + ((cp & 1023) << 10) + (trail & 1023); } } if (isFirst) { isFirst = false; if (!isIdentifierStart(cp)) { return false; } } else if (!isIdentifierChar(cp)) { return false; } } return !isFirst; } } }); // node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier/lib/keyword.js var require_keyword = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isKeyword = isKeyword; exports2.isReservedWord = isReservedWord; exports2.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord; exports2.isStrictBindReservedWord = isStrictBindReservedWord; exports2.isStrictReservedWord = isStrictReservedWord; var reservedWords = { 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"] }; var keywords = new Set(reservedWords.keyword); var reservedWordsStrictSet = new Set(reservedWords.strict); var reservedWordsStrictBindSet = new Set(reservedWords.strictBind); function isReservedWord(word, inModule) { return inModule && word === "await" || word === "enum"; } function isStrictReservedWord(word, inModule) { return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); } function isStrictBindOnlyReservedWord(word) { return reservedWordsStrictBindSet.has(word); } function isStrictBindReservedWord(word, inModule) { return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); } function isKeyword(word) { return keywords.has(word); } } }); // node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier/lib/index.js var require_lib3 = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "isIdentifierChar", { enumerable: true, get: function() { return _identifier.isIdentifierChar; } }); Object.defineProperty(exports2, "isIdentifierName", { enumerable: true, get: function() { return _identifier.isIdentifierName; } }); Object.defineProperty(exports2, "isIdentifierStart", { enumerable: true, get: function() { return _identifier.isIdentifierStart; } }); Object.defineProperty(exports2, "isKeyword", { enumerable: true, get: function() { return _keyword.isKeyword; } }); Object.defineProperty(exports2, "isReservedWord", { enumerable: true, get: function() { return _keyword.isReservedWord; } }); Object.defineProperty(exports2, "isStrictBindOnlyReservedWord", { enumerable: true, get: function() { return _keyword.isStrictBindOnlyReservedWord; } }); Object.defineProperty(exports2, "isStrictBindReservedWord", { enumerable: true, get: function() { return _keyword.isStrictBindReservedWord; } }); Object.defineProperty(exports2, "isStrictReservedWord", { enumerable: true, get: function() { return _keyword.isStrictReservedWord; } }); var _identifier = require_identifier(); var _keyword = require_keyword(); } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isValidIdentifier.js var require_isValidIdentifier = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isValidIdentifier.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isValidIdentifier; var _helperValidatorIdentifier = require_lib3(); function isValidIdentifier(name, reserved = true) { if (typeof name !== "string") return false; if (reserved) { if ((0, _helperValidatorIdentifier.isKeyword)(name) || (0, _helperValidatorIdentifier.isStrictReservedWord)(name, true)) { return false; } } return (0, _helperValidatorIdentifier.isIdentifierName)(name); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/constants/index.js var require_constants2 = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/constants/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UPDATE_OPERATORS = exports2.UNARY_OPERATORS = exports2.STRING_UNARY_OPERATORS = exports2.STATEMENT_OR_BLOCK_KEYS = exports2.NUMBER_UNARY_OPERATORS = exports2.NUMBER_BINARY_OPERATORS = exports2.NOT_LOCAL_BINDING = exports2.LOGICAL_OPERATORS = exports2.INHERIT_KEYS = exports2.FOR_INIT_KEYS = exports2.FLATTENABLE_KEYS = exports2.EQUALITY_BINARY_OPERATORS = exports2.COMPARISON_BINARY_OPERATORS = exports2.COMMENT_KEYS = exports2.BOOLEAN_UNARY_OPERATORS = exports2.BOOLEAN_NUMBER_BINARY_OPERATORS = exports2.BOOLEAN_BINARY_OPERATORS = exports2.BLOCK_SCOPED_SYMBOL = exports2.BINARY_OPERATORS = exports2.ASSIGNMENT_OPERATORS = void 0; var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"]; exports2.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS; var FLATTENABLE_KEYS = ["body", "expressions"]; exports2.FLATTENABLE_KEYS = FLATTENABLE_KEYS; var FOR_INIT_KEYS = ["left", "init"]; exports2.FOR_INIT_KEYS = FOR_INIT_KEYS; var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"]; exports2.COMMENT_KEYS = COMMENT_KEYS; var LOGICAL_OPERATORS = ["||", "&&", "??"]; exports2.LOGICAL_OPERATORS = LOGICAL_OPERATORS; var UPDATE_OPERATORS = ["++", "--"]; exports2.UPDATE_OPERATORS = UPDATE_OPERATORS; var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="]; exports2.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS; var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="]; exports2.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS; var COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"]; exports2.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS; var BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS]; exports2.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS; var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"]; exports2.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS; var BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS]; exports2.BINARY_OPERATORS = BINARY_OPERATORS; var ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map((op) => op + "="), ...LOGICAL_OPERATORS.map((op) => op + "=")]; exports2.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS; var BOOLEAN_UNARY_OPERATORS = ["delete", "!"]; exports2.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS; var NUMBER_UNARY_OPERATORS = ["+", "-", "~"]; exports2.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS; var STRING_UNARY_OPERATORS = ["typeof"]; exports2.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS; var UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS]; exports2.UNARY_OPERATORS = UNARY_OPERATORS; var INHERIT_KEYS = { optional: ["typeAnnotation", "typeParameters", "returnType"], force: ["start", "loc", "end"] }; exports2.INHERIT_KEYS = INHERIT_KEYS; var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped"); exports2.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL; var NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding"); exports2.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING; } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/validate.js var require_validate = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/validate.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = validate; exports2.validateChild = validateChild; exports2.validateField = validateField; var _definitions = require_definitions(); function validate(node, key, val) { if (!node) return; const fields = _definitions.NODE_FIELDS[node.type]; if (!fields) return; const field = fields[key]; validateField(node, key, val, field); validateChild(node, key, val); } function validateField(node, key, val, field) { if (!(field != null && field.validate)) return; if (field.optional && val == null) return; field.validate(node, key, val); } function validateChild(node, key, val) { if (val == null) return; const validate2 = _definitions.NODE_PARENT_VALIDATIONS[val.type]; if (!validate2) return; validate2(node, key, val); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/definitions/utils.js var require_utils3 = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/definitions/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.VISITOR_KEYS = exports2.NODE_PARENT_VALIDATIONS = exports2.NODE_FIELDS = exports2.FLIPPED_ALIAS_KEYS = exports2.DEPRECATED_KEYS = exports2.BUILDER_KEYS = exports2.ALIAS_KEYS = void 0; exports2.arrayOf = arrayOf; exports2.arrayOfType = arrayOfType; exports2.assertEach = assertEach; exports2.assertNodeOrValueType = assertNodeOrValueType; exports2.assertNodeType = assertNodeType; exports2.assertOneOf = assertOneOf; exports2.assertOptionalChainStart = assertOptionalChainStart; exports2.assertShape = assertShape; exports2.assertValueType = assertValueType; exports2.chain = chain; exports2.default = defineType; exports2.defineAliasedType = defineAliasedType; exports2.typeIs = typeIs; exports2.validate = validate; exports2.validateArrayOfType = validateArrayOfType; exports2.validateOptional = validateOptional; exports2.validateOptionalType = validateOptionalType; exports2.validateType = validateType; var _is = require_is(); var _validate = require_validate(); var VISITOR_KEYS = {}; exports2.VISITOR_KEYS = VISITOR_KEYS; var ALIAS_KEYS = {}; exports2.ALIAS_KEYS = ALIAS_KEYS; var FLIPPED_ALIAS_KEYS = {}; exports2.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS; var NODE_FIELDS = {}; exports2.NODE_FIELDS = NODE_FIELDS; var BUILDER_KEYS = {}; exports2.BUILDER_KEYS = BUILDER_KEYS; var DEPRECATED_KEYS = {}; exports2.DEPRECATED_KEYS = DEPRECATED_KEYS; var NODE_PARENT_VALIDATIONS = {}; exports2.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS; function getType(val) { if (Array.isArray(val)) { return "array"; } else if (val === null) { return "null"; } else { return typeof val; } } function validate(validate2) { return { validate: validate2 }; } function typeIs(typeName) { return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName); } function validateType(typeName) { return validate(typeIs(typeName)); } function validateOptional(validate2) { return { validate: validate2, optional: true }; } function validateOptionalType(typeName) { return { validate: typeIs(typeName), optional: true }; } function arrayOf(elementType) { return chain(assertValueType("array"), assertEach(elementType)); } function arrayOfType(typeName) { return arrayOf(typeIs(typeName)); } function validateArrayOfType(typeName) { return validate(arrayOfType(typeName)); } function assertEach(callback) { function validator(node, key, val) { if (!Array.isArray(val)) return; for (let i = 0; i < val.length; i++) { const subkey = `${key}[${i}]`; const v = val[i]; callback(node, subkey, v); if (process.env.BABEL_TYPES_8_BREAKING) (0, _validate.validateChild)(node, subkey, v); } } validator.each = callback; return validator; } function assertOneOf(...values) { function validate2(node, key, val) { if (values.indexOf(val) < 0) { throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`); } } validate2.oneOf = values; return validate2; } function assertNodeType(...types) { function validate2(node, key, val) { for (const type of types) { if ((0, _is.default)(type, val)) { (0, _validate.validateChild)(node, key, val); return; } } throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`); } validate2.oneOfNodeTypes = types; return validate2; } function assertNodeOrValueType(...types) { function validate2(node, key, val) { for (const type of types) { if (getType(val) === type || (0, _is.default)(type, val)) { (0, _validate.validateChild)(node, key, val); return; } } throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`); } validate2.oneOfNodeOrValueTypes = types; return validate2; } function assertValueType(type) { function validate2(node, key, val) { const valid = getType(val) === type; if (!valid) { throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`); } } validate2.type = type; return validate2; } function assertShape(shape) { function validate2(node, key, val) { const errors = []; for (const property of Object.keys(shape)) { try { (0, _validate.validateField)(node, property, val[property], shape[property]); } catch (error) { if (error instanceof TypeError) { errors.push(error.message); continue; } throw error; } } if (errors.length) { throw new TypeError(`Property ${key} of ${node.type} expected to have the following: ${errors.join("\n")}`); } } validate2.shapeOf = shape; return validate2; } function assertOptionalChainStart() { function validate2(node) { var _current; let current = node; while (node) { const { type } = current; if (type === "OptionalCallExpression") { if (current.optional) return; current = current.callee; continue; } if (type === "OptionalMemberExpression") { if (current.optional) return; current = current.object; continue; } break; } throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current) == null ? void 0 : _current.type}`); } return validate2; } function chain(...fns) { function validate2(...args) { for (const fn of fns) { fn(...args); } } validate2.chainOf = fns; if (fns.length >= 2 && "type" in fns[0] && fns[0].type === "array" && !("each" in fns[1])) { throw new Error(`An assertValueType("array") validator can only be followed by an assertEach(...) validator.`); } return validate2; } var validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"]; var validFieldKeys = ["default", "optional", "validate"]; function defineAliasedType(...aliases) { return (type, opts = {}) => { let defined = opts.aliases; if (!defined) { var _store$opts$inherits$, _defined; if (opts.inherits) defined = (_store$opts$inherits$ = store[opts.inherits].aliases) == null ? void 0 : _store$opts$inherits$.slice(); (_defined = defined) != null ? _defined : defined = []; opts.aliases = defined; } const additional = aliases.filter((a) => !defined.includes(a)); defined.unshift(...additional); return defineType(type, opts); }; } function defineType(type, opts = {}) { const inherits = opts.inherits && store[opts.inherits] || {}; let fields = opts.fields; if (!fields) { fields = {}; if (inherits.fields) { const keys = Object.getOwnPropertyNames(inherits.fields); for (const key of keys) { const field = inherits.fields[key]; const def = field.default; if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") { throw new Error("field defaults can only be primitives or empty arrays currently"); } fields[key] = { default: Array.isArray(def) ? [] : def, optional: field.optional, validate: field.validate }; } } } const visitor = opts.visitor || inherits.visitor || []; const aliases = opts.aliases || inherits.aliases || []; const builder = opts.builder || inherits.builder || opts.visitor || []; for (const k of Object.keys(opts)) { if (validTypeOpts.indexOf(k) === -1) { throw new Error(`Unknown type option "${k}" on ${type}`); } } if (opts.deprecatedAlias) { DEPRECATED_KEYS[opts.deprecatedAlias] = type; } for (const key of visitor.concat(builder)) { fields[key] = fields[key] || {}; } for (const key of Object.keys(fields)) { const field = fields[key]; if (field.default !== void 0 && builder.indexOf(key) === -1) { field.optional = true; } if (field.default === void 0) { field.default = null; } else if (!field.validate && field.default != null) { field.validate = assertValueType(getType(field.default)); } for (const k of Object.keys(field)) { if (validFieldKeys.indexOf(k) === -1) { throw new Error(`Unknown field key "${k}" on ${type}.${key}`); } } } VISITOR_KEYS[type] = opts.visitor = visitor; BUILDER_KEYS[type] = opts.builder = builder; NODE_FIELDS[type] = opts.fields = fields; ALIAS_KEYS[type] = opts.aliases = aliases; aliases.forEach((alias) => { FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || []; FLIPPED_ALIAS_KEYS[alias].push(type); }); if (opts.validate) { NODE_PARENT_VALIDATIONS[type] = opts.validate; } store[type] = opts; } var store = {}; } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/definitions/core.js var require_core2 = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/definitions/core.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.patternLikeCommon = exports2.functionTypeAnnotationCommon = exports2.functionDeclarationCommon = exports2.functionCommon = exports2.classMethodOrPropertyCommon = exports2.classMethodOrDeclareMethodCommon = void 0; var _is = require_is(); var _isValidIdentifier = require_isValidIdentifier(); var _helperValidatorIdentifier = require_lib3(); var _constants = require_constants2(); var _utils = require_utils3(); var defineType = (0, _utils.defineAliasedType)("Standardized"); defineType("ArrayExpression", { fields: { elements: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))), default: !process.env.BABEL_TYPES_8_BREAKING ? [] : void 0 } }, visitor: ["elements"], aliases: ["Expression"] }); defineType("AssignmentExpression", { fields: { operator: { validate: function() { if (!process.env.BABEL_TYPES_8_BREAKING) { return (0, _utils.assertValueType)("string"); } const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS); const pattern = (0, _utils.assertOneOf)("="); return function(node, key, val) { const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier; validator(node, key, val); }; }() }, left: { validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern") }, right: { validate: (0, _utils.assertNodeType)("Expression") } }, builder: ["operator", "left", "right"], visitor: ["left", "right"], aliases: ["Expression"] }); defineType("BinaryExpression", { builder: ["operator", "left", "right"], fields: { operator: { validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS) }, left: { validate: function() { const expression = (0, _utils.assertNodeType)("Expression"); const inOp = (0, _utils.assertNodeType)("Expression", "PrivateName"); const validator = function(node, key, val) { const validator2 = node.operator === "in" ? inOp : expression; validator2(node, key, val); }; validator.oneOfNodeTypes = ["Expression", "PrivateName"]; return validator; }() }, right: { validate: (0, _utils.assertNodeType)("Expression") } }, visitor: ["left", "right"], aliases: ["Binary", "Expression"] }); defineType("InterpreterDirective", { builder: ["value"], fields: { value: { validate: (0, _utils.assertValueType)("string") } } }); defineType("Directive", { visitor: ["value"], fields: { value: { validate: (0, _utils.assertNodeType)("DirectiveLiteral") } } }); defineType("DirectiveLiteral", { builder: ["value"], fields: { value: { validate: (0, _utils.assertValueType)("string") } } }); defineType("BlockStatement", { builder: ["body", "directives"], visitor: ["directives", "body"], fields: { directives: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), default: [] }, body: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) } }, aliases: ["Scopable", "BlockParent", "Block", "Statement"] }); defineType("BreakStatement", { visitor: ["label"], fields: { label: { validate: (0, _utils.assertNodeType)("Identifier"), optional: true } }, aliases: ["Statement", "Terminatorless", "CompletionStatement"] }); defineType("CallExpression", { visitor: ["callee", "arguments", "typeParameters", "typeArguments"], builder: ["callee", "arguments"], aliases: ["Expression"], fields: Object.assign({ callee: { validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier") }, arguments: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder"))) } }, !process.env.BABEL_TYPES_8_BREAKING ? { optional: { validate: (0, _utils.assertOneOf)(true, false), optional: true } } : {}, { typeArguments: { validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"), optional: true }, typeParameters: { validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"), optional: true } }) }); defineType("CatchClause", { visitor: ["param", "body"], fields: { param: { validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"), optional: true }, body: { validate: (0, _utils.assertNodeType)("BlockStatement") } }, aliases: ["Scopable", "BlockParent"] }); defineType("ConditionalExpression", { visitor: ["test", "consequent", "alternate"], fields: { test: { validate: (0, _utils.assertNodeType)("Expression") }, consequent: { validate: (0, _utils.assertNodeType)("Expression") }, alternate: { validate: (0, _utils.assertNodeType)("Expression") } }, aliases: ["Expression", "Conditional"] }); defineType("ContinueStatement", { visitor: ["label"], fields: { label: { validate: (0, _utils.assertNodeType)("Identifier"), optional: true } }, aliases: ["Statement", "Terminatorless", "CompletionStatement"] }); defineType("DebuggerStatement", { aliases: ["Statement"] }); defineType("DoWhileStatement", { visitor: ["test", "body"], fields: { test: { validate: (0, _utils.assertNodeType)("Expression") }, body: { validate: (0, _utils.assertNodeType)("Statement") } }, aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"] }); defineType("EmptyStatement", { aliases: ["Statement"] }); defineType("ExpressionStatement", { visitor: ["expression"], fields: { expression: { validate: (0, _utils.assertNodeType)("Expression") } }, aliases: ["Statement", "ExpressionWrapper"] }); defineType("File", { builder: ["program", "comments", "tokens"], visitor: ["program"], fields: { program: { validate: (0, _utils.assertNodeType)("Program") }, comments: { validate: !process.env.BABEL_TYPES_8_BREAKING ? Object.assign(() => { }, { each: { oneOfNodeTypes: ["CommentBlock", "CommentLine"] } }) : (0, _utils.assertEach)((0, _utils.assertNodeType)("CommentBlock", "CommentLine")), optional: true }, tokens: { validate: (0, _utils.assertEach)(Object.assign(() => { }, { type: "any" })), optional: true } } }); defineType("ForInStatement", { visitor: ["left", "right", "body"], aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], fields: { left: { validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern") }, right: { validate: (0, _utils.assertNodeType)("Expression") }, body: { validate: (0, _utils.assertNodeType)("Statement") } } }); defineType("ForStatement", { visitor: ["init", "test", "update", "body"], aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"], fields: { init: { validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"), optional: true }, test: { validate: (0, _utils.assertNodeType)("Expression"), optional: true }, update: { validate: (0, _utils.assertNodeType)("Expression"), optional: true }, body: { validate: (0, _utils.assertNodeType)("Statement") } } }); var functionCommon = { params: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement"))) }, generator: { default: false }, async: { default: false } }; exports2.functionCommon = functionCommon; var functionTypeAnnotationCommon = { returnType: { validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), optional: true }, typeParameters: { validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), optional: true } }; exports2.functionTypeAnnotationCommon = functionTypeAnnotationCommon; var functionDeclarationCommon = Object.assign({}, functionCommon, { declare: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, id: { validate: (0, _utils.assertNodeType)("Identifier"), optional: true } }); exports2.functionDeclarationCommon = functionDeclarationCommon; defineType("FunctionDeclaration", { builder: ["id", "params", "body", "generator", "async"], visitor: ["id", "params", "body", "returnType", "typeParameters"], fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, { body: { validate: (0, _utils.assertNodeType)("BlockStatement") } }), aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"], validate: function() { if (!process.env.BABEL_TYPES_8_BREAKING) return () => { }; const identifier = (0, _utils.assertNodeType)("Identifier"); return function(parent, key, node) { if (!(0, _is.default)("ExportDefaultDeclaration", parent)) { identifier(node, "id", node.id); } }; }() }); defineType("FunctionExpression", { inherits: "FunctionDeclaration", aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, { id: { validate: (0, _utils.assertNodeType)("Identifier"), optional: true }, body: { validate: (0, _utils.assertNodeType)("BlockStatement") } }) }); var patternLikeCommon = { typeAnnotation: { validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))) } }; exports2.patternLikeCommon = patternLikeCommon; defineType("Identifier", { builder: ["name"], visitor: ["typeAnnotation", "decorators"], aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"], fields: Object.assign({}, patternLikeCommon, { name: { validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (!(0, _isValidIdentifier.default)(val, false)) { throw new TypeError(`"${val}" is not a valid identifier name`); } }, { type: "string" })) }, optional: { validate: (0, _utils.assertValueType)("boolean"), optional: true } }), validate(parent, key, node) { if (!process.env.BABEL_TYPES_8_BREAKING) return; const match = /\.(\w+)$/.exec(key); if (!match) return; const [, parentKey] = match; const nonComp = { computed: false }; if (parentKey === "property") { if ((0, _is.default)("MemberExpression", parent, nonComp)) return; if ((0, _is.default)("OptionalMemberExpression", parent, nonComp)) return; } else if (parentKey === "key") { if ((0, _is.default)("Property", parent, nonComp)) return; if ((0, _is.default)("Method", parent, nonComp)) return; } else if (parentKey === "exported") { if ((0, _is.default)("ExportSpecifier", parent)) return; } else if (parentKey === "imported") { if ((0, _is.default)("ImportSpecifier", parent, { imported: node })) return; } else if (parentKey === "meta") { if ((0, _is.default)("MetaProperty", parent, { meta: node })) return; } if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name, false)) && node.name !== "this") { throw new TypeError(`"${node.name}" is not a valid identifier`); } } }); defineType("IfStatement", { visitor: ["test", "consequent", "alternate"], aliases: ["Statement", "Conditional"], fields: { test: { validate: (0, _utils.assertNodeType)("Expression") }, consequent: { validate: (0, _utils.assertNodeType)("Statement") }, alternate: { optional: true, validate: (0, _utils.assertNodeType)("Statement") } } }); defineType("LabeledStatement", { visitor: ["label", "body"], aliases: ["Statement"], fields: { label: { validate: (0, _utils.assertNodeType)("Identifier") }, body: { validate: (0, _utils.assertNodeType)("Statement") } } }); defineType("StringLiteral", { builder: ["value"], fields: { value: { validate: (0, _utils.assertValueType)("string") } }, aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); defineType("NumericLiteral", { builder: ["value"], deprecatedAlias: "NumberLiteral", fields: { value: { validate: (0, _utils.assertValueType)("number") } }, aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); defineType("NullLiteral", { aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); defineType("BooleanLiteral", { builder: ["value"], fields: { value: { validate: (0, _utils.assertValueType)("boolean") } }, aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); defineType("RegExpLiteral", { builder: ["pattern", "flags"], deprecatedAlias: "RegexLiteral", aliases: ["Expression", "Pureish", "Literal"], fields: { pattern: { validate: (0, _utils.assertValueType)("string") }, flags: { validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; const invalid = /[^gimsuy]/.exec(val); if (invalid) { throw new TypeError(`"${invalid[0]}" is not a valid RegExp flag`); } }, { type: "string" })), default: "" } } }); defineType("LogicalExpression", { builder: ["operator", "left", "right"], visitor: ["left", "right"], aliases: ["Binary", "Expression"], fields: { operator: { validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS) }, left: { validate: (0, _utils.assertNodeType)("Expression") }, right: { validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("MemberExpression", { builder: ["object", "property", "computed", ...!process.env.BABEL_TYPES_8_BREAKING ? ["optional"] : []], visitor: ["object", "property"], aliases: ["Expression", "LVal"], fields: Object.assign({ object: { validate: (0, _utils.assertNodeType)("Expression") }, property: { validate: function() { const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName"); const computed = (0, _utils.assertNodeType)("Expression"); const validator = function(node, key, val) { const validator2 = node.computed ? computed : normal; validator2(node, key, val); }; validator.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"]; return validator; }() }, computed: { default: false } }, !process.env.BABEL_TYPES_8_BREAKING ? { optional: { validate: (0, _utils.assertOneOf)(true, false), optional: true } } : {}) }); defineType("NewExpression", { inherits: "CallExpression" }); defineType("Program", { visitor: ["directives", "body"], builder: ["body", "directives", "sourceType", "interpreter"], fields: { sourceFile: { validate: (0, _utils.assertValueType)("string") }, sourceType: { validate: (0, _utils.assertOneOf)("script", "module"), default: "script" }, interpreter: { validate: (0, _utils.assertNodeType)("InterpreterDirective"), default: null, optional: true }, directives: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), default: [] }, body: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) } }, aliases: ["Scopable", "BlockParent", "Block"] }); defineType("ObjectExpression", { visitor: ["properties"], aliases: ["Expression"], fields: { properties: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement"))) } } }); defineType("ObjectMethod", { builder: ["kind", "key", "params", "body", "computed", "generator", "async"], fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, { kind: Object.assign({ validate: (0, _utils.assertOneOf)("method", "get", "set") }, !process.env.BABEL_TYPES_8_BREAKING ? { default: "method" } : {}), computed: { default: false }, key: { validate: function() { const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); const computed = (0, _utils.assertNodeType)("Expression"); const validator = function(node, key, val) { const validator2 = node.computed ? computed : normal; validator2(node, key, val); }; validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"]; return validator; }() }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true }, body: { validate: (0, _utils.assertNodeType)("BlockStatement") } }), visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"] }); defineType("ObjectProperty", { builder: ["key", "value", "computed", "shorthand", ...!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : []], fields: { computed: { default: false }, key: { validate: function() { const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); const computed = (0, _utils.assertNodeType)("Expression"); const validator = function(node, key, val) { const validator2 = node.computed ? computed : normal; validator2(node, key, val); }; validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"]; return validator; }() }, value: { validate: (0, _utils.assertNodeType)("Expression", "PatternLike") }, shorthand: { validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (val && node.computed) { throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true"); } }, { type: "boolean" }), function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (val && !(0, _is.default)("Identifier", node.key)) { throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier"); } }), default: false }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true } }, visitor: ["key", "value", "decorators"], aliases: ["UserWhitespacable", "Property", "ObjectMember"], validate: function() { const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern"); const expression = (0, _utils.assertNodeType)("Expression"); return function(parent, key, node) { if (!process.env.BABEL_TYPES_8_BREAKING) return; const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression; validator(node, "value", node.value); }; }() }); defineType("RestElement", { visitor: ["argument", "typeAnnotation"], builder: ["argument"], aliases: ["LVal", "PatternLike"], deprecatedAlias: "RestProperty", fields: Object.assign({}, patternLikeCommon, { argument: { validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern", "MemberExpression") }, optional: { validate: (0, _utils.assertValueType)("boolean"), optional: true } }), validate(parent, key) { if (!process.env.BABEL_TYPES_8_BREAKING) return; const match = /(\w+)\[(\d+)\]/.exec(key); if (!match) throw new Error("Internal Babel error: malformed key."); const [, listKey, index] = match; if (parent[listKey].length > index + 1) { throw new TypeError(`RestElement must be last element of ${listKey}`); } } }); defineType("ReturnStatement", { visitor: ["argument"], aliases: ["Statement", "Terminatorless", "CompletionStatement"], fields: { argument: { validate: (0, _utils.assertNodeType)("Expression"), optional: true } } }); defineType("SequenceExpression", { visitor: ["expressions"], fields: { expressions: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression"))) } }, aliases: ["Expression"] }); defineType("ParenthesizedExpression", { visitor: ["expression"], aliases: ["Expression", "ExpressionWrapper"], fields: { expression: { validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("SwitchCase", { visitor: ["test", "consequent"], fields: { test: { validate: (0, _utils.assertNodeType)("Expression"), optional: true }, consequent: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) } } }); defineType("SwitchStatement", { visitor: ["discriminant", "cases"], aliases: ["Statement", "BlockParent", "Scopable"], fields: { discriminant: { validate: (0, _utils.assertNodeType)("Expression") }, cases: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase"))) } } }); defineType("ThisExpression", { aliases: ["Expression"] }); defineType("ThrowStatement", { visitor: ["argument"], aliases: ["Statement", "Terminatorless", "CompletionStatement"], fields: { argument: { validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("TryStatement", { visitor: ["block", "handler", "finalizer"], aliases: ["Statement"], fields: { block: { validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), Object.assign(function(node) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (!node.handler && !node.finalizer) { throw new TypeError("TryStatement expects either a handler or finalizer, or both"); } }, { oneOfNodeTypes: ["BlockStatement"] })) }, handler: { optional: true, validate: (0, _utils.assertNodeType)("CatchClause") }, finalizer: { optional: true, validate: (0, _utils.assertNodeType)("BlockStatement") } } }); defineType("UnaryExpression", { builder: ["operator", "argument", "prefix"], fields: { prefix: { default: true }, argument: { validate: (0, _utils.assertNodeType)("Expression") }, operator: { validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS) } }, visitor: ["argument"], aliases: ["UnaryLike", "Expression"] }); defineType("UpdateExpression", { builder: ["operator", "argument", "prefix"], fields: { prefix: { default: false }, argument: { validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression") }, operator: { validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS) } }, visitor: ["argument"], aliases: ["Expression"] }); defineType("VariableDeclaration", { builder: ["kind", "declarations"], visitor: ["declarations"], aliases: ["Statement", "Declaration"], fields: { declare: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, kind: { validate: (0, _utils.assertOneOf)("var", "let", "const") }, declarations: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator"))) } }, validate(parent, key, node) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (!(0, _is.default)("ForXStatement", parent, { left: node })) return; if (node.declarations.length !== 1) { throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`); } } }); defineType("VariableDeclarator", { visitor: ["id", "init"], fields: { id: { validate: function() { if (!process.env.BABEL_TYPES_8_BREAKING) { return (0, _utils.assertNodeType)("LVal"); } const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"); const without = (0, _utils.assertNodeType)("Identifier"); return function(node, key, val) { const validator = node.init ? normal : without; validator(node, key, val); }; }() }, definite: { optional: true, validate: (0, _utils.assertValueType)("boolean") }, init: { optional: true, validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("WhileStatement", { visitor: ["test", "body"], aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"], fields: { test: { validate: (0, _utils.assertNodeType)("Expression") }, body: { validate: (0, _utils.assertNodeType)("Statement") } } }); defineType("WithStatement", { visitor: ["object", "body"], aliases: ["Statement"], fields: { object: { validate: (0, _utils.assertNodeType)("Expression") }, body: { validate: (0, _utils.assertNodeType)("Statement") } } }); defineType("AssignmentPattern", { visitor: ["left", "right", "decorators"], builder: ["left", "right"], aliases: ["Pattern", "PatternLike", "LVal"], fields: Object.assign({}, patternLikeCommon, { left: { validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression") }, right: { validate: (0, _utils.assertNodeType)("Expression") }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true } }) }); defineType("ArrayPattern", { visitor: ["elements", "typeAnnotation"], builder: ["elements"], aliases: ["Pattern", "PatternLike", "LVal"], fields: Object.assign({}, patternLikeCommon, { elements: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike"))) }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true }, optional: { validate: (0, _utils.assertValueType)("boolean"), optional: true } }) }); defineType("ArrowFunctionExpression", { builder: ["params", "body", "async"], visitor: ["params", "body", "returnType", "typeParameters"], aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, { expression: { validate: (0, _utils.assertValueType)("boolean") }, body: { validate: (0, _utils.assertNodeType)("BlockStatement", "Expression") } }) }); defineType("ClassBody", { visitor: ["body"], fields: { body: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "ClassAccessorProperty", "TSDeclareMethod", "TSIndexSignature", "StaticBlock"))) } } }); defineType("ClassExpression", { builder: ["id", "superClass", "body", "decorators"], visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"], aliases: ["Scopable", "Class", "Expression"], fields: { id: { validate: (0, _utils.assertNodeType)("Identifier"), optional: true }, typeParameters: { validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), optional: true }, body: { validate: (0, _utils.assertNodeType)("ClassBody") }, superClass: { optional: true, validate: (0, _utils.assertNodeType)("Expression") }, superTypeParameters: { validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), optional: true }, implements: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true }, mixins: { validate: (0, _utils.assertNodeType)("InterfaceExtends"), optional: true } } }); defineType("ClassDeclaration", { inherits: "ClassExpression", aliases: ["Scopable", "Class", "Statement", "Declaration"], fields: { id: { validate: (0, _utils.assertNodeType)("Identifier") }, typeParameters: { validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), optional: true }, body: { validate: (0, _utils.assertNodeType)("ClassBody") }, superClass: { optional: true, validate: (0, _utils.assertNodeType)("Expression") }, superTypeParameters: { validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), optional: true }, implements: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true }, mixins: { validate: (0, _utils.assertNodeType)("InterfaceExtends"), optional: true }, declare: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, abstract: { validate: (0, _utils.assertValueType)("boolean"), optional: true } }, validate: function() { const identifier = (0, _utils.assertNodeType)("Identifier"); return function(parent, key, node) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (!(0, _is.default)("ExportDefaultDeclaration", parent)) { identifier(node, "id", node.id); } }; }() }); defineType("ExportAllDeclaration", { visitor: ["source"], aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], fields: { source: { validate: (0, _utils.assertNodeType)("StringLiteral") }, exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")), assertions: { optional: true, validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute"))) } } }); defineType("ExportDefaultDeclaration", { visitor: ["declaration"], aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], fields: { declaration: { validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression") }, exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("value")) } }); defineType("ExportNamedDeclaration", { visitor: ["declaration", "specifiers", "source"], aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], fields: { declaration: { optional: true, validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), Object.assign(function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (val && node.specifiers.length) { throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration"); } }, { oneOfNodeTypes: ["Declaration"] }), function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (val && node.source) { throw new TypeError("Cannot export a declaration from a source"); } }) }, assertions: { optional: true, validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute"))) }, specifiers: { default: [], validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function() { const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier"); const sourceless = (0, _utils.assertNodeType)("ExportSpecifier"); if (!process.env.BABEL_TYPES_8_BREAKING) return sourced; return function(node, key, val) { const validator = node.source ? sourced : sourceless; validator(node, key, val); }; }())) }, source: { validate: (0, _utils.assertNodeType)("StringLiteral"), optional: true }, exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")) } }); defineType("ExportSpecifier", { visitor: ["local", "exported"], aliases: ["ModuleSpecifier"], fields: { local: { validate: (0, _utils.assertNodeType)("Identifier") }, exported: { validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral") }, exportKind: { validate: (0, _utils.assertOneOf)("type", "value"), optional: true } } }); defineType("ForOfStatement", { visitor: ["left", "right", "body"], builder: ["left", "right", "body", "await"], aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], fields: { left: { validate: function() { if (!process.env.BABEL_TYPES_8_BREAKING) { return (0, _utils.assertNodeType)("VariableDeclaration", "LVal"); } const declaration = (0, _utils.assertNodeType)("VariableDeclaration"); const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern"); return function(node, key, val) { if ((0, _is.default)("VariableDeclaration", val)) { declaration(node, key, val); } else { lval(node, key, val); } }; }() }, right: { validate: (0, _utils.assertNodeType)("Expression") }, body: { validate: (0, _utils.assertNodeType)("Statement") }, await: { default: false } } }); defineType("ImportDeclaration", { visitor: ["specifiers", "source"], aliases: ["Statement", "Declaration", "ModuleDeclaration"], fields: { assertions: { optional: true, validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute"))) }, specifiers: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier"))) }, source: { validate: (0, _utils.assertNodeType)("StringLiteral") }, importKind: { validate: (0, _utils.assertOneOf)("type", "typeof", "value"), optional: true } } }); defineType("ImportDefaultSpecifier", { visitor: ["local"], aliases: ["ModuleSpecifier"], fields: { local: { validate: (0, _utils.assertNodeType)("Identifier") } } }); defineType("ImportNamespaceSpecifier", { visitor: ["local"], aliases: ["ModuleSpecifier"], fields: { local: { validate: (0, _utils.assertNodeType)("Identifier") } } }); defineType("ImportSpecifier", { visitor: ["local", "imported"], aliases: ["ModuleSpecifier"], fields: { local: { validate: (0, _utils.assertNodeType)("Identifier") }, imported: { validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral") }, importKind: { validate: (0, _utils.assertOneOf)("type", "typeof", "value"), optional: true } } }); defineType("MetaProperty", { visitor: ["meta", "property"], aliases: ["Expression"], fields: { meta: { validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), Object.assign(function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; let property; switch (val.name) { case "function": property = "sent"; break; case "new": property = "target"; break; case "import": property = "meta"; break; } if (!(0, _is.default)("Identifier", node.property, { name: property })) { throw new TypeError("Unrecognised MetaProperty"); } }, { oneOfNodeTypes: ["Identifier"] })) }, property: { validate: (0, _utils.assertNodeType)("Identifier") } } }); var classMethodOrPropertyCommon = { abstract: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, accessibility: { validate: (0, _utils.assertOneOf)("public", "private", "protected"), optional: true }, static: { default: false }, override: { default: false }, computed: { default: false }, optional: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, key: { validate: (0, _utils.chain)(function() { const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); const computed = (0, _utils.assertNodeType)("Expression"); return function(node, key, val) { const validator = node.computed ? computed : normal; validator(node, key, val); }; }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression")) } }; exports2.classMethodOrPropertyCommon = classMethodOrPropertyCommon; var classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, { params: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty"))) }, kind: { validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"), default: "method" }, access: { validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true } }); exports2.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon; defineType("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({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, { body: { validate: (0, _utils.assertNodeType)("BlockStatement") } }) }); defineType("ObjectPattern", { visitor: ["properties", "typeAnnotation", "decorators"], builder: ["properties"], aliases: ["Pattern", "PatternLike", "LVal"], fields: Object.assign({}, patternLikeCommon, { properties: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty"))) } }) }); defineType("SpreadElement", { visitor: ["argument"], aliases: ["UnaryLike"], deprecatedAlias: "SpreadProperty", fields: { argument: { validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("Super", { aliases: ["Expression"] }); defineType("TaggedTemplateExpression", { visitor: ["tag", "quasi", "typeParameters"], builder: ["tag", "quasi"], aliases: ["Expression"], fields: { tag: { validate: (0, _utils.assertNodeType)("Expression") }, quasi: { validate: (0, _utils.assertNodeType)("TemplateLiteral") }, typeParameters: { validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), optional: true } } }); defineType("TemplateElement", { builder: ["value", "tail"], fields: { value: { validate: (0, _utils.assertShape)({ raw: { validate: (0, _utils.assertValueType)("string") }, cooked: { validate: (0, _utils.assertValueType)("string"), optional: true } }) }, tail: { default: false } } }); defineType("TemplateLiteral", { visitor: ["quasis", "expressions"], aliases: ["Expression", "Literal"], fields: { quasis: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement"))) }, expressions: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "TSType")), function(node, key, val) { if (node.quasis.length !== val.length + 1) { throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions. Expected ${val.length + 1} quasis but got ${node.quasis.length}`); } }) } } }); defineType("YieldExpression", { builder: ["argument", "delegate"], visitor: ["argument"], aliases: ["Expression", "Terminatorless"], fields: { delegate: { validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (val && !node.argument) { throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument"); } }, { type: "boolean" })), default: false }, argument: { optional: true, validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("AwaitExpression", { builder: ["argument"], visitor: ["argument"], aliases: ["Expression", "Terminatorless"], fields: { argument: { validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("Import", { aliases: ["Expression"] }); defineType("BigIntLiteral", { builder: ["value"], fields: { value: { validate: (0, _utils.assertValueType)("string") } }, aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); defineType("ExportNamespaceSpecifier", { visitor: ["exported"], aliases: ["ModuleSpecifier"], fields: { exported: { validate: (0, _utils.assertNodeType)("Identifier") } } }); defineType("OptionalMemberExpression", { builder: ["object", "property", "computed", "optional"], visitor: ["object", "property"], aliases: ["Expression"], fields: { object: { validate: (0, _utils.assertNodeType)("Expression") }, property: { validate: function() { const normal = (0, _utils.assertNodeType)("Identifier"); const computed = (0, _utils.assertNodeType)("Expression"); const validator = function(node, key, val) { const validator2 = node.computed ? computed : normal; validator2(node, key, val); }; validator.oneOfNodeTypes = ["Expression", "Identifier"]; return validator; }() }, computed: { default: false }, optional: { validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)()) } } }); defineType("OptionalCallExpression", { visitor: ["callee", "arguments", "typeParameters", "typeArguments"], builder: ["callee", "arguments", "optional"], aliases: ["Expression"], fields: { callee: { validate: (0, _utils.assertNodeType)("Expression") }, arguments: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder"))) }, optional: { validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)()) }, typeArguments: { validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"), optional: true }, typeParameters: { validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"), optional: true } } }); defineType("ClassProperty", { visitor: ["key", "value", "typeAnnotation", "decorators"], builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"], aliases: ["Property"], fields: Object.assign({}, classMethodOrPropertyCommon, { value: { validate: (0, _utils.assertNodeType)("Expression"), optional: true }, definite: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, typeAnnotation: { validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true }, readonly: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, declare: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, variance: { validate: (0, _utils.assertNodeType)("Variance"), optional: true } }) }); defineType("ClassAccessorProperty", { visitor: ["key", "value", "typeAnnotation", "decorators"], builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"], aliases: ["Property", "Accessor"], fields: Object.assign({}, classMethodOrPropertyCommon, { key: { validate: (0, _utils.chain)(function() { const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "PrivateName"); const computed = (0, _utils.assertNodeType)("Expression"); return function(node, key, val) { const validator = node.computed ? computed : normal; validator(node, key, val); }; }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression", "PrivateName")) }, value: { validate: (0, _utils.assertNodeType)("Expression"), optional: true }, definite: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, typeAnnotation: { validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true }, readonly: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, declare: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, variance: { validate: (0, _utils.assertNodeType)("Variance"), optional: true } }) }); defineType("ClassPrivateProperty", { visitor: ["key", "value", "decorators", "typeAnnotation"], builder: ["key", "value", "decorators", "static"], aliases: ["Property", "Private"], fields: { key: { validate: (0, _utils.assertNodeType)("PrivateName") }, value: { validate: (0, _utils.assertNodeType)("Expression"), optional: true }, typeAnnotation: { validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true }, readonly: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, definite: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, variance: { validate: (0, _utils.assertNodeType)("Variance"), optional: true } } }); defineType("ClassPrivateMethod", { builder: ["kind", "key", "params", "body", "static"], visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"], fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, { key: { validate: (0, _utils.assertNodeType)("PrivateName") }, body: { validate: (0, _utils.assertNodeType)("BlockStatement") } }) }); defineType("PrivateName", { visitor: ["id"], aliases: ["Private"], fields: { id: { validate: (0, _utils.assertNodeType)("Identifier") } } }); defineType("StaticBlock", { visitor: ["body"], fields: { body: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) } }, aliases: ["Scopable", "BlockParent", "FunctionParent"] }); } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/definitions/flow.js var require_flow = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/definitions/flow.js"() { "use strict"; var _utils = require_utils3(); var defineType = (0, _utils.defineAliasedType)("Flow"); var defineInterfaceishType = (name, typeParameterType = "TypeParameterDeclaration") => { defineType(name, { builder: ["id", "typeParameters", "extends", "body"], visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)(typeParameterType), extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")), body: (0, _utils.validateType)("ObjectTypeAnnotation") } }); }; defineType("AnyTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("ArrayTypeAnnotation", { visitor: ["elementType"], aliases: ["FlowType"], fields: { elementType: (0, _utils.validateType)("FlowType") } }); defineType("BooleanTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("BooleanLiteralTypeAnnotation", { builder: ["value"], aliases: ["FlowType"], fields: { value: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("NullLiteralTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("ClassImplements", { visitor: ["id", "typeParameters"], fields: { id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") } }); defineInterfaceishType("DeclareClass"); defineType("DeclareFunction", { visitor: ["id"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)("Identifier"), predicate: (0, _utils.validateOptionalType)("DeclaredPredicate") } }); defineInterfaceishType("DeclareInterface"); defineType("DeclareModule", { builder: ["id", "body", "kind"], visitor: ["id", "body"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), body: (0, _utils.validateType)("BlockStatement"), kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES")) } }); defineType("DeclareModuleExports", { visitor: ["typeAnnotation"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { typeAnnotation: (0, _utils.validateType)("TypeAnnotation") } }); defineType("DeclareTypeAlias", { visitor: ["id", "typeParameters", "right"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), right: (0, _utils.validateType)("FlowType") } }); defineType("DeclareOpaqueType", { visitor: ["id", "typeParameters", "supertype"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), supertype: (0, _utils.validateOptionalType)("FlowType"), impltype: (0, _utils.validateOptionalType)("FlowType") } }); defineType("DeclareVariable", { visitor: ["id"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)("Identifier") } }); defineType("DeclareExportDeclaration", { visitor: ["declaration", "specifiers", "source"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { declaration: (0, _utils.validateOptionalType)("Flow"), specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])), source: (0, _utils.validateOptionalType)("StringLiteral"), default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) } }); defineType("DeclareExportAllDeclaration", { visitor: ["source"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { source: (0, _utils.validateType)("StringLiteral"), exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")) } }); defineType("DeclaredPredicate", { visitor: ["value"], aliases: ["FlowPredicate"], fields: { value: (0, _utils.validateType)("Flow") } }); defineType("ExistsTypeAnnotation", { aliases: ["FlowType"] }); defineType("FunctionTypeAnnotation", { visitor: ["typeParameters", "params", "rest", "returnType"], aliases: ["FlowType"], fields: { typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")), rest: (0, _utils.validateOptionalType)("FunctionTypeParam"), this: (0, _utils.validateOptionalType)("FunctionTypeParam"), returnType: (0, _utils.validateType)("FlowType") } }); defineType("FunctionTypeParam", { visitor: ["name", "typeAnnotation"], fields: { name: (0, _utils.validateOptionalType)("Identifier"), typeAnnotation: (0, _utils.validateType)("FlowType"), optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) } }); defineType("GenericTypeAnnotation", { visitor: ["id", "typeParameters"], aliases: ["FlowType"], fields: { id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]), typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") } }); defineType("InferredPredicate", { aliases: ["FlowPredicate"] }); defineType("InterfaceExtends", { visitor: ["id", "typeParameters"], fields: { id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]), typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") } }); defineInterfaceishType("InterfaceDeclaration"); defineType("InterfaceTypeAnnotation", { visitor: ["extends", "body"], aliases: ["FlowType"], fields: { extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), body: (0, _utils.validateType)("ObjectTypeAnnotation") } }); defineType("IntersectionTypeAnnotation", { visitor: ["types"], aliases: ["FlowType"], fields: { types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) } }); defineType("MixedTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("EmptyTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("NullableTypeAnnotation", { visitor: ["typeAnnotation"], aliases: ["FlowType"], fields: { typeAnnotation: (0, _utils.validateType)("FlowType") } }); defineType("NumberLiteralTypeAnnotation", { builder: ["value"], aliases: ["FlowType"], fields: { value: (0, _utils.validate)((0, _utils.assertValueType)("number")) } }); defineType("NumberTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("ObjectTypeAnnotation", { visitor: ["properties", "indexers", "callProperties", "internalSlots"], aliases: ["FlowType"], builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"], fields: { properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])), indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")), callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")), internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")), exact: { validate: (0, _utils.assertValueType)("boolean"), default: false }, inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) } }); defineType("ObjectTypeInternalSlot", { visitor: ["id", "value", "optional", "static", "method"], aliases: ["UserWhitespacable"], fields: { id: (0, _utils.validateType)("Identifier"), value: (0, _utils.validateType)("FlowType"), optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), method: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("ObjectTypeCallProperty", { visitor: ["value"], aliases: ["UserWhitespacable"], fields: { value: (0, _utils.validateType)("FlowType"), static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("ObjectTypeIndexer", { visitor: ["id", "key", "value", "variance"], aliases: ["UserWhitespacable"], fields: { id: (0, _utils.validateOptionalType)("Identifier"), key: (0, _utils.validateType)("FlowType"), value: (0, _utils.validateType)("FlowType"), static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), variance: (0, _utils.validateOptionalType)("Variance") } }); defineType("ObjectTypeProperty", { visitor: ["key", "value", "variance"], aliases: ["UserWhitespacable"], fields: { key: (0, _utils.validateType)(["Identifier", "StringLiteral"]), value: (0, _utils.validateType)("FlowType"), kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")), static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), variance: (0, _utils.validateOptionalType)("Variance"), method: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("ObjectTypeSpreadProperty", { visitor: ["argument"], aliases: ["UserWhitespacable"], fields: { argument: (0, _utils.validateType)("FlowType") } }); defineType("OpaqueType", { visitor: ["id", "typeParameters", "supertype", "impltype"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), supertype: (0, _utils.validateOptionalType)("FlowType"), impltype: (0, _utils.validateType)("FlowType") } }); defineType("QualifiedTypeIdentifier", { visitor: ["id", "qualification"], fields: { id: (0, _utils.validateType)("Identifier"), qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]) } }); defineType("StringLiteralTypeAnnotation", { builder: ["value"], aliases: ["FlowType"], fields: { value: (0, _utils.validate)((0, _utils.assertValueType)("string")) } }); defineType("StringTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("SymbolTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("ThisTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("TupleTypeAnnotation", { visitor: ["types"], aliases: ["FlowType"], fields: { types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) } }); defineType("TypeofTypeAnnotation", { visitor: ["argument"], aliases: ["FlowType"], fields: { argument: (0, _utils.validateType)("FlowType") } }); defineType("TypeAlias", { visitor: ["id", "typeParameters", "right"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), right: (0, _utils.validateType)("FlowType") } }); defineType("TypeAnnotation", { visitor: ["typeAnnotation"], fields: { typeAnnotation: (0, _utils.validateType)("FlowType") } }); defineType("TypeCastExpression", { visitor: ["expression", "typeAnnotation"], aliases: ["ExpressionWrapper", "Expression"], fields: { expression: (0, _utils.validateType)("Expression"), typeAnnotation: (0, _utils.validateType)("TypeAnnotation") } }); defineType("TypeParameter", { visitor: ["bound", "default", "variance"], fields: { name: (0, _utils.validate)((0, _utils.assertValueType)("string")), bound: (0, _utils.validateOptionalType)("TypeAnnotation"), default: (0, _utils.validateOptionalType)("FlowType"), variance: (0, _utils.validateOptionalType)("Variance") } }); defineType("TypeParameterDeclaration", { visitor: ["params"], fields: { params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter")) } }); defineType("TypeParameterInstantiation", { visitor: ["params"], fields: { params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) } }); defineType("UnionTypeAnnotation", { visitor: ["types"], aliases: ["FlowType"], fields: { types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) } }); defineType("Variance", { builder: ["kind"], fields: { kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus")) } }); defineType("VoidTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("EnumDeclaration", { aliases: ["Statement", "Declaration"], visitor: ["id", "body"], fields: { id: (0, _utils.validateType)("Identifier"), body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"]) } }); defineType("EnumBooleanBody", { aliases: ["EnumBody"], visitor: ["members"], fields: { explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), members: (0, _utils.validateArrayOfType)("EnumBooleanMember"), hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("EnumNumberBody", { aliases: ["EnumBody"], visitor: ["members"], fields: { explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), members: (0, _utils.validateArrayOfType)("EnumNumberMember"), hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("EnumStringBody", { aliases: ["EnumBody"], visitor: ["members"], fields: { explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"]), hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("EnumSymbolBody", { aliases: ["EnumBody"], visitor: ["members"], fields: { members: (0, _utils.validateArrayOfType)("EnumDefaultedMember"), hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("EnumBooleanMember", { aliases: ["EnumMember"], visitor: ["id"], fields: { id: (0, _utils.validateType)("Identifier"), init: (0, _utils.validateType)("BooleanLiteral") } }); defineType("EnumNumberMember", { aliases: ["EnumMember"], visitor: ["id", "init"], fields: { id: (0, _utils.validateType)("Identifier"), init: (0, _utils.validateType)("NumericLiteral") } }); defineType("EnumStringMember", { aliases: ["EnumMember"], visitor: ["id", "init"], fields: { id: (0, _utils.validateType)("Identifier"), init: (0, _utils.validateType)("StringLiteral") } }); defineType("EnumDefaultedMember", { aliases: ["EnumMember"], visitor: ["id"], fields: { id: (0, _utils.validateType)("Identifier") } }); defineType("IndexedAccessType", { visitor: ["objectType", "indexType"], aliases: ["FlowType"], fields: { objectType: (0, _utils.validateType)("FlowType"), indexType: (0, _utils.validateType)("FlowType") } }); defineType("OptionalIndexedAccessType", { visitor: ["objectType", "indexType"], aliases: ["FlowType"], fields: { objectType: (0, _utils.validateType)("FlowType"), indexType: (0, _utils.validateType)("FlowType"), optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/definitions/jsx.js var require_jsx = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/definitions/jsx.js"() { "use strict"; var _utils = require_utils3(); var defineType = (0, _utils.defineAliasedType)("JSX"); defineType("JSXAttribute", { visitor: ["name", "value"], aliases: ["Immutable"], fields: { name: { validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName") }, value: { optional: true, validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer") } } }); defineType("JSXClosingElement", { visitor: ["name"], aliases: ["Immutable"], fields: { name: { validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName") } } }); defineType("JSXElement", { builder: ["openingElement", "closingElement", "children", "selfClosing"], visitor: ["openingElement", "children", "closingElement"], aliases: ["Immutable", "Expression"], fields: { openingElement: { validate: (0, _utils.assertNodeType)("JSXOpeningElement") }, closingElement: { optional: true, validate: (0, _utils.assertNodeType)("JSXClosingElement") }, children: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) }, selfClosing: { validate: (0, _utils.assertValueType)("boolean"), optional: true } } }); defineType("JSXEmptyExpression", {}); defineType("JSXExpressionContainer", { visitor: ["expression"], aliases: ["Immutable"], fields: { expression: { validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression") } } }); defineType("JSXSpreadChild", { visitor: ["expression"], aliases: ["Immutable"], fields: { expression: { validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("JSXIdentifier", { builder: ["name"], fields: { name: { validate: (0, _utils.assertValueType)("string") } } }); defineType("JSXMemberExpression", { visitor: ["object", "property"], fields: { object: { validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier") }, property: { validate: (0, _utils.assertNodeType)("JSXIdentifier") } } }); defineType("JSXNamespacedName", { visitor: ["namespace", "name"], fields: { namespace: { validate: (0, _utils.assertNodeType)("JSXIdentifier") }, name: { validate: (0, _utils.assertNodeType)("JSXIdentifier") } } }); defineType("JSXOpeningElement", { builder: ["name", "attributes", "selfClosing"], visitor: ["name", "attributes"], aliases: ["Immutable"], fields: { name: { validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName") }, selfClosing: { default: false }, attributes: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute"))) }, typeParameters: { validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), optional: true } } }); defineType("JSXSpreadAttribute", { visitor: ["argument"], fields: { argument: { validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("JSXText", { aliases: ["Immutable"], builder: ["value"], fields: { value: { validate: (0, _utils.assertValueType)("string") } } }); defineType("JSXFragment", { builder: ["openingFragment", "closingFragment", "children"], visitor: ["openingFragment", "children", "closingFragment"], aliases: ["Immutable", "Expression"], fields: { openingFragment: { validate: (0, _utils.assertNodeType)("JSXOpeningFragment") }, closingFragment: { validate: (0, _utils.assertNodeType)("JSXClosingFragment") }, children: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) } } }); defineType("JSXOpeningFragment", { aliases: ["Immutable"] }); defineType("JSXClosingFragment", { aliases: ["Immutable"] }); } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/definitions/placeholders.js var require_placeholders = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/definitions/placeholders.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.PLACEHOLDERS_FLIPPED_ALIAS = exports2.PLACEHOLDERS_ALIAS = exports2.PLACEHOLDERS = void 0; var _utils = require_utils3(); var PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"]; exports2.PLACEHOLDERS = PLACEHOLDERS; var PLACEHOLDERS_ALIAS = { Declaration: ["Statement"], Pattern: ["PatternLike", "LVal"] }; exports2.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS; for (const type of PLACEHOLDERS) { const alias = _utils.ALIAS_KEYS[type]; if (alias != null && alias.length) PLACEHOLDERS_ALIAS[type] = alias; } var PLACEHOLDERS_FLIPPED_ALIAS = {}; exports2.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS; Object.keys(PLACEHOLDERS_ALIAS).forEach((type) => { PLACEHOLDERS_ALIAS[type].forEach((alias) => { if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) { PLACEHOLDERS_FLIPPED_ALIAS[alias] = []; } PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type); }); }); } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/definitions/misc.js var require_misc = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/definitions/misc.js"() { "use strict"; var _utils = require_utils3(); var _placeholders = require_placeholders(); var defineType = (0, _utils.defineAliasedType)("Miscellaneous"); { defineType("Noop", { visitor: [] }); } defineType("Placeholder", { visitor: [], builder: ["expectedNode", "name"], fields: { name: { validate: (0, _utils.assertNodeType)("Identifier") }, expectedNode: { validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS) } } }); defineType("V8IntrinsicIdentifier", { builder: ["name"], fields: { name: { validate: (0, _utils.assertValueType)("string") } } }); } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/definitions/experimental.js var require_experimental = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/definitions/experimental.js"() { "use strict"; var _utils = require_utils3(); (0, _utils.default)("ArgumentPlaceholder", {}); (0, _utils.default)("BindExpression", { visitor: ["object", "callee"], aliases: ["Expression"], fields: !process.env.BABEL_TYPES_8_BREAKING ? { object: { validate: Object.assign(() => { }, { oneOfNodeTypes: ["Expression"] }) }, callee: { validate: Object.assign(() => { }, { oneOfNodeTypes: ["Expression"] }) } } : { object: { validate: (0, _utils.assertNodeType)("Expression") }, callee: { validate: (0, _utils.assertNodeType)("Expression") } } }); (0, _utils.default)("ImportAttribute", { visitor: ["key", "value"], fields: { key: { validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral") }, value: { validate: (0, _utils.assertNodeType)("StringLiteral") } } }); (0, _utils.default)("Decorator", { visitor: ["expression"], fields: { expression: { validate: (0, _utils.assertNodeType)("Expression") } } }); (0, _utils.default)("DoExpression", { visitor: ["body"], builder: ["body", "async"], aliases: ["Expression"], fields: { body: { validate: (0, _utils.assertNodeType)("BlockStatement") }, async: { validate: (0, _utils.assertValueType)("boolean"), default: false } } }); (0, _utils.default)("ExportDefaultSpecifier", { visitor: ["exported"], aliases: ["ModuleSpecifier"], fields: { exported: { validate: (0, _utils.assertNodeType)("Identifier") } } }); (0, _utils.default)("RecordExpression", { visitor: ["properties"], aliases: ["Expression"], fields: { properties: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "SpreadElement"))) } } }); (0, _utils.default)("TupleExpression", { fields: { elements: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement"))), default: [] } }, visitor: ["elements"], aliases: ["Expression"] }); (0, _utils.default)("DecimalLiteral", { builder: ["value"], fields: { value: { validate: (0, _utils.assertValueType)("string") } }, aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); (0, _utils.default)("ModuleExpression", { visitor: ["body"], fields: { body: { validate: (0, _utils.assertNodeType)("Program") } }, aliases: ["Expression"] }); (0, _utils.default)("TopicReference", { aliases: ["Expression"] }); (0, _utils.default)("PipelineTopicExpression", { builder: ["expression"], visitor: ["expression"], fields: { expression: { validate: (0, _utils.assertNodeType)("Expression") } }, aliases: ["Expression"] }); (0, _utils.default)("PipelineBareFunction", { builder: ["callee"], visitor: ["callee"], fields: { callee: { validate: (0, _utils.assertNodeType)("Expression") } }, aliases: ["Expression"] }); (0, _utils.default)("PipelinePrimaryTopicReference", { aliases: ["Expression"] }); } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/definitions/typescript.js var require_typescript = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/definitions/typescript.js"() { "use strict"; var _utils = require_utils3(); var _core = require_core2(); var _is = require_is(); var defineType = (0, _utils.defineAliasedType)("TypeScript"); var bool = (0, _utils.assertValueType)("boolean"); var tSFunctionTypeAnnotationCommon = { returnType: { validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"), optional: true }, typeParameters: { validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"), optional: true } }; defineType("TSParameterProperty", { aliases: ["LVal"], visitor: ["parameter"], fields: { accessibility: { validate: (0, _utils.assertOneOf)("public", "private", "protected"), optional: true }, readonly: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, parameter: { validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern") }, override: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true } } }); defineType("TSDeclareFunction", { aliases: ["Statement", "Declaration"], visitor: ["id", "typeParameters", "params", "returnType"], fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon) }); defineType("TSDeclareMethod", { visitor: ["decorators", "key", "typeParameters", "params", "returnType"], fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon) }); defineType("TSQualifiedName", { aliases: ["TSEntityName"], visitor: ["left", "right"], fields: { left: (0, _utils.validateType)("TSEntityName"), right: (0, _utils.validateType)("Identifier") } }); var signatureDeclarationCommon = { typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), ["parameters"]: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]), ["typeAnnotation"]: (0, _utils.validateOptionalType)("TSTypeAnnotation") }; var callConstructSignatureDeclaration = { aliases: ["TSTypeElement"], visitor: ["typeParameters", "parameters", "typeAnnotation"], fields: signatureDeclarationCommon }; defineType("TSCallSignatureDeclaration", callConstructSignatureDeclaration); defineType("TSConstructSignatureDeclaration", callConstructSignatureDeclaration); var namedTypeElementCommon = { key: (0, _utils.validateType)("Expression"), computed: (0, _utils.validate)(bool), optional: (0, _utils.validateOptional)(bool) }; defineType("TSPropertySignature", { aliases: ["TSTypeElement"], visitor: ["key", "typeAnnotation", "initializer"], fields: Object.assign({}, namedTypeElementCommon, { readonly: (0, _utils.validateOptional)(bool), typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"), initializer: (0, _utils.validateOptionalType)("Expression"), kind: { validate: (0, _utils.assertOneOf)("get", "set") } }) }); defineType("TSMethodSignature", { aliases: ["TSTypeElement"], visitor: ["key", "typeParameters", "parameters", "typeAnnotation"], fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon, { kind: { validate: (0, _utils.assertOneOf)("method", "get", "set") } }) }); defineType("TSIndexSignature", { aliases: ["TSTypeElement"], visitor: ["parameters", "typeAnnotation"], fields: { readonly: (0, _utils.validateOptional)(bool), static: (0, _utils.validateOptional)(bool), parameters: (0, _utils.validateArrayOfType)("Identifier"), typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation") } }); var tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"]; for (const type of tsKeywordTypes) { defineType(type, { aliases: ["TSType", "TSBaseType"], visitor: [], fields: {} }); } defineType("TSThisType", { aliases: ["TSType", "TSBaseType"], visitor: [], fields: {} }); var fnOrCtrBase = { aliases: ["TSType"], visitor: ["typeParameters", "parameters", "typeAnnotation"] }; defineType("TSFunctionType", Object.assign({}, fnOrCtrBase, { fields: signatureDeclarationCommon })); defineType("TSConstructorType", Object.assign({}, fnOrCtrBase, { fields: Object.assign({}, signatureDeclarationCommon, { abstract: (0, _utils.validateOptional)(bool) }) })); defineType("TSTypeReference", { aliases: ["TSType"], visitor: ["typeName", "typeParameters"], fields: { typeName: (0, _utils.validateType)("TSEntityName"), typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") } }); defineType("TSTypePredicate", { aliases: ["TSType"], visitor: ["parameterName", "typeAnnotation"], builder: ["parameterName", "typeAnnotation", "asserts"], fields: { parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]), typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"), asserts: (0, _utils.validateOptional)(bool) } }); defineType("TSTypeQuery", { aliases: ["TSType"], visitor: ["exprName"], fields: { exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"]) } }); defineType("TSTypeLiteral", { aliases: ["TSType"], visitor: ["members"], fields: { members: (0, _utils.validateArrayOfType)("TSTypeElement") } }); defineType("TSArrayType", { aliases: ["TSType"], visitor: ["elementType"], fields: { elementType: (0, _utils.validateType)("TSType") } }); defineType("TSTupleType", { aliases: ["TSType"], visitor: ["elementTypes"], fields: { elementTypes: (0, _utils.validateArrayOfType)(["TSType", "TSNamedTupleMember"]) } }); defineType("TSOptionalType", { aliases: ["TSType"], visitor: ["typeAnnotation"], fields: { typeAnnotation: (0, _utils.validateType)("TSType") } }); defineType("TSRestType", { aliases: ["TSType"], visitor: ["typeAnnotation"], fields: { typeAnnotation: (0, _utils.validateType)("TSType") } }); defineType("TSNamedTupleMember", { visitor: ["label", "elementType"], builder: ["label", "elementType", "optional"], fields: { label: (0, _utils.validateType)("Identifier"), optional: { validate: bool, default: false }, elementType: (0, _utils.validateType)("TSType") } }); var unionOrIntersection = { aliases: ["TSType"], visitor: ["types"], fields: { types: (0, _utils.validateArrayOfType)("TSType") } }; defineType("TSUnionType", unionOrIntersection); defineType("TSIntersectionType", unionOrIntersection); defineType("TSConditionalType", { aliases: ["TSType"], visitor: ["checkType", "extendsType", "trueType", "falseType"], fields: { checkType: (0, _utils.validateType)("TSType"), extendsType: (0, _utils.validateType)("TSType"), trueType: (0, _utils.validateType)("TSType"), falseType: (0, _utils.validateType)("TSType") } }); defineType("TSInferType", { aliases: ["TSType"], visitor: ["typeParameter"], fields: { typeParameter: (0, _utils.validateType)("TSTypeParameter") } }); defineType("TSParenthesizedType", { aliases: ["TSType"], visitor: ["typeAnnotation"], fields: { typeAnnotation: (0, _utils.validateType)("TSType") } }); defineType("TSTypeOperator", { aliases: ["TSType"], visitor: ["typeAnnotation"], fields: { operator: (0, _utils.validate)((0, _utils.assertValueType)("string")), typeAnnotation: (0, _utils.validateType)("TSType") } }); defineType("TSIndexedAccessType", { aliases: ["TSType"], visitor: ["objectType", "indexType"], fields: { objectType: (0, _utils.validateType)("TSType"), indexType: (0, _utils.validateType)("TSType") } }); defineType("TSMappedType", { aliases: ["TSType"], visitor: ["typeParameter", "typeAnnotation", "nameType"], fields: { readonly: (0, _utils.validateOptional)(bool), typeParameter: (0, _utils.validateType)("TSTypeParameter"), optional: (0, _utils.validateOptional)(bool), typeAnnotation: (0, _utils.validateOptionalType)("TSType"), nameType: (0, _utils.validateOptionalType)("TSType") } }); defineType("TSLiteralType", { aliases: ["TSType", "TSBaseType"], visitor: ["literal"], fields: { literal: { validate: function() { const unaryExpression = (0, _utils.assertNodeType)("NumericLiteral", "BigIntLiteral"); const unaryOperator = (0, _utils.assertOneOf)("-"); const literal = (0, _utils.assertNodeType)("NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral"); function validator(parent, key, node) { if ((0, _is.default)("UnaryExpression", node)) { unaryOperator(node, "operator", node.operator); unaryExpression(node, "argument", node.argument); } else { literal(parent, key, node); } } validator.oneOfNodeTypes = ["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral", "UnaryExpression"]; return validator; }() } } }); defineType("TSExpressionWithTypeArguments", { aliases: ["TSType"], visitor: ["expression", "typeParameters"], fields: { expression: (0, _utils.validateType)("TSEntityName"), typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") } }); defineType("TSInterfaceDeclaration", { aliases: ["Statement", "Declaration"], visitor: ["id", "typeParameters", "extends", "body"], fields: { declare: (0, _utils.validateOptional)(bool), id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")), body: (0, _utils.validateType)("TSInterfaceBody") } }); defineType("TSInterfaceBody", { visitor: ["body"], fields: { body: (0, _utils.validateArrayOfType)("TSTypeElement") } }); defineType("TSTypeAliasDeclaration", { aliases: ["Statement", "Declaration"], visitor: ["id", "typeParameters", "typeAnnotation"], fields: { declare: (0, _utils.validateOptional)(bool), id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), typeAnnotation: (0, _utils.validateType)("TSType") } }); defineType("TSAsExpression", { aliases: ["Expression"], visitor: ["expression", "typeAnnotation"], fields: { expression: (0, _utils.validateType)("Expression"), typeAnnotation: (0, _utils.validateType)("TSType") } }); defineType("TSTypeAssertion", { aliases: ["Expression"], visitor: ["typeAnnotation", "expression"], fields: { typeAnnotation: (0, _utils.validateType)("TSType"), expression: (0, _utils.validateType)("Expression") } }); defineType("TSEnumDeclaration", { aliases: ["Statement", "Declaration"], visitor: ["id", "members"], fields: { declare: (0, _utils.validateOptional)(bool), const: (0, _utils.validateOptional)(bool), id: (0, _utils.validateType)("Identifier"), members: (0, _utils.validateArrayOfType)("TSEnumMember"), initializer: (0, _utils.validateOptionalType)("Expression") } }); defineType("TSEnumMember", { visitor: ["id", "initializer"], fields: { id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), initializer: (0, _utils.validateOptionalType)("Expression") } }); defineType("TSModuleDeclaration", { aliases: ["Statement", "Declaration"], visitor: ["id", "body"], fields: { declare: (0, _utils.validateOptional)(bool), global: (0, _utils.validateOptional)(bool), id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"]) } }); defineType("TSModuleBlock", { aliases: ["Scopable", "Block", "BlockParent"], visitor: ["body"], fields: { body: (0, _utils.validateArrayOfType)("Statement") } }); defineType("TSImportType", { aliases: ["TSType"], visitor: ["argument", "qualifier", "typeParameters"], fields: { argument: (0, _utils.validateType)("StringLiteral"), qualifier: (0, _utils.validateOptionalType)("TSEntityName"), typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") } }); defineType("TSImportEqualsDeclaration", { aliases: ["Statement"], visitor: ["id", "moduleReference"], fields: { isExport: (0, _utils.validate)(bool), id: (0, _utils.validateType)("Identifier"), moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"]), importKind: { validate: (0, _utils.assertOneOf)("type", "value"), optional: true } } }); defineType("TSExternalModuleReference", { visitor: ["expression"], fields: { expression: (0, _utils.validateType)("StringLiteral") } }); defineType("TSNonNullExpression", { aliases: ["Expression"], visitor: ["expression"], fields: { expression: (0, _utils.validateType)("Expression") } }); defineType("TSExportAssignment", { aliases: ["Statement"], visitor: ["expression"], fields: { expression: (0, _utils.validateType)("Expression") } }); defineType("TSNamespaceExportDeclaration", { aliases: ["Statement"], visitor: ["id"], fields: { id: (0, _utils.validateType)("Identifier") } }); defineType("TSTypeAnnotation", { visitor: ["typeAnnotation"], fields: { typeAnnotation: { validate: (0, _utils.assertNodeType)("TSType") } } }); defineType("TSTypeParameterInstantiation", { visitor: ["params"], fields: { params: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType"))) } } }); defineType("TSTypeParameterDeclaration", { visitor: ["params"], fields: { params: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter"))) } } }); defineType("TSTypeParameter", { builder: ["constraint", "default", "name"], visitor: ["constraint", "default"], fields: { name: { validate: (0, _utils.assertValueType)("string") }, constraint: { validate: (0, _utils.assertNodeType)("TSType"), optional: true }, default: { validate: (0, _utils.assertNodeType)("TSType"), optional: true } } }); } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/definitions/index.js var require_definitions = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/definitions/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "ALIAS_KEYS", { enumerable: true, get: function() { return _utils.ALIAS_KEYS; } }); Object.defineProperty(exports2, "BUILDER_KEYS", { enumerable: true, get: function() { return _utils.BUILDER_KEYS; } }); Object.defineProperty(exports2, "DEPRECATED_KEYS", { enumerable: true, get: function() { return _utils.DEPRECATED_KEYS; } }); Object.defineProperty(exports2, "FLIPPED_ALIAS_KEYS", { enumerable: true, get: function() { return _utils.FLIPPED_ALIAS_KEYS; } }); Object.defineProperty(exports2, "NODE_FIELDS", { enumerable: true, get: function() { return _utils.NODE_FIELDS; } }); Object.defineProperty(exports2, "NODE_PARENT_VALIDATIONS", { enumerable: true, get: function() { return _utils.NODE_PARENT_VALIDATIONS; } }); Object.defineProperty(exports2, "PLACEHOLDERS", { enumerable: true, get: function() { return _placeholders.PLACEHOLDERS; } }); Object.defineProperty(exports2, "PLACEHOLDERS_ALIAS", { enumerable: true, get: function() { return _placeholders.PLACEHOLDERS_ALIAS; } }); Object.defineProperty(exports2, "PLACEHOLDERS_FLIPPED_ALIAS", { enumerable: true, get: function() { return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS; } }); exports2.TYPES = void 0; Object.defineProperty(exports2, "VISITOR_KEYS", { enumerable: true, get: function() { return _utils.VISITOR_KEYS; } }); var _toFastProperties = require_to_fast_properties(); require_core2(); require_flow(); require_jsx(); require_misc(); require_experimental(); require_typescript(); var _utils = require_utils3(); var _placeholders = require_placeholders(); _toFastProperties(_utils.VISITOR_KEYS); _toFastProperties(_utils.ALIAS_KEYS); _toFastProperties(_utils.FLIPPED_ALIAS_KEYS); _toFastProperties(_utils.NODE_FIELDS); _toFastProperties(_utils.BUILDER_KEYS); _toFastProperties(_utils.DEPRECATED_KEYS); _toFastProperties(_placeholders.PLACEHOLDERS_ALIAS); _toFastProperties(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS); var TYPES = [].concat(Object.keys(_utils.VISITOR_KEYS), Object.keys(_utils.FLIPPED_ALIAS_KEYS), Object.keys(_utils.DEPRECATED_KEYS)); exports2.TYPES = TYPES; } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/builders/builder.js var require_builder = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/builders/builder.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = builder; var _definitions = require_definitions(); var _validate = require_validate(); function builder() { const type = this; const keys = _definitions.BUILDER_KEYS[type]; const countArgs = arguments.length; if (countArgs > keys.length) { throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys.length}`); } const node = { type }; for (let i = 0; i < keys.length; ++i) { const key = keys[i]; const field = _definitions.NODE_FIELDS[type][key]; let arg; if (i < countArgs) arg = arguments[i]; if (arg === void 0) { arg = Array.isArray(field.default) ? [] : field.default; } node[key] = arg; } for (const key in node) { (0, _validate.default)(node, key, node[key]); } return node; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/builders/generated/index.js var require_generated2 = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/builders/generated/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.anyTypeAnnotation = anyTypeAnnotation; exports2.argumentPlaceholder = argumentPlaceholder; exports2.arrayExpression = arrayExpression; exports2.arrayPattern = arrayPattern; exports2.arrayTypeAnnotation = arrayTypeAnnotation; exports2.arrowFunctionExpression = arrowFunctionExpression; exports2.assignmentExpression = assignmentExpression; exports2.assignmentPattern = assignmentPattern; exports2.awaitExpression = awaitExpression; exports2.bigIntLiteral = bigIntLiteral; exports2.binaryExpression = binaryExpression; exports2.bindExpression = bindExpression; exports2.blockStatement = blockStatement; exports2.booleanLiteral = booleanLiteral; exports2.booleanLiteralTypeAnnotation = booleanLiteralTypeAnnotation; exports2.booleanTypeAnnotation = booleanTypeAnnotation; exports2.breakStatement = breakStatement; exports2.callExpression = callExpression; exports2.catchClause = catchClause; exports2.classAccessorProperty = classAccessorProperty; exports2.classBody = classBody; exports2.classDeclaration = classDeclaration; exports2.classExpression = classExpression; exports2.classImplements = classImplements; exports2.classMethod = classMethod; exports2.classPrivateMethod = classPrivateMethod; exports2.classPrivateProperty = classPrivateProperty; exports2.classProperty = classProperty; exports2.conditionalExpression = conditionalExpression; exports2.continueStatement = continueStatement; exports2.debuggerStatement = debuggerStatement; exports2.decimalLiteral = decimalLiteral; exports2.declareClass = declareClass; exports2.declareExportAllDeclaration = declareExportAllDeclaration; exports2.declareExportDeclaration = declareExportDeclaration; exports2.declareFunction = declareFunction; exports2.declareInterface = declareInterface; exports2.declareModule = declareModule; exports2.declareModuleExports = declareModuleExports; exports2.declareOpaqueType = declareOpaqueType; exports2.declareTypeAlias = declareTypeAlias; exports2.declareVariable = declareVariable; exports2.declaredPredicate = declaredPredicate; exports2.decorator = decorator; exports2.directive = directive; exports2.directiveLiteral = directiveLiteral; exports2.doExpression = doExpression; exports2.doWhileStatement = doWhileStatement; exports2.emptyStatement = emptyStatement; exports2.emptyTypeAnnotation = emptyTypeAnnotation; exports2.enumBooleanBody = enumBooleanBody; exports2.enumBooleanMember = enumBooleanMember; exports2.enumDeclaration = enumDeclaration; exports2.enumDefaultedMember = enumDefaultedMember; exports2.enumNumberBody = enumNumberBody; exports2.enumNumberMember = enumNumberMember; exports2.enumStringBody = enumStringBody; exports2.enumStringMember = enumStringMember; exports2.enumSymbolBody = enumSymbolBody; exports2.existsTypeAnnotation = existsTypeAnnotation; exports2.exportAllDeclaration = exportAllDeclaration; exports2.exportDefaultDeclaration = exportDefaultDeclaration; exports2.exportDefaultSpecifier = exportDefaultSpecifier; exports2.exportNamedDeclaration = exportNamedDeclaration; exports2.exportNamespaceSpecifier = exportNamespaceSpecifier; exports2.exportSpecifier = exportSpecifier; exports2.expressionStatement = expressionStatement; exports2.file = file; exports2.forInStatement = forInStatement; exports2.forOfStatement = forOfStatement; exports2.forStatement = forStatement; exports2.functionDeclaration = functionDeclaration; exports2.functionExpression = functionExpression; exports2.functionTypeAnnotation = functionTypeAnnotation; exports2.functionTypeParam = functionTypeParam; exports2.genericTypeAnnotation = genericTypeAnnotation; exports2.identifier = identifier; exports2.ifStatement = ifStatement; exports2.import = _import; exports2.importAttribute = importAttribute; exports2.importDeclaration = importDeclaration; exports2.importDefaultSpecifier = importDefaultSpecifier; exports2.importNamespaceSpecifier = importNamespaceSpecifier; exports2.importSpecifier = importSpecifier; exports2.indexedAccessType = indexedAccessType; exports2.inferredPredicate = inferredPredicate; exports2.interfaceDeclaration = interfaceDeclaration; exports2.interfaceExtends = interfaceExtends; exports2.interfaceTypeAnnotation = interfaceTypeAnnotation; exports2.interpreterDirective = interpreterDirective; exports2.intersectionTypeAnnotation = intersectionTypeAnnotation; exports2.jSXAttribute = exports2.jsxAttribute = jsxAttribute; exports2.jSXClosingElement = exports2.jsxClosingElement = jsxClosingElement; exports2.jSXClosingFragment = exports2.jsxClosingFragment = jsxClosingFragment; exports2.jSXElement = exports2.jsxElement = jsxElement; exports2.jSXEmptyExpression = exports2.jsxEmptyExpression = jsxEmptyExpression; exports2.jSXExpressionContainer = exports2.jsxExpressionContainer = jsxExpressionContainer; exports2.jSXFragment = exports2.jsxFragment = jsxFragment; exports2.jSXIdentifier = exports2.jsxIdentifier = jsxIdentifier; exports2.jSXMemberExpression = exports2.jsxMemberExpression = jsxMemberExpression; exports2.jSXNamespacedName = exports2.jsxNamespacedName = jsxNamespacedName; exports2.jSXOpeningElement = exports2.jsxOpeningElement = jsxOpeningElement; exports2.jSXOpeningFragment = exports2.jsxOpeningFragment = jsxOpeningFragment; exports2.jSXSpreadAttribute = exports2.jsxSpreadAttribute = jsxSpreadAttribute; exports2.jSXSpreadChild = exports2.jsxSpreadChild = jsxSpreadChild; exports2.jSXText = exports2.jsxText = jsxText; exports2.labeledStatement = labeledStatement; exports2.logicalExpression = logicalExpression; exports2.memberExpression = memberExpression; exports2.metaProperty = metaProperty; exports2.mixedTypeAnnotation = mixedTypeAnnotation; exports2.moduleExpression = moduleExpression; exports2.newExpression = newExpression; exports2.noop = noop; exports2.nullLiteral = nullLiteral; exports2.nullLiteralTypeAnnotation = nullLiteralTypeAnnotation; exports2.nullableTypeAnnotation = nullableTypeAnnotation; exports2.numberLiteral = NumberLiteral; exports2.numberLiteralTypeAnnotation = numberLiteralTypeAnnotation; exports2.numberTypeAnnotation = numberTypeAnnotation; exports2.numericLiteral = numericLiteral; exports2.objectExpression = objectExpression; exports2.objectMethod = objectMethod; exports2.objectPattern = objectPattern; exports2.objectProperty = objectProperty; exports2.objectTypeAnnotation = objectTypeAnnotation; exports2.objectTypeCallProperty = objectTypeCallProperty; exports2.objectTypeIndexer = objectTypeIndexer; exports2.objectTypeInternalSlot = objectTypeInternalSlot; exports2.objectTypeProperty = objectTypeProperty; exports2.objectTypeSpreadProperty = objectTypeSpreadProperty; exports2.opaqueType = opaqueType; exports2.optionalCallExpression = optionalCallExpression; exports2.optionalIndexedAccessType = optionalIndexedAccessType; exports2.optionalMemberExpression = optionalMemberExpression; exports2.parenthesizedExpression = parenthesizedExpression; exports2.pipelineBareFunction = pipelineBareFunction; exports2.pipelinePrimaryTopicReference = pipelinePrimaryTopicReference; exports2.pipelineTopicExpression = pipelineTopicExpression; exports2.placeholder = placeholder; exports2.privateName = privateName; exports2.program = program; exports2.qualifiedTypeIdentifier = qualifiedTypeIdentifier; exports2.recordExpression = recordExpression; exports2.regExpLiteral = regExpLiteral; exports2.regexLiteral = RegexLiteral; exports2.restElement = restElement; exports2.restProperty = RestProperty; exports2.returnStatement = returnStatement; exports2.sequenceExpression = sequenceExpression; exports2.spreadElement = spreadElement; exports2.spreadProperty = SpreadProperty; exports2.staticBlock = staticBlock; exports2.stringLiteral = stringLiteral; exports2.stringLiteralTypeAnnotation = stringLiteralTypeAnnotation; exports2.stringTypeAnnotation = stringTypeAnnotation; exports2.super = _super; exports2.switchCase = switchCase; exports2.switchStatement = switchStatement; exports2.symbolTypeAnnotation = symbolTypeAnnotation; exports2.taggedTemplateExpression = taggedTemplateExpression; exports2.templateElement = templateElement; exports2.templateLiteral = templateLiteral; exports2.thisExpression = thisExpression; exports2.thisTypeAnnotation = thisTypeAnnotation; exports2.throwStatement = throwStatement; exports2.topicReference = topicReference; exports2.tryStatement = tryStatement; exports2.tSAnyKeyword = exports2.tsAnyKeyword = tsAnyKeyword; exports2.tSArrayType = exports2.tsArrayType = tsArrayType; exports2.tSAsExpression = exports2.tsAsExpression = tsAsExpression; exports2.tSBigIntKeyword = exports2.tsBigIntKeyword = tsBigIntKeyword; exports2.tSBooleanKeyword = exports2.tsBooleanKeyword = tsBooleanKeyword; exports2.tSCallSignatureDeclaration = exports2.tsCallSignatureDeclaration = tsCallSignatureDeclaration; exports2.tSConditionalType = exports2.tsConditionalType = tsConditionalType; exports2.tSConstructSignatureDeclaration = exports2.tsConstructSignatureDeclaration = tsConstructSignatureDeclaration; exports2.tSConstructorType = exports2.tsConstructorType = tsConstructorType; exports2.tSDeclareFunction = exports2.tsDeclareFunction = tsDeclareFunction; exports2.tSDeclareMethod = exports2.tsDeclareMethod = tsDeclareMethod; exports2.tSEnumDeclaration = exports2.tsEnumDeclaration = tsEnumDeclaration; exports2.tSEnumMember = exports2.tsEnumMember = tsEnumMember; exports2.tSExportAssignment = exports2.tsExportAssignment = tsExportAssignment; exports2.tSExpressionWithTypeArguments = exports2.tsExpressionWithTypeArguments = tsExpressionWithTypeArguments; exports2.tSExternalModuleReference = exports2.tsExternalModuleReference = tsExternalModuleReference; exports2.tSFunctionType = exports2.tsFunctionType = tsFunctionType; exports2.tSImportEqualsDeclaration = exports2.tsImportEqualsDeclaration = tsImportEqualsDeclaration; exports2.tSImportType = exports2.tsImportType = tsImportType; exports2.tSIndexSignature = exports2.tsIndexSignature = tsIndexSignature; exports2.tSIndexedAccessType = exports2.tsIndexedAccessType = tsIndexedAccessType; exports2.tSInferType = exports2.tsInferType = tsInferType; exports2.tSInterfaceBody = exports2.tsInterfaceBody = tsInterfaceBody; exports2.tSInterfaceDeclaration = exports2.tsInterfaceDeclaration = tsInterfaceDeclaration; exports2.tSIntersectionType = exports2.tsIntersectionType = tsIntersectionType; exports2.tSIntrinsicKeyword = exports2.tsIntrinsicKeyword = tsIntrinsicKeyword; exports2.tSLiteralType = exports2.tsLiteralType = tsLiteralType; exports2.tSMappedType = exports2.tsMappedType = tsMappedType; exports2.tSMethodSignature = exports2.tsMethodSignature = tsMethodSignature; exports2.tSModuleBlock = exports2.tsModuleBlock = tsModuleBlock; exports2.tSModuleDeclaration = exports2.tsModuleDeclaration = tsModuleDeclaration; exports2.tSNamedTupleMember = exports2.tsNamedTupleMember = tsNamedTupleMember; exports2.tSNamespaceExportDeclaration = exports2.tsNamespaceExportDeclaration = tsNamespaceExportDeclaration; exports2.tSNeverKeyword = exports2.tsNeverKeyword = tsNeverKeyword; exports2.tSNonNullExpression = exports2.tsNonNullExpression = tsNonNullExpression; exports2.tSNullKeyword = exports2.tsNullKeyword = tsNullKeyword; exports2.tSNumberKeyword = exports2.tsNumberKeyword = tsNumberKeyword; exports2.tSObjectKeyword = exports2.tsObjectKeyword = tsObjectKeyword; exports2.tSOptionalType = exports2.tsOptionalType = tsOptionalType; exports2.tSParameterProperty = exports2.tsParameterProperty = tsParameterProperty; exports2.tSParenthesizedType = exports2.tsParenthesizedType = tsParenthesizedType; exports2.tSPropertySignature = exports2.tsPropertySignature = tsPropertySignature; exports2.tSQualifiedName = exports2.tsQualifiedName = tsQualifiedName; exports2.tSRestType = exports2.tsRestType = tsRestType; exports2.tSStringKeyword = exports2.tsStringKeyword = tsStringKeyword; exports2.tSSymbolKeyword = exports2.tsSymbolKeyword = tsSymbolKeyword; exports2.tSThisType = exports2.tsThisType = tsThisType; exports2.tSTupleType = exports2.tsTupleType = tsTupleType; exports2.tSTypeAliasDeclaration = exports2.tsTypeAliasDeclaration = tsTypeAliasDeclaration; exports2.tSTypeAnnotation = exports2.tsTypeAnnotation = tsTypeAnnotation; exports2.tSTypeAssertion = exports2.tsTypeAssertion = tsTypeAssertion; exports2.tSTypeLiteral = exports2.tsTypeLiteral = tsTypeLiteral; exports2.tSTypeOperator = exports2.tsTypeOperator = tsTypeOperator; exports2.tSTypeParameter = exports2.tsTypeParameter = tsTypeParameter; exports2.tSTypeParameterDeclaration = exports2.tsTypeParameterDeclaration = tsTypeParameterDeclaration; exports2.tSTypeParameterInstantiation = exports2.tsTypeParameterInstantiation = tsTypeParameterInstantiation; exports2.tSTypePredicate = exports2.tsTypePredicate = tsTypePredicate; exports2.tSTypeQuery = exports2.tsTypeQuery = tsTypeQuery; exports2.tSTypeReference = exports2.tsTypeReference = tsTypeReference; exports2.tSUndefinedKeyword = exports2.tsUndefinedKeyword = tsUndefinedKeyword; exports2.tSUnionType = exports2.tsUnionType = tsUnionType; exports2.tSUnknownKeyword = exports2.tsUnknownKeyword = tsUnknownKeyword; exports2.tSVoidKeyword = exports2.tsVoidKeyword = tsVoidKeyword; exports2.tupleExpression = tupleExpression; exports2.tupleTypeAnnotation = tupleTypeAnnotation; exports2.typeAlias = typeAlias; exports2.typeAnnotation = typeAnnotation; exports2.typeCastExpression = typeCastExpression; exports2.typeParameter = typeParameter; exports2.typeParameterDeclaration = typeParameterDeclaration; exports2.typeParameterInstantiation = typeParameterInstantiation; exports2.typeofTypeAnnotation = typeofTypeAnnotation; exports2.unaryExpression = unaryExpression; exports2.unionTypeAnnotation = unionTypeAnnotation; exports2.updateExpression = updateExpression; exports2.v8IntrinsicIdentifier = v8IntrinsicIdentifier; exports2.variableDeclaration = variableDeclaration; exports2.variableDeclarator = variableDeclarator; exports2.variance = variance; exports2.voidTypeAnnotation = voidTypeAnnotation; exports2.whileStatement = whileStatement; exports2.withStatement = withStatement; exports2.yieldExpression = yieldExpression; var _builder = require_builder(); function arrayExpression(elements) { return _builder.default.apply("ArrayExpression", arguments); } function assignmentExpression(operator, left, right) { return _builder.default.apply("AssignmentExpression", arguments); } function binaryExpression(operator, left, right) { return _builder.default.apply("BinaryExpression", arguments); } function interpreterDirective(value) { return _builder.default.apply("InterpreterDirective", arguments); } function directive(value) { return _builder.default.apply("Directive", arguments); } function directiveLiteral(value) { return _builder.default.apply("DirectiveLiteral", arguments); } function blockStatement(body, directives) { return _builder.default.apply("BlockStatement", arguments); } function breakStatement(label) { return _builder.default.apply("BreakStatement", arguments); } function callExpression(callee, _arguments) { return _builder.default.apply("CallExpression", arguments); } function catchClause(param, body) { return _builder.default.apply("CatchClause", arguments); } function conditionalExpression(test, consequent, alternate) { return _builder.default.apply("ConditionalExpression", arguments); } function continueStatement(label) { return _builder.default.apply("ContinueStatement", arguments); } function debuggerStatement() { return _builder.default.apply("DebuggerStatement", arguments); } function doWhileStatement(test, body) { return _builder.default.apply("DoWhileStatement", arguments); } function emptyStatement() { return _builder.default.apply("EmptyStatement", arguments); } function expressionStatement(expression) { return _builder.default.apply("ExpressionStatement", arguments); } function file(program2, comments, tokens) { return _builder.default.apply("File", arguments); } function forInStatement(left, right, body) { return _builder.default.apply("ForInStatement", arguments); } function forStatement(init, test, update, body) { return _builder.default.apply("ForStatement", arguments); } function functionDeclaration(id, params, body, generator, async) { return _builder.default.apply("FunctionDeclaration", arguments); } function functionExpression(id, params, body, generator, async) { return _builder.default.apply("FunctionExpression", arguments); } function identifier(name) { return _builder.default.apply("Identifier", arguments); } function ifStatement(test, consequent, alternate) { return _builder.default.apply("IfStatement", arguments); } function labeledStatement(label, body) { return _builder.default.apply("LabeledStatement", arguments); } function stringLiteral(value) { return _builder.default.apply("StringLiteral", arguments); } function numericLiteral(value) { return _builder.default.apply("NumericLiteral", arguments); } function nullLiteral() { return _builder.default.apply("NullLiteral", arguments); } function booleanLiteral(value) { return _builder.default.apply("BooleanLiteral", arguments); } function regExpLiteral(pattern, flags) { return _builder.default.apply("RegExpLiteral", arguments); } function logicalExpression(operator, left, right) { return _builder.default.apply("LogicalExpression", arguments); } function memberExpression(object, property, computed, optional) { return _builder.default.apply("MemberExpression", arguments); } function newExpression(callee, _arguments) { return _builder.default.apply("NewExpression", arguments); } function program(body, directives, sourceType, interpreter) { return _builder.default.apply("Program", arguments); } function objectExpression(properties) { return _builder.default.apply("ObjectExpression", arguments); } function objectMethod(kind, key, params, body, computed, generator, async) { return _builder.default.apply("ObjectMethod", arguments); } function objectProperty(key, value, computed, shorthand, decorators) { return _builder.default.apply("ObjectProperty", arguments); } function restElement(argument) { return _builder.default.apply("RestElement", arguments); } function returnStatement(argument) { return _builder.default.apply("ReturnStatement", arguments); } function sequenceExpression(expressions) { return _builder.default.apply("SequenceExpression", arguments); } function parenthesizedExpression(expression) { return _builder.default.apply("ParenthesizedExpression", arguments); } function switchCase(test, consequent) { return _builder.default.apply("SwitchCase", arguments); } function switchStatement(discriminant, cases) { return _builder.default.apply("SwitchStatement", arguments); } function thisExpression() { return _builder.default.apply("ThisExpression", arguments); } function throwStatement(argument) { return _builder.default.apply("ThrowStatement", arguments); } function tryStatement(block, handler, finalizer) { return _builder.default.apply("TryStatement", arguments); } function unaryExpression(operator, argument, prefix) { return _builder.default.apply("UnaryExpression", arguments); } function updateExpression(operator, argument, prefix) { return _builder.default.apply("UpdateExpression", arguments); } function variableDeclaration(kind, declarations) { return _builder.default.apply("VariableDeclaration", arguments); } function variableDeclarator(id, init) { return _builder.default.apply("VariableDeclarator", arguments); } function whileStatement(test, body) { return _builder.default.apply("WhileStatement", arguments); } function withStatement(object, body) { return _builder.default.apply("WithStatement", arguments); } function assignmentPattern(left, right) { return _builder.default.apply("AssignmentPattern", arguments); } function arrayPattern(elements) { return _builder.default.apply("ArrayPattern", arguments); } function arrowFunctionExpression(params, body, async) { return _builder.default.apply("ArrowFunctionExpression", arguments); } function classBody(body) { return _builder.default.apply("ClassBody", arguments); } function classExpression(id, superClass, body, decorators) { return _builder.default.apply("ClassExpression", arguments); } function classDeclaration(id, superClass, body, decorators) { return _builder.default.apply("ClassDeclaration", arguments); } function exportAllDeclaration(source) { return _builder.default.apply("ExportAllDeclaration", arguments); } function exportDefaultDeclaration(declaration) { return _builder.default.apply("ExportDefaultDeclaration", arguments); } function exportNamedDeclaration(declaration, specifiers, source) { return _builder.default.apply("ExportNamedDeclaration", arguments); } function exportSpecifier(local, exported) { return _builder.default.apply("ExportSpecifier", arguments); } function forOfStatement(left, right, body, _await) { return _builder.default.apply("ForOfStatement", arguments); } function importDeclaration(specifiers, source) { return _builder.default.apply("ImportDeclaration", arguments); } function importDefaultSpecifier(local) { return _builder.default.apply("ImportDefaultSpecifier", arguments); } function importNamespaceSpecifier(local) { return _builder.default.apply("ImportNamespaceSpecifier", arguments); } function importSpecifier(local, imported) { return _builder.default.apply("ImportSpecifier", arguments); } function metaProperty(meta, property) { return _builder.default.apply("MetaProperty", arguments); } function classMethod(kind, key, params, body, computed, _static, generator, async) { return _builder.default.apply("ClassMethod", arguments); } function objectPattern(properties) { return _builder.default.apply("ObjectPattern", arguments); } function spreadElement(argument) { return _builder.default.apply("SpreadElement", arguments); } function _super() { return _builder.default.apply("Super", arguments); } function taggedTemplateExpression(tag, quasi) { return _builder.default.apply("TaggedTemplateExpression", arguments); } function templateElement(value, tail) { return _builder.default.apply("TemplateElement", arguments); } function templateLiteral(quasis, expressions) { return _builder.default.apply("TemplateLiteral", arguments); } function yieldExpression(argument, delegate) { return _builder.default.apply("YieldExpression", arguments); } function awaitExpression(argument) { return _builder.default.apply("AwaitExpression", arguments); } function _import() { return _builder.default.apply("Import", arguments); } function bigIntLiteral(value) { return _builder.default.apply("BigIntLiteral", arguments); } function exportNamespaceSpecifier(exported) { return _builder.default.apply("ExportNamespaceSpecifier", arguments); } function optionalMemberExpression(object, property, computed, optional) { return _builder.default.apply("OptionalMemberExpression", arguments); } function optionalCallExpression(callee, _arguments, optional) { return _builder.default.apply("OptionalCallExpression", arguments); } function classProperty(key, value, typeAnnotation2, decorators, computed, _static) { return _builder.default.apply("ClassProperty", arguments); } function classAccessorProperty(key, value, typeAnnotation2, decorators, computed, _static) { return _builder.default.apply("ClassAccessorProperty", arguments); } function classPrivateProperty(key, value, decorators, _static) { return _builder.default.apply("ClassPrivateProperty", arguments); } function classPrivateMethod(kind, key, params, body, _static) { return _builder.default.apply("ClassPrivateMethod", arguments); } function privateName(id) { return _builder.default.apply("PrivateName", arguments); } function staticBlock(body) { return _builder.default.apply("StaticBlock", arguments); } function anyTypeAnnotation() { return _builder.default.apply("AnyTypeAnnotation", arguments); } function arrayTypeAnnotation(elementType) { return _builder.default.apply("ArrayTypeAnnotation", arguments); } function booleanTypeAnnotation() { return _builder.default.apply("BooleanTypeAnnotation", arguments); } function booleanLiteralTypeAnnotation(value) { return _builder.default.apply("BooleanLiteralTypeAnnotation", arguments); } function nullLiteralTypeAnnotation() { return _builder.default.apply("NullLiteralTypeAnnotation", arguments); } function classImplements(id, typeParameters) { return _builder.default.apply("ClassImplements", arguments); } function declareClass(id, typeParameters, _extends, body) { return _builder.default.apply("DeclareClass", arguments); } function declareFunction(id) { return _builder.default.apply("DeclareFunction", arguments); } function declareInterface(id, typeParameters, _extends, body) { return _builder.default.apply("DeclareInterface", arguments); } function declareModule(id, body, kind) { return _builder.default.apply("DeclareModule", arguments); } function declareModuleExports(typeAnnotation2) { return _builder.default.apply("DeclareModuleExports", arguments); } function declareTypeAlias(id, typeParameters, right) { return _builder.default.apply("DeclareTypeAlias", arguments); } function declareOpaqueType(id, typeParameters, supertype) { return _builder.default.apply("DeclareOpaqueType", arguments); } function declareVariable(id) { return _builder.default.apply("DeclareVariable", arguments); } function declareExportDeclaration(declaration, specifiers, source) { return _builder.default.apply("DeclareExportDeclaration", arguments); } function declareExportAllDeclaration(source) { return _builder.default.apply("DeclareExportAllDeclaration", arguments); } function declaredPredicate(value) { return _builder.default.apply("DeclaredPredicate", arguments); } function existsTypeAnnotation() { return _builder.default.apply("ExistsTypeAnnotation", arguments); } function functionTypeAnnotation(typeParameters, params, rest, returnType) { return _builder.default.apply("FunctionTypeAnnotation", arguments); } function functionTypeParam(name, typeAnnotation2) { return _builder.default.apply("FunctionTypeParam", arguments); } function genericTypeAnnotation(id, typeParameters) { return _builder.default.apply("GenericTypeAnnotation", arguments); } function inferredPredicate() { return _builder.default.apply("InferredPredicate", arguments); } function interfaceExtends(id, typeParameters) { return _builder.default.apply("InterfaceExtends", arguments); } function interfaceDeclaration(id, typeParameters, _extends, body) { return _builder.default.apply("InterfaceDeclaration", arguments); } function interfaceTypeAnnotation(_extends, body) { return _builder.default.apply("InterfaceTypeAnnotation", arguments); } function intersectionTypeAnnotation(types) { return _builder.default.apply("IntersectionTypeAnnotation", arguments); } function mixedTypeAnnotation() { return _builder.default.apply("MixedTypeAnnotation", arguments); } function emptyTypeAnnotation() { return _builder.default.apply("EmptyTypeAnnotation", arguments); } function nullableTypeAnnotation(typeAnnotation2) { return _builder.default.apply("NullableTypeAnnotation", arguments); } function numberLiteralTypeAnnotation(value) { return _builder.default.apply("NumberLiteralTypeAnnotation", arguments); } function numberTypeAnnotation() { return _builder.default.apply("NumberTypeAnnotation", arguments); } function objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) { return _builder.default.apply("ObjectTypeAnnotation", arguments); } function objectTypeInternalSlot(id, value, optional, _static, method) { return _builder.default.apply("ObjectTypeInternalSlot", arguments); } function objectTypeCallProperty(value) { return _builder.default.apply("ObjectTypeCallProperty", arguments); } function objectTypeIndexer(id, key, value, variance2) { return _builder.default.apply("ObjectTypeIndexer", arguments); } function objectTypeProperty(key, value, variance2) { return _builder.default.apply("ObjectTypeProperty", arguments); } function objectTypeSpreadProperty(argument) { return _builder.default.apply("ObjectTypeSpreadProperty", arguments); } function opaqueType(id, typeParameters, supertype, impltype) { return _builder.default.apply("OpaqueType", arguments); } function qualifiedTypeIdentifier(id, qualification) { return _builder.default.apply("QualifiedTypeIdentifier", arguments); } function stringLiteralTypeAnnotation(value) { return _builder.default.apply("StringLiteralTypeAnnotation", arguments); } function stringTypeAnnotation() { return _builder.default.apply("StringTypeAnnotation", arguments); } function symbolTypeAnnotation() { return _builder.default.apply("SymbolTypeAnnotation", arguments); } function thisTypeAnnotation() { return _builder.default.apply("ThisTypeAnnotation", arguments); } function tupleTypeAnnotation(types) { return _builder.default.apply("TupleTypeAnnotation", arguments); } function typeofTypeAnnotation(argument) { return _builder.default.apply("TypeofTypeAnnotation", arguments); } function typeAlias(id, typeParameters, right) { return _builder.default.apply("TypeAlias", arguments); } function typeAnnotation(typeAnnotation2) { return _builder.default.apply("TypeAnnotation", arguments); } function typeCastExpression(expression, typeAnnotation2) { return _builder.default.apply("TypeCastExpression", arguments); } function typeParameter(bound, _default, variance2) { return _builder.default.apply("TypeParameter", arguments); } function typeParameterDeclaration(params) { return _builder.default.apply("TypeParameterDeclaration", arguments); } function typeParameterInstantiation(params) { return _builder.default.apply("TypeParameterInstantiation", arguments); } function unionTypeAnnotation(types) { return _builder.default.apply("UnionTypeAnnotation", arguments); } function variance(kind) { return _builder.default.apply("Variance", arguments); } function voidTypeAnnotation() { return _builder.default.apply("VoidTypeAnnotation", arguments); } function enumDeclaration(id, body) { return _builder.default.apply("EnumDeclaration", arguments); } function enumBooleanBody(members) { return _builder.default.apply("EnumBooleanBody", arguments); } function enumNumberBody(members) { return _builder.default.apply("EnumNumberBody", arguments); } function enumStringBody(members) { return _builder.default.apply("EnumStringBody", arguments); } function enumSymbolBody(members) { return _builder.default.apply("EnumSymbolBody", arguments); } function enumBooleanMember(id) { return _builder.default.apply("EnumBooleanMember", arguments); } function enumNumberMember(id, init) { return _builder.default.apply("EnumNumberMember", arguments); } function enumStringMember(id, init) { return _builder.default.apply("EnumStringMember", arguments); } function enumDefaultedMember(id) { return _builder.default.apply("EnumDefaultedMember", arguments); } function indexedAccessType(objectType, indexType) { return _builder.default.apply("IndexedAccessType", arguments); } function optionalIndexedAccessType(objectType, indexType) { return _builder.default.apply("OptionalIndexedAccessType", arguments); } function jsxAttribute(name, value) { return _builder.default.apply("JSXAttribute", arguments); } function jsxClosingElement(name) { return _builder.default.apply("JSXClosingElement", arguments); } function jsxElement(openingElement, closingElement, children, selfClosing) { return _builder.default.apply("JSXElement", arguments); } function jsxEmptyExpression() { return _builder.default.apply("JSXEmptyExpression", arguments); } function jsxExpressionContainer(expression) { return _builder.default.apply("JSXExpressionContainer", arguments); } function jsxSpreadChild(expression) { return _builder.default.apply("JSXSpreadChild", arguments); } function jsxIdentifier(name) { return _builder.default.apply("JSXIdentifier", arguments); } function jsxMemberExpression(object, property) { return _builder.default.apply("JSXMemberExpression", arguments); } function jsxNamespacedName(namespace, name) { return _builder.default.apply("JSXNamespacedName", arguments); } function jsxOpeningElement(name, attributes, selfClosing) { return _builder.default.apply("JSXOpeningElement", arguments); } function jsxSpreadAttribute(argument) { return _builder.default.apply("JSXSpreadAttribute", arguments); } function jsxText(value) { return _builder.default.apply("JSXText", arguments); } function jsxFragment(openingFragment, closingFragment, children) { return _builder.default.apply("JSXFragment", arguments); } function jsxOpeningFragment() { return _builder.default.apply("JSXOpeningFragment", arguments); } function jsxClosingFragment() { return _builder.default.apply("JSXClosingFragment", arguments); } function noop() { return _builder.default.apply("Noop", arguments); } function placeholder(expectedNode, name) { return _builder.default.apply("Placeholder", arguments); } function v8IntrinsicIdentifier(name) { return _builder.default.apply("V8IntrinsicIdentifier", arguments); } function argumentPlaceholder() { return _builder.default.apply("ArgumentPlaceholder", arguments); } function bindExpression(object, callee) { return _builder.default.apply("BindExpression", arguments); } function importAttribute(key, value) { return _builder.default.apply("ImportAttribute", arguments); } function decorator(expression) { return _builder.default.apply("Decorator", arguments); } function doExpression(body, async) { return _builder.default.apply("DoExpression", arguments); } function exportDefaultSpecifier(exported) { return _builder.default.apply("ExportDefaultSpecifier", arguments); } function recordExpression(properties) { return _builder.default.apply("RecordExpression", arguments); } function tupleExpression(elements) { return _builder.default.apply("TupleExpression", arguments); } function decimalLiteral(value) { return _builder.default.apply("DecimalLiteral", arguments); } function moduleExpression(body) { return _builder.default.apply("ModuleExpression", arguments); } function topicReference() { return _builder.default.apply("TopicReference", arguments); } function pipelineTopicExpression(expression) { return _builder.default.apply("PipelineTopicExpression", arguments); } function pipelineBareFunction(callee) { return _builder.default.apply("PipelineBareFunction", arguments); } function pipelinePrimaryTopicReference() { return _builder.default.apply("PipelinePrimaryTopicReference", arguments); } function tsParameterProperty(parameter) { return _builder.default.apply("TSParameterProperty", arguments); } function tsDeclareFunction(id, typeParameters, params, returnType) { return _builder.default.apply("TSDeclareFunction", arguments); } function tsDeclareMethod(decorators, key, typeParameters, params, returnType) { return _builder.default.apply("TSDeclareMethod", arguments); } function tsQualifiedName(left, right) { return _builder.default.apply("TSQualifiedName", arguments); } function tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation2) { return _builder.default.apply("TSCallSignatureDeclaration", arguments); } function tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation2) { return _builder.default.apply("TSConstructSignatureDeclaration", arguments); } function tsPropertySignature(key, typeAnnotation2, initializer) { return _builder.default.apply("TSPropertySignature", arguments); } function tsMethodSignature(key, typeParameters, parameters, typeAnnotation2) { return _builder.default.apply("TSMethodSignature", arguments); } function tsIndexSignature(parameters, typeAnnotation2) { return _builder.default.apply("TSIndexSignature", arguments); } function tsAnyKeyword() { return _builder.default.apply("TSAnyKeyword", arguments); } function tsBooleanKeyword() { return _builder.default.apply("TSBooleanKeyword", arguments); } function tsBigIntKeyword() { return _builder.default.apply("TSBigIntKeyword", arguments); } function tsIntrinsicKeyword() { return _builder.default.apply("TSIntrinsicKeyword", arguments); } function tsNeverKeyword() { return _builder.default.apply("TSNeverKeyword", arguments); } function tsNullKeyword() { return _builder.default.apply("TSNullKeyword", arguments); } function tsNumberKeyword() { return _builder.default.apply("TSNumberKeyword", arguments); } function tsObjectKeyword() { return _builder.default.apply("TSObjectKeyword", arguments); } function tsStringKeyword() { return _builder.default.apply("TSStringKeyword", arguments); } function tsSymbolKeyword() { return _builder.default.apply("TSSymbolKeyword", arguments); } function tsUndefinedKeyword() { return _builder.default.apply("TSUndefinedKeyword", arguments); } function tsUnknownKeyword() { return _builder.default.apply("TSUnknownKeyword", arguments); } function tsVoidKeyword() { return _builder.default.apply("TSVoidKeyword", arguments); } function tsThisType() { return _builder.default.apply("TSThisType", arguments); } function tsFunctionType(typeParameters, parameters, typeAnnotation2) { return _builder.default.apply("TSFunctionType", arguments); } function tsConstructorType(typeParameters, parameters, typeAnnotation2) { return _builder.default.apply("TSConstructorType", arguments); } function tsTypeReference(typeName, typeParameters) { return _builder.default.apply("TSTypeReference", arguments); } function tsTypePredicate(parameterName, typeAnnotation2, asserts) { return _builder.default.apply("TSTypePredicate", arguments); } function tsTypeQuery(exprName) { return _builder.default.apply("TSTypeQuery", arguments); } function tsTypeLiteral(members) { return _builder.default.apply("TSTypeLiteral", arguments); } function tsArrayType(elementType) { return _builder.default.apply("TSArrayType", arguments); } function tsTupleType(elementTypes) { return _builder.default.apply("TSTupleType", arguments); } function tsOptionalType(typeAnnotation2) { return _builder.default.apply("TSOptionalType", arguments); } function tsRestType(typeAnnotation2) { return _builder.default.apply("TSRestType", arguments); } function tsNamedTupleMember(label, elementType, optional) { return _builder.default.apply("TSNamedTupleMember", arguments); } function tsUnionType(types) { return _builder.default.apply("TSUnionType", arguments); } function tsIntersectionType(types) { return _builder.default.apply("TSIntersectionType", arguments); } function tsConditionalType(checkType, extendsType, trueType, falseType) { return _builder.default.apply("TSConditionalType", arguments); } function tsInferType(typeParameter2) { return _builder.default.apply("TSInferType", arguments); } function tsParenthesizedType(typeAnnotation2) { return _builder.default.apply("TSParenthesizedType", arguments); } function tsTypeOperator(typeAnnotation2) { return _builder.default.apply("TSTypeOperator", arguments); } function tsIndexedAccessType(objectType, indexType) { return _builder.default.apply("TSIndexedAccessType", arguments); } function tsMappedType(typeParameter2, typeAnnotation2, nameType) { return _builder.default.apply("TSMappedType", arguments); } function tsLiteralType(literal) { return _builder.default.apply("TSLiteralType", arguments); } function tsExpressionWithTypeArguments(expression, typeParameters) { return _builder.default.apply("TSExpressionWithTypeArguments", arguments); } function tsInterfaceDeclaration(id, typeParameters, _extends, body) { return _builder.default.apply("TSInterfaceDeclaration", arguments); } function tsInterfaceBody(body) { return _builder.default.apply("TSInterfaceBody", arguments); } function tsTypeAliasDeclaration(id, typeParameters, typeAnnotation2) { return _builder.default.apply("TSTypeAliasDeclaration", arguments); } function tsAsExpression(expression, typeAnnotation2) { return _builder.default.apply("TSAsExpression", arguments); } function tsTypeAssertion(typeAnnotation2, expression) { return _builder.default.apply("TSTypeAssertion", arguments); } function tsEnumDeclaration(id, members) { return _builder.default.apply("TSEnumDeclaration", arguments); } function tsEnumMember(id, initializer) { return _builder.default.apply("TSEnumMember", arguments); } function tsModuleDeclaration(id, body) { return _builder.default.apply("TSModuleDeclaration", arguments); } function tsModuleBlock(body) { return _builder.default.apply("TSModuleBlock", arguments); } function tsImportType(argument, qualifier, typeParameters) { return _builder.default.apply("TSImportType", arguments); } function tsImportEqualsDeclaration(id, moduleReference) { return _builder.default.apply("TSImportEqualsDeclaration", arguments); } function tsExternalModuleReference(expression) { return _builder.default.apply("TSExternalModuleReference", arguments); } function tsNonNullExpression(expression) { return _builder.default.apply("TSNonNullExpression", arguments); } function tsExportAssignment(expression) { return _builder.default.apply("TSExportAssignment", arguments); } function tsNamespaceExportDeclaration(id) { return _builder.default.apply("TSNamespaceExportDeclaration", arguments); } function tsTypeAnnotation(typeAnnotation2) { return _builder.default.apply("TSTypeAnnotation", arguments); } function tsTypeParameterInstantiation(params) { return _builder.default.apply("TSTypeParameterInstantiation", arguments); } function tsTypeParameterDeclaration(params) { return _builder.default.apply("TSTypeParameterDeclaration", arguments); } function tsTypeParameter(constraint, _default, name) { return _builder.default.apply("TSTypeParameter", arguments); } function NumberLiteral(value) { console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); return _builder.default.apply("NumberLiteral", arguments); } function RegexLiteral(pattern, flags) { console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); return _builder.default.apply("RegexLiteral", arguments); } function RestProperty(argument) { console.trace("The node type RestProperty has been renamed to RestElement"); return _builder.default.apply("RestProperty", arguments); } function SpreadProperty(argument) { console.trace("The node type SpreadProperty has been renamed to SpreadElement"); return _builder.default.apply("SpreadProperty", arguments); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js var require_cleanJSXElementLiteralChild = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = cleanJSXElementLiteralChild; var _generated = require_generated2(); function cleanJSXElementLiteralChild(child, args) { const lines = child.value.split(/\r\n|\n|\r/); let lastNonEmptyLine = 0; for (let i = 0; i < lines.length; i++) { if (lines[i].match(/[^ \t]/)) { lastNonEmptyLine = i; } } let str = ""; for (let i = 0; i < lines.length; i++) { const line = lines[i]; const isFirstLine = i === 0; const isLastLine = i === lines.length - 1; const isLastNonEmptyLine = i === lastNonEmptyLine; let trimmedLine = line.replace(/\t/g, " "); if (!isFirstLine) { trimmedLine = trimmedLine.replace(/^[ ]+/, ""); } if (!isLastLine) { trimmedLine = trimmedLine.replace(/[ ]+$/, ""); } if (trimmedLine) { if (!isLastNonEmptyLine) { trimmedLine += " "; } str += trimmedLine; } } if (str) args.push((0, _generated.stringLiteral)(str)); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/builders/react/buildChildren.js var require_buildChildren = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/builders/react/buildChildren.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = buildChildren; var _generated = require_generated(); var _cleanJSXElementLiteralChild = require_cleanJSXElementLiteralChild(); function buildChildren(node) { const elements = []; for (let i = 0; i < node.children.length; i++) { let child = node.children[i]; if ((0, _generated.isJSXText)(child)) { (0, _cleanJSXElementLiteralChild.default)(child, elements); continue; } if ((0, _generated.isJSXExpressionContainer)(child)) child = child.expression; if ((0, _generated.isJSXEmptyExpression)(child)) continue; elements.push(child); } return elements; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isNode.js var require_isNode = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isNode.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isNode; var _definitions = require_definitions(); function isNode(node) { return !!(node && _definitions.VISITOR_KEYS[node.type]); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/asserts/assertNode.js var require_assertNode = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/asserts/assertNode.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = assertNode; var _isNode = require_isNode(); function assertNode(node) { if (!(0, _isNode.default)(node)) { var _node$type; const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node); throw new TypeError(`Not a valid node of type "${type}"`); } } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/asserts/generated/index.js var require_generated3 = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/asserts/generated/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.assertAccessor = assertAccessor; exports2.assertAnyTypeAnnotation = assertAnyTypeAnnotation; exports2.assertArgumentPlaceholder = assertArgumentPlaceholder; exports2.assertArrayExpression = assertArrayExpression; exports2.assertArrayPattern = assertArrayPattern; exports2.assertArrayTypeAnnotation = assertArrayTypeAnnotation; exports2.assertArrowFunctionExpression = assertArrowFunctionExpression; exports2.assertAssignmentExpression = assertAssignmentExpression; exports2.assertAssignmentPattern = assertAssignmentPattern; exports2.assertAwaitExpression = assertAwaitExpression; exports2.assertBigIntLiteral = assertBigIntLiteral; exports2.assertBinary = assertBinary; exports2.assertBinaryExpression = assertBinaryExpression; exports2.assertBindExpression = assertBindExpression; exports2.assertBlock = assertBlock; exports2.assertBlockParent = assertBlockParent; exports2.assertBlockStatement = assertBlockStatement; exports2.assertBooleanLiteral = assertBooleanLiteral; exports2.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation; exports2.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation; exports2.assertBreakStatement = assertBreakStatement; exports2.assertCallExpression = assertCallExpression; exports2.assertCatchClause = assertCatchClause; exports2.assertClass = assertClass; exports2.assertClassAccessorProperty = assertClassAccessorProperty; exports2.assertClassBody = assertClassBody; exports2.assertClassDeclaration = assertClassDeclaration; exports2.assertClassExpression = assertClassExpression; exports2.assertClassImplements = assertClassImplements; exports2.assertClassMethod = assertClassMethod; exports2.assertClassPrivateMethod = assertClassPrivateMethod; exports2.assertClassPrivateProperty = assertClassPrivateProperty; exports2.assertClassProperty = assertClassProperty; exports2.assertCompletionStatement = assertCompletionStatement; exports2.assertConditional = assertConditional; exports2.assertConditionalExpression = assertConditionalExpression; exports2.assertContinueStatement = assertContinueStatement; exports2.assertDebuggerStatement = assertDebuggerStatement; exports2.assertDecimalLiteral = assertDecimalLiteral; exports2.assertDeclaration = assertDeclaration; exports2.assertDeclareClass = assertDeclareClass; exports2.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration; exports2.assertDeclareExportDeclaration = assertDeclareExportDeclaration; exports2.assertDeclareFunction = assertDeclareFunction; exports2.assertDeclareInterface = assertDeclareInterface; exports2.assertDeclareModule = assertDeclareModule; exports2.assertDeclareModuleExports = assertDeclareModuleExports; exports2.assertDeclareOpaqueType = assertDeclareOpaqueType; exports2.assertDeclareTypeAlias = assertDeclareTypeAlias; exports2.assertDeclareVariable = assertDeclareVariable; exports2.assertDeclaredPredicate = assertDeclaredPredicate; exports2.assertDecorator = assertDecorator; exports2.assertDirective = assertDirective; exports2.assertDirectiveLiteral = assertDirectiveLiteral; exports2.assertDoExpression = assertDoExpression; exports2.assertDoWhileStatement = assertDoWhileStatement; exports2.assertEmptyStatement = assertEmptyStatement; exports2.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation; exports2.assertEnumBody = assertEnumBody; exports2.assertEnumBooleanBody = assertEnumBooleanBody; exports2.assertEnumBooleanMember = assertEnumBooleanMember; exports2.assertEnumDeclaration = assertEnumDeclaration; exports2.assertEnumDefaultedMember = assertEnumDefaultedMember; exports2.assertEnumMember = assertEnumMember; exports2.assertEnumNumberBody = assertEnumNumberBody; exports2.assertEnumNumberMember = assertEnumNumberMember; exports2.assertEnumStringBody = assertEnumStringBody; exports2.assertEnumStringMember = assertEnumStringMember; exports2.assertEnumSymbolBody = assertEnumSymbolBody; exports2.assertExistsTypeAnnotation = assertExistsTypeAnnotation; exports2.assertExportAllDeclaration = assertExportAllDeclaration; exports2.assertExportDeclaration = assertExportDeclaration; exports2.assertExportDefaultDeclaration = assertExportDefaultDeclaration; exports2.assertExportDefaultSpecifier = assertExportDefaultSpecifier; exports2.assertExportNamedDeclaration = assertExportNamedDeclaration; exports2.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier; exports2.assertExportSpecifier = assertExportSpecifier; exports2.assertExpression = assertExpression; exports2.assertExpressionStatement = assertExpressionStatement; exports2.assertExpressionWrapper = assertExpressionWrapper; exports2.assertFile = assertFile; exports2.assertFlow = assertFlow; exports2.assertFlowBaseAnnotation = assertFlowBaseAnnotation; exports2.assertFlowDeclaration = assertFlowDeclaration; exports2.assertFlowPredicate = assertFlowPredicate; exports2.assertFlowType = assertFlowType; exports2.assertFor = assertFor; exports2.assertForInStatement = assertForInStatement; exports2.assertForOfStatement = assertForOfStatement; exports2.assertForStatement = assertForStatement; exports2.assertForXStatement = assertForXStatement; exports2.assertFunction = assertFunction; exports2.assertFunctionDeclaration = assertFunctionDeclaration; exports2.assertFunctionExpression = assertFunctionExpression; exports2.assertFunctionParent = assertFunctionParent; exports2.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation; exports2.assertFunctionTypeParam = assertFunctionTypeParam; exports2.assertGenericTypeAnnotation = assertGenericTypeAnnotation; exports2.assertIdentifier = assertIdentifier; exports2.assertIfStatement = assertIfStatement; exports2.assertImmutable = assertImmutable; exports2.assertImport = assertImport; exports2.assertImportAttribute = assertImportAttribute; exports2.assertImportDeclaration = assertImportDeclaration; exports2.assertImportDefaultSpecifier = assertImportDefaultSpecifier; exports2.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier; exports2.assertImportSpecifier = assertImportSpecifier; exports2.assertIndexedAccessType = assertIndexedAccessType; exports2.assertInferredPredicate = assertInferredPredicate; exports2.assertInterfaceDeclaration = assertInterfaceDeclaration; exports2.assertInterfaceExtends = assertInterfaceExtends; exports2.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation; exports2.assertInterpreterDirective = assertInterpreterDirective; exports2.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation; exports2.assertJSX = assertJSX; exports2.assertJSXAttribute = assertJSXAttribute; exports2.assertJSXClosingElement = assertJSXClosingElement; exports2.assertJSXClosingFragment = assertJSXClosingFragment; exports2.assertJSXElement = assertJSXElement; exports2.assertJSXEmptyExpression = assertJSXEmptyExpression; exports2.assertJSXExpressionContainer = assertJSXExpressionContainer; exports2.assertJSXFragment = assertJSXFragment; exports2.assertJSXIdentifier = assertJSXIdentifier; exports2.assertJSXMemberExpression = assertJSXMemberExpression; exports2.assertJSXNamespacedName = assertJSXNamespacedName; exports2.assertJSXOpeningElement = assertJSXOpeningElement; exports2.assertJSXOpeningFragment = assertJSXOpeningFragment; exports2.assertJSXSpreadAttribute = assertJSXSpreadAttribute; exports2.assertJSXSpreadChild = assertJSXSpreadChild; exports2.assertJSXText = assertJSXText; exports2.assertLVal = assertLVal; exports2.assertLabeledStatement = assertLabeledStatement; exports2.assertLiteral = assertLiteral; exports2.assertLogicalExpression = assertLogicalExpression; exports2.assertLoop = assertLoop; exports2.assertMemberExpression = assertMemberExpression; exports2.assertMetaProperty = assertMetaProperty; exports2.assertMethod = assertMethod; exports2.assertMiscellaneous = assertMiscellaneous; exports2.assertMixedTypeAnnotation = assertMixedTypeAnnotation; exports2.assertModuleDeclaration = assertModuleDeclaration; exports2.assertModuleExpression = assertModuleExpression; exports2.assertModuleSpecifier = assertModuleSpecifier; exports2.assertNewExpression = assertNewExpression; exports2.assertNoop = assertNoop; exports2.assertNullLiteral = assertNullLiteral; exports2.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation; exports2.assertNullableTypeAnnotation = assertNullableTypeAnnotation; exports2.assertNumberLiteral = assertNumberLiteral; exports2.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation; exports2.assertNumberTypeAnnotation = assertNumberTypeAnnotation; exports2.assertNumericLiteral = assertNumericLiteral; exports2.assertObjectExpression = assertObjectExpression; exports2.assertObjectMember = assertObjectMember; exports2.assertObjectMethod = assertObjectMethod; exports2.assertObjectPattern = assertObjectPattern; exports2.assertObjectProperty = assertObjectProperty; exports2.assertObjectTypeAnnotation = assertObjectTypeAnnotation; exports2.assertObjectTypeCallProperty = assertObjectTypeCallProperty; exports2.assertObjectTypeIndexer = assertObjectTypeIndexer; exports2.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot; exports2.assertObjectTypeProperty = assertObjectTypeProperty; exports2.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty; exports2.assertOpaqueType = assertOpaqueType; exports2.assertOptionalCallExpression = assertOptionalCallExpression; exports2.assertOptionalIndexedAccessType = assertOptionalIndexedAccessType; exports2.assertOptionalMemberExpression = assertOptionalMemberExpression; exports2.assertParenthesizedExpression = assertParenthesizedExpression; exports2.assertPattern = assertPattern; exports2.assertPatternLike = assertPatternLike; exports2.assertPipelineBareFunction = assertPipelineBareFunction; exports2.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference; exports2.assertPipelineTopicExpression = assertPipelineTopicExpression; exports2.assertPlaceholder = assertPlaceholder; exports2.assertPrivate = assertPrivate; exports2.assertPrivateName = assertPrivateName; exports2.assertProgram = assertProgram; exports2.assertProperty = assertProperty; exports2.assertPureish = assertPureish; exports2.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier; exports2.assertRecordExpression = assertRecordExpression; exports2.assertRegExpLiteral = assertRegExpLiteral; exports2.assertRegexLiteral = assertRegexLiteral; exports2.assertRestElement = assertRestElement; exports2.assertRestProperty = assertRestProperty; exports2.assertReturnStatement = assertReturnStatement; exports2.assertScopable = assertScopable; exports2.assertSequenceExpression = assertSequenceExpression; exports2.assertSpreadElement = assertSpreadElement; exports2.assertSpreadProperty = assertSpreadProperty; exports2.assertStandardized = assertStandardized; exports2.assertStatement = assertStatement; exports2.assertStaticBlock = assertStaticBlock; exports2.assertStringLiteral = assertStringLiteral; exports2.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation; exports2.assertStringTypeAnnotation = assertStringTypeAnnotation; exports2.assertSuper = assertSuper; exports2.assertSwitchCase = assertSwitchCase; exports2.assertSwitchStatement = assertSwitchStatement; exports2.assertSymbolTypeAnnotation = assertSymbolTypeAnnotation; exports2.assertTSAnyKeyword = assertTSAnyKeyword; exports2.assertTSArrayType = assertTSArrayType; exports2.assertTSAsExpression = assertTSAsExpression; exports2.assertTSBaseType = assertTSBaseType; exports2.assertTSBigIntKeyword = assertTSBigIntKeyword; exports2.assertTSBooleanKeyword = assertTSBooleanKeyword; exports2.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration; exports2.assertTSConditionalType = assertTSConditionalType; exports2.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration; exports2.assertTSConstructorType = assertTSConstructorType; exports2.assertTSDeclareFunction = assertTSDeclareFunction; exports2.assertTSDeclareMethod = assertTSDeclareMethod; exports2.assertTSEntityName = assertTSEntityName; exports2.assertTSEnumDeclaration = assertTSEnumDeclaration; exports2.assertTSEnumMember = assertTSEnumMember; exports2.assertTSExportAssignment = assertTSExportAssignment; exports2.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments; exports2.assertTSExternalModuleReference = assertTSExternalModuleReference; exports2.assertTSFunctionType = assertTSFunctionType; exports2.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration; exports2.assertTSImportType = assertTSImportType; exports2.assertTSIndexSignature = assertTSIndexSignature; exports2.assertTSIndexedAccessType = assertTSIndexedAccessType; exports2.assertTSInferType = assertTSInferType; exports2.assertTSInterfaceBody = assertTSInterfaceBody; exports2.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration; exports2.assertTSIntersectionType = assertTSIntersectionType; exports2.assertTSIntrinsicKeyword = assertTSIntrinsicKeyword; exports2.assertTSLiteralType = assertTSLiteralType; exports2.assertTSMappedType = assertTSMappedType; exports2.assertTSMethodSignature = assertTSMethodSignature; exports2.assertTSModuleBlock = assertTSModuleBlock; exports2.assertTSModuleDeclaration = assertTSModuleDeclaration; exports2.assertTSNamedTupleMember = assertTSNamedTupleMember; exports2.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration; exports2.assertTSNeverKeyword = assertTSNeverKeyword; exports2.assertTSNonNullExpression = assertTSNonNullExpression; exports2.assertTSNullKeyword = assertTSNullKeyword; exports2.assertTSNumberKeyword = assertTSNumberKeyword; exports2.assertTSObjectKeyword = assertTSObjectKeyword; exports2.assertTSOptionalType = assertTSOptionalType; exports2.assertTSParameterProperty = assertTSParameterProperty; exports2.assertTSParenthesizedType = assertTSParenthesizedType; exports2.assertTSPropertySignature = assertTSPropertySignature; exports2.assertTSQualifiedName = assertTSQualifiedName; exports2.assertTSRestType = assertTSRestType; exports2.assertTSStringKeyword = assertTSStringKeyword; exports2.assertTSSymbolKeyword = assertTSSymbolKeyword; exports2.assertTSThisType = assertTSThisType; exports2.assertTSTupleType = assertTSTupleType; exports2.assertTSType = assertTSType; exports2.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration; exports2.assertTSTypeAnnotation = assertTSTypeAnnotation; exports2.assertTSTypeAssertion = assertTSTypeAssertion; exports2.assertTSTypeElement = assertTSTypeElement; exports2.assertTSTypeLiteral = assertTSTypeLiteral; exports2.assertTSTypeOperator = assertTSTypeOperator; exports2.assertTSTypeParameter = assertTSTypeParameter; exports2.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration; exports2.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation; exports2.assertTSTypePredicate = assertTSTypePredicate; exports2.assertTSTypeQuery = assertTSTypeQuery; exports2.assertTSTypeReference = assertTSTypeReference; exports2.assertTSUndefinedKeyword = assertTSUndefinedKeyword; exports2.assertTSUnionType = assertTSUnionType; exports2.assertTSUnknownKeyword = assertTSUnknownKeyword; exports2.assertTSVoidKeyword = assertTSVoidKeyword; exports2.assertTaggedTemplateExpression = assertTaggedTemplateExpression; exports2.assertTemplateElement = assertTemplateElement; exports2.assertTemplateLiteral = assertTemplateLiteral; exports2.assertTerminatorless = assertTerminatorless; exports2.assertThisExpression = assertThisExpression; exports2.assertThisTypeAnnotation = assertThisTypeAnnotation; exports2.assertThrowStatement = assertThrowStatement; exports2.assertTopicReference = assertTopicReference; exports2.assertTryStatement = assertTryStatement; exports2.assertTupleExpression = assertTupleExpression; exports2.assertTupleTypeAnnotation = assertTupleTypeAnnotation; exports2.assertTypeAlias = assertTypeAlias; exports2.assertTypeAnnotation = assertTypeAnnotation; exports2.assertTypeCastExpression = assertTypeCastExpression; exports2.assertTypeParameter = assertTypeParameter; exports2.assertTypeParameterDeclaration = assertTypeParameterDeclaration; exports2.assertTypeParameterInstantiation = assertTypeParameterInstantiation; exports2.assertTypeScript = assertTypeScript; exports2.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation; exports2.assertUnaryExpression = assertUnaryExpression; exports2.assertUnaryLike = assertUnaryLike; exports2.assertUnionTypeAnnotation = assertUnionTypeAnnotation; exports2.assertUpdateExpression = assertUpdateExpression; exports2.assertUserWhitespacable = assertUserWhitespacable; exports2.assertV8IntrinsicIdentifier = assertV8IntrinsicIdentifier; exports2.assertVariableDeclaration = assertVariableDeclaration; exports2.assertVariableDeclarator = assertVariableDeclarator; exports2.assertVariance = assertVariance; exports2.assertVoidTypeAnnotation = assertVoidTypeAnnotation; exports2.assertWhile = assertWhile; exports2.assertWhileStatement = assertWhileStatement; exports2.assertWithStatement = assertWithStatement; exports2.assertYieldExpression = assertYieldExpression; var _is = require_is(); function assert(type, node, opts) { if (!(0, _is.default)(type, node, opts)) { throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node.type}".`); } } function assertArrayExpression(node, opts) { assert("ArrayExpression", node, opts); } function assertAssignmentExpression(node, opts) { assert("AssignmentExpression", node, opts); } function assertBinaryExpression(node, opts) { assert("BinaryExpression", node, opts); } function assertInterpreterDirective(node, opts) { assert("InterpreterDirective", node, opts); } function assertDirective(node, opts) { assert("Directive", node, opts); } function assertDirectiveLiteral(node, opts) { assert("DirectiveLiteral", node, opts); } function assertBlockStatement(node, opts) { assert("BlockStatement", node, opts); } function assertBreakStatement(node, opts) { assert("BreakStatement", node, opts); } function assertCallExpression(node, opts) { assert("CallExpression", node, opts); } function assertCatchClause(node, opts) { assert("CatchClause", node, opts); } function assertConditionalExpression(node, opts) { assert("ConditionalExpression", node, opts); } function assertContinueStatement(node, opts) { assert("ContinueStatement", node, opts); } function assertDebuggerStatement(node, opts) { assert("DebuggerStatement", node, opts); } function assertDoWhileStatement(node, opts) { assert("DoWhileStatement", node, opts); } function assertEmptyStatement(node, opts) { assert("EmptyStatement", node, opts); } function assertExpressionStatement(node, opts) { assert("ExpressionStatement", node, opts); } function assertFile(node, opts) { assert("File", node, opts); } function assertForInStatement(node, opts) { assert("ForInStatement", node, opts); } function assertForStatement(node, opts) { assert("ForStatement", node, opts); } function assertFunctionDeclaration(node, opts) { assert("FunctionDeclaration", node, opts); } function assertFunctionExpression(node, opts) { assert("FunctionExpression", node, opts); } function assertIdentifier(node, opts) { assert("Identifier", node, opts); } function assertIfStatement(node, opts) { assert("IfStatement", node, opts); } function assertLabeledStatement(node, opts) { assert("LabeledStatement", node, opts); } function assertStringLiteral(node, opts) { assert("StringLiteral", node, opts); } function assertNumericLiteral(node, opts) { assert("NumericLiteral", node, opts); } function assertNullLiteral(node, opts) { assert("NullLiteral", node, opts); } function assertBooleanLiteral(node, opts) { assert("BooleanLiteral", node, opts); } function assertRegExpLiteral(node, opts) { assert("RegExpLiteral", node, opts); } function assertLogicalExpression(node, opts) { assert("LogicalExpression", node, opts); } function assertMemberExpression(node, opts) { assert("MemberExpression", node, opts); } function assertNewExpression(node, opts) { assert("NewExpression", node, opts); } function assertProgram(node, opts) { assert("Program", node, opts); } function assertObjectExpression(node, opts) { assert("ObjectExpression", node, opts); } function assertObjectMethod(node, opts) { assert("ObjectMethod", node, opts); } function assertObjectProperty(node, opts) { assert("ObjectProperty", node, opts); } function assertRestElement(node, opts) { assert("RestElement", node, opts); } function assertReturnStatement(node, opts) { assert("ReturnStatement", node, opts); } function assertSequenceExpression(node, opts) { assert("SequenceExpression", node, opts); } function assertParenthesizedExpression(node, opts) { assert("ParenthesizedExpression", node, opts); } function assertSwitchCase(node, opts) { assert("SwitchCase", node, opts); } function assertSwitchStatement(node, opts) { assert("SwitchStatement", node, opts); } function assertThisExpression(node, opts) { assert("ThisExpression", node, opts); } function assertThrowStatement(node, opts) { assert("ThrowStatement", node, opts); } function assertTryStatement(node, opts) { assert("TryStatement", node, opts); } function assertUnaryExpression(node, opts) { assert("UnaryExpression", node, opts); } function assertUpdateExpression(node, opts) { assert("UpdateExpression", node, opts); } function assertVariableDeclaration(node, opts) { assert("VariableDeclaration", node, opts); } function assertVariableDeclarator(node, opts) { assert("VariableDeclarator", node, opts); } function assertWhileStatement(node, opts) { assert("WhileStatement", node, opts); } function assertWithStatement(node, opts) { assert("WithStatement", node, opts); } function assertAssignmentPattern(node, opts) { assert("AssignmentPattern", node, opts); } function assertArrayPattern(node, opts) { assert("ArrayPattern", node, opts); } function assertArrowFunctionExpression(node, opts) { assert("ArrowFunctionExpression", node, opts); } function assertClassBody(node, opts) { assert("ClassBody", node, opts); } function assertClassExpression(node, opts) { assert("ClassExpression", node, opts); } function assertClassDeclaration(node, opts) { assert("ClassDeclaration", node, opts); } function assertExportAllDeclaration(node, opts) { assert("ExportAllDeclaration", node, opts); } function assertExportDefaultDeclaration(node, opts) { assert("ExportDefaultDeclaration", node, opts); } function assertExportNamedDeclaration(node, opts) { assert("ExportNamedDeclaration", node, opts); } function assertExportSpecifier(node, opts) { assert("ExportSpecifier", node, opts); } function assertForOfStatement(node, opts) { assert("ForOfStatement", node, opts); } function assertImportDeclaration(node, opts) { assert("ImportDeclaration", node, opts); } function assertImportDefaultSpecifier(node, opts) { assert("ImportDefaultSpecifier", node, opts); } function assertImportNamespaceSpecifier(node, opts) { assert("ImportNamespaceSpecifier", node, opts); } function assertImportSpecifier(node, opts) { assert("ImportSpecifier", node, opts); } function assertMetaProperty(node, opts) { assert("MetaProperty", node, opts); } function assertClassMethod(node, opts) { assert("ClassMethod", node, opts); } function assertObjectPattern(node, opts) { assert("ObjectPattern", node, opts); } function assertSpreadElement(node, opts) { assert("SpreadElement", node, opts); } function assertSuper(node, opts) { assert("Super", node, opts); } function assertTaggedTemplateExpression(node, opts) { assert("TaggedTemplateExpression", node, opts); } function assertTemplateElement(node, opts) { assert("TemplateElement", node, opts); } function assertTemplateLiteral(node, opts) { assert("TemplateLiteral", node, opts); } function assertYieldExpression(node, opts) { assert("YieldExpression", node, opts); } function assertAwaitExpression(node, opts) { assert("AwaitExpression", node, opts); } function assertImport(node, opts) { assert("Import", node, opts); } function assertBigIntLiteral(node, opts) { assert("BigIntLiteral", node, opts); } function assertExportNamespaceSpecifier(node, opts) { assert("ExportNamespaceSpecifier", node, opts); } function assertOptionalMemberExpression(node, opts) { assert("OptionalMemberExpression", node, opts); } function assertOptionalCallExpression(node, opts) { assert("OptionalCallExpression", node, opts); } function assertClassProperty(node, opts) { assert("ClassProperty", node, opts); } function assertClassAccessorProperty(node, opts) { assert("ClassAccessorProperty", node, opts); } function assertClassPrivateProperty(node, opts) { assert("ClassPrivateProperty", node, opts); } function assertClassPrivateMethod(node, opts) { assert("ClassPrivateMethod", node, opts); } function assertPrivateName(node, opts) { assert("PrivateName", node, opts); } function assertStaticBlock(node, opts) { assert("StaticBlock", node, opts); } function assertAnyTypeAnnotation(node, opts) { assert("AnyTypeAnnotation", node, opts); } function assertArrayTypeAnnotation(node, opts) { assert("ArrayTypeAnnotation", node, opts); } function assertBooleanTypeAnnotation(node, opts) { assert("BooleanTypeAnnotation", node, opts); } function assertBooleanLiteralTypeAnnotation(node, opts) { assert("BooleanLiteralTypeAnnotation", node, opts); } function assertNullLiteralTypeAnnotation(node, opts) { assert("NullLiteralTypeAnnotation", node, opts); } function assertClassImplements(node, opts) { assert("ClassImplements", node, opts); } function assertDeclareClass(node, opts) { assert("DeclareClass", node, opts); } function assertDeclareFunction(node, opts) { assert("DeclareFunction", node, opts); } function assertDeclareInterface(node, opts) { assert("DeclareInterface", node, opts); } function assertDeclareModule(node, opts) { assert("DeclareModule", node, opts); } function assertDeclareModuleExports(node, opts) { assert("DeclareModuleExports", node, opts); } function assertDeclareTypeAlias(node, opts) { assert("DeclareTypeAlias", node, opts); } function assertDeclareOpaqueType(node, opts) { assert("DeclareOpaqueType", node, opts); } function assertDeclareVariable(node, opts) { assert("DeclareVariable", node, opts); } function assertDeclareExportDeclaration(node, opts) { assert("DeclareExportDeclaration", node, opts); } function assertDeclareExportAllDeclaration(node, opts) { assert("DeclareExportAllDeclaration", node, opts); } function assertDeclaredPredicate(node, opts) { assert("DeclaredPredicate", node, opts); } function assertExistsTypeAnnotation(node, opts) { assert("ExistsTypeAnnotation", node, opts); } function assertFunctionTypeAnnotation(node, opts) { assert("FunctionTypeAnnotation", node, opts); } function assertFunctionTypeParam(node, opts) { assert("FunctionTypeParam", node, opts); } function assertGenericTypeAnnotation(node, opts) { assert("GenericTypeAnnotation", node, opts); } function assertInferredPredicate(node, opts) { assert("InferredPredicate", node, opts); } function assertInterfaceExtends(node, opts) { assert("InterfaceExtends", node, opts); } function assertInterfaceDeclaration(node, opts) { assert("InterfaceDeclaration", node, opts); } function assertInterfaceTypeAnnotation(node, opts) { assert("InterfaceTypeAnnotation", node, opts); } function assertIntersectionTypeAnnotation(node, opts) { assert("IntersectionTypeAnnotation", node, opts); } function assertMixedTypeAnnotation(node, opts) { assert("MixedTypeAnnotation", node, opts); } function assertEmptyTypeAnnotation(node, opts) { assert("EmptyTypeAnnotation", node, opts); } function assertNullableTypeAnnotation(node, opts) { assert("NullableTypeAnnotation", node, opts); } function assertNumberLiteralTypeAnnotation(node, opts) { assert("NumberLiteralTypeAnnotation", node, opts); } function assertNumberTypeAnnotation(node, opts) { assert("NumberTypeAnnotation", node, opts); } function assertObjectTypeAnnotation(node, opts) { assert("ObjectTypeAnnotation", node, opts); } function assertObjectTypeInternalSlot(node, opts) { assert("ObjectTypeInternalSlot", node, opts); } function assertObjectTypeCallProperty(node, opts) { assert("ObjectTypeCallProperty", node, opts); } function assertObjectTypeIndexer(node, opts) { assert("ObjectTypeIndexer", node, opts); } function assertObjectTypeProperty(node, opts) { assert("ObjectTypeProperty", node, opts); } function assertObjectTypeSpreadProperty(node, opts) { assert("ObjectTypeSpreadProperty", node, opts); } function assertOpaqueType(node, opts) { assert("OpaqueType", node, opts); } function assertQualifiedTypeIdentifier(node, opts) { assert("QualifiedTypeIdentifier", node, opts); } function assertStringLiteralTypeAnnotation(node, opts) { assert("StringLiteralTypeAnnotation", node, opts); } function assertStringTypeAnnotation(node, opts) { assert("StringTypeAnnotation", node, opts); } function assertSymbolTypeAnnotation(node, opts) { assert("SymbolTypeAnnotation", node, opts); } function assertThisTypeAnnotation(node, opts) { assert("ThisTypeAnnotation", node, opts); } function assertTupleTypeAnnotation(node, opts) { assert("TupleTypeAnnotation", node, opts); } function assertTypeofTypeAnnotation(node, opts) { assert("TypeofTypeAnnotation", node, opts); } function assertTypeAlias(node, opts) { assert("TypeAlias", node, opts); } function assertTypeAnnotation(node, opts) { assert("TypeAnnotation", node, opts); } function assertTypeCastExpression(node, opts) { assert("TypeCastExpression", node, opts); } function assertTypeParameter(node, opts) { assert("TypeParameter", node, opts); } function assertTypeParameterDeclaration(node, opts) { assert("TypeParameterDeclaration", node, opts); } function assertTypeParameterInstantiation(node, opts) { assert("TypeParameterInstantiation", node, opts); } function assertUnionTypeAnnotation(node, opts) { assert("UnionTypeAnnotation", node, opts); } function assertVariance(node, opts) { assert("Variance", node, opts); } function assertVoidTypeAnnotation(node, opts) { assert("VoidTypeAnnotation", node, opts); } function assertEnumDeclaration(node, opts) { assert("EnumDeclaration", node, opts); } function assertEnumBooleanBody(node, opts) { assert("EnumBooleanBody", node, opts); } function assertEnumNumberBody(node, opts) { assert("EnumNumberBody", node, opts); } function assertEnumStringBody(node, opts) { assert("EnumStringBody", node, opts); } function assertEnumSymbolBody(node, opts) { assert("EnumSymbolBody", node, opts); } function assertEnumBooleanMember(node, opts) { assert("EnumBooleanMember", node, opts); } function assertEnumNumberMember(node, opts) { assert("EnumNumberMember", node, opts); } function assertEnumStringMember(node, opts) { assert("EnumStringMember", node, opts); } function assertEnumDefaultedMember(node, opts) { assert("EnumDefaultedMember", node, opts); } function assertIndexedAccessType(node, opts) { assert("IndexedAccessType", node, opts); } function assertOptionalIndexedAccessType(node, opts) { assert("OptionalIndexedAccessType", node, opts); } function assertJSXAttribute(node, opts) { assert("JSXAttribute", node, opts); } function assertJSXClosingElement(node, opts) { assert("JSXClosingElement", node, opts); } function assertJSXElement(node, opts) { assert("JSXElement", node, opts); } function assertJSXEmptyExpression(node, opts) { assert("JSXEmptyExpression", node, opts); } function assertJSXExpressionContainer(node, opts) { assert("JSXExpressionContainer", node, opts); } function assertJSXSpreadChild(node, opts) { assert("JSXSpreadChild", node, opts); } function assertJSXIdentifier(node, opts) { assert("JSXIdentifier", node, opts); } function assertJSXMemberExpression(node, opts) { assert("JSXMemberExpression", node, opts); } function assertJSXNamespacedName(node, opts) { assert("JSXNamespacedName", node, opts); } function assertJSXOpeningElement(node, opts) { assert("JSXOpeningElement", node, opts); } function assertJSXSpreadAttribute(node, opts) { assert("JSXSpreadAttribute", node, opts); } function assertJSXText(node, opts) { assert("JSXText", node, opts); } function assertJSXFragment(node, opts) { assert("JSXFragment", node, opts); } function assertJSXOpeningFragment(node, opts) { assert("JSXOpeningFragment", node, opts); } function assertJSXClosingFragment(node, opts) { assert("JSXClosingFragment", node, opts); } function assertNoop(node, opts) { assert("Noop", node, opts); } function assertPlaceholder(node, opts) { assert("Placeholder", node, opts); } function assertV8IntrinsicIdentifier(node, opts) { assert("V8IntrinsicIdentifier", node, opts); } function assertArgumentPlaceholder(node, opts) { assert("ArgumentPlaceholder", node, opts); } function assertBindExpression(node, opts) { assert("BindExpression", node, opts); } function assertImportAttribute(node, opts) { assert("ImportAttribute", node, opts); } function assertDecorator(node, opts) { assert("Decorator", node, opts); } function assertDoExpression(node, opts) { assert("DoExpression", node, opts); } function assertExportDefaultSpecifier(node, opts) { assert("ExportDefaultSpecifier", node, opts); } function assertRecordExpression(node, opts) { assert("RecordExpression", node, opts); } function assertTupleExpression(node, opts) { assert("TupleExpression", node, opts); } function assertDecimalLiteral(node, opts) { assert("DecimalLiteral", node, opts); } function assertModuleExpression(node, opts) { assert("ModuleExpression", node, opts); } function assertTopicReference(node, opts) { assert("TopicReference", node, opts); } function assertPipelineTopicExpression(node, opts) { assert("PipelineTopicExpression", node, opts); } function assertPipelineBareFunction(node, opts) { assert("PipelineBareFunction", node, opts); } function assertPipelinePrimaryTopicReference(node, opts) { assert("PipelinePrimaryTopicReference", node, opts); } function assertTSParameterProperty(node, opts) { assert("TSParameterProperty", node, opts); } function assertTSDeclareFunction(node, opts) { assert("TSDeclareFunction", node, opts); } function assertTSDeclareMethod(node, opts) { assert("TSDeclareMethod", node, opts); } function assertTSQualifiedName(node, opts) { assert("TSQualifiedName", node, opts); } function assertTSCallSignatureDeclaration(node, opts) { assert("TSCallSignatureDeclaration", node, opts); } function assertTSConstructSignatureDeclaration(node, opts) { assert("TSConstructSignatureDeclaration", node, opts); } function assertTSPropertySignature(node, opts) { assert("TSPropertySignature", node, opts); } function assertTSMethodSignature(node, opts) { assert("TSMethodSignature", node, opts); } function assertTSIndexSignature(node, opts) { assert("TSIndexSignature", node, opts); } function assertTSAnyKeyword(node, opts) { assert("TSAnyKeyword", node, opts); } function assertTSBooleanKeyword(node, opts) { assert("TSBooleanKeyword", node, opts); } function assertTSBigIntKeyword(node, opts) { assert("TSBigIntKeyword", node, opts); } function assertTSIntrinsicKeyword(node, opts) { assert("TSIntrinsicKeyword", node, opts); } function assertTSNeverKeyword(node, opts) { assert("TSNeverKeyword", node, opts); } function assertTSNullKeyword(node, opts) { assert("TSNullKeyword", node, opts); } function assertTSNumberKeyword(node, opts) { assert("TSNumberKeyword", node, opts); } function assertTSObjectKeyword(node, opts) { assert("TSObjectKeyword", node, opts); } function assertTSStringKeyword(node, opts) { assert("TSStringKeyword", node, opts); } function assertTSSymbolKeyword(node, opts) { assert("TSSymbolKeyword", node, opts); } function assertTSUndefinedKeyword(node, opts) { assert("TSUndefinedKeyword", node, opts); } function assertTSUnknownKeyword(node, opts) { assert("TSUnknownKeyword", node, opts); } function assertTSVoidKeyword(node, opts) { assert("TSVoidKeyword", node, opts); } function assertTSThisType(node, opts) { assert("TSThisType", node, opts); } function assertTSFunctionType(node, opts) { assert("TSFunctionType", node, opts); } function assertTSConstructorType(node, opts) { assert("TSConstructorType", node, opts); } function assertTSTypeReference(node, opts) { assert("TSTypeReference", node, opts); } function assertTSTypePredicate(node, opts) { assert("TSTypePredicate", node, opts); } function assertTSTypeQuery(node, opts) { assert("TSTypeQuery", node, opts); } function assertTSTypeLiteral(node, opts) { assert("TSTypeLiteral", node, opts); } function assertTSArrayType(node, opts) { assert("TSArrayType", node, opts); } function assertTSTupleType(node, opts) { assert("TSTupleType", node, opts); } function assertTSOptionalType(node, opts) { assert("TSOptionalType", node, opts); } function assertTSRestType(node, opts) { assert("TSRestType", node, opts); } function assertTSNamedTupleMember(node, opts) { assert("TSNamedTupleMember", node, opts); } function assertTSUnionType(node, opts) { assert("TSUnionType", node, opts); } function assertTSIntersectionType(node, opts) { assert("TSIntersectionType", node, opts); } function assertTSConditionalType(node, opts) { assert("TSConditionalType", node, opts); } function assertTSInferType(node, opts) { assert("TSInferType", node, opts); } function assertTSParenthesizedType(node, opts) { assert("TSParenthesizedType", node, opts); } function assertTSTypeOperator(node, opts) { assert("TSTypeOperator", node, opts); } function assertTSIndexedAccessType(node, opts) { assert("TSIndexedAccessType", node, opts); } function assertTSMappedType(node, opts) { assert("TSMappedType", node, opts); } function assertTSLiteralType(node, opts) { assert("TSLiteralType", node, opts); } function assertTSExpressionWithTypeArguments(node, opts) { assert("TSExpressionWithTypeArguments", node, opts); } function assertTSInterfaceDeclaration(node, opts) { assert("TSInterfaceDeclaration", node, opts); } function assertTSInterfaceBody(node, opts) { assert("TSInterfaceBody", node, opts); } function assertTSTypeAliasDeclaration(node, opts) { assert("TSTypeAliasDeclaration", node, opts); } function assertTSAsExpression(node, opts) { assert("TSAsExpression", node, opts); } function assertTSTypeAssertion(node, opts) { assert("TSTypeAssertion", node, opts); } function assertTSEnumDeclaration(node, opts) { assert("TSEnumDeclaration", node, opts); } function assertTSEnumMember(node, opts) { assert("TSEnumMember", node, opts); } function assertTSModuleDeclaration(node, opts) { assert("TSModuleDeclaration", node, opts); } function assertTSModuleBlock(node, opts) { assert("TSModuleBlock", node, opts); } function assertTSImportType(node, opts) { assert("TSImportType", node, opts); } function assertTSImportEqualsDeclaration(node, opts) { assert("TSImportEqualsDeclaration", node, opts); } function assertTSExternalModuleReference(node, opts) { assert("TSExternalModuleReference", node, opts); } function assertTSNonNullExpression(node, opts) { assert("TSNonNullExpression", node, opts); } function assertTSExportAssignment(node, opts) { assert("TSExportAssignment", node, opts); } function assertTSNamespaceExportDeclaration(node, opts) { assert("TSNamespaceExportDeclaration", node, opts); } function assertTSTypeAnnotation(node, opts) { assert("TSTypeAnnotation", node, opts); } function assertTSTypeParameterInstantiation(node, opts) { assert("TSTypeParameterInstantiation", node, opts); } function assertTSTypeParameterDeclaration(node, opts) { assert("TSTypeParameterDeclaration", node, opts); } function assertTSTypeParameter(node, opts) { assert("TSTypeParameter", node, opts); } function assertStandardized(node, opts) { assert("Standardized", node, opts); } function assertExpression(node, opts) { assert("Expression", node, opts); } function assertBinary(node, opts) { assert("Binary", node, opts); } function assertScopable(node, opts) { assert("Scopable", node, opts); } function assertBlockParent(node, opts) { assert("BlockParent", node, opts); } function assertBlock(node, opts) { assert("Block", node, opts); } function assertStatement(node, opts) { assert("Statement", node, opts); } function assertTerminatorless(node, opts) { assert("Terminatorless", node, opts); } function assertCompletionStatement(node, opts) { assert("CompletionStatement", node, opts); } function assertConditional(node, opts) { assert("Conditional", node, opts); } function assertLoop(node, opts) { assert("Loop", node, opts); } function assertWhile(node, opts) { assert("While", node, opts); } function assertExpressionWrapper(node, opts) { assert("ExpressionWrapper", node, opts); } function assertFor(node, opts) { assert("For", node, opts); } function assertForXStatement(node, opts) { assert("ForXStatement", node, opts); } function assertFunction(node, opts) { assert("Function", node, opts); } function assertFunctionParent(node, opts) { assert("FunctionParent", node, opts); } function assertPureish(node, opts) { assert("Pureish", node, opts); } function assertDeclaration(node, opts) { assert("Declaration", node, opts); } function assertPatternLike(node, opts) { assert("PatternLike", node, opts); } function assertLVal(node, opts) { assert("LVal", node, opts); } function assertTSEntityName(node, opts) { assert("TSEntityName", node, opts); } function assertLiteral(node, opts) { assert("Literal", node, opts); } function assertImmutable(node, opts) { assert("Immutable", node, opts); } function assertUserWhitespacable(node, opts) { assert("UserWhitespacable", node, opts); } function assertMethod(node, opts) { assert("Method", node, opts); } function assertObjectMember(node, opts) { assert("ObjectMember", node, opts); } function assertProperty(node, opts) { assert("Property", node, opts); } function assertUnaryLike(node, opts) { assert("UnaryLike", node, opts); } function assertPattern(node, opts) { assert("Pattern", node, opts); } function assertClass(node, opts) { assert("Class", node, opts); } function assertModuleDeclaration(node, opts) { assert("ModuleDeclaration", node, opts); } function assertExportDeclaration(node, opts) { assert("ExportDeclaration", node, opts); } function assertModuleSpecifier(node, opts) { assert("ModuleSpecifier", node, opts); } function assertAccessor(node, opts) { assert("Accessor", node, opts); } function assertPrivate(node, opts) { assert("Private", node, opts); } function assertFlow(node, opts) { assert("Flow", node, opts); } function assertFlowType(node, opts) { assert("FlowType", node, opts); } function assertFlowBaseAnnotation(node, opts) { assert("FlowBaseAnnotation", node, opts); } function assertFlowDeclaration(node, opts) { assert("FlowDeclaration", node, opts); } function assertFlowPredicate(node, opts) { assert("FlowPredicate", node, opts); } function assertEnumBody(node, opts) { assert("EnumBody", node, opts); } function assertEnumMember(node, opts) { assert("EnumMember", node, opts); } function assertJSX(node, opts) { assert("JSX", node, opts); } function assertMiscellaneous(node, opts) { assert("Miscellaneous", node, opts); } function assertTypeScript(node, opts) { assert("TypeScript", node, opts); } function assertTSTypeElement(node, opts) { assert("TSTypeElement", node, opts); } function assertTSType(node, opts) { assert("TSType", node, opts); } function assertTSBaseType(node, opts) { assert("TSBaseType", node, opts); } function assertNumberLiteral(node, opts) { console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); assert("NumberLiteral", node, opts); } function assertRegexLiteral(node, opts) { console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); assert("RegexLiteral", node, opts); } function assertRestProperty(node, opts) { console.trace("The node type RestProperty has been renamed to RestElement"); assert("RestProperty", node, opts); } function assertSpreadProperty(node, opts) { console.trace("The node type SpreadProperty has been renamed to SpreadElement"); assert("SpreadProperty", node, opts); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js var require_createTypeAnnotationBasedOnTypeof = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var _generated = require_generated2(); var _default = createTypeAnnotationBasedOnTypeof; exports2.default = _default; function createTypeAnnotationBasedOnTypeof(type) { switch (type) { case "string": return (0, _generated.stringTypeAnnotation)(); case "number": return (0, _generated.numberTypeAnnotation)(); case "undefined": return (0, _generated.voidTypeAnnotation)(); case "boolean": return (0, _generated.booleanTypeAnnotation)(); case "function": return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function")); case "object": return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object")); case "symbol": return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol")); case "bigint": return (0, _generated.anyTypeAnnotation)(); } throw new Error("Invalid typeof value: " + type); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js var require_removeTypeDuplicates = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = removeTypeDuplicates; var _generated = require_generated(); function getQualifiedName(node) { return (0, _generated.isIdentifier)(node) ? node.name : `${node.id.name}.${getQualifiedName(node.qualification)}`; } function removeTypeDuplicates(nodes) { const generics = {}; const bases = {}; const typeGroups = /* @__PURE__ */ new Set(); const types = []; for (let i = 0; i < nodes.length; i++) { const node = nodes[i]; if (!node) continue; if (types.indexOf(node) >= 0) { continue; } if ((0, _generated.isAnyTypeAnnotation)(node)) { return [node]; } if ((0, _generated.isFlowBaseAnnotation)(node)) { bases[node.type] = node; continue; } if ((0, _generated.isUnionTypeAnnotation)(node)) { if (!typeGroups.has(node.types)) { nodes = nodes.concat(node.types); typeGroups.add(node.types); } continue; } if ((0, _generated.isGenericTypeAnnotation)(node)) { const name = getQualifiedName(node.id); if (generics[name]) { let existing = generics[name]; if (existing.typeParameters) { if (node.typeParameters) { existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params)); } } else { existing = node.typeParameters; } } else { generics[name] = node; } continue; } types.push(node); } for (const type of Object.keys(bases)) { types.push(bases[type]); } for (const name of Object.keys(generics)) { types.push(generics[name]); } return types; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js var require_createFlowUnionType = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = createFlowUnionType; var _generated = require_generated2(); var _removeTypeDuplicates = require_removeTypeDuplicates(); function createFlowUnionType(types) { const flattened = (0, _removeTypeDuplicates.default)(types); if (flattened.length === 1) { return flattened[0]; } else { return (0, _generated.unionTypeAnnotation)(flattened); } } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js var require_removeTypeDuplicates2 = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = removeTypeDuplicates; var _generated = require_generated(); function removeTypeDuplicates(nodes) { const generics = {}; const bases = {}; const typeGroups = /* @__PURE__ */ new Set(); const types = []; for (let i = 0; i < nodes.length; i++) { const node = nodes[i]; if (!node) continue; if (types.indexOf(node) >= 0) { continue; } if ((0, _generated.isTSAnyKeyword)(node)) { return [node]; } if ((0, _generated.isTSBaseType)(node)) { bases[node.type] = node; continue; } if ((0, _generated.isTSUnionType)(node)) { if (!typeGroups.has(node.types)) { nodes.push(...node.types); typeGroups.add(node.types); } continue; } types.push(node); } for (const type of Object.keys(bases)) { types.push(bases[type]); } for (const name of Object.keys(generics)) { types.push(generics[name]); } return types; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js var require_createTSUnionType = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = createTSUnionType; var _generated = require_generated2(); var _removeTypeDuplicates = require_removeTypeDuplicates2(); function createTSUnionType(typeAnnotations) { const types = typeAnnotations.map((type) => type.typeAnnotation); const flattened = (0, _removeTypeDuplicates.default)(types); if (flattened.length === 1) { return flattened[0]; } else { return (0, _generated.tsUnionType)(flattened); } } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/builders/generated/uppercase.js var require_uppercase = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/builders/generated/uppercase.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "AnyTypeAnnotation", { enumerable: true, get: function() { return _index.anyTypeAnnotation; } }); Object.defineProperty(exports2, "ArgumentPlaceholder", { enumerable: true, get: function() { return _index.argumentPlaceholder; } }); Object.defineProperty(exports2, "ArrayExpression", { enumerable: true, get: function() { return _index.arrayExpression; } }); Object.defineProperty(exports2, "ArrayPattern", { enumerable: true, get: function() { return _index.arrayPattern; } }); Object.defineProperty(exports2, "ArrayTypeAnnotation", { enumerable: true, get: function() { return _index.arrayTypeAnnotation; } }); Object.defineProperty(exports2, "ArrowFunctionExpression", { enumerable: true, get: function() { return _index.arrowFunctionExpression; } }); Object.defineProperty(exports2, "AssignmentExpression", { enumerable: true, get: function() { return _index.assignmentExpression; } }); Object.defineProperty(exports2, "AssignmentPattern", { enumerable: true, get: function() { return _index.assignmentPattern; } }); Object.defineProperty(exports2, "AwaitExpression", { enumerable: true, get: function() { return _index.awaitExpression; } }); Object.defineProperty(exports2, "BigIntLiteral", { enumerable: true, get: function() { return _index.bigIntLiteral; } }); Object.defineProperty(exports2, "BinaryExpression", { enumerable: true, get: function() { return _index.binaryExpression; } }); Object.defineProperty(exports2, "BindExpression", { enumerable: true, get: function() { return _index.bindExpression; } }); Object.defineProperty(exports2, "BlockStatement", { enumerable: true, get: function() { return _index.blockStatement; } }); Object.defineProperty(exports2, "BooleanLiteral", { enumerable: true, get: function() { return _index.booleanLiteral; } }); Object.defineProperty(exports2, "BooleanLiteralTypeAnnotation", { enumerable: true, get: function() { return _index.booleanLiteralTypeAnnotation; } }); Object.defineProperty(exports2, "BooleanTypeAnnotation", { enumerable: true, get: function() { return _index.booleanTypeAnnotation; } }); Object.defineProperty(exports2, "BreakStatement", { enumerable: true, get: function() { return _index.breakStatement; } }); Object.defineProperty(exports2, "CallExpression", { enumerable: true, get: function() { return _index.callExpression; } }); Object.defineProperty(exports2, "CatchClause", { enumerable: true, get: function() { return _index.catchClause; } }); Object.defineProperty(exports2, "ClassAccessorProperty", { enumerable: true, get: function() { return _index.classAccessorProperty; } }); Object.defineProperty(exports2, "ClassBody", { enumerable: true, get: function() { return _index.classBody; } }); Object.defineProperty(exports2, "ClassDeclaration", { enumerable: true, get: function() { return _index.classDeclaration; } }); Object.defineProperty(exports2, "ClassExpression", { enumerable: true, get: function() { return _index.classExpression; } }); Object.defineProperty(exports2, "ClassImplements", { enumerable: true, get: function() { return _index.classImplements; } }); Object.defineProperty(exports2, "ClassMethod", { enumerable: true, get: function() { return _index.classMethod; } }); Object.defineProperty(exports2, "ClassPrivateMethod", { enumerable: true, get: function() { return _index.classPrivateMethod; } }); Object.defineProperty(exports2, "ClassPrivateProperty", { enumerable: true, get: function() { return _index.classPrivateProperty; } }); Object.defineProperty(exports2, "ClassProperty", { enumerable: true, get: function() { return _index.classProperty; } }); Object.defineProperty(exports2, "ConditionalExpression", { enumerable: true, get: function() { return _index.conditionalExpression; } }); Object.defineProperty(exports2, "ContinueStatement", { enumerable: true, get: function() { return _index.continueStatement; } }); Object.defineProperty(exports2, "DebuggerStatement", { enumerable: true, get: function() { return _index.debuggerStatement; } }); Object.defineProperty(exports2, "DecimalLiteral", { enumerable: true, get: function() { return _index.decimalLiteral; } }); Object.defineProperty(exports2, "DeclareClass", { enumerable: true, get: function() { return _index.declareClass; } }); Object.defineProperty(exports2, "DeclareExportAllDeclaration", { enumerable: true, get: function() { return _index.declareExportAllDeclaration; } }); Object.defineProperty(exports2, "DeclareExportDeclaration", { enumerable: true, get: function() { return _index.declareExportDeclaration; } }); Object.defineProperty(exports2, "DeclareFunction", { enumerable: true, get: function() { return _index.declareFunction; } }); Object.defineProperty(exports2, "DeclareInterface", { enumerable: true, get: function() { return _index.declareInterface; } }); Object.defineProperty(exports2, "DeclareModule", { enumerable: true, get: function() { return _index.declareModule; } }); Object.defineProperty(exports2, "DeclareModuleExports", { enumerable: true, get: function() { return _index.declareModuleExports; } }); Object.defineProperty(exports2, "DeclareOpaqueType", { enumerable: true, get: function() { return _index.declareOpaqueType; } }); Object.defineProperty(exports2, "DeclareTypeAlias", { enumerable: true, get: function() { return _index.declareTypeAlias; } }); Object.defineProperty(exports2, "DeclareVariable", { enumerable: true, get: function() { return _index.declareVariable; } }); Object.defineProperty(exports2, "DeclaredPredicate", { enumerable: true, get: function() { return _index.declaredPredicate; } }); Object.defineProperty(exports2, "Decorator", { enumerable: true, get: function() { return _index.decorator; } }); Object.defineProperty(exports2, "Directive", { enumerable: true, get: function() { return _index.directive; } }); Object.defineProperty(exports2, "DirectiveLiteral", { enumerable: true, get: function() { return _index.directiveLiteral; } }); Object.defineProperty(exports2, "DoExpression", { enumerable: true, get: function() { return _index.doExpression; } }); Object.defineProperty(exports2, "DoWhileStatement", { enumerable: true, get: function() { return _index.doWhileStatement; } }); Object.defineProperty(exports2, "EmptyStatement", { enumerable: true, get: function() { return _index.emptyStatement; } }); Object.defineProperty(exports2, "EmptyTypeAnnotation", { enumerable: true, get: function() { return _index.emptyTypeAnnotation; } }); Object.defineProperty(exports2, "EnumBooleanBody", { enumerable: true, get: function() { return _index.enumBooleanBody; } }); Object.defineProperty(exports2, "EnumBooleanMember", { enumerable: true, get: function() { return _index.enumBooleanMember; } }); Object.defineProperty(exports2, "EnumDeclaration", { enumerable: true, get: function() { return _index.enumDeclaration; } }); Object.defineProperty(exports2, "EnumDefaultedMember", { enumerable: true, get: function() { return _index.enumDefaultedMember; } }); Object.defineProperty(exports2, "EnumNumberBody", { enumerable: true, get: function() { return _index.enumNumberBody; } }); Object.defineProperty(exports2, "EnumNumberMember", { enumerable: true, get: function() { return _index.enumNumberMember; } }); Object.defineProperty(exports2, "EnumStringBody", { enumerable: true, get: function() { return _index.enumStringBody; } }); Object.defineProperty(exports2, "EnumStringMember", { enumerable: true, get: function() { return _index.enumStringMember; } }); Object.defineProperty(exports2, "EnumSymbolBody", { enumerable: true, get: function() { return _index.enumSymbolBody; } }); Object.defineProperty(exports2, "ExistsTypeAnnotation", { enumerable: true, get: function() { return _index.existsTypeAnnotation; } }); Object.defineProperty(exports2, "ExportAllDeclaration", { enumerable: true, get: function() { return _index.exportAllDeclaration; } }); Object.defineProperty(exports2, "ExportDefaultDeclaration", { enumerable: true, get: function() { return _index.exportDefaultDeclaration; } }); Object.defineProperty(exports2, "ExportDefaultSpecifier", { enumerable: true, get: function() { return _index.exportDefaultSpecifier; } }); Object.defineProperty(exports2, "ExportNamedDeclaration", { enumerable: true, get: function() { return _index.exportNamedDeclaration; } }); Object.defineProperty(exports2, "ExportNamespaceSpecifier", { enumerable: true, get: function() { return _index.exportNamespaceSpecifier; } }); Object.defineProperty(exports2, "ExportSpecifier", { enumerable: true, get: function() { return _index.exportSpecifier; } }); Object.defineProperty(exports2, "ExpressionStatement", { enumerable: true, get: function() { return _index.expressionStatement; } }); Object.defineProperty(exports2, "File", { enumerable: true, get: function() { return _index.file; } }); Object.defineProperty(exports2, "ForInStatement", { enumerable: true, get: function() { return _index.forInStatement; } }); Object.defineProperty(exports2, "ForOfStatement", { enumerable: true, get: function() { return _index.forOfStatement; } }); Object.defineProperty(exports2, "ForStatement", { enumerable: true, get: function() { return _index.forStatement; } }); Object.defineProperty(exports2, "FunctionDeclaration", { enumerable: true, get: function() { return _index.functionDeclaration; } }); Object.defineProperty(exports2, "FunctionExpression", { enumerable: true, get: function() { return _index.functionExpression; } }); Object.defineProperty(exports2, "FunctionTypeAnnotation", { enumerable: true, get: function() { return _index.functionTypeAnnotation; } }); Object.defineProperty(exports2, "FunctionTypeParam", { enumerable: true, get: function() { return _index.functionTypeParam; } }); Object.defineProperty(exports2, "GenericTypeAnnotation", { enumerable: true, get: function() { return _index.genericTypeAnnotation; } }); Object.defineProperty(exports2, "Identifier", { enumerable: true, get: function() { return _index.identifier; } }); Object.defineProperty(exports2, "IfStatement", { enumerable: true, get: function() { return _index.ifStatement; } }); Object.defineProperty(exports2, "Import", { enumerable: true, get: function() { return _index.import; } }); Object.defineProperty(exports2, "ImportAttribute", { enumerable: true, get: function() { return _index.importAttribute; } }); Object.defineProperty(exports2, "ImportDeclaration", { enumerable: true, get: function() { return _index.importDeclaration; } }); Object.defineProperty(exports2, "ImportDefaultSpecifier", { enumerable: true, get: function() { return _index.importDefaultSpecifier; } }); Object.defineProperty(exports2, "ImportNamespaceSpecifier", { enumerable: true, get: function() { return _index.importNamespaceSpecifier; } }); Object.defineProperty(exports2, "ImportSpecifier", { enumerable: true, get: function() { return _index.importSpecifier; } }); Object.defineProperty(exports2, "IndexedAccessType", { enumerable: true, get: function() { return _index.indexedAccessType; } }); Object.defineProperty(exports2, "InferredPredicate", { enumerable: true, get: function() { return _index.inferredPredicate; } }); Object.defineProperty(exports2, "InterfaceDeclaration", { enumerable: true, get: function() { return _index.interfaceDeclaration; } }); Object.defineProperty(exports2, "InterfaceExtends", { enumerable: true, get: function() { return _index.interfaceExtends; } }); Object.defineProperty(exports2, "InterfaceTypeAnnotation", { enumerable: true, get: function() { return _index.interfaceTypeAnnotation; } }); Object.defineProperty(exports2, "InterpreterDirective", { enumerable: true, get: function() { return _index.interpreterDirective; } }); Object.defineProperty(exports2, "IntersectionTypeAnnotation", { enumerable: true, get: function() { return _index.intersectionTypeAnnotation; } }); Object.defineProperty(exports2, "JSXAttribute", { enumerable: true, get: function() { return _index.jsxAttribute; } }); Object.defineProperty(exports2, "JSXClosingElement", { enumerable: true, get: function() { return _index.jsxClosingElement; } }); Object.defineProperty(exports2, "JSXClosingFragment", { enumerable: true, get: function() { return _index.jsxClosingFragment; } }); Object.defineProperty(exports2, "JSXElement", { enumerable: true, get: function() { return _index.jsxElement; } }); Object.defineProperty(exports2, "JSXEmptyExpression", { enumerable: true, get: function() { return _index.jsxEmptyExpression; } }); Object.defineProperty(exports2, "JSXExpressionContainer", { enumerable: true, get: function() { return _index.jsxExpressionContainer; } }); Object.defineProperty(exports2, "JSXFragment", { enumerable: true, get: function() { return _index.jsxFragment; } }); Object.defineProperty(exports2, "JSXIdentifier", { enumerable: true, get: function() { return _index.jsxIdentifier; } }); Object.defineProperty(exports2, "JSXMemberExpression", { enumerable: true, get: function() { return _index.jsxMemberExpression; } }); Object.defineProperty(exports2, "JSXNamespacedName", { enumerable: true, get: function() { return _index.jsxNamespacedName; } }); Object.defineProperty(exports2, "JSXOpeningElement", { enumerable: true, get: function() { return _index.jsxOpeningElement; } }); Object.defineProperty(exports2, "JSXOpeningFragment", { enumerable: true, get: function() { return _index.jsxOpeningFragment; } }); Object.defineProperty(exports2, "JSXSpreadAttribute", { enumerable: true, get: function() { return _index.jsxSpreadAttribute; } }); Object.defineProperty(exports2, "JSXSpreadChild", { enumerable: true, get: function() { return _index.jsxSpreadChild; } }); Object.defineProperty(exports2, "JSXText", { enumerable: true, get: function() { return _index.jsxText; } }); Object.defineProperty(exports2, "LabeledStatement", { enumerable: true, get: function() { return _index.labeledStatement; } }); Object.defineProperty(exports2, "LogicalExpression", { enumerable: true, get: function() { return _index.logicalExpression; } }); Object.defineProperty(exports2, "MemberExpression", { enumerable: true, get: function() { return _index.memberExpression; } }); Object.defineProperty(exports2, "MetaProperty", { enumerable: true, get: function() { return _index.metaProperty; } }); Object.defineProperty(exports2, "MixedTypeAnnotation", { enumerable: true, get: function() { return _index.mixedTypeAnnotation; } }); Object.defineProperty(exports2, "ModuleExpression", { enumerable: true, get: function() { return _index.moduleExpression; } }); Object.defineProperty(exports2, "NewExpression", { enumerable: true, get: function() { return _index.newExpression; } }); Object.defineProperty(exports2, "Noop", { enumerable: true, get: function() { return _index.noop; } }); Object.defineProperty(exports2, "NullLiteral", { enumerable: true, get: function() { return _index.nullLiteral; } }); Object.defineProperty(exports2, "NullLiteralTypeAnnotation", { enumerable: true, get: function() { return _index.nullLiteralTypeAnnotation; } }); Object.defineProperty(exports2, "NullableTypeAnnotation", { enumerable: true, get: function() { return _index.nullableTypeAnnotation; } }); Object.defineProperty(exports2, "NumberLiteral", { enumerable: true, get: function() { return _index.numberLiteral; } }); Object.defineProperty(exports2, "NumberLiteralTypeAnnotation", { enumerable: true, get: function() { return _index.numberLiteralTypeAnnotation; } }); Object.defineProperty(exports2, "NumberTypeAnnotation", { enumerable: true, get: function() { return _index.numberTypeAnnotation; } }); Object.defineProperty(exports2, "NumericLiteral", { enumerable: true, get: function() { return _index.numericLiteral; } }); Object.defineProperty(exports2, "ObjectExpression", { enumerable: true, get: function() { return _index.objectExpression; } }); Object.defineProperty(exports2, "ObjectMethod", { enumerable: true, get: function() { return _index.objectMethod; } }); Object.defineProperty(exports2, "ObjectPattern", { enumerable: true, get: function() { return _index.objectPattern; } }); Object.defineProperty(exports2, "ObjectProperty", { enumerable: true, get: function() { return _index.objectProperty; } }); Object.defineProperty(exports2, "ObjectTypeAnnotation", { enumerable: true, get: function() { return _index.objectTypeAnnotation; } }); Object.defineProperty(exports2, "ObjectTypeCallProperty", { enumerable: true, get: function() { return _index.objectTypeCallProperty; } }); Object.defineProperty(exports2, "ObjectTypeIndexer", { enumerable: true, get: function() { return _index.objectTypeIndexer; } }); Object.defineProperty(exports2, "ObjectTypeInternalSlot", { enumerable: true, get: function() { return _index.objectTypeInternalSlot; } }); Object.defineProperty(exports2, "ObjectTypeProperty", { enumerable: true, get: function() { return _index.objectTypeProperty; } }); Object.defineProperty(exports2, "ObjectTypeSpreadProperty", { enumerable: true, get: function() { return _index.objectTypeSpreadProperty; } }); Object.defineProperty(exports2, "OpaqueType", { enumerable: true, get: function() { return _index.opaqueType; } }); Object.defineProperty(exports2, "OptionalCallExpression", { enumerable: true, get: function() { return _index.optionalCallExpression; } }); Object.defineProperty(exports2, "OptionalIndexedAccessType", { enumerable: true, get: function() { return _index.optionalIndexedAccessType; } }); Object.defineProperty(exports2, "OptionalMemberExpression", { enumerable: true, get: function() { return _index.optionalMemberExpression; } }); Object.defineProperty(exports2, "ParenthesizedExpression", { enumerable: true, get: function() { return _index.parenthesizedExpression; } }); Object.defineProperty(exports2, "PipelineBareFunction", { enumerable: true, get: function() { return _index.pipelineBareFunction; } }); Object.defineProperty(exports2, "PipelinePrimaryTopicReference", { enumerable: true, get: function() { return _index.pipelinePrimaryTopicReference; } }); Object.defineProperty(exports2, "PipelineTopicExpression", { enumerable: true, get: function() { return _index.pipelineTopicExpression; } }); Object.defineProperty(exports2, "Placeholder", { enumerable: true, get: function() { return _index.placeholder; } }); Object.defineProperty(exports2, "PrivateName", { enumerable: true, get: function() { return _index.privateName; } }); Object.defineProperty(exports2, "Program", { enumerable: true, get: function() { return _index.program; } }); Object.defineProperty(exports2, "QualifiedTypeIdentifier", { enumerable: true, get: function() { return _index.qualifiedTypeIdentifier; } }); Object.defineProperty(exports2, "RecordExpression", { enumerable: true, get: function() { return _index.recordExpression; } }); Object.defineProperty(exports2, "RegExpLiteral", { enumerable: true, get: function() { return _index.regExpLiteral; } }); Object.defineProperty(exports2, "RegexLiteral", { enumerable: true, get: function() { return _index.regexLiteral; } }); Object.defineProperty(exports2, "RestElement", { enumerable: true, get: function() { return _index.restElement; } }); Object.defineProperty(exports2, "RestProperty", { enumerable: true, get: function() { return _index.restProperty; } }); Object.defineProperty(exports2, "ReturnStatement", { enumerable: true, get: function() { return _index.returnStatement; } }); Object.defineProperty(exports2, "SequenceExpression", { enumerable: true, get: function() { return _index.sequenceExpression; } }); Object.defineProperty(exports2, "SpreadElement", { enumerable: true, get: function() { return _index.spreadElement; } }); Object.defineProperty(exports2, "SpreadProperty", { enumerable: true, get: function() { return _index.spreadProperty; } }); Object.defineProperty(exports2, "StaticBlock", { enumerable: true, get: function() { return _index.staticBlock; } }); Object.defineProperty(exports2, "StringLiteral", { enumerable: true, get: function() { return _index.stringLiteral; } }); Object.defineProperty(exports2, "StringLiteralTypeAnnotation", { enumerable: true, get: function() { return _index.stringLiteralTypeAnnotation; } }); Object.defineProperty(exports2, "StringTypeAnnotation", { enumerable: true, get: function() { return _index.stringTypeAnnotation; } }); Object.defineProperty(exports2, "Super", { enumerable: true, get: function() { return _index.super; } }); Object.defineProperty(exports2, "SwitchCase", { enumerable: true, get: function() { return _index.switchCase; } }); Object.defineProperty(exports2, "SwitchStatement", { enumerable: true, get: function() { return _index.switchStatement; } }); Object.defineProperty(exports2, "SymbolTypeAnnotation", { enumerable: true, get: function() { return _index.symbolTypeAnnotation; } }); Object.defineProperty(exports2, "TSAnyKeyword", { enumerable: true, get: function() { return _index.tsAnyKeyword; } }); Object.defineProperty(exports2, "TSArrayType", { enumerable: true, get: function() { return _index.tsArrayType; } }); Object.defineProperty(exports2, "TSAsExpression", { enumerable: true, get: function() { return _index.tsAsExpression; } }); Object.defineProperty(exports2, "TSBigIntKeyword", { enumerable: true, get: function() { return _index.tsBigIntKeyword; } }); Object.defineProperty(exports2, "TSBooleanKeyword", { enumerable: true, get: function() { return _index.tsBooleanKeyword; } }); Object.defineProperty(exports2, "TSCallSignatureDeclaration", { enumerable: true, get: function() { return _index.tsCallSignatureDeclaration; } }); Object.defineProperty(exports2, "TSConditionalType", { enumerable: true, get: function() { return _index.tsConditionalType; } }); Object.defineProperty(exports2, "TSConstructSignatureDeclaration", { enumerable: true, get: function() { return _index.tsConstructSignatureDeclaration; } }); Object.defineProperty(exports2, "TSConstructorType", { enumerable: true, get: function() { return _index.tsConstructorType; } }); Object.defineProperty(exports2, "TSDeclareFunction", { enumerable: true, get: function() { return _index.tsDeclareFunction; } }); Object.defineProperty(exports2, "TSDeclareMethod", { enumerable: true, get: function() { return _index.tsDeclareMethod; } }); Object.defineProperty(exports2, "TSEnumDeclaration", { enumerable: true, get: function() { return _index.tsEnumDeclaration; } }); Object.defineProperty(exports2, "TSEnumMember", { enumerable: true, get: function() { return _index.tsEnumMember; } }); Object.defineProperty(exports2, "TSExportAssignment", { enumerable: true, get: function() { return _index.tsExportAssignment; } }); Object.defineProperty(exports2, "TSExpressionWithTypeArguments", { enumerable: true, get: function() { return _index.tsExpressionWithTypeArguments; } }); Object.defineProperty(exports2, "TSExternalModuleReference", { enumerable: true, get: function() { return _index.tsExternalModuleReference; } }); Object.defineProperty(exports2, "TSFunctionType", { enumerable: true, get: function() { return _index.tsFunctionType; } }); Object.defineProperty(exports2, "TSImportEqualsDeclaration", { enumerable: true, get: function() { return _index.tsImportEqualsDeclaration; } }); Object.defineProperty(exports2, "TSImportType", { enumerable: true, get: function() { return _index.tsImportType; } }); Object.defineProperty(exports2, "TSIndexSignature", { enumerable: true, get: function() { return _index.tsIndexSignature; } }); Object.defineProperty(exports2, "TSIndexedAccessType", { enumerable: true, get: function() { return _index.tsIndexedAccessType; } }); Object.defineProperty(exports2, "TSInferType", { enumerable: true, get: function() { return _index.tsInferType; } }); Object.defineProperty(exports2, "TSInterfaceBody", { enumerable: true, get: function() { return _index.tsInterfaceBody; } }); Object.defineProperty(exports2, "TSInterfaceDeclaration", { enumerable: true, get: function() { return _index.tsInterfaceDeclaration; } }); Object.defineProperty(exports2, "TSIntersectionType", { enumerable: true, get: function() { return _index.tsIntersectionType; } }); Object.defineProperty(exports2, "TSIntrinsicKeyword", { enumerable: true, get: function() { return _index.tsIntrinsicKeyword; } }); Object.defineProperty(exports2, "TSLiteralType", { enumerable: true, get: function() { return _index.tsLiteralType; } }); Object.defineProperty(exports2, "TSMappedType", { enumerable: true, get: function() { return _index.tsMappedType; } }); Object.defineProperty(exports2, "TSMethodSignature", { enumerable: true, get: function() { return _index.tsMethodSignature; } }); Object.defineProperty(exports2, "TSModuleBlock", { enumerable: true, get: function() { return _index.tsModuleBlock; } }); Object.defineProperty(exports2, "TSModuleDeclaration", { enumerable: true, get: function() { return _index.tsModuleDeclaration; } }); Object.defineProperty(exports2, "TSNamedTupleMember", { enumerable: true, get: function() { return _index.tsNamedTupleMember; } }); Object.defineProperty(exports2, "TSNamespaceExportDeclaration", { enumerable: true, get: function() { return _index.tsNamespaceExportDeclaration; } }); Object.defineProperty(exports2, "TSNeverKeyword", { enumerable: true, get: function() { return _index.tsNeverKeyword; } }); Object.defineProperty(exports2, "TSNonNullExpression", { enumerable: true, get: function() { return _index.tsNonNullExpression; } }); Object.defineProperty(exports2, "TSNullKeyword", { enumerable: true, get: function() { return _index.tsNullKeyword; } }); Object.defineProperty(exports2, "TSNumberKeyword", { enumerable: true, get: function() { return _index.tsNumberKeyword; } }); Object.defineProperty(exports2, "TSObjectKeyword", { enumerable: true, get: function() { return _index.tsObjectKeyword; } }); Object.defineProperty(exports2, "TSOptionalType", { enumerable: true, get: function() { return _index.tsOptionalType; } }); Object.defineProperty(exports2, "TSParameterProperty", { enumerable: true, get: function() { return _index.tsParameterProperty; } }); Object.defineProperty(exports2, "TSParenthesizedType", { enumerable: true, get: function() { return _index.tsParenthesizedType; } }); Object.defineProperty(exports2, "TSPropertySignature", { enumerable: true, get: function() { return _index.tsPropertySignature; } }); Object.defineProperty(exports2, "TSQualifiedName", { enumerable: true, get: function() { return _index.tsQualifiedName; } }); Object.defineProperty(exports2, "TSRestType", { enumerable: true, get: function() { return _index.tsRestType; } }); Object.defineProperty(exports2, "TSStringKeyword", { enumerable: true, get: function() { return _index.tsStringKeyword; } }); Object.defineProperty(exports2, "TSSymbolKeyword", { enumerable: true, get: function() { return _index.tsSymbolKeyword; } }); Object.defineProperty(exports2, "TSThisType", { enumerable: true, get: function() { return _index.tsThisType; } }); Object.defineProperty(exports2, "TSTupleType", { enumerable: true, get: function() { return _index.tsTupleType; } }); Object.defineProperty(exports2, "TSTypeAliasDeclaration", { enumerable: true, get: function() { return _index.tsTypeAliasDeclaration; } }); Object.defineProperty(exports2, "TSTypeAnnotation", { enumerable: true, get: function() { return _index.tsTypeAnnotation; } }); Object.defineProperty(exports2, "TSTypeAssertion", { enumerable: true, get: function() { return _index.tsTypeAssertion; } }); Object.defineProperty(exports2, "TSTypeLiteral", { enumerable: true, get: function() { return _index.tsTypeLiteral; } }); Object.defineProperty(exports2, "TSTypeOperator", { enumerable: true, get: function() { return _index.tsTypeOperator; } }); Object.defineProperty(exports2, "TSTypeParameter", { enumerable: true, get: function() { return _index.tsTypeParameter; } }); Object.defineProperty(exports2, "TSTypeParameterDeclaration", { enumerable: true, get: function() { return _index.tsTypeParameterDeclaration; } }); Object.defineProperty(exports2, "TSTypeParameterInstantiation", { enumerable: true, get: function() { return _index.tsTypeParameterInstantiation; } }); Object.defineProperty(exports2, "TSTypePredicate", { enumerable: true, get: function() { return _index.tsTypePredicate; } }); Object.defineProperty(exports2, "TSTypeQuery", { enumerable: true, get: function() { return _index.tsTypeQuery; } }); Object.defineProperty(exports2, "TSTypeReference", { enumerable: true, get: function() { return _index.tsTypeReference; } }); Object.defineProperty(exports2, "TSUndefinedKeyword", { enumerable: true, get: function() { return _index.tsUndefinedKeyword; } }); Object.defineProperty(exports2, "TSUnionType", { enumerable: true, get: function() { return _index.tsUnionType; } }); Object.defineProperty(exports2, "TSUnknownKeyword", { enumerable: true, get: function() { return _index.tsUnknownKeyword; } }); Object.defineProperty(exports2, "TSVoidKeyword", { enumerable: true, get: function() { return _index.tsVoidKeyword; } }); Object.defineProperty(exports2, "TaggedTemplateExpression", { enumerable: true, get: function() { return _index.taggedTemplateExpression; } }); Object.defineProperty(exports2, "TemplateElement", { enumerable: true, get: function() { return _index.templateElement; } }); Object.defineProperty(exports2, "TemplateLiteral", { enumerable: true, get: function() { return _index.templateLiteral; } }); Object.defineProperty(exports2, "ThisExpression", { enumerable: true, get: function() { return _index.thisExpression; } }); Object.defineProperty(exports2, "ThisTypeAnnotation", { enumerable: true, get: function() { return _index.thisTypeAnnotation; } }); Object.defineProperty(exports2, "ThrowStatement", { enumerable: true, get: function() { return _index.throwStatement; } }); Object.defineProperty(exports2, "TopicReference", { enumerable: true, get: function() { return _index.topicReference; } }); Object.defineProperty(exports2, "TryStatement", { enumerable: true, get: function() { return _index.tryStatement; } }); Object.defineProperty(exports2, "TupleExpression", { enumerable: true, get: function() { return _index.tupleExpression; } }); Object.defineProperty(exports2, "TupleTypeAnnotation", { enumerable: true, get: function() { return _index.tupleTypeAnnotation; } }); Object.defineProperty(exports2, "TypeAlias", { enumerable: true, get: function() { return _index.typeAlias; } }); Object.defineProperty(exports2, "TypeAnnotation", { enumerable: true, get: function() { return _index.typeAnnotation; } }); Object.defineProperty(exports2, "TypeCastExpression", { enumerable: true, get: function() { return _index.typeCastExpression; } }); Object.defineProperty(exports2, "TypeParameter", { enumerable: true, get: function() { return _index.typeParameter; } }); Object.defineProperty(exports2, "TypeParameterDeclaration", { enumerable: true, get: function() { return _index.typeParameterDeclaration; } }); Object.defineProperty(exports2, "TypeParameterInstantiation", { enumerable: true, get: function() { return _index.typeParameterInstantiation; } }); Object.defineProperty(exports2, "TypeofTypeAnnotation", { enumerable: true, get: function() { return _index.typeofTypeAnnotation; } }); Object.defineProperty(exports2, "UnaryExpression", { enumerable: true, get: function() { return _index.unaryExpression; } }); Object.defineProperty(exports2, "UnionTypeAnnotation", { enumerable: true, get: function() { return _index.unionTypeAnnotation; } }); Object.defineProperty(exports2, "UpdateExpression", { enumerable: true, get: function() { return _index.updateExpression; } }); Object.defineProperty(exports2, "V8IntrinsicIdentifier", { enumerable: true, get: function() { return _index.v8IntrinsicIdentifier; } }); Object.defineProperty(exports2, "VariableDeclaration", { enumerable: true, get: function() { return _index.variableDeclaration; } }); Object.defineProperty(exports2, "VariableDeclarator", { enumerable: true, get: function() { return _index.variableDeclarator; } }); Object.defineProperty(exports2, "Variance", { enumerable: true, get: function() { return _index.variance; } }); Object.defineProperty(exports2, "VoidTypeAnnotation", { enumerable: true, get: function() { return _index.voidTypeAnnotation; } }); Object.defineProperty(exports2, "WhileStatement", { enumerable: true, get: function() { return _index.whileStatement; } }); Object.defineProperty(exports2, "WithStatement", { enumerable: true, get: function() { return _index.withStatement; } }); Object.defineProperty(exports2, "YieldExpression", { enumerable: true, get: function() { return _index.yieldExpression; } }); var _index = require_generated2(); } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/clone/cloneNode.js var require_cloneNode = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/clone/cloneNode.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = cloneNode; var _definitions = require_definitions(); var _generated = require_generated(); var has = Function.call.bind(Object.prototype.hasOwnProperty); function cloneIfNode(obj, deep, withoutLoc) { if (obj && typeof obj.type === "string") { return cloneNode(obj, deep, withoutLoc); } return obj; } function cloneIfNodeOrArray(obj, deep, withoutLoc) { if (Array.isArray(obj)) { return obj.map((node) => cloneIfNode(node, deep, withoutLoc)); } return cloneIfNode(obj, deep, withoutLoc); } function cloneNode(node, deep = true, withoutLoc = false) { if (!node) return node; const { type } = node; const newNode = { type: node.type }; if ((0, _generated.isIdentifier)(node)) { newNode.name = node.name; if (has(node, "optional") && typeof node.optional === "boolean") { newNode.optional = node.optional; } if (has(node, "typeAnnotation")) { newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation; } } else if (!has(_definitions.NODE_FIELDS, type)) { throw new Error(`Unknown node type: "${type}"`); } else { for (const field of Object.keys(_definitions.NODE_FIELDS[type])) { if (has(node, field)) { if (deep) { newNode[field] = (0, _generated.isFile)(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc); } else { newNode[field] = node[field]; } } } } if (has(node, "loc")) { if (withoutLoc) { newNode.loc = null; } else { newNode.loc = node.loc; } } if (has(node, "leadingComments")) { newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc); } if (has(node, "innerComments")) { newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc); } if (has(node, "trailingComments")) { newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc); } if (has(node, "extra")) { newNode.extra = Object.assign({}, node.extra); } return newNode; } function maybeCloneComments(comments, deep, withoutLoc) { if (!comments || !deep) { return comments; } return comments.map(({ type, value, loc }) => { if (withoutLoc) { return { type, value, loc: null }; } return { type, value, loc }; }); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/clone/clone.js var require_clone2 = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/clone/clone.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = clone; var _cloneNode = require_cloneNode(); function clone(node) { return (0, _cloneNode.default)(node, false); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/clone/cloneDeep.js var require_cloneDeep = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/clone/cloneDeep.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = cloneDeep; var _cloneNode = require_cloneNode(); function cloneDeep(node) { return (0, _cloneNode.default)(node); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js var require_cloneDeepWithoutLoc = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = cloneDeepWithoutLoc; var _cloneNode = require_cloneNode(); function cloneDeepWithoutLoc(node) { return (0, _cloneNode.default)(node, true, true); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js var require_cloneWithoutLoc = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = cloneWithoutLoc; var _cloneNode = require_cloneNode(); function cloneWithoutLoc(node) { return (0, _cloneNode.default)(node, false, true); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/comments/addComments.js var require_addComments = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/comments/addComments.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = addComments; function addComments(node, type, comments) { if (!comments || !node) return node; const key = `${type}Comments`; if (node[key]) { if (type === "leading") { node[key] = comments.concat(node[key]); } else { node[key].push(...comments); } } else { node[key] = comments; } return node; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/comments/addComment.js var require_addComment = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/comments/addComment.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = addComment; var _addComments = require_addComments(); function addComment(node, type, content, line) { return (0, _addComments.default)(node, type, [{ type: line ? "CommentLine" : "CommentBlock", value: content }]); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/utils/inherit.js var require_inherit = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/utils/inherit.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = inherit; function inherit(key, child, parent) { if (child && parent) { child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean))); } } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/comments/inheritInnerComments.js var require_inheritInnerComments = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/comments/inheritInnerComments.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = inheritInnerComments; var _inherit = require_inherit(); function inheritInnerComments(child, parent) { (0, _inherit.default)("innerComments", child, parent); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/comments/inheritLeadingComments.js var require_inheritLeadingComments = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/comments/inheritLeadingComments.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = inheritLeadingComments; var _inherit = require_inherit(); function inheritLeadingComments(child, parent) { (0, _inherit.default)("leadingComments", child, parent); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/comments/inheritTrailingComments.js var require_inheritTrailingComments = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/comments/inheritTrailingComments.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = inheritTrailingComments; var _inherit = require_inherit(); function inheritTrailingComments(child, parent) { (0, _inherit.default)("trailingComments", child, parent); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/comments/inheritsComments.js var require_inheritsComments = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/comments/inheritsComments.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = inheritsComments; var _inheritTrailingComments = require_inheritTrailingComments(); var _inheritLeadingComments = require_inheritLeadingComments(); var _inheritInnerComments = require_inheritInnerComments(); function inheritsComments(child, parent) { (0, _inheritTrailingComments.default)(child, parent); (0, _inheritLeadingComments.default)(child, parent); (0, _inheritInnerComments.default)(child, parent); return child; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/comments/removeComments.js var require_removeComments = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/comments/removeComments.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = removeComments; var _constants = require_constants2(); function removeComments(node) { _constants.COMMENT_KEYS.forEach((key) => { node[key] = null; }); return node; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/constants/generated/index.js var require_generated4 = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/constants/generated/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.WHILE_TYPES = exports2.USERWHITESPACABLE_TYPES = exports2.UNARYLIKE_TYPES = exports2.TYPESCRIPT_TYPES = exports2.TSTYPE_TYPES = exports2.TSTYPEELEMENT_TYPES = exports2.TSENTITYNAME_TYPES = exports2.TSBASETYPE_TYPES = exports2.TERMINATORLESS_TYPES = exports2.STATEMENT_TYPES = exports2.STANDARDIZED_TYPES = exports2.SCOPABLE_TYPES = exports2.PUREISH_TYPES = exports2.PROPERTY_TYPES = exports2.PRIVATE_TYPES = exports2.PATTERN_TYPES = exports2.PATTERNLIKE_TYPES = exports2.OBJECTMEMBER_TYPES = exports2.MODULESPECIFIER_TYPES = exports2.MODULEDECLARATION_TYPES = exports2.MISCELLANEOUS_TYPES = exports2.METHOD_TYPES = exports2.LVAL_TYPES = exports2.LOOP_TYPES = exports2.LITERAL_TYPES = exports2.JSX_TYPES = exports2.IMMUTABLE_TYPES = exports2.FUNCTION_TYPES = exports2.FUNCTIONPARENT_TYPES = exports2.FOR_TYPES = exports2.FORXSTATEMENT_TYPES = exports2.FLOW_TYPES = exports2.FLOWTYPE_TYPES = exports2.FLOWPREDICATE_TYPES = exports2.FLOWDECLARATION_TYPES = exports2.FLOWBASEANNOTATION_TYPES = exports2.EXPRESSION_TYPES = exports2.EXPRESSIONWRAPPER_TYPES = exports2.EXPORTDECLARATION_TYPES = exports2.ENUMMEMBER_TYPES = exports2.ENUMBODY_TYPES = exports2.DECLARATION_TYPES = exports2.CONDITIONAL_TYPES = exports2.COMPLETIONSTATEMENT_TYPES = exports2.CLASS_TYPES = exports2.BLOCK_TYPES = exports2.BLOCKPARENT_TYPES = exports2.BINARY_TYPES = exports2.ACCESSOR_TYPES = void 0; var _definitions = require_definitions(); var STANDARDIZED_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Standardized"]; exports2.STANDARDIZED_TYPES = STANDARDIZED_TYPES; var EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"]; exports2.EXPRESSION_TYPES = EXPRESSION_TYPES; var BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"]; exports2.BINARY_TYPES = BINARY_TYPES; var SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"]; exports2.SCOPABLE_TYPES = SCOPABLE_TYPES; var BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"]; exports2.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES; var BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"]; exports2.BLOCK_TYPES = BLOCK_TYPES; var STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"]; exports2.STATEMENT_TYPES = STATEMENT_TYPES; var TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"]; exports2.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES; var COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"]; exports2.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES; var CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"]; exports2.CONDITIONAL_TYPES = CONDITIONAL_TYPES; var LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"]; exports2.LOOP_TYPES = LOOP_TYPES; var WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"]; exports2.WHILE_TYPES = WHILE_TYPES; var EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"]; exports2.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES; var FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"]; exports2.FOR_TYPES = FOR_TYPES; var FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"]; exports2.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES; var FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"]; exports2.FUNCTION_TYPES = FUNCTION_TYPES; var FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"]; exports2.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES; var PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"]; exports2.PUREISH_TYPES = PUREISH_TYPES; var DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"]; exports2.DECLARATION_TYPES = DECLARATION_TYPES; var PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"]; exports2.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES; var LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"]; exports2.LVAL_TYPES = LVAL_TYPES; var TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"]; exports2.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES; var LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"]; exports2.LITERAL_TYPES = LITERAL_TYPES; var IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"]; exports2.IMMUTABLE_TYPES = IMMUTABLE_TYPES; var USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"]; exports2.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES; var METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"]; exports2.METHOD_TYPES = METHOD_TYPES; var OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"]; exports2.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES; var PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"]; exports2.PROPERTY_TYPES = PROPERTY_TYPES; var UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"]; exports2.UNARYLIKE_TYPES = UNARYLIKE_TYPES; var PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"]; exports2.PATTERN_TYPES = PATTERN_TYPES; var CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"]; exports2.CLASS_TYPES = CLASS_TYPES; var MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"]; exports2.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES; var EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"]; exports2.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES; var MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"]; exports2.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES; var ACCESSOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Accessor"]; exports2.ACCESSOR_TYPES = ACCESSOR_TYPES; var PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"]; exports2.PRIVATE_TYPES = PRIVATE_TYPES; var FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"]; exports2.FLOW_TYPES = FLOW_TYPES; var FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"]; exports2.FLOWTYPE_TYPES = FLOWTYPE_TYPES; var FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"]; exports2.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES; var FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"]; exports2.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES; var FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"]; exports2.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES; var ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"]; exports2.ENUMBODY_TYPES = ENUMBODY_TYPES; var ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"]; exports2.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES; var JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"]; exports2.JSX_TYPES = JSX_TYPES; var MISCELLANEOUS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Miscellaneous"]; exports2.MISCELLANEOUS_TYPES = MISCELLANEOUS_TYPES; var TYPESCRIPT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TypeScript"]; exports2.TYPESCRIPT_TYPES = TYPESCRIPT_TYPES; var TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"]; exports2.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES; var TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"]; exports2.TSTYPE_TYPES = TSTYPE_TYPES; var TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"]; exports2.TSBASETYPE_TYPES = TSBASETYPE_TYPES; } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/toBlock.js var require_toBlock = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/toBlock.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = toBlock; var _generated = require_generated(); var _generated2 = require_generated2(); function toBlock(node, parent) { if ((0, _generated.isBlockStatement)(node)) { return node; } let blockNodes = []; if ((0, _generated.isEmptyStatement)(node)) { blockNodes = []; } else { if (!(0, _generated.isStatement)(node)) { if ((0, _generated.isFunction)(parent)) { node = (0, _generated2.returnStatement)(node); } else { node = (0, _generated2.expressionStatement)(node); } } blockNodes = [node]; } return (0, _generated2.blockStatement)(blockNodes); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/ensureBlock.js var require_ensureBlock = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/ensureBlock.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = ensureBlock; var _toBlock = require_toBlock(); function ensureBlock(node, key = "body") { return node[key] = (0, _toBlock.default)(node[key], node); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/toIdentifier.js var require_toIdentifier = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/toIdentifier.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = toIdentifier; var _isValidIdentifier = require_isValidIdentifier(); var _helperValidatorIdentifier = require_lib3(); function toIdentifier(input) { input = input + ""; let name = ""; for (const c of input) { name += (0, _helperValidatorIdentifier.isIdentifierChar)(c.codePointAt(0)) ? c : "-"; } name = name.replace(/^[-0-9]+/, ""); name = name.replace(/[-\s]+(.)?/g, function(match, c) { return c ? c.toUpperCase() : ""; }); if (!(0, _isValidIdentifier.default)(name)) { name = `_${name}`; } return name || "_"; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js var require_toBindingIdentifierName = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = toBindingIdentifierName; var _toIdentifier = require_toIdentifier(); function toBindingIdentifierName(name) { name = (0, _toIdentifier.default)(name); if (name === "eval" || name === "arguments") name = "_" + name; return name; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/toComputedKey.js var require_toComputedKey = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/toComputedKey.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = toComputedKey; var _generated = require_generated(); var _generated2 = require_generated2(); function toComputedKey(node, key = node.key || node.property) { if (!node.computed && (0, _generated.isIdentifier)(key)) key = (0, _generated2.stringLiteral)(key.name); return key; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/toExpression.js var require_toExpression = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/toExpression.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var _generated = require_generated(); var _default = toExpression; exports2.default = _default; function toExpression(node) { if ((0, _generated.isExpressionStatement)(node)) { node = node.expression; } if ((0, _generated.isExpression)(node)) { return node; } if ((0, _generated.isClass)(node)) { node.type = "ClassExpression"; } else if ((0, _generated.isFunction)(node)) { node.type = "FunctionExpression"; } if (!(0, _generated.isExpression)(node)) { throw new Error(`cannot turn ${node.type} to an expression`); } return node; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/traverse/traverseFast.js var require_traverseFast = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/traverse/traverseFast.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = traverseFast; var _definitions = require_definitions(); function traverseFast(node, enter, opts) { if (!node) return; const keys = _definitions.VISITOR_KEYS[node.type]; if (!keys) return; opts = opts || {}; enter(node, opts); for (const key of keys) { const subNode = node[key]; if (Array.isArray(subNode)) { for (const node2 of subNode) { traverseFast(node2, enter, opts); } } else { traverseFast(subNode, enter, opts); } } } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/modifications/removeProperties.js var require_removeProperties = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/modifications/removeProperties.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = removeProperties; var _constants = require_constants2(); var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"]; var CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS); function removeProperties(node, opts = {}) { const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS; for (const key of map) { if (node[key] != null) node[key] = void 0; } for (const key of Object.keys(node)) { if (key[0] === "_" && node[key] != null) node[key] = void 0; } const symbols = Object.getOwnPropertySymbols(node); for (const sym of symbols) { node[sym] = null; } } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js var require_removePropertiesDeep = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = removePropertiesDeep; var _traverseFast = require_traverseFast(); var _removeProperties = require_removeProperties(); function removePropertiesDeep(tree, opts) { (0, _traverseFast.default)(tree, _removeProperties.default, opts); return tree; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/toKeyAlias.js var require_toKeyAlias = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/toKeyAlias.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = toKeyAlias; var _generated = require_generated(); var _cloneNode = require_cloneNode(); var _removePropertiesDeep = require_removePropertiesDeep(); function toKeyAlias(node, key = node.key) { let alias; if (node.kind === "method") { return toKeyAlias.increment() + ""; } else if ((0, _generated.isIdentifier)(key)) { alias = key.name; } else if ((0, _generated.isStringLiteral)(key)) { alias = JSON.stringify(key.value); } else { alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key))); } if (node.computed) { alias = `[${alias}]`; } if (node.static) { alias = `static:${alias}`; } return alias; } toKeyAlias.uid = 0; toKeyAlias.increment = function() { if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) { return toKeyAlias.uid = 0; } else { return toKeyAlias.uid++; } }; } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js var require_getBindingIdentifiers = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = getBindingIdentifiers; var _generated = require_generated(); function getBindingIdentifiers(node, duplicates, outerOnly) { let search = [].concat(node); const ids = /* @__PURE__ */ Object.create(null); while (search.length) { const id = search.shift(); if (!id) continue; const keys = getBindingIdentifiers.keys[id.type]; if ((0, _generated.isIdentifier)(id)) { if (duplicates) { const _ids = ids[id.name] = ids[id.name] || []; _ids.push(id); } else { ids[id.name] = id; } continue; } if ((0, _generated.isExportDeclaration)(id) && !(0, _generated.isExportAllDeclaration)(id)) { if ((0, _generated.isDeclaration)(id.declaration)) { search.push(id.declaration); } continue; } if (outerOnly) { if ((0, _generated.isFunctionDeclaration)(id)) { search.push(id.id); continue; } if ((0, _generated.isFunctionExpression)(id)) { continue; } } if (keys) { for (let i = 0; i < keys.length; i++) { const key = keys[i]; if (id[key]) { search = search.concat(id[key]); } } } } return ids; } getBindingIdentifiers.keys = { 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"] }; } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js var require_gatherSequenceExpressions = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = gatherSequenceExpressions; var _getBindingIdentifiers = require_getBindingIdentifiers(); var _generated = require_generated(); var _generated2 = require_generated2(); var _cloneNode = require_cloneNode(); function gatherSequenceExpressions(nodes, scope, declars) { const exprs = []; let ensureLastUndefined = true; for (const node of nodes) { if (!(0, _generated.isEmptyStatement)(node)) { ensureLastUndefined = false; } if ((0, _generated.isExpression)(node)) { exprs.push(node); } else if ((0, _generated.isExpressionStatement)(node)) { exprs.push(node.expression); } else if ((0, _generated.isVariableDeclaration)(node)) { if (node.kind !== "var") return; for (const declar of node.declarations) { const bindings = (0, _getBindingIdentifiers.default)(declar); for (const key of Object.keys(bindings)) { declars.push({ kind: node.kind, id: (0, _cloneNode.default)(bindings[key]) }); } if (declar.init) { exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init)); } } ensureLastUndefined = true; } else if ((0, _generated.isIfStatement)(node)) { const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode(); const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode(); if (!consequent || !alternate) return; exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate)); } else if ((0, _generated.isBlockStatement)(node)) { const body = gatherSequenceExpressions(node.body, scope, declars); if (!body) return; exprs.push(body); } else if ((0, _generated.isEmptyStatement)(node)) { if (nodes.indexOf(node) === 0) { ensureLastUndefined = true; } } else { return; } } if (ensureLastUndefined) { exprs.push(scope.buildUndefinedNode()); } if (exprs.length === 1) { return exprs[0]; } else { return (0, _generated2.sequenceExpression)(exprs); } } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/toSequenceExpression.js var require_toSequenceExpression = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/toSequenceExpression.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = toSequenceExpression; var _gatherSequenceExpressions = require_gatherSequenceExpressions(); function toSequenceExpression(nodes, scope) { if (!(nodes != null && nodes.length)) return; const declars = []; const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars); if (!result) return; for (const declar of declars) { scope.push(declar); } return result; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/toStatement.js var require_toStatement = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/toStatement.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var _generated = require_generated(); var _generated2 = require_generated2(); var _default = toStatement; exports2.default = _default; function toStatement(node, ignore) { if ((0, _generated.isStatement)(node)) { return node; } let mustHaveId = false; let newType; if ((0, _generated.isClass)(node)) { mustHaveId = true; newType = "ClassDeclaration"; } else if ((0, _generated.isFunction)(node)) { mustHaveId = true; newType = "FunctionDeclaration"; } else if ((0, _generated.isAssignmentExpression)(node)) { return (0, _generated2.expressionStatement)(node); } if (mustHaveId && !node.id) { newType = false; } if (!newType) { if (ignore) { return false; } else { throw new Error(`cannot turn ${node.type} to a statement`); } } node.type = newType; return node; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/valueToNode.js var require_valueToNode = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/converters/valueToNode.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var _isValidIdentifier = require_isValidIdentifier(); var _generated = require_generated2(); var _default = valueToNode; exports2.default = _default; var objectToString = Function.call.bind(Object.prototype.toString); function isRegExp(value) { return objectToString(value) === "[object RegExp]"; } function isPlainObject(value) { if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") { return false; } const proto = Object.getPrototypeOf(value); return proto === null || Object.getPrototypeOf(proto) === null; } function valueToNode(value) { if (value === void 0) { return (0, _generated.identifier)("undefined"); } if (value === true || value === false) { return (0, _generated.booleanLiteral)(value); } if (value === null) { return (0, _generated.nullLiteral)(); } if (typeof value === "string") { return (0, _generated.stringLiteral)(value); } if (typeof value === "number") { let result; if (Number.isFinite(value)) { result = (0, _generated.numericLiteral)(Math.abs(value)); } else { let numerator; if (Number.isNaN(value)) { numerator = (0, _generated.numericLiteral)(0); } else { numerator = (0, _generated.numericLiteral)(1); } result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0)); } if (value < 0 || Object.is(value, -0)) { result = (0, _generated.unaryExpression)("-", result); } return result; } if (isRegExp(value)) { const pattern = value.source; const flags = value.toString().match(/\/([a-z]+|)$/)[1]; return (0, _generated.regExpLiteral)(pattern, flags); } if (Array.isArray(value)) { return (0, _generated.arrayExpression)(value.map(valueToNode)); } if (isPlainObject(value)) { const props = []; for (const key of Object.keys(value)) { let nodeKey; if ((0, _isValidIdentifier.default)(key)) { nodeKey = (0, _generated.identifier)(key); } else { nodeKey = (0, _generated.stringLiteral)(key); } props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key]))); } return (0, _generated.objectExpression)(props); } throw new Error("don't know how to turn this value into a node"); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js var require_appendToMemberExpression = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = appendToMemberExpression; var _generated = require_generated2(); function appendToMemberExpression(member, append, computed = false) { member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed); member.property = append; member.computed = !!computed; return member; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/modifications/inherits.js var require_inherits2 = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/modifications/inherits.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = inherits; var _constants = require_constants2(); var _inheritsComments = require_inheritsComments(); function inherits(child, parent) { if (!child || !parent) return child; for (const key of _constants.INHERIT_KEYS.optional) { if (child[key] == null) { child[key] = parent[key]; } } for (const key of Object.keys(parent)) { if (key[0] === "_" && key !== "__clone") child[key] = parent[key]; } for (const key of _constants.INHERIT_KEYS.force) { child[key] = parent[key]; } (0, _inheritsComments.default)(child, parent); return child; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js var require_prependToMemberExpression = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = prependToMemberExpression; var _generated = require_generated2(); function prependToMemberExpression(member, prepend) { member.object = (0, _generated.memberExpression)(prepend, member.object); return member; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js var require_getOuterBindingIdentifiers = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var _getBindingIdentifiers = require_getBindingIdentifiers(); var _default = getOuterBindingIdentifiers; exports2.default = _default; function getOuterBindingIdentifiers(node, duplicates) { return (0, _getBindingIdentifiers.default)(node, duplicates, true); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/traverse/traverse.js var require_traverse = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/traverse/traverse.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = traverse; var _definitions = require_definitions(); function traverse(node, handlers, state) { if (typeof handlers === "function") { handlers = { enter: handlers }; } const { enter, exit } = handlers; traverseSimpleImpl(node, enter, exit, state, []); } function traverseSimpleImpl(node, enter, exit, state, ancestors) { const keys = _definitions.VISITOR_KEYS[node.type]; if (!keys) return; if (enter) enter(node, ancestors, state); for (const key of keys) { const subNode = node[key]; if (Array.isArray(subNode)) { for (let i = 0; i < subNode.length; i++) { const child = subNode[i]; if (!child) continue; ancestors.push({ node, key, index: i }); traverseSimpleImpl(child, enter, exit, state, ancestors); ancestors.pop(); } } else if (subNode) { ancestors.push({ node, key }); traverseSimpleImpl(subNode, enter, exit, state, ancestors); ancestors.pop(); } } if (exit) exit(node, ancestors, state); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isBinding.js var require_isBinding = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isBinding.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isBinding; var _getBindingIdentifiers = require_getBindingIdentifiers(); function isBinding(node, parent, grandparent) { if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") { return false; } const keys = _getBindingIdentifiers.default.keys[parent.type]; if (keys) { for (let i = 0; i < keys.length; i++) { const key = keys[i]; const val = parent[key]; if (Array.isArray(val)) { if (val.indexOf(node) >= 0) return true; } else { if (val === node) return true; } } } return false; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isLet.js var require_isLet = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isLet.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isLet; var _generated = require_generated(); var _constants = require_constants2(); function isLet(node) { return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isBlockScoped.js var require_isBlockScoped = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isBlockScoped.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isBlockScoped; var _generated = require_generated(); var _isLet = require_isLet(); function isBlockScoped(node) { return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isImmutable.js var require_isImmutable = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isImmutable.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isImmutable; var _isType = require_isType(); var _generated = require_generated(); function isImmutable(node) { if ((0, _isType.default)(node.type, "Immutable")) return true; if ((0, _generated.isIdentifier)(node)) { if (node.name === "undefined") { return true; } else { return false; } } return false; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isNodesEquivalent.js var require_isNodesEquivalent = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isNodesEquivalent.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isNodesEquivalent; var _definitions = require_definitions(); function isNodesEquivalent(a, b) { if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) { return a === b; } if (a.type !== b.type) { return false; } const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type); const visitorKeys = _definitions.VISITOR_KEYS[a.type]; for (const field of fields) { if (typeof a[field] !== typeof b[field]) { return false; } if (a[field] == null && b[field] == null) { continue; } else if (a[field] == null || b[field] == null) { return false; } if (Array.isArray(a[field])) { if (!Array.isArray(b[field])) { return false; } if (a[field].length !== b[field].length) { return false; } for (let i = 0; i < a[field].length; i++) { if (!isNodesEquivalent(a[field][i], b[field][i])) { return false; } } continue; } if (typeof a[field] === "object" && !(visitorKeys != null && visitorKeys.includes(field))) { for (const key of Object.keys(a[field])) { if (a[field][key] !== b[field][key]) { return false; } } continue; } if (!isNodesEquivalent(a[field], b[field])) { return false; } } return true; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isReferenced.js var require_isReferenced = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isReferenced.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isReferenced; function isReferenced(node, parent, grandparent) { switch (parent.type) { case "MemberExpression": case "OptionalMemberExpression": if (parent.property === node) { return !!parent.computed; } return parent.object === node; case "JSXMemberExpression": return parent.object === node; case "VariableDeclarator": return parent.init === node; case "ArrowFunctionExpression": return parent.body === node; case "PrivateName": return false; case "ClassMethod": case "ClassPrivateMethod": case "ObjectMethod": if (parent.key === node) { return !!parent.computed; } return false; case "ObjectProperty": if (parent.key === node) { return !!parent.computed; } return !grandparent || grandparent.type !== "ObjectPattern"; case "ClassProperty": case "ClassAccessorProperty": if (parent.key === node) { return !!parent.computed; } return true; case "ClassPrivateProperty": return parent.key !== node; case "ClassDeclaration": case "ClassExpression": return parent.superClass === node; case "AssignmentExpression": return parent.right === node; case "AssignmentPattern": return parent.right === node; case "LabeledStatement": return false; case "CatchClause": return false; case "RestElement": return false; case "BreakStatement": case "ContinueStatement": return false; case "FunctionDeclaration": case "FunctionExpression": return false; case "ExportNamespaceSpecifier": case "ExportDefaultSpecifier": return false; case "ExportSpecifier": if (grandparent != null && grandparent.source) { return false; } return parent.local === node; case "ImportDefaultSpecifier": case "ImportNamespaceSpecifier": case "ImportSpecifier": return false; case "ImportAttribute": return false; case "JSXAttribute": return false; case "ObjectPattern": case "ArrayPattern": return false; case "MetaProperty": return false; case "ObjectTypeProperty": return parent.key !== node; case "TSEnumMember": return parent.id !== node; case "TSPropertySignature": if (parent.key === node) { return !!parent.computed; } return true; } return true; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isScope.js var require_isScope = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isScope.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isScope; var _generated = require_generated(); function isScope(node, parent) { if ((0, _generated.isBlockStatement)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) { return false; } if ((0, _generated.isPattern)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) { return true; } return (0, _generated.isScopable)(node); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isSpecifierDefault.js var require_isSpecifierDefault = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isSpecifierDefault.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isSpecifierDefault; var _generated = require_generated(); function isSpecifierDefault(specifier) { return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, { name: "default" }); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isValidES3Identifier.js var require_isValidES3Identifier = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isValidES3Identifier.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isValidES3Identifier; var _isValidIdentifier = require_isValidIdentifier(); var RESERVED_WORDS_ES3_ONLY = /* @__PURE__ */ 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 isValidES3Identifier(name) { return (0, _isValidIdentifier.default)(name) && !RESERVED_WORDS_ES3_ONLY.has(name); } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isVar.js var require_isVar = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isVar.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isVar; var _generated = require_generated(); var _constants = require_constants2(); function isVar(node) { return (0, _generated.isVariableDeclaration)(node, { kind: "var" }) && !node[_constants.BLOCK_SCOPED_SYMBOL]; } } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/ast-types/generated/index.js var require_generated5 = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/ast-types/generated/index.js"() { } }); // node_modules/@babel/traverse/node_modules/@babel/types/lib/index.js var require_lib4 = __commonJS({ "node_modules/@babel/traverse/node_modules/@babel/types/lib/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var _exportNames = { react: true, assertNode: true, createTypeAnnotationBasedOnTypeof: true, createUnionTypeAnnotation: true, createFlowUnionType: true, createTSUnionType: true, cloneNode: true, clone: true, cloneDeep: true, cloneDeepWithoutLoc: true, cloneWithoutLoc: true, addComment: true, addComments: true, inheritInnerComments: true, inheritLeadingComments: true, inheritsComments: true, inheritTrailingComments: true, removeComments: true, ensureBlock: true, toBindingIdentifierName: true, toBlock: true, toComputedKey: true, toExpression: true, toIdentifier: true, toKeyAlias: true, toSequenceExpression: true, toStatement: true, valueToNode: true, appendToMemberExpression: true, inherits: true, prependToMemberExpression: true, removeProperties: true, removePropertiesDeep: true, removeTypeDuplicates: true, getBindingIdentifiers: true, getOuterBindingIdentifiers: true, traverse: true, traverseFast: true, shallowEqual: true, is: true, isBinding: true, isBlockScoped: true, isImmutable: true, isLet: true, isNode: true, isNodesEquivalent: true, isPlaceholderType: true, isReferenced: true, isScope: true, isSpecifierDefault: true, isType: true, isValidES3Identifier: true, isValidIdentifier: true, isVar: true, matchesPattern: true, validate: true, buildMatchMemberExpression: true }; Object.defineProperty(exports2, "addComment", { enumerable: true, get: function() { return _addComment.default; } }); Object.defineProperty(exports2, "addComments", { enumerable: true, get: function() { return _addComments.default; } }); Object.defineProperty(exports2, "appendToMemberExpression", { enumerable: true, get: function() { return _appendToMemberExpression.default; } }); Object.defineProperty(exports2, "assertNode", { enumerable: true, get: function() { return _assertNode.default; } }); Object.defineProperty(exports2, "buildMatchMemberExpression", { enumerable: true, get: function() { return _buildMatchMemberExpression.default; } }); Object.defineProperty(exports2, "clone", { enumerable: true, get: function() { return _clone.default; } }); Object.defineProperty(exports2, "cloneDeep", { enumerable: true, get: function() { return _cloneDeep.default; } }); Object.defineProperty(exports2, "cloneDeepWithoutLoc", { enumerable: true, get: function() { return _cloneDeepWithoutLoc.default; } }); Object.defineProperty(exports2, "cloneNode", { enumerable: true, get: function() { return _cloneNode.default; } }); Object.defineProperty(exports2, "cloneWithoutLoc", { enumerable: true, get: function() { return _cloneWithoutLoc.default; } }); Object.defineProperty(exports2, "createFlowUnionType", { enumerable: true, get: function() { return _createFlowUnionType.default; } }); Object.defineProperty(exports2, "createTSUnionType", { enumerable: true, get: function() { return _createTSUnionType.default; } }); Object.defineProperty(exports2, "createTypeAnnotationBasedOnTypeof", { enumerable: true, get: function() { return _createTypeAnnotationBasedOnTypeof.default; } }); Object.defineProperty(exports2, "createUnionTypeAnnotation", { enumerable: true, get: function() { return _createFlowUnionType.default; } }); Object.defineProperty(exports2, "ensureBlock", { enumerable: true, get: function() { return _ensureBlock.default; } }); Object.defineProperty(exports2, "getBindingIdentifiers", { enumerable: true, get: function() { return _getBindingIdentifiers.default; } }); Object.defineProperty(exports2, "getOuterBindingIdentifiers", { enumerable: true, get: function() { return _getOuterBindingIdentifiers.default; } }); Object.defineProperty(exports2, "inheritInnerComments", { enumerable: true, get: function() { return _inheritInnerComments.default; } }); Object.defineProperty(exports2, "inheritLeadingComments", { enumerable: true, get: function() { return _inheritLeadingComments.default; } }); Object.defineProperty(exports2, "inheritTrailingComments", { enumerable: true, get: function() { return _inheritTrailingComments.default; } }); Object.defineProperty(exports2, "inherits", { enumerable: true, get: function() { return _inherits.default; } }); Object.defineProperty(exports2, "inheritsComments", { enumerable: true, get: function() { return _inheritsComments.default; } }); Object.defineProperty(exports2, "is", { enumerable: true, get: function() { return _is.default; } }); Object.defineProperty(exports2, "isBinding", { enumerable: true, get: function() { return _isBinding.default; } }); Object.defineProperty(exports2, "isBlockScoped", { enumerable: true, get: function() { return _isBlockScoped.default; } }); Object.defineProperty(exports2, "isImmutable", { enumerable: true, get: function() { return _isImmutable.default; } }); Object.defineProperty(exports2, "isLet", { enumerable: true, get: function() { return _isLet.default; } }); Object.defineProperty(exports2, "isNode", { enumerable: true, get: function() { return _isNode.default; } }); Object.defineProperty(exports2, "isNodesEquivalent", { enumerable: true, get: function() { return _isNodesEquivalent.default; } }); Object.defineProperty(exports2, "isPlaceholderType", { enumerable: true, get: function() { return _isPlaceholderType.default; } }); Object.defineProperty(exports2, "isReferenced", { enumerable: true, get: function() { return _isReferenced.default; } }); Object.defineProperty(exports2, "isScope", { enumerable: true, get: function() { return _isScope.default; } }); Object.defineProperty(exports2, "isSpecifierDefault", { enumerable: true, get: function() { return _isSpecifierDefault.default; } }); Object.defineProperty(exports2, "isType", { enumerable: true, get: function() { return _isType.default; } }); Object.defineProperty(exports2, "isValidES3Identifier", { enumerable: true, get: function() { return _isValidES3Identifier.default; } }); Object.defineProperty(exports2, "isValidIdentifier", { enumerable: true, get: function() { return _isValidIdentifier.default; } }); Object.defineProperty(exports2, "isVar", { enumerable: true, get: function() { return _isVar.default; } }); Object.defineProperty(exports2, "matchesPattern", { enumerable: true, get: function() { return _matchesPattern.default; } }); Object.defineProperty(exports2, "prependToMemberExpression", { enumerable: true, get: function() { return _prependToMemberExpression.default; } }); exports2.react = void 0; Object.defineProperty(exports2, "removeComments", { enumerable: true, get: function() { return _removeComments.default; } }); Object.defineProperty(exports2, "removeProperties", { enumerable: true, get: function() { return _removeProperties.default; } }); Object.defineProperty(exports2, "removePropertiesDeep", { enumerable: true, get: function() { return _removePropertiesDeep.default; } }); Object.defineProperty(exports2, "removeTypeDuplicates", { enumerable: true, get: function() { return _removeTypeDuplicates.default; } }); Object.defineProperty(exports2, "shallowEqual", { enumerable: true, get: function() { return _shallowEqual.default; } }); Object.defineProperty(exports2, "toBindingIdentifierName", { enumerable: true, get: function() { return _toBindingIdentifierName.default; } }); Object.defineProperty(exports2, "toBlock", { enumerable: true, get: function() { return _toBlock.default; } }); Object.defineProperty(exports2, "toComputedKey", { enumerable: true, get: function() { return _toComputedKey.default; } }); Object.defineProperty(exports2, "toExpression", { enumerable: true, get: function() { return _toExpression.default; } }); Object.defineProperty(exports2, "toIdentifier", { enumerable: true, get: function() { return _toIdentifier.default; } }); Object.defineProperty(exports2, "toKeyAlias", { enumerable: true, get: function() { return _toKeyAlias.default; } }); Object.defineProperty(exports2, "toSequenceExpression", { enumerable: true, get: function() { return _toSequenceExpression.default; } }); Object.defineProperty(exports2, "toStatement", { enumerable: true, get: function() { return _toStatement.default; } }); Object.defineProperty(exports2, "traverse", { enumerable: true, get: function() { return _traverse.default; } }); Object.defineProperty(exports2, "traverseFast", { enumerable: true, get: function() { return _traverseFast.default; } }); Object.defineProperty(exports2, "validate", { enumerable: true, get: function() { return _validate.default; } }); Object.defineProperty(exports2, "valueToNode", { enumerable: true, get: function() { return _valueToNode.default; } }); var _isReactComponent = require_isReactComponent(); var _isCompatTag = require_isCompatTag(); var _buildChildren = require_buildChildren(); var _assertNode = require_assertNode(); var _generated = require_generated3(); Object.keys(_generated).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _generated[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _generated[key]; } }); }); var _createTypeAnnotationBasedOnTypeof = require_createTypeAnnotationBasedOnTypeof(); var _createFlowUnionType = require_createFlowUnionType(); var _createTSUnionType = require_createTSUnionType(); var _generated2 = require_generated2(); Object.keys(_generated2).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _generated2[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _generated2[key]; } }); }); var _uppercase = require_uppercase(); Object.keys(_uppercase).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _uppercase[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _uppercase[key]; } }); }); var _cloneNode = require_cloneNode(); var _clone = require_clone2(); var _cloneDeep = require_cloneDeep(); var _cloneDeepWithoutLoc = require_cloneDeepWithoutLoc(); var _cloneWithoutLoc = require_cloneWithoutLoc(); var _addComment = require_addComment(); var _addComments = require_addComments(); var _inheritInnerComments = require_inheritInnerComments(); var _inheritLeadingComments = require_inheritLeadingComments(); var _inheritsComments = require_inheritsComments(); var _inheritTrailingComments = require_inheritTrailingComments(); var _removeComments = require_removeComments(); var _generated3 = require_generated4(); Object.keys(_generated3).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _generated3[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _generated3[key]; } }); }); var _constants = require_constants2(); Object.keys(_constants).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _constants[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _constants[key]; } }); }); var _ensureBlock = require_ensureBlock(); var _toBindingIdentifierName = require_toBindingIdentifierName(); var _toBlock = require_toBlock(); var _toComputedKey = require_toComputedKey(); var _toExpression = require_toExpression(); var _toIdentifier = require_toIdentifier(); var _toKeyAlias = require_toKeyAlias(); var _toSequenceExpression = require_toSequenceExpression(); var _toStatement = require_toStatement(); var _valueToNode = require_valueToNode(); var _definitions = require_definitions(); Object.keys(_definitions).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _definitions[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _definitions[key]; } }); }); var _appendToMemberExpression = require_appendToMemberExpression(); var _inherits = require_inherits2(); var _prependToMemberExpression = require_prependToMemberExpression(); var _removeProperties = require_removeProperties(); var _removePropertiesDeep = require_removePropertiesDeep(); var _removeTypeDuplicates = require_removeTypeDuplicates(); var _getBindingIdentifiers = require_getBindingIdentifiers(); var _getOuterBindingIdentifiers = require_getOuterBindingIdentifiers(); var _traverse = require_traverse(); Object.keys(_traverse).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _traverse[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _traverse[key]; } }); }); var _traverseFast = require_traverseFast(); var _shallowEqual = require_shallowEqual(); var _is = require_is(); var _isBinding = require_isBinding(); var _isBlockScoped = require_isBlockScoped(); var _isImmutable = require_isImmutable(); var _isLet = require_isLet(); var _isNode = require_isNode(); var _isNodesEquivalent = require_isNodesEquivalent(); var _isPlaceholderType = require_isPlaceholderType(); var _isReferenced = require_isReferenced(); var _isScope = require_isScope(); var _isSpecifierDefault = require_isSpecifierDefault(); var _isType = require_isType(); var _isValidES3Identifier = require_isValidES3Identifier(); var _isValidIdentifier = require_isValidIdentifier(); var _isVar = require_isVar(); var _matchesPattern = require_matchesPattern(); var _validate = require_validate(); var _buildMatchMemberExpression = require_buildMatchMemberExpression(); var _generated4 = require_generated(); Object.keys(_generated4).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _generated4[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _generated4[key]; } }); }); var _generated5 = require_generated5(); Object.keys(_generated5).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _generated5[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _generated5[key]; } }); }); var react = { isReactComponent: _isReactComponent.default, isCompatTag: _isCompatTag.default, buildChildren: _buildChildren.default }; exports2.react = react; } }); // node_modules/@babel/traverse/lib/path/lib/virtual-types.js var require_virtual_types = __commonJS({ "node_modules/@babel/traverse/lib/path/lib/virtual-types.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Var = exports2.User = exports2.Statement = exports2.SpreadProperty = exports2.Scope = exports2.RestProperty = exports2.ReferencedMemberExpression = exports2.ReferencedIdentifier = exports2.Referenced = exports2.Pure = exports2.NumericLiteralTypeAnnotation = exports2.Generated = exports2.ForAwaitStatement = exports2.Flow = exports2.Expression = exports2.ExistentialTypeParam = exports2.BlockScoped = exports2.BindingIdentifier = void 0; var _t = require_lib4(); var { isBinding, isBlockScoped, isExportDeclaration, isExpression, isFlow, isForStatement, isForXStatement, isIdentifier, isImportDeclaration, isImportSpecifier, isJSXIdentifier, isJSXMemberExpression, isMemberExpression, isReferenced, isScope, isStatement, isVar, isVariableDeclaration, react } = _t; var { isCompatTag } = react; var ReferencedIdentifier = { types: ["Identifier", "JSXIdentifier"], checkPath(path2, opts) { const { node, parent } = path2; if (!isIdentifier(node, opts) && !isJSXMemberExpression(parent, opts)) { if (isJSXIdentifier(node, opts)) { if (isCompatTag(node.name)) return false; } else { return false; } } return isReferenced(node, parent, path2.parentPath.parent); } }; exports2.ReferencedIdentifier = ReferencedIdentifier; var ReferencedMemberExpression = { types: ["MemberExpression"], checkPath({ node, parent }) { return isMemberExpression(node) && isReferenced(node, parent); } }; exports2.ReferencedMemberExpression = ReferencedMemberExpression; var BindingIdentifier = { types: ["Identifier"], checkPath(path2) { const { node, parent } = path2; const grandparent = path2.parentPath.parent; return isIdentifier(node) && isBinding(node, parent, grandparent); } }; exports2.BindingIdentifier = BindingIdentifier; var Statement = { types: ["Statement"], checkPath({ node, parent }) { if (isStatement(node)) { if (isVariableDeclaration(node)) { if (isForXStatement(parent, { left: node })) return false; if (isForStatement(parent, { init: node })) return false; } return true; } else { return false; } } }; exports2.Statement = Statement; var Expression = { types: ["Expression"], checkPath(path2) { if (path2.isIdentifier()) { return path2.isReferencedIdentifier(); } else { return isExpression(path2.node); } } }; exports2.Expression = Expression; var Scope = { types: ["Scopable", "Pattern"], checkPath(path2) { return isScope(path2.node, path2.parent); } }; exports2.Scope = Scope; var Referenced = { checkPath(path2) { return isReferenced(path2.node, path2.parent); } }; exports2.Referenced = Referenced; var BlockScoped = { checkPath(path2) { return isBlockScoped(path2.node); } }; exports2.BlockScoped = BlockScoped; var Var = { types: ["VariableDeclaration"], checkPath(path2) { return isVar(path2.node); } }; exports2.Var = Var; var User = { checkPath(path2) { return path2.node && !!path2.node.loc; } }; exports2.User = User; var Generated = { checkPath(path2) { return !path2.isUser(); } }; exports2.Generated = Generated; var Pure = { checkPath(path2, opts) { return path2.scope.isPure(path2.node, opts); } }; exports2.Pure = Pure; var Flow = { types: ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"], checkPath({ node }) { if (isFlow(node)) { return true; } else if (isImportDeclaration(node)) { return node.importKind === "type" || node.importKind === "typeof"; } else if (isExportDeclaration(node)) { return node.exportKind === "type"; } else if (isImportSpecifier(node)) { return node.importKind === "type" || node.importKind === "typeof"; } else { return false; } } }; exports2.Flow = Flow; var RestProperty = { types: ["RestElement"], checkPath(path2) { return path2.parentPath && path2.parentPath.isObjectPattern(); } }; exports2.RestProperty = RestProperty; var SpreadProperty = { types: ["RestElement"], checkPath(path2) { return path2.parentPath && path2.parentPath.isObjectExpression(); } }; exports2.SpreadProperty = SpreadProperty; var ExistentialTypeParam = { types: ["ExistsTypeAnnotation"] }; exports2.ExistentialTypeParam = ExistentialTypeParam; var NumericLiteralTypeAnnotation = { types: ["NumberLiteralTypeAnnotation"] }; exports2.NumericLiteralTypeAnnotation = NumericLiteralTypeAnnotation; var ForAwaitStatement = { types: ["ForOfStatement"], checkPath({ node }) { return node.await === true; } }; exports2.ForAwaitStatement = ForAwaitStatement; } }); // node_modules/@babel/traverse/lib/visitors.js var require_visitors = __commonJS({ "node_modules/@babel/traverse/lib/visitors.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.explode = explode; exports2.merge = merge; exports2.verify = verify; var virtualTypes = require_virtual_types(); var _t = require_lib4(); var { DEPRECATED_KEYS, FLIPPED_ALIAS_KEYS, TYPES } = _t; function explode(visitor) { if (visitor._exploded) return visitor; visitor._exploded = true; for (const nodeType of Object.keys(visitor)) { if (shouldIgnoreKey(nodeType)) continue; const parts = nodeType.split("|"); if (parts.length === 1) continue; const fns = visitor[nodeType]; delete visitor[nodeType]; for (const part of parts) { visitor[part] = fns; } } verify(visitor); delete visitor.__esModule; ensureEntranceObjects(visitor); ensureCallbackArrays(visitor); for (const nodeType of Object.keys(visitor)) { if (shouldIgnoreKey(nodeType)) continue; const wrapper = virtualTypes[nodeType]; if (!wrapper) continue; const fns = visitor[nodeType]; for (const type of Object.keys(fns)) { fns[type] = wrapCheck(wrapper, fns[type]); } delete visitor[nodeType]; if (wrapper.types) { for (const type of wrapper.types) { if (visitor[type]) { mergePair(visitor[type], fns); } else { visitor[type] = fns; } } } else { mergePair(visitor, fns); } } for (const nodeType of Object.keys(visitor)) { if (shouldIgnoreKey(nodeType)) continue; const fns = visitor[nodeType]; let aliases = FLIPPED_ALIAS_KEYS[nodeType]; const deprecatedKey = DEPRECATED_KEYS[nodeType]; if (deprecatedKey) { console.trace(`Visitor defined for ${nodeType} but it has been renamed to ${deprecatedKey}`); aliases = [deprecatedKey]; } if (!aliases) continue; delete visitor[nodeType]; for (const alias of aliases) { const existing = visitor[alias]; if (existing) { mergePair(existing, fns); } else { visitor[alias] = Object.assign({}, fns); } } } for (const nodeType of Object.keys(visitor)) { if (shouldIgnoreKey(nodeType)) continue; ensureCallbackArrays(visitor[nodeType]); } return visitor; } function verify(visitor) { if (visitor._verified) return; if (typeof visitor === "function") { throw new Error("You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?"); } for (const nodeType of Object.keys(visitor)) { if (nodeType === "enter" || nodeType === "exit") { validateVisitorMethods(nodeType, visitor[nodeType]); } if (shouldIgnoreKey(nodeType)) continue; if (TYPES.indexOf(nodeType) < 0) { throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type`); } const visitors = visitor[nodeType]; if (typeof visitors === "object") { for (const visitorKey of Object.keys(visitors)) { if (visitorKey === "enter" || visitorKey === "exit") { validateVisitorMethods(`${nodeType}.${visitorKey}`, visitors[visitorKey]); } else { throw new Error(`You passed \`traverse()\` a visitor object with the property ${nodeType} that has the invalid property ${visitorKey}`); } } } } visitor._verified = true; } function validateVisitorMethods(path2, val) { const fns = [].concat(val); for (const fn of fns) { if (typeof fn !== "function") { throw new TypeError(`Non-function found defined in ${path2} with type ${typeof fn}`); } } } function merge(visitors, states = [], wrapper) { const rootVisitor = {}; for (let i = 0; i < visitors.length; i++) { const visitor = visitors[i]; const state = states[i]; explode(visitor); for (const type of Object.keys(visitor)) { let visitorType = visitor[type]; if (state || wrapper) { visitorType = wrapWithStateOrWrapper(visitorType, state, wrapper); } const nodeVisitor = rootVisitor[type] = rootVisitor[type] || {}; mergePair(nodeVisitor, visitorType); } } return rootVisitor; } function wrapWithStateOrWrapper(oldVisitor, state, wrapper) { const newVisitor = {}; for (const key of Object.keys(oldVisitor)) { let fns = oldVisitor[key]; if (!Array.isArray(fns)) continue; fns = fns.map(function(fn) { let newFn = fn; if (state) { newFn = function(path2) { return fn.call(state, path2, state); }; } if (wrapper) { newFn = wrapper(state.key, key, newFn); } if (newFn !== fn) { newFn.toString = () => fn.toString(); } return newFn; }); newVisitor[key] = fns; } return newVisitor; } function ensureEntranceObjects(obj) { for (const key of Object.keys(obj)) { if (shouldIgnoreKey(key)) continue; const fns = obj[key]; if (typeof fns === "function") { obj[key] = { enter: fns }; } } } function ensureCallbackArrays(obj) { if (obj.enter && !Array.isArray(obj.enter)) obj.enter = [obj.enter]; if (obj.exit && !Array.isArray(obj.exit)) obj.exit = [obj.exit]; } function wrapCheck(wrapper, fn) { const newFn = function(path2) { if (wrapper.checkPath(path2)) { return fn.apply(this, arguments); } }; newFn.toString = () => fn.toString(); return newFn; } function shouldIgnoreKey(key) { if (key[0] === "_") return true; if (key === "enter" || key === "exit" || key === "shouldSkip") return true; if (key === "denylist" || key === "noScope" || key === "skipKeys" || key === "blacklist") { return true; } return false; } function mergePair(dest, src) { for (const key of Object.keys(src)) { dest[key] = [].concat(dest[key] || [], src[key]); } } } }); // node_modules/@babel/traverse/lib/cache.js var require_cache = __commonJS({ "node_modules/@babel/traverse/lib/cache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.clear = clear; exports2.clearPath = clearPath; exports2.clearScope = clearScope; exports2.scope = exports2.path = void 0; var path2 = /* @__PURE__ */ new WeakMap(); exports2.path = path2; var scope = /* @__PURE__ */ new WeakMap(); exports2.scope = scope; function clear() { clearPath(); clearScope(); } function clearPath() { exports2.path = path2 = /* @__PURE__ */ new WeakMap(); } function clearScope() { exports2.scope = scope = /* @__PURE__ */ new WeakMap(); } } }); // ../../node_modules/debug/src/common.js var require_common2 = __commonJS({ "../../node_modules/debug/src/common.js"(exports2, module2) { function setup(env) { createDebug.debug = createDebug; createDebug.default = createDebug; createDebug.coerce = coerce; createDebug.disable = disable; createDebug.enable = enable; createDebug.enabled = enabled; createDebug.humanize = require_ms(); createDebug.destroy = destroy; Object.keys(env).forEach((key) => { createDebug[key] = env[key]; }); createDebug.names = []; createDebug.skips = []; createDebug.formatters = {}; function selectColor(namespace) { let hash2 = 0; for (let i = 0; i < namespace.length; i++) { hash2 = (hash2 << 5) - hash2 + namespace.charCodeAt(i); hash2 |= 0; } return createDebug.colors[Math.abs(hash2) % createDebug.colors.length]; } createDebug.selectColor = selectColor; function createDebug(namespace) { let prevTime; let enableOverride = null; function debug(...args) { if (!debug.enabled) { return; } const self = debug; const curr = Number(new Date()); const ms = curr - (prevTime || curr); self.diff = ms; self.prev = prevTime; self.curr = curr; prevTime = curr; args[0] = createDebug.coerce(args[0]); if (typeof args[0] !== "string") { args.unshift("%O"); } let index = 0; args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { if (match === "%%") { return "%"; } index++; const formatter = createDebug.formatters[format]; if (typeof formatter === "function") { const val = args[index]; match = formatter.call(self, val); args.splice(index, 1); index--; } return match; }); createDebug.formatArgs.call(self, args); const logFn = self.log || createDebug.log; logFn.apply(self, args); } debug.namespace = namespace; debug.useColors = createDebug.useColors(); debug.color = createDebug.selectColor(namespace); debug.extend = extend; debug.destroy = createDebug.destroy; Object.defineProperty(debug, "enabled", { enumerable: true, configurable: false, get: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride, set: (v) => { enableOverride = v; } }); if (typeof createDebug.init === "function") { createDebug.init(debug); } return debug; } function extend(namespace, delimiter) { const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); newDebug.log = this.log; return newDebug; } function enable(namespaces) { createDebug.save(namespaces); createDebug.names = []; createDebug.skips = []; let i; const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/); const len = split.length; for (i = 0; i < len; i++) { if (!split[i]) { continue; } namespaces = split[i].replace(/\*/g, ".*?"); if (namespaces[0] === "-") { createDebug.skips.push(new RegExp("^" + namespaces.substr(1) + "$")); } else { createDebug.names.push(new RegExp("^" + namespaces + "$")); } } } function disable() { const namespaces = [ ...createDebug.names.map(toNamespace), ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace) ].join(","); createDebug.enable(""); return namespaces; } function enabled(name) { if (name[name.length - 1] === "*") { return true; } let i; let len; for (i = 0, len = createDebug.skips.length; i < len; i++) { if (createDebug.skips[i].test(name)) { return false; } } for (i = 0, len = createDebug.names.length; i < len; i++) { if (createDebug.names[i].test(name)) { return true; } } return false; } function toNamespace(regexp) { return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*"); } function coerce(val) { if (val instanceof Error) { return val.stack || val.message; } return val; } function destroy() { console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); } createDebug.enable(createDebug.load()); return createDebug; } module2.exports = setup; } }); // ../../node_modules/debug/src/browser.js var require_browser = __commonJS({ "../../node_modules/debug/src/browser.js"(exports2, module2) { exports2.formatArgs = formatArgs; exports2.save = save; exports2.load = load; exports2.useColors = useColors; exports2.storage = localstorage(); exports2.destroy = (() => { let warned = false; return () => { if (!warned) { warned = true; console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); } }; })(); exports2.colors = [ "#0000CC", "#0000FF", "#0033CC", "#0033FF", "#0066CC", "#0066FF", "#0099CC", "#0099FF", "#00CC00", "#00CC33", "#00CC66", "#00CC99", "#00CCCC", "#00CCFF", "#3300CC", "#3300FF", "#3333CC", "#3333FF", "#3366CC", "#3366FF", "#3399CC", "#3399FF", "#33CC00", "#33CC33", "#33CC66", "#33CC99", "#33CCCC", "#33CCFF", "#6600CC", "#6600FF", "#6633CC", "#6633FF", "#66CC00", "#66CC33", "#9900CC", "#9900FF", "#9933CC", "#9933FF", "#99CC00", "#99CC33", "#CC0000", "#CC0033", "#CC0066", "#CC0099", "#CC00CC", "#CC00FF", "#CC3300", "#CC3333", "#CC3366", "#CC3399", "#CC33CC", "#CC33FF", "#CC6600", "#CC6633", "#CC9900", "#CC9933", "#CCCC00", "#CCCC33", "#FF0000", "#FF0033", "#FF0066", "#FF0099", "#FF00CC", "#FF00FF", "#FF3300", "#FF3333", "#FF3366", "#FF3399", "#FF33CC", "#FF33FF", "#FF6600", "#FF6633", "#FF9900", "#FF9933", "#FFCC00", "#FFCC33" ]; function useColors() { if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { return true; } if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { return false; } return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); } function formatArgs(args) { args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff); if (!this.useColors) { return; } const c = "color: " + this.color; args.splice(1, 0, c, "color: inherit"); let index = 0; let lastC = 0; args[0].replace(/%[a-zA-Z%]/g, (match) => { if (match === "%%") { return; } index++; if (match === "%c") { lastC = index; } }); args.splice(lastC, 0, c); } exports2.log = console.debug || console.log || (() => { }); function save(namespaces) { try { if (namespaces) { exports2.storage.setItem("debug", namespaces); } else { exports2.storage.removeItem("debug"); } } catch (error) { } } function load() { let r; try { r = exports2.storage.getItem("debug"); } catch (error) { } if (!r && typeof process !== "undefined" && "env" in process) { r = process.env.DEBUG; } return r; } function localstorage() { try { return localStorage; } catch (error) { } } module2.exports = require_common2()(exports2); var { formatters } = module2.exports; formatters.j = function(v) { try { return JSON.stringify(v); } catch (error) { return "[UnexpectedJSONParseError]: " + error.message; } }; } }); // ../../node_modules/has-flag/index.js var require_has_flag2 = __commonJS({ "../../node_modules/has-flag/index.js"(exports2, module2) { "use strict"; module2.exports = (flag, argv) => { argv = argv || process.argv; const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; const pos = argv.indexOf(prefix + flag); const terminatorPos = argv.indexOf("--"); return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); }; } }); // ../../node_modules/supports-color/index.js var require_supports_color = __commonJS({ "../../node_modules/supports-color/index.js"(exports2, module2) { "use strict"; var os = require("os"); var hasFlag = require_has_flag2(); var env = process.env; var forceColor; if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) { forceColor = false; } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { forceColor = true; } if ("FORCE_COLOR" in env) { forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; } function translateLevel(level) { if (level === 0) { return false; } return { level, hasBasic: true, has256: level >= 2, has16m: level >= 3 }; } function supportsColor(stream) { if (forceColor === false) { return 0; } if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { return 3; } if (hasFlag("color=256")) { return 2; } if (stream && !stream.isTTY && forceColor !== true) { return 0; } const min = forceColor ? 1 : 0; if (process.platform === "win32") { const osRelease = os.release().split("."); if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { return Number(osRelease[2]) >= 14931 ? 3 : 2; } return 1; } if ("CI" in env) { if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") { return 1; } return min; } if ("TEAMCITY_VERSION" in env) { return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; } if (env.COLORTERM === "truecolor") { return 3; } if ("TERM_PROGRAM" in env) { const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); switch (env.TERM_PROGRAM) { case "iTerm.app": return version >= 3 ? 3 : 2; case "Apple_Terminal": return 2; } } if (/-256(color)?$/i.test(env.TERM)) { return 2; } if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { return 1; } if ("COLORTERM" in env) { return 1; } if (env.TERM === "dumb") { return min; } return min; } function getSupportLevel(stream) { const level = supportsColor(stream); return translateLevel(level); } module2.exports = { supportsColor: getSupportLevel, stdout: getSupportLevel(process.stdout), stderr: getSupportLevel(process.stderr) }; } }); // ../../node_modules/debug/src/node.js var require_node3 = __commonJS({ "../../node_modules/debug/src/node.js"(exports2, module2) { var tty = require("tty"); var util = require("util"); exports2.init = init; exports2.log = log; exports2.formatArgs = formatArgs; exports2.save = save; exports2.load = load; exports2.useColors = useColors; exports2.destroy = util.deprecate(() => { }, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); exports2.colors = [6, 2, 3, 4, 5, 1]; try { const supportsColor = require_supports_color(); if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { exports2.colors = [ 20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221 ]; } } catch (error) { } exports2.inspectOpts = Object.keys(process.env).filter((key) => { return /^debug_/i.test(key); }).reduce((obj, key) => { const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { return k.toUpperCase(); }); let val = process.env[key]; if (/^(yes|on|true|enabled)$/i.test(val)) { val = true; } else if (/^(no|off|false|disabled)$/i.test(val)) { val = false; } else if (val === "null") { val = null; } else { val = Number(val); } obj[prop] = val; return obj; }, {}); function useColors() { return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd); } function formatArgs(args) { const { namespace: name, useColors: useColors2 } = this; if (useColors2) { const c = this.color; const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c); const prefix = ` ${colorCode};1m${name} \x1B[0m`; args[0] = prefix + args[0].split("\n").join("\n" + prefix); args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m"); } else { args[0] = getDate() + name + " " + args[0]; } } function getDate() { if (exports2.inspectOpts.hideDate) { return ""; } return new Date().toISOString() + " "; } function log(...args) { return process.stderr.write(util.format(...args) + "\n"); } function save(namespaces) { if (namespaces) { process.env.DEBUG = namespaces; } else { delete process.env.DEBUG; } } function load() { return process.env.DEBUG; } function init(debug) { debug.inspectOpts = {}; const keys = Object.keys(exports2.inspectOpts); for (let i = 0; i < keys.length; i++) { debug.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; } } module2.exports = require_common2()(exports2); var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); }; formatters.O = function(v) { this.inspectOpts.colors = this.useColors; return util.inspect(v, this.inspectOpts); }; } }); // ../../node_modules/debug/src/index.js var require_src5 = __commonJS({ "../../node_modules/debug/src/index.js"(exports2, module2) { if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) { module2.exports = require_browser(); } else { module2.exports = require_node3(); } } }); // node_modules/@babel/traverse/lib/scope/binding.js var require_binding = __commonJS({ "node_modules/@babel/traverse/lib/scope/binding.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var Binding = class { constructor({ identifier, scope, path: path2, kind }) { this.identifier = void 0; this.scope = void 0; this.path = void 0; this.kind = void 0; this.constantViolations = []; this.constant = true; this.referencePaths = []; this.referenced = false; this.references = 0; this.identifier = identifier; this.scope = scope; this.path = path2; this.kind = kind; this.clearValue(); } deoptValue() { this.clearValue(); this.hasDeoptedValue = true; } setValue(value) { if (this.hasDeoptedValue) return; this.hasValue = true; this.value = value; } clearValue() { this.hasDeoptedValue = false; this.hasValue = false; this.value = null; } reassign(path2) { this.constant = false; if (this.constantViolations.indexOf(path2) !== -1) { return; } this.constantViolations.push(path2); } reference(path2) { if (this.referencePaths.indexOf(path2) !== -1) { return; } this.referenced = true; this.references++; this.referencePaths.push(path2); } dereference() { this.references--; this.referenced = !!this.references; } }; exports2.default = Binding; } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/utils/shallowEqual.js var require_shallowEqual2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/utils/shallowEqual.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = shallowEqual; function shallowEqual(actual, expected) { const keys = Object.keys(expected); for (const key of keys) { if (actual[key] !== expected[key]) { return false; } } return true; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/generated/index.js var require_generated6 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/generated/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isAccessor = isAccessor; exports2.isAnyTypeAnnotation = isAnyTypeAnnotation; exports2.isArgumentPlaceholder = isArgumentPlaceholder; exports2.isArrayExpression = isArrayExpression; exports2.isArrayPattern = isArrayPattern; exports2.isArrayTypeAnnotation = isArrayTypeAnnotation; exports2.isArrowFunctionExpression = isArrowFunctionExpression; exports2.isAssignmentExpression = isAssignmentExpression; exports2.isAssignmentPattern = isAssignmentPattern; exports2.isAwaitExpression = isAwaitExpression; exports2.isBigIntLiteral = isBigIntLiteral; exports2.isBinary = isBinary; exports2.isBinaryExpression = isBinaryExpression; exports2.isBindExpression = isBindExpression; exports2.isBlock = isBlock; exports2.isBlockParent = isBlockParent; exports2.isBlockStatement = isBlockStatement; exports2.isBooleanLiteral = isBooleanLiteral; exports2.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation; exports2.isBooleanTypeAnnotation = isBooleanTypeAnnotation; exports2.isBreakStatement = isBreakStatement; exports2.isCallExpression = isCallExpression; exports2.isCatchClause = isCatchClause; exports2.isClass = isClass; exports2.isClassAccessorProperty = isClassAccessorProperty; exports2.isClassBody = isClassBody; exports2.isClassDeclaration = isClassDeclaration; exports2.isClassExpression = isClassExpression; exports2.isClassImplements = isClassImplements; exports2.isClassMethod = isClassMethod; exports2.isClassPrivateMethod = isClassPrivateMethod; exports2.isClassPrivateProperty = isClassPrivateProperty; exports2.isClassProperty = isClassProperty; exports2.isCompletionStatement = isCompletionStatement; exports2.isConditional = isConditional; exports2.isConditionalExpression = isConditionalExpression; exports2.isContinueStatement = isContinueStatement; exports2.isDebuggerStatement = isDebuggerStatement; exports2.isDecimalLiteral = isDecimalLiteral; exports2.isDeclaration = isDeclaration; exports2.isDeclareClass = isDeclareClass; exports2.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration; exports2.isDeclareExportDeclaration = isDeclareExportDeclaration; exports2.isDeclareFunction = isDeclareFunction; exports2.isDeclareInterface = isDeclareInterface; exports2.isDeclareModule = isDeclareModule; exports2.isDeclareModuleExports = isDeclareModuleExports; exports2.isDeclareOpaqueType = isDeclareOpaqueType; exports2.isDeclareTypeAlias = isDeclareTypeAlias; exports2.isDeclareVariable = isDeclareVariable; exports2.isDeclaredPredicate = isDeclaredPredicate; exports2.isDecorator = isDecorator; exports2.isDirective = isDirective; exports2.isDirectiveLiteral = isDirectiveLiteral; exports2.isDoExpression = isDoExpression; exports2.isDoWhileStatement = isDoWhileStatement; exports2.isEmptyStatement = isEmptyStatement; exports2.isEmptyTypeAnnotation = isEmptyTypeAnnotation; exports2.isEnumBody = isEnumBody; exports2.isEnumBooleanBody = isEnumBooleanBody; exports2.isEnumBooleanMember = isEnumBooleanMember; exports2.isEnumDeclaration = isEnumDeclaration; exports2.isEnumDefaultedMember = isEnumDefaultedMember; exports2.isEnumMember = isEnumMember; exports2.isEnumNumberBody = isEnumNumberBody; exports2.isEnumNumberMember = isEnumNumberMember; exports2.isEnumStringBody = isEnumStringBody; exports2.isEnumStringMember = isEnumStringMember; exports2.isEnumSymbolBody = isEnumSymbolBody; exports2.isExistsTypeAnnotation = isExistsTypeAnnotation; exports2.isExportAllDeclaration = isExportAllDeclaration; exports2.isExportDeclaration = isExportDeclaration; exports2.isExportDefaultDeclaration = isExportDefaultDeclaration; exports2.isExportDefaultSpecifier = isExportDefaultSpecifier; exports2.isExportNamedDeclaration = isExportNamedDeclaration; exports2.isExportNamespaceSpecifier = isExportNamespaceSpecifier; exports2.isExportSpecifier = isExportSpecifier; exports2.isExpression = isExpression; exports2.isExpressionStatement = isExpressionStatement; exports2.isExpressionWrapper = isExpressionWrapper; exports2.isFile = isFile; exports2.isFlow = isFlow; exports2.isFlowBaseAnnotation = isFlowBaseAnnotation; exports2.isFlowDeclaration = isFlowDeclaration; exports2.isFlowPredicate = isFlowPredicate; exports2.isFlowType = isFlowType; exports2.isFor = isFor; exports2.isForInStatement = isForInStatement; exports2.isForOfStatement = isForOfStatement; exports2.isForStatement = isForStatement; exports2.isForXStatement = isForXStatement; exports2.isFunction = isFunction; exports2.isFunctionDeclaration = isFunctionDeclaration; exports2.isFunctionExpression = isFunctionExpression; exports2.isFunctionParent = isFunctionParent; exports2.isFunctionTypeAnnotation = isFunctionTypeAnnotation; exports2.isFunctionTypeParam = isFunctionTypeParam; exports2.isGenericTypeAnnotation = isGenericTypeAnnotation; exports2.isIdentifier = isIdentifier; exports2.isIfStatement = isIfStatement; exports2.isImmutable = isImmutable; exports2.isImport = isImport; exports2.isImportAttribute = isImportAttribute; exports2.isImportDeclaration = isImportDeclaration; exports2.isImportDefaultSpecifier = isImportDefaultSpecifier; exports2.isImportNamespaceSpecifier = isImportNamespaceSpecifier; exports2.isImportSpecifier = isImportSpecifier; exports2.isIndexedAccessType = isIndexedAccessType; exports2.isInferredPredicate = isInferredPredicate; exports2.isInterfaceDeclaration = isInterfaceDeclaration; exports2.isInterfaceExtends = isInterfaceExtends; exports2.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation; exports2.isInterpreterDirective = isInterpreterDirective; exports2.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation; exports2.isJSX = isJSX; exports2.isJSXAttribute = isJSXAttribute; exports2.isJSXClosingElement = isJSXClosingElement; exports2.isJSXClosingFragment = isJSXClosingFragment; exports2.isJSXElement = isJSXElement; exports2.isJSXEmptyExpression = isJSXEmptyExpression; exports2.isJSXExpressionContainer = isJSXExpressionContainer; exports2.isJSXFragment = isJSXFragment; exports2.isJSXIdentifier = isJSXIdentifier; exports2.isJSXMemberExpression = isJSXMemberExpression; exports2.isJSXNamespacedName = isJSXNamespacedName; exports2.isJSXOpeningElement = isJSXOpeningElement; exports2.isJSXOpeningFragment = isJSXOpeningFragment; exports2.isJSXSpreadAttribute = isJSXSpreadAttribute; exports2.isJSXSpreadChild = isJSXSpreadChild; exports2.isJSXText = isJSXText; exports2.isLVal = isLVal; exports2.isLabeledStatement = isLabeledStatement; exports2.isLiteral = isLiteral; exports2.isLogicalExpression = isLogicalExpression; exports2.isLoop = isLoop; exports2.isMemberExpression = isMemberExpression; exports2.isMetaProperty = isMetaProperty; exports2.isMethod = isMethod; exports2.isMiscellaneous = isMiscellaneous; exports2.isMixedTypeAnnotation = isMixedTypeAnnotation; exports2.isModuleDeclaration = isModuleDeclaration; exports2.isModuleExpression = isModuleExpression; exports2.isModuleSpecifier = isModuleSpecifier; exports2.isNewExpression = isNewExpression; exports2.isNoop = isNoop; exports2.isNullLiteral = isNullLiteral; exports2.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation; exports2.isNullableTypeAnnotation = isNullableTypeAnnotation; exports2.isNumberLiteral = isNumberLiteral; exports2.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation; exports2.isNumberTypeAnnotation = isNumberTypeAnnotation; exports2.isNumericLiteral = isNumericLiteral; exports2.isObjectExpression = isObjectExpression; exports2.isObjectMember = isObjectMember; exports2.isObjectMethod = isObjectMethod; exports2.isObjectPattern = isObjectPattern; exports2.isObjectProperty = isObjectProperty; exports2.isObjectTypeAnnotation = isObjectTypeAnnotation; exports2.isObjectTypeCallProperty = isObjectTypeCallProperty; exports2.isObjectTypeIndexer = isObjectTypeIndexer; exports2.isObjectTypeInternalSlot = isObjectTypeInternalSlot; exports2.isObjectTypeProperty = isObjectTypeProperty; exports2.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty; exports2.isOpaqueType = isOpaqueType; exports2.isOptionalCallExpression = isOptionalCallExpression; exports2.isOptionalIndexedAccessType = isOptionalIndexedAccessType; exports2.isOptionalMemberExpression = isOptionalMemberExpression; exports2.isParenthesizedExpression = isParenthesizedExpression; exports2.isPattern = isPattern; exports2.isPatternLike = isPatternLike; exports2.isPipelineBareFunction = isPipelineBareFunction; exports2.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference; exports2.isPipelineTopicExpression = isPipelineTopicExpression; exports2.isPlaceholder = isPlaceholder; exports2.isPrivate = isPrivate; exports2.isPrivateName = isPrivateName; exports2.isProgram = isProgram; exports2.isProperty = isProperty; exports2.isPureish = isPureish; exports2.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier; exports2.isRecordExpression = isRecordExpression; exports2.isRegExpLiteral = isRegExpLiteral; exports2.isRegexLiteral = isRegexLiteral; exports2.isRestElement = isRestElement; exports2.isRestProperty = isRestProperty; exports2.isReturnStatement = isReturnStatement; exports2.isScopable = isScopable; exports2.isSequenceExpression = isSequenceExpression; exports2.isSpreadElement = isSpreadElement; exports2.isSpreadProperty = isSpreadProperty; exports2.isStandardized = isStandardized; exports2.isStatement = isStatement; exports2.isStaticBlock = isStaticBlock; exports2.isStringLiteral = isStringLiteral; exports2.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation; exports2.isStringTypeAnnotation = isStringTypeAnnotation; exports2.isSuper = isSuper; exports2.isSwitchCase = isSwitchCase; exports2.isSwitchStatement = isSwitchStatement; exports2.isSymbolTypeAnnotation = isSymbolTypeAnnotation; exports2.isTSAnyKeyword = isTSAnyKeyword; exports2.isTSArrayType = isTSArrayType; exports2.isTSAsExpression = isTSAsExpression; exports2.isTSBaseType = isTSBaseType; exports2.isTSBigIntKeyword = isTSBigIntKeyword; exports2.isTSBooleanKeyword = isTSBooleanKeyword; exports2.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration; exports2.isTSConditionalType = isTSConditionalType; exports2.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration; exports2.isTSConstructorType = isTSConstructorType; exports2.isTSDeclareFunction = isTSDeclareFunction; exports2.isTSDeclareMethod = isTSDeclareMethod; exports2.isTSEntityName = isTSEntityName; exports2.isTSEnumDeclaration = isTSEnumDeclaration; exports2.isTSEnumMember = isTSEnumMember; exports2.isTSExportAssignment = isTSExportAssignment; exports2.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments; exports2.isTSExternalModuleReference = isTSExternalModuleReference; exports2.isTSFunctionType = isTSFunctionType; exports2.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration; exports2.isTSImportType = isTSImportType; exports2.isTSIndexSignature = isTSIndexSignature; exports2.isTSIndexedAccessType = isTSIndexedAccessType; exports2.isTSInferType = isTSInferType; exports2.isTSInterfaceBody = isTSInterfaceBody; exports2.isTSInterfaceDeclaration = isTSInterfaceDeclaration; exports2.isTSIntersectionType = isTSIntersectionType; exports2.isTSIntrinsicKeyword = isTSIntrinsicKeyword; exports2.isTSLiteralType = isTSLiteralType; exports2.isTSMappedType = isTSMappedType; exports2.isTSMethodSignature = isTSMethodSignature; exports2.isTSModuleBlock = isTSModuleBlock; exports2.isTSModuleDeclaration = isTSModuleDeclaration; exports2.isTSNamedTupleMember = isTSNamedTupleMember; exports2.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration; exports2.isTSNeverKeyword = isTSNeverKeyword; exports2.isTSNonNullExpression = isTSNonNullExpression; exports2.isTSNullKeyword = isTSNullKeyword; exports2.isTSNumberKeyword = isTSNumberKeyword; exports2.isTSObjectKeyword = isTSObjectKeyword; exports2.isTSOptionalType = isTSOptionalType; exports2.isTSParameterProperty = isTSParameterProperty; exports2.isTSParenthesizedType = isTSParenthesizedType; exports2.isTSPropertySignature = isTSPropertySignature; exports2.isTSQualifiedName = isTSQualifiedName; exports2.isTSRestType = isTSRestType; exports2.isTSStringKeyword = isTSStringKeyword; exports2.isTSSymbolKeyword = isTSSymbolKeyword; exports2.isTSThisType = isTSThisType; exports2.isTSTupleType = isTSTupleType; exports2.isTSType = isTSType; exports2.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration; exports2.isTSTypeAnnotation = isTSTypeAnnotation; exports2.isTSTypeAssertion = isTSTypeAssertion; exports2.isTSTypeElement = isTSTypeElement; exports2.isTSTypeLiteral = isTSTypeLiteral; exports2.isTSTypeOperator = isTSTypeOperator; exports2.isTSTypeParameter = isTSTypeParameter; exports2.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration; exports2.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation; exports2.isTSTypePredicate = isTSTypePredicate; exports2.isTSTypeQuery = isTSTypeQuery; exports2.isTSTypeReference = isTSTypeReference; exports2.isTSUndefinedKeyword = isTSUndefinedKeyword; exports2.isTSUnionType = isTSUnionType; exports2.isTSUnknownKeyword = isTSUnknownKeyword; exports2.isTSVoidKeyword = isTSVoidKeyword; exports2.isTaggedTemplateExpression = isTaggedTemplateExpression; exports2.isTemplateElement = isTemplateElement; exports2.isTemplateLiteral = isTemplateLiteral; exports2.isTerminatorless = isTerminatorless; exports2.isThisExpression = isThisExpression; exports2.isThisTypeAnnotation = isThisTypeAnnotation; exports2.isThrowStatement = isThrowStatement; exports2.isTopicReference = isTopicReference; exports2.isTryStatement = isTryStatement; exports2.isTupleExpression = isTupleExpression; exports2.isTupleTypeAnnotation = isTupleTypeAnnotation; exports2.isTypeAlias = isTypeAlias; exports2.isTypeAnnotation = isTypeAnnotation; exports2.isTypeCastExpression = isTypeCastExpression; exports2.isTypeParameter = isTypeParameter; exports2.isTypeParameterDeclaration = isTypeParameterDeclaration; exports2.isTypeParameterInstantiation = isTypeParameterInstantiation; exports2.isTypeScript = isTypeScript; exports2.isTypeofTypeAnnotation = isTypeofTypeAnnotation; exports2.isUnaryExpression = isUnaryExpression; exports2.isUnaryLike = isUnaryLike; exports2.isUnionTypeAnnotation = isUnionTypeAnnotation; exports2.isUpdateExpression = isUpdateExpression; exports2.isUserWhitespacable = isUserWhitespacable; exports2.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier; exports2.isVariableDeclaration = isVariableDeclaration; exports2.isVariableDeclarator = isVariableDeclarator; exports2.isVariance = isVariance; exports2.isVoidTypeAnnotation = isVoidTypeAnnotation; exports2.isWhile = isWhile; exports2.isWhileStatement = isWhileStatement; exports2.isWithStatement = isWithStatement; exports2.isYieldExpression = isYieldExpression; var _shallowEqual = require_shallowEqual2(); function isArrayExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ArrayExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isAssignmentExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AssignmentExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBinaryExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BinaryExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isInterpreterDirective(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "InterpreterDirective") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDirective(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Directive") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDirectiveLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DirectiveLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBlockStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BlockStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBreakStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BreakStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isCallExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "CallExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isCatchClause(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "CatchClause") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isConditionalExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ConditionalExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isContinueStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ContinueStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDebuggerStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DebuggerStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDoWhileStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DoWhileStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEmptyStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EmptyStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExpressionStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExpressionStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFile(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "File") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isForInStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ForInStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isForStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ForStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFunctionDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFunctionExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isIdentifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Identifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isIfStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "IfStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isLabeledStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "LabeledStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isStringLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "StringLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNumericLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "NumericLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNullLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "NullLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBooleanLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BooleanLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isRegExpLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "RegExpLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isLogicalExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "LogicalExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isMemberExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "MemberExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNewExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "NewExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isProgram(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Program") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectMethod(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectMethod") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isRestElement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "RestElement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isReturnStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ReturnStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isSequenceExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "SequenceExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isParenthesizedExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ParenthesizedExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isSwitchCase(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "SwitchCase") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isSwitchStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "SwitchStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isThisExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ThisExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isThrowStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ThrowStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTryStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TryStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isUnaryExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "UnaryExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isUpdateExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "UpdateExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isVariableDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "VariableDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isVariableDeclarator(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "VariableDeclarator") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isWhileStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "WhileStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isWithStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "WithStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isAssignmentPattern(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AssignmentPattern") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isArrayPattern(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ArrayPattern") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isArrowFunctionExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ArrowFunctionExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassBody(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassBody") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExportAllDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportAllDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExportDefaultDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportDefaultDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExportNamedDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportNamedDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExportSpecifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportSpecifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isForOfStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ForOfStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isImportDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ImportDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isImportDefaultSpecifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ImportDefaultSpecifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isImportNamespaceSpecifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ImportNamespaceSpecifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isImportSpecifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ImportSpecifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isMetaProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "MetaProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassMethod(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassMethod") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectPattern(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectPattern") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isSpreadElement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "SpreadElement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isSuper(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Super") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTaggedTemplateExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TaggedTemplateExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTemplateElement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TemplateElement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTemplateLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TemplateLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isYieldExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "YieldExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isAwaitExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AwaitExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isImport(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Import") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBigIntLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BigIntLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExportNamespaceSpecifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportNamespaceSpecifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isOptionalMemberExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "OptionalMemberExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isOptionalCallExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "OptionalCallExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassAccessorProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassAccessorProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassPrivateProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassPrivateProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassPrivateMethod(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassPrivateMethod") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPrivateName(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "PrivateName") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isStaticBlock(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "StaticBlock") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isAnyTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AnyTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isArrayTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ArrayTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBooleanTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BooleanTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBooleanLiteralTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BooleanLiteralTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNullLiteralTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "NullLiteralTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassImplements(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassImplements") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareClass(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareClass") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareFunction(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareFunction") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareInterface(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareInterface") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareModule(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareModule") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareModuleExports(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareModuleExports") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareTypeAlias(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareTypeAlias") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareOpaqueType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareOpaqueType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareVariable(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareVariable") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareExportDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareExportDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareExportAllDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareExportAllDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclaredPredicate(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclaredPredicate") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExistsTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExistsTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFunctionTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFunctionTypeParam(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionTypeParam") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isGenericTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "GenericTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isInferredPredicate(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "InferredPredicate") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isInterfaceExtends(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "InterfaceExtends") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isInterfaceDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "InterfaceDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isInterfaceTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "InterfaceTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isIntersectionTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "IntersectionTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isMixedTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "MixedTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEmptyTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EmptyTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNullableTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "NullableTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNumberLiteralTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "NumberLiteralTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNumberTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "NumberTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectTypeInternalSlot(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectTypeInternalSlot") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectTypeCallProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectTypeCallProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectTypeIndexer(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectTypeIndexer") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectTypeProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectTypeProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectTypeSpreadProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectTypeSpreadProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isOpaqueType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "OpaqueType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isQualifiedTypeIdentifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "QualifiedTypeIdentifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isStringLiteralTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "StringLiteralTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isStringTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "StringTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isSymbolTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "SymbolTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isThisTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ThisTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTupleTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TupleTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeofTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TypeofTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeAlias(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TypeAlias") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeCastExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TypeCastExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeParameter(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TypeParameter") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeParameterDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TypeParameterDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeParameterInstantiation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TypeParameterInstantiation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isUnionTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "UnionTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isVariance(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Variance") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isVoidTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "VoidTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumBooleanBody(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumBooleanBody") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumNumberBody(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumNumberBody") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumStringBody(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumStringBody") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumSymbolBody(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumSymbolBody") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumBooleanMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumBooleanMember") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumNumberMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumNumberMember") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumStringMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumStringMember") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumDefaultedMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumDefaultedMember") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isIndexedAccessType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "IndexedAccessType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isOptionalIndexedAccessType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "OptionalIndexedAccessType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXAttribute(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXAttribute") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXClosingElement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXClosingElement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXElement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXElement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXEmptyExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXEmptyExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXExpressionContainer(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXExpressionContainer") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXSpreadChild(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXSpreadChild") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXIdentifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXIdentifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXMemberExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXMemberExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXNamespacedName(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXNamespacedName") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXOpeningElement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXOpeningElement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXSpreadAttribute(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXSpreadAttribute") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXText(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXText") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXFragment(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXFragment") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXOpeningFragment(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXOpeningFragment") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXClosingFragment(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXClosingFragment") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNoop(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Noop") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPlaceholder(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Placeholder") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isV8IntrinsicIdentifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "V8IntrinsicIdentifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isArgumentPlaceholder(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ArgumentPlaceholder") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBindExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BindExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isImportAttribute(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ImportAttribute") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDecorator(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Decorator") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDoExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DoExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExportDefaultSpecifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportDefaultSpecifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isRecordExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "RecordExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTupleExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TupleExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDecimalLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DecimalLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isModuleExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ModuleExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTopicReference(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TopicReference") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPipelineTopicExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "PipelineTopicExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPipelineBareFunction(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "PipelineBareFunction") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPipelinePrimaryTopicReference(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "PipelinePrimaryTopicReference") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSParameterProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSParameterProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSDeclareFunction(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSDeclareFunction") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSDeclareMethod(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSDeclareMethod") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSQualifiedName(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSQualifiedName") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSCallSignatureDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSCallSignatureDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSConstructSignatureDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSConstructSignatureDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSPropertySignature(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSPropertySignature") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSMethodSignature(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSMethodSignature") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSIndexSignature(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSIndexSignature") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSAnyKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSAnyKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSBooleanKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSBooleanKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSBigIntKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSBigIntKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSIntrinsicKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSIntrinsicKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSNeverKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSNeverKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSNullKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSNullKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSNumberKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSNumberKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSObjectKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSObjectKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSStringKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSStringKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSSymbolKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSSymbolKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSUndefinedKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSUndefinedKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSUnknownKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSUnknownKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSVoidKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSVoidKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSThisType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSThisType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSFunctionType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSFunctionType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSConstructorType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSConstructorType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeReference(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeReference") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypePredicate(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypePredicate") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeQuery(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeQuery") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSArrayType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSArrayType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTupleType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTupleType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSOptionalType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSOptionalType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSRestType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSRestType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSNamedTupleMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSNamedTupleMember") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSUnionType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSUnionType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSIntersectionType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSIntersectionType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSConditionalType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSConditionalType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSInferType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSInferType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSParenthesizedType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSParenthesizedType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeOperator(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeOperator") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSIndexedAccessType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSIndexedAccessType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSMappedType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSMappedType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSLiteralType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSLiteralType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSExpressionWithTypeArguments(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSExpressionWithTypeArguments") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSInterfaceDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSInterfaceDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSInterfaceBody(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSInterfaceBody") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeAliasDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeAliasDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSAsExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSAsExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeAssertion(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeAssertion") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSEnumDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSEnumDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSEnumMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSEnumMember") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSModuleDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSModuleDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSModuleBlock(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSModuleBlock") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSImportType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSImportType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSImportEqualsDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSImportEqualsDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSExternalModuleReference(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSExternalModuleReference") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSNonNullExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSNonNullExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSExportAssignment(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSExportAssignment") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSNamespaceExportDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSNamespaceExportDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeParameterInstantiation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeParameterInstantiation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeParameterDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeParameterDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeParameter(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeParameter") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isStandardized(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ArrayExpression" || nodeType === "AssignmentExpression" || nodeType === "BinaryExpression" || nodeType === "InterpreterDirective" || nodeType === "Directive" || nodeType === "DirectiveLiteral" || nodeType === "BlockStatement" || nodeType === "BreakStatement" || nodeType === "CallExpression" || nodeType === "CatchClause" || nodeType === "ConditionalExpression" || nodeType === "ContinueStatement" || nodeType === "DebuggerStatement" || nodeType === "DoWhileStatement" || nodeType === "EmptyStatement" || nodeType === "ExpressionStatement" || nodeType === "File" || nodeType === "ForInStatement" || nodeType === "ForStatement" || nodeType === "FunctionDeclaration" || nodeType === "FunctionExpression" || nodeType === "Identifier" || nodeType === "IfStatement" || nodeType === "LabeledStatement" || nodeType === "StringLiteral" || nodeType === "NumericLiteral" || nodeType === "NullLiteral" || nodeType === "BooleanLiteral" || nodeType === "RegExpLiteral" || nodeType === "LogicalExpression" || nodeType === "MemberExpression" || nodeType === "NewExpression" || nodeType === "Program" || nodeType === "ObjectExpression" || nodeType === "ObjectMethod" || nodeType === "ObjectProperty" || nodeType === "RestElement" || nodeType === "ReturnStatement" || nodeType === "SequenceExpression" || nodeType === "ParenthesizedExpression" || nodeType === "SwitchCase" || nodeType === "SwitchStatement" || nodeType === "ThisExpression" || nodeType === "ThrowStatement" || nodeType === "TryStatement" || nodeType === "UnaryExpression" || nodeType === "UpdateExpression" || nodeType === "VariableDeclaration" || nodeType === "VariableDeclarator" || nodeType === "WhileStatement" || nodeType === "WithStatement" || nodeType === "AssignmentPattern" || nodeType === "ArrayPattern" || nodeType === "ArrowFunctionExpression" || nodeType === "ClassBody" || nodeType === "ClassExpression" || nodeType === "ClassDeclaration" || nodeType === "ExportAllDeclaration" || nodeType === "ExportDefaultDeclaration" || nodeType === "ExportNamedDeclaration" || nodeType === "ExportSpecifier" || nodeType === "ForOfStatement" || nodeType === "ImportDeclaration" || nodeType === "ImportDefaultSpecifier" || nodeType === "ImportNamespaceSpecifier" || nodeType === "ImportSpecifier" || nodeType === "MetaProperty" || nodeType === "ClassMethod" || nodeType === "ObjectPattern" || nodeType === "SpreadElement" || nodeType === "Super" || nodeType === "TaggedTemplateExpression" || nodeType === "TemplateElement" || nodeType === "TemplateLiteral" || nodeType === "YieldExpression" || nodeType === "AwaitExpression" || nodeType === "Import" || nodeType === "BigIntLiteral" || nodeType === "ExportNamespaceSpecifier" || nodeType === "OptionalMemberExpression" || nodeType === "OptionalCallExpression" || nodeType === "ClassProperty" || nodeType === "ClassAccessorProperty" || nodeType === "ClassPrivateProperty" || nodeType === "ClassPrivateMethod" || nodeType === "PrivateName" || nodeType === "StaticBlock" || nodeType === "Placeholder" && (node.expectedNode === "Identifier" || node.expectedNode === "StringLiteral" || node.expectedNode === "BlockStatement" || node.expectedNode === "ClassBody")) { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ArrayExpression" || nodeType === "AssignmentExpression" || nodeType === "BinaryExpression" || nodeType === "CallExpression" || nodeType === "ConditionalExpression" || nodeType === "FunctionExpression" || nodeType === "Identifier" || nodeType === "StringLiteral" || nodeType === "NumericLiteral" || nodeType === "NullLiteral" || nodeType === "BooleanLiteral" || nodeType === "RegExpLiteral" || nodeType === "LogicalExpression" || nodeType === "MemberExpression" || nodeType === "NewExpression" || nodeType === "ObjectExpression" || nodeType === "SequenceExpression" || nodeType === "ParenthesizedExpression" || nodeType === "ThisExpression" || nodeType === "UnaryExpression" || nodeType === "UpdateExpression" || nodeType === "ArrowFunctionExpression" || nodeType === "ClassExpression" || nodeType === "MetaProperty" || nodeType === "Super" || nodeType === "TaggedTemplateExpression" || nodeType === "TemplateLiteral" || nodeType === "YieldExpression" || nodeType === "AwaitExpression" || nodeType === "Import" || nodeType === "BigIntLiteral" || nodeType === "OptionalMemberExpression" || nodeType === "OptionalCallExpression" || nodeType === "TypeCastExpression" || nodeType === "JSXElement" || nodeType === "JSXFragment" || nodeType === "BindExpression" || nodeType === "DoExpression" || nodeType === "RecordExpression" || nodeType === "TupleExpression" || nodeType === "DecimalLiteral" || nodeType === "ModuleExpression" || nodeType === "TopicReference" || nodeType === "PipelineTopicExpression" || nodeType === "PipelineBareFunction" || nodeType === "PipelinePrimaryTopicReference" || nodeType === "TSAsExpression" || nodeType === "TSTypeAssertion" || nodeType === "TSNonNullExpression" || nodeType === "Placeholder" && (node.expectedNode === "Expression" || node.expectedNode === "Identifier" || node.expectedNode === "StringLiteral")) { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBinary(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BinaryExpression" || nodeType === "LogicalExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isScopable(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BlockStatement" || nodeType === "CatchClause" || nodeType === "DoWhileStatement" || nodeType === "ForInStatement" || nodeType === "ForStatement" || nodeType === "FunctionDeclaration" || nodeType === "FunctionExpression" || nodeType === "Program" || nodeType === "ObjectMethod" || nodeType === "SwitchStatement" || nodeType === "WhileStatement" || nodeType === "ArrowFunctionExpression" || nodeType === "ClassExpression" || nodeType === "ClassDeclaration" || nodeType === "ForOfStatement" || nodeType === "ClassMethod" || nodeType === "ClassPrivateMethod" || nodeType === "StaticBlock" || nodeType === "TSModuleBlock" || nodeType === "Placeholder" && node.expectedNode === "BlockStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBlockParent(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BlockStatement" || nodeType === "CatchClause" || nodeType === "DoWhileStatement" || nodeType === "ForInStatement" || nodeType === "ForStatement" || nodeType === "FunctionDeclaration" || nodeType === "FunctionExpression" || nodeType === "Program" || nodeType === "ObjectMethod" || nodeType === "SwitchStatement" || nodeType === "WhileStatement" || nodeType === "ArrowFunctionExpression" || nodeType === "ForOfStatement" || nodeType === "ClassMethod" || nodeType === "ClassPrivateMethod" || nodeType === "StaticBlock" || nodeType === "TSModuleBlock" || nodeType === "Placeholder" && node.expectedNode === "BlockStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBlock(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BlockStatement" || nodeType === "Program" || nodeType === "TSModuleBlock" || nodeType === "Placeholder" && node.expectedNode === "BlockStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BlockStatement" || nodeType === "BreakStatement" || nodeType === "ContinueStatement" || nodeType === "DebuggerStatement" || nodeType === "DoWhileStatement" || nodeType === "EmptyStatement" || nodeType === "ExpressionStatement" || nodeType === "ForInStatement" || nodeType === "ForStatement" || nodeType === "FunctionDeclaration" || nodeType === "IfStatement" || nodeType === "LabeledStatement" || nodeType === "ReturnStatement" || nodeType === "SwitchStatement" || nodeType === "ThrowStatement" || nodeType === "TryStatement" || nodeType === "VariableDeclaration" || nodeType === "WhileStatement" || nodeType === "WithStatement" || nodeType === "ClassDeclaration" || nodeType === "ExportAllDeclaration" || nodeType === "ExportDefaultDeclaration" || nodeType === "ExportNamedDeclaration" || nodeType === "ForOfStatement" || nodeType === "ImportDeclaration" || nodeType === "DeclareClass" || nodeType === "DeclareFunction" || nodeType === "DeclareInterface" || nodeType === "DeclareModule" || nodeType === "DeclareModuleExports" || nodeType === "DeclareTypeAlias" || nodeType === "DeclareOpaqueType" || nodeType === "DeclareVariable" || nodeType === "DeclareExportDeclaration" || nodeType === "DeclareExportAllDeclaration" || nodeType === "InterfaceDeclaration" || nodeType === "OpaqueType" || nodeType === "TypeAlias" || nodeType === "EnumDeclaration" || nodeType === "TSDeclareFunction" || nodeType === "TSInterfaceDeclaration" || nodeType === "TSTypeAliasDeclaration" || nodeType === "TSEnumDeclaration" || nodeType === "TSModuleDeclaration" || nodeType === "TSImportEqualsDeclaration" || nodeType === "TSExportAssignment" || nodeType === "TSNamespaceExportDeclaration" || nodeType === "Placeholder" && (node.expectedNode === "Statement" || node.expectedNode === "Declaration" || node.expectedNode === "BlockStatement")) { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTerminatorless(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BreakStatement" || nodeType === "ContinueStatement" || nodeType === "ReturnStatement" || nodeType === "ThrowStatement" || nodeType === "YieldExpression" || nodeType === "AwaitExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isCompletionStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BreakStatement" || nodeType === "ContinueStatement" || nodeType === "ReturnStatement" || nodeType === "ThrowStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isConditional(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ConditionalExpression" || nodeType === "IfStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isLoop(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DoWhileStatement" || nodeType === "ForInStatement" || nodeType === "ForStatement" || nodeType === "WhileStatement" || nodeType === "ForOfStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isWhile(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DoWhileStatement" || nodeType === "WhileStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExpressionWrapper(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExpressionStatement" || nodeType === "ParenthesizedExpression" || nodeType === "TypeCastExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFor(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ForInStatement" || nodeType === "ForStatement" || nodeType === "ForOfStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isForXStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ForInStatement" || nodeType === "ForOfStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFunction(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionDeclaration" || nodeType === "FunctionExpression" || nodeType === "ObjectMethod" || nodeType === "ArrowFunctionExpression" || nodeType === "ClassMethod" || nodeType === "ClassPrivateMethod") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFunctionParent(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionDeclaration" || nodeType === "FunctionExpression" || nodeType === "ObjectMethod" || nodeType === "ArrowFunctionExpression" || nodeType === "ClassMethod" || nodeType === "ClassPrivateMethod" || nodeType === "StaticBlock") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPureish(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionDeclaration" || nodeType === "FunctionExpression" || nodeType === "StringLiteral" || nodeType === "NumericLiteral" || nodeType === "NullLiteral" || nodeType === "BooleanLiteral" || nodeType === "RegExpLiteral" || nodeType === "ArrowFunctionExpression" || nodeType === "BigIntLiteral" || nodeType === "DecimalLiteral" || nodeType === "Placeholder" && node.expectedNode === "StringLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionDeclaration" || nodeType === "VariableDeclaration" || nodeType === "ClassDeclaration" || nodeType === "ExportAllDeclaration" || nodeType === "ExportDefaultDeclaration" || nodeType === "ExportNamedDeclaration" || nodeType === "ImportDeclaration" || nodeType === "DeclareClass" || nodeType === "DeclareFunction" || nodeType === "DeclareInterface" || nodeType === "DeclareModule" || nodeType === "DeclareModuleExports" || nodeType === "DeclareTypeAlias" || nodeType === "DeclareOpaqueType" || nodeType === "DeclareVariable" || nodeType === "DeclareExportDeclaration" || nodeType === "DeclareExportAllDeclaration" || nodeType === "InterfaceDeclaration" || nodeType === "OpaqueType" || nodeType === "TypeAlias" || nodeType === "EnumDeclaration" || nodeType === "TSDeclareFunction" || nodeType === "TSInterfaceDeclaration" || nodeType === "TSTypeAliasDeclaration" || nodeType === "TSEnumDeclaration" || nodeType === "TSModuleDeclaration" || nodeType === "Placeholder" && node.expectedNode === "Declaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPatternLike(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Identifier" || nodeType === "RestElement" || nodeType === "AssignmentPattern" || nodeType === "ArrayPattern" || nodeType === "ObjectPattern" || nodeType === "Placeholder" && (node.expectedNode === "Pattern" || node.expectedNode === "Identifier")) { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isLVal(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Identifier" || nodeType === "MemberExpression" || nodeType === "RestElement" || nodeType === "AssignmentPattern" || nodeType === "ArrayPattern" || nodeType === "ObjectPattern" || nodeType === "TSParameterProperty" || nodeType === "Placeholder" && (node.expectedNode === "Pattern" || node.expectedNode === "Identifier")) { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSEntityName(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Identifier" || nodeType === "TSQualifiedName" || nodeType === "Placeholder" && node.expectedNode === "Identifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "StringLiteral" || nodeType === "NumericLiteral" || nodeType === "NullLiteral" || nodeType === "BooleanLiteral" || nodeType === "RegExpLiteral" || nodeType === "TemplateLiteral" || nodeType === "BigIntLiteral" || nodeType === "DecimalLiteral" || nodeType === "Placeholder" && node.expectedNode === "StringLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isImmutable(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "StringLiteral" || nodeType === "NumericLiteral" || nodeType === "NullLiteral" || nodeType === "BooleanLiteral" || nodeType === "BigIntLiteral" || nodeType === "JSXAttribute" || nodeType === "JSXClosingElement" || nodeType === "JSXElement" || nodeType === "JSXExpressionContainer" || nodeType === "JSXSpreadChild" || nodeType === "JSXOpeningElement" || nodeType === "JSXText" || nodeType === "JSXFragment" || nodeType === "JSXOpeningFragment" || nodeType === "JSXClosingFragment" || nodeType === "DecimalLiteral" || nodeType === "Placeholder" && node.expectedNode === "StringLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isUserWhitespacable(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectMethod" || nodeType === "ObjectProperty" || nodeType === "ObjectTypeInternalSlot" || nodeType === "ObjectTypeCallProperty" || nodeType === "ObjectTypeIndexer" || nodeType === "ObjectTypeProperty" || nodeType === "ObjectTypeSpreadProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isMethod(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectMethod" || nodeType === "ClassMethod" || nodeType === "ClassPrivateMethod") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectMethod" || nodeType === "ObjectProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectProperty" || nodeType === "ClassProperty" || nodeType === "ClassAccessorProperty" || nodeType === "ClassPrivateProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isUnaryLike(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "UnaryExpression" || nodeType === "SpreadElement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPattern(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AssignmentPattern" || nodeType === "ArrayPattern" || nodeType === "ObjectPattern" || nodeType === "Placeholder" && node.expectedNode === "Pattern") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClass(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassExpression" || nodeType === "ClassDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isModuleDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportAllDeclaration" || nodeType === "ExportDefaultDeclaration" || nodeType === "ExportNamedDeclaration" || nodeType === "ImportDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExportDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportAllDeclaration" || nodeType === "ExportDefaultDeclaration" || nodeType === "ExportNamedDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isModuleSpecifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportSpecifier" || nodeType === "ImportDefaultSpecifier" || nodeType === "ImportNamespaceSpecifier" || nodeType === "ImportSpecifier" || nodeType === "ExportNamespaceSpecifier" || nodeType === "ExportDefaultSpecifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isAccessor(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassAccessorProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPrivate(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassPrivateProperty" || nodeType === "ClassPrivateMethod" || nodeType === "PrivateName") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFlow(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AnyTypeAnnotation" || nodeType === "ArrayTypeAnnotation" || nodeType === "BooleanTypeAnnotation" || nodeType === "BooleanLiteralTypeAnnotation" || nodeType === "NullLiteralTypeAnnotation" || nodeType === "ClassImplements" || nodeType === "DeclareClass" || nodeType === "DeclareFunction" || nodeType === "DeclareInterface" || nodeType === "DeclareModule" || nodeType === "DeclareModuleExports" || nodeType === "DeclareTypeAlias" || nodeType === "DeclareOpaqueType" || nodeType === "DeclareVariable" || nodeType === "DeclareExportDeclaration" || nodeType === "DeclareExportAllDeclaration" || nodeType === "DeclaredPredicate" || nodeType === "ExistsTypeAnnotation" || nodeType === "FunctionTypeAnnotation" || nodeType === "FunctionTypeParam" || nodeType === "GenericTypeAnnotation" || nodeType === "InferredPredicate" || nodeType === "InterfaceExtends" || nodeType === "InterfaceDeclaration" || nodeType === "InterfaceTypeAnnotation" || nodeType === "IntersectionTypeAnnotation" || nodeType === "MixedTypeAnnotation" || nodeType === "EmptyTypeAnnotation" || nodeType === "NullableTypeAnnotation" || nodeType === "NumberLiteralTypeAnnotation" || nodeType === "NumberTypeAnnotation" || nodeType === "ObjectTypeAnnotation" || nodeType === "ObjectTypeInternalSlot" || nodeType === "ObjectTypeCallProperty" || nodeType === "ObjectTypeIndexer" || nodeType === "ObjectTypeProperty" || nodeType === "ObjectTypeSpreadProperty" || nodeType === "OpaqueType" || nodeType === "QualifiedTypeIdentifier" || nodeType === "StringLiteralTypeAnnotation" || nodeType === "StringTypeAnnotation" || nodeType === "SymbolTypeAnnotation" || nodeType === "ThisTypeAnnotation" || nodeType === "TupleTypeAnnotation" || nodeType === "TypeofTypeAnnotation" || nodeType === "TypeAlias" || nodeType === "TypeAnnotation" || nodeType === "TypeCastExpression" || nodeType === "TypeParameter" || nodeType === "TypeParameterDeclaration" || nodeType === "TypeParameterInstantiation" || nodeType === "UnionTypeAnnotation" || nodeType === "Variance" || nodeType === "VoidTypeAnnotation" || nodeType === "EnumDeclaration" || nodeType === "EnumBooleanBody" || nodeType === "EnumNumberBody" || nodeType === "EnumStringBody" || nodeType === "EnumSymbolBody" || nodeType === "EnumBooleanMember" || nodeType === "EnumNumberMember" || nodeType === "EnumStringMember" || nodeType === "EnumDefaultedMember" || nodeType === "IndexedAccessType" || nodeType === "OptionalIndexedAccessType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFlowType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AnyTypeAnnotation" || nodeType === "ArrayTypeAnnotation" || nodeType === "BooleanTypeAnnotation" || nodeType === "BooleanLiteralTypeAnnotation" || nodeType === "NullLiteralTypeAnnotation" || nodeType === "ExistsTypeAnnotation" || nodeType === "FunctionTypeAnnotation" || nodeType === "GenericTypeAnnotation" || nodeType === "InterfaceTypeAnnotation" || nodeType === "IntersectionTypeAnnotation" || nodeType === "MixedTypeAnnotation" || nodeType === "EmptyTypeAnnotation" || nodeType === "NullableTypeAnnotation" || nodeType === "NumberLiteralTypeAnnotation" || nodeType === "NumberTypeAnnotation" || nodeType === "ObjectTypeAnnotation" || nodeType === "StringLiteralTypeAnnotation" || nodeType === "StringTypeAnnotation" || nodeType === "SymbolTypeAnnotation" || nodeType === "ThisTypeAnnotation" || nodeType === "TupleTypeAnnotation" || nodeType === "TypeofTypeAnnotation" || nodeType === "UnionTypeAnnotation" || nodeType === "VoidTypeAnnotation" || nodeType === "IndexedAccessType" || nodeType === "OptionalIndexedAccessType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFlowBaseAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AnyTypeAnnotation" || nodeType === "BooleanTypeAnnotation" || nodeType === "NullLiteralTypeAnnotation" || nodeType === "MixedTypeAnnotation" || nodeType === "EmptyTypeAnnotation" || nodeType === "NumberTypeAnnotation" || nodeType === "StringTypeAnnotation" || nodeType === "SymbolTypeAnnotation" || nodeType === "ThisTypeAnnotation" || nodeType === "VoidTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFlowDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareClass" || nodeType === "DeclareFunction" || nodeType === "DeclareInterface" || nodeType === "DeclareModule" || nodeType === "DeclareModuleExports" || nodeType === "DeclareTypeAlias" || nodeType === "DeclareOpaqueType" || nodeType === "DeclareVariable" || nodeType === "DeclareExportDeclaration" || nodeType === "DeclareExportAllDeclaration" || nodeType === "InterfaceDeclaration" || nodeType === "OpaqueType" || nodeType === "TypeAlias") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFlowPredicate(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclaredPredicate" || nodeType === "InferredPredicate") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumBody(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumBooleanBody" || nodeType === "EnumNumberBody" || nodeType === "EnumStringBody" || nodeType === "EnumSymbolBody") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumBooleanMember" || nodeType === "EnumNumberMember" || nodeType === "EnumStringMember" || nodeType === "EnumDefaultedMember") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSX(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXAttribute" || nodeType === "JSXClosingElement" || nodeType === "JSXElement" || nodeType === "JSXEmptyExpression" || nodeType === "JSXExpressionContainer" || nodeType === "JSXSpreadChild" || nodeType === "JSXIdentifier" || nodeType === "JSXMemberExpression" || nodeType === "JSXNamespacedName" || nodeType === "JSXOpeningElement" || nodeType === "JSXSpreadAttribute" || nodeType === "JSXText" || nodeType === "JSXFragment" || nodeType === "JSXOpeningFragment" || nodeType === "JSXClosingFragment") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isMiscellaneous(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Noop" || nodeType === "Placeholder" || nodeType === "V8IntrinsicIdentifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeScript(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSParameterProperty" || nodeType === "TSDeclareFunction" || nodeType === "TSDeclareMethod" || nodeType === "TSQualifiedName" || nodeType === "TSCallSignatureDeclaration" || nodeType === "TSConstructSignatureDeclaration" || nodeType === "TSPropertySignature" || nodeType === "TSMethodSignature" || nodeType === "TSIndexSignature" || nodeType === "TSAnyKeyword" || nodeType === "TSBooleanKeyword" || nodeType === "TSBigIntKeyword" || nodeType === "TSIntrinsicKeyword" || nodeType === "TSNeverKeyword" || nodeType === "TSNullKeyword" || nodeType === "TSNumberKeyword" || nodeType === "TSObjectKeyword" || nodeType === "TSStringKeyword" || nodeType === "TSSymbolKeyword" || nodeType === "TSUndefinedKeyword" || nodeType === "TSUnknownKeyword" || nodeType === "TSVoidKeyword" || nodeType === "TSThisType" || nodeType === "TSFunctionType" || nodeType === "TSConstructorType" || nodeType === "TSTypeReference" || nodeType === "TSTypePredicate" || nodeType === "TSTypeQuery" || nodeType === "TSTypeLiteral" || nodeType === "TSArrayType" || nodeType === "TSTupleType" || nodeType === "TSOptionalType" || nodeType === "TSRestType" || nodeType === "TSNamedTupleMember" || nodeType === "TSUnionType" || nodeType === "TSIntersectionType" || nodeType === "TSConditionalType" || nodeType === "TSInferType" || nodeType === "TSParenthesizedType" || nodeType === "TSTypeOperator" || nodeType === "TSIndexedAccessType" || nodeType === "TSMappedType" || nodeType === "TSLiteralType" || nodeType === "TSExpressionWithTypeArguments" || nodeType === "TSInterfaceDeclaration" || nodeType === "TSInterfaceBody" || nodeType === "TSTypeAliasDeclaration" || nodeType === "TSAsExpression" || nodeType === "TSTypeAssertion" || nodeType === "TSEnumDeclaration" || nodeType === "TSEnumMember" || nodeType === "TSModuleDeclaration" || nodeType === "TSModuleBlock" || nodeType === "TSImportType" || nodeType === "TSImportEqualsDeclaration" || nodeType === "TSExternalModuleReference" || nodeType === "TSNonNullExpression" || nodeType === "TSExportAssignment" || nodeType === "TSNamespaceExportDeclaration" || nodeType === "TSTypeAnnotation" || nodeType === "TSTypeParameterInstantiation" || nodeType === "TSTypeParameterDeclaration" || nodeType === "TSTypeParameter") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeElement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSCallSignatureDeclaration" || nodeType === "TSConstructSignatureDeclaration" || nodeType === "TSPropertySignature" || nodeType === "TSMethodSignature" || nodeType === "TSIndexSignature") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSAnyKeyword" || nodeType === "TSBooleanKeyword" || nodeType === "TSBigIntKeyword" || nodeType === "TSIntrinsicKeyword" || nodeType === "TSNeverKeyword" || nodeType === "TSNullKeyword" || nodeType === "TSNumberKeyword" || nodeType === "TSObjectKeyword" || nodeType === "TSStringKeyword" || nodeType === "TSSymbolKeyword" || nodeType === "TSUndefinedKeyword" || nodeType === "TSUnknownKeyword" || nodeType === "TSVoidKeyword" || nodeType === "TSThisType" || nodeType === "TSFunctionType" || nodeType === "TSConstructorType" || nodeType === "TSTypeReference" || nodeType === "TSTypePredicate" || nodeType === "TSTypeQuery" || nodeType === "TSTypeLiteral" || nodeType === "TSArrayType" || nodeType === "TSTupleType" || nodeType === "TSOptionalType" || nodeType === "TSRestType" || nodeType === "TSUnionType" || nodeType === "TSIntersectionType" || nodeType === "TSConditionalType" || nodeType === "TSInferType" || nodeType === "TSParenthesizedType" || nodeType === "TSTypeOperator" || nodeType === "TSIndexedAccessType" || nodeType === "TSMappedType" || nodeType === "TSLiteralType" || nodeType === "TSExpressionWithTypeArguments" || nodeType === "TSImportType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSBaseType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSAnyKeyword" || nodeType === "TSBooleanKeyword" || nodeType === "TSBigIntKeyword" || nodeType === "TSIntrinsicKeyword" || nodeType === "TSNeverKeyword" || nodeType === "TSNullKeyword" || nodeType === "TSNumberKeyword" || nodeType === "TSObjectKeyword" || nodeType === "TSStringKeyword" || nodeType === "TSSymbolKeyword" || nodeType === "TSUndefinedKeyword" || nodeType === "TSUnknownKeyword" || nodeType === "TSVoidKeyword" || nodeType === "TSThisType" || nodeType === "TSLiteralType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNumberLiteral(node, opts) { console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); if (!node) return false; const nodeType = node.type; if (nodeType === "NumberLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isRegexLiteral(node, opts) { console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); if (!node) return false; const nodeType = node.type; if (nodeType === "RegexLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isRestProperty(node, opts) { console.trace("The node type RestProperty has been renamed to RestElement"); if (!node) return false; const nodeType = node.type; if (nodeType === "RestProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isSpreadProperty(node, opts) { console.trace("The node type SpreadProperty has been renamed to SpreadElement"); if (!node) return false; const nodeType = node.type; if (nodeType === "SpreadProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/matchesPattern.js var require_matchesPattern2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/matchesPattern.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = matchesPattern; var _generated = require_generated6(); function matchesPattern(member, match, allowPartial) { if (!(0, _generated.isMemberExpression)(member)) return false; const parts = Array.isArray(match) ? match : match.split("."); const nodes = []; let node; for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) { nodes.push(node.property); } nodes.push(node); if (nodes.length < parts.length) return false; if (!allowPartial && nodes.length > parts.length) return false; for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) { const node2 = nodes[j]; let value; if ((0, _generated.isIdentifier)(node2)) { value = node2.name; } else if ((0, _generated.isStringLiteral)(node2)) { value = node2.value; } else if ((0, _generated.isThisExpression)(node2)) { value = "this"; } else { return false; } if (parts[i] !== value) return false; } return true; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js var require_buildMatchMemberExpression2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = buildMatchMemberExpression; var _matchesPattern = require_matchesPattern2(); function buildMatchMemberExpression(match, allowPartial) { const parts = match.split("."); return (member) => (0, _matchesPattern.default)(member, parts, allowPartial); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/react/isReactComponent.js var require_isReactComponent2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/react/isReactComponent.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var _buildMatchMemberExpression = require_buildMatchMemberExpression2(); var isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component"); var _default = isReactComponent; exports2.default = _default; } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/react/isCompatTag.js var require_isCompatTag2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/react/isCompatTag.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isCompatTag; function isCompatTag(tagName) { return !!tagName && /^[a-z]/.test(tagName); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isType.js var require_isType2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isType.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isType; var _definitions = require_definitions2(); function isType(nodeType, targetType) { if (nodeType === targetType) return true; if (_definitions.ALIAS_KEYS[targetType]) return false; const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType]; if (aliases) { if (aliases[0] === nodeType) return true; for (const alias of aliases) { if (nodeType === alias) return true; } } return false; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isPlaceholderType.js var require_isPlaceholderType2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isPlaceholderType.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isPlaceholderType; var _definitions = require_definitions2(); function isPlaceholderType(placeholderType, targetType) { if (placeholderType === targetType) return true; const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType]; if (aliases) { for (const alias of aliases) { if (targetType === alias) return true; } } return false; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/is.js var require_is2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/is.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = is; var _shallowEqual = require_shallowEqual2(); var _isType = require_isType2(); var _isPlaceholderType = require_isPlaceholderType2(); var _definitions = require_definitions2(); function is(type, node, opts) { if (!node) return false; const matches = (0, _isType.default)(node.type, type); if (!matches) { if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) { return (0, _isPlaceholderType.default)(node.expectedNode, type); } return false; } if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/helper-validator-identifier/lib/identifier.js var require_identifier2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isIdentifierChar = isIdentifierChar; exports2.isIdentifierName = isIdentifierName; exports2.isIdentifierStart = isIdentifierStart; var nonASCIIidentifierStartChars = "\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"; var nonASCIIidentifierChars = "\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\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-\u0ECD\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\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\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"; var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; var astralIdentifierStartCodes = [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, 85, 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, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 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, 46, 2, 18, 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, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 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, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938]; var astralIdentifierCodes = [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, 154, 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, 161, 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, 19306, 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, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; function isInAstralSet(code, set) { let pos = 65536; for (let i = 0, length = set.length; i < length; i += 2) { pos += set[i]; if (pos > code) return false; pos += set[i + 1]; if (pos >= code) return true; } return false; } function isIdentifierStart(code) { if (code < 65) return code === 36; if (code <= 90) return true; if (code < 97) return code === 95; if (code <= 122) return true; if (code <= 65535) { return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code)); } return isInAstralSet(code, astralIdentifierStartCodes); } function isIdentifierChar(code) { if (code < 48) return code === 36; if (code < 58) return true; if (code < 65) return false; if (code <= 90) return true; if (code < 97) return code === 95; if (code <= 122) return true; if (code <= 65535) { return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code)); } return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); } function isIdentifierName(name) { let isFirst = true; for (let i = 0; i < name.length; i++) { let cp = name.charCodeAt(i); if ((cp & 64512) === 55296 && i + 1 < name.length) { const trail = name.charCodeAt(++i); if ((trail & 64512) === 56320) { cp = 65536 + ((cp & 1023) << 10) + (trail & 1023); } } if (isFirst) { isFirst = false; if (!isIdentifierStart(cp)) { return false; } } else if (!isIdentifierChar(cp)) { return false; } } return !isFirst; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/helper-validator-identifier/lib/keyword.js var require_keyword2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isKeyword = isKeyword; exports2.isReservedWord = isReservedWord; exports2.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord; exports2.isStrictBindReservedWord = isStrictBindReservedWord; exports2.isStrictReservedWord = isStrictReservedWord; var reservedWords = { 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"] }; var keywords = new Set(reservedWords.keyword); var reservedWordsStrictSet = new Set(reservedWords.strict); var reservedWordsStrictBindSet = new Set(reservedWords.strictBind); function isReservedWord(word, inModule) { return inModule && word === "await" || word === "enum"; } function isStrictReservedWord(word, inModule) { return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); } function isStrictBindOnlyReservedWord(word) { return reservedWordsStrictBindSet.has(word); } function isStrictBindReservedWord(word, inModule) { return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); } function isKeyword(word) { return keywords.has(word); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/helper-validator-identifier/lib/index.js var require_lib5 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "isIdentifierChar", { enumerable: true, get: function() { return _identifier.isIdentifierChar; } }); Object.defineProperty(exports2, "isIdentifierName", { enumerable: true, get: function() { return _identifier.isIdentifierName; } }); Object.defineProperty(exports2, "isIdentifierStart", { enumerable: true, get: function() { return _identifier.isIdentifierStart; } }); Object.defineProperty(exports2, "isKeyword", { enumerable: true, get: function() { return _keyword.isKeyword; } }); Object.defineProperty(exports2, "isReservedWord", { enumerable: true, get: function() { return _keyword.isReservedWord; } }); Object.defineProperty(exports2, "isStrictBindOnlyReservedWord", { enumerable: true, get: function() { return _keyword.isStrictBindOnlyReservedWord; } }); Object.defineProperty(exports2, "isStrictBindReservedWord", { enumerable: true, get: function() { return _keyword.isStrictBindReservedWord; } }); Object.defineProperty(exports2, "isStrictReservedWord", { enumerable: true, get: function() { return _keyword.isStrictReservedWord; } }); var _identifier = require_identifier2(); var _keyword = require_keyword2(); } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isValidIdentifier.js var require_isValidIdentifier2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isValidIdentifier.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isValidIdentifier; var _helperValidatorIdentifier = require_lib5(); function isValidIdentifier(name, reserved = true) { if (typeof name !== "string") return false; if (reserved) { if ((0, _helperValidatorIdentifier.isKeyword)(name) || (0, _helperValidatorIdentifier.isStrictReservedWord)(name, true)) { return false; } } return (0, _helperValidatorIdentifier.isIdentifierName)(name); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/constants/index.js var require_constants3 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/constants/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UPDATE_OPERATORS = exports2.UNARY_OPERATORS = exports2.STRING_UNARY_OPERATORS = exports2.STATEMENT_OR_BLOCK_KEYS = exports2.NUMBER_UNARY_OPERATORS = exports2.NUMBER_BINARY_OPERATORS = exports2.NOT_LOCAL_BINDING = exports2.LOGICAL_OPERATORS = exports2.INHERIT_KEYS = exports2.FOR_INIT_KEYS = exports2.FLATTENABLE_KEYS = exports2.EQUALITY_BINARY_OPERATORS = exports2.COMPARISON_BINARY_OPERATORS = exports2.COMMENT_KEYS = exports2.BOOLEAN_UNARY_OPERATORS = exports2.BOOLEAN_NUMBER_BINARY_OPERATORS = exports2.BOOLEAN_BINARY_OPERATORS = exports2.BLOCK_SCOPED_SYMBOL = exports2.BINARY_OPERATORS = exports2.ASSIGNMENT_OPERATORS = void 0; var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"]; exports2.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS; var FLATTENABLE_KEYS = ["body", "expressions"]; exports2.FLATTENABLE_KEYS = FLATTENABLE_KEYS; var FOR_INIT_KEYS = ["left", "init"]; exports2.FOR_INIT_KEYS = FOR_INIT_KEYS; var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"]; exports2.COMMENT_KEYS = COMMENT_KEYS; var LOGICAL_OPERATORS = ["||", "&&", "??"]; exports2.LOGICAL_OPERATORS = LOGICAL_OPERATORS; var UPDATE_OPERATORS = ["++", "--"]; exports2.UPDATE_OPERATORS = UPDATE_OPERATORS; var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="]; exports2.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS; var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="]; exports2.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS; var COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"]; exports2.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS; var BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS]; exports2.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS; var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"]; exports2.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS; var BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS]; exports2.BINARY_OPERATORS = BINARY_OPERATORS; var ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map((op) => op + "="), ...LOGICAL_OPERATORS.map((op) => op + "=")]; exports2.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS; var BOOLEAN_UNARY_OPERATORS = ["delete", "!"]; exports2.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS; var NUMBER_UNARY_OPERATORS = ["+", "-", "~"]; exports2.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS; var STRING_UNARY_OPERATORS = ["typeof"]; exports2.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS; var UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS]; exports2.UNARY_OPERATORS = UNARY_OPERATORS; var INHERIT_KEYS = { optional: ["typeAnnotation", "typeParameters", "returnType"], force: ["start", "loc", "end"] }; exports2.INHERIT_KEYS = INHERIT_KEYS; var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped"); exports2.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL; var NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding"); exports2.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING; } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/validate.js var require_validate2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/validate.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = validate; exports2.validateChild = validateChild; exports2.validateField = validateField; var _definitions = require_definitions2(); function validate(node, key, val) { if (!node) return; const fields = _definitions.NODE_FIELDS[node.type]; if (!fields) return; const field = fields[key]; validateField(node, key, val, field); validateChild(node, key, val); } function validateField(node, key, val, field) { if (!(field != null && field.validate)) return; if (field.optional && val == null) return; field.validate(node, key, val); } function validateChild(node, key, val) { if (val == null) return; const validate2 = _definitions.NODE_PARENT_VALIDATIONS[val.type]; if (!validate2) return; validate2(node, key, val); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/utils.js var require_utils4 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.VISITOR_KEYS = exports2.NODE_PARENT_VALIDATIONS = exports2.NODE_FIELDS = exports2.FLIPPED_ALIAS_KEYS = exports2.DEPRECATED_KEYS = exports2.BUILDER_KEYS = exports2.ALIAS_KEYS = void 0; exports2.arrayOf = arrayOf; exports2.arrayOfType = arrayOfType; exports2.assertEach = assertEach; exports2.assertNodeOrValueType = assertNodeOrValueType; exports2.assertNodeType = assertNodeType; exports2.assertOneOf = assertOneOf; exports2.assertOptionalChainStart = assertOptionalChainStart; exports2.assertShape = assertShape; exports2.assertValueType = assertValueType; exports2.chain = chain; exports2.default = defineType; exports2.defineAliasedType = defineAliasedType; exports2.typeIs = typeIs; exports2.validate = validate; exports2.validateArrayOfType = validateArrayOfType; exports2.validateOptional = validateOptional; exports2.validateOptionalType = validateOptionalType; exports2.validateType = validateType; var _is = require_is2(); var _validate = require_validate2(); var VISITOR_KEYS = {}; exports2.VISITOR_KEYS = VISITOR_KEYS; var ALIAS_KEYS = {}; exports2.ALIAS_KEYS = ALIAS_KEYS; var FLIPPED_ALIAS_KEYS = {}; exports2.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS; var NODE_FIELDS = {}; exports2.NODE_FIELDS = NODE_FIELDS; var BUILDER_KEYS = {}; exports2.BUILDER_KEYS = BUILDER_KEYS; var DEPRECATED_KEYS = {}; exports2.DEPRECATED_KEYS = DEPRECATED_KEYS; var NODE_PARENT_VALIDATIONS = {}; exports2.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS; function getType(val) { if (Array.isArray(val)) { return "array"; } else if (val === null) { return "null"; } else { return typeof val; } } function validate(validate2) { return { validate: validate2 }; } function typeIs(typeName) { return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName); } function validateType(typeName) { return validate(typeIs(typeName)); } function validateOptional(validate2) { return { validate: validate2, optional: true }; } function validateOptionalType(typeName) { return { validate: typeIs(typeName), optional: true }; } function arrayOf(elementType) { return chain(assertValueType("array"), assertEach(elementType)); } function arrayOfType(typeName) { return arrayOf(typeIs(typeName)); } function validateArrayOfType(typeName) { return validate(arrayOfType(typeName)); } function assertEach(callback) { function validator(node, key, val) { if (!Array.isArray(val)) return; for (let i = 0; i < val.length; i++) { const subkey = `${key}[${i}]`; const v = val[i]; callback(node, subkey, v); if (process.env.BABEL_TYPES_8_BREAKING) (0, _validate.validateChild)(node, subkey, v); } } validator.each = callback; return validator; } function assertOneOf(...values) { function validate2(node, key, val) { if (values.indexOf(val) < 0) { throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`); } } validate2.oneOf = values; return validate2; } function assertNodeType(...types) { function validate2(node, key, val) { for (const type of types) { if ((0, _is.default)(type, val)) { (0, _validate.validateChild)(node, key, val); return; } } throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`); } validate2.oneOfNodeTypes = types; return validate2; } function assertNodeOrValueType(...types) { function validate2(node, key, val) { for (const type of types) { if (getType(val) === type || (0, _is.default)(type, val)) { (0, _validate.validateChild)(node, key, val); return; } } throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`); } validate2.oneOfNodeOrValueTypes = types; return validate2; } function assertValueType(type) { function validate2(node, key, val) { const valid = getType(val) === type; if (!valid) { throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`); } } validate2.type = type; return validate2; } function assertShape(shape) { function validate2(node, key, val) { const errors = []; for (const property of Object.keys(shape)) { try { (0, _validate.validateField)(node, property, val[property], shape[property]); } catch (error) { if (error instanceof TypeError) { errors.push(error.message); continue; } throw error; } } if (errors.length) { throw new TypeError(`Property ${key} of ${node.type} expected to have the following: ${errors.join("\n")}`); } } validate2.shapeOf = shape; return validate2; } function assertOptionalChainStart() { function validate2(node) { var _current; let current = node; while (node) { const { type } = current; if (type === "OptionalCallExpression") { if (current.optional) return; current = current.callee; continue; } if (type === "OptionalMemberExpression") { if (current.optional) return; current = current.object; continue; } break; } throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current) == null ? void 0 : _current.type}`); } return validate2; } function chain(...fns) { function validate2(...args) { for (const fn of fns) { fn(...args); } } validate2.chainOf = fns; if (fns.length >= 2 && "type" in fns[0] && fns[0].type === "array" && !("each" in fns[1])) { throw new Error(`An assertValueType("array") validator can only be followed by an assertEach(...) validator.`); } return validate2; } var validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"]; var validFieldKeys = ["default", "optional", "validate"]; function defineAliasedType(...aliases) { return (type, opts = {}) => { let defined = opts.aliases; if (!defined) { var _store$opts$inherits$, _defined; if (opts.inherits) defined = (_store$opts$inherits$ = store[opts.inherits].aliases) == null ? void 0 : _store$opts$inherits$.slice(); (_defined = defined) != null ? _defined : defined = []; opts.aliases = defined; } const additional = aliases.filter((a) => !defined.includes(a)); defined.unshift(...additional); return defineType(type, opts); }; } function defineType(type, opts = {}) { const inherits = opts.inherits && store[opts.inherits] || {}; let fields = opts.fields; if (!fields) { fields = {}; if (inherits.fields) { const keys = Object.getOwnPropertyNames(inherits.fields); for (const key of keys) { const field = inherits.fields[key]; const def = field.default; if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") { throw new Error("field defaults can only be primitives or empty arrays currently"); } fields[key] = { default: Array.isArray(def) ? [] : def, optional: field.optional, validate: field.validate }; } } } const visitor = opts.visitor || inherits.visitor || []; const aliases = opts.aliases || inherits.aliases || []; const builder = opts.builder || inherits.builder || opts.visitor || []; for (const k of Object.keys(opts)) { if (validTypeOpts.indexOf(k) === -1) { throw new Error(`Unknown type option "${k}" on ${type}`); } } if (opts.deprecatedAlias) { DEPRECATED_KEYS[opts.deprecatedAlias] = type; } for (const key of visitor.concat(builder)) { fields[key] = fields[key] || {}; } for (const key of Object.keys(fields)) { const field = fields[key]; if (field.default !== void 0 && builder.indexOf(key) === -1) { field.optional = true; } if (field.default === void 0) { field.default = null; } else if (!field.validate && field.default != null) { field.validate = assertValueType(getType(field.default)); } for (const k of Object.keys(field)) { if (validFieldKeys.indexOf(k) === -1) { throw new Error(`Unknown field key "${k}" on ${type}.${key}`); } } } VISITOR_KEYS[type] = opts.visitor = visitor; BUILDER_KEYS[type] = opts.builder = builder; NODE_FIELDS[type] = opts.fields = fields; ALIAS_KEYS[type] = opts.aliases = aliases; aliases.forEach((alias) => { FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || []; FLIPPED_ALIAS_KEYS[alias].push(type); }); if (opts.validate) { NODE_PARENT_VALIDATIONS[type] = opts.validate; } store[type] = opts; } var store = {}; } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/core.js var require_core3 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/core.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.patternLikeCommon = exports2.functionTypeAnnotationCommon = exports2.functionDeclarationCommon = exports2.functionCommon = exports2.classMethodOrPropertyCommon = exports2.classMethodOrDeclareMethodCommon = void 0; var _is = require_is2(); var _isValidIdentifier = require_isValidIdentifier2(); var _helperValidatorIdentifier = require_lib5(); var _constants = require_constants3(); var _utils = require_utils4(); var defineType = (0, _utils.defineAliasedType)("Standardized"); defineType("ArrayExpression", { fields: { elements: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))), default: !process.env.BABEL_TYPES_8_BREAKING ? [] : void 0 } }, visitor: ["elements"], aliases: ["Expression"] }); defineType("AssignmentExpression", { fields: { operator: { validate: function() { if (!process.env.BABEL_TYPES_8_BREAKING) { return (0, _utils.assertValueType)("string"); } const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS); const pattern = (0, _utils.assertOneOf)("="); return function(node, key, val) { const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier; validator(node, key, val); }; }() }, left: { validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern") }, right: { validate: (0, _utils.assertNodeType)("Expression") } }, builder: ["operator", "left", "right"], visitor: ["left", "right"], aliases: ["Expression"] }); defineType("BinaryExpression", { builder: ["operator", "left", "right"], fields: { operator: { validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS) }, left: { validate: function() { const expression = (0, _utils.assertNodeType)("Expression"); const inOp = (0, _utils.assertNodeType)("Expression", "PrivateName"); const validator = function(node, key, val) { const validator2 = node.operator === "in" ? inOp : expression; validator2(node, key, val); }; validator.oneOfNodeTypes = ["Expression", "PrivateName"]; return validator; }() }, right: { validate: (0, _utils.assertNodeType)("Expression") } }, visitor: ["left", "right"], aliases: ["Binary", "Expression"] }); defineType("InterpreterDirective", { builder: ["value"], fields: { value: { validate: (0, _utils.assertValueType)("string") } } }); defineType("Directive", { visitor: ["value"], fields: { value: { validate: (0, _utils.assertNodeType)("DirectiveLiteral") } } }); defineType("DirectiveLiteral", { builder: ["value"], fields: { value: { validate: (0, _utils.assertValueType)("string") } } }); defineType("BlockStatement", { builder: ["body", "directives"], visitor: ["directives", "body"], fields: { directives: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), default: [] }, body: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) } }, aliases: ["Scopable", "BlockParent", "Block", "Statement"] }); defineType("BreakStatement", { visitor: ["label"], fields: { label: { validate: (0, _utils.assertNodeType)("Identifier"), optional: true } }, aliases: ["Statement", "Terminatorless", "CompletionStatement"] }); defineType("CallExpression", { visitor: ["callee", "arguments", "typeParameters", "typeArguments"], builder: ["callee", "arguments"], aliases: ["Expression"], fields: Object.assign({ callee: { validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier") }, arguments: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder"))) } }, !process.env.BABEL_TYPES_8_BREAKING ? { optional: { validate: (0, _utils.assertOneOf)(true, false), optional: true } } : {}, { typeArguments: { validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"), optional: true }, typeParameters: { validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"), optional: true } }) }); defineType("CatchClause", { visitor: ["param", "body"], fields: { param: { validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"), optional: true }, body: { validate: (0, _utils.assertNodeType)("BlockStatement") } }, aliases: ["Scopable", "BlockParent"] }); defineType("ConditionalExpression", { visitor: ["test", "consequent", "alternate"], fields: { test: { validate: (0, _utils.assertNodeType)("Expression") }, consequent: { validate: (0, _utils.assertNodeType)("Expression") }, alternate: { validate: (0, _utils.assertNodeType)("Expression") } }, aliases: ["Expression", "Conditional"] }); defineType("ContinueStatement", { visitor: ["label"], fields: { label: { validate: (0, _utils.assertNodeType)("Identifier"), optional: true } }, aliases: ["Statement", "Terminatorless", "CompletionStatement"] }); defineType("DebuggerStatement", { aliases: ["Statement"] }); defineType("DoWhileStatement", { visitor: ["test", "body"], fields: { test: { validate: (0, _utils.assertNodeType)("Expression") }, body: { validate: (0, _utils.assertNodeType)("Statement") } }, aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"] }); defineType("EmptyStatement", { aliases: ["Statement"] }); defineType("ExpressionStatement", { visitor: ["expression"], fields: { expression: { validate: (0, _utils.assertNodeType)("Expression") } }, aliases: ["Statement", "ExpressionWrapper"] }); defineType("File", { builder: ["program", "comments", "tokens"], visitor: ["program"], fields: { program: { validate: (0, _utils.assertNodeType)("Program") }, comments: { validate: !process.env.BABEL_TYPES_8_BREAKING ? Object.assign(() => { }, { each: { oneOfNodeTypes: ["CommentBlock", "CommentLine"] } }) : (0, _utils.assertEach)((0, _utils.assertNodeType)("CommentBlock", "CommentLine")), optional: true }, tokens: { validate: (0, _utils.assertEach)(Object.assign(() => { }, { type: "any" })), optional: true } } }); defineType("ForInStatement", { visitor: ["left", "right", "body"], aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], fields: { left: { validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern") }, right: { validate: (0, _utils.assertNodeType)("Expression") }, body: { validate: (0, _utils.assertNodeType)("Statement") } } }); defineType("ForStatement", { visitor: ["init", "test", "update", "body"], aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"], fields: { init: { validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"), optional: true }, test: { validate: (0, _utils.assertNodeType)("Expression"), optional: true }, update: { validate: (0, _utils.assertNodeType)("Expression"), optional: true }, body: { validate: (0, _utils.assertNodeType)("Statement") } } }); var functionCommon = { params: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement"))) }, generator: { default: false }, async: { default: false } }; exports2.functionCommon = functionCommon; var functionTypeAnnotationCommon = { returnType: { validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), optional: true }, typeParameters: { validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), optional: true } }; exports2.functionTypeAnnotationCommon = functionTypeAnnotationCommon; var functionDeclarationCommon = Object.assign({}, functionCommon, { declare: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, id: { validate: (0, _utils.assertNodeType)("Identifier"), optional: true } }); exports2.functionDeclarationCommon = functionDeclarationCommon; defineType("FunctionDeclaration", { builder: ["id", "params", "body", "generator", "async"], visitor: ["id", "params", "body", "returnType", "typeParameters"], fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, { body: { validate: (0, _utils.assertNodeType)("BlockStatement") } }), aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"], validate: function() { if (!process.env.BABEL_TYPES_8_BREAKING) return () => { }; const identifier = (0, _utils.assertNodeType)("Identifier"); return function(parent, key, node) { if (!(0, _is.default)("ExportDefaultDeclaration", parent)) { identifier(node, "id", node.id); } }; }() }); defineType("FunctionExpression", { inherits: "FunctionDeclaration", aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, { id: { validate: (0, _utils.assertNodeType)("Identifier"), optional: true }, body: { validate: (0, _utils.assertNodeType)("BlockStatement") } }) }); var patternLikeCommon = { typeAnnotation: { validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))) } }; exports2.patternLikeCommon = patternLikeCommon; defineType("Identifier", { builder: ["name"], visitor: ["typeAnnotation", "decorators"], aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"], fields: Object.assign({}, patternLikeCommon, { name: { validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (!(0, _isValidIdentifier.default)(val, false)) { throw new TypeError(`"${val}" is not a valid identifier name`); } }, { type: "string" })) }, optional: { validate: (0, _utils.assertValueType)("boolean"), optional: true } }), validate(parent, key, node) { if (!process.env.BABEL_TYPES_8_BREAKING) return; const match = /\.(\w+)$/.exec(key); if (!match) return; const [, parentKey] = match; const nonComp = { computed: false }; if (parentKey === "property") { if ((0, _is.default)("MemberExpression", parent, nonComp)) return; if ((0, _is.default)("OptionalMemberExpression", parent, nonComp)) return; } else if (parentKey === "key") { if ((0, _is.default)("Property", parent, nonComp)) return; if ((0, _is.default)("Method", parent, nonComp)) return; } else if (parentKey === "exported") { if ((0, _is.default)("ExportSpecifier", parent)) return; } else if (parentKey === "imported") { if ((0, _is.default)("ImportSpecifier", parent, { imported: node })) return; } else if (parentKey === "meta") { if ((0, _is.default)("MetaProperty", parent, { meta: node })) return; } if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name, false)) && node.name !== "this") { throw new TypeError(`"${node.name}" is not a valid identifier`); } } }); defineType("IfStatement", { visitor: ["test", "consequent", "alternate"], aliases: ["Statement", "Conditional"], fields: { test: { validate: (0, _utils.assertNodeType)("Expression") }, consequent: { validate: (0, _utils.assertNodeType)("Statement") }, alternate: { optional: true, validate: (0, _utils.assertNodeType)("Statement") } } }); defineType("LabeledStatement", { visitor: ["label", "body"], aliases: ["Statement"], fields: { label: { validate: (0, _utils.assertNodeType)("Identifier") }, body: { validate: (0, _utils.assertNodeType)("Statement") } } }); defineType("StringLiteral", { builder: ["value"], fields: { value: { validate: (0, _utils.assertValueType)("string") } }, aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); defineType("NumericLiteral", { builder: ["value"], deprecatedAlias: "NumberLiteral", fields: { value: { validate: (0, _utils.assertValueType)("number") } }, aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); defineType("NullLiteral", { aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); defineType("BooleanLiteral", { builder: ["value"], fields: { value: { validate: (0, _utils.assertValueType)("boolean") } }, aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); defineType("RegExpLiteral", { builder: ["pattern", "flags"], deprecatedAlias: "RegexLiteral", aliases: ["Expression", "Pureish", "Literal"], fields: { pattern: { validate: (0, _utils.assertValueType)("string") }, flags: { validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; const invalid = /[^gimsuy]/.exec(val); if (invalid) { throw new TypeError(`"${invalid[0]}" is not a valid RegExp flag`); } }, { type: "string" })), default: "" } } }); defineType("LogicalExpression", { builder: ["operator", "left", "right"], visitor: ["left", "right"], aliases: ["Binary", "Expression"], fields: { operator: { validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS) }, left: { validate: (0, _utils.assertNodeType)("Expression") }, right: { validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("MemberExpression", { builder: ["object", "property", "computed", ...!process.env.BABEL_TYPES_8_BREAKING ? ["optional"] : []], visitor: ["object", "property"], aliases: ["Expression", "LVal"], fields: Object.assign({ object: { validate: (0, _utils.assertNodeType)("Expression") }, property: { validate: function() { const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName"); const computed = (0, _utils.assertNodeType)("Expression"); const validator = function(node, key, val) { const validator2 = node.computed ? computed : normal; validator2(node, key, val); }; validator.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"]; return validator; }() }, computed: { default: false } }, !process.env.BABEL_TYPES_8_BREAKING ? { optional: { validate: (0, _utils.assertOneOf)(true, false), optional: true } } : {}) }); defineType("NewExpression", { inherits: "CallExpression" }); defineType("Program", { visitor: ["directives", "body"], builder: ["body", "directives", "sourceType", "interpreter"], fields: { sourceFile: { validate: (0, _utils.assertValueType)("string") }, sourceType: { validate: (0, _utils.assertOneOf)("script", "module"), default: "script" }, interpreter: { validate: (0, _utils.assertNodeType)("InterpreterDirective"), default: null, optional: true }, directives: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), default: [] }, body: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) } }, aliases: ["Scopable", "BlockParent", "Block"] }); defineType("ObjectExpression", { visitor: ["properties"], aliases: ["Expression"], fields: { properties: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement"))) } } }); defineType("ObjectMethod", { builder: ["kind", "key", "params", "body", "computed", "generator", "async"], fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, { kind: Object.assign({ validate: (0, _utils.assertOneOf)("method", "get", "set") }, !process.env.BABEL_TYPES_8_BREAKING ? { default: "method" } : {}), computed: { default: false }, key: { validate: function() { const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); const computed = (0, _utils.assertNodeType)("Expression"); const validator = function(node, key, val) { const validator2 = node.computed ? computed : normal; validator2(node, key, val); }; validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"]; return validator; }() }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true }, body: { validate: (0, _utils.assertNodeType)("BlockStatement") } }), visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"] }); defineType("ObjectProperty", { builder: ["key", "value", "computed", "shorthand", ...!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : []], fields: { computed: { default: false }, key: { validate: function() { const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); const computed = (0, _utils.assertNodeType)("Expression"); const validator = function(node, key, val) { const validator2 = node.computed ? computed : normal; validator2(node, key, val); }; validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"]; return validator; }() }, value: { validate: (0, _utils.assertNodeType)("Expression", "PatternLike") }, shorthand: { validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (val && node.computed) { throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true"); } }, { type: "boolean" }), function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (val && !(0, _is.default)("Identifier", node.key)) { throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier"); } }), default: false }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true } }, visitor: ["key", "value", "decorators"], aliases: ["UserWhitespacable", "Property", "ObjectMember"], validate: function() { const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern"); const expression = (0, _utils.assertNodeType)("Expression"); return function(parent, key, node) { if (!process.env.BABEL_TYPES_8_BREAKING) return; const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression; validator(node, "value", node.value); }; }() }); defineType("RestElement", { visitor: ["argument", "typeAnnotation"], builder: ["argument"], aliases: ["LVal", "PatternLike"], deprecatedAlias: "RestProperty", fields: Object.assign({}, patternLikeCommon, { argument: { validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern", "MemberExpression") }, optional: { validate: (0, _utils.assertValueType)("boolean"), optional: true } }), validate(parent, key) { if (!process.env.BABEL_TYPES_8_BREAKING) return; const match = /(\w+)\[(\d+)\]/.exec(key); if (!match) throw new Error("Internal Babel error: malformed key."); const [, listKey, index] = match; if (parent[listKey].length > index + 1) { throw new TypeError(`RestElement must be last element of ${listKey}`); } } }); defineType("ReturnStatement", { visitor: ["argument"], aliases: ["Statement", "Terminatorless", "CompletionStatement"], fields: { argument: { validate: (0, _utils.assertNodeType)("Expression"), optional: true } } }); defineType("SequenceExpression", { visitor: ["expressions"], fields: { expressions: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression"))) } }, aliases: ["Expression"] }); defineType("ParenthesizedExpression", { visitor: ["expression"], aliases: ["Expression", "ExpressionWrapper"], fields: { expression: { validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("SwitchCase", { visitor: ["test", "consequent"], fields: { test: { validate: (0, _utils.assertNodeType)("Expression"), optional: true }, consequent: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) } } }); defineType("SwitchStatement", { visitor: ["discriminant", "cases"], aliases: ["Statement", "BlockParent", "Scopable"], fields: { discriminant: { validate: (0, _utils.assertNodeType)("Expression") }, cases: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase"))) } } }); defineType("ThisExpression", { aliases: ["Expression"] }); defineType("ThrowStatement", { visitor: ["argument"], aliases: ["Statement", "Terminatorless", "CompletionStatement"], fields: { argument: { validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("TryStatement", { visitor: ["block", "handler", "finalizer"], aliases: ["Statement"], fields: { block: { validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), Object.assign(function(node) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (!node.handler && !node.finalizer) { throw new TypeError("TryStatement expects either a handler or finalizer, or both"); } }, { oneOfNodeTypes: ["BlockStatement"] })) }, handler: { optional: true, validate: (0, _utils.assertNodeType)("CatchClause") }, finalizer: { optional: true, validate: (0, _utils.assertNodeType)("BlockStatement") } } }); defineType("UnaryExpression", { builder: ["operator", "argument", "prefix"], fields: { prefix: { default: true }, argument: { validate: (0, _utils.assertNodeType)("Expression") }, operator: { validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS) } }, visitor: ["argument"], aliases: ["UnaryLike", "Expression"] }); defineType("UpdateExpression", { builder: ["operator", "argument", "prefix"], fields: { prefix: { default: false }, argument: { validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression") }, operator: { validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS) } }, visitor: ["argument"], aliases: ["Expression"] }); defineType("VariableDeclaration", { builder: ["kind", "declarations"], visitor: ["declarations"], aliases: ["Statement", "Declaration"], fields: { declare: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, kind: { validate: (0, _utils.assertOneOf)("var", "let", "const") }, declarations: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator"))) } }, validate(parent, key, node) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (!(0, _is.default)("ForXStatement", parent, { left: node })) return; if (node.declarations.length !== 1) { throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`); } } }); defineType("VariableDeclarator", { visitor: ["id", "init"], fields: { id: { validate: function() { if (!process.env.BABEL_TYPES_8_BREAKING) { return (0, _utils.assertNodeType)("LVal"); } const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"); const without = (0, _utils.assertNodeType)("Identifier"); return function(node, key, val) { const validator = node.init ? normal : without; validator(node, key, val); }; }() }, definite: { optional: true, validate: (0, _utils.assertValueType)("boolean") }, init: { optional: true, validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("WhileStatement", { visitor: ["test", "body"], aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"], fields: { test: { validate: (0, _utils.assertNodeType)("Expression") }, body: { validate: (0, _utils.assertNodeType)("Statement") } } }); defineType("WithStatement", { visitor: ["object", "body"], aliases: ["Statement"], fields: { object: { validate: (0, _utils.assertNodeType)("Expression") }, body: { validate: (0, _utils.assertNodeType)("Statement") } } }); defineType("AssignmentPattern", { visitor: ["left", "right", "decorators"], builder: ["left", "right"], aliases: ["Pattern", "PatternLike", "LVal"], fields: Object.assign({}, patternLikeCommon, { left: { validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression") }, right: { validate: (0, _utils.assertNodeType)("Expression") }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true } }) }); defineType("ArrayPattern", { visitor: ["elements", "typeAnnotation"], builder: ["elements"], aliases: ["Pattern", "PatternLike", "LVal"], fields: Object.assign({}, patternLikeCommon, { elements: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike"))) }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true }, optional: { validate: (0, _utils.assertValueType)("boolean"), optional: true } }) }); defineType("ArrowFunctionExpression", { builder: ["params", "body", "async"], visitor: ["params", "body", "returnType", "typeParameters"], aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, { expression: { validate: (0, _utils.assertValueType)("boolean") }, body: { validate: (0, _utils.assertNodeType)("BlockStatement", "Expression") } }) }); defineType("ClassBody", { visitor: ["body"], fields: { body: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "ClassAccessorProperty", "TSDeclareMethod", "TSIndexSignature", "StaticBlock"))) } } }); defineType("ClassExpression", { builder: ["id", "superClass", "body", "decorators"], visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"], aliases: ["Scopable", "Class", "Expression"], fields: { id: { validate: (0, _utils.assertNodeType)("Identifier"), optional: true }, typeParameters: { validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), optional: true }, body: { validate: (0, _utils.assertNodeType)("ClassBody") }, superClass: { optional: true, validate: (0, _utils.assertNodeType)("Expression") }, superTypeParameters: { validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), optional: true }, implements: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true }, mixins: { validate: (0, _utils.assertNodeType)("InterfaceExtends"), optional: true } } }); defineType("ClassDeclaration", { inherits: "ClassExpression", aliases: ["Scopable", "Class", "Statement", "Declaration"], fields: { id: { validate: (0, _utils.assertNodeType)("Identifier") }, typeParameters: { validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), optional: true }, body: { validate: (0, _utils.assertNodeType)("ClassBody") }, superClass: { optional: true, validate: (0, _utils.assertNodeType)("Expression") }, superTypeParameters: { validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), optional: true }, implements: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true }, mixins: { validate: (0, _utils.assertNodeType)("InterfaceExtends"), optional: true }, declare: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, abstract: { validate: (0, _utils.assertValueType)("boolean"), optional: true } }, validate: function() { const identifier = (0, _utils.assertNodeType)("Identifier"); return function(parent, key, node) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (!(0, _is.default)("ExportDefaultDeclaration", parent)) { identifier(node, "id", node.id); } }; }() }); defineType("ExportAllDeclaration", { visitor: ["source"], aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], fields: { source: { validate: (0, _utils.assertNodeType)("StringLiteral") }, exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")), assertions: { optional: true, validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute"))) } } }); defineType("ExportDefaultDeclaration", { visitor: ["declaration"], aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], fields: { declaration: { validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression") }, exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("value")) } }); defineType("ExportNamedDeclaration", { visitor: ["declaration", "specifiers", "source"], aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], fields: { declaration: { optional: true, validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), Object.assign(function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (val && node.specifiers.length) { throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration"); } }, { oneOfNodeTypes: ["Declaration"] }), function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (val && node.source) { throw new TypeError("Cannot export a declaration from a source"); } }) }, assertions: { optional: true, validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute"))) }, specifiers: { default: [], validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function() { const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier"); const sourceless = (0, _utils.assertNodeType)("ExportSpecifier"); if (!process.env.BABEL_TYPES_8_BREAKING) return sourced; return function(node, key, val) { const validator = node.source ? sourced : sourceless; validator(node, key, val); }; }())) }, source: { validate: (0, _utils.assertNodeType)("StringLiteral"), optional: true }, exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")) } }); defineType("ExportSpecifier", { visitor: ["local", "exported"], aliases: ["ModuleSpecifier"], fields: { local: { validate: (0, _utils.assertNodeType)("Identifier") }, exported: { validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral") }, exportKind: { validate: (0, _utils.assertOneOf)("type", "value"), optional: true } } }); defineType("ForOfStatement", { visitor: ["left", "right", "body"], builder: ["left", "right", "body", "await"], aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], fields: { left: { validate: function() { if (!process.env.BABEL_TYPES_8_BREAKING) { return (0, _utils.assertNodeType)("VariableDeclaration", "LVal"); } const declaration = (0, _utils.assertNodeType)("VariableDeclaration"); const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern"); return function(node, key, val) { if ((0, _is.default)("VariableDeclaration", val)) { declaration(node, key, val); } else { lval(node, key, val); } }; }() }, right: { validate: (0, _utils.assertNodeType)("Expression") }, body: { validate: (0, _utils.assertNodeType)("Statement") }, await: { default: false } } }); defineType("ImportDeclaration", { visitor: ["specifiers", "source"], aliases: ["Statement", "Declaration", "ModuleDeclaration"], fields: { assertions: { optional: true, validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute"))) }, specifiers: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier"))) }, source: { validate: (0, _utils.assertNodeType)("StringLiteral") }, importKind: { validate: (0, _utils.assertOneOf)("type", "typeof", "value"), optional: true } } }); defineType("ImportDefaultSpecifier", { visitor: ["local"], aliases: ["ModuleSpecifier"], fields: { local: { validate: (0, _utils.assertNodeType)("Identifier") } } }); defineType("ImportNamespaceSpecifier", { visitor: ["local"], aliases: ["ModuleSpecifier"], fields: { local: { validate: (0, _utils.assertNodeType)("Identifier") } } }); defineType("ImportSpecifier", { visitor: ["local", "imported"], aliases: ["ModuleSpecifier"], fields: { local: { validate: (0, _utils.assertNodeType)("Identifier") }, imported: { validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral") }, importKind: { validate: (0, _utils.assertOneOf)("type", "typeof", "value"), optional: true } } }); defineType("MetaProperty", { visitor: ["meta", "property"], aliases: ["Expression"], fields: { meta: { validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), Object.assign(function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; let property; switch (val.name) { case "function": property = "sent"; break; case "new": property = "target"; break; case "import": property = "meta"; break; } if (!(0, _is.default)("Identifier", node.property, { name: property })) { throw new TypeError("Unrecognised MetaProperty"); } }, { oneOfNodeTypes: ["Identifier"] })) }, property: { validate: (0, _utils.assertNodeType)("Identifier") } } }); var classMethodOrPropertyCommon = { abstract: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, accessibility: { validate: (0, _utils.assertOneOf)("public", "private", "protected"), optional: true }, static: { default: false }, override: { default: false }, computed: { default: false }, optional: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, key: { validate: (0, _utils.chain)(function() { const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); const computed = (0, _utils.assertNodeType)("Expression"); return function(node, key, val) { const validator = node.computed ? computed : normal; validator(node, key, val); }; }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression")) } }; exports2.classMethodOrPropertyCommon = classMethodOrPropertyCommon; var classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, { params: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty"))) }, kind: { validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"), default: "method" }, access: { validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true } }); exports2.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon; defineType("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({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, { body: { validate: (0, _utils.assertNodeType)("BlockStatement") } }) }); defineType("ObjectPattern", { visitor: ["properties", "typeAnnotation", "decorators"], builder: ["properties"], aliases: ["Pattern", "PatternLike", "LVal"], fields: Object.assign({}, patternLikeCommon, { properties: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty"))) } }) }); defineType("SpreadElement", { visitor: ["argument"], aliases: ["UnaryLike"], deprecatedAlias: "SpreadProperty", fields: { argument: { validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("Super", { aliases: ["Expression"] }); defineType("TaggedTemplateExpression", { visitor: ["tag", "quasi", "typeParameters"], builder: ["tag", "quasi"], aliases: ["Expression"], fields: { tag: { validate: (0, _utils.assertNodeType)("Expression") }, quasi: { validate: (0, _utils.assertNodeType)("TemplateLiteral") }, typeParameters: { validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), optional: true } } }); defineType("TemplateElement", { builder: ["value", "tail"], fields: { value: { validate: (0, _utils.assertShape)({ raw: { validate: (0, _utils.assertValueType)("string") }, cooked: { validate: (0, _utils.assertValueType)("string"), optional: true } }) }, tail: { default: false } } }); defineType("TemplateLiteral", { visitor: ["quasis", "expressions"], aliases: ["Expression", "Literal"], fields: { quasis: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement"))) }, expressions: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "TSType")), function(node, key, val) { if (node.quasis.length !== val.length + 1) { throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions. Expected ${val.length + 1} quasis but got ${node.quasis.length}`); } }) } } }); defineType("YieldExpression", { builder: ["argument", "delegate"], visitor: ["argument"], aliases: ["Expression", "Terminatorless"], fields: { delegate: { validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (val && !node.argument) { throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument"); } }, { type: "boolean" })), default: false }, argument: { optional: true, validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("AwaitExpression", { builder: ["argument"], visitor: ["argument"], aliases: ["Expression", "Terminatorless"], fields: { argument: { validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("Import", { aliases: ["Expression"] }); defineType("BigIntLiteral", { builder: ["value"], fields: { value: { validate: (0, _utils.assertValueType)("string") } }, aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); defineType("ExportNamespaceSpecifier", { visitor: ["exported"], aliases: ["ModuleSpecifier"], fields: { exported: { validate: (0, _utils.assertNodeType)("Identifier") } } }); defineType("OptionalMemberExpression", { builder: ["object", "property", "computed", "optional"], visitor: ["object", "property"], aliases: ["Expression"], fields: { object: { validate: (0, _utils.assertNodeType)("Expression") }, property: { validate: function() { const normal = (0, _utils.assertNodeType)("Identifier"); const computed = (0, _utils.assertNodeType)("Expression"); const validator = function(node, key, val) { const validator2 = node.computed ? computed : normal; validator2(node, key, val); }; validator.oneOfNodeTypes = ["Expression", "Identifier"]; return validator; }() }, computed: { default: false }, optional: { validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)()) } } }); defineType("OptionalCallExpression", { visitor: ["callee", "arguments", "typeParameters", "typeArguments"], builder: ["callee", "arguments", "optional"], aliases: ["Expression"], fields: { callee: { validate: (0, _utils.assertNodeType)("Expression") }, arguments: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder"))) }, optional: { validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)()) }, typeArguments: { validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"), optional: true }, typeParameters: { validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"), optional: true } } }); defineType("ClassProperty", { visitor: ["key", "value", "typeAnnotation", "decorators"], builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"], aliases: ["Property"], fields: Object.assign({}, classMethodOrPropertyCommon, { value: { validate: (0, _utils.assertNodeType)("Expression"), optional: true }, definite: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, typeAnnotation: { validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true }, readonly: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, declare: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, variance: { validate: (0, _utils.assertNodeType)("Variance"), optional: true } }) }); defineType("ClassAccessorProperty", { visitor: ["key", "value", "typeAnnotation", "decorators"], builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"], aliases: ["Property", "Accessor"], fields: Object.assign({}, classMethodOrPropertyCommon, { key: { validate: (0, _utils.chain)(function() { const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "PrivateName"); const computed = (0, _utils.assertNodeType)("Expression"); return function(node, key, val) { const validator = node.computed ? computed : normal; validator(node, key, val); }; }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression", "PrivateName")) }, value: { validate: (0, _utils.assertNodeType)("Expression"), optional: true }, definite: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, typeAnnotation: { validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true }, readonly: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, declare: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, variance: { validate: (0, _utils.assertNodeType)("Variance"), optional: true } }) }); defineType("ClassPrivateProperty", { visitor: ["key", "value", "decorators", "typeAnnotation"], builder: ["key", "value", "decorators", "static"], aliases: ["Property", "Private"], fields: { key: { validate: (0, _utils.assertNodeType)("PrivateName") }, value: { validate: (0, _utils.assertNodeType)("Expression"), optional: true }, typeAnnotation: { validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true }, readonly: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, definite: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, variance: { validate: (0, _utils.assertNodeType)("Variance"), optional: true } } }); defineType("ClassPrivateMethod", { builder: ["kind", "key", "params", "body", "static"], visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"], fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, { key: { validate: (0, _utils.assertNodeType)("PrivateName") }, body: { validate: (0, _utils.assertNodeType)("BlockStatement") } }) }); defineType("PrivateName", { visitor: ["id"], aliases: ["Private"], fields: { id: { validate: (0, _utils.assertNodeType)("Identifier") } } }); defineType("StaticBlock", { visitor: ["body"], fields: { body: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) } }, aliases: ["Scopable", "BlockParent", "FunctionParent"] }); } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/flow.js var require_flow2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/flow.js"() { "use strict"; var _utils = require_utils4(); var defineType = (0, _utils.defineAliasedType)("Flow"); var defineInterfaceishType = (name, typeParameterType = "TypeParameterDeclaration") => { defineType(name, { builder: ["id", "typeParameters", "extends", "body"], visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)(typeParameterType), extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")), body: (0, _utils.validateType)("ObjectTypeAnnotation") } }); }; defineType("AnyTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("ArrayTypeAnnotation", { visitor: ["elementType"], aliases: ["FlowType"], fields: { elementType: (0, _utils.validateType)("FlowType") } }); defineType("BooleanTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("BooleanLiteralTypeAnnotation", { builder: ["value"], aliases: ["FlowType"], fields: { value: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("NullLiteralTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("ClassImplements", { visitor: ["id", "typeParameters"], fields: { id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") } }); defineInterfaceishType("DeclareClass"); defineType("DeclareFunction", { visitor: ["id"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)("Identifier"), predicate: (0, _utils.validateOptionalType)("DeclaredPredicate") } }); defineInterfaceishType("DeclareInterface"); defineType("DeclareModule", { builder: ["id", "body", "kind"], visitor: ["id", "body"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), body: (0, _utils.validateType)("BlockStatement"), kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES")) } }); defineType("DeclareModuleExports", { visitor: ["typeAnnotation"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { typeAnnotation: (0, _utils.validateType)("TypeAnnotation") } }); defineType("DeclareTypeAlias", { visitor: ["id", "typeParameters", "right"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), right: (0, _utils.validateType)("FlowType") } }); defineType("DeclareOpaqueType", { visitor: ["id", "typeParameters", "supertype"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), supertype: (0, _utils.validateOptionalType)("FlowType"), impltype: (0, _utils.validateOptionalType)("FlowType") } }); defineType("DeclareVariable", { visitor: ["id"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)("Identifier") } }); defineType("DeclareExportDeclaration", { visitor: ["declaration", "specifiers", "source"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { declaration: (0, _utils.validateOptionalType)("Flow"), specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])), source: (0, _utils.validateOptionalType)("StringLiteral"), default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) } }); defineType("DeclareExportAllDeclaration", { visitor: ["source"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { source: (0, _utils.validateType)("StringLiteral"), exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")) } }); defineType("DeclaredPredicate", { visitor: ["value"], aliases: ["FlowPredicate"], fields: { value: (0, _utils.validateType)("Flow") } }); defineType("ExistsTypeAnnotation", { aliases: ["FlowType"] }); defineType("FunctionTypeAnnotation", { visitor: ["typeParameters", "params", "rest", "returnType"], aliases: ["FlowType"], fields: { typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")), rest: (0, _utils.validateOptionalType)("FunctionTypeParam"), this: (0, _utils.validateOptionalType)("FunctionTypeParam"), returnType: (0, _utils.validateType)("FlowType") } }); defineType("FunctionTypeParam", { visitor: ["name", "typeAnnotation"], fields: { name: (0, _utils.validateOptionalType)("Identifier"), typeAnnotation: (0, _utils.validateType)("FlowType"), optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) } }); defineType("GenericTypeAnnotation", { visitor: ["id", "typeParameters"], aliases: ["FlowType"], fields: { id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]), typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") } }); defineType("InferredPredicate", { aliases: ["FlowPredicate"] }); defineType("InterfaceExtends", { visitor: ["id", "typeParameters"], fields: { id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]), typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") } }); defineInterfaceishType("InterfaceDeclaration"); defineType("InterfaceTypeAnnotation", { visitor: ["extends", "body"], aliases: ["FlowType"], fields: { extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), body: (0, _utils.validateType)("ObjectTypeAnnotation") } }); defineType("IntersectionTypeAnnotation", { visitor: ["types"], aliases: ["FlowType"], fields: { types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) } }); defineType("MixedTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("EmptyTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("NullableTypeAnnotation", { visitor: ["typeAnnotation"], aliases: ["FlowType"], fields: { typeAnnotation: (0, _utils.validateType)("FlowType") } }); defineType("NumberLiteralTypeAnnotation", { builder: ["value"], aliases: ["FlowType"], fields: { value: (0, _utils.validate)((0, _utils.assertValueType)("number")) } }); defineType("NumberTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("ObjectTypeAnnotation", { visitor: ["properties", "indexers", "callProperties", "internalSlots"], aliases: ["FlowType"], builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"], fields: { properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])), indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")), callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")), internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")), exact: { validate: (0, _utils.assertValueType)("boolean"), default: false }, inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) } }); defineType("ObjectTypeInternalSlot", { visitor: ["id", "value", "optional", "static", "method"], aliases: ["UserWhitespacable"], fields: { id: (0, _utils.validateType)("Identifier"), value: (0, _utils.validateType)("FlowType"), optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), method: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("ObjectTypeCallProperty", { visitor: ["value"], aliases: ["UserWhitespacable"], fields: { value: (0, _utils.validateType)("FlowType"), static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("ObjectTypeIndexer", { visitor: ["id", "key", "value", "variance"], aliases: ["UserWhitespacable"], fields: { id: (0, _utils.validateOptionalType)("Identifier"), key: (0, _utils.validateType)("FlowType"), value: (0, _utils.validateType)("FlowType"), static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), variance: (0, _utils.validateOptionalType)("Variance") } }); defineType("ObjectTypeProperty", { visitor: ["key", "value", "variance"], aliases: ["UserWhitespacable"], fields: { key: (0, _utils.validateType)(["Identifier", "StringLiteral"]), value: (0, _utils.validateType)("FlowType"), kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")), static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), variance: (0, _utils.validateOptionalType)("Variance"), method: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("ObjectTypeSpreadProperty", { visitor: ["argument"], aliases: ["UserWhitespacable"], fields: { argument: (0, _utils.validateType)("FlowType") } }); defineType("OpaqueType", { visitor: ["id", "typeParameters", "supertype", "impltype"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), supertype: (0, _utils.validateOptionalType)("FlowType"), impltype: (0, _utils.validateType)("FlowType") } }); defineType("QualifiedTypeIdentifier", { visitor: ["id", "qualification"], fields: { id: (0, _utils.validateType)("Identifier"), qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]) } }); defineType("StringLiteralTypeAnnotation", { builder: ["value"], aliases: ["FlowType"], fields: { value: (0, _utils.validate)((0, _utils.assertValueType)("string")) } }); defineType("StringTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("SymbolTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("ThisTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("TupleTypeAnnotation", { visitor: ["types"], aliases: ["FlowType"], fields: { types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) } }); defineType("TypeofTypeAnnotation", { visitor: ["argument"], aliases: ["FlowType"], fields: { argument: (0, _utils.validateType)("FlowType") } }); defineType("TypeAlias", { visitor: ["id", "typeParameters", "right"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), right: (0, _utils.validateType)("FlowType") } }); defineType("TypeAnnotation", { visitor: ["typeAnnotation"], fields: { typeAnnotation: (0, _utils.validateType)("FlowType") } }); defineType("TypeCastExpression", { visitor: ["expression", "typeAnnotation"], aliases: ["ExpressionWrapper", "Expression"], fields: { expression: (0, _utils.validateType)("Expression"), typeAnnotation: (0, _utils.validateType)("TypeAnnotation") } }); defineType("TypeParameter", { visitor: ["bound", "default", "variance"], fields: { name: (0, _utils.validate)((0, _utils.assertValueType)("string")), bound: (0, _utils.validateOptionalType)("TypeAnnotation"), default: (0, _utils.validateOptionalType)("FlowType"), variance: (0, _utils.validateOptionalType)("Variance") } }); defineType("TypeParameterDeclaration", { visitor: ["params"], fields: { params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter")) } }); defineType("TypeParameterInstantiation", { visitor: ["params"], fields: { params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) } }); defineType("UnionTypeAnnotation", { visitor: ["types"], aliases: ["FlowType"], fields: { types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) } }); defineType("Variance", { builder: ["kind"], fields: { kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus")) } }); defineType("VoidTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("EnumDeclaration", { aliases: ["Statement", "Declaration"], visitor: ["id", "body"], fields: { id: (0, _utils.validateType)("Identifier"), body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"]) } }); defineType("EnumBooleanBody", { aliases: ["EnumBody"], visitor: ["members"], fields: { explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), members: (0, _utils.validateArrayOfType)("EnumBooleanMember"), hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("EnumNumberBody", { aliases: ["EnumBody"], visitor: ["members"], fields: { explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), members: (0, _utils.validateArrayOfType)("EnumNumberMember"), hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("EnumStringBody", { aliases: ["EnumBody"], visitor: ["members"], fields: { explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"]), hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("EnumSymbolBody", { aliases: ["EnumBody"], visitor: ["members"], fields: { members: (0, _utils.validateArrayOfType)("EnumDefaultedMember"), hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("EnumBooleanMember", { aliases: ["EnumMember"], visitor: ["id"], fields: { id: (0, _utils.validateType)("Identifier"), init: (0, _utils.validateType)("BooleanLiteral") } }); defineType("EnumNumberMember", { aliases: ["EnumMember"], visitor: ["id", "init"], fields: { id: (0, _utils.validateType)("Identifier"), init: (0, _utils.validateType)("NumericLiteral") } }); defineType("EnumStringMember", { aliases: ["EnumMember"], visitor: ["id", "init"], fields: { id: (0, _utils.validateType)("Identifier"), init: (0, _utils.validateType)("StringLiteral") } }); defineType("EnumDefaultedMember", { aliases: ["EnumMember"], visitor: ["id"], fields: { id: (0, _utils.validateType)("Identifier") } }); defineType("IndexedAccessType", { visitor: ["objectType", "indexType"], aliases: ["FlowType"], fields: { objectType: (0, _utils.validateType)("FlowType"), indexType: (0, _utils.validateType)("FlowType") } }); defineType("OptionalIndexedAccessType", { visitor: ["objectType", "indexType"], aliases: ["FlowType"], fields: { objectType: (0, _utils.validateType)("FlowType"), indexType: (0, _utils.validateType)("FlowType"), optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/jsx.js var require_jsx2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/jsx.js"() { "use strict"; var _utils = require_utils4(); var defineType = (0, _utils.defineAliasedType)("JSX"); defineType("JSXAttribute", { visitor: ["name", "value"], aliases: ["Immutable"], fields: { name: { validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName") }, value: { optional: true, validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer") } } }); defineType("JSXClosingElement", { visitor: ["name"], aliases: ["Immutable"], fields: { name: { validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName") } } }); defineType("JSXElement", { builder: ["openingElement", "closingElement", "children", "selfClosing"], visitor: ["openingElement", "children", "closingElement"], aliases: ["Immutable", "Expression"], fields: { openingElement: { validate: (0, _utils.assertNodeType)("JSXOpeningElement") }, closingElement: { optional: true, validate: (0, _utils.assertNodeType)("JSXClosingElement") }, children: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) }, selfClosing: { validate: (0, _utils.assertValueType)("boolean"), optional: true } } }); defineType("JSXEmptyExpression", {}); defineType("JSXExpressionContainer", { visitor: ["expression"], aliases: ["Immutable"], fields: { expression: { validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression") } } }); defineType("JSXSpreadChild", { visitor: ["expression"], aliases: ["Immutable"], fields: { expression: { validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("JSXIdentifier", { builder: ["name"], fields: { name: { validate: (0, _utils.assertValueType)("string") } } }); defineType("JSXMemberExpression", { visitor: ["object", "property"], fields: { object: { validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier") }, property: { validate: (0, _utils.assertNodeType)("JSXIdentifier") } } }); defineType("JSXNamespacedName", { visitor: ["namespace", "name"], fields: { namespace: { validate: (0, _utils.assertNodeType)("JSXIdentifier") }, name: { validate: (0, _utils.assertNodeType)("JSXIdentifier") } } }); defineType("JSXOpeningElement", { builder: ["name", "attributes", "selfClosing"], visitor: ["name", "attributes"], aliases: ["Immutable"], fields: { name: { validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName") }, selfClosing: { default: false }, attributes: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute"))) }, typeParameters: { validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), optional: true } } }); defineType("JSXSpreadAttribute", { visitor: ["argument"], fields: { argument: { validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("JSXText", { aliases: ["Immutable"], builder: ["value"], fields: { value: { validate: (0, _utils.assertValueType)("string") } } }); defineType("JSXFragment", { builder: ["openingFragment", "closingFragment", "children"], visitor: ["openingFragment", "children", "closingFragment"], aliases: ["Immutable", "Expression"], fields: { openingFragment: { validate: (0, _utils.assertNodeType)("JSXOpeningFragment") }, closingFragment: { validate: (0, _utils.assertNodeType)("JSXClosingFragment") }, children: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) } } }); defineType("JSXOpeningFragment", { aliases: ["Immutable"] }); defineType("JSXClosingFragment", { aliases: ["Immutable"] }); } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/placeholders.js var require_placeholders2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/placeholders.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.PLACEHOLDERS_FLIPPED_ALIAS = exports2.PLACEHOLDERS_ALIAS = exports2.PLACEHOLDERS = void 0; var _utils = require_utils4(); var PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"]; exports2.PLACEHOLDERS = PLACEHOLDERS; var PLACEHOLDERS_ALIAS = { Declaration: ["Statement"], Pattern: ["PatternLike", "LVal"] }; exports2.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS; for (const type of PLACEHOLDERS) { const alias = _utils.ALIAS_KEYS[type]; if (alias != null && alias.length) PLACEHOLDERS_ALIAS[type] = alias; } var PLACEHOLDERS_FLIPPED_ALIAS = {}; exports2.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS; Object.keys(PLACEHOLDERS_ALIAS).forEach((type) => { PLACEHOLDERS_ALIAS[type].forEach((alias) => { if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) { PLACEHOLDERS_FLIPPED_ALIAS[alias] = []; } PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type); }); }); } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/misc.js var require_misc2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/misc.js"() { "use strict"; var _utils = require_utils4(); var _placeholders = require_placeholders2(); var defineType = (0, _utils.defineAliasedType)("Miscellaneous"); { defineType("Noop", { visitor: [] }); } defineType("Placeholder", { visitor: [], builder: ["expectedNode", "name"], fields: { name: { validate: (0, _utils.assertNodeType)("Identifier") }, expectedNode: { validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS) } } }); defineType("V8IntrinsicIdentifier", { builder: ["name"], fields: { name: { validate: (0, _utils.assertValueType)("string") } } }); } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/experimental.js var require_experimental2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/experimental.js"() { "use strict"; var _utils = require_utils4(); (0, _utils.default)("ArgumentPlaceholder", {}); (0, _utils.default)("BindExpression", { visitor: ["object", "callee"], aliases: ["Expression"], fields: !process.env.BABEL_TYPES_8_BREAKING ? { object: { validate: Object.assign(() => { }, { oneOfNodeTypes: ["Expression"] }) }, callee: { validate: Object.assign(() => { }, { oneOfNodeTypes: ["Expression"] }) } } : { object: { validate: (0, _utils.assertNodeType)("Expression") }, callee: { validate: (0, _utils.assertNodeType)("Expression") } } }); (0, _utils.default)("ImportAttribute", { visitor: ["key", "value"], fields: { key: { validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral") }, value: { validate: (0, _utils.assertNodeType)("StringLiteral") } } }); (0, _utils.default)("Decorator", { visitor: ["expression"], fields: { expression: { validate: (0, _utils.assertNodeType)("Expression") } } }); (0, _utils.default)("DoExpression", { visitor: ["body"], builder: ["body", "async"], aliases: ["Expression"], fields: { body: { validate: (0, _utils.assertNodeType)("BlockStatement") }, async: { validate: (0, _utils.assertValueType)("boolean"), default: false } } }); (0, _utils.default)("ExportDefaultSpecifier", { visitor: ["exported"], aliases: ["ModuleSpecifier"], fields: { exported: { validate: (0, _utils.assertNodeType)("Identifier") } } }); (0, _utils.default)("RecordExpression", { visitor: ["properties"], aliases: ["Expression"], fields: { properties: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "SpreadElement"))) } } }); (0, _utils.default)("TupleExpression", { fields: { elements: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement"))), default: [] } }, visitor: ["elements"], aliases: ["Expression"] }); (0, _utils.default)("DecimalLiteral", { builder: ["value"], fields: { value: { validate: (0, _utils.assertValueType)("string") } }, aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); (0, _utils.default)("ModuleExpression", { visitor: ["body"], fields: { body: { validate: (0, _utils.assertNodeType)("Program") } }, aliases: ["Expression"] }); (0, _utils.default)("TopicReference", { aliases: ["Expression"] }); (0, _utils.default)("PipelineTopicExpression", { builder: ["expression"], visitor: ["expression"], fields: { expression: { validate: (0, _utils.assertNodeType)("Expression") } }, aliases: ["Expression"] }); (0, _utils.default)("PipelineBareFunction", { builder: ["callee"], visitor: ["callee"], fields: { callee: { validate: (0, _utils.assertNodeType)("Expression") } }, aliases: ["Expression"] }); (0, _utils.default)("PipelinePrimaryTopicReference", { aliases: ["Expression"] }); } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/typescript.js var require_typescript2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/typescript.js"() { "use strict"; var _utils = require_utils4(); var _core = require_core3(); var _is = require_is2(); var defineType = (0, _utils.defineAliasedType)("TypeScript"); var bool = (0, _utils.assertValueType)("boolean"); var tSFunctionTypeAnnotationCommon = { returnType: { validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"), optional: true }, typeParameters: { validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"), optional: true } }; defineType("TSParameterProperty", { aliases: ["LVal"], visitor: ["parameter"], fields: { accessibility: { validate: (0, _utils.assertOneOf)("public", "private", "protected"), optional: true }, readonly: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, parameter: { validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern") }, override: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true } } }); defineType("TSDeclareFunction", { aliases: ["Statement", "Declaration"], visitor: ["id", "typeParameters", "params", "returnType"], fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon) }); defineType("TSDeclareMethod", { visitor: ["decorators", "key", "typeParameters", "params", "returnType"], fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon) }); defineType("TSQualifiedName", { aliases: ["TSEntityName"], visitor: ["left", "right"], fields: { left: (0, _utils.validateType)("TSEntityName"), right: (0, _utils.validateType)("Identifier") } }); var signatureDeclarationCommon = { typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), ["parameters"]: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]), ["typeAnnotation"]: (0, _utils.validateOptionalType)("TSTypeAnnotation") }; var callConstructSignatureDeclaration = { aliases: ["TSTypeElement"], visitor: ["typeParameters", "parameters", "typeAnnotation"], fields: signatureDeclarationCommon }; defineType("TSCallSignatureDeclaration", callConstructSignatureDeclaration); defineType("TSConstructSignatureDeclaration", callConstructSignatureDeclaration); var namedTypeElementCommon = { key: (0, _utils.validateType)("Expression"), computed: (0, _utils.validate)(bool), optional: (0, _utils.validateOptional)(bool) }; defineType("TSPropertySignature", { aliases: ["TSTypeElement"], visitor: ["key", "typeAnnotation", "initializer"], fields: Object.assign({}, namedTypeElementCommon, { readonly: (0, _utils.validateOptional)(bool), typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"), initializer: (0, _utils.validateOptionalType)("Expression"), kind: { validate: (0, _utils.assertOneOf)("get", "set") } }) }); defineType("TSMethodSignature", { aliases: ["TSTypeElement"], visitor: ["key", "typeParameters", "parameters", "typeAnnotation"], fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon, { kind: { validate: (0, _utils.assertOneOf)("method", "get", "set") } }) }); defineType("TSIndexSignature", { aliases: ["TSTypeElement"], visitor: ["parameters", "typeAnnotation"], fields: { readonly: (0, _utils.validateOptional)(bool), static: (0, _utils.validateOptional)(bool), parameters: (0, _utils.validateArrayOfType)("Identifier"), typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation") } }); var tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"]; for (const type of tsKeywordTypes) { defineType(type, { aliases: ["TSType", "TSBaseType"], visitor: [], fields: {} }); } defineType("TSThisType", { aliases: ["TSType", "TSBaseType"], visitor: [], fields: {} }); var fnOrCtrBase = { aliases: ["TSType"], visitor: ["typeParameters", "parameters", "typeAnnotation"] }; defineType("TSFunctionType", Object.assign({}, fnOrCtrBase, { fields: signatureDeclarationCommon })); defineType("TSConstructorType", Object.assign({}, fnOrCtrBase, { fields: Object.assign({}, signatureDeclarationCommon, { abstract: (0, _utils.validateOptional)(bool) }) })); defineType("TSTypeReference", { aliases: ["TSType"], visitor: ["typeName", "typeParameters"], fields: { typeName: (0, _utils.validateType)("TSEntityName"), typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") } }); defineType("TSTypePredicate", { aliases: ["TSType"], visitor: ["parameterName", "typeAnnotation"], builder: ["parameterName", "typeAnnotation", "asserts"], fields: { parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]), typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"), asserts: (0, _utils.validateOptional)(bool) } }); defineType("TSTypeQuery", { aliases: ["TSType"], visitor: ["exprName"], fields: { exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"]) } }); defineType("TSTypeLiteral", { aliases: ["TSType"], visitor: ["members"], fields: { members: (0, _utils.validateArrayOfType)("TSTypeElement") } }); defineType("TSArrayType", { aliases: ["TSType"], visitor: ["elementType"], fields: { elementType: (0, _utils.validateType)("TSType") } }); defineType("TSTupleType", { aliases: ["TSType"], visitor: ["elementTypes"], fields: { elementTypes: (0, _utils.validateArrayOfType)(["TSType", "TSNamedTupleMember"]) } }); defineType("TSOptionalType", { aliases: ["TSType"], visitor: ["typeAnnotation"], fields: { typeAnnotation: (0, _utils.validateType)("TSType") } }); defineType("TSRestType", { aliases: ["TSType"], visitor: ["typeAnnotation"], fields: { typeAnnotation: (0, _utils.validateType)("TSType") } }); defineType("TSNamedTupleMember", { visitor: ["label", "elementType"], builder: ["label", "elementType", "optional"], fields: { label: (0, _utils.validateType)("Identifier"), optional: { validate: bool, default: false }, elementType: (0, _utils.validateType)("TSType") } }); var unionOrIntersection = { aliases: ["TSType"], visitor: ["types"], fields: { types: (0, _utils.validateArrayOfType)("TSType") } }; defineType("TSUnionType", unionOrIntersection); defineType("TSIntersectionType", unionOrIntersection); defineType("TSConditionalType", { aliases: ["TSType"], visitor: ["checkType", "extendsType", "trueType", "falseType"], fields: { checkType: (0, _utils.validateType)("TSType"), extendsType: (0, _utils.validateType)("TSType"), trueType: (0, _utils.validateType)("TSType"), falseType: (0, _utils.validateType)("TSType") } }); defineType("TSInferType", { aliases: ["TSType"], visitor: ["typeParameter"], fields: { typeParameter: (0, _utils.validateType)("TSTypeParameter") } }); defineType("TSParenthesizedType", { aliases: ["TSType"], visitor: ["typeAnnotation"], fields: { typeAnnotation: (0, _utils.validateType)("TSType") } }); defineType("TSTypeOperator", { aliases: ["TSType"], visitor: ["typeAnnotation"], fields: { operator: (0, _utils.validate)((0, _utils.assertValueType)("string")), typeAnnotation: (0, _utils.validateType)("TSType") } }); defineType("TSIndexedAccessType", { aliases: ["TSType"], visitor: ["objectType", "indexType"], fields: { objectType: (0, _utils.validateType)("TSType"), indexType: (0, _utils.validateType)("TSType") } }); defineType("TSMappedType", { aliases: ["TSType"], visitor: ["typeParameter", "typeAnnotation", "nameType"], fields: { readonly: (0, _utils.validateOptional)(bool), typeParameter: (0, _utils.validateType)("TSTypeParameter"), optional: (0, _utils.validateOptional)(bool), typeAnnotation: (0, _utils.validateOptionalType)("TSType"), nameType: (0, _utils.validateOptionalType)("TSType") } }); defineType("TSLiteralType", { aliases: ["TSType", "TSBaseType"], visitor: ["literal"], fields: { literal: { validate: function() { const unaryExpression = (0, _utils.assertNodeType)("NumericLiteral", "BigIntLiteral"); const unaryOperator = (0, _utils.assertOneOf)("-"); const literal = (0, _utils.assertNodeType)("NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral"); function validator(parent, key, node) { if ((0, _is.default)("UnaryExpression", node)) { unaryOperator(node, "operator", node.operator); unaryExpression(node, "argument", node.argument); } else { literal(parent, key, node); } } validator.oneOfNodeTypes = ["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral", "UnaryExpression"]; return validator; }() } } }); defineType("TSExpressionWithTypeArguments", { aliases: ["TSType"], visitor: ["expression", "typeParameters"], fields: { expression: (0, _utils.validateType)("TSEntityName"), typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") } }); defineType("TSInterfaceDeclaration", { aliases: ["Statement", "Declaration"], visitor: ["id", "typeParameters", "extends", "body"], fields: { declare: (0, _utils.validateOptional)(bool), id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")), body: (0, _utils.validateType)("TSInterfaceBody") } }); defineType("TSInterfaceBody", { visitor: ["body"], fields: { body: (0, _utils.validateArrayOfType)("TSTypeElement") } }); defineType("TSTypeAliasDeclaration", { aliases: ["Statement", "Declaration"], visitor: ["id", "typeParameters", "typeAnnotation"], fields: { declare: (0, _utils.validateOptional)(bool), id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), typeAnnotation: (0, _utils.validateType)("TSType") } }); defineType("TSAsExpression", { aliases: ["Expression"], visitor: ["expression", "typeAnnotation"], fields: { expression: (0, _utils.validateType)("Expression"), typeAnnotation: (0, _utils.validateType)("TSType") } }); defineType("TSTypeAssertion", { aliases: ["Expression"], visitor: ["typeAnnotation", "expression"], fields: { typeAnnotation: (0, _utils.validateType)("TSType"), expression: (0, _utils.validateType)("Expression") } }); defineType("TSEnumDeclaration", { aliases: ["Statement", "Declaration"], visitor: ["id", "members"], fields: { declare: (0, _utils.validateOptional)(bool), const: (0, _utils.validateOptional)(bool), id: (0, _utils.validateType)("Identifier"), members: (0, _utils.validateArrayOfType)("TSEnumMember"), initializer: (0, _utils.validateOptionalType)("Expression") } }); defineType("TSEnumMember", { visitor: ["id", "initializer"], fields: { id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), initializer: (0, _utils.validateOptionalType)("Expression") } }); defineType("TSModuleDeclaration", { aliases: ["Statement", "Declaration"], visitor: ["id", "body"], fields: { declare: (0, _utils.validateOptional)(bool), global: (0, _utils.validateOptional)(bool), id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"]) } }); defineType("TSModuleBlock", { aliases: ["Scopable", "Block", "BlockParent"], visitor: ["body"], fields: { body: (0, _utils.validateArrayOfType)("Statement") } }); defineType("TSImportType", { aliases: ["TSType"], visitor: ["argument", "qualifier", "typeParameters"], fields: { argument: (0, _utils.validateType)("StringLiteral"), qualifier: (0, _utils.validateOptionalType)("TSEntityName"), typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") } }); defineType("TSImportEqualsDeclaration", { aliases: ["Statement"], visitor: ["id", "moduleReference"], fields: { isExport: (0, _utils.validate)(bool), id: (0, _utils.validateType)("Identifier"), moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"]), importKind: { validate: (0, _utils.assertOneOf)("type", "value"), optional: true } } }); defineType("TSExternalModuleReference", { visitor: ["expression"], fields: { expression: (0, _utils.validateType)("StringLiteral") } }); defineType("TSNonNullExpression", { aliases: ["Expression"], visitor: ["expression"], fields: { expression: (0, _utils.validateType)("Expression") } }); defineType("TSExportAssignment", { aliases: ["Statement"], visitor: ["expression"], fields: { expression: (0, _utils.validateType)("Expression") } }); defineType("TSNamespaceExportDeclaration", { aliases: ["Statement"], visitor: ["id"], fields: { id: (0, _utils.validateType)("Identifier") } }); defineType("TSTypeAnnotation", { visitor: ["typeAnnotation"], fields: { typeAnnotation: { validate: (0, _utils.assertNodeType)("TSType") } } }); defineType("TSTypeParameterInstantiation", { visitor: ["params"], fields: { params: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType"))) } } }); defineType("TSTypeParameterDeclaration", { visitor: ["params"], fields: { params: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter"))) } } }); defineType("TSTypeParameter", { builder: ["constraint", "default", "name"], visitor: ["constraint", "default"], fields: { name: { validate: (0, _utils.assertValueType)("string") }, constraint: { validate: (0, _utils.assertNodeType)("TSType"), optional: true }, default: { validate: (0, _utils.assertNodeType)("TSType"), optional: true } } }); } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/index.js var require_definitions2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/definitions/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "ALIAS_KEYS", { enumerable: true, get: function() { return _utils.ALIAS_KEYS; } }); Object.defineProperty(exports2, "BUILDER_KEYS", { enumerable: true, get: function() { return _utils.BUILDER_KEYS; } }); Object.defineProperty(exports2, "DEPRECATED_KEYS", { enumerable: true, get: function() { return _utils.DEPRECATED_KEYS; } }); Object.defineProperty(exports2, "FLIPPED_ALIAS_KEYS", { enumerable: true, get: function() { return _utils.FLIPPED_ALIAS_KEYS; } }); Object.defineProperty(exports2, "NODE_FIELDS", { enumerable: true, get: function() { return _utils.NODE_FIELDS; } }); Object.defineProperty(exports2, "NODE_PARENT_VALIDATIONS", { enumerable: true, get: function() { return _utils.NODE_PARENT_VALIDATIONS; } }); Object.defineProperty(exports2, "PLACEHOLDERS", { enumerable: true, get: function() { return _placeholders.PLACEHOLDERS; } }); Object.defineProperty(exports2, "PLACEHOLDERS_ALIAS", { enumerable: true, get: function() { return _placeholders.PLACEHOLDERS_ALIAS; } }); Object.defineProperty(exports2, "PLACEHOLDERS_FLIPPED_ALIAS", { enumerable: true, get: function() { return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS; } }); exports2.TYPES = void 0; Object.defineProperty(exports2, "VISITOR_KEYS", { enumerable: true, get: function() { return _utils.VISITOR_KEYS; } }); var _toFastProperties = require_to_fast_properties(); require_core3(); require_flow2(); require_jsx2(); require_misc2(); require_experimental2(); require_typescript2(); var _utils = require_utils4(); var _placeholders = require_placeholders2(); _toFastProperties(_utils.VISITOR_KEYS); _toFastProperties(_utils.ALIAS_KEYS); _toFastProperties(_utils.FLIPPED_ALIAS_KEYS); _toFastProperties(_utils.NODE_FIELDS); _toFastProperties(_utils.BUILDER_KEYS); _toFastProperties(_utils.DEPRECATED_KEYS); _toFastProperties(_placeholders.PLACEHOLDERS_ALIAS); _toFastProperties(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS); var TYPES = [].concat(Object.keys(_utils.VISITOR_KEYS), Object.keys(_utils.FLIPPED_ALIAS_KEYS), Object.keys(_utils.DEPRECATED_KEYS)); exports2.TYPES = TYPES; } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/builder.js var require_builder2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/builder.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = builder; var _definitions = require_definitions2(); var _validate = require_validate2(); function builder() { const type = this; const keys = _definitions.BUILDER_KEYS[type]; const countArgs = arguments.length; if (countArgs > keys.length) { throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys.length}`); } const node = { type }; for (let i = 0; i < keys.length; ++i) { const key = keys[i]; const field = _definitions.NODE_FIELDS[type][key]; let arg; if (i < countArgs) arg = arguments[i]; if (arg === void 0) { arg = Array.isArray(field.default) ? [] : field.default; } node[key] = arg; } for (const key in node) { (0, _validate.default)(node, key, node[key]); } return node; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/generated/index.js var require_generated7 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/generated/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.anyTypeAnnotation = anyTypeAnnotation; exports2.argumentPlaceholder = argumentPlaceholder; exports2.arrayExpression = arrayExpression; exports2.arrayPattern = arrayPattern; exports2.arrayTypeAnnotation = arrayTypeAnnotation; exports2.arrowFunctionExpression = arrowFunctionExpression; exports2.assignmentExpression = assignmentExpression; exports2.assignmentPattern = assignmentPattern; exports2.awaitExpression = awaitExpression; exports2.bigIntLiteral = bigIntLiteral; exports2.binaryExpression = binaryExpression; exports2.bindExpression = bindExpression; exports2.blockStatement = blockStatement; exports2.booleanLiteral = booleanLiteral; exports2.booleanLiteralTypeAnnotation = booleanLiteralTypeAnnotation; exports2.booleanTypeAnnotation = booleanTypeAnnotation; exports2.breakStatement = breakStatement; exports2.callExpression = callExpression; exports2.catchClause = catchClause; exports2.classAccessorProperty = classAccessorProperty; exports2.classBody = classBody; exports2.classDeclaration = classDeclaration; exports2.classExpression = classExpression; exports2.classImplements = classImplements; exports2.classMethod = classMethod; exports2.classPrivateMethod = classPrivateMethod; exports2.classPrivateProperty = classPrivateProperty; exports2.classProperty = classProperty; exports2.conditionalExpression = conditionalExpression; exports2.continueStatement = continueStatement; exports2.debuggerStatement = debuggerStatement; exports2.decimalLiteral = decimalLiteral; exports2.declareClass = declareClass; exports2.declareExportAllDeclaration = declareExportAllDeclaration; exports2.declareExportDeclaration = declareExportDeclaration; exports2.declareFunction = declareFunction; exports2.declareInterface = declareInterface; exports2.declareModule = declareModule; exports2.declareModuleExports = declareModuleExports; exports2.declareOpaqueType = declareOpaqueType; exports2.declareTypeAlias = declareTypeAlias; exports2.declareVariable = declareVariable; exports2.declaredPredicate = declaredPredicate; exports2.decorator = decorator; exports2.directive = directive; exports2.directiveLiteral = directiveLiteral; exports2.doExpression = doExpression; exports2.doWhileStatement = doWhileStatement; exports2.emptyStatement = emptyStatement; exports2.emptyTypeAnnotation = emptyTypeAnnotation; exports2.enumBooleanBody = enumBooleanBody; exports2.enumBooleanMember = enumBooleanMember; exports2.enumDeclaration = enumDeclaration; exports2.enumDefaultedMember = enumDefaultedMember; exports2.enumNumberBody = enumNumberBody; exports2.enumNumberMember = enumNumberMember; exports2.enumStringBody = enumStringBody; exports2.enumStringMember = enumStringMember; exports2.enumSymbolBody = enumSymbolBody; exports2.existsTypeAnnotation = existsTypeAnnotation; exports2.exportAllDeclaration = exportAllDeclaration; exports2.exportDefaultDeclaration = exportDefaultDeclaration; exports2.exportDefaultSpecifier = exportDefaultSpecifier; exports2.exportNamedDeclaration = exportNamedDeclaration; exports2.exportNamespaceSpecifier = exportNamespaceSpecifier; exports2.exportSpecifier = exportSpecifier; exports2.expressionStatement = expressionStatement; exports2.file = file; exports2.forInStatement = forInStatement; exports2.forOfStatement = forOfStatement; exports2.forStatement = forStatement; exports2.functionDeclaration = functionDeclaration; exports2.functionExpression = functionExpression; exports2.functionTypeAnnotation = functionTypeAnnotation; exports2.functionTypeParam = functionTypeParam; exports2.genericTypeAnnotation = genericTypeAnnotation; exports2.identifier = identifier; exports2.ifStatement = ifStatement; exports2.import = _import; exports2.importAttribute = importAttribute; exports2.importDeclaration = importDeclaration; exports2.importDefaultSpecifier = importDefaultSpecifier; exports2.importNamespaceSpecifier = importNamespaceSpecifier; exports2.importSpecifier = importSpecifier; exports2.indexedAccessType = indexedAccessType; exports2.inferredPredicate = inferredPredicate; exports2.interfaceDeclaration = interfaceDeclaration; exports2.interfaceExtends = interfaceExtends; exports2.interfaceTypeAnnotation = interfaceTypeAnnotation; exports2.interpreterDirective = interpreterDirective; exports2.intersectionTypeAnnotation = intersectionTypeAnnotation; exports2.jSXAttribute = exports2.jsxAttribute = jsxAttribute; exports2.jSXClosingElement = exports2.jsxClosingElement = jsxClosingElement; exports2.jSXClosingFragment = exports2.jsxClosingFragment = jsxClosingFragment; exports2.jSXElement = exports2.jsxElement = jsxElement; exports2.jSXEmptyExpression = exports2.jsxEmptyExpression = jsxEmptyExpression; exports2.jSXExpressionContainer = exports2.jsxExpressionContainer = jsxExpressionContainer; exports2.jSXFragment = exports2.jsxFragment = jsxFragment; exports2.jSXIdentifier = exports2.jsxIdentifier = jsxIdentifier; exports2.jSXMemberExpression = exports2.jsxMemberExpression = jsxMemberExpression; exports2.jSXNamespacedName = exports2.jsxNamespacedName = jsxNamespacedName; exports2.jSXOpeningElement = exports2.jsxOpeningElement = jsxOpeningElement; exports2.jSXOpeningFragment = exports2.jsxOpeningFragment = jsxOpeningFragment; exports2.jSXSpreadAttribute = exports2.jsxSpreadAttribute = jsxSpreadAttribute; exports2.jSXSpreadChild = exports2.jsxSpreadChild = jsxSpreadChild; exports2.jSXText = exports2.jsxText = jsxText; exports2.labeledStatement = labeledStatement; exports2.logicalExpression = logicalExpression; exports2.memberExpression = memberExpression; exports2.metaProperty = metaProperty; exports2.mixedTypeAnnotation = mixedTypeAnnotation; exports2.moduleExpression = moduleExpression; exports2.newExpression = newExpression; exports2.noop = noop; exports2.nullLiteral = nullLiteral; exports2.nullLiteralTypeAnnotation = nullLiteralTypeAnnotation; exports2.nullableTypeAnnotation = nullableTypeAnnotation; exports2.numberLiteral = NumberLiteral; exports2.numberLiteralTypeAnnotation = numberLiteralTypeAnnotation; exports2.numberTypeAnnotation = numberTypeAnnotation; exports2.numericLiteral = numericLiteral; exports2.objectExpression = objectExpression; exports2.objectMethod = objectMethod; exports2.objectPattern = objectPattern; exports2.objectProperty = objectProperty; exports2.objectTypeAnnotation = objectTypeAnnotation; exports2.objectTypeCallProperty = objectTypeCallProperty; exports2.objectTypeIndexer = objectTypeIndexer; exports2.objectTypeInternalSlot = objectTypeInternalSlot; exports2.objectTypeProperty = objectTypeProperty; exports2.objectTypeSpreadProperty = objectTypeSpreadProperty; exports2.opaqueType = opaqueType; exports2.optionalCallExpression = optionalCallExpression; exports2.optionalIndexedAccessType = optionalIndexedAccessType; exports2.optionalMemberExpression = optionalMemberExpression; exports2.parenthesizedExpression = parenthesizedExpression; exports2.pipelineBareFunction = pipelineBareFunction; exports2.pipelinePrimaryTopicReference = pipelinePrimaryTopicReference; exports2.pipelineTopicExpression = pipelineTopicExpression; exports2.placeholder = placeholder; exports2.privateName = privateName; exports2.program = program; exports2.qualifiedTypeIdentifier = qualifiedTypeIdentifier; exports2.recordExpression = recordExpression; exports2.regExpLiteral = regExpLiteral; exports2.regexLiteral = RegexLiteral; exports2.restElement = restElement; exports2.restProperty = RestProperty; exports2.returnStatement = returnStatement; exports2.sequenceExpression = sequenceExpression; exports2.spreadElement = spreadElement; exports2.spreadProperty = SpreadProperty; exports2.staticBlock = staticBlock; exports2.stringLiteral = stringLiteral; exports2.stringLiteralTypeAnnotation = stringLiteralTypeAnnotation; exports2.stringTypeAnnotation = stringTypeAnnotation; exports2.super = _super; exports2.switchCase = switchCase; exports2.switchStatement = switchStatement; exports2.symbolTypeAnnotation = symbolTypeAnnotation; exports2.taggedTemplateExpression = taggedTemplateExpression; exports2.templateElement = templateElement; exports2.templateLiteral = templateLiteral; exports2.thisExpression = thisExpression; exports2.thisTypeAnnotation = thisTypeAnnotation; exports2.throwStatement = throwStatement; exports2.topicReference = topicReference; exports2.tryStatement = tryStatement; exports2.tSAnyKeyword = exports2.tsAnyKeyword = tsAnyKeyword; exports2.tSArrayType = exports2.tsArrayType = tsArrayType; exports2.tSAsExpression = exports2.tsAsExpression = tsAsExpression; exports2.tSBigIntKeyword = exports2.tsBigIntKeyword = tsBigIntKeyword; exports2.tSBooleanKeyword = exports2.tsBooleanKeyword = tsBooleanKeyword; exports2.tSCallSignatureDeclaration = exports2.tsCallSignatureDeclaration = tsCallSignatureDeclaration; exports2.tSConditionalType = exports2.tsConditionalType = tsConditionalType; exports2.tSConstructSignatureDeclaration = exports2.tsConstructSignatureDeclaration = tsConstructSignatureDeclaration; exports2.tSConstructorType = exports2.tsConstructorType = tsConstructorType; exports2.tSDeclareFunction = exports2.tsDeclareFunction = tsDeclareFunction; exports2.tSDeclareMethod = exports2.tsDeclareMethod = tsDeclareMethod; exports2.tSEnumDeclaration = exports2.tsEnumDeclaration = tsEnumDeclaration; exports2.tSEnumMember = exports2.tsEnumMember = tsEnumMember; exports2.tSExportAssignment = exports2.tsExportAssignment = tsExportAssignment; exports2.tSExpressionWithTypeArguments = exports2.tsExpressionWithTypeArguments = tsExpressionWithTypeArguments; exports2.tSExternalModuleReference = exports2.tsExternalModuleReference = tsExternalModuleReference; exports2.tSFunctionType = exports2.tsFunctionType = tsFunctionType; exports2.tSImportEqualsDeclaration = exports2.tsImportEqualsDeclaration = tsImportEqualsDeclaration; exports2.tSImportType = exports2.tsImportType = tsImportType; exports2.tSIndexSignature = exports2.tsIndexSignature = tsIndexSignature; exports2.tSIndexedAccessType = exports2.tsIndexedAccessType = tsIndexedAccessType; exports2.tSInferType = exports2.tsInferType = tsInferType; exports2.tSInterfaceBody = exports2.tsInterfaceBody = tsInterfaceBody; exports2.tSInterfaceDeclaration = exports2.tsInterfaceDeclaration = tsInterfaceDeclaration; exports2.tSIntersectionType = exports2.tsIntersectionType = tsIntersectionType; exports2.tSIntrinsicKeyword = exports2.tsIntrinsicKeyword = tsIntrinsicKeyword; exports2.tSLiteralType = exports2.tsLiteralType = tsLiteralType; exports2.tSMappedType = exports2.tsMappedType = tsMappedType; exports2.tSMethodSignature = exports2.tsMethodSignature = tsMethodSignature; exports2.tSModuleBlock = exports2.tsModuleBlock = tsModuleBlock; exports2.tSModuleDeclaration = exports2.tsModuleDeclaration = tsModuleDeclaration; exports2.tSNamedTupleMember = exports2.tsNamedTupleMember = tsNamedTupleMember; exports2.tSNamespaceExportDeclaration = exports2.tsNamespaceExportDeclaration = tsNamespaceExportDeclaration; exports2.tSNeverKeyword = exports2.tsNeverKeyword = tsNeverKeyword; exports2.tSNonNullExpression = exports2.tsNonNullExpression = tsNonNullExpression; exports2.tSNullKeyword = exports2.tsNullKeyword = tsNullKeyword; exports2.tSNumberKeyword = exports2.tsNumberKeyword = tsNumberKeyword; exports2.tSObjectKeyword = exports2.tsObjectKeyword = tsObjectKeyword; exports2.tSOptionalType = exports2.tsOptionalType = tsOptionalType; exports2.tSParameterProperty = exports2.tsParameterProperty = tsParameterProperty; exports2.tSParenthesizedType = exports2.tsParenthesizedType = tsParenthesizedType; exports2.tSPropertySignature = exports2.tsPropertySignature = tsPropertySignature; exports2.tSQualifiedName = exports2.tsQualifiedName = tsQualifiedName; exports2.tSRestType = exports2.tsRestType = tsRestType; exports2.tSStringKeyword = exports2.tsStringKeyword = tsStringKeyword; exports2.tSSymbolKeyword = exports2.tsSymbolKeyword = tsSymbolKeyword; exports2.tSThisType = exports2.tsThisType = tsThisType; exports2.tSTupleType = exports2.tsTupleType = tsTupleType; exports2.tSTypeAliasDeclaration = exports2.tsTypeAliasDeclaration = tsTypeAliasDeclaration; exports2.tSTypeAnnotation = exports2.tsTypeAnnotation = tsTypeAnnotation; exports2.tSTypeAssertion = exports2.tsTypeAssertion = tsTypeAssertion; exports2.tSTypeLiteral = exports2.tsTypeLiteral = tsTypeLiteral; exports2.tSTypeOperator = exports2.tsTypeOperator = tsTypeOperator; exports2.tSTypeParameter = exports2.tsTypeParameter = tsTypeParameter; exports2.tSTypeParameterDeclaration = exports2.tsTypeParameterDeclaration = tsTypeParameterDeclaration; exports2.tSTypeParameterInstantiation = exports2.tsTypeParameterInstantiation = tsTypeParameterInstantiation; exports2.tSTypePredicate = exports2.tsTypePredicate = tsTypePredicate; exports2.tSTypeQuery = exports2.tsTypeQuery = tsTypeQuery; exports2.tSTypeReference = exports2.tsTypeReference = tsTypeReference; exports2.tSUndefinedKeyword = exports2.tsUndefinedKeyword = tsUndefinedKeyword; exports2.tSUnionType = exports2.tsUnionType = tsUnionType; exports2.tSUnknownKeyword = exports2.tsUnknownKeyword = tsUnknownKeyword; exports2.tSVoidKeyword = exports2.tsVoidKeyword = tsVoidKeyword; exports2.tupleExpression = tupleExpression; exports2.tupleTypeAnnotation = tupleTypeAnnotation; exports2.typeAlias = typeAlias; exports2.typeAnnotation = typeAnnotation; exports2.typeCastExpression = typeCastExpression; exports2.typeParameter = typeParameter; exports2.typeParameterDeclaration = typeParameterDeclaration; exports2.typeParameterInstantiation = typeParameterInstantiation; exports2.typeofTypeAnnotation = typeofTypeAnnotation; exports2.unaryExpression = unaryExpression; exports2.unionTypeAnnotation = unionTypeAnnotation; exports2.updateExpression = updateExpression; exports2.v8IntrinsicIdentifier = v8IntrinsicIdentifier; exports2.variableDeclaration = variableDeclaration; exports2.variableDeclarator = variableDeclarator; exports2.variance = variance; exports2.voidTypeAnnotation = voidTypeAnnotation; exports2.whileStatement = whileStatement; exports2.withStatement = withStatement; exports2.yieldExpression = yieldExpression; var _builder = require_builder2(); function arrayExpression(elements) { return _builder.default.apply("ArrayExpression", arguments); } function assignmentExpression(operator, left, right) { return _builder.default.apply("AssignmentExpression", arguments); } function binaryExpression(operator, left, right) { return _builder.default.apply("BinaryExpression", arguments); } function interpreterDirective(value) { return _builder.default.apply("InterpreterDirective", arguments); } function directive(value) { return _builder.default.apply("Directive", arguments); } function directiveLiteral(value) { return _builder.default.apply("DirectiveLiteral", arguments); } function blockStatement(body, directives) { return _builder.default.apply("BlockStatement", arguments); } function breakStatement(label) { return _builder.default.apply("BreakStatement", arguments); } function callExpression(callee, _arguments) { return _builder.default.apply("CallExpression", arguments); } function catchClause(param, body) { return _builder.default.apply("CatchClause", arguments); } function conditionalExpression(test, consequent, alternate) { return _builder.default.apply("ConditionalExpression", arguments); } function continueStatement(label) { return _builder.default.apply("ContinueStatement", arguments); } function debuggerStatement() { return _builder.default.apply("DebuggerStatement", arguments); } function doWhileStatement(test, body) { return _builder.default.apply("DoWhileStatement", arguments); } function emptyStatement() { return _builder.default.apply("EmptyStatement", arguments); } function expressionStatement(expression) { return _builder.default.apply("ExpressionStatement", arguments); } function file(program2, comments, tokens) { return _builder.default.apply("File", arguments); } function forInStatement(left, right, body) { return _builder.default.apply("ForInStatement", arguments); } function forStatement(init, test, update, body) { return _builder.default.apply("ForStatement", arguments); } function functionDeclaration(id, params, body, generator, async) { return _builder.default.apply("FunctionDeclaration", arguments); } function functionExpression(id, params, body, generator, async) { return _builder.default.apply("FunctionExpression", arguments); } function identifier(name) { return _builder.default.apply("Identifier", arguments); } function ifStatement(test, consequent, alternate) { return _builder.default.apply("IfStatement", arguments); } function labeledStatement(label, body) { return _builder.default.apply("LabeledStatement", arguments); } function stringLiteral(value) { return _builder.default.apply("StringLiteral", arguments); } function numericLiteral(value) { return _builder.default.apply("NumericLiteral", arguments); } function nullLiteral() { return _builder.default.apply("NullLiteral", arguments); } function booleanLiteral(value) { return _builder.default.apply("BooleanLiteral", arguments); } function regExpLiteral(pattern, flags) { return _builder.default.apply("RegExpLiteral", arguments); } function logicalExpression(operator, left, right) { return _builder.default.apply("LogicalExpression", arguments); } function memberExpression(object, property, computed, optional) { return _builder.default.apply("MemberExpression", arguments); } function newExpression(callee, _arguments) { return _builder.default.apply("NewExpression", arguments); } function program(body, directives, sourceType, interpreter) { return _builder.default.apply("Program", arguments); } function objectExpression(properties) { return _builder.default.apply("ObjectExpression", arguments); } function objectMethod(kind, key, params, body, computed, generator, async) { return _builder.default.apply("ObjectMethod", arguments); } function objectProperty(key, value, computed, shorthand, decorators) { return _builder.default.apply("ObjectProperty", arguments); } function restElement(argument) { return _builder.default.apply("RestElement", arguments); } function returnStatement(argument) { return _builder.default.apply("ReturnStatement", arguments); } function sequenceExpression(expressions) { return _builder.default.apply("SequenceExpression", arguments); } function parenthesizedExpression(expression) { return _builder.default.apply("ParenthesizedExpression", arguments); } function switchCase(test, consequent) { return _builder.default.apply("SwitchCase", arguments); } function switchStatement(discriminant, cases) { return _builder.default.apply("SwitchStatement", arguments); } function thisExpression() { return _builder.default.apply("ThisExpression", arguments); } function throwStatement(argument) { return _builder.default.apply("ThrowStatement", arguments); } function tryStatement(block, handler, finalizer) { return _builder.default.apply("TryStatement", arguments); } function unaryExpression(operator, argument, prefix) { return _builder.default.apply("UnaryExpression", arguments); } function updateExpression(operator, argument, prefix) { return _builder.default.apply("UpdateExpression", arguments); } function variableDeclaration(kind, declarations) { return _builder.default.apply("VariableDeclaration", arguments); } function variableDeclarator(id, init) { return _builder.default.apply("VariableDeclarator", arguments); } function whileStatement(test, body) { return _builder.default.apply("WhileStatement", arguments); } function withStatement(object, body) { return _builder.default.apply("WithStatement", arguments); } function assignmentPattern(left, right) { return _builder.default.apply("AssignmentPattern", arguments); } function arrayPattern(elements) { return _builder.default.apply("ArrayPattern", arguments); } function arrowFunctionExpression(params, body, async) { return _builder.default.apply("ArrowFunctionExpression", arguments); } function classBody(body) { return _builder.default.apply("ClassBody", arguments); } function classExpression(id, superClass, body, decorators) { return _builder.default.apply("ClassExpression", arguments); } function classDeclaration(id, superClass, body, decorators) { return _builder.default.apply("ClassDeclaration", arguments); } function exportAllDeclaration(source) { return _builder.default.apply("ExportAllDeclaration", arguments); } function exportDefaultDeclaration(declaration) { return _builder.default.apply("ExportDefaultDeclaration", arguments); } function exportNamedDeclaration(declaration, specifiers, source) { return _builder.default.apply("ExportNamedDeclaration", arguments); } function exportSpecifier(local, exported) { return _builder.default.apply("ExportSpecifier", arguments); } function forOfStatement(left, right, body, _await) { return _builder.default.apply("ForOfStatement", arguments); } function importDeclaration(specifiers, source) { return _builder.default.apply("ImportDeclaration", arguments); } function importDefaultSpecifier(local) { return _builder.default.apply("ImportDefaultSpecifier", arguments); } function importNamespaceSpecifier(local) { return _builder.default.apply("ImportNamespaceSpecifier", arguments); } function importSpecifier(local, imported) { return _builder.default.apply("ImportSpecifier", arguments); } function metaProperty(meta, property) { return _builder.default.apply("MetaProperty", arguments); } function classMethod(kind, key, params, body, computed, _static, generator, async) { return _builder.default.apply("ClassMethod", arguments); } function objectPattern(properties) { return _builder.default.apply("ObjectPattern", arguments); } function spreadElement(argument) { return _builder.default.apply("SpreadElement", arguments); } function _super() { return _builder.default.apply("Super", arguments); } function taggedTemplateExpression(tag, quasi) { return _builder.default.apply("TaggedTemplateExpression", arguments); } function templateElement(value, tail) { return _builder.default.apply("TemplateElement", arguments); } function templateLiteral(quasis, expressions) { return _builder.default.apply("TemplateLiteral", arguments); } function yieldExpression(argument, delegate) { return _builder.default.apply("YieldExpression", arguments); } function awaitExpression(argument) { return _builder.default.apply("AwaitExpression", arguments); } function _import() { return _builder.default.apply("Import", arguments); } function bigIntLiteral(value) { return _builder.default.apply("BigIntLiteral", arguments); } function exportNamespaceSpecifier(exported) { return _builder.default.apply("ExportNamespaceSpecifier", arguments); } function optionalMemberExpression(object, property, computed, optional) { return _builder.default.apply("OptionalMemberExpression", arguments); } function optionalCallExpression(callee, _arguments, optional) { return _builder.default.apply("OptionalCallExpression", arguments); } function classProperty(key, value, typeAnnotation2, decorators, computed, _static) { return _builder.default.apply("ClassProperty", arguments); } function classAccessorProperty(key, value, typeAnnotation2, decorators, computed, _static) { return _builder.default.apply("ClassAccessorProperty", arguments); } function classPrivateProperty(key, value, decorators, _static) { return _builder.default.apply("ClassPrivateProperty", arguments); } function classPrivateMethod(kind, key, params, body, _static) { return _builder.default.apply("ClassPrivateMethod", arguments); } function privateName(id) { return _builder.default.apply("PrivateName", arguments); } function staticBlock(body) { return _builder.default.apply("StaticBlock", arguments); } function anyTypeAnnotation() { return _builder.default.apply("AnyTypeAnnotation", arguments); } function arrayTypeAnnotation(elementType) { return _builder.default.apply("ArrayTypeAnnotation", arguments); } function booleanTypeAnnotation() { return _builder.default.apply("BooleanTypeAnnotation", arguments); } function booleanLiteralTypeAnnotation(value) { return _builder.default.apply("BooleanLiteralTypeAnnotation", arguments); } function nullLiteralTypeAnnotation() { return _builder.default.apply("NullLiteralTypeAnnotation", arguments); } function classImplements(id, typeParameters) { return _builder.default.apply("ClassImplements", arguments); } function declareClass(id, typeParameters, _extends, body) { return _builder.default.apply("DeclareClass", arguments); } function declareFunction(id) { return _builder.default.apply("DeclareFunction", arguments); } function declareInterface(id, typeParameters, _extends, body) { return _builder.default.apply("DeclareInterface", arguments); } function declareModule(id, body, kind) { return _builder.default.apply("DeclareModule", arguments); } function declareModuleExports(typeAnnotation2) { return _builder.default.apply("DeclareModuleExports", arguments); } function declareTypeAlias(id, typeParameters, right) { return _builder.default.apply("DeclareTypeAlias", arguments); } function declareOpaqueType(id, typeParameters, supertype) { return _builder.default.apply("DeclareOpaqueType", arguments); } function declareVariable(id) { return _builder.default.apply("DeclareVariable", arguments); } function declareExportDeclaration(declaration, specifiers, source) { return _builder.default.apply("DeclareExportDeclaration", arguments); } function declareExportAllDeclaration(source) { return _builder.default.apply("DeclareExportAllDeclaration", arguments); } function declaredPredicate(value) { return _builder.default.apply("DeclaredPredicate", arguments); } function existsTypeAnnotation() { return _builder.default.apply("ExistsTypeAnnotation", arguments); } function functionTypeAnnotation(typeParameters, params, rest, returnType) { return _builder.default.apply("FunctionTypeAnnotation", arguments); } function functionTypeParam(name, typeAnnotation2) { return _builder.default.apply("FunctionTypeParam", arguments); } function genericTypeAnnotation(id, typeParameters) { return _builder.default.apply("GenericTypeAnnotation", arguments); } function inferredPredicate() { return _builder.default.apply("InferredPredicate", arguments); } function interfaceExtends(id, typeParameters) { return _builder.default.apply("InterfaceExtends", arguments); } function interfaceDeclaration(id, typeParameters, _extends, body) { return _builder.default.apply("InterfaceDeclaration", arguments); } function interfaceTypeAnnotation(_extends, body) { return _builder.default.apply("InterfaceTypeAnnotation", arguments); } function intersectionTypeAnnotation(types) { return _builder.default.apply("IntersectionTypeAnnotation", arguments); } function mixedTypeAnnotation() { return _builder.default.apply("MixedTypeAnnotation", arguments); } function emptyTypeAnnotation() { return _builder.default.apply("EmptyTypeAnnotation", arguments); } function nullableTypeAnnotation(typeAnnotation2) { return _builder.default.apply("NullableTypeAnnotation", arguments); } function numberLiteralTypeAnnotation(value) { return _builder.default.apply("NumberLiteralTypeAnnotation", arguments); } function numberTypeAnnotation() { return _builder.default.apply("NumberTypeAnnotation", arguments); } function objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) { return _builder.default.apply("ObjectTypeAnnotation", arguments); } function objectTypeInternalSlot(id, value, optional, _static, method) { return _builder.default.apply("ObjectTypeInternalSlot", arguments); } function objectTypeCallProperty(value) { return _builder.default.apply("ObjectTypeCallProperty", arguments); } function objectTypeIndexer(id, key, value, variance2) { return _builder.default.apply("ObjectTypeIndexer", arguments); } function objectTypeProperty(key, value, variance2) { return _builder.default.apply("ObjectTypeProperty", arguments); } function objectTypeSpreadProperty(argument) { return _builder.default.apply("ObjectTypeSpreadProperty", arguments); } function opaqueType(id, typeParameters, supertype, impltype) { return _builder.default.apply("OpaqueType", arguments); } function qualifiedTypeIdentifier(id, qualification) { return _builder.default.apply("QualifiedTypeIdentifier", arguments); } function stringLiteralTypeAnnotation(value) { return _builder.default.apply("StringLiteralTypeAnnotation", arguments); } function stringTypeAnnotation() { return _builder.default.apply("StringTypeAnnotation", arguments); } function symbolTypeAnnotation() { return _builder.default.apply("SymbolTypeAnnotation", arguments); } function thisTypeAnnotation() { return _builder.default.apply("ThisTypeAnnotation", arguments); } function tupleTypeAnnotation(types) { return _builder.default.apply("TupleTypeAnnotation", arguments); } function typeofTypeAnnotation(argument) { return _builder.default.apply("TypeofTypeAnnotation", arguments); } function typeAlias(id, typeParameters, right) { return _builder.default.apply("TypeAlias", arguments); } function typeAnnotation(typeAnnotation2) { return _builder.default.apply("TypeAnnotation", arguments); } function typeCastExpression(expression, typeAnnotation2) { return _builder.default.apply("TypeCastExpression", arguments); } function typeParameter(bound, _default, variance2) { return _builder.default.apply("TypeParameter", arguments); } function typeParameterDeclaration(params) { return _builder.default.apply("TypeParameterDeclaration", arguments); } function typeParameterInstantiation(params) { return _builder.default.apply("TypeParameterInstantiation", arguments); } function unionTypeAnnotation(types) { return _builder.default.apply("UnionTypeAnnotation", arguments); } function variance(kind) { return _builder.default.apply("Variance", arguments); } function voidTypeAnnotation() { return _builder.default.apply("VoidTypeAnnotation", arguments); } function enumDeclaration(id, body) { return _builder.default.apply("EnumDeclaration", arguments); } function enumBooleanBody(members) { return _builder.default.apply("EnumBooleanBody", arguments); } function enumNumberBody(members) { return _builder.default.apply("EnumNumberBody", arguments); } function enumStringBody(members) { return _builder.default.apply("EnumStringBody", arguments); } function enumSymbolBody(members) { return _builder.default.apply("EnumSymbolBody", arguments); } function enumBooleanMember(id) { return _builder.default.apply("EnumBooleanMember", arguments); } function enumNumberMember(id, init) { return _builder.default.apply("EnumNumberMember", arguments); } function enumStringMember(id, init) { return _builder.default.apply("EnumStringMember", arguments); } function enumDefaultedMember(id) { return _builder.default.apply("EnumDefaultedMember", arguments); } function indexedAccessType(objectType, indexType) { return _builder.default.apply("IndexedAccessType", arguments); } function optionalIndexedAccessType(objectType, indexType) { return _builder.default.apply("OptionalIndexedAccessType", arguments); } function jsxAttribute(name, value) { return _builder.default.apply("JSXAttribute", arguments); } function jsxClosingElement(name) { return _builder.default.apply("JSXClosingElement", arguments); } function jsxElement(openingElement, closingElement, children, selfClosing) { return _builder.default.apply("JSXElement", arguments); } function jsxEmptyExpression() { return _builder.default.apply("JSXEmptyExpression", arguments); } function jsxExpressionContainer(expression) { return _builder.default.apply("JSXExpressionContainer", arguments); } function jsxSpreadChild(expression) { return _builder.default.apply("JSXSpreadChild", arguments); } function jsxIdentifier(name) { return _builder.default.apply("JSXIdentifier", arguments); } function jsxMemberExpression(object, property) { return _builder.default.apply("JSXMemberExpression", arguments); } function jsxNamespacedName(namespace, name) { return _builder.default.apply("JSXNamespacedName", arguments); } function jsxOpeningElement(name, attributes, selfClosing) { return _builder.default.apply("JSXOpeningElement", arguments); } function jsxSpreadAttribute(argument) { return _builder.default.apply("JSXSpreadAttribute", arguments); } function jsxText(value) { return _builder.default.apply("JSXText", arguments); } function jsxFragment(openingFragment, closingFragment, children) { return _builder.default.apply("JSXFragment", arguments); } function jsxOpeningFragment() { return _builder.default.apply("JSXOpeningFragment", arguments); } function jsxClosingFragment() { return _builder.default.apply("JSXClosingFragment", arguments); } function noop() { return _builder.default.apply("Noop", arguments); } function placeholder(expectedNode, name) { return _builder.default.apply("Placeholder", arguments); } function v8IntrinsicIdentifier(name) { return _builder.default.apply("V8IntrinsicIdentifier", arguments); } function argumentPlaceholder() { return _builder.default.apply("ArgumentPlaceholder", arguments); } function bindExpression(object, callee) { return _builder.default.apply("BindExpression", arguments); } function importAttribute(key, value) { return _builder.default.apply("ImportAttribute", arguments); } function decorator(expression) { return _builder.default.apply("Decorator", arguments); } function doExpression(body, async) { return _builder.default.apply("DoExpression", arguments); } function exportDefaultSpecifier(exported) { return _builder.default.apply("ExportDefaultSpecifier", arguments); } function recordExpression(properties) { return _builder.default.apply("RecordExpression", arguments); } function tupleExpression(elements) { return _builder.default.apply("TupleExpression", arguments); } function decimalLiteral(value) { return _builder.default.apply("DecimalLiteral", arguments); } function moduleExpression(body) { return _builder.default.apply("ModuleExpression", arguments); } function topicReference() { return _builder.default.apply("TopicReference", arguments); } function pipelineTopicExpression(expression) { return _builder.default.apply("PipelineTopicExpression", arguments); } function pipelineBareFunction(callee) { return _builder.default.apply("PipelineBareFunction", arguments); } function pipelinePrimaryTopicReference() { return _builder.default.apply("PipelinePrimaryTopicReference", arguments); } function tsParameterProperty(parameter) { return _builder.default.apply("TSParameterProperty", arguments); } function tsDeclareFunction(id, typeParameters, params, returnType) { return _builder.default.apply("TSDeclareFunction", arguments); } function tsDeclareMethod(decorators, key, typeParameters, params, returnType) { return _builder.default.apply("TSDeclareMethod", arguments); } function tsQualifiedName(left, right) { return _builder.default.apply("TSQualifiedName", arguments); } function tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation2) { return _builder.default.apply("TSCallSignatureDeclaration", arguments); } function tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation2) { return _builder.default.apply("TSConstructSignatureDeclaration", arguments); } function tsPropertySignature(key, typeAnnotation2, initializer) { return _builder.default.apply("TSPropertySignature", arguments); } function tsMethodSignature(key, typeParameters, parameters, typeAnnotation2) { return _builder.default.apply("TSMethodSignature", arguments); } function tsIndexSignature(parameters, typeAnnotation2) { return _builder.default.apply("TSIndexSignature", arguments); } function tsAnyKeyword() { return _builder.default.apply("TSAnyKeyword", arguments); } function tsBooleanKeyword() { return _builder.default.apply("TSBooleanKeyword", arguments); } function tsBigIntKeyword() { return _builder.default.apply("TSBigIntKeyword", arguments); } function tsIntrinsicKeyword() { return _builder.default.apply("TSIntrinsicKeyword", arguments); } function tsNeverKeyword() { return _builder.default.apply("TSNeverKeyword", arguments); } function tsNullKeyword() { return _builder.default.apply("TSNullKeyword", arguments); } function tsNumberKeyword() { return _builder.default.apply("TSNumberKeyword", arguments); } function tsObjectKeyword() { return _builder.default.apply("TSObjectKeyword", arguments); } function tsStringKeyword() { return _builder.default.apply("TSStringKeyword", arguments); } function tsSymbolKeyword() { return _builder.default.apply("TSSymbolKeyword", arguments); } function tsUndefinedKeyword() { return _builder.default.apply("TSUndefinedKeyword", arguments); } function tsUnknownKeyword() { return _builder.default.apply("TSUnknownKeyword", arguments); } function tsVoidKeyword() { return _builder.default.apply("TSVoidKeyword", arguments); } function tsThisType() { return _builder.default.apply("TSThisType", arguments); } function tsFunctionType(typeParameters, parameters, typeAnnotation2) { return _builder.default.apply("TSFunctionType", arguments); } function tsConstructorType(typeParameters, parameters, typeAnnotation2) { return _builder.default.apply("TSConstructorType", arguments); } function tsTypeReference(typeName, typeParameters) { return _builder.default.apply("TSTypeReference", arguments); } function tsTypePredicate(parameterName, typeAnnotation2, asserts) { return _builder.default.apply("TSTypePredicate", arguments); } function tsTypeQuery(exprName) { return _builder.default.apply("TSTypeQuery", arguments); } function tsTypeLiteral(members) { return _builder.default.apply("TSTypeLiteral", arguments); } function tsArrayType(elementType) { return _builder.default.apply("TSArrayType", arguments); } function tsTupleType(elementTypes) { return _builder.default.apply("TSTupleType", arguments); } function tsOptionalType(typeAnnotation2) { return _builder.default.apply("TSOptionalType", arguments); } function tsRestType(typeAnnotation2) { return _builder.default.apply("TSRestType", arguments); } function tsNamedTupleMember(label, elementType, optional) { return _builder.default.apply("TSNamedTupleMember", arguments); } function tsUnionType(types) { return _builder.default.apply("TSUnionType", arguments); } function tsIntersectionType(types) { return _builder.default.apply("TSIntersectionType", arguments); } function tsConditionalType(checkType, extendsType, trueType, falseType) { return _builder.default.apply("TSConditionalType", arguments); } function tsInferType(typeParameter2) { return _builder.default.apply("TSInferType", arguments); } function tsParenthesizedType(typeAnnotation2) { return _builder.default.apply("TSParenthesizedType", arguments); } function tsTypeOperator(typeAnnotation2) { return _builder.default.apply("TSTypeOperator", arguments); } function tsIndexedAccessType(objectType, indexType) { return _builder.default.apply("TSIndexedAccessType", arguments); } function tsMappedType(typeParameter2, typeAnnotation2, nameType) { return _builder.default.apply("TSMappedType", arguments); } function tsLiteralType(literal) { return _builder.default.apply("TSLiteralType", arguments); } function tsExpressionWithTypeArguments(expression, typeParameters) { return _builder.default.apply("TSExpressionWithTypeArguments", arguments); } function tsInterfaceDeclaration(id, typeParameters, _extends, body) { return _builder.default.apply("TSInterfaceDeclaration", arguments); } function tsInterfaceBody(body) { return _builder.default.apply("TSInterfaceBody", arguments); } function tsTypeAliasDeclaration(id, typeParameters, typeAnnotation2) { return _builder.default.apply("TSTypeAliasDeclaration", arguments); } function tsAsExpression(expression, typeAnnotation2) { return _builder.default.apply("TSAsExpression", arguments); } function tsTypeAssertion(typeAnnotation2, expression) { return _builder.default.apply("TSTypeAssertion", arguments); } function tsEnumDeclaration(id, members) { return _builder.default.apply("TSEnumDeclaration", arguments); } function tsEnumMember(id, initializer) { return _builder.default.apply("TSEnumMember", arguments); } function tsModuleDeclaration(id, body) { return _builder.default.apply("TSModuleDeclaration", arguments); } function tsModuleBlock(body) { return _builder.default.apply("TSModuleBlock", arguments); } function tsImportType(argument, qualifier, typeParameters) { return _builder.default.apply("TSImportType", arguments); } function tsImportEqualsDeclaration(id, moduleReference) { return _builder.default.apply("TSImportEqualsDeclaration", arguments); } function tsExternalModuleReference(expression) { return _builder.default.apply("TSExternalModuleReference", arguments); } function tsNonNullExpression(expression) { return _builder.default.apply("TSNonNullExpression", arguments); } function tsExportAssignment(expression) { return _builder.default.apply("TSExportAssignment", arguments); } function tsNamespaceExportDeclaration(id) { return _builder.default.apply("TSNamespaceExportDeclaration", arguments); } function tsTypeAnnotation(typeAnnotation2) { return _builder.default.apply("TSTypeAnnotation", arguments); } function tsTypeParameterInstantiation(params) { return _builder.default.apply("TSTypeParameterInstantiation", arguments); } function tsTypeParameterDeclaration(params) { return _builder.default.apply("TSTypeParameterDeclaration", arguments); } function tsTypeParameter(constraint, _default, name) { return _builder.default.apply("TSTypeParameter", arguments); } function NumberLiteral(value) { console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); return _builder.default.apply("NumberLiteral", arguments); } function RegexLiteral(pattern, flags) { console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); return _builder.default.apply("RegexLiteral", arguments); } function RestProperty(argument) { console.trace("The node type RestProperty has been renamed to RestElement"); return _builder.default.apply("RestProperty", arguments); } function SpreadProperty(argument) { console.trace("The node type SpreadProperty has been renamed to SpreadElement"); return _builder.default.apply("SpreadProperty", arguments); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js var require_cleanJSXElementLiteralChild2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = cleanJSXElementLiteralChild; var _generated = require_generated7(); function cleanJSXElementLiteralChild(child, args) { const lines = child.value.split(/\r\n|\n|\r/); let lastNonEmptyLine = 0; for (let i = 0; i < lines.length; i++) { if (lines[i].match(/[^ \t]/)) { lastNonEmptyLine = i; } } let str = ""; for (let i = 0; i < lines.length; i++) { const line = lines[i]; const isFirstLine = i === 0; const isLastLine = i === lines.length - 1; const isLastNonEmptyLine = i === lastNonEmptyLine; let trimmedLine = line.replace(/\t/g, " "); if (!isFirstLine) { trimmedLine = trimmedLine.replace(/^[ ]+/, ""); } if (!isLastLine) { trimmedLine = trimmedLine.replace(/[ ]+$/, ""); } if (trimmedLine) { if (!isLastNonEmptyLine) { trimmedLine += " "; } str += trimmedLine; } } if (str) args.push((0, _generated.stringLiteral)(str)); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/react/buildChildren.js var require_buildChildren2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/react/buildChildren.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = buildChildren; var _generated = require_generated6(); var _cleanJSXElementLiteralChild = require_cleanJSXElementLiteralChild2(); function buildChildren(node) { const elements = []; for (let i = 0; i < node.children.length; i++) { let child = node.children[i]; if ((0, _generated.isJSXText)(child)) { (0, _cleanJSXElementLiteralChild.default)(child, elements); continue; } if ((0, _generated.isJSXExpressionContainer)(child)) child = child.expression; if ((0, _generated.isJSXEmptyExpression)(child)) continue; elements.push(child); } return elements; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isNode.js var require_isNode2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isNode.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isNode; var _definitions = require_definitions2(); function isNode(node) { return !!(node && _definitions.VISITOR_KEYS[node.type]); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/asserts/assertNode.js var require_assertNode2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/asserts/assertNode.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = assertNode; var _isNode = require_isNode2(); function assertNode(node) { if (!(0, _isNode.default)(node)) { var _node$type; const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node); throw new TypeError(`Not a valid node of type "${type}"`); } } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/asserts/generated/index.js var require_generated8 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/asserts/generated/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.assertAccessor = assertAccessor; exports2.assertAnyTypeAnnotation = assertAnyTypeAnnotation; exports2.assertArgumentPlaceholder = assertArgumentPlaceholder; exports2.assertArrayExpression = assertArrayExpression; exports2.assertArrayPattern = assertArrayPattern; exports2.assertArrayTypeAnnotation = assertArrayTypeAnnotation; exports2.assertArrowFunctionExpression = assertArrowFunctionExpression; exports2.assertAssignmentExpression = assertAssignmentExpression; exports2.assertAssignmentPattern = assertAssignmentPattern; exports2.assertAwaitExpression = assertAwaitExpression; exports2.assertBigIntLiteral = assertBigIntLiteral; exports2.assertBinary = assertBinary; exports2.assertBinaryExpression = assertBinaryExpression; exports2.assertBindExpression = assertBindExpression; exports2.assertBlock = assertBlock; exports2.assertBlockParent = assertBlockParent; exports2.assertBlockStatement = assertBlockStatement; exports2.assertBooleanLiteral = assertBooleanLiteral; exports2.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation; exports2.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation; exports2.assertBreakStatement = assertBreakStatement; exports2.assertCallExpression = assertCallExpression; exports2.assertCatchClause = assertCatchClause; exports2.assertClass = assertClass; exports2.assertClassAccessorProperty = assertClassAccessorProperty; exports2.assertClassBody = assertClassBody; exports2.assertClassDeclaration = assertClassDeclaration; exports2.assertClassExpression = assertClassExpression; exports2.assertClassImplements = assertClassImplements; exports2.assertClassMethod = assertClassMethod; exports2.assertClassPrivateMethod = assertClassPrivateMethod; exports2.assertClassPrivateProperty = assertClassPrivateProperty; exports2.assertClassProperty = assertClassProperty; exports2.assertCompletionStatement = assertCompletionStatement; exports2.assertConditional = assertConditional; exports2.assertConditionalExpression = assertConditionalExpression; exports2.assertContinueStatement = assertContinueStatement; exports2.assertDebuggerStatement = assertDebuggerStatement; exports2.assertDecimalLiteral = assertDecimalLiteral; exports2.assertDeclaration = assertDeclaration; exports2.assertDeclareClass = assertDeclareClass; exports2.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration; exports2.assertDeclareExportDeclaration = assertDeclareExportDeclaration; exports2.assertDeclareFunction = assertDeclareFunction; exports2.assertDeclareInterface = assertDeclareInterface; exports2.assertDeclareModule = assertDeclareModule; exports2.assertDeclareModuleExports = assertDeclareModuleExports; exports2.assertDeclareOpaqueType = assertDeclareOpaqueType; exports2.assertDeclareTypeAlias = assertDeclareTypeAlias; exports2.assertDeclareVariable = assertDeclareVariable; exports2.assertDeclaredPredicate = assertDeclaredPredicate; exports2.assertDecorator = assertDecorator; exports2.assertDirective = assertDirective; exports2.assertDirectiveLiteral = assertDirectiveLiteral; exports2.assertDoExpression = assertDoExpression; exports2.assertDoWhileStatement = assertDoWhileStatement; exports2.assertEmptyStatement = assertEmptyStatement; exports2.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation; exports2.assertEnumBody = assertEnumBody; exports2.assertEnumBooleanBody = assertEnumBooleanBody; exports2.assertEnumBooleanMember = assertEnumBooleanMember; exports2.assertEnumDeclaration = assertEnumDeclaration; exports2.assertEnumDefaultedMember = assertEnumDefaultedMember; exports2.assertEnumMember = assertEnumMember; exports2.assertEnumNumberBody = assertEnumNumberBody; exports2.assertEnumNumberMember = assertEnumNumberMember; exports2.assertEnumStringBody = assertEnumStringBody; exports2.assertEnumStringMember = assertEnumStringMember; exports2.assertEnumSymbolBody = assertEnumSymbolBody; exports2.assertExistsTypeAnnotation = assertExistsTypeAnnotation; exports2.assertExportAllDeclaration = assertExportAllDeclaration; exports2.assertExportDeclaration = assertExportDeclaration; exports2.assertExportDefaultDeclaration = assertExportDefaultDeclaration; exports2.assertExportDefaultSpecifier = assertExportDefaultSpecifier; exports2.assertExportNamedDeclaration = assertExportNamedDeclaration; exports2.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier; exports2.assertExportSpecifier = assertExportSpecifier; exports2.assertExpression = assertExpression; exports2.assertExpressionStatement = assertExpressionStatement; exports2.assertExpressionWrapper = assertExpressionWrapper; exports2.assertFile = assertFile; exports2.assertFlow = assertFlow; exports2.assertFlowBaseAnnotation = assertFlowBaseAnnotation; exports2.assertFlowDeclaration = assertFlowDeclaration; exports2.assertFlowPredicate = assertFlowPredicate; exports2.assertFlowType = assertFlowType; exports2.assertFor = assertFor; exports2.assertForInStatement = assertForInStatement; exports2.assertForOfStatement = assertForOfStatement; exports2.assertForStatement = assertForStatement; exports2.assertForXStatement = assertForXStatement; exports2.assertFunction = assertFunction; exports2.assertFunctionDeclaration = assertFunctionDeclaration; exports2.assertFunctionExpression = assertFunctionExpression; exports2.assertFunctionParent = assertFunctionParent; exports2.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation; exports2.assertFunctionTypeParam = assertFunctionTypeParam; exports2.assertGenericTypeAnnotation = assertGenericTypeAnnotation; exports2.assertIdentifier = assertIdentifier; exports2.assertIfStatement = assertIfStatement; exports2.assertImmutable = assertImmutable; exports2.assertImport = assertImport; exports2.assertImportAttribute = assertImportAttribute; exports2.assertImportDeclaration = assertImportDeclaration; exports2.assertImportDefaultSpecifier = assertImportDefaultSpecifier; exports2.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier; exports2.assertImportSpecifier = assertImportSpecifier; exports2.assertIndexedAccessType = assertIndexedAccessType; exports2.assertInferredPredicate = assertInferredPredicate; exports2.assertInterfaceDeclaration = assertInterfaceDeclaration; exports2.assertInterfaceExtends = assertInterfaceExtends; exports2.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation; exports2.assertInterpreterDirective = assertInterpreterDirective; exports2.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation; exports2.assertJSX = assertJSX; exports2.assertJSXAttribute = assertJSXAttribute; exports2.assertJSXClosingElement = assertJSXClosingElement; exports2.assertJSXClosingFragment = assertJSXClosingFragment; exports2.assertJSXElement = assertJSXElement; exports2.assertJSXEmptyExpression = assertJSXEmptyExpression; exports2.assertJSXExpressionContainer = assertJSXExpressionContainer; exports2.assertJSXFragment = assertJSXFragment; exports2.assertJSXIdentifier = assertJSXIdentifier; exports2.assertJSXMemberExpression = assertJSXMemberExpression; exports2.assertJSXNamespacedName = assertJSXNamespacedName; exports2.assertJSXOpeningElement = assertJSXOpeningElement; exports2.assertJSXOpeningFragment = assertJSXOpeningFragment; exports2.assertJSXSpreadAttribute = assertJSXSpreadAttribute; exports2.assertJSXSpreadChild = assertJSXSpreadChild; exports2.assertJSXText = assertJSXText; exports2.assertLVal = assertLVal; exports2.assertLabeledStatement = assertLabeledStatement; exports2.assertLiteral = assertLiteral; exports2.assertLogicalExpression = assertLogicalExpression; exports2.assertLoop = assertLoop; exports2.assertMemberExpression = assertMemberExpression; exports2.assertMetaProperty = assertMetaProperty; exports2.assertMethod = assertMethod; exports2.assertMiscellaneous = assertMiscellaneous; exports2.assertMixedTypeAnnotation = assertMixedTypeAnnotation; exports2.assertModuleDeclaration = assertModuleDeclaration; exports2.assertModuleExpression = assertModuleExpression; exports2.assertModuleSpecifier = assertModuleSpecifier; exports2.assertNewExpression = assertNewExpression; exports2.assertNoop = assertNoop; exports2.assertNullLiteral = assertNullLiteral; exports2.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation; exports2.assertNullableTypeAnnotation = assertNullableTypeAnnotation; exports2.assertNumberLiteral = assertNumberLiteral; exports2.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation; exports2.assertNumberTypeAnnotation = assertNumberTypeAnnotation; exports2.assertNumericLiteral = assertNumericLiteral; exports2.assertObjectExpression = assertObjectExpression; exports2.assertObjectMember = assertObjectMember; exports2.assertObjectMethod = assertObjectMethod; exports2.assertObjectPattern = assertObjectPattern; exports2.assertObjectProperty = assertObjectProperty; exports2.assertObjectTypeAnnotation = assertObjectTypeAnnotation; exports2.assertObjectTypeCallProperty = assertObjectTypeCallProperty; exports2.assertObjectTypeIndexer = assertObjectTypeIndexer; exports2.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot; exports2.assertObjectTypeProperty = assertObjectTypeProperty; exports2.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty; exports2.assertOpaqueType = assertOpaqueType; exports2.assertOptionalCallExpression = assertOptionalCallExpression; exports2.assertOptionalIndexedAccessType = assertOptionalIndexedAccessType; exports2.assertOptionalMemberExpression = assertOptionalMemberExpression; exports2.assertParenthesizedExpression = assertParenthesizedExpression; exports2.assertPattern = assertPattern; exports2.assertPatternLike = assertPatternLike; exports2.assertPipelineBareFunction = assertPipelineBareFunction; exports2.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference; exports2.assertPipelineTopicExpression = assertPipelineTopicExpression; exports2.assertPlaceholder = assertPlaceholder; exports2.assertPrivate = assertPrivate; exports2.assertPrivateName = assertPrivateName; exports2.assertProgram = assertProgram; exports2.assertProperty = assertProperty; exports2.assertPureish = assertPureish; exports2.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier; exports2.assertRecordExpression = assertRecordExpression; exports2.assertRegExpLiteral = assertRegExpLiteral; exports2.assertRegexLiteral = assertRegexLiteral; exports2.assertRestElement = assertRestElement; exports2.assertRestProperty = assertRestProperty; exports2.assertReturnStatement = assertReturnStatement; exports2.assertScopable = assertScopable; exports2.assertSequenceExpression = assertSequenceExpression; exports2.assertSpreadElement = assertSpreadElement; exports2.assertSpreadProperty = assertSpreadProperty; exports2.assertStandardized = assertStandardized; exports2.assertStatement = assertStatement; exports2.assertStaticBlock = assertStaticBlock; exports2.assertStringLiteral = assertStringLiteral; exports2.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation; exports2.assertStringTypeAnnotation = assertStringTypeAnnotation; exports2.assertSuper = assertSuper; exports2.assertSwitchCase = assertSwitchCase; exports2.assertSwitchStatement = assertSwitchStatement; exports2.assertSymbolTypeAnnotation = assertSymbolTypeAnnotation; exports2.assertTSAnyKeyword = assertTSAnyKeyword; exports2.assertTSArrayType = assertTSArrayType; exports2.assertTSAsExpression = assertTSAsExpression; exports2.assertTSBaseType = assertTSBaseType; exports2.assertTSBigIntKeyword = assertTSBigIntKeyword; exports2.assertTSBooleanKeyword = assertTSBooleanKeyword; exports2.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration; exports2.assertTSConditionalType = assertTSConditionalType; exports2.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration; exports2.assertTSConstructorType = assertTSConstructorType; exports2.assertTSDeclareFunction = assertTSDeclareFunction; exports2.assertTSDeclareMethod = assertTSDeclareMethod; exports2.assertTSEntityName = assertTSEntityName; exports2.assertTSEnumDeclaration = assertTSEnumDeclaration; exports2.assertTSEnumMember = assertTSEnumMember; exports2.assertTSExportAssignment = assertTSExportAssignment; exports2.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments; exports2.assertTSExternalModuleReference = assertTSExternalModuleReference; exports2.assertTSFunctionType = assertTSFunctionType; exports2.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration; exports2.assertTSImportType = assertTSImportType; exports2.assertTSIndexSignature = assertTSIndexSignature; exports2.assertTSIndexedAccessType = assertTSIndexedAccessType; exports2.assertTSInferType = assertTSInferType; exports2.assertTSInterfaceBody = assertTSInterfaceBody; exports2.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration; exports2.assertTSIntersectionType = assertTSIntersectionType; exports2.assertTSIntrinsicKeyword = assertTSIntrinsicKeyword; exports2.assertTSLiteralType = assertTSLiteralType; exports2.assertTSMappedType = assertTSMappedType; exports2.assertTSMethodSignature = assertTSMethodSignature; exports2.assertTSModuleBlock = assertTSModuleBlock; exports2.assertTSModuleDeclaration = assertTSModuleDeclaration; exports2.assertTSNamedTupleMember = assertTSNamedTupleMember; exports2.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration; exports2.assertTSNeverKeyword = assertTSNeverKeyword; exports2.assertTSNonNullExpression = assertTSNonNullExpression; exports2.assertTSNullKeyword = assertTSNullKeyword; exports2.assertTSNumberKeyword = assertTSNumberKeyword; exports2.assertTSObjectKeyword = assertTSObjectKeyword; exports2.assertTSOptionalType = assertTSOptionalType; exports2.assertTSParameterProperty = assertTSParameterProperty; exports2.assertTSParenthesizedType = assertTSParenthesizedType; exports2.assertTSPropertySignature = assertTSPropertySignature; exports2.assertTSQualifiedName = assertTSQualifiedName; exports2.assertTSRestType = assertTSRestType; exports2.assertTSStringKeyword = assertTSStringKeyword; exports2.assertTSSymbolKeyword = assertTSSymbolKeyword; exports2.assertTSThisType = assertTSThisType; exports2.assertTSTupleType = assertTSTupleType; exports2.assertTSType = assertTSType; exports2.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration; exports2.assertTSTypeAnnotation = assertTSTypeAnnotation; exports2.assertTSTypeAssertion = assertTSTypeAssertion; exports2.assertTSTypeElement = assertTSTypeElement; exports2.assertTSTypeLiteral = assertTSTypeLiteral; exports2.assertTSTypeOperator = assertTSTypeOperator; exports2.assertTSTypeParameter = assertTSTypeParameter; exports2.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration; exports2.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation; exports2.assertTSTypePredicate = assertTSTypePredicate; exports2.assertTSTypeQuery = assertTSTypeQuery; exports2.assertTSTypeReference = assertTSTypeReference; exports2.assertTSUndefinedKeyword = assertTSUndefinedKeyword; exports2.assertTSUnionType = assertTSUnionType; exports2.assertTSUnknownKeyword = assertTSUnknownKeyword; exports2.assertTSVoidKeyword = assertTSVoidKeyword; exports2.assertTaggedTemplateExpression = assertTaggedTemplateExpression; exports2.assertTemplateElement = assertTemplateElement; exports2.assertTemplateLiteral = assertTemplateLiteral; exports2.assertTerminatorless = assertTerminatorless; exports2.assertThisExpression = assertThisExpression; exports2.assertThisTypeAnnotation = assertThisTypeAnnotation; exports2.assertThrowStatement = assertThrowStatement; exports2.assertTopicReference = assertTopicReference; exports2.assertTryStatement = assertTryStatement; exports2.assertTupleExpression = assertTupleExpression; exports2.assertTupleTypeAnnotation = assertTupleTypeAnnotation; exports2.assertTypeAlias = assertTypeAlias; exports2.assertTypeAnnotation = assertTypeAnnotation; exports2.assertTypeCastExpression = assertTypeCastExpression; exports2.assertTypeParameter = assertTypeParameter; exports2.assertTypeParameterDeclaration = assertTypeParameterDeclaration; exports2.assertTypeParameterInstantiation = assertTypeParameterInstantiation; exports2.assertTypeScript = assertTypeScript; exports2.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation; exports2.assertUnaryExpression = assertUnaryExpression; exports2.assertUnaryLike = assertUnaryLike; exports2.assertUnionTypeAnnotation = assertUnionTypeAnnotation; exports2.assertUpdateExpression = assertUpdateExpression; exports2.assertUserWhitespacable = assertUserWhitespacable; exports2.assertV8IntrinsicIdentifier = assertV8IntrinsicIdentifier; exports2.assertVariableDeclaration = assertVariableDeclaration; exports2.assertVariableDeclarator = assertVariableDeclarator; exports2.assertVariance = assertVariance; exports2.assertVoidTypeAnnotation = assertVoidTypeAnnotation; exports2.assertWhile = assertWhile; exports2.assertWhileStatement = assertWhileStatement; exports2.assertWithStatement = assertWithStatement; exports2.assertYieldExpression = assertYieldExpression; var _is = require_is2(); function assert(type, node, opts) { if (!(0, _is.default)(type, node, opts)) { throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node.type}".`); } } function assertArrayExpression(node, opts) { assert("ArrayExpression", node, opts); } function assertAssignmentExpression(node, opts) { assert("AssignmentExpression", node, opts); } function assertBinaryExpression(node, opts) { assert("BinaryExpression", node, opts); } function assertInterpreterDirective(node, opts) { assert("InterpreterDirective", node, opts); } function assertDirective(node, opts) { assert("Directive", node, opts); } function assertDirectiveLiteral(node, opts) { assert("DirectiveLiteral", node, opts); } function assertBlockStatement(node, opts) { assert("BlockStatement", node, opts); } function assertBreakStatement(node, opts) { assert("BreakStatement", node, opts); } function assertCallExpression(node, opts) { assert("CallExpression", node, opts); } function assertCatchClause(node, opts) { assert("CatchClause", node, opts); } function assertConditionalExpression(node, opts) { assert("ConditionalExpression", node, opts); } function assertContinueStatement(node, opts) { assert("ContinueStatement", node, opts); } function assertDebuggerStatement(node, opts) { assert("DebuggerStatement", node, opts); } function assertDoWhileStatement(node, opts) { assert("DoWhileStatement", node, opts); } function assertEmptyStatement(node, opts) { assert("EmptyStatement", node, opts); } function assertExpressionStatement(node, opts) { assert("ExpressionStatement", node, opts); } function assertFile(node, opts) { assert("File", node, opts); } function assertForInStatement(node, opts) { assert("ForInStatement", node, opts); } function assertForStatement(node, opts) { assert("ForStatement", node, opts); } function assertFunctionDeclaration(node, opts) { assert("FunctionDeclaration", node, opts); } function assertFunctionExpression(node, opts) { assert("FunctionExpression", node, opts); } function assertIdentifier(node, opts) { assert("Identifier", node, opts); } function assertIfStatement(node, opts) { assert("IfStatement", node, opts); } function assertLabeledStatement(node, opts) { assert("LabeledStatement", node, opts); } function assertStringLiteral(node, opts) { assert("StringLiteral", node, opts); } function assertNumericLiteral(node, opts) { assert("NumericLiteral", node, opts); } function assertNullLiteral(node, opts) { assert("NullLiteral", node, opts); } function assertBooleanLiteral(node, opts) { assert("BooleanLiteral", node, opts); } function assertRegExpLiteral(node, opts) { assert("RegExpLiteral", node, opts); } function assertLogicalExpression(node, opts) { assert("LogicalExpression", node, opts); } function assertMemberExpression(node, opts) { assert("MemberExpression", node, opts); } function assertNewExpression(node, opts) { assert("NewExpression", node, opts); } function assertProgram(node, opts) { assert("Program", node, opts); } function assertObjectExpression(node, opts) { assert("ObjectExpression", node, opts); } function assertObjectMethod(node, opts) { assert("ObjectMethod", node, opts); } function assertObjectProperty(node, opts) { assert("ObjectProperty", node, opts); } function assertRestElement(node, opts) { assert("RestElement", node, opts); } function assertReturnStatement(node, opts) { assert("ReturnStatement", node, opts); } function assertSequenceExpression(node, opts) { assert("SequenceExpression", node, opts); } function assertParenthesizedExpression(node, opts) { assert("ParenthesizedExpression", node, opts); } function assertSwitchCase(node, opts) { assert("SwitchCase", node, opts); } function assertSwitchStatement(node, opts) { assert("SwitchStatement", node, opts); } function assertThisExpression(node, opts) { assert("ThisExpression", node, opts); } function assertThrowStatement(node, opts) { assert("ThrowStatement", node, opts); } function assertTryStatement(node, opts) { assert("TryStatement", node, opts); } function assertUnaryExpression(node, opts) { assert("UnaryExpression", node, opts); } function assertUpdateExpression(node, opts) { assert("UpdateExpression", node, opts); } function assertVariableDeclaration(node, opts) { assert("VariableDeclaration", node, opts); } function assertVariableDeclarator(node, opts) { assert("VariableDeclarator", node, opts); } function assertWhileStatement(node, opts) { assert("WhileStatement", node, opts); } function assertWithStatement(node, opts) { assert("WithStatement", node, opts); } function assertAssignmentPattern(node, opts) { assert("AssignmentPattern", node, opts); } function assertArrayPattern(node, opts) { assert("ArrayPattern", node, opts); } function assertArrowFunctionExpression(node, opts) { assert("ArrowFunctionExpression", node, opts); } function assertClassBody(node, opts) { assert("ClassBody", node, opts); } function assertClassExpression(node, opts) { assert("ClassExpression", node, opts); } function assertClassDeclaration(node, opts) { assert("ClassDeclaration", node, opts); } function assertExportAllDeclaration(node, opts) { assert("ExportAllDeclaration", node, opts); } function assertExportDefaultDeclaration(node, opts) { assert("ExportDefaultDeclaration", node, opts); } function assertExportNamedDeclaration(node, opts) { assert("ExportNamedDeclaration", node, opts); } function assertExportSpecifier(node, opts) { assert("ExportSpecifier", node, opts); } function assertForOfStatement(node, opts) { assert("ForOfStatement", node, opts); } function assertImportDeclaration(node, opts) { assert("ImportDeclaration", node, opts); } function assertImportDefaultSpecifier(node, opts) { assert("ImportDefaultSpecifier", node, opts); } function assertImportNamespaceSpecifier(node, opts) { assert("ImportNamespaceSpecifier", node, opts); } function assertImportSpecifier(node, opts) { assert("ImportSpecifier", node, opts); } function assertMetaProperty(node, opts) { assert("MetaProperty", node, opts); } function assertClassMethod(node, opts) { assert("ClassMethod", node, opts); } function assertObjectPattern(node, opts) { assert("ObjectPattern", node, opts); } function assertSpreadElement(node, opts) { assert("SpreadElement", node, opts); } function assertSuper(node, opts) { assert("Super", node, opts); } function assertTaggedTemplateExpression(node, opts) { assert("TaggedTemplateExpression", node, opts); } function assertTemplateElement(node, opts) { assert("TemplateElement", node, opts); } function assertTemplateLiteral(node, opts) { assert("TemplateLiteral", node, opts); } function assertYieldExpression(node, opts) { assert("YieldExpression", node, opts); } function assertAwaitExpression(node, opts) { assert("AwaitExpression", node, opts); } function assertImport(node, opts) { assert("Import", node, opts); } function assertBigIntLiteral(node, opts) { assert("BigIntLiteral", node, opts); } function assertExportNamespaceSpecifier(node, opts) { assert("ExportNamespaceSpecifier", node, opts); } function assertOptionalMemberExpression(node, opts) { assert("OptionalMemberExpression", node, opts); } function assertOptionalCallExpression(node, opts) { assert("OptionalCallExpression", node, opts); } function assertClassProperty(node, opts) { assert("ClassProperty", node, opts); } function assertClassAccessorProperty(node, opts) { assert("ClassAccessorProperty", node, opts); } function assertClassPrivateProperty(node, opts) { assert("ClassPrivateProperty", node, opts); } function assertClassPrivateMethod(node, opts) { assert("ClassPrivateMethod", node, opts); } function assertPrivateName(node, opts) { assert("PrivateName", node, opts); } function assertStaticBlock(node, opts) { assert("StaticBlock", node, opts); } function assertAnyTypeAnnotation(node, opts) { assert("AnyTypeAnnotation", node, opts); } function assertArrayTypeAnnotation(node, opts) { assert("ArrayTypeAnnotation", node, opts); } function assertBooleanTypeAnnotation(node, opts) { assert("BooleanTypeAnnotation", node, opts); } function assertBooleanLiteralTypeAnnotation(node, opts) { assert("BooleanLiteralTypeAnnotation", node, opts); } function assertNullLiteralTypeAnnotation(node, opts) { assert("NullLiteralTypeAnnotation", node, opts); } function assertClassImplements(node, opts) { assert("ClassImplements", node, opts); } function assertDeclareClass(node, opts) { assert("DeclareClass", node, opts); } function assertDeclareFunction(node, opts) { assert("DeclareFunction", node, opts); } function assertDeclareInterface(node, opts) { assert("DeclareInterface", node, opts); } function assertDeclareModule(node, opts) { assert("DeclareModule", node, opts); } function assertDeclareModuleExports(node, opts) { assert("DeclareModuleExports", node, opts); } function assertDeclareTypeAlias(node, opts) { assert("DeclareTypeAlias", node, opts); } function assertDeclareOpaqueType(node, opts) { assert("DeclareOpaqueType", node, opts); } function assertDeclareVariable(node, opts) { assert("DeclareVariable", node, opts); } function assertDeclareExportDeclaration(node, opts) { assert("DeclareExportDeclaration", node, opts); } function assertDeclareExportAllDeclaration(node, opts) { assert("DeclareExportAllDeclaration", node, opts); } function assertDeclaredPredicate(node, opts) { assert("DeclaredPredicate", node, opts); } function assertExistsTypeAnnotation(node, opts) { assert("ExistsTypeAnnotation", node, opts); } function assertFunctionTypeAnnotation(node, opts) { assert("FunctionTypeAnnotation", node, opts); } function assertFunctionTypeParam(node, opts) { assert("FunctionTypeParam", node, opts); } function assertGenericTypeAnnotation(node, opts) { assert("GenericTypeAnnotation", node, opts); } function assertInferredPredicate(node, opts) { assert("InferredPredicate", node, opts); } function assertInterfaceExtends(node, opts) { assert("InterfaceExtends", node, opts); } function assertInterfaceDeclaration(node, opts) { assert("InterfaceDeclaration", node, opts); } function assertInterfaceTypeAnnotation(node, opts) { assert("InterfaceTypeAnnotation", node, opts); } function assertIntersectionTypeAnnotation(node, opts) { assert("IntersectionTypeAnnotation", node, opts); } function assertMixedTypeAnnotation(node, opts) { assert("MixedTypeAnnotation", node, opts); } function assertEmptyTypeAnnotation(node, opts) { assert("EmptyTypeAnnotation", node, opts); } function assertNullableTypeAnnotation(node, opts) { assert("NullableTypeAnnotation", node, opts); } function assertNumberLiteralTypeAnnotation(node, opts) { assert("NumberLiteralTypeAnnotation", node, opts); } function assertNumberTypeAnnotation(node, opts) { assert("NumberTypeAnnotation", node, opts); } function assertObjectTypeAnnotation(node, opts) { assert("ObjectTypeAnnotation", node, opts); } function assertObjectTypeInternalSlot(node, opts) { assert("ObjectTypeInternalSlot", node, opts); } function assertObjectTypeCallProperty(node, opts) { assert("ObjectTypeCallProperty", node, opts); } function assertObjectTypeIndexer(node, opts) { assert("ObjectTypeIndexer", node, opts); } function assertObjectTypeProperty(node, opts) { assert("ObjectTypeProperty", node, opts); } function assertObjectTypeSpreadProperty(node, opts) { assert("ObjectTypeSpreadProperty", node, opts); } function assertOpaqueType(node, opts) { assert("OpaqueType", node, opts); } function assertQualifiedTypeIdentifier(node, opts) { assert("QualifiedTypeIdentifier", node, opts); } function assertStringLiteralTypeAnnotation(node, opts) { assert("StringLiteralTypeAnnotation", node, opts); } function assertStringTypeAnnotation(node, opts) { assert("StringTypeAnnotation", node, opts); } function assertSymbolTypeAnnotation(node, opts) { assert("SymbolTypeAnnotation", node, opts); } function assertThisTypeAnnotation(node, opts) { assert("ThisTypeAnnotation", node, opts); } function assertTupleTypeAnnotation(node, opts) { assert("TupleTypeAnnotation", node, opts); } function assertTypeofTypeAnnotation(node, opts) { assert("TypeofTypeAnnotation", node, opts); } function assertTypeAlias(node, opts) { assert("TypeAlias", node, opts); } function assertTypeAnnotation(node, opts) { assert("TypeAnnotation", node, opts); } function assertTypeCastExpression(node, opts) { assert("TypeCastExpression", node, opts); } function assertTypeParameter(node, opts) { assert("TypeParameter", node, opts); } function assertTypeParameterDeclaration(node, opts) { assert("TypeParameterDeclaration", node, opts); } function assertTypeParameterInstantiation(node, opts) { assert("TypeParameterInstantiation", node, opts); } function assertUnionTypeAnnotation(node, opts) { assert("UnionTypeAnnotation", node, opts); } function assertVariance(node, opts) { assert("Variance", node, opts); } function assertVoidTypeAnnotation(node, opts) { assert("VoidTypeAnnotation", node, opts); } function assertEnumDeclaration(node, opts) { assert("EnumDeclaration", node, opts); } function assertEnumBooleanBody(node, opts) { assert("EnumBooleanBody", node, opts); } function assertEnumNumberBody(node, opts) { assert("EnumNumberBody", node, opts); } function assertEnumStringBody(node, opts) { assert("EnumStringBody", node, opts); } function assertEnumSymbolBody(node, opts) { assert("EnumSymbolBody", node, opts); } function assertEnumBooleanMember(node, opts) { assert("EnumBooleanMember", node, opts); } function assertEnumNumberMember(node, opts) { assert("EnumNumberMember", node, opts); } function assertEnumStringMember(node, opts) { assert("EnumStringMember", node, opts); } function assertEnumDefaultedMember(node, opts) { assert("EnumDefaultedMember", node, opts); } function assertIndexedAccessType(node, opts) { assert("IndexedAccessType", node, opts); } function assertOptionalIndexedAccessType(node, opts) { assert("OptionalIndexedAccessType", node, opts); } function assertJSXAttribute(node, opts) { assert("JSXAttribute", node, opts); } function assertJSXClosingElement(node, opts) { assert("JSXClosingElement", node, opts); } function assertJSXElement(node, opts) { assert("JSXElement", node, opts); } function assertJSXEmptyExpression(node, opts) { assert("JSXEmptyExpression", node, opts); } function assertJSXExpressionContainer(node, opts) { assert("JSXExpressionContainer", node, opts); } function assertJSXSpreadChild(node, opts) { assert("JSXSpreadChild", node, opts); } function assertJSXIdentifier(node, opts) { assert("JSXIdentifier", node, opts); } function assertJSXMemberExpression(node, opts) { assert("JSXMemberExpression", node, opts); } function assertJSXNamespacedName(node, opts) { assert("JSXNamespacedName", node, opts); } function assertJSXOpeningElement(node, opts) { assert("JSXOpeningElement", node, opts); } function assertJSXSpreadAttribute(node, opts) { assert("JSXSpreadAttribute", node, opts); } function assertJSXText(node, opts) { assert("JSXText", node, opts); } function assertJSXFragment(node, opts) { assert("JSXFragment", node, opts); } function assertJSXOpeningFragment(node, opts) { assert("JSXOpeningFragment", node, opts); } function assertJSXClosingFragment(node, opts) { assert("JSXClosingFragment", node, opts); } function assertNoop(node, opts) { assert("Noop", node, opts); } function assertPlaceholder(node, opts) { assert("Placeholder", node, opts); } function assertV8IntrinsicIdentifier(node, opts) { assert("V8IntrinsicIdentifier", node, opts); } function assertArgumentPlaceholder(node, opts) { assert("ArgumentPlaceholder", node, opts); } function assertBindExpression(node, opts) { assert("BindExpression", node, opts); } function assertImportAttribute(node, opts) { assert("ImportAttribute", node, opts); } function assertDecorator(node, opts) { assert("Decorator", node, opts); } function assertDoExpression(node, opts) { assert("DoExpression", node, opts); } function assertExportDefaultSpecifier(node, opts) { assert("ExportDefaultSpecifier", node, opts); } function assertRecordExpression(node, opts) { assert("RecordExpression", node, opts); } function assertTupleExpression(node, opts) { assert("TupleExpression", node, opts); } function assertDecimalLiteral(node, opts) { assert("DecimalLiteral", node, opts); } function assertModuleExpression(node, opts) { assert("ModuleExpression", node, opts); } function assertTopicReference(node, opts) { assert("TopicReference", node, opts); } function assertPipelineTopicExpression(node, opts) { assert("PipelineTopicExpression", node, opts); } function assertPipelineBareFunction(node, opts) { assert("PipelineBareFunction", node, opts); } function assertPipelinePrimaryTopicReference(node, opts) { assert("PipelinePrimaryTopicReference", node, opts); } function assertTSParameterProperty(node, opts) { assert("TSParameterProperty", node, opts); } function assertTSDeclareFunction(node, opts) { assert("TSDeclareFunction", node, opts); } function assertTSDeclareMethod(node, opts) { assert("TSDeclareMethod", node, opts); } function assertTSQualifiedName(node, opts) { assert("TSQualifiedName", node, opts); } function assertTSCallSignatureDeclaration(node, opts) { assert("TSCallSignatureDeclaration", node, opts); } function assertTSConstructSignatureDeclaration(node, opts) { assert("TSConstructSignatureDeclaration", node, opts); } function assertTSPropertySignature(node, opts) { assert("TSPropertySignature", node, opts); } function assertTSMethodSignature(node, opts) { assert("TSMethodSignature", node, opts); } function assertTSIndexSignature(node, opts) { assert("TSIndexSignature", node, opts); } function assertTSAnyKeyword(node, opts) { assert("TSAnyKeyword", node, opts); } function assertTSBooleanKeyword(node, opts) { assert("TSBooleanKeyword", node, opts); } function assertTSBigIntKeyword(node, opts) { assert("TSBigIntKeyword", node, opts); } function assertTSIntrinsicKeyword(node, opts) { assert("TSIntrinsicKeyword", node, opts); } function assertTSNeverKeyword(node, opts) { assert("TSNeverKeyword", node, opts); } function assertTSNullKeyword(node, opts) { assert("TSNullKeyword", node, opts); } function assertTSNumberKeyword(node, opts) { assert("TSNumberKeyword", node, opts); } function assertTSObjectKeyword(node, opts) { assert("TSObjectKeyword", node, opts); } function assertTSStringKeyword(node, opts) { assert("TSStringKeyword", node, opts); } function assertTSSymbolKeyword(node, opts) { assert("TSSymbolKeyword", node, opts); } function assertTSUndefinedKeyword(node, opts) { assert("TSUndefinedKeyword", node, opts); } function assertTSUnknownKeyword(node, opts) { assert("TSUnknownKeyword", node, opts); } function assertTSVoidKeyword(node, opts) { assert("TSVoidKeyword", node, opts); } function assertTSThisType(node, opts) { assert("TSThisType", node, opts); } function assertTSFunctionType(node, opts) { assert("TSFunctionType", node, opts); } function assertTSConstructorType(node, opts) { assert("TSConstructorType", node, opts); } function assertTSTypeReference(node, opts) { assert("TSTypeReference", node, opts); } function assertTSTypePredicate(node, opts) { assert("TSTypePredicate", node, opts); } function assertTSTypeQuery(node, opts) { assert("TSTypeQuery", node, opts); } function assertTSTypeLiteral(node, opts) { assert("TSTypeLiteral", node, opts); } function assertTSArrayType(node, opts) { assert("TSArrayType", node, opts); } function assertTSTupleType(node, opts) { assert("TSTupleType", node, opts); } function assertTSOptionalType(node, opts) { assert("TSOptionalType", node, opts); } function assertTSRestType(node, opts) { assert("TSRestType", node, opts); } function assertTSNamedTupleMember(node, opts) { assert("TSNamedTupleMember", node, opts); } function assertTSUnionType(node, opts) { assert("TSUnionType", node, opts); } function assertTSIntersectionType(node, opts) { assert("TSIntersectionType", node, opts); } function assertTSConditionalType(node, opts) { assert("TSConditionalType", node, opts); } function assertTSInferType(node, opts) { assert("TSInferType", node, opts); } function assertTSParenthesizedType(node, opts) { assert("TSParenthesizedType", node, opts); } function assertTSTypeOperator(node, opts) { assert("TSTypeOperator", node, opts); } function assertTSIndexedAccessType(node, opts) { assert("TSIndexedAccessType", node, opts); } function assertTSMappedType(node, opts) { assert("TSMappedType", node, opts); } function assertTSLiteralType(node, opts) { assert("TSLiteralType", node, opts); } function assertTSExpressionWithTypeArguments(node, opts) { assert("TSExpressionWithTypeArguments", node, opts); } function assertTSInterfaceDeclaration(node, opts) { assert("TSInterfaceDeclaration", node, opts); } function assertTSInterfaceBody(node, opts) { assert("TSInterfaceBody", node, opts); } function assertTSTypeAliasDeclaration(node, opts) { assert("TSTypeAliasDeclaration", node, opts); } function assertTSAsExpression(node, opts) { assert("TSAsExpression", node, opts); } function assertTSTypeAssertion(node, opts) { assert("TSTypeAssertion", node, opts); } function assertTSEnumDeclaration(node, opts) { assert("TSEnumDeclaration", node, opts); } function assertTSEnumMember(node, opts) { assert("TSEnumMember", node, opts); } function assertTSModuleDeclaration(node, opts) { assert("TSModuleDeclaration", node, opts); } function assertTSModuleBlock(node, opts) { assert("TSModuleBlock", node, opts); } function assertTSImportType(node, opts) { assert("TSImportType", node, opts); } function assertTSImportEqualsDeclaration(node, opts) { assert("TSImportEqualsDeclaration", node, opts); } function assertTSExternalModuleReference(node, opts) { assert("TSExternalModuleReference", node, opts); } function assertTSNonNullExpression(node, opts) { assert("TSNonNullExpression", node, opts); } function assertTSExportAssignment(node, opts) { assert("TSExportAssignment", node, opts); } function assertTSNamespaceExportDeclaration(node, opts) { assert("TSNamespaceExportDeclaration", node, opts); } function assertTSTypeAnnotation(node, opts) { assert("TSTypeAnnotation", node, opts); } function assertTSTypeParameterInstantiation(node, opts) { assert("TSTypeParameterInstantiation", node, opts); } function assertTSTypeParameterDeclaration(node, opts) { assert("TSTypeParameterDeclaration", node, opts); } function assertTSTypeParameter(node, opts) { assert("TSTypeParameter", node, opts); } function assertStandardized(node, opts) { assert("Standardized", node, opts); } function assertExpression(node, opts) { assert("Expression", node, opts); } function assertBinary(node, opts) { assert("Binary", node, opts); } function assertScopable(node, opts) { assert("Scopable", node, opts); } function assertBlockParent(node, opts) { assert("BlockParent", node, opts); } function assertBlock(node, opts) { assert("Block", node, opts); } function assertStatement(node, opts) { assert("Statement", node, opts); } function assertTerminatorless(node, opts) { assert("Terminatorless", node, opts); } function assertCompletionStatement(node, opts) { assert("CompletionStatement", node, opts); } function assertConditional(node, opts) { assert("Conditional", node, opts); } function assertLoop(node, opts) { assert("Loop", node, opts); } function assertWhile(node, opts) { assert("While", node, opts); } function assertExpressionWrapper(node, opts) { assert("ExpressionWrapper", node, opts); } function assertFor(node, opts) { assert("For", node, opts); } function assertForXStatement(node, opts) { assert("ForXStatement", node, opts); } function assertFunction(node, opts) { assert("Function", node, opts); } function assertFunctionParent(node, opts) { assert("FunctionParent", node, opts); } function assertPureish(node, opts) { assert("Pureish", node, opts); } function assertDeclaration(node, opts) { assert("Declaration", node, opts); } function assertPatternLike(node, opts) { assert("PatternLike", node, opts); } function assertLVal(node, opts) { assert("LVal", node, opts); } function assertTSEntityName(node, opts) { assert("TSEntityName", node, opts); } function assertLiteral(node, opts) { assert("Literal", node, opts); } function assertImmutable(node, opts) { assert("Immutable", node, opts); } function assertUserWhitespacable(node, opts) { assert("UserWhitespacable", node, opts); } function assertMethod(node, opts) { assert("Method", node, opts); } function assertObjectMember(node, opts) { assert("ObjectMember", node, opts); } function assertProperty(node, opts) { assert("Property", node, opts); } function assertUnaryLike(node, opts) { assert("UnaryLike", node, opts); } function assertPattern(node, opts) { assert("Pattern", node, opts); } function assertClass(node, opts) { assert("Class", node, opts); } function assertModuleDeclaration(node, opts) { assert("ModuleDeclaration", node, opts); } function assertExportDeclaration(node, opts) { assert("ExportDeclaration", node, opts); } function assertModuleSpecifier(node, opts) { assert("ModuleSpecifier", node, opts); } function assertAccessor(node, opts) { assert("Accessor", node, opts); } function assertPrivate(node, opts) { assert("Private", node, opts); } function assertFlow(node, opts) { assert("Flow", node, opts); } function assertFlowType(node, opts) { assert("FlowType", node, opts); } function assertFlowBaseAnnotation(node, opts) { assert("FlowBaseAnnotation", node, opts); } function assertFlowDeclaration(node, opts) { assert("FlowDeclaration", node, opts); } function assertFlowPredicate(node, opts) { assert("FlowPredicate", node, opts); } function assertEnumBody(node, opts) { assert("EnumBody", node, opts); } function assertEnumMember(node, opts) { assert("EnumMember", node, opts); } function assertJSX(node, opts) { assert("JSX", node, opts); } function assertMiscellaneous(node, opts) { assert("Miscellaneous", node, opts); } function assertTypeScript(node, opts) { assert("TypeScript", node, opts); } function assertTSTypeElement(node, opts) { assert("TSTypeElement", node, opts); } function assertTSType(node, opts) { assert("TSType", node, opts); } function assertTSBaseType(node, opts) { assert("TSBaseType", node, opts); } function assertNumberLiteral(node, opts) { console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); assert("NumberLiteral", node, opts); } function assertRegexLiteral(node, opts) { console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); assert("RegexLiteral", node, opts); } function assertRestProperty(node, opts) { console.trace("The node type RestProperty has been renamed to RestElement"); assert("RestProperty", node, opts); } function assertSpreadProperty(node, opts) { console.trace("The node type SpreadProperty has been renamed to SpreadElement"); assert("SpreadProperty", node, opts); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js var require_createTypeAnnotationBasedOnTypeof2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var _generated = require_generated7(); var _default = createTypeAnnotationBasedOnTypeof; exports2.default = _default; function createTypeAnnotationBasedOnTypeof(type) { switch (type) { case "string": return (0, _generated.stringTypeAnnotation)(); case "number": return (0, _generated.numberTypeAnnotation)(); case "undefined": return (0, _generated.voidTypeAnnotation)(); case "boolean": return (0, _generated.booleanTypeAnnotation)(); case "function": return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function")); case "object": return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object")); case "symbol": return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol")); case "bigint": return (0, _generated.anyTypeAnnotation)(); } throw new Error("Invalid typeof value: " + type); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js var require_removeTypeDuplicates3 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = removeTypeDuplicates; var _generated = require_generated6(); function getQualifiedName(node) { return (0, _generated.isIdentifier)(node) ? node.name : `${node.id.name}.${getQualifiedName(node.qualification)}`; } function removeTypeDuplicates(nodes) { const generics = {}; const bases = {}; const typeGroups = /* @__PURE__ */ new Set(); const types = []; for (let i = 0; i < nodes.length; i++) { const node = nodes[i]; if (!node) continue; if (types.indexOf(node) >= 0) { continue; } if ((0, _generated.isAnyTypeAnnotation)(node)) { return [node]; } if ((0, _generated.isFlowBaseAnnotation)(node)) { bases[node.type] = node; continue; } if ((0, _generated.isUnionTypeAnnotation)(node)) { if (!typeGroups.has(node.types)) { nodes = nodes.concat(node.types); typeGroups.add(node.types); } continue; } if ((0, _generated.isGenericTypeAnnotation)(node)) { const name = getQualifiedName(node.id); if (generics[name]) { let existing = generics[name]; if (existing.typeParameters) { if (node.typeParameters) { existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params)); } } else { existing = node.typeParameters; } } else { generics[name] = node; } continue; } types.push(node); } for (const type of Object.keys(bases)) { types.push(bases[type]); } for (const name of Object.keys(generics)) { types.push(generics[name]); } return types; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js var require_createFlowUnionType2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = createFlowUnionType; var _generated = require_generated7(); var _removeTypeDuplicates = require_removeTypeDuplicates3(); function createFlowUnionType(types) { const flattened = (0, _removeTypeDuplicates.default)(types); if (flattened.length === 1) { return flattened[0]; } else { return (0, _generated.unionTypeAnnotation)(flattened); } } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js var require_removeTypeDuplicates4 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = removeTypeDuplicates; var _generated = require_generated6(); function removeTypeDuplicates(nodes) { const generics = {}; const bases = {}; const typeGroups = /* @__PURE__ */ new Set(); const types = []; for (let i = 0; i < nodes.length; i++) { const node = nodes[i]; if (!node) continue; if (types.indexOf(node) >= 0) { continue; } if ((0, _generated.isTSAnyKeyword)(node)) { return [node]; } if ((0, _generated.isTSBaseType)(node)) { bases[node.type] = node; continue; } if ((0, _generated.isTSUnionType)(node)) { if (!typeGroups.has(node.types)) { nodes.push(...node.types); typeGroups.add(node.types); } continue; } types.push(node); } for (const type of Object.keys(bases)) { types.push(bases[type]); } for (const name of Object.keys(generics)) { types.push(generics[name]); } return types; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js var require_createTSUnionType2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = createTSUnionType; var _generated = require_generated7(); var _removeTypeDuplicates = require_removeTypeDuplicates4(); function createTSUnionType(typeAnnotations) { const types = typeAnnotations.map((type) => type.typeAnnotation); const flattened = (0, _removeTypeDuplicates.default)(types); if (flattened.length === 1) { return flattened[0]; } else { return (0, _generated.tsUnionType)(flattened); } } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/generated/uppercase.js var require_uppercase2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/builders/generated/uppercase.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "AnyTypeAnnotation", { enumerable: true, get: function() { return _index.anyTypeAnnotation; } }); Object.defineProperty(exports2, "ArgumentPlaceholder", { enumerable: true, get: function() { return _index.argumentPlaceholder; } }); Object.defineProperty(exports2, "ArrayExpression", { enumerable: true, get: function() { return _index.arrayExpression; } }); Object.defineProperty(exports2, "ArrayPattern", { enumerable: true, get: function() { return _index.arrayPattern; } }); Object.defineProperty(exports2, "ArrayTypeAnnotation", { enumerable: true, get: function() { return _index.arrayTypeAnnotation; } }); Object.defineProperty(exports2, "ArrowFunctionExpression", { enumerable: true, get: function() { return _index.arrowFunctionExpression; } }); Object.defineProperty(exports2, "AssignmentExpression", { enumerable: true, get: function() { return _index.assignmentExpression; } }); Object.defineProperty(exports2, "AssignmentPattern", { enumerable: true, get: function() { return _index.assignmentPattern; } }); Object.defineProperty(exports2, "AwaitExpression", { enumerable: true, get: function() { return _index.awaitExpression; } }); Object.defineProperty(exports2, "BigIntLiteral", { enumerable: true, get: function() { return _index.bigIntLiteral; } }); Object.defineProperty(exports2, "BinaryExpression", { enumerable: true, get: function() { return _index.binaryExpression; } }); Object.defineProperty(exports2, "BindExpression", { enumerable: true, get: function() { return _index.bindExpression; } }); Object.defineProperty(exports2, "BlockStatement", { enumerable: true, get: function() { return _index.blockStatement; } }); Object.defineProperty(exports2, "BooleanLiteral", { enumerable: true, get: function() { return _index.booleanLiteral; } }); Object.defineProperty(exports2, "BooleanLiteralTypeAnnotation", { enumerable: true, get: function() { return _index.booleanLiteralTypeAnnotation; } }); Object.defineProperty(exports2, "BooleanTypeAnnotation", { enumerable: true, get: function() { return _index.booleanTypeAnnotation; } }); Object.defineProperty(exports2, "BreakStatement", { enumerable: true, get: function() { return _index.breakStatement; } }); Object.defineProperty(exports2, "CallExpression", { enumerable: true, get: function() { return _index.callExpression; } }); Object.defineProperty(exports2, "CatchClause", { enumerable: true, get: function() { return _index.catchClause; } }); Object.defineProperty(exports2, "ClassAccessorProperty", { enumerable: true, get: function() { return _index.classAccessorProperty; } }); Object.defineProperty(exports2, "ClassBody", { enumerable: true, get: function() { return _index.classBody; } }); Object.defineProperty(exports2, "ClassDeclaration", { enumerable: true, get: function() { return _index.classDeclaration; } }); Object.defineProperty(exports2, "ClassExpression", { enumerable: true, get: function() { return _index.classExpression; } }); Object.defineProperty(exports2, "ClassImplements", { enumerable: true, get: function() { return _index.classImplements; } }); Object.defineProperty(exports2, "ClassMethod", { enumerable: true, get: function() { return _index.classMethod; } }); Object.defineProperty(exports2, "ClassPrivateMethod", { enumerable: true, get: function() { return _index.classPrivateMethod; } }); Object.defineProperty(exports2, "ClassPrivateProperty", { enumerable: true, get: function() { return _index.classPrivateProperty; } }); Object.defineProperty(exports2, "ClassProperty", { enumerable: true, get: function() { return _index.classProperty; } }); Object.defineProperty(exports2, "ConditionalExpression", { enumerable: true, get: function() { return _index.conditionalExpression; } }); Object.defineProperty(exports2, "ContinueStatement", { enumerable: true, get: function() { return _index.continueStatement; } }); Object.defineProperty(exports2, "DebuggerStatement", { enumerable: true, get: function() { return _index.debuggerStatement; } }); Object.defineProperty(exports2, "DecimalLiteral", { enumerable: true, get: function() { return _index.decimalLiteral; } }); Object.defineProperty(exports2, "DeclareClass", { enumerable: true, get: function() { return _index.declareClass; } }); Object.defineProperty(exports2, "DeclareExportAllDeclaration", { enumerable: true, get: function() { return _index.declareExportAllDeclaration; } }); Object.defineProperty(exports2, "DeclareExportDeclaration", { enumerable: true, get: function() { return _index.declareExportDeclaration; } }); Object.defineProperty(exports2, "DeclareFunction", { enumerable: true, get: function() { return _index.declareFunction; } }); Object.defineProperty(exports2, "DeclareInterface", { enumerable: true, get: function() { return _index.declareInterface; } }); Object.defineProperty(exports2, "DeclareModule", { enumerable: true, get: function() { return _index.declareModule; } }); Object.defineProperty(exports2, "DeclareModuleExports", { enumerable: true, get: function() { return _index.declareModuleExports; } }); Object.defineProperty(exports2, "DeclareOpaqueType", { enumerable: true, get: function() { return _index.declareOpaqueType; } }); Object.defineProperty(exports2, "DeclareTypeAlias", { enumerable: true, get: function() { return _index.declareTypeAlias; } }); Object.defineProperty(exports2, "DeclareVariable", { enumerable: true, get: function() { return _index.declareVariable; } }); Object.defineProperty(exports2, "DeclaredPredicate", { enumerable: true, get: function() { return _index.declaredPredicate; } }); Object.defineProperty(exports2, "Decorator", { enumerable: true, get: function() { return _index.decorator; } }); Object.defineProperty(exports2, "Directive", { enumerable: true, get: function() { return _index.directive; } }); Object.defineProperty(exports2, "DirectiveLiteral", { enumerable: true, get: function() { return _index.directiveLiteral; } }); Object.defineProperty(exports2, "DoExpression", { enumerable: true, get: function() { return _index.doExpression; } }); Object.defineProperty(exports2, "DoWhileStatement", { enumerable: true, get: function() { return _index.doWhileStatement; } }); Object.defineProperty(exports2, "EmptyStatement", { enumerable: true, get: function() { return _index.emptyStatement; } }); Object.defineProperty(exports2, "EmptyTypeAnnotation", { enumerable: true, get: function() { return _index.emptyTypeAnnotation; } }); Object.defineProperty(exports2, "EnumBooleanBody", { enumerable: true, get: function() { return _index.enumBooleanBody; } }); Object.defineProperty(exports2, "EnumBooleanMember", { enumerable: true, get: function() { return _index.enumBooleanMember; } }); Object.defineProperty(exports2, "EnumDeclaration", { enumerable: true, get: function() { return _index.enumDeclaration; } }); Object.defineProperty(exports2, "EnumDefaultedMember", { enumerable: true, get: function() { return _index.enumDefaultedMember; } }); Object.defineProperty(exports2, "EnumNumberBody", { enumerable: true, get: function() { return _index.enumNumberBody; } }); Object.defineProperty(exports2, "EnumNumberMember", { enumerable: true, get: function() { return _index.enumNumberMember; } }); Object.defineProperty(exports2, "EnumStringBody", { enumerable: true, get: function() { return _index.enumStringBody; } }); Object.defineProperty(exports2, "EnumStringMember", { enumerable: true, get: function() { return _index.enumStringMember; } }); Object.defineProperty(exports2, "EnumSymbolBody", { enumerable: true, get: function() { return _index.enumSymbolBody; } }); Object.defineProperty(exports2, "ExistsTypeAnnotation", { enumerable: true, get: function() { return _index.existsTypeAnnotation; } }); Object.defineProperty(exports2, "ExportAllDeclaration", { enumerable: true, get: function() { return _index.exportAllDeclaration; } }); Object.defineProperty(exports2, "ExportDefaultDeclaration", { enumerable: true, get: function() { return _index.exportDefaultDeclaration; } }); Object.defineProperty(exports2, "ExportDefaultSpecifier", { enumerable: true, get: function() { return _index.exportDefaultSpecifier; } }); Object.defineProperty(exports2, "ExportNamedDeclaration", { enumerable: true, get: function() { return _index.exportNamedDeclaration; } }); Object.defineProperty(exports2, "ExportNamespaceSpecifier", { enumerable: true, get: function() { return _index.exportNamespaceSpecifier; } }); Object.defineProperty(exports2, "ExportSpecifier", { enumerable: true, get: function() { return _index.exportSpecifier; } }); Object.defineProperty(exports2, "ExpressionStatement", { enumerable: true, get: function() { return _index.expressionStatement; } }); Object.defineProperty(exports2, "File", { enumerable: true, get: function() { return _index.file; } }); Object.defineProperty(exports2, "ForInStatement", { enumerable: true, get: function() { return _index.forInStatement; } }); Object.defineProperty(exports2, "ForOfStatement", { enumerable: true, get: function() { return _index.forOfStatement; } }); Object.defineProperty(exports2, "ForStatement", { enumerable: true, get: function() { return _index.forStatement; } }); Object.defineProperty(exports2, "FunctionDeclaration", { enumerable: true, get: function() { return _index.functionDeclaration; } }); Object.defineProperty(exports2, "FunctionExpression", { enumerable: true, get: function() { return _index.functionExpression; } }); Object.defineProperty(exports2, "FunctionTypeAnnotation", { enumerable: true, get: function() { return _index.functionTypeAnnotation; } }); Object.defineProperty(exports2, "FunctionTypeParam", { enumerable: true, get: function() { return _index.functionTypeParam; } }); Object.defineProperty(exports2, "GenericTypeAnnotation", { enumerable: true, get: function() { return _index.genericTypeAnnotation; } }); Object.defineProperty(exports2, "Identifier", { enumerable: true, get: function() { return _index.identifier; } }); Object.defineProperty(exports2, "IfStatement", { enumerable: true, get: function() { return _index.ifStatement; } }); Object.defineProperty(exports2, "Import", { enumerable: true, get: function() { return _index.import; } }); Object.defineProperty(exports2, "ImportAttribute", { enumerable: true, get: function() { return _index.importAttribute; } }); Object.defineProperty(exports2, "ImportDeclaration", { enumerable: true, get: function() { return _index.importDeclaration; } }); Object.defineProperty(exports2, "ImportDefaultSpecifier", { enumerable: true, get: function() { return _index.importDefaultSpecifier; } }); Object.defineProperty(exports2, "ImportNamespaceSpecifier", { enumerable: true, get: function() { return _index.importNamespaceSpecifier; } }); Object.defineProperty(exports2, "ImportSpecifier", { enumerable: true, get: function() { return _index.importSpecifier; } }); Object.defineProperty(exports2, "IndexedAccessType", { enumerable: true, get: function() { return _index.indexedAccessType; } }); Object.defineProperty(exports2, "InferredPredicate", { enumerable: true, get: function() { return _index.inferredPredicate; } }); Object.defineProperty(exports2, "InterfaceDeclaration", { enumerable: true, get: function() { return _index.interfaceDeclaration; } }); Object.defineProperty(exports2, "InterfaceExtends", { enumerable: true, get: function() { return _index.interfaceExtends; } }); Object.defineProperty(exports2, "InterfaceTypeAnnotation", { enumerable: true, get: function() { return _index.interfaceTypeAnnotation; } }); Object.defineProperty(exports2, "InterpreterDirective", { enumerable: true, get: function() { return _index.interpreterDirective; } }); Object.defineProperty(exports2, "IntersectionTypeAnnotation", { enumerable: true, get: function() { return _index.intersectionTypeAnnotation; } }); Object.defineProperty(exports2, "JSXAttribute", { enumerable: true, get: function() { return _index.jsxAttribute; } }); Object.defineProperty(exports2, "JSXClosingElement", { enumerable: true, get: function() { return _index.jsxClosingElement; } }); Object.defineProperty(exports2, "JSXClosingFragment", { enumerable: true, get: function() { return _index.jsxClosingFragment; } }); Object.defineProperty(exports2, "JSXElement", { enumerable: true, get: function() { return _index.jsxElement; } }); Object.defineProperty(exports2, "JSXEmptyExpression", { enumerable: true, get: function() { return _index.jsxEmptyExpression; } }); Object.defineProperty(exports2, "JSXExpressionContainer", { enumerable: true, get: function() { return _index.jsxExpressionContainer; } }); Object.defineProperty(exports2, "JSXFragment", { enumerable: true, get: function() { return _index.jsxFragment; } }); Object.defineProperty(exports2, "JSXIdentifier", { enumerable: true, get: function() { return _index.jsxIdentifier; } }); Object.defineProperty(exports2, "JSXMemberExpression", { enumerable: true, get: function() { return _index.jsxMemberExpression; } }); Object.defineProperty(exports2, "JSXNamespacedName", { enumerable: true, get: function() { return _index.jsxNamespacedName; } }); Object.defineProperty(exports2, "JSXOpeningElement", { enumerable: true, get: function() { return _index.jsxOpeningElement; } }); Object.defineProperty(exports2, "JSXOpeningFragment", { enumerable: true, get: function() { return _index.jsxOpeningFragment; } }); Object.defineProperty(exports2, "JSXSpreadAttribute", { enumerable: true, get: function() { return _index.jsxSpreadAttribute; } }); Object.defineProperty(exports2, "JSXSpreadChild", { enumerable: true, get: function() { return _index.jsxSpreadChild; } }); Object.defineProperty(exports2, "JSXText", { enumerable: true, get: function() { return _index.jsxText; } }); Object.defineProperty(exports2, "LabeledStatement", { enumerable: true, get: function() { return _index.labeledStatement; } }); Object.defineProperty(exports2, "LogicalExpression", { enumerable: true, get: function() { return _index.logicalExpression; } }); Object.defineProperty(exports2, "MemberExpression", { enumerable: true, get: function() { return _index.memberExpression; } }); Object.defineProperty(exports2, "MetaProperty", { enumerable: true, get: function() { return _index.metaProperty; } }); Object.defineProperty(exports2, "MixedTypeAnnotation", { enumerable: true, get: function() { return _index.mixedTypeAnnotation; } }); Object.defineProperty(exports2, "ModuleExpression", { enumerable: true, get: function() { return _index.moduleExpression; } }); Object.defineProperty(exports2, "NewExpression", { enumerable: true, get: function() { return _index.newExpression; } }); Object.defineProperty(exports2, "Noop", { enumerable: true, get: function() { return _index.noop; } }); Object.defineProperty(exports2, "NullLiteral", { enumerable: true, get: function() { return _index.nullLiteral; } }); Object.defineProperty(exports2, "NullLiteralTypeAnnotation", { enumerable: true, get: function() { return _index.nullLiteralTypeAnnotation; } }); Object.defineProperty(exports2, "NullableTypeAnnotation", { enumerable: true, get: function() { return _index.nullableTypeAnnotation; } }); Object.defineProperty(exports2, "NumberLiteral", { enumerable: true, get: function() { return _index.numberLiteral; } }); Object.defineProperty(exports2, "NumberLiteralTypeAnnotation", { enumerable: true, get: function() { return _index.numberLiteralTypeAnnotation; } }); Object.defineProperty(exports2, "NumberTypeAnnotation", { enumerable: true, get: function() { return _index.numberTypeAnnotation; } }); Object.defineProperty(exports2, "NumericLiteral", { enumerable: true, get: function() { return _index.numericLiteral; } }); Object.defineProperty(exports2, "ObjectExpression", { enumerable: true, get: function() { return _index.objectExpression; } }); Object.defineProperty(exports2, "ObjectMethod", { enumerable: true, get: function() { return _index.objectMethod; } }); Object.defineProperty(exports2, "ObjectPattern", { enumerable: true, get: function() { return _index.objectPattern; } }); Object.defineProperty(exports2, "ObjectProperty", { enumerable: true, get: function() { return _index.objectProperty; } }); Object.defineProperty(exports2, "ObjectTypeAnnotation", { enumerable: true, get: function() { return _index.objectTypeAnnotation; } }); Object.defineProperty(exports2, "ObjectTypeCallProperty", { enumerable: true, get: function() { return _index.objectTypeCallProperty; } }); Object.defineProperty(exports2, "ObjectTypeIndexer", { enumerable: true, get: function() { return _index.objectTypeIndexer; } }); Object.defineProperty(exports2, "ObjectTypeInternalSlot", { enumerable: true, get: function() { return _index.objectTypeInternalSlot; } }); Object.defineProperty(exports2, "ObjectTypeProperty", { enumerable: true, get: function() { return _index.objectTypeProperty; } }); Object.defineProperty(exports2, "ObjectTypeSpreadProperty", { enumerable: true, get: function() { return _index.objectTypeSpreadProperty; } }); Object.defineProperty(exports2, "OpaqueType", { enumerable: true, get: function() { return _index.opaqueType; } }); Object.defineProperty(exports2, "OptionalCallExpression", { enumerable: true, get: function() { return _index.optionalCallExpression; } }); Object.defineProperty(exports2, "OptionalIndexedAccessType", { enumerable: true, get: function() { return _index.optionalIndexedAccessType; } }); Object.defineProperty(exports2, "OptionalMemberExpression", { enumerable: true, get: function() { return _index.optionalMemberExpression; } }); Object.defineProperty(exports2, "ParenthesizedExpression", { enumerable: true, get: function() { return _index.parenthesizedExpression; } }); Object.defineProperty(exports2, "PipelineBareFunction", { enumerable: true, get: function() { return _index.pipelineBareFunction; } }); Object.defineProperty(exports2, "PipelinePrimaryTopicReference", { enumerable: true, get: function() { return _index.pipelinePrimaryTopicReference; } }); Object.defineProperty(exports2, "PipelineTopicExpression", { enumerable: true, get: function() { return _index.pipelineTopicExpression; } }); Object.defineProperty(exports2, "Placeholder", { enumerable: true, get: function() { return _index.placeholder; } }); Object.defineProperty(exports2, "PrivateName", { enumerable: true, get: function() { return _index.privateName; } }); Object.defineProperty(exports2, "Program", { enumerable: true, get: function() { return _index.program; } }); Object.defineProperty(exports2, "QualifiedTypeIdentifier", { enumerable: true, get: function() { return _index.qualifiedTypeIdentifier; } }); Object.defineProperty(exports2, "RecordExpression", { enumerable: true, get: function() { return _index.recordExpression; } }); Object.defineProperty(exports2, "RegExpLiteral", { enumerable: true, get: function() { return _index.regExpLiteral; } }); Object.defineProperty(exports2, "RegexLiteral", { enumerable: true, get: function() { return _index.regexLiteral; } }); Object.defineProperty(exports2, "RestElement", { enumerable: true, get: function() { return _index.restElement; } }); Object.defineProperty(exports2, "RestProperty", { enumerable: true, get: function() { return _index.restProperty; } }); Object.defineProperty(exports2, "ReturnStatement", { enumerable: true, get: function() { return _index.returnStatement; } }); Object.defineProperty(exports2, "SequenceExpression", { enumerable: true, get: function() { return _index.sequenceExpression; } }); Object.defineProperty(exports2, "SpreadElement", { enumerable: true, get: function() { return _index.spreadElement; } }); Object.defineProperty(exports2, "SpreadProperty", { enumerable: true, get: function() { return _index.spreadProperty; } }); Object.defineProperty(exports2, "StaticBlock", { enumerable: true, get: function() { return _index.staticBlock; } }); Object.defineProperty(exports2, "StringLiteral", { enumerable: true, get: function() { return _index.stringLiteral; } }); Object.defineProperty(exports2, "StringLiteralTypeAnnotation", { enumerable: true, get: function() { return _index.stringLiteralTypeAnnotation; } }); Object.defineProperty(exports2, "StringTypeAnnotation", { enumerable: true, get: function() { return _index.stringTypeAnnotation; } }); Object.defineProperty(exports2, "Super", { enumerable: true, get: function() { return _index.super; } }); Object.defineProperty(exports2, "SwitchCase", { enumerable: true, get: function() { return _index.switchCase; } }); Object.defineProperty(exports2, "SwitchStatement", { enumerable: true, get: function() { return _index.switchStatement; } }); Object.defineProperty(exports2, "SymbolTypeAnnotation", { enumerable: true, get: function() { return _index.symbolTypeAnnotation; } }); Object.defineProperty(exports2, "TSAnyKeyword", { enumerable: true, get: function() { return _index.tsAnyKeyword; } }); Object.defineProperty(exports2, "TSArrayType", { enumerable: true, get: function() { return _index.tsArrayType; } }); Object.defineProperty(exports2, "TSAsExpression", { enumerable: true, get: function() { return _index.tsAsExpression; } }); Object.defineProperty(exports2, "TSBigIntKeyword", { enumerable: true, get: function() { return _index.tsBigIntKeyword; } }); Object.defineProperty(exports2, "TSBooleanKeyword", { enumerable: true, get: function() { return _index.tsBooleanKeyword; } }); Object.defineProperty(exports2, "TSCallSignatureDeclaration", { enumerable: true, get: function() { return _index.tsCallSignatureDeclaration; } }); Object.defineProperty(exports2, "TSConditionalType", { enumerable: true, get: function() { return _index.tsConditionalType; } }); Object.defineProperty(exports2, "TSConstructSignatureDeclaration", { enumerable: true, get: function() { return _index.tsConstructSignatureDeclaration; } }); Object.defineProperty(exports2, "TSConstructorType", { enumerable: true, get: function() { return _index.tsConstructorType; } }); Object.defineProperty(exports2, "TSDeclareFunction", { enumerable: true, get: function() { return _index.tsDeclareFunction; } }); Object.defineProperty(exports2, "TSDeclareMethod", { enumerable: true, get: function() { return _index.tsDeclareMethod; } }); Object.defineProperty(exports2, "TSEnumDeclaration", { enumerable: true, get: function() { return _index.tsEnumDeclaration; } }); Object.defineProperty(exports2, "TSEnumMember", { enumerable: true, get: function() { return _index.tsEnumMember; } }); Object.defineProperty(exports2, "TSExportAssignment", { enumerable: true, get: function() { return _index.tsExportAssignment; } }); Object.defineProperty(exports2, "TSExpressionWithTypeArguments", { enumerable: true, get: function() { return _index.tsExpressionWithTypeArguments; } }); Object.defineProperty(exports2, "TSExternalModuleReference", { enumerable: true, get: function() { return _index.tsExternalModuleReference; } }); Object.defineProperty(exports2, "TSFunctionType", { enumerable: true, get: function() { return _index.tsFunctionType; } }); Object.defineProperty(exports2, "TSImportEqualsDeclaration", { enumerable: true, get: function() { return _index.tsImportEqualsDeclaration; } }); Object.defineProperty(exports2, "TSImportType", { enumerable: true, get: function() { return _index.tsImportType; } }); Object.defineProperty(exports2, "TSIndexSignature", { enumerable: true, get: function() { return _index.tsIndexSignature; } }); Object.defineProperty(exports2, "TSIndexedAccessType", { enumerable: true, get: function() { return _index.tsIndexedAccessType; } }); Object.defineProperty(exports2, "TSInferType", { enumerable: true, get: function() { return _index.tsInferType; } }); Object.defineProperty(exports2, "TSInterfaceBody", { enumerable: true, get: function() { return _index.tsInterfaceBody; } }); Object.defineProperty(exports2, "TSInterfaceDeclaration", { enumerable: true, get: function() { return _index.tsInterfaceDeclaration; } }); Object.defineProperty(exports2, "TSIntersectionType", { enumerable: true, get: function() { return _index.tsIntersectionType; } }); Object.defineProperty(exports2, "TSIntrinsicKeyword", { enumerable: true, get: function() { return _index.tsIntrinsicKeyword; } }); Object.defineProperty(exports2, "TSLiteralType", { enumerable: true, get: function() { return _index.tsLiteralType; } }); Object.defineProperty(exports2, "TSMappedType", { enumerable: true, get: function() { return _index.tsMappedType; } }); Object.defineProperty(exports2, "TSMethodSignature", { enumerable: true, get: function() { return _index.tsMethodSignature; } }); Object.defineProperty(exports2, "TSModuleBlock", { enumerable: true, get: function() { return _index.tsModuleBlock; } }); Object.defineProperty(exports2, "TSModuleDeclaration", { enumerable: true, get: function() { return _index.tsModuleDeclaration; } }); Object.defineProperty(exports2, "TSNamedTupleMember", { enumerable: true, get: function() { return _index.tsNamedTupleMember; } }); Object.defineProperty(exports2, "TSNamespaceExportDeclaration", { enumerable: true, get: function() { return _index.tsNamespaceExportDeclaration; } }); Object.defineProperty(exports2, "TSNeverKeyword", { enumerable: true, get: function() { return _index.tsNeverKeyword; } }); Object.defineProperty(exports2, "TSNonNullExpression", { enumerable: true, get: function() { return _index.tsNonNullExpression; } }); Object.defineProperty(exports2, "TSNullKeyword", { enumerable: true, get: function() { return _index.tsNullKeyword; } }); Object.defineProperty(exports2, "TSNumberKeyword", { enumerable: true, get: function() { return _index.tsNumberKeyword; } }); Object.defineProperty(exports2, "TSObjectKeyword", { enumerable: true, get: function() { return _index.tsObjectKeyword; } }); Object.defineProperty(exports2, "TSOptionalType", { enumerable: true, get: function() { return _index.tsOptionalType; } }); Object.defineProperty(exports2, "TSParameterProperty", { enumerable: true, get: function() { return _index.tsParameterProperty; } }); Object.defineProperty(exports2, "TSParenthesizedType", { enumerable: true, get: function() { return _index.tsParenthesizedType; } }); Object.defineProperty(exports2, "TSPropertySignature", { enumerable: true, get: function() { return _index.tsPropertySignature; } }); Object.defineProperty(exports2, "TSQualifiedName", { enumerable: true, get: function() { return _index.tsQualifiedName; } }); Object.defineProperty(exports2, "TSRestType", { enumerable: true, get: function() { return _index.tsRestType; } }); Object.defineProperty(exports2, "TSStringKeyword", { enumerable: true, get: function() { return _index.tsStringKeyword; } }); Object.defineProperty(exports2, "TSSymbolKeyword", { enumerable: true, get: function() { return _index.tsSymbolKeyword; } }); Object.defineProperty(exports2, "TSThisType", { enumerable: true, get: function() { return _index.tsThisType; } }); Object.defineProperty(exports2, "TSTupleType", { enumerable: true, get: function() { return _index.tsTupleType; } }); Object.defineProperty(exports2, "TSTypeAliasDeclaration", { enumerable: true, get: function() { return _index.tsTypeAliasDeclaration; } }); Object.defineProperty(exports2, "TSTypeAnnotation", { enumerable: true, get: function() { return _index.tsTypeAnnotation; } }); Object.defineProperty(exports2, "TSTypeAssertion", { enumerable: true, get: function() { return _index.tsTypeAssertion; } }); Object.defineProperty(exports2, "TSTypeLiteral", { enumerable: true, get: function() { return _index.tsTypeLiteral; } }); Object.defineProperty(exports2, "TSTypeOperator", { enumerable: true, get: function() { return _index.tsTypeOperator; } }); Object.defineProperty(exports2, "TSTypeParameter", { enumerable: true, get: function() { return _index.tsTypeParameter; } }); Object.defineProperty(exports2, "TSTypeParameterDeclaration", { enumerable: true, get: function() { return _index.tsTypeParameterDeclaration; } }); Object.defineProperty(exports2, "TSTypeParameterInstantiation", { enumerable: true, get: function() { return _index.tsTypeParameterInstantiation; } }); Object.defineProperty(exports2, "TSTypePredicate", { enumerable: true, get: function() { return _index.tsTypePredicate; } }); Object.defineProperty(exports2, "TSTypeQuery", { enumerable: true, get: function() { return _index.tsTypeQuery; } }); Object.defineProperty(exports2, "TSTypeReference", { enumerable: true, get: function() { return _index.tsTypeReference; } }); Object.defineProperty(exports2, "TSUndefinedKeyword", { enumerable: true, get: function() { return _index.tsUndefinedKeyword; } }); Object.defineProperty(exports2, "TSUnionType", { enumerable: true, get: function() { return _index.tsUnionType; } }); Object.defineProperty(exports2, "TSUnknownKeyword", { enumerable: true, get: function() { return _index.tsUnknownKeyword; } }); Object.defineProperty(exports2, "TSVoidKeyword", { enumerable: true, get: function() { return _index.tsVoidKeyword; } }); Object.defineProperty(exports2, "TaggedTemplateExpression", { enumerable: true, get: function() { return _index.taggedTemplateExpression; } }); Object.defineProperty(exports2, "TemplateElement", { enumerable: true, get: function() { return _index.templateElement; } }); Object.defineProperty(exports2, "TemplateLiteral", { enumerable: true, get: function() { return _index.templateLiteral; } }); Object.defineProperty(exports2, "ThisExpression", { enumerable: true, get: function() { return _index.thisExpression; } }); Object.defineProperty(exports2, "ThisTypeAnnotation", { enumerable: true, get: function() { return _index.thisTypeAnnotation; } }); Object.defineProperty(exports2, "ThrowStatement", { enumerable: true, get: function() { return _index.throwStatement; } }); Object.defineProperty(exports2, "TopicReference", { enumerable: true, get: function() { return _index.topicReference; } }); Object.defineProperty(exports2, "TryStatement", { enumerable: true, get: function() { return _index.tryStatement; } }); Object.defineProperty(exports2, "TupleExpression", { enumerable: true, get: function() { return _index.tupleExpression; } }); Object.defineProperty(exports2, "TupleTypeAnnotation", { enumerable: true, get: function() { return _index.tupleTypeAnnotation; } }); Object.defineProperty(exports2, "TypeAlias", { enumerable: true, get: function() { return _index.typeAlias; } }); Object.defineProperty(exports2, "TypeAnnotation", { enumerable: true, get: function() { return _index.typeAnnotation; } }); Object.defineProperty(exports2, "TypeCastExpression", { enumerable: true, get: function() { return _index.typeCastExpression; } }); Object.defineProperty(exports2, "TypeParameter", { enumerable: true, get: function() { return _index.typeParameter; } }); Object.defineProperty(exports2, "TypeParameterDeclaration", { enumerable: true, get: function() { return _index.typeParameterDeclaration; } }); Object.defineProperty(exports2, "TypeParameterInstantiation", { enumerable: true, get: function() { return _index.typeParameterInstantiation; } }); Object.defineProperty(exports2, "TypeofTypeAnnotation", { enumerable: true, get: function() { return _index.typeofTypeAnnotation; } }); Object.defineProperty(exports2, "UnaryExpression", { enumerable: true, get: function() { return _index.unaryExpression; } }); Object.defineProperty(exports2, "UnionTypeAnnotation", { enumerable: true, get: function() { return _index.unionTypeAnnotation; } }); Object.defineProperty(exports2, "UpdateExpression", { enumerable: true, get: function() { return _index.updateExpression; } }); Object.defineProperty(exports2, "V8IntrinsicIdentifier", { enumerable: true, get: function() { return _index.v8IntrinsicIdentifier; } }); Object.defineProperty(exports2, "VariableDeclaration", { enumerable: true, get: function() { return _index.variableDeclaration; } }); Object.defineProperty(exports2, "VariableDeclarator", { enumerable: true, get: function() { return _index.variableDeclarator; } }); Object.defineProperty(exports2, "Variance", { enumerable: true, get: function() { return _index.variance; } }); Object.defineProperty(exports2, "VoidTypeAnnotation", { enumerable: true, get: function() { return _index.voidTypeAnnotation; } }); Object.defineProperty(exports2, "WhileStatement", { enumerable: true, get: function() { return _index.whileStatement; } }); Object.defineProperty(exports2, "WithStatement", { enumerable: true, get: function() { return _index.withStatement; } }); Object.defineProperty(exports2, "YieldExpression", { enumerable: true, get: function() { return _index.yieldExpression; } }); var _index = require_generated7(); } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneNode.js var require_cloneNode2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneNode.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = cloneNode; var _definitions = require_definitions2(); var _generated = require_generated6(); var has = Function.call.bind(Object.prototype.hasOwnProperty); function cloneIfNode(obj, deep, withoutLoc) { if (obj && typeof obj.type === "string") { return cloneNode(obj, deep, withoutLoc); } return obj; } function cloneIfNodeOrArray(obj, deep, withoutLoc) { if (Array.isArray(obj)) { return obj.map((node) => cloneIfNode(node, deep, withoutLoc)); } return cloneIfNode(obj, deep, withoutLoc); } function cloneNode(node, deep = true, withoutLoc = false) { if (!node) return node; const { type } = node; const newNode = { type: node.type }; if ((0, _generated.isIdentifier)(node)) { newNode.name = node.name; if (has(node, "optional") && typeof node.optional === "boolean") { newNode.optional = node.optional; } if (has(node, "typeAnnotation")) { newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation; } } else if (!has(_definitions.NODE_FIELDS, type)) { throw new Error(`Unknown node type: "${type}"`); } else { for (const field of Object.keys(_definitions.NODE_FIELDS[type])) { if (has(node, field)) { if (deep) { newNode[field] = (0, _generated.isFile)(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc); } else { newNode[field] = node[field]; } } } } if (has(node, "loc")) { if (withoutLoc) { newNode.loc = null; } else { newNode.loc = node.loc; } } if (has(node, "leadingComments")) { newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc); } if (has(node, "innerComments")) { newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc); } if (has(node, "trailingComments")) { newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc); } if (has(node, "extra")) { newNode.extra = Object.assign({}, node.extra); } return newNode; } function maybeCloneComments(comments, deep, withoutLoc) { if (!comments || !deep) { return comments; } return comments.map(({ type, value, loc }) => { if (withoutLoc) { return { type, value, loc: null }; } return { type, value, loc }; }); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/clone.js var require_clone3 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/clone.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = clone; var _cloneNode = require_cloneNode2(); function clone(node) { return (0, _cloneNode.default)(node, false); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneDeep.js var require_cloneDeep2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneDeep.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = cloneDeep; var _cloneNode = require_cloneNode2(); function cloneDeep(node) { return (0, _cloneNode.default)(node); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js var require_cloneDeepWithoutLoc2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = cloneDeepWithoutLoc; var _cloneNode = require_cloneNode2(); function cloneDeepWithoutLoc(node) { return (0, _cloneNode.default)(node, true, true); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js var require_cloneWithoutLoc2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = cloneWithoutLoc; var _cloneNode = require_cloneNode2(); function cloneWithoutLoc(node) { return (0, _cloneNode.default)(node, false, true); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/addComments.js var require_addComments2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/addComments.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = addComments; function addComments(node, type, comments) { if (!comments || !node) return node; const key = `${type}Comments`; if (node[key]) { if (type === "leading") { node[key] = comments.concat(node[key]); } else { node[key].push(...comments); } } else { node[key] = comments; } return node; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/addComment.js var require_addComment2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/addComment.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = addComment; var _addComments = require_addComments2(); function addComment(node, type, content, line) { return (0, _addComments.default)(node, type, [{ type: line ? "CommentLine" : "CommentBlock", value: content }]); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/utils/inherit.js var require_inherit2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/utils/inherit.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = inherit; function inherit(key, child, parent) { if (child && parent) { child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean))); } } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritInnerComments.js var require_inheritInnerComments2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritInnerComments.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = inheritInnerComments; var _inherit = require_inherit2(); function inheritInnerComments(child, parent) { (0, _inherit.default)("innerComments", child, parent); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritLeadingComments.js var require_inheritLeadingComments2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritLeadingComments.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = inheritLeadingComments; var _inherit = require_inherit2(); function inheritLeadingComments(child, parent) { (0, _inherit.default)("leadingComments", child, parent); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritTrailingComments.js var require_inheritTrailingComments2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritTrailingComments.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = inheritTrailingComments; var _inherit = require_inherit2(); function inheritTrailingComments(child, parent) { (0, _inherit.default)("trailingComments", child, parent); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritsComments.js var require_inheritsComments2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/inheritsComments.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = inheritsComments; var _inheritTrailingComments = require_inheritTrailingComments2(); var _inheritLeadingComments = require_inheritLeadingComments2(); var _inheritInnerComments = require_inheritInnerComments2(); function inheritsComments(child, parent) { (0, _inheritTrailingComments.default)(child, parent); (0, _inheritLeadingComments.default)(child, parent); (0, _inheritInnerComments.default)(child, parent); return child; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/removeComments.js var require_removeComments2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/comments/removeComments.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = removeComments; var _constants = require_constants3(); function removeComments(node) { _constants.COMMENT_KEYS.forEach((key) => { node[key] = null; }); return node; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/constants/generated/index.js var require_generated9 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/constants/generated/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.WHILE_TYPES = exports2.USERWHITESPACABLE_TYPES = exports2.UNARYLIKE_TYPES = exports2.TYPESCRIPT_TYPES = exports2.TSTYPE_TYPES = exports2.TSTYPEELEMENT_TYPES = exports2.TSENTITYNAME_TYPES = exports2.TSBASETYPE_TYPES = exports2.TERMINATORLESS_TYPES = exports2.STATEMENT_TYPES = exports2.STANDARDIZED_TYPES = exports2.SCOPABLE_TYPES = exports2.PUREISH_TYPES = exports2.PROPERTY_TYPES = exports2.PRIVATE_TYPES = exports2.PATTERN_TYPES = exports2.PATTERNLIKE_TYPES = exports2.OBJECTMEMBER_TYPES = exports2.MODULESPECIFIER_TYPES = exports2.MODULEDECLARATION_TYPES = exports2.MISCELLANEOUS_TYPES = exports2.METHOD_TYPES = exports2.LVAL_TYPES = exports2.LOOP_TYPES = exports2.LITERAL_TYPES = exports2.JSX_TYPES = exports2.IMMUTABLE_TYPES = exports2.FUNCTION_TYPES = exports2.FUNCTIONPARENT_TYPES = exports2.FOR_TYPES = exports2.FORXSTATEMENT_TYPES = exports2.FLOW_TYPES = exports2.FLOWTYPE_TYPES = exports2.FLOWPREDICATE_TYPES = exports2.FLOWDECLARATION_TYPES = exports2.FLOWBASEANNOTATION_TYPES = exports2.EXPRESSION_TYPES = exports2.EXPRESSIONWRAPPER_TYPES = exports2.EXPORTDECLARATION_TYPES = exports2.ENUMMEMBER_TYPES = exports2.ENUMBODY_TYPES = exports2.DECLARATION_TYPES = exports2.CONDITIONAL_TYPES = exports2.COMPLETIONSTATEMENT_TYPES = exports2.CLASS_TYPES = exports2.BLOCK_TYPES = exports2.BLOCKPARENT_TYPES = exports2.BINARY_TYPES = exports2.ACCESSOR_TYPES = void 0; var _definitions = require_definitions2(); var STANDARDIZED_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Standardized"]; exports2.STANDARDIZED_TYPES = STANDARDIZED_TYPES; var EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"]; exports2.EXPRESSION_TYPES = EXPRESSION_TYPES; var BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"]; exports2.BINARY_TYPES = BINARY_TYPES; var SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"]; exports2.SCOPABLE_TYPES = SCOPABLE_TYPES; var BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"]; exports2.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES; var BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"]; exports2.BLOCK_TYPES = BLOCK_TYPES; var STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"]; exports2.STATEMENT_TYPES = STATEMENT_TYPES; var TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"]; exports2.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES; var COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"]; exports2.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES; var CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"]; exports2.CONDITIONAL_TYPES = CONDITIONAL_TYPES; var LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"]; exports2.LOOP_TYPES = LOOP_TYPES; var WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"]; exports2.WHILE_TYPES = WHILE_TYPES; var EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"]; exports2.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES; var FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"]; exports2.FOR_TYPES = FOR_TYPES; var FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"]; exports2.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES; var FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"]; exports2.FUNCTION_TYPES = FUNCTION_TYPES; var FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"]; exports2.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES; var PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"]; exports2.PUREISH_TYPES = PUREISH_TYPES; var DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"]; exports2.DECLARATION_TYPES = DECLARATION_TYPES; var PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"]; exports2.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES; var LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"]; exports2.LVAL_TYPES = LVAL_TYPES; var TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"]; exports2.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES; var LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"]; exports2.LITERAL_TYPES = LITERAL_TYPES; var IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"]; exports2.IMMUTABLE_TYPES = IMMUTABLE_TYPES; var USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"]; exports2.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES; var METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"]; exports2.METHOD_TYPES = METHOD_TYPES; var OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"]; exports2.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES; var PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"]; exports2.PROPERTY_TYPES = PROPERTY_TYPES; var UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"]; exports2.UNARYLIKE_TYPES = UNARYLIKE_TYPES; var PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"]; exports2.PATTERN_TYPES = PATTERN_TYPES; var CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"]; exports2.CLASS_TYPES = CLASS_TYPES; var MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"]; exports2.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES; var EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"]; exports2.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES; var MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"]; exports2.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES; var ACCESSOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Accessor"]; exports2.ACCESSOR_TYPES = ACCESSOR_TYPES; var PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"]; exports2.PRIVATE_TYPES = PRIVATE_TYPES; var FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"]; exports2.FLOW_TYPES = FLOW_TYPES; var FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"]; exports2.FLOWTYPE_TYPES = FLOWTYPE_TYPES; var FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"]; exports2.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES; var FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"]; exports2.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES; var FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"]; exports2.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES; var ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"]; exports2.ENUMBODY_TYPES = ENUMBODY_TYPES; var ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"]; exports2.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES; var JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"]; exports2.JSX_TYPES = JSX_TYPES; var MISCELLANEOUS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Miscellaneous"]; exports2.MISCELLANEOUS_TYPES = MISCELLANEOUS_TYPES; var TYPESCRIPT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TypeScript"]; exports2.TYPESCRIPT_TYPES = TYPESCRIPT_TYPES; var TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"]; exports2.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES; var TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"]; exports2.TSTYPE_TYPES = TSTYPE_TYPES; var TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"]; exports2.TSBASETYPE_TYPES = TSBASETYPE_TYPES; } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toBlock.js var require_toBlock2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toBlock.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = toBlock; var _generated = require_generated6(); var _generated2 = require_generated7(); function toBlock(node, parent) { if ((0, _generated.isBlockStatement)(node)) { return node; } let blockNodes = []; if ((0, _generated.isEmptyStatement)(node)) { blockNodes = []; } else { if (!(0, _generated.isStatement)(node)) { if ((0, _generated.isFunction)(parent)) { node = (0, _generated2.returnStatement)(node); } else { node = (0, _generated2.expressionStatement)(node); } } blockNodes = [node]; } return (0, _generated2.blockStatement)(blockNodes); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/ensureBlock.js var require_ensureBlock2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/ensureBlock.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = ensureBlock; var _toBlock = require_toBlock2(); function ensureBlock(node, key = "body") { return node[key] = (0, _toBlock.default)(node[key], node); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toIdentifier.js var require_toIdentifier2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toIdentifier.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = toIdentifier; var _isValidIdentifier = require_isValidIdentifier2(); var _helperValidatorIdentifier = require_lib5(); function toIdentifier(input) { input = input + ""; let name = ""; for (const c of input) { name += (0, _helperValidatorIdentifier.isIdentifierChar)(c.codePointAt(0)) ? c : "-"; } name = name.replace(/^[-0-9]+/, ""); name = name.replace(/[-\s]+(.)?/g, function(match, c) { return c ? c.toUpperCase() : ""; }); if (!(0, _isValidIdentifier.default)(name)) { name = `_${name}`; } return name || "_"; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js var require_toBindingIdentifierName2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = toBindingIdentifierName; var _toIdentifier = require_toIdentifier2(); function toBindingIdentifierName(name) { name = (0, _toIdentifier.default)(name); if (name === "eval" || name === "arguments") name = "_" + name; return name; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toComputedKey.js var require_toComputedKey2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toComputedKey.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = toComputedKey; var _generated = require_generated6(); var _generated2 = require_generated7(); function toComputedKey(node, key = node.key || node.property) { if (!node.computed && (0, _generated.isIdentifier)(key)) key = (0, _generated2.stringLiteral)(key.name); return key; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toExpression.js var require_toExpression2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toExpression.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var _generated = require_generated6(); var _default = toExpression; exports2.default = _default; function toExpression(node) { if ((0, _generated.isExpressionStatement)(node)) { node = node.expression; } if ((0, _generated.isExpression)(node)) { return node; } if ((0, _generated.isClass)(node)) { node.type = "ClassExpression"; } else if ((0, _generated.isFunction)(node)) { node.type = "FunctionExpression"; } if (!(0, _generated.isExpression)(node)) { throw new Error(`cannot turn ${node.type} to an expression`); } return node; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/traverse/traverseFast.js var require_traverseFast2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/traverse/traverseFast.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = traverseFast; var _definitions = require_definitions2(); function traverseFast(node, enter, opts) { if (!node) return; const keys = _definitions.VISITOR_KEYS[node.type]; if (!keys) return; opts = opts || {}; enter(node, opts); for (const key of keys) { const subNode = node[key]; if (Array.isArray(subNode)) { for (const node2 of subNode) { traverseFast(node2, enter, opts); } } else { traverseFast(subNode, enter, opts); } } } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/removeProperties.js var require_removeProperties2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/removeProperties.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = removeProperties; var _constants = require_constants3(); var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"]; var CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS); function removeProperties(node, opts = {}) { const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS; for (const key of map) { if (node[key] != null) node[key] = void 0; } for (const key of Object.keys(node)) { if (key[0] === "_" && node[key] != null) node[key] = void 0; } const symbols = Object.getOwnPropertySymbols(node); for (const sym of symbols) { node[sym] = null; } } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js var require_removePropertiesDeep2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = removePropertiesDeep; var _traverseFast = require_traverseFast2(); var _removeProperties = require_removeProperties2(); function removePropertiesDeep(tree, opts) { (0, _traverseFast.default)(tree, _removeProperties.default, opts); return tree; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toKeyAlias.js var require_toKeyAlias2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toKeyAlias.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = toKeyAlias; var _generated = require_generated6(); var _cloneNode = require_cloneNode2(); var _removePropertiesDeep = require_removePropertiesDeep2(); function toKeyAlias(node, key = node.key) { let alias; if (node.kind === "method") { return toKeyAlias.increment() + ""; } else if ((0, _generated.isIdentifier)(key)) { alias = key.name; } else if ((0, _generated.isStringLiteral)(key)) { alias = JSON.stringify(key.value); } else { alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key))); } if (node.computed) { alias = `[${alias}]`; } if (node.static) { alias = `static:${alias}`; } return alias; } toKeyAlias.uid = 0; toKeyAlias.increment = function() { if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) { return toKeyAlias.uid = 0; } else { return toKeyAlias.uid++; } }; } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js var require_getBindingIdentifiers2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = getBindingIdentifiers; var _generated = require_generated6(); function getBindingIdentifiers(node, duplicates, outerOnly) { let search = [].concat(node); const ids = /* @__PURE__ */ Object.create(null); while (search.length) { const id = search.shift(); if (!id) continue; const keys = getBindingIdentifiers.keys[id.type]; if ((0, _generated.isIdentifier)(id)) { if (duplicates) { const _ids = ids[id.name] = ids[id.name] || []; _ids.push(id); } else { ids[id.name] = id; } continue; } if ((0, _generated.isExportDeclaration)(id) && !(0, _generated.isExportAllDeclaration)(id)) { if ((0, _generated.isDeclaration)(id.declaration)) { search.push(id.declaration); } continue; } if (outerOnly) { if ((0, _generated.isFunctionDeclaration)(id)) { search.push(id.id); continue; } if ((0, _generated.isFunctionExpression)(id)) { continue; } } if (keys) { for (let i = 0; i < keys.length; i++) { const key = keys[i]; if (id[key]) { search = search.concat(id[key]); } } } } return ids; } getBindingIdentifiers.keys = { 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"] }; } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js var require_gatherSequenceExpressions2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = gatherSequenceExpressions; var _getBindingIdentifiers = require_getBindingIdentifiers2(); var _generated = require_generated6(); var _generated2 = require_generated7(); var _cloneNode = require_cloneNode2(); function gatherSequenceExpressions(nodes, scope, declars) { const exprs = []; let ensureLastUndefined = true; for (const node of nodes) { if (!(0, _generated.isEmptyStatement)(node)) { ensureLastUndefined = false; } if ((0, _generated.isExpression)(node)) { exprs.push(node); } else if ((0, _generated.isExpressionStatement)(node)) { exprs.push(node.expression); } else if ((0, _generated.isVariableDeclaration)(node)) { if (node.kind !== "var") return; for (const declar of node.declarations) { const bindings = (0, _getBindingIdentifiers.default)(declar); for (const key of Object.keys(bindings)) { declars.push({ kind: node.kind, id: (0, _cloneNode.default)(bindings[key]) }); } if (declar.init) { exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init)); } } ensureLastUndefined = true; } else if ((0, _generated.isIfStatement)(node)) { const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode(); const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode(); if (!consequent || !alternate) return; exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate)); } else if ((0, _generated.isBlockStatement)(node)) { const body = gatherSequenceExpressions(node.body, scope, declars); if (!body) return; exprs.push(body); } else if ((0, _generated.isEmptyStatement)(node)) { if (nodes.indexOf(node) === 0) { ensureLastUndefined = true; } } else { return; } } if (ensureLastUndefined) { exprs.push(scope.buildUndefinedNode()); } if (exprs.length === 1) { return exprs[0]; } else { return (0, _generated2.sequenceExpression)(exprs); } } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toSequenceExpression.js var require_toSequenceExpression2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toSequenceExpression.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = toSequenceExpression; var _gatherSequenceExpressions = require_gatherSequenceExpressions2(); function toSequenceExpression(nodes, scope) { if (!(nodes != null && nodes.length)) return; const declars = []; const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars); if (!result) return; for (const declar of declars) { scope.push(declar); } return result; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toStatement.js var require_toStatement2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/toStatement.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var _generated = require_generated6(); var _generated2 = require_generated7(); var _default = toStatement; exports2.default = _default; function toStatement(node, ignore) { if ((0, _generated.isStatement)(node)) { return node; } let mustHaveId = false; let newType; if ((0, _generated.isClass)(node)) { mustHaveId = true; newType = "ClassDeclaration"; } else if ((0, _generated.isFunction)(node)) { mustHaveId = true; newType = "FunctionDeclaration"; } else if ((0, _generated.isAssignmentExpression)(node)) { return (0, _generated2.expressionStatement)(node); } if (mustHaveId && !node.id) { newType = false; } if (!newType) { if (ignore) { return false; } else { throw new Error(`cannot turn ${node.type} to a statement`); } } node.type = newType; return node; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/valueToNode.js var require_valueToNode2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/converters/valueToNode.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var _isValidIdentifier = require_isValidIdentifier2(); var _generated = require_generated7(); var _default = valueToNode; exports2.default = _default; var objectToString = Function.call.bind(Object.prototype.toString); function isRegExp(value) { return objectToString(value) === "[object RegExp]"; } function isPlainObject(value) { if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") { return false; } const proto = Object.getPrototypeOf(value); return proto === null || Object.getPrototypeOf(proto) === null; } function valueToNode(value) { if (value === void 0) { return (0, _generated.identifier)("undefined"); } if (value === true || value === false) { return (0, _generated.booleanLiteral)(value); } if (value === null) { return (0, _generated.nullLiteral)(); } if (typeof value === "string") { return (0, _generated.stringLiteral)(value); } if (typeof value === "number") { let result; if (Number.isFinite(value)) { result = (0, _generated.numericLiteral)(Math.abs(value)); } else { let numerator; if (Number.isNaN(value)) { numerator = (0, _generated.numericLiteral)(0); } else { numerator = (0, _generated.numericLiteral)(1); } result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0)); } if (value < 0 || Object.is(value, -0)) { result = (0, _generated.unaryExpression)("-", result); } return result; } if (isRegExp(value)) { const pattern = value.source; const flags = value.toString().match(/\/([a-z]+|)$/)[1]; return (0, _generated.regExpLiteral)(pattern, flags); } if (Array.isArray(value)) { return (0, _generated.arrayExpression)(value.map(valueToNode)); } if (isPlainObject(value)) { const props = []; for (const key of Object.keys(value)) { let nodeKey; if ((0, _isValidIdentifier.default)(key)) { nodeKey = (0, _generated.identifier)(key); } else { nodeKey = (0, _generated.stringLiteral)(key); } props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key]))); } return (0, _generated.objectExpression)(props); } throw new Error("don't know how to turn this value into a node"); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js var require_appendToMemberExpression2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = appendToMemberExpression; var _generated = require_generated7(); function appendToMemberExpression(member, append, computed = false) { member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed); member.property = append; member.computed = !!computed; return member; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/inherits.js var require_inherits3 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/inherits.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = inherits; var _constants = require_constants3(); var _inheritsComments = require_inheritsComments2(); function inherits(child, parent) { if (!child || !parent) return child; for (const key of _constants.INHERIT_KEYS.optional) { if (child[key] == null) { child[key] = parent[key]; } } for (const key of Object.keys(parent)) { if (key[0] === "_" && key !== "__clone") child[key] = parent[key]; } for (const key of _constants.INHERIT_KEYS.force) { child[key] = parent[key]; } (0, _inheritsComments.default)(child, parent); return child; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js var require_prependToMemberExpression2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = prependToMemberExpression; var _generated = require_generated7(); function prependToMemberExpression(member, prepend) { member.object = (0, _generated.memberExpression)(prepend, member.object); return member; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js var require_getOuterBindingIdentifiers2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var _getBindingIdentifiers = require_getBindingIdentifiers2(); var _default = getOuterBindingIdentifiers; exports2.default = _default; function getOuterBindingIdentifiers(node, duplicates) { return (0, _getBindingIdentifiers.default)(node, duplicates, true); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/traverse/traverse.js var require_traverse2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/traverse/traverse.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = traverse; var _definitions = require_definitions2(); function traverse(node, handlers, state) { if (typeof handlers === "function") { handlers = { enter: handlers }; } const { enter, exit } = handlers; traverseSimpleImpl(node, enter, exit, state, []); } function traverseSimpleImpl(node, enter, exit, state, ancestors) { const keys = _definitions.VISITOR_KEYS[node.type]; if (!keys) return; if (enter) enter(node, ancestors, state); for (const key of keys) { const subNode = node[key]; if (Array.isArray(subNode)) { for (let i = 0; i < subNode.length; i++) { const child = subNode[i]; if (!child) continue; ancestors.push({ node, key, index: i }); traverseSimpleImpl(child, enter, exit, state, ancestors); ancestors.pop(); } } else if (subNode) { ancestors.push({ node, key }); traverseSimpleImpl(subNode, enter, exit, state, ancestors); ancestors.pop(); } } if (exit) exit(node, ancestors, state); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isBinding.js var require_isBinding2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isBinding.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isBinding; var _getBindingIdentifiers = require_getBindingIdentifiers2(); function isBinding(node, parent, grandparent) { if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") { return false; } const keys = _getBindingIdentifiers.default.keys[parent.type]; if (keys) { for (let i = 0; i < keys.length; i++) { const key = keys[i]; const val = parent[key]; if (Array.isArray(val)) { if (val.indexOf(node) >= 0) return true; } else { if (val === node) return true; } } } return false; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isLet.js var require_isLet2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isLet.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isLet; var _generated = require_generated6(); var _constants = require_constants3(); function isLet(node) { return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isBlockScoped.js var require_isBlockScoped2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isBlockScoped.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isBlockScoped; var _generated = require_generated6(); var _isLet = require_isLet2(); function isBlockScoped(node) { return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isImmutable.js var require_isImmutable2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isImmutable.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isImmutable; var _isType = require_isType2(); var _generated = require_generated6(); function isImmutable(node) { if ((0, _isType.default)(node.type, "Immutable")) return true; if ((0, _generated.isIdentifier)(node)) { if (node.name === "undefined") { return true; } else { return false; } } return false; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isNodesEquivalent.js var require_isNodesEquivalent2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isNodesEquivalent.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isNodesEquivalent; var _definitions = require_definitions2(); function isNodesEquivalent(a, b) { if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) { return a === b; } if (a.type !== b.type) { return false; } const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type); const visitorKeys = _definitions.VISITOR_KEYS[a.type]; for (const field of fields) { if (typeof a[field] !== typeof b[field]) { return false; } if (a[field] == null && b[field] == null) { continue; } else if (a[field] == null || b[field] == null) { return false; } if (Array.isArray(a[field])) { if (!Array.isArray(b[field])) { return false; } if (a[field].length !== b[field].length) { return false; } for (let i = 0; i < a[field].length; i++) { if (!isNodesEquivalent(a[field][i], b[field][i])) { return false; } } continue; } if (typeof a[field] === "object" && !(visitorKeys != null && visitorKeys.includes(field))) { for (const key of Object.keys(a[field])) { if (a[field][key] !== b[field][key]) { return false; } } continue; } if (!isNodesEquivalent(a[field], b[field])) { return false; } } return true; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isReferenced.js var require_isReferenced2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isReferenced.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isReferenced; function isReferenced(node, parent, grandparent) { switch (parent.type) { case "MemberExpression": case "OptionalMemberExpression": if (parent.property === node) { return !!parent.computed; } return parent.object === node; case "JSXMemberExpression": return parent.object === node; case "VariableDeclarator": return parent.init === node; case "ArrowFunctionExpression": return parent.body === node; case "PrivateName": return false; case "ClassMethod": case "ClassPrivateMethod": case "ObjectMethod": if (parent.key === node) { return !!parent.computed; } return false; case "ObjectProperty": if (parent.key === node) { return !!parent.computed; } return !grandparent || grandparent.type !== "ObjectPattern"; case "ClassProperty": case "ClassAccessorProperty": if (parent.key === node) { return !!parent.computed; } return true; case "ClassPrivateProperty": return parent.key !== node; case "ClassDeclaration": case "ClassExpression": return parent.superClass === node; case "AssignmentExpression": return parent.right === node; case "AssignmentPattern": return parent.right === node; case "LabeledStatement": return false; case "CatchClause": return false; case "RestElement": return false; case "BreakStatement": case "ContinueStatement": return false; case "FunctionDeclaration": case "FunctionExpression": return false; case "ExportNamespaceSpecifier": case "ExportDefaultSpecifier": return false; case "ExportSpecifier": if (grandparent != null && grandparent.source) { return false; } return parent.local === node; case "ImportDefaultSpecifier": case "ImportNamespaceSpecifier": case "ImportSpecifier": return false; case "ImportAttribute": return false; case "JSXAttribute": return false; case "ObjectPattern": case "ArrayPattern": return false; case "MetaProperty": return false; case "ObjectTypeProperty": return parent.key !== node; case "TSEnumMember": return parent.id !== node; case "TSPropertySignature": if (parent.key === node) { return !!parent.computed; } return true; } return true; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isScope.js var require_isScope2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isScope.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isScope; var _generated = require_generated6(); function isScope(node, parent) { if ((0, _generated.isBlockStatement)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) { return false; } if ((0, _generated.isPattern)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) { return true; } return (0, _generated.isScopable)(node); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isSpecifierDefault.js var require_isSpecifierDefault2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isSpecifierDefault.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isSpecifierDefault; var _generated = require_generated6(); function isSpecifierDefault(specifier) { return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, { name: "default" }); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isValidES3Identifier.js var require_isValidES3Identifier2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isValidES3Identifier.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isValidES3Identifier; var _isValidIdentifier = require_isValidIdentifier2(); var RESERVED_WORDS_ES3_ONLY = /* @__PURE__ */ 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 isValidES3Identifier(name) { return (0, _isValidIdentifier.default)(name) && !RESERVED_WORDS_ES3_ONLY.has(name); } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isVar.js var require_isVar2 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/validators/isVar.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isVar; var _generated = require_generated6(); var _constants = require_constants3(); function isVar(node) { return (0, _generated.isVariableDeclaration)(node, { kind: "var" }) && !node[_constants.BLOCK_SCOPED_SYMBOL]; } } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/ast-types/generated/index.js var require_generated10 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/ast-types/generated/index.js"() { } }); // node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/index.js var require_lib6 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var _exportNames = { react: true, assertNode: true, createTypeAnnotationBasedOnTypeof: true, createUnionTypeAnnotation: true, createFlowUnionType: true, createTSUnionType: true, cloneNode: true, clone: true, cloneDeep: true, cloneDeepWithoutLoc: true, cloneWithoutLoc: true, addComment: true, addComments: true, inheritInnerComments: true, inheritLeadingComments: true, inheritsComments: true, inheritTrailingComments: true, removeComments: true, ensureBlock: true, toBindingIdentifierName: true, toBlock: true, toComputedKey: true, toExpression: true, toIdentifier: true, toKeyAlias: true, toSequenceExpression: true, toStatement: true, valueToNode: true, appendToMemberExpression: true, inherits: true, prependToMemberExpression: true, removeProperties: true, removePropertiesDeep: true, removeTypeDuplicates: true, getBindingIdentifiers: true, getOuterBindingIdentifiers: true, traverse: true, traverseFast: true, shallowEqual: true, is: true, isBinding: true, isBlockScoped: true, isImmutable: true, isLet: true, isNode: true, isNodesEquivalent: true, isPlaceholderType: true, isReferenced: true, isScope: true, isSpecifierDefault: true, isType: true, isValidES3Identifier: true, isValidIdentifier: true, isVar: true, matchesPattern: true, validate: true, buildMatchMemberExpression: true }; Object.defineProperty(exports2, "addComment", { enumerable: true, get: function() { return _addComment.default; } }); Object.defineProperty(exports2, "addComments", { enumerable: true, get: function() { return _addComments.default; } }); Object.defineProperty(exports2, "appendToMemberExpression", { enumerable: true, get: function() { return _appendToMemberExpression.default; } }); Object.defineProperty(exports2, "assertNode", { enumerable: true, get: function() { return _assertNode.default; } }); Object.defineProperty(exports2, "buildMatchMemberExpression", { enumerable: true, get: function() { return _buildMatchMemberExpression.default; } }); Object.defineProperty(exports2, "clone", { enumerable: true, get: function() { return _clone.default; } }); Object.defineProperty(exports2, "cloneDeep", { enumerable: true, get: function() { return _cloneDeep.default; } }); Object.defineProperty(exports2, "cloneDeepWithoutLoc", { enumerable: true, get: function() { return _cloneDeepWithoutLoc.default; } }); Object.defineProperty(exports2, "cloneNode", { enumerable: true, get: function() { return _cloneNode.default; } }); Object.defineProperty(exports2, "cloneWithoutLoc", { enumerable: true, get: function() { return _cloneWithoutLoc.default; } }); Object.defineProperty(exports2, "createFlowUnionType", { enumerable: true, get: function() { return _createFlowUnionType.default; } }); Object.defineProperty(exports2, "createTSUnionType", { enumerable: true, get: function() { return _createTSUnionType.default; } }); Object.defineProperty(exports2, "createTypeAnnotationBasedOnTypeof", { enumerable: true, get: function() { return _createTypeAnnotationBasedOnTypeof.default; } }); Object.defineProperty(exports2, "createUnionTypeAnnotation", { enumerable: true, get: function() { return _createFlowUnionType.default; } }); Object.defineProperty(exports2, "ensureBlock", { enumerable: true, get: function() { return _ensureBlock.default; } }); Object.defineProperty(exports2, "getBindingIdentifiers", { enumerable: true, get: function() { return _getBindingIdentifiers.default; } }); Object.defineProperty(exports2, "getOuterBindingIdentifiers", { enumerable: true, get: function() { return _getOuterBindingIdentifiers.default; } }); Object.defineProperty(exports2, "inheritInnerComments", { enumerable: true, get: function() { return _inheritInnerComments.default; } }); Object.defineProperty(exports2, "inheritLeadingComments", { enumerable: true, get: function() { return _inheritLeadingComments.default; } }); Object.defineProperty(exports2, "inheritTrailingComments", { enumerable: true, get: function() { return _inheritTrailingComments.default; } }); Object.defineProperty(exports2, "inherits", { enumerable: true, get: function() { return _inherits.default; } }); Object.defineProperty(exports2, "inheritsComments", { enumerable: true, get: function() { return _inheritsComments.default; } }); Object.defineProperty(exports2, "is", { enumerable: true, get: function() { return _is.default; } }); Object.defineProperty(exports2, "isBinding", { enumerable: true, get: function() { return _isBinding.default; } }); Object.defineProperty(exports2, "isBlockScoped", { enumerable: true, get: function() { return _isBlockScoped.default; } }); Object.defineProperty(exports2, "isImmutable", { enumerable: true, get: function() { return _isImmutable.default; } }); Object.defineProperty(exports2, "isLet", { enumerable: true, get: function() { return _isLet.default; } }); Object.defineProperty(exports2, "isNode", { enumerable: true, get: function() { return _isNode.default; } }); Object.defineProperty(exports2, "isNodesEquivalent", { enumerable: true, get: function() { return _isNodesEquivalent.default; } }); Object.defineProperty(exports2, "isPlaceholderType", { enumerable: true, get: function() { return _isPlaceholderType.default; } }); Object.defineProperty(exports2, "isReferenced", { enumerable: true, get: function() { return _isReferenced.default; } }); Object.defineProperty(exports2, "isScope", { enumerable: true, get: function() { return _isScope.default; } }); Object.defineProperty(exports2, "isSpecifierDefault", { enumerable: true, get: function() { return _isSpecifierDefault.default; } }); Object.defineProperty(exports2, "isType", { enumerable: true, get: function() { return _isType.default; } }); Object.defineProperty(exports2, "isValidES3Identifier", { enumerable: true, get: function() { return _isValidES3Identifier.default; } }); Object.defineProperty(exports2, "isValidIdentifier", { enumerable: true, get: function() { return _isValidIdentifier.default; } }); Object.defineProperty(exports2, "isVar", { enumerable: true, get: function() { return _isVar.default; } }); Object.defineProperty(exports2, "matchesPattern", { enumerable: true, get: function() { return _matchesPattern.default; } }); Object.defineProperty(exports2, "prependToMemberExpression", { enumerable: true, get: function() { return _prependToMemberExpression.default; } }); exports2.react = void 0; Object.defineProperty(exports2, "removeComments", { enumerable: true, get: function() { return _removeComments.default; } }); Object.defineProperty(exports2, "removeProperties", { enumerable: true, get: function() { return _removeProperties.default; } }); Object.defineProperty(exports2, "removePropertiesDeep", { enumerable: true, get: function() { return _removePropertiesDeep.default; } }); Object.defineProperty(exports2, "removeTypeDuplicates", { enumerable: true, get: function() { return _removeTypeDuplicates.default; } }); Object.defineProperty(exports2, "shallowEqual", { enumerable: true, get: function() { return _shallowEqual.default; } }); Object.defineProperty(exports2, "toBindingIdentifierName", { enumerable: true, get: function() { return _toBindingIdentifierName.default; } }); Object.defineProperty(exports2, "toBlock", { enumerable: true, get: function() { return _toBlock.default; } }); Object.defineProperty(exports2, "toComputedKey", { enumerable: true, get: function() { return _toComputedKey.default; } }); Object.defineProperty(exports2, "toExpression", { enumerable: true, get: function() { return _toExpression.default; } }); Object.defineProperty(exports2, "toIdentifier", { enumerable: true, get: function() { return _toIdentifier.default; } }); Object.defineProperty(exports2, "toKeyAlias", { enumerable: true, get: function() { return _toKeyAlias.default; } }); Object.defineProperty(exports2, "toSequenceExpression", { enumerable: true, get: function() { return _toSequenceExpression.default; } }); Object.defineProperty(exports2, "toStatement", { enumerable: true, get: function() { return _toStatement.default; } }); Object.defineProperty(exports2, "traverse", { enumerable: true, get: function() { return _traverse.default; } }); Object.defineProperty(exports2, "traverseFast", { enumerable: true, get: function() { return _traverseFast.default; } }); Object.defineProperty(exports2, "validate", { enumerable: true, get: function() { return _validate.default; } }); Object.defineProperty(exports2, "valueToNode", { enumerable: true, get: function() { return _valueToNode.default; } }); var _isReactComponent = require_isReactComponent2(); var _isCompatTag = require_isCompatTag2(); var _buildChildren = require_buildChildren2(); var _assertNode = require_assertNode2(); var _generated = require_generated8(); Object.keys(_generated).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _generated[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _generated[key]; } }); }); var _createTypeAnnotationBasedOnTypeof = require_createTypeAnnotationBasedOnTypeof2(); var _createFlowUnionType = require_createFlowUnionType2(); var _createTSUnionType = require_createTSUnionType2(); var _generated2 = require_generated7(); Object.keys(_generated2).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _generated2[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _generated2[key]; } }); }); var _uppercase = require_uppercase2(); Object.keys(_uppercase).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _uppercase[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _uppercase[key]; } }); }); var _cloneNode = require_cloneNode2(); var _clone = require_clone3(); var _cloneDeep = require_cloneDeep2(); var _cloneDeepWithoutLoc = require_cloneDeepWithoutLoc2(); var _cloneWithoutLoc = require_cloneWithoutLoc2(); var _addComment = require_addComment2(); var _addComments = require_addComments2(); var _inheritInnerComments = require_inheritInnerComments2(); var _inheritLeadingComments = require_inheritLeadingComments2(); var _inheritsComments = require_inheritsComments2(); var _inheritTrailingComments = require_inheritTrailingComments2(); var _removeComments = require_removeComments2(); var _generated3 = require_generated9(); Object.keys(_generated3).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _generated3[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _generated3[key]; } }); }); var _constants = require_constants3(); Object.keys(_constants).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _constants[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _constants[key]; } }); }); var _ensureBlock = require_ensureBlock2(); var _toBindingIdentifierName = require_toBindingIdentifierName2(); var _toBlock = require_toBlock2(); var _toComputedKey = require_toComputedKey2(); var _toExpression = require_toExpression2(); var _toIdentifier = require_toIdentifier2(); var _toKeyAlias = require_toKeyAlias2(); var _toSequenceExpression = require_toSequenceExpression2(); var _toStatement = require_toStatement2(); var _valueToNode = require_valueToNode2(); var _definitions = require_definitions2(); Object.keys(_definitions).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _definitions[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _definitions[key]; } }); }); var _appendToMemberExpression = require_appendToMemberExpression2(); var _inherits = require_inherits3(); var _prependToMemberExpression = require_prependToMemberExpression2(); var _removeProperties = require_removeProperties2(); var _removePropertiesDeep = require_removePropertiesDeep2(); var _removeTypeDuplicates = require_removeTypeDuplicates3(); var _getBindingIdentifiers = require_getBindingIdentifiers2(); var _getOuterBindingIdentifiers = require_getOuterBindingIdentifiers2(); var _traverse = require_traverse2(); Object.keys(_traverse).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _traverse[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _traverse[key]; } }); }); var _traverseFast = require_traverseFast2(); var _shallowEqual = require_shallowEqual2(); var _is = require_is2(); var _isBinding = require_isBinding2(); var _isBlockScoped = require_isBlockScoped2(); var _isImmutable = require_isImmutable2(); var _isLet = require_isLet2(); var _isNode = require_isNode2(); var _isNodesEquivalent = require_isNodesEquivalent2(); var _isPlaceholderType = require_isPlaceholderType2(); var _isReferenced = require_isReferenced2(); var _isScope = require_isScope2(); var _isSpecifierDefault = require_isSpecifierDefault2(); var _isType = require_isType2(); var _isValidES3Identifier = require_isValidES3Identifier2(); var _isValidIdentifier = require_isValidIdentifier2(); var _isVar = require_isVar2(); var _matchesPattern = require_matchesPattern2(); var _validate = require_validate2(); var _buildMatchMemberExpression = require_buildMatchMemberExpression2(); var _generated4 = require_generated6(); Object.keys(_generated4).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _generated4[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _generated4[key]; } }); }); var _generated5 = require_generated10(); Object.keys(_generated5).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _generated5[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _generated5[key]; } }); }); var react = { isReactComponent: _isReactComponent.default, isCompatTag: _isCompatTag.default, buildChildren: _buildChildren.default }; exports2.react = react; } }); // node_modules/@babel/helper-split-export-declaration/lib/index.js var require_lib7 = __commonJS({ "node_modules/@babel/helper-split-export-declaration/lib/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = splitExportDeclaration; var _t = require_lib6(); var { cloneNode, exportNamedDeclaration, exportSpecifier, identifier, variableDeclaration, variableDeclarator } = _t; function splitExportDeclaration(exportDeclaration) { if (!exportDeclaration.isExportDeclaration()) { throw new Error("Only export declarations can be split."); } const isDefault = exportDeclaration.isExportDefaultDeclaration(); const declaration = exportDeclaration.get("declaration"); const isClassDeclaration = declaration.isClassDeclaration(); if (isDefault) { const standaloneDeclaration = declaration.isFunctionDeclaration() || isClassDeclaration; const scope = declaration.isScope() ? declaration.scope.parent : declaration.scope; let id = declaration.node.id; let needBindingRegistration = false; if (!id) { needBindingRegistration = true; id = scope.generateUidIdentifier("default"); if (standaloneDeclaration || declaration.isFunctionExpression() || declaration.isClassExpression()) { declaration.node.id = cloneNode(id); } } const updatedDeclaration = standaloneDeclaration ? declaration : variableDeclaration("var", [variableDeclarator(cloneNode(id), declaration.node)]); const updatedExportDeclaration = exportNamedDeclaration(null, [exportSpecifier(cloneNode(id), identifier("default"))]); exportDeclaration.insertAfter(updatedExportDeclaration); exportDeclaration.replaceWith(updatedDeclaration); if (needBindingRegistration) { scope.registerDeclaration(exportDeclaration); } return exportDeclaration; } if (exportDeclaration.get("specifiers").length > 0) { throw new Error("It doesn't make sense to split exported specifiers."); } const bindingIdentifiers = declaration.getOuterBindingIdentifiers(); const specifiers = Object.keys(bindingIdentifiers).map((name) => { return exportSpecifier(identifier(name), identifier(name)); }); const aliasDeclar = exportNamedDeclaration(null, specifiers); exportDeclaration.insertAfter(aliasDeclar); exportDeclaration.replaceWith(declaration.node); return exportDeclaration; } } }); // node_modules/@babel/traverse/lib/scope/lib/renamer.js var require_renamer = __commonJS({ "node_modules/@babel/traverse/lib/scope/lib/renamer.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var _binding = require_binding(); var _helperSplitExportDeclaration = require_lib7(); var _t = require_lib4(); var { VISITOR_KEYS, assignmentExpression, identifier, toExpression, variableDeclaration, variableDeclarator } = _t; var renameVisitor = { ReferencedIdentifier({ node }, state) { if (node.name === state.oldName) { node.name = state.newName; } }, Scope(path2, state) { if (!path2.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) { skipAllButComputedMethodKey(path2); } }, "AssignmentExpression|Declaration|VariableDeclarator"(path2, state) { if (path2.isVariableDeclaration()) return; const ids = path2.getOuterBindingIdentifiers(); for (const name in ids) { if (name === state.oldName) ids[name].name = state.newName; } } }; var Renamer = class { constructor(binding, oldName, newName) { this.newName = newName; this.oldName = oldName; this.binding = binding; } maybeConvertFromExportDeclaration(parentDeclar) { const maybeExportDeclar = parentDeclar.parentPath; if (!maybeExportDeclar.isExportDeclaration()) { return; } if (maybeExportDeclar.isExportDefaultDeclaration() && !maybeExportDeclar.get("declaration").node.id) { return; } (0, _helperSplitExportDeclaration.default)(maybeExportDeclar); } maybeConvertFromClassFunctionDeclaration(path2) { return; if (!path2.isFunctionDeclaration() && !path2.isClassDeclaration()) return; if (this.binding.kind !== "hoisted") return; path2.node.id = identifier(this.oldName); path2.node._blockHoist = 3; path2.replaceWith(variableDeclaration("let", [variableDeclarator(identifier(this.newName), toExpression(path2.node))])); } maybeConvertFromClassFunctionExpression(path2) { return; if (!path2.isFunctionExpression() && !path2.isClassExpression()) return; if (this.binding.kind !== "local") return; path2.node.id = identifier(this.oldName); this.binding.scope.parent.push({ id: identifier(this.newName) }); path2.replaceWith(assignmentExpression("=", identifier(this.newName), path2.node)); } rename(block) { const { binding, oldName, newName } = this; const { scope, path: path2 } = binding; const parentDeclar = path2.find((path3) => path3.isDeclaration() || path3.isFunctionExpression() || path3.isClassExpression()); if (parentDeclar) { const bindingIds = parentDeclar.getOuterBindingIdentifiers(); if (bindingIds[oldName] === binding.identifier) { this.maybeConvertFromExportDeclaration(parentDeclar); } } const blockToTraverse = block || scope.block; if ((blockToTraverse == null ? void 0 : blockToTraverse.type) === "SwitchStatement") { blockToTraverse.cases.forEach((c) => { scope.traverse(c, renameVisitor, this); }); } else { scope.traverse(blockToTraverse, renameVisitor, this); } if (!block) { scope.removeOwnBinding(oldName); scope.bindings[newName] = binding; this.binding.identifier.name = newName; } if (parentDeclar) { this.maybeConvertFromClassFunctionDeclaration(parentDeclar); this.maybeConvertFromClassFunctionExpression(parentDeclar); } } }; exports2.default = Renamer; function skipAllButComputedMethodKey(path2) { if (!path2.isMethod() || !path2.node.computed) { path2.skip(); return; } const keys = VISITOR_KEYS[path2.type]; for (const key of keys) { if (key !== "key") path2.skipKey(key); } } } }); // ../../node_modules/globals/globals.json var require_globals = __commonJS({ "../../node_modules/globals/globals.json"(exports2, module2) { module2.exports = { builtin: { Array: false, ArrayBuffer: false, Atomics: false, BigInt: false, BigInt64Array: false, BigUint64Array: false, Boolean: false, constructor: false, DataView: false, Date: false, decodeURI: false, decodeURIComponent: false, encodeURI: false, encodeURIComponent: false, Error: false, escape: false, eval: false, EvalError: false, Float32Array: false, Float64Array: false, Function: false, globalThis: false, hasOwnProperty: false, Infinity: false, Int16Array: false, Int32Array: false, Int8Array: false, isFinite: false, isNaN: false, isPrototypeOf: false, JSON: false, Map: false, Math: false, NaN: false, Number: false, Object: false, parseFloat: false, parseInt: false, Promise: false, propertyIsEnumerable: false, Proxy: false, RangeError: false, ReferenceError: false, Reflect: false, RegExp: false, Set: false, SharedArrayBuffer: false, String: false, Symbol: false, SyntaxError: false, toLocaleString: false, toString: false, TypeError: false, Uint16Array: false, Uint32Array: false, Uint8Array: false, Uint8ClampedArray: false, undefined: false, unescape: false, URIError: false, valueOf: false, WeakMap: false, WeakSet: false }, es5: { Array: false, Boolean: false, constructor: false, Date: false, decodeURI: false, decodeURIComponent: false, encodeURI: false, encodeURIComponent: false, Error: false, escape: false, eval: false, EvalError: false, Function: false, hasOwnProperty: false, Infinity: false, isFinite: false, isNaN: false, isPrototypeOf: false, JSON: false, Math: false, NaN: false, Number: false, Object: false, parseFloat: false, parseInt: false, propertyIsEnumerable: false, RangeError: false, ReferenceError: false, RegExp: false, String: false, SyntaxError: false, toLocaleString: false, toString: false, TypeError: false, undefined: false, unescape: false, URIError: false, valueOf: false }, es2015: { Array: false, ArrayBuffer: false, Boolean: false, constructor: false, DataView: false, Date: false, decodeURI: false, decodeURIComponent: false, encodeURI: false, encodeURIComponent: false, Error: false, escape: false, eval: false, EvalError: false, Float32Array: false, Float64Array: false, Function: false, hasOwnProperty: false, Infinity: false, Int16Array: false, Int32Array: false, Int8Array: false, isFinite: false, isNaN: false, isPrototypeOf: false, JSON: false, Map: false, Math: false, NaN: false, Number: false, Object: false, parseFloat: false, parseInt: false, Promise: false, propertyIsEnumerable: false, Proxy: false, RangeError: false, ReferenceError: false, Reflect: false, RegExp: false, Set: false, String: false, Symbol: false, SyntaxError: false, toLocaleString: false, toString: false, TypeError: false, Uint16Array: false, Uint32Array: false, Uint8Array: false, Uint8ClampedArray: false, undefined: false, unescape: false, URIError: false, valueOf: false, WeakMap: false, WeakSet: false }, es2017: { Array: false, ArrayBuffer: false, Atomics: false, Boolean: false, constructor: false, DataView: false, Date: false, decodeURI: false, decodeURIComponent: false, encodeURI: false, encodeURIComponent: false, Error: false, escape: false, eval: false, EvalError: false, Float32Array: false, Float64Array: false, Function: false, hasOwnProperty: false, Infinity: false, Int16Array: false, Int32Array: false, Int8Array: false, isFinite: false, isNaN: false, isPrototypeOf: false, JSON: false, Map: false, Math: false, NaN: false, Number: false, Object: false, parseFloat: false, parseInt: false, Promise: false, propertyIsEnumerable: false, Proxy: false, RangeError: false, ReferenceError: false, Reflect: false, RegExp: false, Set: false, SharedArrayBuffer: false, String: false, Symbol: false, SyntaxError: false, toLocaleString: false, toString: false, TypeError: false, Uint16Array: false, Uint32Array: false, Uint8Array: false, Uint8ClampedArray: false, undefined: false, unescape: false, URIError: false, valueOf: false, WeakMap: false, WeakSet: false }, browser: { AbortController: false, AbortSignal: false, addEventListener: false, alert: false, AnalyserNode: false, Animation: false, AnimationEffectReadOnly: false, AnimationEffectTiming: false, AnimationEffectTimingReadOnly: false, AnimationEvent: false, AnimationPlaybackEvent: false, AnimationTimeline: false, applicationCache: false, ApplicationCache: false, ApplicationCacheErrorEvent: false, atob: false, Attr: false, Audio: false, AudioBuffer: false, AudioBufferSourceNode: false, AudioContext: false, AudioDestinationNode: false, AudioListener: false, AudioNode: false, AudioParam: false, AudioProcessingEvent: false, AudioScheduledSourceNode: false, "AudioWorkletGlobalScope ": false, AudioWorkletNode: false, AudioWorkletProcessor: false, BarProp: false, BaseAudioContext: false, BatteryManager: false, BeforeUnloadEvent: false, BiquadFilterNode: false, Blob: false, BlobEvent: false, blur: false, BroadcastChannel: false, btoa: false, BudgetService: false, ByteLengthQueuingStrategy: false, Cache: false, caches: false, CacheStorage: false, cancelAnimationFrame: false, cancelIdleCallback: false, CanvasCaptureMediaStreamTrack: false, CanvasGradient: false, CanvasPattern: false, CanvasRenderingContext2D: false, ChannelMergerNode: false, ChannelSplitterNode: false, CharacterData: false, clearInterval: false, clearTimeout: false, clientInformation: false, ClipboardEvent: false, close: false, closed: false, CloseEvent: false, Comment: false, CompositionEvent: false, confirm: false, console: false, ConstantSourceNode: false, ConvolverNode: false, CountQueuingStrategy: false, createImageBitmap: false, Credential: false, CredentialsContainer: false, crypto: false, Crypto: false, CryptoKey: false, CSS: false, CSSConditionRule: false, CSSFontFaceRule: false, CSSGroupingRule: false, CSSImportRule: false, CSSKeyframeRule: false, CSSKeyframesRule: false, CSSMediaRule: false, CSSNamespaceRule: false, CSSPageRule: false, CSSRule: false, CSSRuleList: false, CSSStyleDeclaration: false, CSSStyleRule: false, CSSStyleSheet: false, CSSSupportsRule: false, CustomElementRegistry: false, customElements: false, CustomEvent: false, DataTransfer: false, DataTransferItem: false, DataTransferItemList: false, defaultstatus: false, defaultStatus: false, DelayNode: false, DeviceMotionEvent: false, DeviceOrientationEvent: false, devicePixelRatio: false, dispatchEvent: false, document: false, Document: false, DocumentFragment: false, DocumentType: false, DOMError: false, DOMException: false, DOMImplementation: false, DOMMatrix: false, DOMMatrixReadOnly: false, DOMParser: false, DOMPoint: false, DOMPointReadOnly: false, DOMQuad: false, DOMRect: false, DOMRectReadOnly: false, DOMStringList: false, DOMStringMap: false, DOMTokenList: false, DragEvent: false, DynamicsCompressorNode: false, Element: false, ErrorEvent: false, event: false, Event: false, EventSource: false, EventTarget: false, external: false, fetch: false, File: false, FileList: false, FileReader: false, find: false, focus: false, FocusEvent: false, FontFace: false, FontFaceSetLoadEvent: false, FormData: false, frameElement: false, frames: false, GainNode: false, Gamepad: false, GamepadButton: false, GamepadEvent: false, getComputedStyle: false, getSelection: false, HashChangeEvent: false, Headers: false, history: false, History: false, HTMLAllCollection: false, HTMLAnchorElement: false, HTMLAreaElement: false, HTMLAudioElement: false, HTMLBaseElement: false, HTMLBodyElement: false, HTMLBRElement: false, HTMLButtonElement: false, HTMLCanvasElement: false, HTMLCollection: false, HTMLContentElement: false, HTMLDataElement: false, HTMLDataListElement: false, HTMLDetailsElement: false, HTMLDialogElement: false, HTMLDirectoryElement: false, HTMLDivElement: false, HTMLDListElement: false, HTMLDocument: false, HTMLElement: false, HTMLEmbedElement: false, HTMLFieldSetElement: false, HTMLFontElement: false, HTMLFormControlsCollection: false, HTMLFormElement: false, HTMLFrameElement: false, HTMLFrameSetElement: false, HTMLHeadElement: false, HTMLHeadingElement: false, HTMLHRElement: false, HTMLHtmlElement: false, HTMLIFrameElement: false, HTMLImageElement: false, HTMLInputElement: false, HTMLLabelElement: false, HTMLLegendElement: false, HTMLLIElement: false, HTMLLinkElement: false, HTMLMapElement: false, HTMLMarqueeElement: false, HTMLMediaElement: false, HTMLMenuElement: false, HTMLMetaElement: false, HTMLMeterElement: false, HTMLModElement: false, HTMLObjectElement: false, HTMLOListElement: false, HTMLOptGroupElement: false, HTMLOptionElement: false, HTMLOptionsCollection: false, HTMLOutputElement: false, HTMLParagraphElement: false, HTMLParamElement: false, HTMLPictureElement: false, HTMLPreElement: false, HTMLProgressElement: false, HTMLQuoteElement: false, HTMLScriptElement: false, HTMLSelectElement: false, HTMLShadowElement: false, HTMLSlotElement: false, HTMLSourceElement: false, HTMLSpanElement: false, HTMLStyleElement: false, HTMLTableCaptionElement: false, HTMLTableCellElement: false, HTMLTableColElement: false, HTMLTableElement: false, HTMLTableRowElement: false, HTMLTableSectionElement: false, HTMLTemplateElement: false, HTMLTextAreaElement: false, HTMLTimeElement: false, HTMLTitleElement: false, HTMLTrackElement: false, HTMLUListElement: false, HTMLUnknownElement: false, HTMLVideoElement: false, IDBCursor: false, IDBCursorWithValue: false, IDBDatabase: false, IDBFactory: false, IDBIndex: false, IDBKeyRange: false, IDBObjectStore: false, IDBOpenDBRequest: false, IDBRequest: false, IDBTransaction: false, IDBVersionChangeEvent: false, IdleDeadline: false, IIRFilterNode: false, Image: false, ImageBitmap: false, ImageBitmapRenderingContext: false, ImageCapture: false, ImageData: false, indexedDB: false, innerHeight: false, innerWidth: false, InputEvent: false, IntersectionObserver: false, IntersectionObserverEntry: false, Intl: false, isSecureContext: false, KeyboardEvent: false, KeyframeEffect: false, KeyframeEffectReadOnly: false, length: false, localStorage: false, location: true, Location: false, locationbar: false, matchMedia: false, MediaDeviceInfo: false, MediaDevices: false, MediaElementAudioSourceNode: false, MediaEncryptedEvent: false, MediaError: false, MediaKeyMessageEvent: false, MediaKeySession: false, MediaKeyStatusMap: false, MediaKeySystemAccess: false, MediaList: false, MediaQueryList: false, MediaQueryListEvent: false, MediaRecorder: false, MediaSettingsRange: false, MediaSource: false, MediaStream: false, MediaStreamAudioDestinationNode: false, MediaStreamAudioSourceNode: false, MediaStreamEvent: false, MediaStreamTrack: false, MediaStreamTrackEvent: false, menubar: false, MessageChannel: false, MessageEvent: false, MessagePort: false, MIDIAccess: false, MIDIConnectionEvent: false, MIDIInput: false, MIDIInputMap: false, MIDIMessageEvent: false, MIDIOutput: false, MIDIOutputMap: false, MIDIPort: false, MimeType: false, MimeTypeArray: false, MouseEvent: false, moveBy: false, moveTo: false, MutationEvent: false, MutationObserver: false, MutationRecord: false, name: false, NamedNodeMap: false, NavigationPreloadManager: false, navigator: false, Navigator: false, NetworkInformation: false, Node: false, NodeFilter: false, NodeIterator: false, NodeList: false, Notification: false, OfflineAudioCompletionEvent: false, OfflineAudioContext: false, offscreenBuffering: false, OffscreenCanvas: true, onabort: true, onafterprint: true, onanimationend: true, onanimationiteration: true, onanimationstart: true, onappinstalled: true, onauxclick: true, onbeforeinstallprompt: true, onbeforeprint: true, onbeforeunload: true, onblur: true, oncancel: true, oncanplay: true, oncanplaythrough: true, onchange: true, onclick: true, onclose: true, oncontextmenu: true, oncuechange: true, ondblclick: true, ondevicemotion: true, ondeviceorientation: true, ondeviceorientationabsolute: true, ondrag: true, ondragend: true, ondragenter: true, ondragleave: true, ondragover: true, ondragstart: true, ondrop: true, ondurationchange: true, onemptied: true, onended: true, onerror: true, onfocus: true, ongotpointercapture: true, onhashchange: true, oninput: true, oninvalid: true, onkeydown: true, onkeypress: true, onkeyup: true, onlanguagechange: true, onload: true, onloadeddata: true, onloadedmetadata: true, onloadstart: true, onlostpointercapture: true, onmessage: true, onmessageerror: true, onmousedown: true, onmouseenter: true, onmouseleave: true, onmousemove: true, onmouseout: true, onmouseover: true, onmouseup: true, onmousewheel: true, onoffline: true, ononline: true, onpagehide: true, onpageshow: true, onpause: true, onplay: true, onplaying: true, onpointercancel: true, onpointerdown: true, onpointerenter: true, onpointerleave: true, onpointermove: true, onpointerout: true, onpointerover: true, onpointerup: true, onpopstate: true, onprogress: true, onratechange: true, onrejectionhandled: true, onreset: true, onresize: true, onscroll: true, onsearch: true, onseeked: true, onseeking: true, onselect: true, onstalled: true, onstorage: true, onsubmit: true, onsuspend: true, ontimeupdate: true, ontoggle: true, ontransitionend: true, onunhandledrejection: true, onunload: true, onvolumechange: true, onwaiting: true, onwheel: true, open: false, openDatabase: false, opener: false, Option: false, origin: false, OscillatorNode: false, outerHeight: false, outerWidth: false, PageTransitionEvent: false, pageXOffset: false, pageYOffset: false, PannerNode: false, parent: false, Path2D: false, PaymentAddress: false, PaymentRequest: false, PaymentRequestUpdateEvent: false, PaymentResponse: false, performance: false, Performance: false, PerformanceEntry: false, PerformanceLongTaskTiming: false, PerformanceMark: false, PerformanceMeasure: false, PerformanceNavigation: false, PerformanceNavigationTiming: false, PerformanceObserver: false, PerformanceObserverEntryList: false, PerformancePaintTiming: false, PerformanceResourceTiming: false, PerformanceTiming: false, PeriodicWave: false, Permissions: false, PermissionStatus: false, personalbar: false, PhotoCapabilities: false, Plugin: false, PluginArray: false, PointerEvent: false, PopStateEvent: false, postMessage: false, Presentation: false, PresentationAvailability: false, PresentationConnection: false, PresentationConnectionAvailableEvent: false, PresentationConnectionCloseEvent: false, PresentationConnectionList: false, PresentationReceiver: false, PresentationRequest: false, print: false, ProcessingInstruction: false, ProgressEvent: false, PromiseRejectionEvent: false, prompt: false, PushManager: false, PushSubscription: false, PushSubscriptionOptions: false, queueMicrotask: false, RadioNodeList: false, Range: false, ReadableStream: false, registerProcessor: false, RemotePlayback: false, removeEventListener: false, Request: false, requestAnimationFrame: false, requestIdleCallback: false, resizeBy: false, ResizeObserver: false, ResizeObserverEntry: false, resizeTo: false, Response: false, RTCCertificate: false, RTCDataChannel: false, RTCDataChannelEvent: false, RTCDtlsTransport: false, RTCIceCandidate: false, RTCIceGatherer: false, RTCIceTransport: false, RTCPeerConnection: false, RTCPeerConnectionIceEvent: false, RTCRtpContributingSource: false, RTCRtpReceiver: false, RTCRtpSender: false, RTCSctpTransport: false, RTCSessionDescription: false, RTCStatsReport: false, RTCTrackEvent: false, screen: false, Screen: false, screenLeft: false, ScreenOrientation: false, screenTop: false, screenX: false, screenY: false, ScriptProcessorNode: false, scroll: false, scrollbars: false, scrollBy: false, scrollTo: false, scrollX: false, scrollY: false, SecurityPolicyViolationEvent: false, Selection: false, self: false, ServiceWorker: false, ServiceWorkerContainer: false, ServiceWorkerRegistration: false, sessionStorage: false, setInterval: false, setTimeout: false, ShadowRoot: false, SharedWorker: false, SourceBuffer: false, SourceBufferList: false, speechSynthesis: false, SpeechSynthesisEvent: false, SpeechSynthesisUtterance: false, StaticRange: false, status: false, statusbar: false, StereoPannerNode: false, stop: false, Storage: false, StorageEvent: false, StorageManager: false, styleMedia: false, StyleSheet: false, StyleSheetList: false, SubtleCrypto: false, SVGAElement: false, SVGAngle: false, SVGAnimatedAngle: false, SVGAnimatedBoolean: false, SVGAnimatedEnumeration: false, SVGAnimatedInteger: false, SVGAnimatedLength: false, SVGAnimatedLengthList: false, SVGAnimatedNumber: false, SVGAnimatedNumberList: false, SVGAnimatedPreserveAspectRatio: false, SVGAnimatedRect: false, SVGAnimatedString: false, SVGAnimatedTransformList: false, SVGAnimateElement: false, SVGAnimateMotionElement: false, SVGAnimateTransformElement: false, SVGAnimationElement: false, SVGCircleElement: false, SVGClipPathElement: false, SVGComponentTransferFunctionElement: false, SVGDefsElement: false, SVGDescElement: false, SVGDiscardElement: false, SVGElement: false, SVGEllipseElement: false, SVGFEBlendElement: false, SVGFEColorMatrixElement: false, SVGFEComponentTransferElement: false, SVGFECompositeElement: false, SVGFEConvolveMatrixElement: false, SVGFEDiffuseLightingElement: false, SVGFEDisplacementMapElement: false, SVGFEDistantLightElement: false, SVGFEDropShadowElement: false, SVGFEFloodElement: false, SVGFEFuncAElement: false, SVGFEFuncBElement: false, SVGFEFuncGElement: false, SVGFEFuncRElement: false, SVGFEGaussianBlurElement: false, SVGFEImageElement: false, SVGFEMergeElement: false, SVGFEMergeNodeElement: false, SVGFEMorphologyElement: false, SVGFEOffsetElement: false, SVGFEPointLightElement: false, SVGFESpecularLightingElement: false, SVGFESpotLightElement: false, SVGFETileElement: false, SVGFETurbulenceElement: false, SVGFilterElement: false, SVGForeignObjectElement: false, SVGGElement: false, SVGGeometryElement: false, SVGGradientElement: false, SVGGraphicsElement: false, SVGImageElement: false, SVGLength: false, SVGLengthList: false, SVGLinearGradientElement: false, SVGLineElement: false, SVGMarkerElement: false, SVGMaskElement: false, SVGMatrix: false, SVGMetadataElement: false, SVGMPathElement: false, SVGNumber: false, SVGNumberList: false, SVGPathElement: false, SVGPatternElement: false, SVGPoint: false, SVGPointList: false, SVGPolygonElement: false, SVGPolylineElement: false, SVGPreserveAspectRatio: false, SVGRadialGradientElement: false, SVGRect: false, SVGRectElement: false, SVGScriptElement: false, SVGSetElement: false, SVGStopElement: false, SVGStringList: false, SVGStyleElement: false, SVGSVGElement: false, SVGSwitchElement: false, SVGSymbolElement: false, SVGTextContentElement: false, SVGTextElement: false, SVGTextPathElement: false, SVGTextPositioningElement: false, SVGTitleElement: false, SVGTransform: false, SVGTransformList: false, SVGTSpanElement: false, SVGUnitTypes: false, SVGUseElement: false, SVGViewElement: false, TaskAttributionTiming: false, Text: false, TextDecoder: false, TextEncoder: false, TextEvent: false, TextMetrics: false, TextTrack: false, TextTrackCue: false, TextTrackCueList: false, TextTrackList: false, TimeRanges: false, toolbar: false, top: false, Touch: false, TouchEvent: false, TouchList: false, TrackEvent: false, TransitionEvent: false, TreeWalker: false, UIEvent: false, URL: false, URLSearchParams: false, ValidityState: false, visualViewport: false, VisualViewport: false, VTTCue: false, WaveShaperNode: false, WebAssembly: false, WebGL2RenderingContext: false, WebGLActiveInfo: false, WebGLBuffer: false, WebGLContextEvent: false, WebGLFramebuffer: false, WebGLProgram: false, WebGLQuery: false, WebGLRenderbuffer: false, WebGLRenderingContext: false, WebGLSampler: false, WebGLShader: false, WebGLShaderPrecisionFormat: false, WebGLSync: false, WebGLTexture: false, WebGLTransformFeedback: false, WebGLUniformLocation: false, WebGLVertexArrayObject: false, WebSocket: false, WheelEvent: false, window: false, Window: false, Worker: false, WritableStream: false, XMLDocument: false, XMLHttpRequest: false, XMLHttpRequestEventTarget: false, XMLHttpRequestUpload: false, XMLSerializer: false, XPathEvaluator: false, XPathExpression: false, XPathResult: false, XSLTProcessor: false }, worker: { addEventListener: false, applicationCache: false, atob: false, Blob: false, BroadcastChannel: false, btoa: false, Cache: false, caches: false, clearInterval: false, clearTimeout: false, close: true, console: false, fetch: false, FileReaderSync: false, FormData: false, Headers: false, IDBCursor: false, IDBCursorWithValue: false, IDBDatabase: false, IDBFactory: false, IDBIndex: false, IDBKeyRange: false, IDBObjectStore: false, IDBOpenDBRequest: false, IDBRequest: false, IDBTransaction: false, IDBVersionChangeEvent: false, ImageData: false, importScripts: true, indexedDB: false, location: false, MessageChannel: false, MessagePort: false, name: false, navigator: false, Notification: false, onclose: true, onconnect: true, onerror: true, onlanguagechange: true, onmessage: true, onoffline: true, ononline: true, onrejectionhandled: true, onunhandledrejection: true, performance: false, Performance: false, PerformanceEntry: false, PerformanceMark: false, PerformanceMeasure: false, PerformanceNavigation: false, PerformanceResourceTiming: false, PerformanceTiming: false, postMessage: true, Promise: false, queueMicrotask: false, removeEventListener: false, Request: false, Response: false, self: true, ServiceWorkerRegistration: false, setInterval: false, setTimeout: false, TextDecoder: false, TextEncoder: false, URL: false, URLSearchParams: false, WebSocket: false, Worker: false, WorkerGlobalScope: false, XMLHttpRequest: false }, node: { __dirname: false, __filename: false, Buffer: false, clearImmediate: false, clearInterval: false, clearTimeout: false, console: false, exports: true, global: false, Intl: false, module: false, process: false, queueMicrotask: false, require: false, setImmediate: false, setInterval: false, setTimeout: false, TextDecoder: false, TextEncoder: false, URL: false, URLSearchParams: false }, commonjs: { exports: true, global: false, module: false, require: false }, amd: { define: false, require: false }, mocha: { after: false, afterEach: false, before: false, beforeEach: false, context: false, describe: false, it: false, mocha: false, run: false, setup: false, specify: false, suite: false, suiteSetup: false, suiteTeardown: false, teardown: false, test: false, xcontext: false, xdescribe: false, xit: false, xspecify: false }, jasmine: { afterAll: false, afterEach: false, beforeAll: false, beforeEach: false, describe: false, expect: false, fail: false, fdescribe: false, fit: false, it: false, jasmine: false, pending: false, runs: false, spyOn: false, spyOnProperty: false, waits: false, waitsFor: false, xdescribe: false, xit: false }, jest: { afterAll: false, afterEach: false, beforeAll: false, beforeEach: false, describe: false, expect: false, fdescribe: false, fit: false, it: false, jest: false, pit: false, require: false, test: false, xdescribe: false, xit: false, xtest: false }, qunit: { asyncTest: false, deepEqual: false, equal: false, expect: false, module: false, notDeepEqual: false, notEqual: false, notOk: false, notPropEqual: false, notStrictEqual: false, ok: false, propEqual: false, QUnit: false, raises: false, start: false, stop: false, strictEqual: false, test: false, throws: false }, phantomjs: { console: true, exports: true, phantom: true, require: true, WebPage: true }, couch: { emit: false, exports: false, getRow: false, log: false, module: false, provides: false, require: false, respond: false, send: false, start: false, sum: false }, rhino: { defineClass: false, deserialize: false, gc: false, help: false, importClass: false, importPackage: false, java: false, load: false, loadClass: false, Packages: false, print: false, quit: false, readFile: false, readUrl: false, runCommand: false, seal: false, serialize: false, spawn: false, sync: false, toint32: false, version: false }, nashorn: { __DIR__: false, __FILE__: false, __LINE__: false, com: false, edu: false, exit: false, java: false, Java: false, javafx: false, JavaImporter: false, javax: false, JSAdapter: false, load: false, loadWithNewGlobal: false, org: false, Packages: false, print: false, quit: false }, wsh: { ActiveXObject: true, Enumerator: true, GetObject: true, ScriptEngine: true, ScriptEngineBuildVersion: true, ScriptEngineMajorVersion: true, ScriptEngineMinorVersion: true, VBArray: true, WScript: true, WSH: true, XDomainRequest: true }, jquery: { $: false, jQuery: false }, yui: { YAHOO: false, YAHOO_config: false, YUI: false, YUI_config: false }, shelljs: { cat: false, cd: false, chmod: false, config: false, cp: false, dirs: false, echo: false, env: false, error: false, exec: false, exit: false, find: false, grep: false, ln: false, ls: false, mkdir: false, mv: false, popd: false, pushd: false, pwd: false, rm: false, sed: false, set: false, target: false, tempdir: false, test: false, touch: false, which: false }, prototypejs: { $: false, $$: false, $A: false, $break: false, $continue: false, $F: false, $H: false, $R: false, $w: false, Abstract: false, Ajax: false, Autocompleter: false, Builder: false, Class: false, Control: false, Draggable: false, Draggables: false, Droppables: false, Effect: false, Element: false, Enumerable: false, Event: false, Field: false, Form: false, Hash: false, Insertion: false, ObjectRange: false, PeriodicalExecuter: false, Position: false, Prototype: false, Scriptaculous: false, Selector: false, Sortable: false, SortableObserver: false, Sound: false, Template: false, Toggle: false, Try: false }, meteor: { _: false, $: false, Accounts: false, AccountsClient: false, AccountsCommon: false, AccountsServer: false, App: false, Assets: false, Blaze: false, check: false, Cordova: false, DDP: false, DDPRateLimiter: false, DDPServer: false, Deps: false, EJSON: false, Email: false, HTTP: false, Log: false, Match: false, Meteor: false, Mongo: false, MongoInternals: false, Npm: false, Package: false, Plugin: false, process: false, Random: false, ReactiveDict: false, ReactiveVar: false, Router: false, ServiceConfiguration: false, Session: false, share: false, Spacebars: false, Template: false, Tinytest: false, Tracker: false, UI: false, Utils: false, WebApp: false, WebAppInternals: false }, mongo: { _isWindows: false, _rand: false, BulkWriteResult: false, cat: false, cd: false, connect: false, db: false, getHostName: false, getMemInfo: false, hostname: false, ISODate: false, listFiles: false, load: false, ls: false, md5sumFile: false, mkdir: false, Mongo: false, NumberInt: false, NumberLong: false, ObjectId: false, PlanCache: false, print: false, printjson: false, pwd: false, quit: false, removeFile: false, rs: false, sh: false, UUID: false, version: false, WriteResult: false }, applescript: { $: false, Application: false, Automation: false, console: false, delay: false, Library: false, ObjC: false, ObjectSpecifier: false, Path: false, Progress: false, Ref: false }, serviceworker: { addEventListener: false, applicationCache: false, atob: false, Blob: false, BroadcastChannel: false, btoa: false, Cache: false, caches: false, CacheStorage: false, clearInterval: false, clearTimeout: false, Client: false, clients: false, Clients: false, close: true, console: false, ExtendableEvent: false, ExtendableMessageEvent: false, fetch: false, FetchEvent: false, FileReaderSync: false, FormData: false, Headers: false, IDBCursor: false, IDBCursorWithValue: false, IDBDatabase: false, IDBFactory: false, IDBIndex: false, IDBKeyRange: false, IDBObjectStore: false, IDBOpenDBRequest: false, IDBRequest: false, IDBTransaction: false, IDBVersionChangeEvent: false, ImageData: false, importScripts: false, indexedDB: false, location: false, MessageChannel: false, MessagePort: false, name: false, navigator: false, Notification: false, onclose: true, onconnect: true, onerror: true, onfetch: true, oninstall: true, onlanguagechange: true, onmessage: true, onmessageerror: true, onnotificationclick: true, onnotificationclose: true, onoffline: true, ononline: true, onpush: true, onpushsubscriptionchange: true, onrejectionhandled: true, onsync: true, onunhandledrejection: true, performance: false, Performance: false, PerformanceEntry: false, PerformanceMark: false, PerformanceMeasure: false, PerformanceNavigation: false, PerformanceResourceTiming: false, PerformanceTiming: false, postMessage: true, Promise: false, queueMicrotask: false, registration: false, removeEventListener: false, Request: false, Response: false, self: false, ServiceWorker: false, ServiceWorkerContainer: false, ServiceWorkerGlobalScope: false, ServiceWorkerMessageEvent: false, ServiceWorkerRegistration: false, setInterval: false, setTimeout: false, skipWaiting: false, TextDecoder: false, TextEncoder: false, URL: false, URLSearchParams: false, WebSocket: false, WindowClient: false, Worker: false, WorkerGlobalScope: false, XMLHttpRequest: false }, atomtest: { advanceClock: false, fakeClearInterval: false, fakeClearTimeout: false, fakeSetInterval: false, fakeSetTimeout: false, resetTimeouts: false, waitsForPromise: false }, embertest: { andThen: false, click: false, currentPath: false, currentRouteName: false, currentURL: false, fillIn: false, find: false, findAll: false, findWithAssert: false, keyEvent: false, pauseTest: false, resumeTest: false, triggerEvent: false, visit: false, wait: false }, protractor: { $: false, $$: false, browser: false, by: false, By: false, DartObject: false, element: false, protractor: false }, "shared-node-browser": { clearInterval: false, clearTimeout: false, console: false, setInterval: false, setTimeout: false, URL: false, URLSearchParams: false }, webextensions: { browser: false, chrome: false, opr: false }, greasemonkey: { cloneInto: false, createObjectIn: false, exportFunction: false, GM: false, GM_addStyle: false, GM_deleteValue: false, GM_getResourceText: false, GM_getResourceURL: false, GM_getValue: false, GM_info: false, GM_listValues: false, GM_log: false, GM_openInTab: false, GM_registerMenuCommand: false, GM_setClipboard: false, GM_setValue: false, GM_xmlhttpRequest: false, unsafeWindow: false }, devtools: { $: false, $_: false, $$: false, $0: false, $1: false, $2: false, $3: false, $4: false, $x: false, chrome: false, clear: false, copy: false, debug: false, dir: false, dirxml: false, getEventListeners: false, inspect: false, keys: false, monitor: false, monitorEvents: false, profile: false, profileEnd: false, queryObjects: false, table: false, undebug: false, unmonitor: false, unmonitorEvents: false, values: false } }; } }); // ../../node_modules/globals/index.js var require_globals2 = __commonJS({ "../../node_modules/globals/index.js"(exports2, module2) { "use strict"; module2.exports = require_globals(); } }); // node_modules/@babel/traverse/lib/scope/index.js var require_scope = __commonJS({ "node_modules/@babel/traverse/lib/scope/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var _renamer = require_renamer(); var _index = require_lib29(); var _binding = require_binding(); var _globals = require_globals2(); var _t = require_lib4(); var _cache = require_cache(); var { NOT_LOCAL_BINDING, callExpression, cloneNode, getBindingIdentifiers, identifier, isArrayExpression, isBinary, isClass, isClassBody, isClassDeclaration, isExportAllDeclaration, isExportDefaultDeclaration, isExportNamedDeclaration, isFunctionDeclaration, isIdentifier, isImportDeclaration, isLiteral, isMethod, isModuleDeclaration, isModuleSpecifier, isObjectExpression, isProperty, isPureish, isSuper, isTaggedTemplateExpression, isTemplateLiteral, isThisExpression, isUnaryExpression, isVariableDeclaration, matchesPattern, memberExpression, numericLiteral, toIdentifier, unaryExpression, variableDeclaration, variableDeclarator } = _t; function gatherNodeParts(node, parts) { switch (node == null ? void 0 : node.type) { default: if (isModuleDeclaration(node)) { if ((isExportAllDeclaration(node) || isExportNamedDeclaration(node) || isImportDeclaration(node)) && node.source) { gatherNodeParts(node.source, parts); } else if ((isExportNamedDeclaration(node) || isImportDeclaration(node)) && node.specifiers && node.specifiers.length) { for (const e of node.specifiers) gatherNodeParts(e, parts); } else if ((isExportDefaultDeclaration(node) || isExportNamedDeclaration(node)) && node.declaration) { gatherNodeParts(node.declaration, parts); } } else if (isModuleSpecifier(node)) { gatherNodeParts(node.local, parts); } else if (isLiteral(node)) { parts.push(node.value); } break; case "MemberExpression": case "OptionalMemberExpression": case "JSXMemberExpression": gatherNodeParts(node.object, parts); gatherNodeParts(node.property, parts); break; case "Identifier": case "JSXIdentifier": parts.push(node.name); break; case "CallExpression": case "OptionalCallExpression": case "NewExpression": gatherNodeParts(node.callee, parts); break; case "ObjectExpression": case "ObjectPattern": for (const e of node.properties) { gatherNodeParts(e, parts); } break; case "SpreadElement": case "RestElement": gatherNodeParts(node.argument, parts); break; case "ObjectProperty": case "ObjectMethod": case "ClassProperty": case "ClassMethod": case "ClassPrivateProperty": case "ClassPrivateMethod": gatherNodeParts(node.key, parts); break; case "ThisExpression": parts.push("this"); break; case "Super": parts.push("super"); break; case "Import": parts.push("import"); break; case "DoExpression": parts.push("do"); break; case "YieldExpression": parts.push("yield"); gatherNodeParts(node.argument, parts); break; case "AwaitExpression": parts.push("await"); gatherNodeParts(node.argument, parts); break; case "AssignmentExpression": gatherNodeParts(node.left, parts); break; case "VariableDeclarator": gatherNodeParts(node.id, parts); break; case "FunctionExpression": case "FunctionDeclaration": case "ClassExpression": case "ClassDeclaration": gatherNodeParts(node.id, parts); break; case "PrivateName": gatherNodeParts(node.id, parts); break; case "ParenthesizedExpression": gatherNodeParts(node.expression, parts); break; case "UnaryExpression": case "UpdateExpression": gatherNodeParts(node.argument, parts); break; case "MetaProperty": gatherNodeParts(node.meta, parts); gatherNodeParts(node.property, parts); break; case "JSXElement": gatherNodeParts(node.openingElement, parts); break; case "JSXOpeningElement": parts.push(node.name); break; case "JSXFragment": gatherNodeParts(node.openingFragment, parts); break; case "JSXOpeningFragment": parts.push("Fragment"); break; case "JSXNamespacedName": gatherNodeParts(node.namespace, parts); gatherNodeParts(node.name, parts); break; } } var collectorVisitor = { ForStatement(path2) { const declar = path2.get("init"); if (declar.isVar()) { const { scope } = path2; const parentScope = scope.getFunctionParent() || scope.getProgramParent(); parentScope.registerBinding("var", declar); } }, Declaration(path2) { if (path2.isBlockScoped()) return; if (path2.isImportDeclaration()) return; if (path2.isExportDeclaration()) return; const parent = path2.scope.getFunctionParent() || path2.scope.getProgramParent(); parent.registerDeclaration(path2); }, ImportDeclaration(path2) { const parent = path2.scope.getBlockParent(); parent.registerDeclaration(path2); }, ReferencedIdentifier(path2, state) { state.references.push(path2); }, ForXStatement(path2, state) { const left = path2.get("left"); if (left.isPattern() || left.isIdentifier()) { state.constantViolations.push(path2); } else if (left.isVar()) { const { scope } = path2; const parentScope = scope.getFunctionParent() || scope.getProgramParent(); parentScope.registerBinding("var", left); } }, ExportDeclaration: { exit(path2) { const { node, scope } = path2; if (isExportAllDeclaration(node)) return; const declar = node.declaration; if (isClassDeclaration(declar) || isFunctionDeclaration(declar)) { const id = declar.id; if (!id) return; const binding = scope.getBinding(id.name); binding == null ? void 0 : binding.reference(path2); } else if (isVariableDeclaration(declar)) { for (const decl of declar.declarations) { for (const name of Object.keys(getBindingIdentifiers(decl))) { const binding = scope.getBinding(name); binding == null ? void 0 : binding.reference(path2); } } } } }, LabeledStatement(path2) { path2.scope.getBlockParent().registerDeclaration(path2); }, AssignmentExpression(path2, state) { state.assignments.push(path2); }, UpdateExpression(path2, state) { state.constantViolations.push(path2); }, UnaryExpression(path2, state) { if (path2.node.operator === "delete") { state.constantViolations.push(path2); } }, BlockScoped(path2) { let scope = path2.scope; if (scope.path === path2) scope = scope.parent; const parent = scope.getBlockParent(); parent.registerDeclaration(path2); if (path2.isClassDeclaration() && path2.node.id) { const id = path2.node.id; const name = id.name; path2.scope.bindings[name] = path2.scope.parent.getBinding(name); } }, CatchClause(path2) { path2.scope.registerBinding("let", path2); }, Function(path2) { const params = path2.get("params"); for (const param of params) { path2.scope.registerBinding("param", param); } if (path2.isFunctionExpression() && path2.has("id") && !path2.get("id").node[NOT_LOCAL_BINDING]) { path2.scope.registerBinding("local", path2.get("id"), path2); } }, ClassExpression(path2) { if (path2.has("id") && !path2.get("id").node[NOT_LOCAL_BINDING]) { path2.scope.registerBinding("local", path2); } } }; var uid = 0; var Scope = class { constructor(path2) { this.uid = void 0; this.path = void 0; this.block = void 0; this.labels = void 0; this.inited = void 0; this.bindings = void 0; this.references = void 0; this.globals = void 0; this.uids = void 0; this.data = void 0; this.crawling = void 0; const { node } = path2; const cached = _cache.scope.get(node); if ((cached == null ? void 0 : cached.path) === path2) { return cached; } _cache.scope.set(node, this); this.uid = uid++; this.block = node; this.path = path2; this.labels = /* @__PURE__ */ new Map(); this.inited = false; } get parent() { var _parent; let parent, path2 = this.path; do { const isKey = path2.key === "key"; path2 = path2.parentPath; if (isKey && path2.isMethod()) path2 = path2.parentPath; if (path2 && path2.isScope()) parent = path2; } while (path2 && !parent); return (_parent = parent) == null ? void 0 : _parent.scope; } get parentBlock() { return this.path.parent; } get hub() { return this.path.hub; } traverse(node, opts, state) { (0, _index.default)(node, opts, this, state, this.path); } generateDeclaredUidIdentifier(name) { const id = this.generateUidIdentifier(name); this.push({ id }); return cloneNode(id); } generateUidIdentifier(name) { return identifier(this.generateUid(name)); } generateUid(name = "temp") { name = toIdentifier(name).replace(/^_+/, "").replace(/[0-9]+$/g, ""); let uid2; let i = 1; do { uid2 = this._generateUid(name, i); i++; } while (this.hasLabel(uid2) || this.hasBinding(uid2) || this.hasGlobal(uid2) || this.hasReference(uid2)); const program = this.getProgramParent(); program.references[uid2] = true; program.uids[uid2] = true; return uid2; } _generateUid(name, i) { let id = name; if (i > 1) id += i; return `_${id}`; } generateUidBasedOnNode(node, defaultName) { const parts = []; gatherNodeParts(node, parts); let id = parts.join("$"); id = id.replace(/^_/, "") || defaultName || "ref"; return this.generateUid(id.slice(0, 20)); } generateUidIdentifierBasedOnNode(node, defaultName) { return identifier(this.generateUidBasedOnNode(node, defaultName)); } isStatic(node) { if (isThisExpression(node) || isSuper(node)) { return true; } if (isIdentifier(node)) { const binding = this.getBinding(node.name); if (binding) { return binding.constant; } else { return this.hasBinding(node.name); } } return false; } maybeGenerateMemoised(node, dontPush) { if (this.isStatic(node)) { return null; } else { const id = this.generateUidIdentifierBasedOnNode(node); if (!dontPush) { this.push({ id }); return cloneNode(id); } return id; } } checkBlockScopedCollisions(local, kind, name, id) { if (kind === "param") return; if (local.kind === "local") return; const duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && kind === "const"; if (duplicate) { throw this.hub.buildError(id, `Duplicate declaration "${name}"`, TypeError); } } rename(oldName, newName, block) { const binding = this.getBinding(oldName); if (binding) { newName = newName || this.generateUidIdentifier(oldName).name; return new _renamer.default(binding, oldName, newName).rename(block); } } _renameFromMap(map, oldName, newName, value) { if (map[oldName]) { map[newName] = value; map[oldName] = null; } } dump() { const sep = "-".repeat(60); console.log(sep); let scope = this; do { console.log("#", scope.block.type); for (const name of Object.keys(scope.bindings)) { const binding = scope.bindings[name]; console.log(" -", name, { constant: binding.constant, references: binding.references, violations: binding.constantViolations.length, kind: binding.kind }); } } while (scope = scope.parent); console.log(sep); } toArray(node, i, arrayLikeIsIterable) { if (isIdentifier(node)) { const binding = this.getBinding(node.name); if (binding != null && binding.constant && binding.path.isGenericType("Array")) { return node; } } if (isArrayExpression(node)) { return node; } if (isIdentifier(node, { name: "arguments" })) { return callExpression(memberExpression(memberExpression(memberExpression(identifier("Array"), identifier("prototype")), identifier("slice")), identifier("call")), [node]); } let helperName; const args = [node]; if (i === true) { helperName = "toConsumableArray"; } else if (i) { args.push(numericLiteral(i)); helperName = "slicedToArray"; } else { helperName = "toArray"; } if (arrayLikeIsIterable) { args.unshift(this.hub.addHelper(helperName)); helperName = "maybeArrayLike"; } return callExpression(this.hub.addHelper(helperName), args); } hasLabel(name) { return !!this.getLabel(name); } getLabel(name) { return this.labels.get(name); } registerLabel(path2) { this.labels.set(path2.node.label.name, path2); } registerDeclaration(path2) { if (path2.isLabeledStatement()) { this.registerLabel(path2); } else if (path2.isFunctionDeclaration()) { this.registerBinding("hoisted", path2.get("id"), path2); } else if (path2.isVariableDeclaration()) { const declarations = path2.get("declarations"); for (const declar of declarations) { this.registerBinding(path2.node.kind, declar); } } else if (path2.isClassDeclaration()) { if (path2.node.declare) return; this.registerBinding("let", path2); } else if (path2.isImportDeclaration()) { const specifiers = path2.get("specifiers"); for (const specifier of specifiers) { this.registerBinding("module", specifier); } } else if (path2.isExportDeclaration()) { const declar = path2.get("declaration"); if (declar.isClassDeclaration() || declar.isFunctionDeclaration() || declar.isVariableDeclaration()) { this.registerDeclaration(declar); } } else { this.registerBinding("unknown", path2); } } buildUndefinedNode() { return unaryExpression("void", numericLiteral(0), true); } registerConstantViolation(path2) { const ids = path2.getBindingIdentifiers(); for (const name of Object.keys(ids)) { const binding = this.getBinding(name); if (binding) binding.reassign(path2); } } registerBinding(kind, path2, bindingPath = path2) { if (!kind) throw new ReferenceError("no `kind`"); if (path2.isVariableDeclaration()) { const declarators = path2.get("declarations"); for (const declar of declarators) { this.registerBinding(kind, declar); } return; } const parent = this.getProgramParent(); const ids = path2.getOuterBindingIdentifiers(true); for (const name of Object.keys(ids)) { parent.references[name] = true; for (const id of ids[name]) { const local = this.getOwnBinding(name); if (local) { if (local.identifier === id) continue; this.checkBlockScopedCollisions(local, kind, name, id); } if (local) { this.registerConstantViolation(bindingPath); } else { this.bindings[name] = new _binding.default({ identifier: id, scope: this, path: bindingPath, kind }); } } } } addGlobal(node) { this.globals[node.name] = node; } hasUid(name) { let scope = this; do { if (scope.uids[name]) return true; } while (scope = scope.parent); return false; } hasGlobal(name) { let scope = this; do { if (scope.globals[name]) return true; } while (scope = scope.parent); return false; } hasReference(name) { return !!this.getProgramParent().references[name]; } isPure(node, constantsOnly) { if (isIdentifier(node)) { const binding = this.getBinding(node.name); if (!binding) return false; if (constantsOnly) return binding.constant; return true; } else if (isClass(node)) { if (node.superClass && !this.isPure(node.superClass, constantsOnly)) { return false; } return this.isPure(node.body, constantsOnly); } else if (isClassBody(node)) { for (const method of node.body) { if (!this.isPure(method, constantsOnly)) return false; } return true; } else if (isBinary(node)) { return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly); } else if (isArrayExpression(node)) { for (const elem of node.elements) { if (!this.isPure(elem, constantsOnly)) return false; } return true; } else if (isObjectExpression(node)) { for (const prop of node.properties) { if (!this.isPure(prop, constantsOnly)) return false; } return true; } else if (isMethod(node)) { if (node.computed && !this.isPure(node.key, constantsOnly)) return false; if (node.kind === "get" || node.kind === "set") return false; return true; } else if (isProperty(node)) { if (node.computed && !this.isPure(node.key, constantsOnly)) return false; return this.isPure(node.value, constantsOnly); } else if (isUnaryExpression(node)) { return this.isPure(node.argument, constantsOnly); } else if (isTaggedTemplateExpression(node)) { return matchesPattern(node.tag, "String.raw") && !this.hasBinding("String", true) && this.isPure(node.quasi, constantsOnly); } else if (isTemplateLiteral(node)) { for (const expression of node.expressions) { if (!this.isPure(expression, constantsOnly)) return false; } return true; } else { return isPureish(node); } } setData(key, val) { return this.data[key] = val; } getData(key) { let scope = this; do { const data = scope.data[key]; if (data != null) return data; } while (scope = scope.parent); } removeData(key) { let scope = this; do { const data = scope.data[key]; if (data != null) scope.data[key] = null; } while (scope = scope.parent); } init() { if (!this.inited) { this.inited = true; this.crawl(); } } crawl() { const path2 = this.path; this.references = /* @__PURE__ */ Object.create(null); this.bindings = /* @__PURE__ */ Object.create(null); this.globals = /* @__PURE__ */ Object.create(null); this.uids = /* @__PURE__ */ Object.create(null); this.data = /* @__PURE__ */ Object.create(null); const programParent = this.getProgramParent(); if (programParent.crawling) return; const state = { references: [], constantViolations: [], assignments: [] }; this.crawling = true; if (path2.type !== "Program" && collectorVisitor._exploded) { for (const visit of collectorVisitor.enter) { visit(path2, state); } const typeVisitors = collectorVisitor[path2.type]; if (typeVisitors) { for (const visit of typeVisitors.enter) { visit(path2, state); } } } path2.traverse(collectorVisitor, state); this.crawling = false; for (const path3 of state.assignments) { const ids = path3.getBindingIdentifiers(); for (const name of Object.keys(ids)) { if (path3.scope.getBinding(name)) continue; programParent.addGlobal(ids[name]); } path3.scope.registerConstantViolation(path3); } for (const ref of state.references) { const binding = ref.scope.getBinding(ref.node.name); if (binding) { binding.reference(ref); } else { programParent.addGlobal(ref.node); } } for (const path3 of state.constantViolations) { path3.scope.registerConstantViolation(path3); } } push(opts) { let path2 = this.path; if (!path2.isBlockStatement() && !path2.isProgram()) { path2 = this.getBlockParent().path; } if (path2.isSwitchStatement()) { path2 = (this.getFunctionParent() || this.getProgramParent()).path; } if (path2.isLoop() || path2.isCatchClause() || path2.isFunction()) { path2.ensureBlock(); path2 = path2.get("body"); } const unique = opts.unique; const kind = opts.kind || "var"; const blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist; const dataKey = `declaration:${kind}:${blockHoist}`; let declarPath = !unique && path2.getData(dataKey); if (!declarPath) { const declar = variableDeclaration(kind, []); declar._blockHoist = blockHoist; [declarPath] = path2.unshiftContainer("body", [declar]); if (!unique) path2.setData(dataKey, declarPath); } const declarator = variableDeclarator(opts.id, opts.init); declarPath.node.declarations.push(declarator); this.registerBinding(kind, declarPath.get("declarations").pop()); } getProgramParent() { let scope = this; do { if (scope.path.isProgram()) { return scope; } } while (scope = scope.parent); throw new Error("Couldn't find a Program"); } getFunctionParent() { let scope = this; do { if (scope.path.isFunctionParent()) { return scope; } } while (scope = scope.parent); return null; } getBlockParent() { let scope = this; do { if (scope.path.isBlockParent()) { return scope; } } while (scope = scope.parent); throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program..."); } getAllBindings() { const ids = /* @__PURE__ */ Object.create(null); let scope = this; do { for (const key of Object.keys(scope.bindings)) { if (key in ids === false) { ids[key] = scope.bindings[key]; } } scope = scope.parent; } while (scope); return ids; } getAllBindingsOfKind(...kinds) { const ids = /* @__PURE__ */ Object.create(null); for (const kind of kinds) { let scope = this; do { for (const name of Object.keys(scope.bindings)) { const binding = scope.bindings[name]; if (binding.kind === kind) ids[name] = binding; } scope = scope.parent; } while (scope); } return ids; } bindingIdentifierEquals(name, node) { return this.getBindingIdentifier(name) === node; } getBinding(name) { let scope = this; let previousPath; do { const binding = scope.getOwnBinding(name); if (binding) { var _previousPath; if ((_previousPath = previousPath) != null && _previousPath.isPattern() && binding.kind !== "param" && binding.kind !== "local") { } else { return binding; } } else if (!binding && name === "arguments" && scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) { break; } previousPath = scope.path; } while (scope = scope.parent); } getOwnBinding(name) { return this.bindings[name]; } getBindingIdentifier(name) { var _this$getBinding; return (_this$getBinding = this.getBinding(name)) == null ? void 0 : _this$getBinding.identifier; } getOwnBindingIdentifier(name) { const binding = this.bindings[name]; return binding == null ? void 0 : binding.identifier; } hasOwnBinding(name) { return !!this.getOwnBinding(name); } hasBinding(name, noGlobals) { if (!name) return false; if (this.hasOwnBinding(name)) return true; if (this.parentHasBinding(name, noGlobals)) return true; if (this.hasUid(name)) return true; if (!noGlobals && Scope.globals.includes(name)) return true; if (!noGlobals && Scope.contextVariables.includes(name)) return true; return false; } parentHasBinding(name, noGlobals) { var _this$parent; return (_this$parent = this.parent) == null ? void 0 : _this$parent.hasBinding(name, noGlobals); } moveBindingTo(name, scope) { const info = this.getBinding(name); if (info) { info.scope.removeOwnBinding(name); info.scope = scope; scope.bindings[name] = info; } } removeOwnBinding(name) { delete this.bindings[name]; } removeBinding(name) { var _this$getBinding2; (_this$getBinding2 = this.getBinding(name)) == null ? void 0 : _this$getBinding2.scope.removeOwnBinding(name); let scope = this; do { if (scope.uids[name]) { scope.uids[name] = false; } } while (scope = scope.parent); } }; exports2.default = Scope; Scope.globals = Object.keys(_globals.builtin); Scope.contextVariables = ["arguments", "undefined", "Infinity", "NaN"]; } }); // node_modules/source-map/lib/base64.js var require_base64 = __commonJS({ "node_modules/source-map/lib/base64.js"(exports2) { var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""); exports2.encode = function(number) { if (0 <= number && number < intToCharMap.length) { return intToCharMap[number]; } throw new TypeError("Must be between 0 and 63: " + number); }; exports2.decode = function(charCode) { var bigA = 65; var bigZ = 90; var littleA = 97; var littleZ = 122; var zero = 48; var nine = 57; var plus = 43; var slash = 47; var littleOffset = 26; var numberOffset = 52; if (bigA <= charCode && charCode <= bigZ) { return charCode - bigA; } if (littleA <= charCode && charCode <= littleZ) { return charCode - littleA + littleOffset; } if (zero <= charCode && charCode <= nine) { return charCode - zero + numberOffset; } if (charCode == plus) { return 62; } if (charCode == slash) { return 63; } return -1; }; } }); // node_modules/source-map/lib/base64-vlq.js var require_base64_vlq = __commonJS({ "node_modules/source-map/lib/base64-vlq.js"(exports2) { var base64 = require_base64(); var VLQ_BASE_SHIFT = 5; var VLQ_BASE = 1 << VLQ_BASE_SHIFT; var VLQ_BASE_MASK = VLQ_BASE - 1; var VLQ_CONTINUATION_BIT = VLQ_BASE; function toVLQSigned(aValue) { return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0; } function fromVLQSigned(aValue) { var isNegative = (aValue & 1) === 1; var shifted = aValue >> 1; return isNegative ? -shifted : shifted; } exports2.encode = function base64VLQ_encode(aValue) { var encoded = ""; var digit; var vlq = toVLQSigned(aValue); do { digit = vlq & VLQ_BASE_MASK; vlq >>>= VLQ_BASE_SHIFT; if (vlq > 0) { digit |= VLQ_CONTINUATION_BIT; } encoded += base64.encode(digit); } while (vlq > 0); return encoded; }; exports2.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { var strLen = aStr.length; var result = 0; var shift = 0; var continuation, digit; do { if (aIndex >= strLen) { throw new Error("Expected more digits in base 64 VLQ value."); } digit = base64.decode(aStr.charCodeAt(aIndex++)); if (digit === -1) { throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); } continuation = !!(digit & VLQ_CONTINUATION_BIT); digit &= VLQ_BASE_MASK; result = result + (digit << shift); shift += VLQ_BASE_SHIFT; } while (continuation); aOutParam.value = fromVLQSigned(result); aOutParam.rest = aIndex; }; } }); // node_modules/source-map/lib/util.js var require_util = __commonJS({ "node_modules/source-map/lib/util.js"(exports2) { function getArg(aArgs, aName, aDefaultValue) { if (aName in aArgs) { return aArgs[aName]; } else if (arguments.length === 3) { return aDefaultValue; } else { throw new Error('"' + aName + '" is a required argument.'); } } exports2.getArg = getArg; var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; var dataUrlRegexp = /^data:.+\,.+$/; function urlParse(aUrl) { var match = aUrl.match(urlRegexp); if (!match) { return null; } return { scheme: match[1], auth: match[2], host: match[3], port: match[4], path: match[5] }; } exports2.urlParse = urlParse; function urlGenerate(aParsedUrl) { var url = ""; if (aParsedUrl.scheme) { url += aParsedUrl.scheme + ":"; } url += "//"; if (aParsedUrl.auth) { url += aParsedUrl.auth + "@"; } if (aParsedUrl.host) { url += aParsedUrl.host; } if (aParsedUrl.port) { url += ":" + aParsedUrl.port; } if (aParsedUrl.path) { url += aParsedUrl.path; } return url; } exports2.urlGenerate = urlGenerate; function normalize(aPath) { var path2 = aPath; var url = urlParse(aPath); if (url) { if (!url.path) { return aPath; } path2 = url.path; } var isAbsolute = exports2.isAbsolute(path2); var parts = path2.split(/\/+/); for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { part = parts[i]; if (part === ".") { parts.splice(i, 1); } else if (part === "..") { up++; } else if (up > 0) { if (part === "") { parts.splice(i + 1, up); up = 0; } else { parts.splice(i, 2); up--; } } } path2 = parts.join("/"); if (path2 === "") { path2 = isAbsolute ? "/" : "."; } if (url) { url.path = path2; return urlGenerate(url); } return path2; } exports2.normalize = normalize; function join(aRoot, aPath) { if (aRoot === "") { aRoot = "."; } if (aPath === "") { aPath = "."; } var aPathUrl = urlParse(aPath); var aRootUrl = urlParse(aRoot); if (aRootUrl) { aRoot = aRootUrl.path || "/"; } if (aPathUrl && !aPathUrl.scheme) { if (aRootUrl) { aPathUrl.scheme = aRootUrl.scheme; } return urlGenerate(aPathUrl); } if (aPathUrl || aPath.match(dataUrlRegexp)) { return aPath; } if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { aRootUrl.host = aPath; return urlGenerate(aRootUrl); } var joined = aPath.charAt(0) === "/" ? aPath : normalize(aRoot.replace(/\/+$/, "") + "/" + aPath); if (aRootUrl) { aRootUrl.path = joined; return urlGenerate(aRootUrl); } return joined; } exports2.join = join; exports2.isAbsolute = function(aPath) { return aPath.charAt(0) === "/" || !!aPath.match(urlRegexp); }; function relative(aRoot, aPath) { if (aRoot === "") { aRoot = "."; } aRoot = aRoot.replace(/\/$/, ""); var level = 0; while (aPath.indexOf(aRoot + "/") !== 0) { var index = aRoot.lastIndexOf("/"); if (index < 0) { return aPath; } aRoot = aRoot.slice(0, index); if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { return aPath; } ++level; } return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); } exports2.relative = relative; var supportsNullProto = function() { var obj = /* @__PURE__ */ Object.create(null); return !("__proto__" in obj); }(); function identity(s) { return s; } function toSetString(aStr) { if (isProtoString(aStr)) { return "$" + aStr; } return aStr; } exports2.toSetString = supportsNullProto ? identity : toSetString; function fromSetString(aStr) { if (isProtoString(aStr)) { return aStr.slice(1); } return aStr; } exports2.fromSetString = supportsNullProto ? identity : fromSetString; function isProtoString(s) { if (!s) { return false; } var length = s.length; if (length < 9) { return false; } if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) { return false; } for (var i = length - 10; i >= 0; i--) { if (s.charCodeAt(i) !== 36) { return false; } } return true; } function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { var cmp = mappingA.source - mappingB.source; if (cmp !== 0) { return cmp; } cmp = mappingA.originalLine - mappingB.originalLine; if (cmp !== 0) { return cmp; } cmp = mappingA.originalColumn - mappingB.originalColumn; if (cmp !== 0 || onlyCompareOriginal) { return cmp; } cmp = mappingA.generatedColumn - mappingB.generatedColumn; if (cmp !== 0) { return cmp; } cmp = mappingA.generatedLine - mappingB.generatedLine; if (cmp !== 0) { return cmp; } return mappingA.name - mappingB.name; } exports2.compareByOriginalPositions = compareByOriginalPositions; function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { var cmp = mappingA.generatedLine - mappingB.generatedLine; if (cmp !== 0) { return cmp; } cmp = mappingA.generatedColumn - mappingB.generatedColumn; if (cmp !== 0 || onlyCompareGenerated) { return cmp; } cmp = mappingA.source - mappingB.source; if (cmp !== 0) { return cmp; } cmp = mappingA.originalLine - mappingB.originalLine; if (cmp !== 0) { return cmp; } cmp = mappingA.originalColumn - mappingB.originalColumn; if (cmp !== 0) { return cmp; } return mappingA.name - mappingB.name; } exports2.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; function strcmp(aStr1, aStr2) { if (aStr1 === aStr2) { return 0; } if (aStr1 > aStr2) { return 1; } return -1; } function compareByGeneratedPositionsInflated(mappingA, mappingB) { var cmp = mappingA.generatedLine - mappingB.generatedLine; if (cmp !== 0) { return cmp; } cmp = mappingA.generatedColumn - mappingB.generatedColumn; if (cmp !== 0) { return cmp; } cmp = strcmp(mappingA.source, mappingB.source); if (cmp !== 0) { return cmp; } cmp = mappingA.originalLine - mappingB.originalLine; if (cmp !== 0) { return cmp; } cmp = mappingA.originalColumn - mappingB.originalColumn; if (cmp !== 0) { return cmp; } return strcmp(mappingA.name, mappingB.name); } exports2.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; } }); // node_modules/source-map/lib/array-set.js var require_array_set = __commonJS({ "node_modules/source-map/lib/array-set.js"(exports2) { var util = require_util(); var has = Object.prototype.hasOwnProperty; var hasNativeMap = typeof Map !== "undefined"; function ArraySet() { this._array = []; this._set = hasNativeMap ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null); } ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { var set = new ArraySet(); for (var i = 0, len = aArray.length; i < len; i++) { set.add(aArray[i], aAllowDuplicates); } return set; }; ArraySet.prototype.size = function ArraySet_size() { return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; }; ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { var sStr = hasNativeMap ? aStr : util.toSetString(aStr); var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); var idx = this._array.length; if (!isDuplicate || aAllowDuplicates) { this._array.push(aStr); } if (!isDuplicate) { if (hasNativeMap) { this._set.set(aStr, idx); } else { this._set[sStr] = idx; } } }; ArraySet.prototype.has = function ArraySet_has(aStr) { if (hasNativeMap) { return this._set.has(aStr); } else { var sStr = util.toSetString(aStr); return has.call(this._set, sStr); } }; ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { if (hasNativeMap) { var idx = this._set.get(aStr); if (idx >= 0) { return idx; } } else { var sStr = util.toSetString(aStr); if (has.call(this._set, sStr)) { return this._set[sStr]; } } throw new Error('"' + aStr + '" is not in the set.'); }; ArraySet.prototype.at = function ArraySet_at(aIdx) { if (aIdx >= 0 && aIdx < this._array.length) { return this._array[aIdx]; } throw new Error("No element indexed by " + aIdx); }; ArraySet.prototype.toArray = function ArraySet_toArray() { return this._array.slice(); }; exports2.ArraySet = ArraySet; } }); // node_modules/source-map/lib/mapping-list.js var require_mapping_list = __commonJS({ "node_modules/source-map/lib/mapping-list.js"(exports2) { var util = require_util(); function generatedPositionAfter(mappingA, mappingB) { var lineA = mappingA.generatedLine; var lineB = mappingB.generatedLine; var columnA = mappingA.generatedColumn; var columnB = mappingB.generatedColumn; return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; } function MappingList() { this._array = []; this._sorted = true; this._last = { generatedLine: -1, generatedColumn: 0 }; } MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) { this._array.forEach(aCallback, aThisArg); }; MappingList.prototype.add = function MappingList_add(aMapping) { if (generatedPositionAfter(this._last, aMapping)) { this._last = aMapping; this._array.push(aMapping); } else { this._sorted = false; this._array.push(aMapping); } }; MappingList.prototype.toArray = function MappingList_toArray() { if (!this._sorted) { this._array.sort(util.compareByGeneratedPositionsInflated); this._sorted = true; } return this._array; }; exports2.MappingList = MappingList; } }); // node_modules/source-map/lib/source-map-generator.js var require_source_map_generator = __commonJS({ "node_modules/source-map/lib/source-map-generator.js"(exports2) { var base64VLQ = require_base64_vlq(); var util = require_util(); var ArraySet = require_array_set().ArraySet; var MappingList = require_mapping_list().MappingList; function SourceMapGenerator(aArgs) { if (!aArgs) { aArgs = {}; } this._file = util.getArg(aArgs, "file", null); this._sourceRoot = util.getArg(aArgs, "sourceRoot", null); this._skipValidation = util.getArg(aArgs, "skipValidation", false); this._sources = new ArraySet(); this._names = new ArraySet(); this._mappings = new MappingList(); this._sourcesContents = null; } SourceMapGenerator.prototype._version = 3; SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { var sourceRoot = aSourceMapConsumer.sourceRoot; var generator = new SourceMapGenerator({ file: aSourceMapConsumer.file, sourceRoot }); aSourceMapConsumer.eachMapping(function(mapping) { var newMapping = { generated: { line: mapping.generatedLine, column: mapping.generatedColumn } }; if (mapping.source != null) { newMapping.source = mapping.source; if (sourceRoot != null) { newMapping.source = util.relative(sourceRoot, newMapping.source); } newMapping.original = { line: mapping.originalLine, column: mapping.originalColumn }; if (mapping.name != null) { newMapping.name = mapping.name; } } generator.addMapping(newMapping); }); aSourceMapConsumer.sources.forEach(function(sourceFile) { var content = aSourceMapConsumer.sourceContentFor(sourceFile); if (content != null) { generator.setSourceContent(sourceFile, content); } }); return generator; }; SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) { var generated = util.getArg(aArgs, "generated"); var original = util.getArg(aArgs, "original", null); var source = util.getArg(aArgs, "source", null); var name = util.getArg(aArgs, "name", null); if (!this._skipValidation) { this._validateMapping(generated, original, source, name); } if (source != null) { source = String(source); if (!this._sources.has(source)) { this._sources.add(source); } } if (name != null) { name = String(name); if (!this._names.has(name)) { this._names.add(name); } } this._mappings.add({ generatedLine: generated.line, generatedColumn: generated.column, originalLine: original != null && original.line, originalColumn: original != null && original.column, source, name }); }; SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { var source = aSourceFile; if (this._sourceRoot != null) { source = util.relative(this._sourceRoot, source); } if (aSourceContent != null) { if (!this._sourcesContents) { this._sourcesContents = /* @__PURE__ */ Object.create(null); } this._sourcesContents[util.toSetString(source)] = aSourceContent; } else if (this._sourcesContents) { delete this._sourcesContents[util.toSetString(source)]; if (Object.keys(this._sourcesContents).length === 0) { this._sourcesContents = null; } } }; SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { var sourceFile = aSourceFile; if (aSourceFile == null) { if (aSourceMapConsumer.file == null) { throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`); } sourceFile = aSourceMapConsumer.file; } var sourceRoot = this._sourceRoot; if (sourceRoot != null) { sourceFile = util.relative(sourceRoot, sourceFile); } var newSources = new ArraySet(); var newNames = new ArraySet(); this._mappings.unsortedForEach(function(mapping) { if (mapping.source === sourceFile && mapping.originalLine != null) { var original = aSourceMapConsumer.originalPositionFor({ line: mapping.originalLine, column: mapping.originalColumn }); if (original.source != null) { mapping.source = original.source; if (aSourceMapPath != null) { mapping.source = util.join(aSourceMapPath, mapping.source); } if (sourceRoot != null) { mapping.source = util.relative(sourceRoot, mapping.source); } mapping.originalLine = original.line; mapping.originalColumn = original.column; if (original.name != null) { mapping.name = original.name; } } } var source = mapping.source; if (source != null && !newSources.has(source)) { newSources.add(source); } var name = mapping.name; if (name != null && !newNames.has(name)) { newNames.add(name); } }, this); this._sources = newSources; this._names = newNames; aSourceMapConsumer.sources.forEach(function(sourceFile2) { var content = aSourceMapConsumer.sourceContentFor(sourceFile2); if (content != null) { if (aSourceMapPath != null) { sourceFile2 = util.join(aSourceMapPath, sourceFile2); } if (sourceRoot != null) { sourceFile2 = util.relative(sourceRoot, sourceFile2); } this.setSourceContent(sourceFile2, content); } }, this); }; SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) { if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") { throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values."); } if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) { return; } else if (aGenerated && "line" in aGenerated && "column" in aGenerated && aOriginal && "line" in aOriginal && "column" in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) { return; } else { throw new Error("Invalid mapping: " + JSON.stringify({ generated: aGenerated, source: aSource, original: aOriginal, name: aName })); } }; SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() { var previousGeneratedColumn = 0; var previousGeneratedLine = 1; var previousOriginalColumn = 0; var previousOriginalLine = 0; var previousName = 0; var previousSource = 0; var result = ""; var next; var mapping; var nameIdx; var sourceIdx; var mappings = this._mappings.toArray(); for (var i = 0, len = mappings.length; i < len; i++) { mapping = mappings[i]; next = ""; if (mapping.generatedLine !== previousGeneratedLine) { previousGeneratedColumn = 0; while (mapping.generatedLine !== previousGeneratedLine) { next += ";"; previousGeneratedLine++; } } else { if (i > 0) { if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { continue; } next += ","; } } next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn); previousGeneratedColumn = mapping.generatedColumn; if (mapping.source != null) { sourceIdx = this._sources.indexOf(mapping.source); next += base64VLQ.encode(sourceIdx - previousSource); previousSource = sourceIdx; next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine); previousOriginalLine = mapping.originalLine - 1; next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn); previousOriginalColumn = mapping.originalColumn; if (mapping.name != null) { nameIdx = this._names.indexOf(mapping.name); next += base64VLQ.encode(nameIdx - previousName); previousName = nameIdx; } } result += next; } return result; }; SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { return aSources.map(function(source) { if (!this._sourcesContents) { return null; } if (aSourceRoot != null) { source = util.relative(aSourceRoot, source); } var key = util.toSetString(source); return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null; }, this); }; SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() { var map = { version: this._version, sources: this._sources.toArray(), names: this._names.toArray(), mappings: this._serializeMappings() }; if (this._file != null) { map.file = this._file; } if (this._sourceRoot != null) { map.sourceRoot = this._sourceRoot; } if (this._sourcesContents) { map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); } return map; }; SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() { return JSON.stringify(this.toJSON()); }; exports2.SourceMapGenerator = SourceMapGenerator; } }); // node_modules/source-map/lib/binary-search.js var require_binary_search = __commonJS({ "node_modules/source-map/lib/binary-search.js"(exports2) { exports2.GREATEST_LOWER_BOUND = 1; exports2.LEAST_UPPER_BOUND = 2; function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { var mid = Math.floor((aHigh - aLow) / 2) + aLow; var cmp = aCompare(aNeedle, aHaystack[mid], true); if (cmp === 0) { return mid; } else if (cmp > 0) { if (aHigh - mid > 1) { return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); } if (aBias == exports2.LEAST_UPPER_BOUND) { return aHigh < aHaystack.length ? aHigh : -1; } else { return mid; } } else { if (mid - aLow > 1) { return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); } if (aBias == exports2.LEAST_UPPER_BOUND) { return mid; } else { return aLow < 0 ? -1 : aLow; } } } exports2.search = function search(aNeedle, aHaystack, aCompare, aBias) { if (aHaystack.length === 0) { return -1; } var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports2.GREATEST_LOWER_BOUND); if (index < 0) { return -1; } while (index - 1 >= 0) { if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { break; } --index; } return index; }; } }); // node_modules/source-map/lib/quick-sort.js var require_quick_sort = __commonJS({ "node_modules/source-map/lib/quick-sort.js"(exports2) { function swap(ary, x, y) { var temp = ary[x]; ary[x] = ary[y]; ary[y] = temp; } function randomIntInRange(low, high) { return Math.round(low + Math.random() * (high - low)); } function doQuickSort(ary, comparator, p, r) { if (p < r) { var pivotIndex = randomIntInRange(p, r); var i = p - 1; swap(ary, pivotIndex, r); var pivot = ary[r]; for (var j = p; j < r; j++) { if (comparator(ary[j], pivot) <= 0) { i += 1; swap(ary, i, j); } } swap(ary, i + 1, j); var q = i + 1; doQuickSort(ary, comparator, p, q - 1); doQuickSort(ary, comparator, q + 1, r); } } exports2.quickSort = function(ary, comparator) { doQuickSort(ary, comparator, 0, ary.length - 1); }; } }); // node_modules/source-map/lib/source-map-consumer.js var require_source_map_consumer = __commonJS({ "node_modules/source-map/lib/source-map-consumer.js"(exports2) { var util = require_util(); var binarySearch = require_binary_search(); var ArraySet = require_array_set().ArraySet; var base64VLQ = require_base64_vlq(); var quickSort = require_quick_sort().quickSort; function SourceMapConsumer(aSourceMap) { var sourceMap = aSourceMap; if (typeof aSourceMap === "string") { sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, "")); } return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap) : new BasicSourceMapConsumer(sourceMap); } SourceMapConsumer.fromSourceMap = function(aSourceMap) { return BasicSourceMapConsumer.fromSourceMap(aSourceMap); }; SourceMapConsumer.prototype._version = 3; SourceMapConsumer.prototype.__generatedMappings = null; Object.defineProperty(SourceMapConsumer.prototype, "_generatedMappings", { get: function() { if (!this.__generatedMappings) { this._parseMappings(this._mappings, this.sourceRoot); } return this.__generatedMappings; } }); SourceMapConsumer.prototype.__originalMappings = null; Object.defineProperty(SourceMapConsumer.prototype, "_originalMappings", { get: function() { if (!this.__originalMappings) { this._parseMappings(this._mappings, this.sourceRoot); } return this.__originalMappings; } }); SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) { var c = aStr.charAt(index); return c === ";" || c === ","; }; SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { throw new Error("Subclasses must implement _parseMappings"); }; SourceMapConsumer.GENERATED_ORDER = 1; SourceMapConsumer.ORIGINAL_ORDER = 2; SourceMapConsumer.GREATEST_LOWER_BOUND = 1; SourceMapConsumer.LEAST_UPPER_BOUND = 2; SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { var context = aContext || null; var order = aOrder || SourceMapConsumer.GENERATED_ORDER; var mappings; switch (order) { case SourceMapConsumer.GENERATED_ORDER: mappings = this._generatedMappings; break; case SourceMapConsumer.ORIGINAL_ORDER: mappings = this._originalMappings; break; default: throw new Error("Unknown order of iteration."); } var sourceRoot = this.sourceRoot; mappings.map(function(mapping) { var source = mapping.source === null ? null : this._sources.at(mapping.source); if (source != null && sourceRoot != null) { source = util.join(sourceRoot, source); } return { source, generatedLine: mapping.generatedLine, generatedColumn: mapping.generatedColumn, originalLine: mapping.originalLine, originalColumn: mapping.originalColumn, name: mapping.name === null ? null : this._names.at(mapping.name) }; }, this).forEach(aCallback, context); }; SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { var line = util.getArg(aArgs, "line"); var needle = { source: util.getArg(aArgs, "source"), originalLine: line, originalColumn: util.getArg(aArgs, "column", 0) }; if (this.sourceRoot != null) { needle.source = util.relative(this.sourceRoot, needle.source); } if (!this._sources.has(needle.source)) { return []; } needle.source = this._sources.indexOf(needle.source); var mappings = []; var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND); if (index >= 0) { var mapping = this._originalMappings[index]; if (aArgs.column === void 0) { var originalLine = mapping.originalLine; while (mapping && mapping.originalLine === originalLine) { mappings.push({ line: util.getArg(mapping, "generatedLine", null), column: util.getArg(mapping, "generatedColumn", null), lastColumn: util.getArg(mapping, "lastGeneratedColumn", null) }); mapping = this._originalMappings[++index]; } } else { var originalColumn = mapping.originalColumn; while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) { mappings.push({ line: util.getArg(mapping, "generatedLine", null), column: util.getArg(mapping, "generatedColumn", null), lastColumn: util.getArg(mapping, "lastGeneratedColumn", null) }); mapping = this._originalMappings[++index]; } } } return mappings; }; exports2.SourceMapConsumer = SourceMapConsumer; function BasicSourceMapConsumer(aSourceMap) { var sourceMap = aSourceMap; if (typeof aSourceMap === "string") { sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, "")); } var version = util.getArg(sourceMap, "version"); var sources = util.getArg(sourceMap, "sources"); var names = util.getArg(sourceMap, "names", []); var sourceRoot = util.getArg(sourceMap, "sourceRoot", null); var sourcesContent = util.getArg(sourceMap, "sourcesContent", null); var mappings = util.getArg(sourceMap, "mappings"); var file = util.getArg(sourceMap, "file", null); if (version != this._version) { throw new Error("Unsupported version: " + version); } sources = sources.map(String).map(util.normalize).map(function(source) { return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source; }); this._names = ArraySet.fromArray(names.map(String), true); this._sources = ArraySet.fromArray(sources, true); this.sourceRoot = sourceRoot; this.sourcesContent = sourcesContent; this._mappings = mappings; this.file = file; } BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap) { var smc = Object.create(BasicSourceMapConsumer.prototype); var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); smc.sourceRoot = aSourceMap._sourceRoot; smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot); smc.file = aSourceMap._file; var generatedMappings = aSourceMap._mappings.toArray().slice(); var destGeneratedMappings = smc.__generatedMappings = []; var destOriginalMappings = smc.__originalMappings = []; for (var i = 0, length = generatedMappings.length; i < length; i++) { var srcMapping = generatedMappings[i]; var destMapping = new Mapping(); destMapping.generatedLine = srcMapping.generatedLine; destMapping.generatedColumn = srcMapping.generatedColumn; if (srcMapping.source) { destMapping.source = sources.indexOf(srcMapping.source); destMapping.originalLine = srcMapping.originalLine; destMapping.originalColumn = srcMapping.originalColumn; if (srcMapping.name) { destMapping.name = names.indexOf(srcMapping.name); } destOriginalMappings.push(destMapping); } destGeneratedMappings.push(destMapping); } quickSort(smc.__originalMappings, util.compareByOriginalPositions); return smc; }; BasicSourceMapConsumer.prototype._version = 3; Object.defineProperty(BasicSourceMapConsumer.prototype, "sources", { get: function() { return this._sources.toArray().map(function(s) { return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; }, this); } }); function Mapping() { this.generatedLine = 0; this.generatedColumn = 0; this.source = null; this.originalLine = null; this.originalColumn = null; this.name = null; } BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { var generatedLine = 1; var previousGeneratedColumn = 0; var previousOriginalLine = 0; var previousOriginalColumn = 0; var previousSource = 0; var previousName = 0; var length = aStr.length; var index = 0; var cachedSegments = {}; var temp = {}; var originalMappings = []; var generatedMappings = []; var mapping, str, segment, end, value; while (index < length) { if (aStr.charAt(index) === ";") { generatedLine++; index++; previousGeneratedColumn = 0; } else if (aStr.charAt(index) === ",") { index++; } else { mapping = new Mapping(); mapping.generatedLine = generatedLine; for (end = index; end < length; end++) { if (this._charIsMappingSeparator(aStr, end)) { break; } } str = aStr.slice(index, end); segment = cachedSegments[str]; if (segment) { index += str.length; } else { segment = []; while (index < end) { base64VLQ.decode(aStr, index, temp); value = temp.value; index = temp.rest; segment.push(value); } if (segment.length === 2) { throw new Error("Found a source, but no line and column"); } if (segment.length === 3) { throw new Error("Found a source and line, but no column"); } cachedSegments[str] = segment; } mapping.generatedColumn = previousGeneratedColumn + segment[0]; previousGeneratedColumn = mapping.generatedColumn; if (segment.length > 1) { mapping.source = previousSource + segment[1]; previousSource += segment[1]; mapping.originalLine = previousOriginalLine + segment[2]; previousOriginalLine = mapping.originalLine; mapping.originalLine += 1; mapping.originalColumn = previousOriginalColumn + segment[3]; previousOriginalColumn = mapping.originalColumn; if (segment.length > 4) { mapping.name = previousName + segment[4]; previousName += segment[4]; } } generatedMappings.push(mapping); if (typeof mapping.originalLine === "number") { originalMappings.push(mapping); } } } quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); this.__generatedMappings = generatedMappings; quickSort(originalMappings, util.compareByOriginalPositions); this.__originalMappings = originalMappings; }; BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) { if (aNeedle[aLineName] <= 0) { throw new TypeError("Line must be greater than or equal to 1, got " + aNeedle[aLineName]); } if (aNeedle[aColumnName] < 0) { throw new TypeError("Column must be greater than or equal to 0, got " + aNeedle[aColumnName]); } return binarySearch.search(aNeedle, aMappings, aComparator, aBias); }; BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() { for (var index = 0; index < this._generatedMappings.length; ++index) { var mapping = this._generatedMappings[index]; if (index + 1 < this._generatedMappings.length) { var nextMapping = this._generatedMappings[index + 1]; if (mapping.generatedLine === nextMapping.generatedLine) { mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; continue; } } mapping.lastGeneratedColumn = Infinity; } }; BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) { var needle = { generatedLine: util.getArg(aArgs, "line"), generatedColumn: util.getArg(aArgs, "column") }; var index = this._findMapping(needle, this._generatedMappings, "generatedLine", "generatedColumn", util.compareByGeneratedPositionsDeflated, util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)); if (index >= 0) { var mapping = this._generatedMappings[index]; if (mapping.generatedLine === needle.generatedLine) { var source = util.getArg(mapping, "source", null); if (source !== null) { source = this._sources.at(source); if (this.sourceRoot != null) { source = util.join(this.sourceRoot, source); } } var name = util.getArg(mapping, "name", null); if (name !== null) { name = this._names.at(name); } return { source, line: util.getArg(mapping, "originalLine", null), column: util.getArg(mapping, "originalColumn", null), name }; } } return { source: null, line: null, column: null, name: null }; }; BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() { if (!this.sourcesContent) { return false; } return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(sc) { return sc == null; }); }; BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { if (!this.sourcesContent) { return null; } if (this.sourceRoot != null) { aSource = util.relative(this.sourceRoot, aSource); } if (this._sources.has(aSource)) { return this.sourcesContent[this._sources.indexOf(aSource)]; } var url; if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) { var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) { return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]; } if ((!url.path || url.path == "/") && this._sources.has("/" + aSource)) { return this.sourcesContent[this._sources.indexOf("/" + aSource)]; } } if (nullOnMissing) { return null; } else { throw new Error('"' + aSource + '" is not in the SourceMap.'); } }; BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) { var source = util.getArg(aArgs, "source"); if (this.sourceRoot != null) { source = util.relative(this.sourceRoot, source); } if (!this._sources.has(source)) { return { line: null, column: null, lastColumn: null }; } source = this._sources.indexOf(source); var needle = { source, originalLine: util.getArg(aArgs, "line"), originalColumn: util.getArg(aArgs, "column") }; var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)); if (index >= 0) { var mapping = this._originalMappings[index]; if (mapping.source === needle.source) { return { line: util.getArg(mapping, "generatedLine", null), column: util.getArg(mapping, "generatedColumn", null), lastColumn: util.getArg(mapping, "lastGeneratedColumn", null) }; } } return { line: null, column: null, lastColumn: null }; }; exports2.BasicSourceMapConsumer = BasicSourceMapConsumer; function IndexedSourceMapConsumer(aSourceMap) { var sourceMap = aSourceMap; if (typeof aSourceMap === "string") { sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, "")); } var version = util.getArg(sourceMap, "version"); var sections = util.getArg(sourceMap, "sections"); if (version != this._version) { throw new Error("Unsupported version: " + version); } this._sources = new ArraySet(); this._names = new ArraySet(); var lastOffset = { line: -1, column: 0 }; this._sections = sections.map(function(s) { if (s.url) { throw new Error("Support for url field in sections not implemented."); } var offset = util.getArg(s, "offset"); var offsetLine = util.getArg(offset, "line"); var offsetColumn = util.getArg(offset, "column"); if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) { throw new Error("Section offsets must be ordered and non-overlapping."); } lastOffset = offset; return { generatedOffset: { generatedLine: offsetLine + 1, generatedColumn: offsetColumn + 1 }, consumer: new SourceMapConsumer(util.getArg(s, "map")) }; }); } IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; IndexedSourceMapConsumer.prototype._version = 3; Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", { get: function() { var sources = []; for (var i = 0; i < this._sections.length; i++) { for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { sources.push(this._sections[i].consumer.sources[j]); } } return sources; } }); IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) { var needle = { generatedLine: util.getArg(aArgs, "line"), generatedColumn: util.getArg(aArgs, "column") }; var sectionIndex = binarySearch.search(needle, this._sections, function(needle2, section2) { var cmp = needle2.generatedLine - section2.generatedOffset.generatedLine; if (cmp) { return cmp; } return needle2.generatedColumn - section2.generatedOffset.generatedColumn; }); var section = this._sections[sectionIndex]; if (!section) { return { source: null, line: null, column: null, name: null }; } return section.consumer.originalPositionFor({ line: needle.generatedLine - (section.generatedOffset.generatedLine - 1), column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0), bias: aArgs.bias }); }; IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() { return this._sections.every(function(s) { return s.consumer.hasContentsOfAllSources(); }); }; IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { for (var i = 0; i < this._sections.length; i++) { var section = this._sections[i]; var content = section.consumer.sourceContentFor(aSource, true); if (content) { return content; } } if (nullOnMissing) { return null; } else { throw new Error('"' + aSource + '" is not in the SourceMap.'); } }; IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { for (var i = 0; i < this._sections.length; i++) { var section = this._sections[i]; if (section.consumer.sources.indexOf(util.getArg(aArgs, "source")) === -1) { continue; } var generatedPosition = section.consumer.generatedPositionFor(aArgs); if (generatedPosition) { var ret = { line: generatedPosition.line + (section.generatedOffset.generatedLine - 1), column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0) }; return ret; } } return { line: null, column: null }; }; IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { this.__generatedMappings = []; this.__originalMappings = []; for (var i = 0; i < this._sections.length; i++) { var section = this._sections[i]; var sectionMappings = section.consumer._generatedMappings; for (var j = 0; j < sectionMappings.length; j++) { var mapping = sectionMappings[j]; var source = section.consumer._sources.at(mapping.source); if (section.consumer.sourceRoot !== null) { source = util.join(section.consumer.sourceRoot, source); } this._sources.add(source); source = this._sources.indexOf(source); var name = section.consumer._names.at(mapping.name); this._names.add(name); name = this._names.indexOf(name); var adjustedMapping = { source, generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1), generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0), originalLine: mapping.originalLine, originalColumn: mapping.originalColumn, name }; this.__generatedMappings.push(adjustedMapping); if (typeof adjustedMapping.originalLine === "number") { this.__originalMappings.push(adjustedMapping); } } } quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); quickSort(this.__originalMappings, util.compareByOriginalPositions); }; exports2.IndexedSourceMapConsumer = IndexedSourceMapConsumer; } }); // node_modules/source-map/lib/source-node.js var require_source_node = __commonJS({ "node_modules/source-map/lib/source-node.js"(exports2) { var SourceMapGenerator = require_source_map_generator().SourceMapGenerator; var util = require_util(); var REGEX_NEWLINE = /(\r?\n)/; var NEWLINE_CODE = 10; var isSourceNode = "$$$isSourceNode$$$"; function SourceNode(aLine, aColumn, aSource, aChunks, aName) { this.children = []; this.sourceContents = {}; this.line = aLine == null ? null : aLine; this.column = aColumn == null ? null : aColumn; this.source = aSource == null ? null : aSource; this.name = aName == null ? null : aName; this[isSourceNode] = true; if (aChunks != null) this.add(aChunks); } SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { var node = new SourceNode(); var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); var remainingLinesIndex = 0; var shiftNextLine = function() { var lineContents = getNextLine(); var newLine = getNextLine() || ""; return lineContents + newLine; function getNextLine() { return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : void 0; } }; var lastGeneratedLine = 1, lastGeneratedColumn = 0; var lastMapping = null; aSourceMapConsumer.eachMapping(function(mapping) { if (lastMapping !== null) { if (lastGeneratedLine < mapping.generatedLine) { addMappingWithCode(lastMapping, shiftNextLine()); lastGeneratedLine++; lastGeneratedColumn = 0; } else { var nextLine = remainingLines[remainingLinesIndex]; var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn); remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn); lastGeneratedColumn = mapping.generatedColumn; addMappingWithCode(lastMapping, code); lastMapping = mapping; return; } } while (lastGeneratedLine < mapping.generatedLine) { node.add(shiftNextLine()); lastGeneratedLine++; } if (lastGeneratedColumn < mapping.generatedColumn) { var nextLine = remainingLines[remainingLinesIndex]; node.add(nextLine.substr(0, mapping.generatedColumn)); remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); lastGeneratedColumn = mapping.generatedColumn; } lastMapping = mapping; }, this); if (remainingLinesIndex < remainingLines.length) { if (lastMapping) { addMappingWithCode(lastMapping, shiftNextLine()); } node.add(remainingLines.splice(remainingLinesIndex).join("")); } aSourceMapConsumer.sources.forEach(function(sourceFile) { var content = aSourceMapConsumer.sourceContentFor(sourceFile); if (content != null) { if (aRelativePath != null) { sourceFile = util.join(aRelativePath, sourceFile); } node.setSourceContent(sourceFile, content); } }); return node; function addMappingWithCode(mapping, code) { if (mapping === null || mapping.source === void 0) { node.add(code); } else { var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source; node.add(new SourceNode(mapping.originalLine, mapping.originalColumn, source, code, mapping.name)); } } }; SourceNode.prototype.add = function SourceNode_add(aChunk) { if (Array.isArray(aChunk)) { aChunk.forEach(function(chunk) { this.add(chunk); }, this); } else if (aChunk[isSourceNode] || typeof aChunk === "string") { if (aChunk) { this.children.push(aChunk); } } else { throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk); } return this; }; SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { if (Array.isArray(aChunk)) { for (var i = aChunk.length - 1; i >= 0; i--) { this.prepend(aChunk[i]); } } else if (aChunk[isSourceNode] || typeof aChunk === "string") { this.children.unshift(aChunk); } else { throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk); } return this; }; SourceNode.prototype.walk = function SourceNode_walk(aFn) { var chunk; for (var i = 0, len = this.children.length; i < len; i++) { chunk = this.children[i]; if (chunk[isSourceNode]) { chunk.walk(aFn); } else { if (chunk !== "") { aFn(chunk, { source: this.source, line: this.line, column: this.column, name: this.name }); } } } }; SourceNode.prototype.join = function SourceNode_join(aSep) { var newChildren; var i; var len = this.children.length; if (len > 0) { newChildren = []; for (i = 0; i < len - 1; i++) { newChildren.push(this.children[i]); newChildren.push(aSep); } newChildren.push(this.children[i]); this.children = newChildren; } return this; }; SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { var lastChild = this.children[this.children.length - 1]; if (lastChild[isSourceNode]) { lastChild.replaceRight(aPattern, aReplacement); } else if (typeof lastChild === "string") { this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); } else { this.children.push("".replace(aPattern, aReplacement)); } return this; }; SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) { this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; }; SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) { for (var i = 0, len = this.children.length; i < len; i++) { if (this.children[i][isSourceNode]) { this.children[i].walkSourceContents(aFn); } } var sources = Object.keys(this.sourceContents); for (var i = 0, len = sources.length; i < len; i++) { aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); } }; SourceNode.prototype.toString = function SourceNode_toString() { var str = ""; this.walk(function(chunk) { str += chunk; }); return str; }; SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { var generated = { code: "", line: 1, column: 0 }; var map = new SourceMapGenerator(aArgs); var sourceMappingActive = false; var lastOriginalSource = null; var lastOriginalLine = null; var lastOriginalColumn = null; var lastOriginalName = null; this.walk(function(chunk, original) { generated.code += chunk; if (original.source !== null && original.line !== null && original.column !== null) { if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) { map.addMapping({ source: original.source, original: { line: original.line, column: original.column }, generated: { line: generated.line, column: generated.column }, name: original.name }); } lastOriginalSource = original.source; lastOriginalLine = original.line; lastOriginalColumn = original.column; lastOriginalName = original.name; sourceMappingActive = true; } else if (sourceMappingActive) { map.addMapping({ generated: { line: generated.line, column: generated.column } }); lastOriginalSource = null; sourceMappingActive = false; } for (var idx = 0, length = chunk.length; idx < length; idx++) { if (chunk.charCodeAt(idx) === NEWLINE_CODE) { generated.line++; generated.column = 0; if (idx + 1 === length) { lastOriginalSource = null; sourceMappingActive = false; } else if (sourceMappingActive) { map.addMapping({ source: original.source, original: { line: original.line, column: original.column }, generated: { line: generated.line, column: generated.column }, name: original.name }); } } else { generated.column++; } } }); this.walkSourceContents(function(sourceFile, sourceContent) { map.setSourceContent(sourceFile, sourceContent); }); return { code: generated.code, map }; }; exports2.SourceNode = SourceNode; } }); // node_modules/source-map/source-map.js var require_source_map = __commonJS({ "node_modules/source-map/source-map.js"(exports2) { exports2.SourceMapGenerator = require_source_map_generator().SourceMapGenerator; exports2.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer; exports2.SourceNode = require_source_node().SourceNode; } }); // node_modules/@babel/generator/lib/source-map.js var require_source_map2 = __commonJS({ "node_modules/@babel/generator/lib/source-map.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var _sourceMap = require_source_map(); var SourceMap = class { constructor(opts, code) { this._cachedMap = void 0; this._code = void 0; this._opts = void 0; this._rawMappings = void 0; this._lastGenLine = void 0; this._lastSourceLine = void 0; this._lastSourceColumn = void 0; this._cachedMap = null; this._code = code; this._opts = opts; this._rawMappings = []; } get() { if (!this._cachedMap) { const map = this._cachedMap = new _sourceMap.SourceMapGenerator({ sourceRoot: this._opts.sourceRoot }); const code = this._code; if (typeof code === "string") { map.setSourceContent(this._opts.sourceFileName.replace(/\\/g, "/"), code); } else if (typeof code === "object") { Object.keys(code).forEach((sourceFileName) => { map.setSourceContent(sourceFileName.replace(/\\/g, "/"), code[sourceFileName]); }); } this._rawMappings.forEach((mapping) => map.addMapping(mapping), map); } return this._cachedMap.toJSON(); } getRawMappings() { return this._rawMappings.slice(); } mark(generatedLine, generatedColumn, line, column, identifierName, filename, force) { if (this._lastGenLine !== generatedLine && line === null) return; if (!force && this._lastGenLine === generatedLine && this._lastSourceLine === line && this._lastSourceColumn === column) { return; } this._cachedMap = null; this._lastGenLine = generatedLine; this._lastSourceLine = line; this._lastSourceColumn = column; this._rawMappings.push({ name: identifierName || void 0, generated: { line: generatedLine, column: generatedColumn }, source: line == null ? void 0 : (filename || this._opts.sourceFileName).replace(/\\/g, "/"), original: line == null ? void 0 : { line, column } }); } }; exports2.default = SourceMap; } }); // node_modules/@babel/generator/lib/buffer.js var require_buffer = __commonJS({ "node_modules/@babel/generator/lib/buffer.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var SPACES_RE = /^[ \t]+$/; var Buffer2 = class { constructor(map) { this._map = null; this._buf = ""; this._last = 0; this._queue = []; this._position = { line: 1, column: 0 }; this._sourcePosition = { identifierName: null, line: null, column: null, filename: null }; this._disallowedPop = null; this._map = map; } get() { this._flush(); const map = this._map; const result = { code: this._buf.trimRight(), map: null, rawMappings: map == null ? void 0 : map.getRawMappings() }; if (map) { Object.defineProperty(result, "map", { configurable: true, enumerable: true, get() { return this.map = map.get(); }, set(value) { Object.defineProperty(this, "map", { value, writable: true }); } }); } return result; } append(str) { this._flush(); const { line, column, filename, identifierName, force } = this._sourcePosition; this._append(str, line, column, identifierName, filename, force); } queue(str) { if (str === "\n") { while (this._queue.length > 0 && SPACES_RE.test(this._queue[0][0])) { this._queue.shift(); } } const { line, column, filename, identifierName, force } = this._sourcePosition; this._queue.unshift([str, line, column, identifierName, filename, force]); } _flush() { let item; while (item = this._queue.pop()) { this._append(...item); } } _append(str, line, column, identifierName, filename, force) { this._buf += str; this._last = str.charCodeAt(str.length - 1); let i = str.indexOf("\n"); let last = 0; if (i !== 0) { this._mark(line, column, identifierName, filename, force); } while (i !== -1) { this._position.line++; this._position.column = 0; last = i + 1; if (last < str.length) { this._mark(++line, 0, identifierName, filename, force); } i = str.indexOf("\n", last); } this._position.column += str.length - last; } _mark(line, column, identifierName, filename, force) { var _this$_map; (_this$_map = this._map) == null ? void 0 : _this$_map.mark(this._position.line, this._position.column, line, column, identifierName, filename, force); } removeTrailingNewline() { if (this._queue.length > 0 && this._queue[0][0] === "\n") { this._queue.shift(); } } removeLastSemicolon() { if (this._queue.length > 0 && this._queue[0][0] === ";") { this._queue.shift(); } } getLastChar() { let last; if (this._queue.length > 0) { const str = this._queue[0][0]; last = str.charCodeAt(0); } else { last = this._last; } return last; } endsWithCharAndNewline() { const queue = this._queue; if (queue.length > 0) { const last = queue[0][0]; const lastCp = last.charCodeAt(0); if (lastCp !== 10) return; if (queue.length > 1) { const secondLast = queue[1][0]; return secondLast.charCodeAt(0); } else { return this._last; } } } hasContent() { return this._queue.length > 0 || !!this._last; } exactSource(loc, cb) { this.source("start", loc, true); cb(); this.source("end", loc); this._disallowPop("start", loc); } source(prop, loc, force) { if (prop && !loc) return; this._normalizePosition(prop, loc, this._sourcePosition, force); } withSource(prop, loc, cb) { if (!this._map) return cb(); const originalLine = this._sourcePosition.line; const originalColumn = this._sourcePosition.column; const originalFilename = this._sourcePosition.filename; const originalIdentifierName = this._sourcePosition.identifierName; this.source(prop, loc); cb(); if ((!this._sourcePosition.force || this._sourcePosition.line !== originalLine || this._sourcePosition.column !== originalColumn || this._sourcePosition.filename !== originalFilename) && (!this._disallowedPop || this._disallowedPop.line !== originalLine || this._disallowedPop.column !== originalColumn || this._disallowedPop.filename !== originalFilename)) { this._sourcePosition.line = originalLine; this._sourcePosition.column = originalColumn; this._sourcePosition.filename = originalFilename; this._sourcePosition.identifierName = originalIdentifierName; this._sourcePosition.force = false; this._disallowedPop = null; } } _disallowPop(prop, loc) { if (prop && !loc) return; this._disallowedPop = this._normalizePosition(prop, loc); } _normalizePosition(prop, loc, targetObj, force) { const pos = loc ? loc[prop] : null; if (targetObj === void 0) { targetObj = { identifierName: null, line: null, column: null, filename: null, force: false }; } const origLine = targetObj.line; const origColumn = targetObj.column; const origFilename = targetObj.filename; targetObj.identifierName = prop === "start" && (loc == null ? void 0 : loc.identifierName) || null; targetObj.line = pos == null ? void 0 : pos.line; targetObj.column = pos == null ? void 0 : pos.column; targetObj.filename = loc == null ? void 0 : loc.filename; if (force || targetObj.line !== origLine || targetObj.column !== origColumn || targetObj.filename !== origFilename) { targetObj.force = force; } return targetObj; } getCurrentColumn() { const extra = this._queue.reduce((acc, item) => item[0] + acc, ""); const lastIndex = extra.lastIndexOf("\n"); return lastIndex === -1 ? this._position.column + extra.length : extra.length - 1 - lastIndex; } getCurrentLine() { const extra = this._queue.reduce((acc, item) => item[0] + acc, ""); let count = 0; for (let i = 0; i < extra.length; i++) { if (extra[i] === "\n") count++; } return this._position.line + count; } }; exports2.default = Buffer2; } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/utils/shallowEqual.js var require_shallowEqual3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/utils/shallowEqual.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = shallowEqual; function shallowEqual(actual, expected) { const keys = Object.keys(expected); for (const key of keys) { if (actual[key] !== expected[key]) { return false; } } return true; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/validators/generated/index.js var require_generated11 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/validators/generated/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isAccessor = isAccessor; exports2.isAnyTypeAnnotation = isAnyTypeAnnotation; exports2.isArgumentPlaceholder = isArgumentPlaceholder; exports2.isArrayExpression = isArrayExpression; exports2.isArrayPattern = isArrayPattern; exports2.isArrayTypeAnnotation = isArrayTypeAnnotation; exports2.isArrowFunctionExpression = isArrowFunctionExpression; exports2.isAssignmentExpression = isAssignmentExpression; exports2.isAssignmentPattern = isAssignmentPattern; exports2.isAwaitExpression = isAwaitExpression; exports2.isBigIntLiteral = isBigIntLiteral; exports2.isBinary = isBinary; exports2.isBinaryExpression = isBinaryExpression; exports2.isBindExpression = isBindExpression; exports2.isBlock = isBlock; exports2.isBlockParent = isBlockParent; exports2.isBlockStatement = isBlockStatement; exports2.isBooleanLiteral = isBooleanLiteral; exports2.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation; exports2.isBooleanTypeAnnotation = isBooleanTypeAnnotation; exports2.isBreakStatement = isBreakStatement; exports2.isCallExpression = isCallExpression; exports2.isCatchClause = isCatchClause; exports2.isClass = isClass; exports2.isClassAccessorProperty = isClassAccessorProperty; exports2.isClassBody = isClassBody; exports2.isClassDeclaration = isClassDeclaration; exports2.isClassExpression = isClassExpression; exports2.isClassImplements = isClassImplements; exports2.isClassMethod = isClassMethod; exports2.isClassPrivateMethod = isClassPrivateMethod; exports2.isClassPrivateProperty = isClassPrivateProperty; exports2.isClassProperty = isClassProperty; exports2.isCompletionStatement = isCompletionStatement; exports2.isConditional = isConditional; exports2.isConditionalExpression = isConditionalExpression; exports2.isContinueStatement = isContinueStatement; exports2.isDebuggerStatement = isDebuggerStatement; exports2.isDecimalLiteral = isDecimalLiteral; exports2.isDeclaration = isDeclaration; exports2.isDeclareClass = isDeclareClass; exports2.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration; exports2.isDeclareExportDeclaration = isDeclareExportDeclaration; exports2.isDeclareFunction = isDeclareFunction; exports2.isDeclareInterface = isDeclareInterface; exports2.isDeclareModule = isDeclareModule; exports2.isDeclareModuleExports = isDeclareModuleExports; exports2.isDeclareOpaqueType = isDeclareOpaqueType; exports2.isDeclareTypeAlias = isDeclareTypeAlias; exports2.isDeclareVariable = isDeclareVariable; exports2.isDeclaredPredicate = isDeclaredPredicate; exports2.isDecorator = isDecorator; exports2.isDirective = isDirective; exports2.isDirectiveLiteral = isDirectiveLiteral; exports2.isDoExpression = isDoExpression; exports2.isDoWhileStatement = isDoWhileStatement; exports2.isEmptyStatement = isEmptyStatement; exports2.isEmptyTypeAnnotation = isEmptyTypeAnnotation; exports2.isEnumBody = isEnumBody; exports2.isEnumBooleanBody = isEnumBooleanBody; exports2.isEnumBooleanMember = isEnumBooleanMember; exports2.isEnumDeclaration = isEnumDeclaration; exports2.isEnumDefaultedMember = isEnumDefaultedMember; exports2.isEnumMember = isEnumMember; exports2.isEnumNumberBody = isEnumNumberBody; exports2.isEnumNumberMember = isEnumNumberMember; exports2.isEnumStringBody = isEnumStringBody; exports2.isEnumStringMember = isEnumStringMember; exports2.isEnumSymbolBody = isEnumSymbolBody; exports2.isExistsTypeAnnotation = isExistsTypeAnnotation; exports2.isExportAllDeclaration = isExportAllDeclaration; exports2.isExportDeclaration = isExportDeclaration; exports2.isExportDefaultDeclaration = isExportDefaultDeclaration; exports2.isExportDefaultSpecifier = isExportDefaultSpecifier; exports2.isExportNamedDeclaration = isExportNamedDeclaration; exports2.isExportNamespaceSpecifier = isExportNamespaceSpecifier; exports2.isExportSpecifier = isExportSpecifier; exports2.isExpression = isExpression; exports2.isExpressionStatement = isExpressionStatement; exports2.isExpressionWrapper = isExpressionWrapper; exports2.isFile = isFile; exports2.isFlow = isFlow; exports2.isFlowBaseAnnotation = isFlowBaseAnnotation; exports2.isFlowDeclaration = isFlowDeclaration; exports2.isFlowPredicate = isFlowPredicate; exports2.isFlowType = isFlowType; exports2.isFor = isFor; exports2.isForInStatement = isForInStatement; exports2.isForOfStatement = isForOfStatement; exports2.isForStatement = isForStatement; exports2.isForXStatement = isForXStatement; exports2.isFunction = isFunction; exports2.isFunctionDeclaration = isFunctionDeclaration; exports2.isFunctionExpression = isFunctionExpression; exports2.isFunctionParent = isFunctionParent; exports2.isFunctionTypeAnnotation = isFunctionTypeAnnotation; exports2.isFunctionTypeParam = isFunctionTypeParam; exports2.isGenericTypeAnnotation = isGenericTypeAnnotation; exports2.isIdentifier = isIdentifier; exports2.isIfStatement = isIfStatement; exports2.isImmutable = isImmutable; exports2.isImport = isImport; exports2.isImportAttribute = isImportAttribute; exports2.isImportDeclaration = isImportDeclaration; exports2.isImportDefaultSpecifier = isImportDefaultSpecifier; exports2.isImportNamespaceSpecifier = isImportNamespaceSpecifier; exports2.isImportSpecifier = isImportSpecifier; exports2.isIndexedAccessType = isIndexedAccessType; exports2.isInferredPredicate = isInferredPredicate; exports2.isInterfaceDeclaration = isInterfaceDeclaration; exports2.isInterfaceExtends = isInterfaceExtends; exports2.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation; exports2.isInterpreterDirective = isInterpreterDirective; exports2.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation; exports2.isJSX = isJSX; exports2.isJSXAttribute = isJSXAttribute; exports2.isJSXClosingElement = isJSXClosingElement; exports2.isJSXClosingFragment = isJSXClosingFragment; exports2.isJSXElement = isJSXElement; exports2.isJSXEmptyExpression = isJSXEmptyExpression; exports2.isJSXExpressionContainer = isJSXExpressionContainer; exports2.isJSXFragment = isJSXFragment; exports2.isJSXIdentifier = isJSXIdentifier; exports2.isJSXMemberExpression = isJSXMemberExpression; exports2.isJSXNamespacedName = isJSXNamespacedName; exports2.isJSXOpeningElement = isJSXOpeningElement; exports2.isJSXOpeningFragment = isJSXOpeningFragment; exports2.isJSXSpreadAttribute = isJSXSpreadAttribute; exports2.isJSXSpreadChild = isJSXSpreadChild; exports2.isJSXText = isJSXText; exports2.isLVal = isLVal; exports2.isLabeledStatement = isLabeledStatement; exports2.isLiteral = isLiteral; exports2.isLogicalExpression = isLogicalExpression; exports2.isLoop = isLoop; exports2.isMemberExpression = isMemberExpression; exports2.isMetaProperty = isMetaProperty; exports2.isMethod = isMethod; exports2.isMiscellaneous = isMiscellaneous; exports2.isMixedTypeAnnotation = isMixedTypeAnnotation; exports2.isModuleDeclaration = isModuleDeclaration; exports2.isModuleExpression = isModuleExpression; exports2.isModuleSpecifier = isModuleSpecifier; exports2.isNewExpression = isNewExpression; exports2.isNoop = isNoop; exports2.isNullLiteral = isNullLiteral; exports2.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation; exports2.isNullableTypeAnnotation = isNullableTypeAnnotation; exports2.isNumberLiteral = isNumberLiteral; exports2.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation; exports2.isNumberTypeAnnotation = isNumberTypeAnnotation; exports2.isNumericLiteral = isNumericLiteral; exports2.isObjectExpression = isObjectExpression; exports2.isObjectMember = isObjectMember; exports2.isObjectMethod = isObjectMethod; exports2.isObjectPattern = isObjectPattern; exports2.isObjectProperty = isObjectProperty; exports2.isObjectTypeAnnotation = isObjectTypeAnnotation; exports2.isObjectTypeCallProperty = isObjectTypeCallProperty; exports2.isObjectTypeIndexer = isObjectTypeIndexer; exports2.isObjectTypeInternalSlot = isObjectTypeInternalSlot; exports2.isObjectTypeProperty = isObjectTypeProperty; exports2.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty; exports2.isOpaqueType = isOpaqueType; exports2.isOptionalCallExpression = isOptionalCallExpression; exports2.isOptionalIndexedAccessType = isOptionalIndexedAccessType; exports2.isOptionalMemberExpression = isOptionalMemberExpression; exports2.isParenthesizedExpression = isParenthesizedExpression; exports2.isPattern = isPattern; exports2.isPatternLike = isPatternLike; exports2.isPipelineBareFunction = isPipelineBareFunction; exports2.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference; exports2.isPipelineTopicExpression = isPipelineTopicExpression; exports2.isPlaceholder = isPlaceholder; exports2.isPrivate = isPrivate; exports2.isPrivateName = isPrivateName; exports2.isProgram = isProgram; exports2.isProperty = isProperty; exports2.isPureish = isPureish; exports2.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier; exports2.isRecordExpression = isRecordExpression; exports2.isRegExpLiteral = isRegExpLiteral; exports2.isRegexLiteral = isRegexLiteral; exports2.isRestElement = isRestElement; exports2.isRestProperty = isRestProperty; exports2.isReturnStatement = isReturnStatement; exports2.isScopable = isScopable; exports2.isSequenceExpression = isSequenceExpression; exports2.isSpreadElement = isSpreadElement; exports2.isSpreadProperty = isSpreadProperty; exports2.isStandardized = isStandardized; exports2.isStatement = isStatement; exports2.isStaticBlock = isStaticBlock; exports2.isStringLiteral = isStringLiteral; exports2.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation; exports2.isStringTypeAnnotation = isStringTypeAnnotation; exports2.isSuper = isSuper; exports2.isSwitchCase = isSwitchCase; exports2.isSwitchStatement = isSwitchStatement; exports2.isSymbolTypeAnnotation = isSymbolTypeAnnotation; exports2.isTSAnyKeyword = isTSAnyKeyword; exports2.isTSArrayType = isTSArrayType; exports2.isTSAsExpression = isTSAsExpression; exports2.isTSBaseType = isTSBaseType; exports2.isTSBigIntKeyword = isTSBigIntKeyword; exports2.isTSBooleanKeyword = isTSBooleanKeyword; exports2.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration; exports2.isTSConditionalType = isTSConditionalType; exports2.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration; exports2.isTSConstructorType = isTSConstructorType; exports2.isTSDeclareFunction = isTSDeclareFunction; exports2.isTSDeclareMethod = isTSDeclareMethod; exports2.isTSEntityName = isTSEntityName; exports2.isTSEnumDeclaration = isTSEnumDeclaration; exports2.isTSEnumMember = isTSEnumMember; exports2.isTSExportAssignment = isTSExportAssignment; exports2.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments; exports2.isTSExternalModuleReference = isTSExternalModuleReference; exports2.isTSFunctionType = isTSFunctionType; exports2.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration; exports2.isTSImportType = isTSImportType; exports2.isTSIndexSignature = isTSIndexSignature; exports2.isTSIndexedAccessType = isTSIndexedAccessType; exports2.isTSInferType = isTSInferType; exports2.isTSInterfaceBody = isTSInterfaceBody; exports2.isTSInterfaceDeclaration = isTSInterfaceDeclaration; exports2.isTSIntersectionType = isTSIntersectionType; exports2.isTSIntrinsicKeyword = isTSIntrinsicKeyword; exports2.isTSLiteralType = isTSLiteralType; exports2.isTSMappedType = isTSMappedType; exports2.isTSMethodSignature = isTSMethodSignature; exports2.isTSModuleBlock = isTSModuleBlock; exports2.isTSModuleDeclaration = isTSModuleDeclaration; exports2.isTSNamedTupleMember = isTSNamedTupleMember; exports2.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration; exports2.isTSNeverKeyword = isTSNeverKeyword; exports2.isTSNonNullExpression = isTSNonNullExpression; exports2.isTSNullKeyword = isTSNullKeyword; exports2.isTSNumberKeyword = isTSNumberKeyword; exports2.isTSObjectKeyword = isTSObjectKeyword; exports2.isTSOptionalType = isTSOptionalType; exports2.isTSParameterProperty = isTSParameterProperty; exports2.isTSParenthesizedType = isTSParenthesizedType; exports2.isTSPropertySignature = isTSPropertySignature; exports2.isTSQualifiedName = isTSQualifiedName; exports2.isTSRestType = isTSRestType; exports2.isTSStringKeyword = isTSStringKeyword; exports2.isTSSymbolKeyword = isTSSymbolKeyword; exports2.isTSThisType = isTSThisType; exports2.isTSTupleType = isTSTupleType; exports2.isTSType = isTSType; exports2.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration; exports2.isTSTypeAnnotation = isTSTypeAnnotation; exports2.isTSTypeAssertion = isTSTypeAssertion; exports2.isTSTypeElement = isTSTypeElement; exports2.isTSTypeLiteral = isTSTypeLiteral; exports2.isTSTypeOperator = isTSTypeOperator; exports2.isTSTypeParameter = isTSTypeParameter; exports2.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration; exports2.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation; exports2.isTSTypePredicate = isTSTypePredicate; exports2.isTSTypeQuery = isTSTypeQuery; exports2.isTSTypeReference = isTSTypeReference; exports2.isTSUndefinedKeyword = isTSUndefinedKeyword; exports2.isTSUnionType = isTSUnionType; exports2.isTSUnknownKeyword = isTSUnknownKeyword; exports2.isTSVoidKeyword = isTSVoidKeyword; exports2.isTaggedTemplateExpression = isTaggedTemplateExpression; exports2.isTemplateElement = isTemplateElement; exports2.isTemplateLiteral = isTemplateLiteral; exports2.isTerminatorless = isTerminatorless; exports2.isThisExpression = isThisExpression; exports2.isThisTypeAnnotation = isThisTypeAnnotation; exports2.isThrowStatement = isThrowStatement; exports2.isTopicReference = isTopicReference; exports2.isTryStatement = isTryStatement; exports2.isTupleExpression = isTupleExpression; exports2.isTupleTypeAnnotation = isTupleTypeAnnotation; exports2.isTypeAlias = isTypeAlias; exports2.isTypeAnnotation = isTypeAnnotation; exports2.isTypeCastExpression = isTypeCastExpression; exports2.isTypeParameter = isTypeParameter; exports2.isTypeParameterDeclaration = isTypeParameterDeclaration; exports2.isTypeParameterInstantiation = isTypeParameterInstantiation; exports2.isTypeScript = isTypeScript; exports2.isTypeofTypeAnnotation = isTypeofTypeAnnotation; exports2.isUnaryExpression = isUnaryExpression; exports2.isUnaryLike = isUnaryLike; exports2.isUnionTypeAnnotation = isUnionTypeAnnotation; exports2.isUpdateExpression = isUpdateExpression; exports2.isUserWhitespacable = isUserWhitespacable; exports2.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier; exports2.isVariableDeclaration = isVariableDeclaration; exports2.isVariableDeclarator = isVariableDeclarator; exports2.isVariance = isVariance; exports2.isVoidTypeAnnotation = isVoidTypeAnnotation; exports2.isWhile = isWhile; exports2.isWhileStatement = isWhileStatement; exports2.isWithStatement = isWithStatement; exports2.isYieldExpression = isYieldExpression; var _shallowEqual = require_shallowEqual3(); function isArrayExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ArrayExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isAssignmentExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AssignmentExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBinaryExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BinaryExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isInterpreterDirective(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "InterpreterDirective") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDirective(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Directive") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDirectiveLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DirectiveLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBlockStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BlockStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBreakStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BreakStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isCallExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "CallExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isCatchClause(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "CatchClause") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isConditionalExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ConditionalExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isContinueStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ContinueStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDebuggerStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DebuggerStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDoWhileStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DoWhileStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEmptyStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EmptyStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExpressionStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExpressionStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFile(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "File") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isForInStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ForInStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isForStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ForStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFunctionDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFunctionExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isIdentifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Identifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isIfStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "IfStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isLabeledStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "LabeledStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isStringLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "StringLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNumericLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "NumericLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNullLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "NullLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBooleanLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BooleanLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isRegExpLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "RegExpLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isLogicalExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "LogicalExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isMemberExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "MemberExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNewExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "NewExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isProgram(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Program") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectMethod(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectMethod") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isRestElement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "RestElement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isReturnStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ReturnStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isSequenceExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "SequenceExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isParenthesizedExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ParenthesizedExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isSwitchCase(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "SwitchCase") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isSwitchStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "SwitchStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isThisExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ThisExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isThrowStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ThrowStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTryStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TryStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isUnaryExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "UnaryExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isUpdateExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "UpdateExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isVariableDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "VariableDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isVariableDeclarator(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "VariableDeclarator") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isWhileStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "WhileStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isWithStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "WithStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isAssignmentPattern(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AssignmentPattern") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isArrayPattern(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ArrayPattern") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isArrowFunctionExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ArrowFunctionExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassBody(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassBody") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExportAllDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportAllDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExportDefaultDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportDefaultDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExportNamedDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportNamedDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExportSpecifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportSpecifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isForOfStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ForOfStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isImportDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ImportDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isImportDefaultSpecifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ImportDefaultSpecifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isImportNamespaceSpecifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ImportNamespaceSpecifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isImportSpecifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ImportSpecifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isMetaProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "MetaProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassMethod(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassMethod") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectPattern(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectPattern") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isSpreadElement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "SpreadElement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isSuper(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Super") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTaggedTemplateExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TaggedTemplateExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTemplateElement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TemplateElement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTemplateLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TemplateLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isYieldExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "YieldExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isAwaitExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AwaitExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isImport(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Import") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBigIntLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BigIntLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExportNamespaceSpecifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportNamespaceSpecifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isOptionalMemberExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "OptionalMemberExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isOptionalCallExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "OptionalCallExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassAccessorProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassAccessorProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassPrivateProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassPrivateProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassPrivateMethod(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassPrivateMethod") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPrivateName(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "PrivateName") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isStaticBlock(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "StaticBlock") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isAnyTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AnyTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isArrayTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ArrayTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBooleanTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BooleanTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBooleanLiteralTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BooleanLiteralTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNullLiteralTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "NullLiteralTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClassImplements(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassImplements") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareClass(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareClass") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareFunction(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareFunction") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareInterface(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareInterface") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareModule(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareModule") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareModuleExports(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareModuleExports") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareTypeAlias(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareTypeAlias") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareOpaqueType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareOpaqueType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareVariable(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareVariable") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareExportDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareExportDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclareExportAllDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareExportAllDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclaredPredicate(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclaredPredicate") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExistsTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExistsTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFunctionTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFunctionTypeParam(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionTypeParam") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isGenericTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "GenericTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isInferredPredicate(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "InferredPredicate") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isInterfaceExtends(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "InterfaceExtends") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isInterfaceDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "InterfaceDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isInterfaceTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "InterfaceTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isIntersectionTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "IntersectionTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isMixedTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "MixedTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEmptyTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EmptyTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNullableTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "NullableTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNumberLiteralTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "NumberLiteralTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNumberTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "NumberTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectTypeInternalSlot(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectTypeInternalSlot") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectTypeCallProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectTypeCallProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectTypeIndexer(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectTypeIndexer") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectTypeProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectTypeProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectTypeSpreadProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectTypeSpreadProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isOpaqueType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "OpaqueType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isQualifiedTypeIdentifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "QualifiedTypeIdentifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isStringLiteralTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "StringLiteralTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isStringTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "StringTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isSymbolTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "SymbolTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isThisTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ThisTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTupleTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TupleTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeofTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TypeofTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeAlias(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TypeAlias") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeCastExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TypeCastExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeParameter(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TypeParameter") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeParameterDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TypeParameterDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeParameterInstantiation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TypeParameterInstantiation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isUnionTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "UnionTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isVariance(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Variance") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isVoidTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "VoidTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumBooleanBody(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumBooleanBody") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumNumberBody(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumNumberBody") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumStringBody(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumStringBody") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumSymbolBody(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumSymbolBody") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumBooleanMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumBooleanMember") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumNumberMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumNumberMember") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumStringMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumStringMember") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumDefaultedMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumDefaultedMember") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isIndexedAccessType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "IndexedAccessType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isOptionalIndexedAccessType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "OptionalIndexedAccessType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXAttribute(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXAttribute") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXClosingElement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXClosingElement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXElement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXElement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXEmptyExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXEmptyExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXExpressionContainer(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXExpressionContainer") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXSpreadChild(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXSpreadChild") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXIdentifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXIdentifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXMemberExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXMemberExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXNamespacedName(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXNamespacedName") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXOpeningElement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXOpeningElement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXSpreadAttribute(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXSpreadAttribute") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXText(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXText") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXFragment(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXFragment") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXOpeningFragment(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXOpeningFragment") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSXClosingFragment(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXClosingFragment") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNoop(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Noop") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPlaceholder(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Placeholder") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isV8IntrinsicIdentifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "V8IntrinsicIdentifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isArgumentPlaceholder(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ArgumentPlaceholder") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBindExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BindExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isImportAttribute(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ImportAttribute") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDecorator(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Decorator") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDoExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DoExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExportDefaultSpecifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportDefaultSpecifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isRecordExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "RecordExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTupleExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TupleExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDecimalLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DecimalLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isModuleExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ModuleExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTopicReference(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TopicReference") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPipelineTopicExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "PipelineTopicExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPipelineBareFunction(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "PipelineBareFunction") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPipelinePrimaryTopicReference(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "PipelinePrimaryTopicReference") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSParameterProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSParameterProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSDeclareFunction(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSDeclareFunction") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSDeclareMethod(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSDeclareMethod") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSQualifiedName(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSQualifiedName") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSCallSignatureDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSCallSignatureDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSConstructSignatureDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSConstructSignatureDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSPropertySignature(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSPropertySignature") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSMethodSignature(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSMethodSignature") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSIndexSignature(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSIndexSignature") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSAnyKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSAnyKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSBooleanKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSBooleanKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSBigIntKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSBigIntKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSIntrinsicKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSIntrinsicKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSNeverKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSNeverKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSNullKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSNullKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSNumberKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSNumberKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSObjectKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSObjectKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSStringKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSStringKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSSymbolKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSSymbolKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSUndefinedKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSUndefinedKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSUnknownKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSUnknownKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSVoidKeyword(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSVoidKeyword") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSThisType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSThisType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSFunctionType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSFunctionType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSConstructorType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSConstructorType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeReference(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeReference") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypePredicate(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypePredicate") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeQuery(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeQuery") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSArrayType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSArrayType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTupleType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTupleType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSOptionalType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSOptionalType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSRestType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSRestType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSNamedTupleMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSNamedTupleMember") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSUnionType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSUnionType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSIntersectionType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSIntersectionType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSConditionalType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSConditionalType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSInferType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSInferType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSParenthesizedType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSParenthesizedType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeOperator(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeOperator") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSIndexedAccessType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSIndexedAccessType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSMappedType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSMappedType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSLiteralType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSLiteralType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSExpressionWithTypeArguments(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSExpressionWithTypeArguments") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSInterfaceDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSInterfaceDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSInterfaceBody(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSInterfaceBody") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeAliasDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeAliasDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSAsExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSAsExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeAssertion(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeAssertion") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSEnumDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSEnumDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSEnumMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSEnumMember") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSModuleDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSModuleDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSModuleBlock(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSModuleBlock") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSImportType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSImportType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSImportEqualsDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSImportEqualsDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSExternalModuleReference(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSExternalModuleReference") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSNonNullExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSNonNullExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSExportAssignment(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSExportAssignment") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSNamespaceExportDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSNamespaceExportDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeParameterInstantiation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeParameterInstantiation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeParameterDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeParameterDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeParameter(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSTypeParameter") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isStandardized(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ArrayExpression" || nodeType === "AssignmentExpression" || nodeType === "BinaryExpression" || nodeType === "InterpreterDirective" || nodeType === "Directive" || nodeType === "DirectiveLiteral" || nodeType === "BlockStatement" || nodeType === "BreakStatement" || nodeType === "CallExpression" || nodeType === "CatchClause" || nodeType === "ConditionalExpression" || nodeType === "ContinueStatement" || nodeType === "DebuggerStatement" || nodeType === "DoWhileStatement" || nodeType === "EmptyStatement" || nodeType === "ExpressionStatement" || nodeType === "File" || nodeType === "ForInStatement" || nodeType === "ForStatement" || nodeType === "FunctionDeclaration" || nodeType === "FunctionExpression" || nodeType === "Identifier" || nodeType === "IfStatement" || nodeType === "LabeledStatement" || nodeType === "StringLiteral" || nodeType === "NumericLiteral" || nodeType === "NullLiteral" || nodeType === "BooleanLiteral" || nodeType === "RegExpLiteral" || nodeType === "LogicalExpression" || nodeType === "MemberExpression" || nodeType === "NewExpression" || nodeType === "Program" || nodeType === "ObjectExpression" || nodeType === "ObjectMethod" || nodeType === "ObjectProperty" || nodeType === "RestElement" || nodeType === "ReturnStatement" || nodeType === "SequenceExpression" || nodeType === "ParenthesizedExpression" || nodeType === "SwitchCase" || nodeType === "SwitchStatement" || nodeType === "ThisExpression" || nodeType === "ThrowStatement" || nodeType === "TryStatement" || nodeType === "UnaryExpression" || nodeType === "UpdateExpression" || nodeType === "VariableDeclaration" || nodeType === "VariableDeclarator" || nodeType === "WhileStatement" || nodeType === "WithStatement" || nodeType === "AssignmentPattern" || nodeType === "ArrayPattern" || nodeType === "ArrowFunctionExpression" || nodeType === "ClassBody" || nodeType === "ClassExpression" || nodeType === "ClassDeclaration" || nodeType === "ExportAllDeclaration" || nodeType === "ExportDefaultDeclaration" || nodeType === "ExportNamedDeclaration" || nodeType === "ExportSpecifier" || nodeType === "ForOfStatement" || nodeType === "ImportDeclaration" || nodeType === "ImportDefaultSpecifier" || nodeType === "ImportNamespaceSpecifier" || nodeType === "ImportSpecifier" || nodeType === "MetaProperty" || nodeType === "ClassMethod" || nodeType === "ObjectPattern" || nodeType === "SpreadElement" || nodeType === "Super" || nodeType === "TaggedTemplateExpression" || nodeType === "TemplateElement" || nodeType === "TemplateLiteral" || nodeType === "YieldExpression" || nodeType === "AwaitExpression" || nodeType === "Import" || nodeType === "BigIntLiteral" || nodeType === "ExportNamespaceSpecifier" || nodeType === "OptionalMemberExpression" || nodeType === "OptionalCallExpression" || nodeType === "ClassProperty" || nodeType === "ClassAccessorProperty" || nodeType === "ClassPrivateProperty" || nodeType === "ClassPrivateMethod" || nodeType === "PrivateName" || nodeType === "StaticBlock" || nodeType === "Placeholder" && (node.expectedNode === "Identifier" || node.expectedNode === "StringLiteral" || node.expectedNode === "BlockStatement" || node.expectedNode === "ClassBody")) { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExpression(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ArrayExpression" || nodeType === "AssignmentExpression" || nodeType === "BinaryExpression" || nodeType === "CallExpression" || nodeType === "ConditionalExpression" || nodeType === "FunctionExpression" || nodeType === "Identifier" || nodeType === "StringLiteral" || nodeType === "NumericLiteral" || nodeType === "NullLiteral" || nodeType === "BooleanLiteral" || nodeType === "RegExpLiteral" || nodeType === "LogicalExpression" || nodeType === "MemberExpression" || nodeType === "NewExpression" || nodeType === "ObjectExpression" || nodeType === "SequenceExpression" || nodeType === "ParenthesizedExpression" || nodeType === "ThisExpression" || nodeType === "UnaryExpression" || nodeType === "UpdateExpression" || nodeType === "ArrowFunctionExpression" || nodeType === "ClassExpression" || nodeType === "MetaProperty" || nodeType === "Super" || nodeType === "TaggedTemplateExpression" || nodeType === "TemplateLiteral" || nodeType === "YieldExpression" || nodeType === "AwaitExpression" || nodeType === "Import" || nodeType === "BigIntLiteral" || nodeType === "OptionalMemberExpression" || nodeType === "OptionalCallExpression" || nodeType === "TypeCastExpression" || nodeType === "JSXElement" || nodeType === "JSXFragment" || nodeType === "BindExpression" || nodeType === "DoExpression" || nodeType === "RecordExpression" || nodeType === "TupleExpression" || nodeType === "DecimalLiteral" || nodeType === "ModuleExpression" || nodeType === "TopicReference" || nodeType === "PipelineTopicExpression" || nodeType === "PipelineBareFunction" || nodeType === "PipelinePrimaryTopicReference" || nodeType === "TSAsExpression" || nodeType === "TSTypeAssertion" || nodeType === "TSNonNullExpression" || nodeType === "Placeholder" && (node.expectedNode === "Expression" || node.expectedNode === "Identifier" || node.expectedNode === "StringLiteral")) { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBinary(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BinaryExpression" || nodeType === "LogicalExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isScopable(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BlockStatement" || nodeType === "CatchClause" || nodeType === "DoWhileStatement" || nodeType === "ForInStatement" || nodeType === "ForStatement" || nodeType === "FunctionDeclaration" || nodeType === "FunctionExpression" || nodeType === "Program" || nodeType === "ObjectMethod" || nodeType === "SwitchStatement" || nodeType === "WhileStatement" || nodeType === "ArrowFunctionExpression" || nodeType === "ClassExpression" || nodeType === "ClassDeclaration" || nodeType === "ForOfStatement" || nodeType === "ClassMethod" || nodeType === "ClassPrivateMethod" || nodeType === "StaticBlock" || nodeType === "TSModuleBlock" || nodeType === "Placeholder" && node.expectedNode === "BlockStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBlockParent(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BlockStatement" || nodeType === "CatchClause" || nodeType === "DoWhileStatement" || nodeType === "ForInStatement" || nodeType === "ForStatement" || nodeType === "FunctionDeclaration" || nodeType === "FunctionExpression" || nodeType === "Program" || nodeType === "ObjectMethod" || nodeType === "SwitchStatement" || nodeType === "WhileStatement" || nodeType === "ArrowFunctionExpression" || nodeType === "ForOfStatement" || nodeType === "ClassMethod" || nodeType === "ClassPrivateMethod" || nodeType === "StaticBlock" || nodeType === "TSModuleBlock" || nodeType === "Placeholder" && node.expectedNode === "BlockStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isBlock(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BlockStatement" || nodeType === "Program" || nodeType === "TSModuleBlock" || nodeType === "Placeholder" && node.expectedNode === "BlockStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BlockStatement" || nodeType === "BreakStatement" || nodeType === "ContinueStatement" || nodeType === "DebuggerStatement" || nodeType === "DoWhileStatement" || nodeType === "EmptyStatement" || nodeType === "ExpressionStatement" || nodeType === "ForInStatement" || nodeType === "ForStatement" || nodeType === "FunctionDeclaration" || nodeType === "IfStatement" || nodeType === "LabeledStatement" || nodeType === "ReturnStatement" || nodeType === "SwitchStatement" || nodeType === "ThrowStatement" || nodeType === "TryStatement" || nodeType === "VariableDeclaration" || nodeType === "WhileStatement" || nodeType === "WithStatement" || nodeType === "ClassDeclaration" || nodeType === "ExportAllDeclaration" || nodeType === "ExportDefaultDeclaration" || nodeType === "ExportNamedDeclaration" || nodeType === "ForOfStatement" || nodeType === "ImportDeclaration" || nodeType === "DeclareClass" || nodeType === "DeclareFunction" || nodeType === "DeclareInterface" || nodeType === "DeclareModule" || nodeType === "DeclareModuleExports" || nodeType === "DeclareTypeAlias" || nodeType === "DeclareOpaqueType" || nodeType === "DeclareVariable" || nodeType === "DeclareExportDeclaration" || nodeType === "DeclareExportAllDeclaration" || nodeType === "InterfaceDeclaration" || nodeType === "OpaqueType" || nodeType === "TypeAlias" || nodeType === "EnumDeclaration" || nodeType === "TSDeclareFunction" || nodeType === "TSInterfaceDeclaration" || nodeType === "TSTypeAliasDeclaration" || nodeType === "TSEnumDeclaration" || nodeType === "TSModuleDeclaration" || nodeType === "TSImportEqualsDeclaration" || nodeType === "TSExportAssignment" || nodeType === "TSNamespaceExportDeclaration" || nodeType === "Placeholder" && (node.expectedNode === "Statement" || node.expectedNode === "Declaration" || node.expectedNode === "BlockStatement")) { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTerminatorless(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BreakStatement" || nodeType === "ContinueStatement" || nodeType === "ReturnStatement" || nodeType === "ThrowStatement" || nodeType === "YieldExpression" || nodeType === "AwaitExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isCompletionStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "BreakStatement" || nodeType === "ContinueStatement" || nodeType === "ReturnStatement" || nodeType === "ThrowStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isConditional(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ConditionalExpression" || nodeType === "IfStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isLoop(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DoWhileStatement" || nodeType === "ForInStatement" || nodeType === "ForStatement" || nodeType === "WhileStatement" || nodeType === "ForOfStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isWhile(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DoWhileStatement" || nodeType === "WhileStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExpressionWrapper(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExpressionStatement" || nodeType === "ParenthesizedExpression" || nodeType === "TypeCastExpression") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFor(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ForInStatement" || nodeType === "ForStatement" || nodeType === "ForOfStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isForXStatement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ForInStatement" || nodeType === "ForOfStatement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFunction(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionDeclaration" || nodeType === "FunctionExpression" || nodeType === "ObjectMethod" || nodeType === "ArrowFunctionExpression" || nodeType === "ClassMethod" || nodeType === "ClassPrivateMethod") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFunctionParent(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionDeclaration" || nodeType === "FunctionExpression" || nodeType === "ObjectMethod" || nodeType === "ArrowFunctionExpression" || nodeType === "ClassMethod" || nodeType === "ClassPrivateMethod" || nodeType === "StaticBlock") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPureish(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionDeclaration" || nodeType === "FunctionExpression" || nodeType === "StringLiteral" || nodeType === "NumericLiteral" || nodeType === "NullLiteral" || nodeType === "BooleanLiteral" || nodeType === "RegExpLiteral" || nodeType === "ArrowFunctionExpression" || nodeType === "BigIntLiteral" || nodeType === "DecimalLiteral" || nodeType === "Placeholder" && node.expectedNode === "StringLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "FunctionDeclaration" || nodeType === "VariableDeclaration" || nodeType === "ClassDeclaration" || nodeType === "ExportAllDeclaration" || nodeType === "ExportDefaultDeclaration" || nodeType === "ExportNamedDeclaration" || nodeType === "ImportDeclaration" || nodeType === "DeclareClass" || nodeType === "DeclareFunction" || nodeType === "DeclareInterface" || nodeType === "DeclareModule" || nodeType === "DeclareModuleExports" || nodeType === "DeclareTypeAlias" || nodeType === "DeclareOpaqueType" || nodeType === "DeclareVariable" || nodeType === "DeclareExportDeclaration" || nodeType === "DeclareExportAllDeclaration" || nodeType === "InterfaceDeclaration" || nodeType === "OpaqueType" || nodeType === "TypeAlias" || nodeType === "EnumDeclaration" || nodeType === "TSDeclareFunction" || nodeType === "TSInterfaceDeclaration" || nodeType === "TSTypeAliasDeclaration" || nodeType === "TSEnumDeclaration" || nodeType === "TSModuleDeclaration" || nodeType === "Placeholder" && node.expectedNode === "Declaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPatternLike(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Identifier" || nodeType === "RestElement" || nodeType === "AssignmentPattern" || nodeType === "ArrayPattern" || nodeType === "ObjectPattern" || nodeType === "Placeholder" && (node.expectedNode === "Pattern" || node.expectedNode === "Identifier")) { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isLVal(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Identifier" || nodeType === "MemberExpression" || nodeType === "RestElement" || nodeType === "AssignmentPattern" || nodeType === "ArrayPattern" || nodeType === "ObjectPattern" || nodeType === "TSParameterProperty" || nodeType === "Placeholder" && (node.expectedNode === "Pattern" || node.expectedNode === "Identifier")) { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSEntityName(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Identifier" || nodeType === "TSQualifiedName" || nodeType === "Placeholder" && node.expectedNode === "Identifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isLiteral(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "StringLiteral" || nodeType === "NumericLiteral" || nodeType === "NullLiteral" || nodeType === "BooleanLiteral" || nodeType === "RegExpLiteral" || nodeType === "TemplateLiteral" || nodeType === "BigIntLiteral" || nodeType === "DecimalLiteral" || nodeType === "Placeholder" && node.expectedNode === "StringLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isImmutable(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "StringLiteral" || nodeType === "NumericLiteral" || nodeType === "NullLiteral" || nodeType === "BooleanLiteral" || nodeType === "BigIntLiteral" || nodeType === "JSXAttribute" || nodeType === "JSXClosingElement" || nodeType === "JSXElement" || nodeType === "JSXExpressionContainer" || nodeType === "JSXSpreadChild" || nodeType === "JSXOpeningElement" || nodeType === "JSXText" || nodeType === "JSXFragment" || nodeType === "JSXOpeningFragment" || nodeType === "JSXClosingFragment" || nodeType === "DecimalLiteral" || nodeType === "Placeholder" && node.expectedNode === "StringLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isUserWhitespacable(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectMethod" || nodeType === "ObjectProperty" || nodeType === "ObjectTypeInternalSlot" || nodeType === "ObjectTypeCallProperty" || nodeType === "ObjectTypeIndexer" || nodeType === "ObjectTypeProperty" || nodeType === "ObjectTypeSpreadProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isMethod(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectMethod" || nodeType === "ClassMethod" || nodeType === "ClassPrivateMethod") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isObjectMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectMethod" || nodeType === "ObjectProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isProperty(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ObjectProperty" || nodeType === "ClassProperty" || nodeType === "ClassAccessorProperty" || nodeType === "ClassPrivateProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isUnaryLike(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "UnaryExpression" || nodeType === "SpreadElement") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPattern(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AssignmentPattern" || nodeType === "ArrayPattern" || nodeType === "ObjectPattern" || nodeType === "Placeholder" && node.expectedNode === "Pattern") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isClass(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassExpression" || nodeType === "ClassDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isModuleDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportAllDeclaration" || nodeType === "ExportDefaultDeclaration" || nodeType === "ExportNamedDeclaration" || nodeType === "ImportDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isExportDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportAllDeclaration" || nodeType === "ExportDefaultDeclaration" || nodeType === "ExportNamedDeclaration") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isModuleSpecifier(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ExportSpecifier" || nodeType === "ImportDefaultSpecifier" || nodeType === "ImportNamespaceSpecifier" || nodeType === "ImportSpecifier" || nodeType === "ExportNamespaceSpecifier" || nodeType === "ExportDefaultSpecifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isAccessor(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassAccessorProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isPrivate(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "ClassPrivateProperty" || nodeType === "ClassPrivateMethod" || nodeType === "PrivateName") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFlow(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AnyTypeAnnotation" || nodeType === "ArrayTypeAnnotation" || nodeType === "BooleanTypeAnnotation" || nodeType === "BooleanLiteralTypeAnnotation" || nodeType === "NullLiteralTypeAnnotation" || nodeType === "ClassImplements" || nodeType === "DeclareClass" || nodeType === "DeclareFunction" || nodeType === "DeclareInterface" || nodeType === "DeclareModule" || nodeType === "DeclareModuleExports" || nodeType === "DeclareTypeAlias" || nodeType === "DeclareOpaqueType" || nodeType === "DeclareVariable" || nodeType === "DeclareExportDeclaration" || nodeType === "DeclareExportAllDeclaration" || nodeType === "DeclaredPredicate" || nodeType === "ExistsTypeAnnotation" || nodeType === "FunctionTypeAnnotation" || nodeType === "FunctionTypeParam" || nodeType === "GenericTypeAnnotation" || nodeType === "InferredPredicate" || nodeType === "InterfaceExtends" || nodeType === "InterfaceDeclaration" || nodeType === "InterfaceTypeAnnotation" || nodeType === "IntersectionTypeAnnotation" || nodeType === "MixedTypeAnnotation" || nodeType === "EmptyTypeAnnotation" || nodeType === "NullableTypeAnnotation" || nodeType === "NumberLiteralTypeAnnotation" || nodeType === "NumberTypeAnnotation" || nodeType === "ObjectTypeAnnotation" || nodeType === "ObjectTypeInternalSlot" || nodeType === "ObjectTypeCallProperty" || nodeType === "ObjectTypeIndexer" || nodeType === "ObjectTypeProperty" || nodeType === "ObjectTypeSpreadProperty" || nodeType === "OpaqueType" || nodeType === "QualifiedTypeIdentifier" || nodeType === "StringLiteralTypeAnnotation" || nodeType === "StringTypeAnnotation" || nodeType === "SymbolTypeAnnotation" || nodeType === "ThisTypeAnnotation" || nodeType === "TupleTypeAnnotation" || nodeType === "TypeofTypeAnnotation" || nodeType === "TypeAlias" || nodeType === "TypeAnnotation" || nodeType === "TypeCastExpression" || nodeType === "TypeParameter" || nodeType === "TypeParameterDeclaration" || nodeType === "TypeParameterInstantiation" || nodeType === "UnionTypeAnnotation" || nodeType === "Variance" || nodeType === "VoidTypeAnnotation" || nodeType === "EnumDeclaration" || nodeType === "EnumBooleanBody" || nodeType === "EnumNumberBody" || nodeType === "EnumStringBody" || nodeType === "EnumSymbolBody" || nodeType === "EnumBooleanMember" || nodeType === "EnumNumberMember" || nodeType === "EnumStringMember" || nodeType === "EnumDefaultedMember" || nodeType === "IndexedAccessType" || nodeType === "OptionalIndexedAccessType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFlowType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AnyTypeAnnotation" || nodeType === "ArrayTypeAnnotation" || nodeType === "BooleanTypeAnnotation" || nodeType === "BooleanLiteralTypeAnnotation" || nodeType === "NullLiteralTypeAnnotation" || nodeType === "ExistsTypeAnnotation" || nodeType === "FunctionTypeAnnotation" || nodeType === "GenericTypeAnnotation" || nodeType === "InterfaceTypeAnnotation" || nodeType === "IntersectionTypeAnnotation" || nodeType === "MixedTypeAnnotation" || nodeType === "EmptyTypeAnnotation" || nodeType === "NullableTypeAnnotation" || nodeType === "NumberLiteralTypeAnnotation" || nodeType === "NumberTypeAnnotation" || nodeType === "ObjectTypeAnnotation" || nodeType === "StringLiteralTypeAnnotation" || nodeType === "StringTypeAnnotation" || nodeType === "SymbolTypeAnnotation" || nodeType === "ThisTypeAnnotation" || nodeType === "TupleTypeAnnotation" || nodeType === "TypeofTypeAnnotation" || nodeType === "UnionTypeAnnotation" || nodeType === "VoidTypeAnnotation" || nodeType === "IndexedAccessType" || nodeType === "OptionalIndexedAccessType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFlowBaseAnnotation(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "AnyTypeAnnotation" || nodeType === "BooleanTypeAnnotation" || nodeType === "NullLiteralTypeAnnotation" || nodeType === "MixedTypeAnnotation" || nodeType === "EmptyTypeAnnotation" || nodeType === "NumberTypeAnnotation" || nodeType === "StringTypeAnnotation" || nodeType === "SymbolTypeAnnotation" || nodeType === "ThisTypeAnnotation" || nodeType === "VoidTypeAnnotation") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFlowDeclaration(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclareClass" || nodeType === "DeclareFunction" || nodeType === "DeclareInterface" || nodeType === "DeclareModule" || nodeType === "DeclareModuleExports" || nodeType === "DeclareTypeAlias" || nodeType === "DeclareOpaqueType" || nodeType === "DeclareVariable" || nodeType === "DeclareExportDeclaration" || nodeType === "DeclareExportAllDeclaration" || nodeType === "InterfaceDeclaration" || nodeType === "OpaqueType" || nodeType === "TypeAlias") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isFlowPredicate(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "DeclaredPredicate" || nodeType === "InferredPredicate") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumBody(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumBooleanBody" || nodeType === "EnumNumberBody" || nodeType === "EnumStringBody" || nodeType === "EnumSymbolBody") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isEnumMember(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "EnumBooleanMember" || nodeType === "EnumNumberMember" || nodeType === "EnumStringMember" || nodeType === "EnumDefaultedMember") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isJSX(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "JSXAttribute" || nodeType === "JSXClosingElement" || nodeType === "JSXElement" || nodeType === "JSXEmptyExpression" || nodeType === "JSXExpressionContainer" || nodeType === "JSXSpreadChild" || nodeType === "JSXIdentifier" || nodeType === "JSXMemberExpression" || nodeType === "JSXNamespacedName" || nodeType === "JSXOpeningElement" || nodeType === "JSXSpreadAttribute" || nodeType === "JSXText" || nodeType === "JSXFragment" || nodeType === "JSXOpeningFragment" || nodeType === "JSXClosingFragment") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isMiscellaneous(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "Noop" || nodeType === "Placeholder" || nodeType === "V8IntrinsicIdentifier") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTypeScript(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSParameterProperty" || nodeType === "TSDeclareFunction" || nodeType === "TSDeclareMethod" || nodeType === "TSQualifiedName" || nodeType === "TSCallSignatureDeclaration" || nodeType === "TSConstructSignatureDeclaration" || nodeType === "TSPropertySignature" || nodeType === "TSMethodSignature" || nodeType === "TSIndexSignature" || nodeType === "TSAnyKeyword" || nodeType === "TSBooleanKeyword" || nodeType === "TSBigIntKeyword" || nodeType === "TSIntrinsicKeyword" || nodeType === "TSNeverKeyword" || nodeType === "TSNullKeyword" || nodeType === "TSNumberKeyword" || nodeType === "TSObjectKeyword" || nodeType === "TSStringKeyword" || nodeType === "TSSymbolKeyword" || nodeType === "TSUndefinedKeyword" || nodeType === "TSUnknownKeyword" || nodeType === "TSVoidKeyword" || nodeType === "TSThisType" || nodeType === "TSFunctionType" || nodeType === "TSConstructorType" || nodeType === "TSTypeReference" || nodeType === "TSTypePredicate" || nodeType === "TSTypeQuery" || nodeType === "TSTypeLiteral" || nodeType === "TSArrayType" || nodeType === "TSTupleType" || nodeType === "TSOptionalType" || nodeType === "TSRestType" || nodeType === "TSNamedTupleMember" || nodeType === "TSUnionType" || nodeType === "TSIntersectionType" || nodeType === "TSConditionalType" || nodeType === "TSInferType" || nodeType === "TSParenthesizedType" || nodeType === "TSTypeOperator" || nodeType === "TSIndexedAccessType" || nodeType === "TSMappedType" || nodeType === "TSLiteralType" || nodeType === "TSExpressionWithTypeArguments" || nodeType === "TSInterfaceDeclaration" || nodeType === "TSInterfaceBody" || nodeType === "TSTypeAliasDeclaration" || nodeType === "TSAsExpression" || nodeType === "TSTypeAssertion" || nodeType === "TSEnumDeclaration" || nodeType === "TSEnumMember" || nodeType === "TSModuleDeclaration" || nodeType === "TSModuleBlock" || nodeType === "TSImportType" || nodeType === "TSImportEqualsDeclaration" || nodeType === "TSExternalModuleReference" || nodeType === "TSNonNullExpression" || nodeType === "TSExportAssignment" || nodeType === "TSNamespaceExportDeclaration" || nodeType === "TSTypeAnnotation" || nodeType === "TSTypeParameterInstantiation" || nodeType === "TSTypeParameterDeclaration" || nodeType === "TSTypeParameter") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSTypeElement(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSCallSignatureDeclaration" || nodeType === "TSConstructSignatureDeclaration" || nodeType === "TSPropertySignature" || nodeType === "TSMethodSignature" || nodeType === "TSIndexSignature") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSAnyKeyword" || nodeType === "TSBooleanKeyword" || nodeType === "TSBigIntKeyword" || nodeType === "TSIntrinsicKeyword" || nodeType === "TSNeverKeyword" || nodeType === "TSNullKeyword" || nodeType === "TSNumberKeyword" || nodeType === "TSObjectKeyword" || nodeType === "TSStringKeyword" || nodeType === "TSSymbolKeyword" || nodeType === "TSUndefinedKeyword" || nodeType === "TSUnknownKeyword" || nodeType === "TSVoidKeyword" || nodeType === "TSThisType" || nodeType === "TSFunctionType" || nodeType === "TSConstructorType" || nodeType === "TSTypeReference" || nodeType === "TSTypePredicate" || nodeType === "TSTypeQuery" || nodeType === "TSTypeLiteral" || nodeType === "TSArrayType" || nodeType === "TSTupleType" || nodeType === "TSOptionalType" || nodeType === "TSRestType" || nodeType === "TSUnionType" || nodeType === "TSIntersectionType" || nodeType === "TSConditionalType" || nodeType === "TSInferType" || nodeType === "TSParenthesizedType" || nodeType === "TSTypeOperator" || nodeType === "TSIndexedAccessType" || nodeType === "TSMappedType" || nodeType === "TSLiteralType" || nodeType === "TSExpressionWithTypeArguments" || nodeType === "TSImportType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isTSBaseType(node, opts) { if (!node) return false; const nodeType = node.type; if (nodeType === "TSAnyKeyword" || nodeType === "TSBooleanKeyword" || nodeType === "TSBigIntKeyword" || nodeType === "TSIntrinsicKeyword" || nodeType === "TSNeverKeyword" || nodeType === "TSNullKeyword" || nodeType === "TSNumberKeyword" || nodeType === "TSObjectKeyword" || nodeType === "TSStringKeyword" || nodeType === "TSSymbolKeyword" || nodeType === "TSUndefinedKeyword" || nodeType === "TSUnknownKeyword" || nodeType === "TSVoidKeyword" || nodeType === "TSThisType" || nodeType === "TSLiteralType") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isNumberLiteral(node, opts) { console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); if (!node) return false; const nodeType = node.type; if (nodeType === "NumberLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isRegexLiteral(node, opts) { console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); if (!node) return false; const nodeType = node.type; if (nodeType === "RegexLiteral") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isRestProperty(node, opts) { console.trace("The node type RestProperty has been renamed to RestElement"); if (!node) return false; const nodeType = node.type; if (nodeType === "RestProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } function isSpreadProperty(node, opts) { console.trace("The node type SpreadProperty has been renamed to SpreadElement"); if (!node) return false; const nodeType = node.type; if (nodeType === "SpreadProperty") { if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } return false; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/validators/matchesPattern.js var require_matchesPattern3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/validators/matchesPattern.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = matchesPattern; var _generated = require_generated11(); function matchesPattern(member, match, allowPartial) { if (!(0, _generated.isMemberExpression)(member)) return false; const parts = Array.isArray(match) ? match : match.split("."); const nodes = []; let node; for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) { nodes.push(node.property); } nodes.push(node); if (nodes.length < parts.length) return false; if (!allowPartial && nodes.length > parts.length) return false; for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) { const node2 = nodes[j]; let value; if ((0, _generated.isIdentifier)(node2)) { value = node2.name; } else if ((0, _generated.isStringLiteral)(node2)) { value = node2.value; } else if ((0, _generated.isThisExpression)(node2)) { value = "this"; } else { return false; } if (parts[i] !== value) return false; } return true; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js var require_buildMatchMemberExpression3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = buildMatchMemberExpression; var _matchesPattern = require_matchesPattern3(); function buildMatchMemberExpression(match, allowPartial) { const parts = match.split("."); return (member) => (0, _matchesPattern.default)(member, parts, allowPartial); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/validators/react/isReactComponent.js var require_isReactComponent3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/validators/react/isReactComponent.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var _buildMatchMemberExpression = require_buildMatchMemberExpression3(); var isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component"); var _default = isReactComponent; exports2.default = _default; } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/validators/react/isCompatTag.js var require_isCompatTag3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/validators/react/isCompatTag.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isCompatTag; function isCompatTag(tagName) { return !!tagName && /^[a-z]/.test(tagName); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isType.js var require_isType3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isType.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isType; var _definitions = require_definitions3(); function isType(nodeType, targetType) { if (nodeType === targetType) return true; if (_definitions.ALIAS_KEYS[targetType]) return false; const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType]; if (aliases) { if (aliases[0] === nodeType) return true; for (const alias of aliases) { if (nodeType === alias) return true; } } return false; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isPlaceholderType.js var require_isPlaceholderType3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isPlaceholderType.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isPlaceholderType; var _definitions = require_definitions3(); function isPlaceholderType(placeholderType, targetType) { if (placeholderType === targetType) return true; const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType]; if (aliases) { for (const alias of aliases) { if (targetType === alias) return true; } } return false; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/validators/is.js var require_is3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/validators/is.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = is; var _shallowEqual = require_shallowEqual3(); var _isType = require_isType3(); var _isPlaceholderType = require_isPlaceholderType3(); var _definitions = require_definitions3(); function is(type, node, opts) { if (!node) return false; const matches = (0, _isType.default)(node.type, type); if (!matches) { if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) { return (0, _isPlaceholderType.default)(node.expectedNode, type); } return false; } if (typeof opts === "undefined") { return true; } else { return (0, _shallowEqual.default)(node, opts); } } } }); // node_modules/@babel/generator/node_modules/@babel/helper-validator-identifier/lib/identifier.js var require_identifier3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isIdentifierChar = isIdentifierChar; exports2.isIdentifierName = isIdentifierName; exports2.isIdentifierStart = isIdentifierStart; var nonASCIIidentifierStartChars = "\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"; var nonASCIIidentifierChars = "\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\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-\u0ECD\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\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\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"; var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; var astralIdentifierStartCodes = [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, 85, 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, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 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, 46, 2, 18, 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, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 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, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938]; var astralIdentifierCodes = [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, 154, 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, 161, 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, 19306, 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, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; function isInAstralSet(code, set) { let pos = 65536; for (let i = 0, length = set.length; i < length; i += 2) { pos += set[i]; if (pos > code) return false; pos += set[i + 1]; if (pos >= code) return true; } return false; } function isIdentifierStart(code) { if (code < 65) return code === 36; if (code <= 90) return true; if (code < 97) return code === 95; if (code <= 122) return true; if (code <= 65535) { return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code)); } return isInAstralSet(code, astralIdentifierStartCodes); } function isIdentifierChar(code) { if (code < 48) return code === 36; if (code < 58) return true; if (code < 65) return false; if (code <= 90) return true; if (code < 97) return code === 95; if (code <= 122) return true; if (code <= 65535) { return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code)); } return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); } function isIdentifierName(name) { let isFirst = true; for (let i = 0; i < name.length; i++) { let cp = name.charCodeAt(i); if ((cp & 64512) === 55296 && i + 1 < name.length) { const trail = name.charCodeAt(++i); if ((trail & 64512) === 56320) { cp = 65536 + ((cp & 1023) << 10) + (trail & 1023); } } if (isFirst) { isFirst = false; if (!isIdentifierStart(cp)) { return false; } } else if (!isIdentifierChar(cp)) { return false; } } return !isFirst; } } }); // node_modules/@babel/generator/node_modules/@babel/helper-validator-identifier/lib/keyword.js var require_keyword3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isKeyword = isKeyword; exports2.isReservedWord = isReservedWord; exports2.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord; exports2.isStrictBindReservedWord = isStrictBindReservedWord; exports2.isStrictReservedWord = isStrictReservedWord; var reservedWords = { 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"] }; var keywords = new Set(reservedWords.keyword); var reservedWordsStrictSet = new Set(reservedWords.strict); var reservedWordsStrictBindSet = new Set(reservedWords.strictBind); function isReservedWord(word, inModule) { return inModule && word === "await" || word === "enum"; } function isStrictReservedWord(word, inModule) { return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); } function isStrictBindOnlyReservedWord(word) { return reservedWordsStrictBindSet.has(word); } function isStrictBindReservedWord(word, inModule) { return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); } function isKeyword(word) { return keywords.has(word); } } }); // node_modules/@babel/generator/node_modules/@babel/helper-validator-identifier/lib/index.js var require_lib8 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "isIdentifierChar", { enumerable: true, get: function() { return _identifier.isIdentifierChar; } }); Object.defineProperty(exports2, "isIdentifierName", { enumerable: true, get: function() { return _identifier.isIdentifierName; } }); Object.defineProperty(exports2, "isIdentifierStart", { enumerable: true, get: function() { return _identifier.isIdentifierStart; } }); Object.defineProperty(exports2, "isKeyword", { enumerable: true, get: function() { return _keyword.isKeyword; } }); Object.defineProperty(exports2, "isReservedWord", { enumerable: true, get: function() { return _keyword.isReservedWord; } }); Object.defineProperty(exports2, "isStrictBindOnlyReservedWord", { enumerable: true, get: function() { return _keyword.isStrictBindOnlyReservedWord; } }); Object.defineProperty(exports2, "isStrictBindReservedWord", { enumerable: true, get: function() { return _keyword.isStrictBindReservedWord; } }); Object.defineProperty(exports2, "isStrictReservedWord", { enumerable: true, get: function() { return _keyword.isStrictReservedWord; } }); var _identifier = require_identifier3(); var _keyword = require_keyword3(); } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isValidIdentifier.js var require_isValidIdentifier3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isValidIdentifier.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isValidIdentifier; var _helperValidatorIdentifier = require_lib8(); function isValidIdentifier(name, reserved = true) { if (typeof name !== "string") return false; if (reserved) { if ((0, _helperValidatorIdentifier.isKeyword)(name) || (0, _helperValidatorIdentifier.isStrictReservedWord)(name, true)) { return false; } } return (0, _helperValidatorIdentifier.isIdentifierName)(name); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/constants/index.js var require_constants4 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/constants/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UPDATE_OPERATORS = exports2.UNARY_OPERATORS = exports2.STRING_UNARY_OPERATORS = exports2.STATEMENT_OR_BLOCK_KEYS = exports2.NUMBER_UNARY_OPERATORS = exports2.NUMBER_BINARY_OPERATORS = exports2.NOT_LOCAL_BINDING = exports2.LOGICAL_OPERATORS = exports2.INHERIT_KEYS = exports2.FOR_INIT_KEYS = exports2.FLATTENABLE_KEYS = exports2.EQUALITY_BINARY_OPERATORS = exports2.COMPARISON_BINARY_OPERATORS = exports2.COMMENT_KEYS = exports2.BOOLEAN_UNARY_OPERATORS = exports2.BOOLEAN_NUMBER_BINARY_OPERATORS = exports2.BOOLEAN_BINARY_OPERATORS = exports2.BLOCK_SCOPED_SYMBOL = exports2.BINARY_OPERATORS = exports2.ASSIGNMENT_OPERATORS = void 0; var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"]; exports2.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS; var FLATTENABLE_KEYS = ["body", "expressions"]; exports2.FLATTENABLE_KEYS = FLATTENABLE_KEYS; var FOR_INIT_KEYS = ["left", "init"]; exports2.FOR_INIT_KEYS = FOR_INIT_KEYS; var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"]; exports2.COMMENT_KEYS = COMMENT_KEYS; var LOGICAL_OPERATORS = ["||", "&&", "??"]; exports2.LOGICAL_OPERATORS = LOGICAL_OPERATORS; var UPDATE_OPERATORS = ["++", "--"]; exports2.UPDATE_OPERATORS = UPDATE_OPERATORS; var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="]; exports2.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS; var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="]; exports2.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS; var COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"]; exports2.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS; var BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS]; exports2.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS; var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"]; exports2.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS; var BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS]; exports2.BINARY_OPERATORS = BINARY_OPERATORS; var ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map((op) => op + "="), ...LOGICAL_OPERATORS.map((op) => op + "=")]; exports2.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS; var BOOLEAN_UNARY_OPERATORS = ["delete", "!"]; exports2.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS; var NUMBER_UNARY_OPERATORS = ["+", "-", "~"]; exports2.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS; var STRING_UNARY_OPERATORS = ["typeof"]; exports2.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS; var UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS]; exports2.UNARY_OPERATORS = UNARY_OPERATORS; var INHERIT_KEYS = { optional: ["typeAnnotation", "typeParameters", "returnType"], force: ["start", "loc", "end"] }; exports2.INHERIT_KEYS = INHERIT_KEYS; var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped"); exports2.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL; var NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding"); exports2.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING; } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/validators/validate.js var require_validate3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/validators/validate.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = validate; exports2.validateChild = validateChild; exports2.validateField = validateField; var _definitions = require_definitions3(); function validate(node, key, val) { if (!node) return; const fields = _definitions.NODE_FIELDS[node.type]; if (!fields) return; const field = fields[key]; validateField(node, key, val, field); validateChild(node, key, val); } function validateField(node, key, val, field) { if (!(field != null && field.validate)) return; if (field.optional && val == null) return; field.validate(node, key, val); } function validateChild(node, key, val) { if (val == null) return; const validate2 = _definitions.NODE_PARENT_VALIDATIONS[val.type]; if (!validate2) return; validate2(node, key, val); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/definitions/utils.js var require_utils5 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/definitions/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.VISITOR_KEYS = exports2.NODE_PARENT_VALIDATIONS = exports2.NODE_FIELDS = exports2.FLIPPED_ALIAS_KEYS = exports2.DEPRECATED_KEYS = exports2.BUILDER_KEYS = exports2.ALIAS_KEYS = void 0; exports2.arrayOf = arrayOf; exports2.arrayOfType = arrayOfType; exports2.assertEach = assertEach; exports2.assertNodeOrValueType = assertNodeOrValueType; exports2.assertNodeType = assertNodeType; exports2.assertOneOf = assertOneOf; exports2.assertOptionalChainStart = assertOptionalChainStart; exports2.assertShape = assertShape; exports2.assertValueType = assertValueType; exports2.chain = chain; exports2.default = defineType; exports2.defineAliasedType = defineAliasedType; exports2.typeIs = typeIs; exports2.validate = validate; exports2.validateArrayOfType = validateArrayOfType; exports2.validateOptional = validateOptional; exports2.validateOptionalType = validateOptionalType; exports2.validateType = validateType; var _is = require_is3(); var _validate = require_validate3(); var VISITOR_KEYS = {}; exports2.VISITOR_KEYS = VISITOR_KEYS; var ALIAS_KEYS = {}; exports2.ALIAS_KEYS = ALIAS_KEYS; var FLIPPED_ALIAS_KEYS = {}; exports2.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS; var NODE_FIELDS = {}; exports2.NODE_FIELDS = NODE_FIELDS; var BUILDER_KEYS = {}; exports2.BUILDER_KEYS = BUILDER_KEYS; var DEPRECATED_KEYS = {}; exports2.DEPRECATED_KEYS = DEPRECATED_KEYS; var NODE_PARENT_VALIDATIONS = {}; exports2.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS; function getType(val) { if (Array.isArray(val)) { return "array"; } else if (val === null) { return "null"; } else { return typeof val; } } function validate(validate2) { return { validate: validate2 }; } function typeIs(typeName) { return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName); } function validateType(typeName) { return validate(typeIs(typeName)); } function validateOptional(validate2) { return { validate: validate2, optional: true }; } function validateOptionalType(typeName) { return { validate: typeIs(typeName), optional: true }; } function arrayOf(elementType) { return chain(assertValueType("array"), assertEach(elementType)); } function arrayOfType(typeName) { return arrayOf(typeIs(typeName)); } function validateArrayOfType(typeName) { return validate(arrayOfType(typeName)); } function assertEach(callback) { function validator(node, key, val) { if (!Array.isArray(val)) return; for (let i = 0; i < val.length; i++) { const subkey = `${key}[${i}]`; const v = val[i]; callback(node, subkey, v); if (process.env.BABEL_TYPES_8_BREAKING) (0, _validate.validateChild)(node, subkey, v); } } validator.each = callback; return validator; } function assertOneOf(...values) { function validate2(node, key, val) { if (values.indexOf(val) < 0) { throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`); } } validate2.oneOf = values; return validate2; } function assertNodeType(...types) { function validate2(node, key, val) { for (const type of types) { if ((0, _is.default)(type, val)) { (0, _validate.validateChild)(node, key, val); return; } } throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`); } validate2.oneOfNodeTypes = types; return validate2; } function assertNodeOrValueType(...types) { function validate2(node, key, val) { for (const type of types) { if (getType(val) === type || (0, _is.default)(type, val)) { (0, _validate.validateChild)(node, key, val); return; } } throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`); } validate2.oneOfNodeOrValueTypes = types; return validate2; } function assertValueType(type) { function validate2(node, key, val) { const valid = getType(val) === type; if (!valid) { throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`); } } validate2.type = type; return validate2; } function assertShape(shape) { function validate2(node, key, val) { const errors = []; for (const property of Object.keys(shape)) { try { (0, _validate.validateField)(node, property, val[property], shape[property]); } catch (error) { if (error instanceof TypeError) { errors.push(error.message); continue; } throw error; } } if (errors.length) { throw new TypeError(`Property ${key} of ${node.type} expected to have the following: ${errors.join("\n")}`); } } validate2.shapeOf = shape; return validate2; } function assertOptionalChainStart() { function validate2(node) { var _current; let current = node; while (node) { const { type } = current; if (type === "OptionalCallExpression") { if (current.optional) return; current = current.callee; continue; } if (type === "OptionalMemberExpression") { if (current.optional) return; current = current.object; continue; } break; } throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current) == null ? void 0 : _current.type}`); } return validate2; } function chain(...fns) { function validate2(...args) { for (const fn of fns) { fn(...args); } } validate2.chainOf = fns; if (fns.length >= 2 && "type" in fns[0] && fns[0].type === "array" && !("each" in fns[1])) { throw new Error(`An assertValueType("array") validator can only be followed by an assertEach(...) validator.`); } return validate2; } var validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"]; var validFieldKeys = ["default", "optional", "validate"]; function defineAliasedType(...aliases) { return (type, opts = {}) => { let defined = opts.aliases; if (!defined) { var _store$opts$inherits$, _defined; if (opts.inherits) defined = (_store$opts$inherits$ = store[opts.inherits].aliases) == null ? void 0 : _store$opts$inherits$.slice(); (_defined = defined) != null ? _defined : defined = []; opts.aliases = defined; } const additional = aliases.filter((a) => !defined.includes(a)); defined.unshift(...additional); return defineType(type, opts); }; } function defineType(type, opts = {}) { const inherits = opts.inherits && store[opts.inherits] || {}; let fields = opts.fields; if (!fields) { fields = {}; if (inherits.fields) { const keys = Object.getOwnPropertyNames(inherits.fields); for (const key of keys) { const field = inherits.fields[key]; const def = field.default; if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") { throw new Error("field defaults can only be primitives or empty arrays currently"); } fields[key] = { default: Array.isArray(def) ? [] : def, optional: field.optional, validate: field.validate }; } } } const visitor = opts.visitor || inherits.visitor || []; const aliases = opts.aliases || inherits.aliases || []; const builder = opts.builder || inherits.builder || opts.visitor || []; for (const k of Object.keys(opts)) { if (validTypeOpts.indexOf(k) === -1) { throw new Error(`Unknown type option "${k}" on ${type}`); } } if (opts.deprecatedAlias) { DEPRECATED_KEYS[opts.deprecatedAlias] = type; } for (const key of visitor.concat(builder)) { fields[key] = fields[key] || {}; } for (const key of Object.keys(fields)) { const field = fields[key]; if (field.default !== void 0 && builder.indexOf(key) === -1) { field.optional = true; } if (field.default === void 0) { field.default = null; } else if (!field.validate && field.default != null) { field.validate = assertValueType(getType(field.default)); } for (const k of Object.keys(field)) { if (validFieldKeys.indexOf(k) === -1) { throw new Error(`Unknown field key "${k}" on ${type}.${key}`); } } } VISITOR_KEYS[type] = opts.visitor = visitor; BUILDER_KEYS[type] = opts.builder = builder; NODE_FIELDS[type] = opts.fields = fields; ALIAS_KEYS[type] = opts.aliases = aliases; aliases.forEach((alias) => { FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || []; FLIPPED_ALIAS_KEYS[alias].push(type); }); if (opts.validate) { NODE_PARENT_VALIDATIONS[type] = opts.validate; } store[type] = opts; } var store = {}; } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/definitions/core.js var require_core4 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/definitions/core.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.patternLikeCommon = exports2.functionTypeAnnotationCommon = exports2.functionDeclarationCommon = exports2.functionCommon = exports2.classMethodOrPropertyCommon = exports2.classMethodOrDeclareMethodCommon = void 0; var _is = require_is3(); var _isValidIdentifier = require_isValidIdentifier3(); var _helperValidatorIdentifier = require_lib8(); var _constants = require_constants4(); var _utils = require_utils5(); var defineType = (0, _utils.defineAliasedType)("Standardized"); defineType("ArrayExpression", { fields: { elements: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))), default: !process.env.BABEL_TYPES_8_BREAKING ? [] : void 0 } }, visitor: ["elements"], aliases: ["Expression"] }); defineType("AssignmentExpression", { fields: { operator: { validate: function() { if (!process.env.BABEL_TYPES_8_BREAKING) { return (0, _utils.assertValueType)("string"); } const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS); const pattern = (0, _utils.assertOneOf)("="); return function(node, key, val) { const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier; validator(node, key, val); }; }() }, left: { validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern") }, right: { validate: (0, _utils.assertNodeType)("Expression") } }, builder: ["operator", "left", "right"], visitor: ["left", "right"], aliases: ["Expression"] }); defineType("BinaryExpression", { builder: ["operator", "left", "right"], fields: { operator: { validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS) }, left: { validate: function() { const expression = (0, _utils.assertNodeType)("Expression"); const inOp = (0, _utils.assertNodeType)("Expression", "PrivateName"); const validator = function(node, key, val) { const validator2 = node.operator === "in" ? inOp : expression; validator2(node, key, val); }; validator.oneOfNodeTypes = ["Expression", "PrivateName"]; return validator; }() }, right: { validate: (0, _utils.assertNodeType)("Expression") } }, visitor: ["left", "right"], aliases: ["Binary", "Expression"] }); defineType("InterpreterDirective", { builder: ["value"], fields: { value: { validate: (0, _utils.assertValueType)("string") } } }); defineType("Directive", { visitor: ["value"], fields: { value: { validate: (0, _utils.assertNodeType)("DirectiveLiteral") } } }); defineType("DirectiveLiteral", { builder: ["value"], fields: { value: { validate: (0, _utils.assertValueType)("string") } } }); defineType("BlockStatement", { builder: ["body", "directives"], visitor: ["directives", "body"], fields: { directives: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), default: [] }, body: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) } }, aliases: ["Scopable", "BlockParent", "Block", "Statement"] }); defineType("BreakStatement", { visitor: ["label"], fields: { label: { validate: (0, _utils.assertNodeType)("Identifier"), optional: true } }, aliases: ["Statement", "Terminatorless", "CompletionStatement"] }); defineType("CallExpression", { visitor: ["callee", "arguments", "typeParameters", "typeArguments"], builder: ["callee", "arguments"], aliases: ["Expression"], fields: Object.assign({ callee: { validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier") }, arguments: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder"))) } }, !process.env.BABEL_TYPES_8_BREAKING ? { optional: { validate: (0, _utils.assertOneOf)(true, false), optional: true } } : {}, { typeArguments: { validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"), optional: true }, typeParameters: { validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"), optional: true } }) }); defineType("CatchClause", { visitor: ["param", "body"], fields: { param: { validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"), optional: true }, body: { validate: (0, _utils.assertNodeType)("BlockStatement") } }, aliases: ["Scopable", "BlockParent"] }); defineType("ConditionalExpression", { visitor: ["test", "consequent", "alternate"], fields: { test: { validate: (0, _utils.assertNodeType)("Expression") }, consequent: { validate: (0, _utils.assertNodeType)("Expression") }, alternate: { validate: (0, _utils.assertNodeType)("Expression") } }, aliases: ["Expression", "Conditional"] }); defineType("ContinueStatement", { visitor: ["label"], fields: { label: { validate: (0, _utils.assertNodeType)("Identifier"), optional: true } }, aliases: ["Statement", "Terminatorless", "CompletionStatement"] }); defineType("DebuggerStatement", { aliases: ["Statement"] }); defineType("DoWhileStatement", { visitor: ["test", "body"], fields: { test: { validate: (0, _utils.assertNodeType)("Expression") }, body: { validate: (0, _utils.assertNodeType)("Statement") } }, aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"] }); defineType("EmptyStatement", { aliases: ["Statement"] }); defineType("ExpressionStatement", { visitor: ["expression"], fields: { expression: { validate: (0, _utils.assertNodeType)("Expression") } }, aliases: ["Statement", "ExpressionWrapper"] }); defineType("File", { builder: ["program", "comments", "tokens"], visitor: ["program"], fields: { program: { validate: (0, _utils.assertNodeType)("Program") }, comments: { validate: !process.env.BABEL_TYPES_8_BREAKING ? Object.assign(() => { }, { each: { oneOfNodeTypes: ["CommentBlock", "CommentLine"] } }) : (0, _utils.assertEach)((0, _utils.assertNodeType)("CommentBlock", "CommentLine")), optional: true }, tokens: { validate: (0, _utils.assertEach)(Object.assign(() => { }, { type: "any" })), optional: true } } }); defineType("ForInStatement", { visitor: ["left", "right", "body"], aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], fields: { left: { validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern") }, right: { validate: (0, _utils.assertNodeType)("Expression") }, body: { validate: (0, _utils.assertNodeType)("Statement") } } }); defineType("ForStatement", { visitor: ["init", "test", "update", "body"], aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"], fields: { init: { validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"), optional: true }, test: { validate: (0, _utils.assertNodeType)("Expression"), optional: true }, update: { validate: (0, _utils.assertNodeType)("Expression"), optional: true }, body: { validate: (0, _utils.assertNodeType)("Statement") } } }); var functionCommon = { params: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement"))) }, generator: { default: false }, async: { default: false } }; exports2.functionCommon = functionCommon; var functionTypeAnnotationCommon = { returnType: { validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), optional: true }, typeParameters: { validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), optional: true } }; exports2.functionTypeAnnotationCommon = functionTypeAnnotationCommon; var functionDeclarationCommon = Object.assign({}, functionCommon, { declare: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, id: { validate: (0, _utils.assertNodeType)("Identifier"), optional: true } }); exports2.functionDeclarationCommon = functionDeclarationCommon; defineType("FunctionDeclaration", { builder: ["id", "params", "body", "generator", "async"], visitor: ["id", "params", "body", "returnType", "typeParameters"], fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, { body: { validate: (0, _utils.assertNodeType)("BlockStatement") } }), aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"], validate: function() { if (!process.env.BABEL_TYPES_8_BREAKING) return () => { }; const identifier = (0, _utils.assertNodeType)("Identifier"); return function(parent, key, node) { if (!(0, _is.default)("ExportDefaultDeclaration", parent)) { identifier(node, "id", node.id); } }; }() }); defineType("FunctionExpression", { inherits: "FunctionDeclaration", aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, { id: { validate: (0, _utils.assertNodeType)("Identifier"), optional: true }, body: { validate: (0, _utils.assertNodeType)("BlockStatement") } }) }); var patternLikeCommon = { typeAnnotation: { validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))) } }; exports2.patternLikeCommon = patternLikeCommon; defineType("Identifier", { builder: ["name"], visitor: ["typeAnnotation", "decorators"], aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"], fields: Object.assign({}, patternLikeCommon, { name: { validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (!(0, _isValidIdentifier.default)(val, false)) { throw new TypeError(`"${val}" is not a valid identifier name`); } }, { type: "string" })) }, optional: { validate: (0, _utils.assertValueType)("boolean"), optional: true } }), validate(parent, key, node) { if (!process.env.BABEL_TYPES_8_BREAKING) return; const match = /\.(\w+)$/.exec(key); if (!match) return; const [, parentKey] = match; const nonComp = { computed: false }; if (parentKey === "property") { if ((0, _is.default)("MemberExpression", parent, nonComp)) return; if ((0, _is.default)("OptionalMemberExpression", parent, nonComp)) return; } else if (parentKey === "key") { if ((0, _is.default)("Property", parent, nonComp)) return; if ((0, _is.default)("Method", parent, nonComp)) return; } else if (parentKey === "exported") { if ((0, _is.default)("ExportSpecifier", parent)) return; } else if (parentKey === "imported") { if ((0, _is.default)("ImportSpecifier", parent, { imported: node })) return; } else if (parentKey === "meta") { if ((0, _is.default)("MetaProperty", parent, { meta: node })) return; } if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name, false)) && node.name !== "this") { throw new TypeError(`"${node.name}" is not a valid identifier`); } } }); defineType("IfStatement", { visitor: ["test", "consequent", "alternate"], aliases: ["Statement", "Conditional"], fields: { test: { validate: (0, _utils.assertNodeType)("Expression") }, consequent: { validate: (0, _utils.assertNodeType)("Statement") }, alternate: { optional: true, validate: (0, _utils.assertNodeType)("Statement") } } }); defineType("LabeledStatement", { visitor: ["label", "body"], aliases: ["Statement"], fields: { label: { validate: (0, _utils.assertNodeType)("Identifier") }, body: { validate: (0, _utils.assertNodeType)("Statement") } } }); defineType("StringLiteral", { builder: ["value"], fields: { value: { validate: (0, _utils.assertValueType)("string") } }, aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); defineType("NumericLiteral", { builder: ["value"], deprecatedAlias: "NumberLiteral", fields: { value: { validate: (0, _utils.assertValueType)("number") } }, aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); defineType("NullLiteral", { aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); defineType("BooleanLiteral", { builder: ["value"], fields: { value: { validate: (0, _utils.assertValueType)("boolean") } }, aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); defineType("RegExpLiteral", { builder: ["pattern", "flags"], deprecatedAlias: "RegexLiteral", aliases: ["Expression", "Pureish", "Literal"], fields: { pattern: { validate: (0, _utils.assertValueType)("string") }, flags: { validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; const invalid = /[^gimsuy]/.exec(val); if (invalid) { throw new TypeError(`"${invalid[0]}" is not a valid RegExp flag`); } }, { type: "string" })), default: "" } } }); defineType("LogicalExpression", { builder: ["operator", "left", "right"], visitor: ["left", "right"], aliases: ["Binary", "Expression"], fields: { operator: { validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS) }, left: { validate: (0, _utils.assertNodeType)("Expression") }, right: { validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("MemberExpression", { builder: ["object", "property", "computed", ...!process.env.BABEL_TYPES_8_BREAKING ? ["optional"] : []], visitor: ["object", "property"], aliases: ["Expression", "LVal"], fields: Object.assign({ object: { validate: (0, _utils.assertNodeType)("Expression") }, property: { validate: function() { const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName"); const computed = (0, _utils.assertNodeType)("Expression"); const validator = function(node, key, val) { const validator2 = node.computed ? computed : normal; validator2(node, key, val); }; validator.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"]; return validator; }() }, computed: { default: false } }, !process.env.BABEL_TYPES_8_BREAKING ? { optional: { validate: (0, _utils.assertOneOf)(true, false), optional: true } } : {}) }); defineType("NewExpression", { inherits: "CallExpression" }); defineType("Program", { visitor: ["directives", "body"], builder: ["body", "directives", "sourceType", "interpreter"], fields: { sourceFile: { validate: (0, _utils.assertValueType)("string") }, sourceType: { validate: (0, _utils.assertOneOf)("script", "module"), default: "script" }, interpreter: { validate: (0, _utils.assertNodeType)("InterpreterDirective"), default: null, optional: true }, directives: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), default: [] }, body: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) } }, aliases: ["Scopable", "BlockParent", "Block"] }); defineType("ObjectExpression", { visitor: ["properties"], aliases: ["Expression"], fields: { properties: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement"))) } } }); defineType("ObjectMethod", { builder: ["kind", "key", "params", "body", "computed", "generator", "async"], fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, { kind: Object.assign({ validate: (0, _utils.assertOneOf)("method", "get", "set") }, !process.env.BABEL_TYPES_8_BREAKING ? { default: "method" } : {}), computed: { default: false }, key: { validate: function() { const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); const computed = (0, _utils.assertNodeType)("Expression"); const validator = function(node, key, val) { const validator2 = node.computed ? computed : normal; validator2(node, key, val); }; validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"]; return validator; }() }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true }, body: { validate: (0, _utils.assertNodeType)("BlockStatement") } }), visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"] }); defineType("ObjectProperty", { builder: ["key", "value", "computed", "shorthand", ...!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : []], fields: { computed: { default: false }, key: { validate: function() { const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); const computed = (0, _utils.assertNodeType)("Expression"); const validator = function(node, key, val) { const validator2 = node.computed ? computed : normal; validator2(node, key, val); }; validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"]; return validator; }() }, value: { validate: (0, _utils.assertNodeType)("Expression", "PatternLike") }, shorthand: { validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (val && node.computed) { throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true"); } }, { type: "boolean" }), function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (val && !(0, _is.default)("Identifier", node.key)) { throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier"); } }), default: false }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true } }, visitor: ["key", "value", "decorators"], aliases: ["UserWhitespacable", "Property", "ObjectMember"], validate: function() { const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern"); const expression = (0, _utils.assertNodeType)("Expression"); return function(parent, key, node) { if (!process.env.BABEL_TYPES_8_BREAKING) return; const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression; validator(node, "value", node.value); }; }() }); defineType("RestElement", { visitor: ["argument", "typeAnnotation"], builder: ["argument"], aliases: ["LVal", "PatternLike"], deprecatedAlias: "RestProperty", fields: Object.assign({}, patternLikeCommon, { argument: { validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern", "MemberExpression") }, optional: { validate: (0, _utils.assertValueType)("boolean"), optional: true } }), validate(parent, key) { if (!process.env.BABEL_TYPES_8_BREAKING) return; const match = /(\w+)\[(\d+)\]/.exec(key); if (!match) throw new Error("Internal Babel error: malformed key."); const [, listKey, index] = match; if (parent[listKey].length > index + 1) { throw new TypeError(`RestElement must be last element of ${listKey}`); } } }); defineType("ReturnStatement", { visitor: ["argument"], aliases: ["Statement", "Terminatorless", "CompletionStatement"], fields: { argument: { validate: (0, _utils.assertNodeType)("Expression"), optional: true } } }); defineType("SequenceExpression", { visitor: ["expressions"], fields: { expressions: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression"))) } }, aliases: ["Expression"] }); defineType("ParenthesizedExpression", { visitor: ["expression"], aliases: ["Expression", "ExpressionWrapper"], fields: { expression: { validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("SwitchCase", { visitor: ["test", "consequent"], fields: { test: { validate: (0, _utils.assertNodeType)("Expression"), optional: true }, consequent: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) } } }); defineType("SwitchStatement", { visitor: ["discriminant", "cases"], aliases: ["Statement", "BlockParent", "Scopable"], fields: { discriminant: { validate: (0, _utils.assertNodeType)("Expression") }, cases: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase"))) } } }); defineType("ThisExpression", { aliases: ["Expression"] }); defineType("ThrowStatement", { visitor: ["argument"], aliases: ["Statement", "Terminatorless", "CompletionStatement"], fields: { argument: { validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("TryStatement", { visitor: ["block", "handler", "finalizer"], aliases: ["Statement"], fields: { block: { validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), Object.assign(function(node) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (!node.handler && !node.finalizer) { throw new TypeError("TryStatement expects either a handler or finalizer, or both"); } }, { oneOfNodeTypes: ["BlockStatement"] })) }, handler: { optional: true, validate: (0, _utils.assertNodeType)("CatchClause") }, finalizer: { optional: true, validate: (0, _utils.assertNodeType)("BlockStatement") } } }); defineType("UnaryExpression", { builder: ["operator", "argument", "prefix"], fields: { prefix: { default: true }, argument: { validate: (0, _utils.assertNodeType)("Expression") }, operator: { validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS) } }, visitor: ["argument"], aliases: ["UnaryLike", "Expression"] }); defineType("UpdateExpression", { builder: ["operator", "argument", "prefix"], fields: { prefix: { default: false }, argument: { validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression") }, operator: { validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS) } }, visitor: ["argument"], aliases: ["Expression"] }); defineType("VariableDeclaration", { builder: ["kind", "declarations"], visitor: ["declarations"], aliases: ["Statement", "Declaration"], fields: { declare: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, kind: { validate: (0, _utils.assertOneOf)("var", "let", "const") }, declarations: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator"))) } }, validate(parent, key, node) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (!(0, _is.default)("ForXStatement", parent, { left: node })) return; if (node.declarations.length !== 1) { throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`); } } }); defineType("VariableDeclarator", { visitor: ["id", "init"], fields: { id: { validate: function() { if (!process.env.BABEL_TYPES_8_BREAKING) { return (0, _utils.assertNodeType)("LVal"); } const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"); const without = (0, _utils.assertNodeType)("Identifier"); return function(node, key, val) { const validator = node.init ? normal : without; validator(node, key, val); }; }() }, definite: { optional: true, validate: (0, _utils.assertValueType)("boolean") }, init: { optional: true, validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("WhileStatement", { visitor: ["test", "body"], aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"], fields: { test: { validate: (0, _utils.assertNodeType)("Expression") }, body: { validate: (0, _utils.assertNodeType)("Statement") } } }); defineType("WithStatement", { visitor: ["object", "body"], aliases: ["Statement"], fields: { object: { validate: (0, _utils.assertNodeType)("Expression") }, body: { validate: (0, _utils.assertNodeType)("Statement") } } }); defineType("AssignmentPattern", { visitor: ["left", "right", "decorators"], builder: ["left", "right"], aliases: ["Pattern", "PatternLike", "LVal"], fields: Object.assign({}, patternLikeCommon, { left: { validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression") }, right: { validate: (0, _utils.assertNodeType)("Expression") }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true } }) }); defineType("ArrayPattern", { visitor: ["elements", "typeAnnotation"], builder: ["elements"], aliases: ["Pattern", "PatternLike", "LVal"], fields: Object.assign({}, patternLikeCommon, { elements: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike"))) }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true }, optional: { validate: (0, _utils.assertValueType)("boolean"), optional: true } }) }); defineType("ArrowFunctionExpression", { builder: ["params", "body", "async"], visitor: ["params", "body", "returnType", "typeParameters"], aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, { expression: { validate: (0, _utils.assertValueType)("boolean") }, body: { validate: (0, _utils.assertNodeType)("BlockStatement", "Expression") } }) }); defineType("ClassBody", { visitor: ["body"], fields: { body: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "ClassAccessorProperty", "TSDeclareMethod", "TSIndexSignature", "StaticBlock"))) } } }); defineType("ClassExpression", { builder: ["id", "superClass", "body", "decorators"], visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"], aliases: ["Scopable", "Class", "Expression"], fields: { id: { validate: (0, _utils.assertNodeType)("Identifier"), optional: true }, typeParameters: { validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), optional: true }, body: { validate: (0, _utils.assertNodeType)("ClassBody") }, superClass: { optional: true, validate: (0, _utils.assertNodeType)("Expression") }, superTypeParameters: { validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), optional: true }, implements: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true }, mixins: { validate: (0, _utils.assertNodeType)("InterfaceExtends"), optional: true } } }); defineType("ClassDeclaration", { inherits: "ClassExpression", aliases: ["Scopable", "Class", "Statement", "Declaration"], fields: { id: { validate: (0, _utils.assertNodeType)("Identifier") }, typeParameters: { validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), optional: true }, body: { validate: (0, _utils.assertNodeType)("ClassBody") }, superClass: { optional: true, validate: (0, _utils.assertNodeType)("Expression") }, superTypeParameters: { validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), optional: true }, implements: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true }, mixins: { validate: (0, _utils.assertNodeType)("InterfaceExtends"), optional: true }, declare: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, abstract: { validate: (0, _utils.assertValueType)("boolean"), optional: true } }, validate: function() { const identifier = (0, _utils.assertNodeType)("Identifier"); return function(parent, key, node) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (!(0, _is.default)("ExportDefaultDeclaration", parent)) { identifier(node, "id", node.id); } }; }() }); defineType("ExportAllDeclaration", { visitor: ["source"], aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], fields: { source: { validate: (0, _utils.assertNodeType)("StringLiteral") }, exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")), assertions: { optional: true, validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute"))) } } }); defineType("ExportDefaultDeclaration", { visitor: ["declaration"], aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], fields: { declaration: { validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression") }, exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("value")) } }); defineType("ExportNamedDeclaration", { visitor: ["declaration", "specifiers", "source"], aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], fields: { declaration: { optional: true, validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), Object.assign(function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (val && node.specifiers.length) { throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration"); } }, { oneOfNodeTypes: ["Declaration"] }), function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (val && node.source) { throw new TypeError("Cannot export a declaration from a source"); } }) }, assertions: { optional: true, validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute"))) }, specifiers: { default: [], validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function() { const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier"); const sourceless = (0, _utils.assertNodeType)("ExportSpecifier"); if (!process.env.BABEL_TYPES_8_BREAKING) return sourced; return function(node, key, val) { const validator = node.source ? sourced : sourceless; validator(node, key, val); }; }())) }, source: { validate: (0, _utils.assertNodeType)("StringLiteral"), optional: true }, exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")) } }); defineType("ExportSpecifier", { visitor: ["local", "exported"], aliases: ["ModuleSpecifier"], fields: { local: { validate: (0, _utils.assertNodeType)("Identifier") }, exported: { validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral") }, exportKind: { validate: (0, _utils.assertOneOf)("type", "value"), optional: true } } }); defineType("ForOfStatement", { visitor: ["left", "right", "body"], builder: ["left", "right", "body", "await"], aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], fields: { left: { validate: function() { if (!process.env.BABEL_TYPES_8_BREAKING) { return (0, _utils.assertNodeType)("VariableDeclaration", "LVal"); } const declaration = (0, _utils.assertNodeType)("VariableDeclaration"); const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern"); return function(node, key, val) { if ((0, _is.default)("VariableDeclaration", val)) { declaration(node, key, val); } else { lval(node, key, val); } }; }() }, right: { validate: (0, _utils.assertNodeType)("Expression") }, body: { validate: (0, _utils.assertNodeType)("Statement") }, await: { default: false } } }); defineType("ImportDeclaration", { visitor: ["specifiers", "source"], aliases: ["Statement", "Declaration", "ModuleDeclaration"], fields: { assertions: { optional: true, validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute"))) }, specifiers: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier"))) }, source: { validate: (0, _utils.assertNodeType)("StringLiteral") }, importKind: { validate: (0, _utils.assertOneOf)("type", "typeof", "value"), optional: true } } }); defineType("ImportDefaultSpecifier", { visitor: ["local"], aliases: ["ModuleSpecifier"], fields: { local: { validate: (0, _utils.assertNodeType)("Identifier") } } }); defineType("ImportNamespaceSpecifier", { visitor: ["local"], aliases: ["ModuleSpecifier"], fields: { local: { validate: (0, _utils.assertNodeType)("Identifier") } } }); defineType("ImportSpecifier", { visitor: ["local", "imported"], aliases: ["ModuleSpecifier"], fields: { local: { validate: (0, _utils.assertNodeType)("Identifier") }, imported: { validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral") }, importKind: { validate: (0, _utils.assertOneOf)("type", "typeof", "value"), optional: true } } }); defineType("MetaProperty", { visitor: ["meta", "property"], aliases: ["Expression"], fields: { meta: { validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), Object.assign(function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; let property; switch (val.name) { case "function": property = "sent"; break; case "new": property = "target"; break; case "import": property = "meta"; break; } if (!(0, _is.default)("Identifier", node.property, { name: property })) { throw new TypeError("Unrecognised MetaProperty"); } }, { oneOfNodeTypes: ["Identifier"] })) }, property: { validate: (0, _utils.assertNodeType)("Identifier") } } }); var classMethodOrPropertyCommon = { abstract: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, accessibility: { validate: (0, _utils.assertOneOf)("public", "private", "protected"), optional: true }, static: { default: false }, override: { default: false }, computed: { default: false }, optional: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, key: { validate: (0, _utils.chain)(function() { const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); const computed = (0, _utils.assertNodeType)("Expression"); return function(node, key, val) { const validator = node.computed ? computed : normal; validator(node, key, val); }; }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression")) } }; exports2.classMethodOrPropertyCommon = classMethodOrPropertyCommon; var classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, { params: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty"))) }, kind: { validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"), default: "method" }, access: { validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true } }); exports2.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon; defineType("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({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, { body: { validate: (0, _utils.assertNodeType)("BlockStatement") } }) }); defineType("ObjectPattern", { visitor: ["properties", "typeAnnotation", "decorators"], builder: ["properties"], aliases: ["Pattern", "PatternLike", "LVal"], fields: Object.assign({}, patternLikeCommon, { properties: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty"))) } }) }); defineType("SpreadElement", { visitor: ["argument"], aliases: ["UnaryLike"], deprecatedAlias: "SpreadProperty", fields: { argument: { validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("Super", { aliases: ["Expression"] }); defineType("TaggedTemplateExpression", { visitor: ["tag", "quasi", "typeParameters"], builder: ["tag", "quasi"], aliases: ["Expression"], fields: { tag: { validate: (0, _utils.assertNodeType)("Expression") }, quasi: { validate: (0, _utils.assertNodeType)("TemplateLiteral") }, typeParameters: { validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), optional: true } } }); defineType("TemplateElement", { builder: ["value", "tail"], fields: { value: { validate: (0, _utils.assertShape)({ raw: { validate: (0, _utils.assertValueType)("string") }, cooked: { validate: (0, _utils.assertValueType)("string"), optional: true } }) }, tail: { default: false } } }); defineType("TemplateLiteral", { visitor: ["quasis", "expressions"], aliases: ["Expression", "Literal"], fields: { quasis: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement"))) }, expressions: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "TSType")), function(node, key, val) { if (node.quasis.length !== val.length + 1) { throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions. Expected ${val.length + 1} quasis but got ${node.quasis.length}`); } }) } } }); defineType("YieldExpression", { builder: ["argument", "delegate"], visitor: ["argument"], aliases: ["Expression", "Terminatorless"], fields: { delegate: { validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function(node, key, val) { if (!process.env.BABEL_TYPES_8_BREAKING) return; if (val && !node.argument) { throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument"); } }, { type: "boolean" })), default: false }, argument: { optional: true, validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("AwaitExpression", { builder: ["argument"], visitor: ["argument"], aliases: ["Expression", "Terminatorless"], fields: { argument: { validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("Import", { aliases: ["Expression"] }); defineType("BigIntLiteral", { builder: ["value"], fields: { value: { validate: (0, _utils.assertValueType)("string") } }, aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); defineType("ExportNamespaceSpecifier", { visitor: ["exported"], aliases: ["ModuleSpecifier"], fields: { exported: { validate: (0, _utils.assertNodeType)("Identifier") } } }); defineType("OptionalMemberExpression", { builder: ["object", "property", "computed", "optional"], visitor: ["object", "property"], aliases: ["Expression"], fields: { object: { validate: (0, _utils.assertNodeType)("Expression") }, property: { validate: function() { const normal = (0, _utils.assertNodeType)("Identifier"); const computed = (0, _utils.assertNodeType)("Expression"); const validator = function(node, key, val) { const validator2 = node.computed ? computed : normal; validator2(node, key, val); }; validator.oneOfNodeTypes = ["Expression", "Identifier"]; return validator; }() }, computed: { default: false }, optional: { validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)()) } } }); defineType("OptionalCallExpression", { visitor: ["callee", "arguments", "typeParameters", "typeArguments"], builder: ["callee", "arguments", "optional"], aliases: ["Expression"], fields: { callee: { validate: (0, _utils.assertNodeType)("Expression") }, arguments: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder"))) }, optional: { validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)()) }, typeArguments: { validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"), optional: true }, typeParameters: { validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"), optional: true } } }); defineType("ClassProperty", { visitor: ["key", "value", "typeAnnotation", "decorators"], builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"], aliases: ["Property"], fields: Object.assign({}, classMethodOrPropertyCommon, { value: { validate: (0, _utils.assertNodeType)("Expression"), optional: true }, definite: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, typeAnnotation: { validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true }, readonly: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, declare: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, variance: { validate: (0, _utils.assertNodeType)("Variance"), optional: true } }) }); defineType("ClassAccessorProperty", { visitor: ["key", "value", "typeAnnotation", "decorators"], builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"], aliases: ["Property", "Accessor"], fields: Object.assign({}, classMethodOrPropertyCommon, { key: { validate: (0, _utils.chain)(function() { const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "PrivateName"); const computed = (0, _utils.assertNodeType)("Expression"); return function(node, key, val) { const validator = node.computed ? computed : normal; validator(node, key, val); }; }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression", "PrivateName")) }, value: { validate: (0, _utils.assertNodeType)("Expression"), optional: true }, definite: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, typeAnnotation: { validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true }, readonly: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, declare: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, variance: { validate: (0, _utils.assertNodeType)("Variance"), optional: true } }) }); defineType("ClassPrivateProperty", { visitor: ["key", "value", "decorators", "typeAnnotation"], builder: ["key", "value", "decorators", "static"], aliases: ["Property", "Private"], fields: { key: { validate: (0, _utils.assertNodeType)("PrivateName") }, value: { validate: (0, _utils.assertNodeType)("Expression"), optional: true }, typeAnnotation: { validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true }, readonly: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, definite: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, variance: { validate: (0, _utils.assertNodeType)("Variance"), optional: true } } }); defineType("ClassPrivateMethod", { builder: ["kind", "key", "params", "body", "static"], visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"], fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, { key: { validate: (0, _utils.assertNodeType)("PrivateName") }, body: { validate: (0, _utils.assertNodeType)("BlockStatement") } }) }); defineType("PrivateName", { visitor: ["id"], aliases: ["Private"], fields: { id: { validate: (0, _utils.assertNodeType)("Identifier") } } }); defineType("StaticBlock", { visitor: ["body"], fields: { body: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) } }, aliases: ["Scopable", "BlockParent", "FunctionParent"] }); } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/definitions/flow.js var require_flow3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/definitions/flow.js"() { "use strict"; var _utils = require_utils5(); var defineType = (0, _utils.defineAliasedType)("Flow"); var defineInterfaceishType = (name, typeParameterType = "TypeParameterDeclaration") => { defineType(name, { builder: ["id", "typeParameters", "extends", "body"], visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)(typeParameterType), extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")), body: (0, _utils.validateType)("ObjectTypeAnnotation") } }); }; defineType("AnyTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("ArrayTypeAnnotation", { visitor: ["elementType"], aliases: ["FlowType"], fields: { elementType: (0, _utils.validateType)("FlowType") } }); defineType("BooleanTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("BooleanLiteralTypeAnnotation", { builder: ["value"], aliases: ["FlowType"], fields: { value: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("NullLiteralTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("ClassImplements", { visitor: ["id", "typeParameters"], fields: { id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") } }); defineInterfaceishType("DeclareClass"); defineType("DeclareFunction", { visitor: ["id"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)("Identifier"), predicate: (0, _utils.validateOptionalType)("DeclaredPredicate") } }); defineInterfaceishType("DeclareInterface"); defineType("DeclareModule", { builder: ["id", "body", "kind"], visitor: ["id", "body"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), body: (0, _utils.validateType)("BlockStatement"), kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES")) } }); defineType("DeclareModuleExports", { visitor: ["typeAnnotation"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { typeAnnotation: (0, _utils.validateType)("TypeAnnotation") } }); defineType("DeclareTypeAlias", { visitor: ["id", "typeParameters", "right"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), right: (0, _utils.validateType)("FlowType") } }); defineType("DeclareOpaqueType", { visitor: ["id", "typeParameters", "supertype"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), supertype: (0, _utils.validateOptionalType)("FlowType"), impltype: (0, _utils.validateOptionalType)("FlowType") } }); defineType("DeclareVariable", { visitor: ["id"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)("Identifier") } }); defineType("DeclareExportDeclaration", { visitor: ["declaration", "specifiers", "source"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { declaration: (0, _utils.validateOptionalType)("Flow"), specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])), source: (0, _utils.validateOptionalType)("StringLiteral"), default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) } }); defineType("DeclareExportAllDeclaration", { visitor: ["source"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { source: (0, _utils.validateType)("StringLiteral"), exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")) } }); defineType("DeclaredPredicate", { visitor: ["value"], aliases: ["FlowPredicate"], fields: { value: (0, _utils.validateType)("Flow") } }); defineType("ExistsTypeAnnotation", { aliases: ["FlowType"] }); defineType("FunctionTypeAnnotation", { visitor: ["typeParameters", "params", "rest", "returnType"], aliases: ["FlowType"], fields: { typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")), rest: (0, _utils.validateOptionalType)("FunctionTypeParam"), this: (0, _utils.validateOptionalType)("FunctionTypeParam"), returnType: (0, _utils.validateType)("FlowType") } }); defineType("FunctionTypeParam", { visitor: ["name", "typeAnnotation"], fields: { name: (0, _utils.validateOptionalType)("Identifier"), typeAnnotation: (0, _utils.validateType)("FlowType"), optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) } }); defineType("GenericTypeAnnotation", { visitor: ["id", "typeParameters"], aliases: ["FlowType"], fields: { id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]), typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") } }); defineType("InferredPredicate", { aliases: ["FlowPredicate"] }); defineType("InterfaceExtends", { visitor: ["id", "typeParameters"], fields: { id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]), typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") } }); defineInterfaceishType("InterfaceDeclaration"); defineType("InterfaceTypeAnnotation", { visitor: ["extends", "body"], aliases: ["FlowType"], fields: { extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), body: (0, _utils.validateType)("ObjectTypeAnnotation") } }); defineType("IntersectionTypeAnnotation", { visitor: ["types"], aliases: ["FlowType"], fields: { types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) } }); defineType("MixedTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("EmptyTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("NullableTypeAnnotation", { visitor: ["typeAnnotation"], aliases: ["FlowType"], fields: { typeAnnotation: (0, _utils.validateType)("FlowType") } }); defineType("NumberLiteralTypeAnnotation", { builder: ["value"], aliases: ["FlowType"], fields: { value: (0, _utils.validate)((0, _utils.assertValueType)("number")) } }); defineType("NumberTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("ObjectTypeAnnotation", { visitor: ["properties", "indexers", "callProperties", "internalSlots"], aliases: ["FlowType"], builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"], fields: { properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])), indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")), callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")), internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")), exact: { validate: (0, _utils.assertValueType)("boolean"), default: false }, inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) } }); defineType("ObjectTypeInternalSlot", { visitor: ["id", "value", "optional", "static", "method"], aliases: ["UserWhitespacable"], fields: { id: (0, _utils.validateType)("Identifier"), value: (0, _utils.validateType)("FlowType"), optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), method: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("ObjectTypeCallProperty", { visitor: ["value"], aliases: ["UserWhitespacable"], fields: { value: (0, _utils.validateType)("FlowType"), static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("ObjectTypeIndexer", { visitor: ["id", "key", "value", "variance"], aliases: ["UserWhitespacable"], fields: { id: (0, _utils.validateOptionalType)("Identifier"), key: (0, _utils.validateType)("FlowType"), value: (0, _utils.validateType)("FlowType"), static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), variance: (0, _utils.validateOptionalType)("Variance") } }); defineType("ObjectTypeProperty", { visitor: ["key", "value", "variance"], aliases: ["UserWhitespacable"], fields: { key: (0, _utils.validateType)(["Identifier", "StringLiteral"]), value: (0, _utils.validateType)("FlowType"), kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")), static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), variance: (0, _utils.validateOptionalType)("Variance"), method: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("ObjectTypeSpreadProperty", { visitor: ["argument"], aliases: ["UserWhitespacable"], fields: { argument: (0, _utils.validateType)("FlowType") } }); defineType("OpaqueType", { visitor: ["id", "typeParameters", "supertype", "impltype"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), supertype: (0, _utils.validateOptionalType)("FlowType"), impltype: (0, _utils.validateType)("FlowType") } }); defineType("QualifiedTypeIdentifier", { visitor: ["id", "qualification"], fields: { id: (0, _utils.validateType)("Identifier"), qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]) } }); defineType("StringLiteralTypeAnnotation", { builder: ["value"], aliases: ["FlowType"], fields: { value: (0, _utils.validate)((0, _utils.assertValueType)("string")) } }); defineType("StringTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("SymbolTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("ThisTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("TupleTypeAnnotation", { visitor: ["types"], aliases: ["FlowType"], fields: { types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) } }); defineType("TypeofTypeAnnotation", { visitor: ["argument"], aliases: ["FlowType"], fields: { argument: (0, _utils.validateType)("FlowType") } }); defineType("TypeAlias", { visitor: ["id", "typeParameters", "right"], aliases: ["FlowDeclaration", "Statement", "Declaration"], fields: { id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), right: (0, _utils.validateType)("FlowType") } }); defineType("TypeAnnotation", { visitor: ["typeAnnotation"], fields: { typeAnnotation: (0, _utils.validateType)("FlowType") } }); defineType("TypeCastExpression", { visitor: ["expression", "typeAnnotation"], aliases: ["ExpressionWrapper", "Expression"], fields: { expression: (0, _utils.validateType)("Expression"), typeAnnotation: (0, _utils.validateType)("TypeAnnotation") } }); defineType("TypeParameter", { visitor: ["bound", "default", "variance"], fields: { name: (0, _utils.validate)((0, _utils.assertValueType)("string")), bound: (0, _utils.validateOptionalType)("TypeAnnotation"), default: (0, _utils.validateOptionalType)("FlowType"), variance: (0, _utils.validateOptionalType)("Variance") } }); defineType("TypeParameterDeclaration", { visitor: ["params"], fields: { params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter")) } }); defineType("TypeParameterInstantiation", { visitor: ["params"], fields: { params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) } }); defineType("UnionTypeAnnotation", { visitor: ["types"], aliases: ["FlowType"], fields: { types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) } }); defineType("Variance", { builder: ["kind"], fields: { kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus")) } }); defineType("VoidTypeAnnotation", { aliases: ["FlowType", "FlowBaseAnnotation"] }); defineType("EnumDeclaration", { aliases: ["Statement", "Declaration"], visitor: ["id", "body"], fields: { id: (0, _utils.validateType)("Identifier"), body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"]) } }); defineType("EnumBooleanBody", { aliases: ["EnumBody"], visitor: ["members"], fields: { explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), members: (0, _utils.validateArrayOfType)("EnumBooleanMember"), hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("EnumNumberBody", { aliases: ["EnumBody"], visitor: ["members"], fields: { explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), members: (0, _utils.validateArrayOfType)("EnumNumberMember"), hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("EnumStringBody", { aliases: ["EnumBody"], visitor: ["members"], fields: { explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"]), hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("EnumSymbolBody", { aliases: ["EnumBody"], visitor: ["members"], fields: { members: (0, _utils.validateArrayOfType)("EnumDefaultedMember"), hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); defineType("EnumBooleanMember", { aliases: ["EnumMember"], visitor: ["id"], fields: { id: (0, _utils.validateType)("Identifier"), init: (0, _utils.validateType)("BooleanLiteral") } }); defineType("EnumNumberMember", { aliases: ["EnumMember"], visitor: ["id", "init"], fields: { id: (0, _utils.validateType)("Identifier"), init: (0, _utils.validateType)("NumericLiteral") } }); defineType("EnumStringMember", { aliases: ["EnumMember"], visitor: ["id", "init"], fields: { id: (0, _utils.validateType)("Identifier"), init: (0, _utils.validateType)("StringLiteral") } }); defineType("EnumDefaultedMember", { aliases: ["EnumMember"], visitor: ["id"], fields: { id: (0, _utils.validateType)("Identifier") } }); defineType("IndexedAccessType", { visitor: ["objectType", "indexType"], aliases: ["FlowType"], fields: { objectType: (0, _utils.validateType)("FlowType"), indexType: (0, _utils.validateType)("FlowType") } }); defineType("OptionalIndexedAccessType", { visitor: ["objectType", "indexType"], aliases: ["FlowType"], fields: { objectType: (0, _utils.validateType)("FlowType"), indexType: (0, _utils.validateType)("FlowType"), optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) } }); } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/definitions/jsx.js var require_jsx3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/definitions/jsx.js"() { "use strict"; var _utils = require_utils5(); var defineType = (0, _utils.defineAliasedType)("JSX"); defineType("JSXAttribute", { visitor: ["name", "value"], aliases: ["Immutable"], fields: { name: { validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName") }, value: { optional: true, validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer") } } }); defineType("JSXClosingElement", { visitor: ["name"], aliases: ["Immutable"], fields: { name: { validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName") } } }); defineType("JSXElement", { builder: ["openingElement", "closingElement", "children", "selfClosing"], visitor: ["openingElement", "children", "closingElement"], aliases: ["Immutable", "Expression"], fields: { openingElement: { validate: (0, _utils.assertNodeType)("JSXOpeningElement") }, closingElement: { optional: true, validate: (0, _utils.assertNodeType)("JSXClosingElement") }, children: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) }, selfClosing: { validate: (0, _utils.assertValueType)("boolean"), optional: true } } }); defineType("JSXEmptyExpression", {}); defineType("JSXExpressionContainer", { visitor: ["expression"], aliases: ["Immutable"], fields: { expression: { validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression") } } }); defineType("JSXSpreadChild", { visitor: ["expression"], aliases: ["Immutable"], fields: { expression: { validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("JSXIdentifier", { builder: ["name"], fields: { name: { validate: (0, _utils.assertValueType)("string") } } }); defineType("JSXMemberExpression", { visitor: ["object", "property"], fields: { object: { validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier") }, property: { validate: (0, _utils.assertNodeType)("JSXIdentifier") } } }); defineType("JSXNamespacedName", { visitor: ["namespace", "name"], fields: { namespace: { validate: (0, _utils.assertNodeType)("JSXIdentifier") }, name: { validate: (0, _utils.assertNodeType)("JSXIdentifier") } } }); defineType("JSXOpeningElement", { builder: ["name", "attributes", "selfClosing"], visitor: ["name", "attributes"], aliases: ["Immutable"], fields: { name: { validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName") }, selfClosing: { default: false }, attributes: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute"))) }, typeParameters: { validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), optional: true } } }); defineType("JSXSpreadAttribute", { visitor: ["argument"], fields: { argument: { validate: (0, _utils.assertNodeType)("Expression") } } }); defineType("JSXText", { aliases: ["Immutable"], builder: ["value"], fields: { value: { validate: (0, _utils.assertValueType)("string") } } }); defineType("JSXFragment", { builder: ["openingFragment", "closingFragment", "children"], visitor: ["openingFragment", "children", "closingFragment"], aliases: ["Immutable", "Expression"], fields: { openingFragment: { validate: (0, _utils.assertNodeType)("JSXOpeningFragment") }, closingFragment: { validate: (0, _utils.assertNodeType)("JSXClosingFragment") }, children: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) } } }); defineType("JSXOpeningFragment", { aliases: ["Immutable"] }); defineType("JSXClosingFragment", { aliases: ["Immutable"] }); } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/definitions/placeholders.js var require_placeholders3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/definitions/placeholders.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.PLACEHOLDERS_FLIPPED_ALIAS = exports2.PLACEHOLDERS_ALIAS = exports2.PLACEHOLDERS = void 0; var _utils = require_utils5(); var PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"]; exports2.PLACEHOLDERS = PLACEHOLDERS; var PLACEHOLDERS_ALIAS = { Declaration: ["Statement"], Pattern: ["PatternLike", "LVal"] }; exports2.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS; for (const type of PLACEHOLDERS) { const alias = _utils.ALIAS_KEYS[type]; if (alias != null && alias.length) PLACEHOLDERS_ALIAS[type] = alias; } var PLACEHOLDERS_FLIPPED_ALIAS = {}; exports2.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS; Object.keys(PLACEHOLDERS_ALIAS).forEach((type) => { PLACEHOLDERS_ALIAS[type].forEach((alias) => { if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) { PLACEHOLDERS_FLIPPED_ALIAS[alias] = []; } PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type); }); }); } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/definitions/misc.js var require_misc3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/definitions/misc.js"() { "use strict"; var _utils = require_utils5(); var _placeholders = require_placeholders3(); var defineType = (0, _utils.defineAliasedType)("Miscellaneous"); { defineType("Noop", { visitor: [] }); } defineType("Placeholder", { visitor: [], builder: ["expectedNode", "name"], fields: { name: { validate: (0, _utils.assertNodeType)("Identifier") }, expectedNode: { validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS) } } }); defineType("V8IntrinsicIdentifier", { builder: ["name"], fields: { name: { validate: (0, _utils.assertValueType)("string") } } }); } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/definitions/experimental.js var require_experimental3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/definitions/experimental.js"() { "use strict"; var _utils = require_utils5(); (0, _utils.default)("ArgumentPlaceholder", {}); (0, _utils.default)("BindExpression", { visitor: ["object", "callee"], aliases: ["Expression"], fields: !process.env.BABEL_TYPES_8_BREAKING ? { object: { validate: Object.assign(() => { }, { oneOfNodeTypes: ["Expression"] }) }, callee: { validate: Object.assign(() => { }, { oneOfNodeTypes: ["Expression"] }) } } : { object: { validate: (0, _utils.assertNodeType)("Expression") }, callee: { validate: (0, _utils.assertNodeType)("Expression") } } }); (0, _utils.default)("ImportAttribute", { visitor: ["key", "value"], fields: { key: { validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral") }, value: { validate: (0, _utils.assertNodeType)("StringLiteral") } } }); (0, _utils.default)("Decorator", { visitor: ["expression"], fields: { expression: { validate: (0, _utils.assertNodeType)("Expression") } } }); (0, _utils.default)("DoExpression", { visitor: ["body"], builder: ["body", "async"], aliases: ["Expression"], fields: { body: { validate: (0, _utils.assertNodeType)("BlockStatement") }, async: { validate: (0, _utils.assertValueType)("boolean"), default: false } } }); (0, _utils.default)("ExportDefaultSpecifier", { visitor: ["exported"], aliases: ["ModuleSpecifier"], fields: { exported: { validate: (0, _utils.assertNodeType)("Identifier") } } }); (0, _utils.default)("RecordExpression", { visitor: ["properties"], aliases: ["Expression"], fields: { properties: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "SpreadElement"))) } } }); (0, _utils.default)("TupleExpression", { fields: { elements: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement"))), default: [] } }, visitor: ["elements"], aliases: ["Expression"] }); (0, _utils.default)("DecimalLiteral", { builder: ["value"], fields: { value: { validate: (0, _utils.assertValueType)("string") } }, aliases: ["Expression", "Pureish", "Literal", "Immutable"] }); (0, _utils.default)("ModuleExpression", { visitor: ["body"], fields: { body: { validate: (0, _utils.assertNodeType)("Program") } }, aliases: ["Expression"] }); (0, _utils.default)("TopicReference", { aliases: ["Expression"] }); (0, _utils.default)("PipelineTopicExpression", { builder: ["expression"], visitor: ["expression"], fields: { expression: { validate: (0, _utils.assertNodeType)("Expression") } }, aliases: ["Expression"] }); (0, _utils.default)("PipelineBareFunction", { builder: ["callee"], visitor: ["callee"], fields: { callee: { validate: (0, _utils.assertNodeType)("Expression") } }, aliases: ["Expression"] }); (0, _utils.default)("PipelinePrimaryTopicReference", { aliases: ["Expression"] }); } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/definitions/typescript.js var require_typescript3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/definitions/typescript.js"() { "use strict"; var _utils = require_utils5(); var _core = require_core4(); var _is = require_is3(); var defineType = (0, _utils.defineAliasedType)("TypeScript"); var bool = (0, _utils.assertValueType)("boolean"); var tSFunctionTypeAnnotationCommon = { returnType: { validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"), optional: true }, typeParameters: { validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"), optional: true } }; defineType("TSParameterProperty", { aliases: ["LVal"], visitor: ["parameter"], fields: { accessibility: { validate: (0, _utils.assertOneOf)("public", "private", "protected"), optional: true }, readonly: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, parameter: { validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern") }, override: { validate: (0, _utils.assertValueType)("boolean"), optional: true }, decorators: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), optional: true } } }); defineType("TSDeclareFunction", { aliases: ["Statement", "Declaration"], visitor: ["id", "typeParameters", "params", "returnType"], fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon) }); defineType("TSDeclareMethod", { visitor: ["decorators", "key", "typeParameters", "params", "returnType"], fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon) }); defineType("TSQualifiedName", { aliases: ["TSEntityName"], visitor: ["left", "right"], fields: { left: (0, _utils.validateType)("TSEntityName"), right: (0, _utils.validateType)("Identifier") } }); var signatureDeclarationCommon = { typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), ["parameters"]: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]), ["typeAnnotation"]: (0, _utils.validateOptionalType)("TSTypeAnnotation") }; var callConstructSignatureDeclaration = { aliases: ["TSTypeElement"], visitor: ["typeParameters", "parameters", "typeAnnotation"], fields: signatureDeclarationCommon }; defineType("TSCallSignatureDeclaration", callConstructSignatureDeclaration); defineType("TSConstructSignatureDeclaration", callConstructSignatureDeclaration); var namedTypeElementCommon = { key: (0, _utils.validateType)("Expression"), computed: (0, _utils.validate)(bool), optional: (0, _utils.validateOptional)(bool) }; defineType("TSPropertySignature", { aliases: ["TSTypeElement"], visitor: ["key", "typeAnnotation", "initializer"], fields: Object.assign({}, namedTypeElementCommon, { readonly: (0, _utils.validateOptional)(bool), typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"), initializer: (0, _utils.validateOptionalType)("Expression"), kind: { validate: (0, _utils.assertOneOf)("get", "set") } }) }); defineType("TSMethodSignature", { aliases: ["TSTypeElement"], visitor: ["key", "typeParameters", "parameters", "typeAnnotation"], fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon, { kind: { validate: (0, _utils.assertOneOf)("method", "get", "set") } }) }); defineType("TSIndexSignature", { aliases: ["TSTypeElement"], visitor: ["parameters", "typeAnnotation"], fields: { readonly: (0, _utils.validateOptional)(bool), static: (0, _utils.validateOptional)(bool), parameters: (0, _utils.validateArrayOfType)("Identifier"), typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation") } }); var tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"]; for (const type of tsKeywordTypes) { defineType(type, { aliases: ["TSType", "TSBaseType"], visitor: [], fields: {} }); } defineType("TSThisType", { aliases: ["TSType", "TSBaseType"], visitor: [], fields: {} }); var fnOrCtrBase = { aliases: ["TSType"], visitor: ["typeParameters", "parameters", "typeAnnotation"] }; defineType("TSFunctionType", Object.assign({}, fnOrCtrBase, { fields: signatureDeclarationCommon })); defineType("TSConstructorType", Object.assign({}, fnOrCtrBase, { fields: Object.assign({}, signatureDeclarationCommon, { abstract: (0, _utils.validateOptional)(bool) }) })); defineType("TSTypeReference", { aliases: ["TSType"], visitor: ["typeName", "typeParameters"], fields: { typeName: (0, _utils.validateType)("TSEntityName"), typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") } }); defineType("TSTypePredicate", { aliases: ["TSType"], visitor: ["parameterName", "typeAnnotation"], builder: ["parameterName", "typeAnnotation", "asserts"], fields: { parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]), typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"), asserts: (0, _utils.validateOptional)(bool) } }); defineType("TSTypeQuery", { aliases: ["TSType"], visitor: ["exprName"], fields: { exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"]) } }); defineType("TSTypeLiteral", { aliases: ["TSType"], visitor: ["members"], fields: { members: (0, _utils.validateArrayOfType)("TSTypeElement") } }); defineType("TSArrayType", { aliases: ["TSType"], visitor: ["elementType"], fields: { elementType: (0, _utils.validateType)("TSType") } }); defineType("TSTupleType", { aliases: ["TSType"], visitor: ["elementTypes"], fields: { elementTypes: (0, _utils.validateArrayOfType)(["TSType", "TSNamedTupleMember"]) } }); defineType("TSOptionalType", { aliases: ["TSType"], visitor: ["typeAnnotation"], fields: { typeAnnotation: (0, _utils.validateType)("TSType") } }); defineType("TSRestType", { aliases: ["TSType"], visitor: ["typeAnnotation"], fields: { typeAnnotation: (0, _utils.validateType)("TSType") } }); defineType("TSNamedTupleMember", { visitor: ["label", "elementType"], builder: ["label", "elementType", "optional"], fields: { label: (0, _utils.validateType)("Identifier"), optional: { validate: bool, default: false }, elementType: (0, _utils.validateType)("TSType") } }); var unionOrIntersection = { aliases: ["TSType"], visitor: ["types"], fields: { types: (0, _utils.validateArrayOfType)("TSType") } }; defineType("TSUnionType", unionOrIntersection); defineType("TSIntersectionType", unionOrIntersection); defineType("TSConditionalType", { aliases: ["TSType"], visitor: ["checkType", "extendsType", "trueType", "falseType"], fields: { checkType: (0, _utils.validateType)("TSType"), extendsType: (0, _utils.validateType)("TSType"), trueType: (0, _utils.validateType)("TSType"), falseType: (0, _utils.validateType)("TSType") } }); defineType("TSInferType", { aliases: ["TSType"], visitor: ["typeParameter"], fields: { typeParameter: (0, _utils.validateType)("TSTypeParameter") } }); defineType("TSParenthesizedType", { aliases: ["TSType"], visitor: ["typeAnnotation"], fields: { typeAnnotation: (0, _utils.validateType)("TSType") } }); defineType("TSTypeOperator", { aliases: ["TSType"], visitor: ["typeAnnotation"], fields: { operator: (0, _utils.validate)((0, _utils.assertValueType)("string")), typeAnnotation: (0, _utils.validateType)("TSType") } }); defineType("TSIndexedAccessType", { aliases: ["TSType"], visitor: ["objectType", "indexType"], fields: { objectType: (0, _utils.validateType)("TSType"), indexType: (0, _utils.validateType)("TSType") } }); defineType("TSMappedType", { aliases: ["TSType"], visitor: ["typeParameter", "typeAnnotation", "nameType"], fields: { readonly: (0, _utils.validateOptional)(bool), typeParameter: (0, _utils.validateType)("TSTypeParameter"), optional: (0, _utils.validateOptional)(bool), typeAnnotation: (0, _utils.validateOptionalType)("TSType"), nameType: (0, _utils.validateOptionalType)("TSType") } }); defineType("TSLiteralType", { aliases: ["TSType", "TSBaseType"], visitor: ["literal"], fields: { literal: { validate: function() { const unaryExpression = (0, _utils.assertNodeType)("NumericLiteral", "BigIntLiteral"); const unaryOperator = (0, _utils.assertOneOf)("-"); const literal = (0, _utils.assertNodeType)("NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral"); function validator(parent, key, node) { if ((0, _is.default)("UnaryExpression", node)) { unaryOperator(node, "operator", node.operator); unaryExpression(node, "argument", node.argument); } else { literal(parent, key, node); } } validator.oneOfNodeTypes = ["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral", "UnaryExpression"]; return validator; }() } } }); defineType("TSExpressionWithTypeArguments", { aliases: ["TSType"], visitor: ["expression", "typeParameters"], fields: { expression: (0, _utils.validateType)("TSEntityName"), typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") } }); defineType("TSInterfaceDeclaration", { aliases: ["Statement", "Declaration"], visitor: ["id", "typeParameters", "extends", "body"], fields: { declare: (0, _utils.validateOptional)(bool), id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")), body: (0, _utils.validateType)("TSInterfaceBody") } }); defineType("TSInterfaceBody", { visitor: ["body"], fields: { body: (0, _utils.validateArrayOfType)("TSTypeElement") } }); defineType("TSTypeAliasDeclaration", { aliases: ["Statement", "Declaration"], visitor: ["id", "typeParameters", "typeAnnotation"], fields: { declare: (0, _utils.validateOptional)(bool), id: (0, _utils.validateType)("Identifier"), typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), typeAnnotation: (0, _utils.validateType)("TSType") } }); defineType("TSAsExpression", { aliases: ["Expression"], visitor: ["expression", "typeAnnotation"], fields: { expression: (0, _utils.validateType)("Expression"), typeAnnotation: (0, _utils.validateType)("TSType") } }); defineType("TSTypeAssertion", { aliases: ["Expression"], visitor: ["typeAnnotation", "expression"], fields: { typeAnnotation: (0, _utils.validateType)("TSType"), expression: (0, _utils.validateType)("Expression") } }); defineType("TSEnumDeclaration", { aliases: ["Statement", "Declaration"], visitor: ["id", "members"], fields: { declare: (0, _utils.validateOptional)(bool), const: (0, _utils.validateOptional)(bool), id: (0, _utils.validateType)("Identifier"), members: (0, _utils.validateArrayOfType)("TSEnumMember"), initializer: (0, _utils.validateOptionalType)("Expression") } }); defineType("TSEnumMember", { visitor: ["id", "initializer"], fields: { id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), initializer: (0, _utils.validateOptionalType)("Expression") } }); defineType("TSModuleDeclaration", { aliases: ["Statement", "Declaration"], visitor: ["id", "body"], fields: { declare: (0, _utils.validateOptional)(bool), global: (0, _utils.validateOptional)(bool), id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"]) } }); defineType("TSModuleBlock", { aliases: ["Scopable", "Block", "BlockParent"], visitor: ["body"], fields: { body: (0, _utils.validateArrayOfType)("Statement") } }); defineType("TSImportType", { aliases: ["TSType"], visitor: ["argument", "qualifier", "typeParameters"], fields: { argument: (0, _utils.validateType)("StringLiteral"), qualifier: (0, _utils.validateOptionalType)("TSEntityName"), typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") } }); defineType("TSImportEqualsDeclaration", { aliases: ["Statement"], visitor: ["id", "moduleReference"], fields: { isExport: (0, _utils.validate)(bool), id: (0, _utils.validateType)("Identifier"), moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"]), importKind: { validate: (0, _utils.assertOneOf)("type", "value"), optional: true } } }); defineType("TSExternalModuleReference", { visitor: ["expression"], fields: { expression: (0, _utils.validateType)("StringLiteral") } }); defineType("TSNonNullExpression", { aliases: ["Expression"], visitor: ["expression"], fields: { expression: (0, _utils.validateType)("Expression") } }); defineType("TSExportAssignment", { aliases: ["Statement"], visitor: ["expression"], fields: { expression: (0, _utils.validateType)("Expression") } }); defineType("TSNamespaceExportDeclaration", { aliases: ["Statement"], visitor: ["id"], fields: { id: (0, _utils.validateType)("Identifier") } }); defineType("TSTypeAnnotation", { visitor: ["typeAnnotation"], fields: { typeAnnotation: { validate: (0, _utils.assertNodeType)("TSType") } } }); defineType("TSTypeParameterInstantiation", { visitor: ["params"], fields: { params: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType"))) } } }); defineType("TSTypeParameterDeclaration", { visitor: ["params"], fields: { params: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter"))) } } }); defineType("TSTypeParameter", { builder: ["constraint", "default", "name"], visitor: ["constraint", "default"], fields: { name: { validate: (0, _utils.assertValueType)("string") }, constraint: { validate: (0, _utils.assertNodeType)("TSType"), optional: true }, default: { validate: (0, _utils.assertNodeType)("TSType"), optional: true } } }); } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/definitions/index.js var require_definitions3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/definitions/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "ALIAS_KEYS", { enumerable: true, get: function() { return _utils.ALIAS_KEYS; } }); Object.defineProperty(exports2, "BUILDER_KEYS", { enumerable: true, get: function() { return _utils.BUILDER_KEYS; } }); Object.defineProperty(exports2, "DEPRECATED_KEYS", { enumerable: true, get: function() { return _utils.DEPRECATED_KEYS; } }); Object.defineProperty(exports2, "FLIPPED_ALIAS_KEYS", { enumerable: true, get: function() { return _utils.FLIPPED_ALIAS_KEYS; } }); Object.defineProperty(exports2, "NODE_FIELDS", { enumerable: true, get: function() { return _utils.NODE_FIELDS; } }); Object.defineProperty(exports2, "NODE_PARENT_VALIDATIONS", { enumerable: true, get: function() { return _utils.NODE_PARENT_VALIDATIONS; } }); Object.defineProperty(exports2, "PLACEHOLDERS", { enumerable: true, get: function() { return _placeholders.PLACEHOLDERS; } }); Object.defineProperty(exports2, "PLACEHOLDERS_ALIAS", { enumerable: true, get: function() { return _placeholders.PLACEHOLDERS_ALIAS; } }); Object.defineProperty(exports2, "PLACEHOLDERS_FLIPPED_ALIAS", { enumerable: true, get: function() { return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS; } }); exports2.TYPES = void 0; Object.defineProperty(exports2, "VISITOR_KEYS", { enumerable: true, get: function() { return _utils.VISITOR_KEYS; } }); var _toFastProperties = require_to_fast_properties(); require_core4(); require_flow3(); require_jsx3(); require_misc3(); require_experimental3(); require_typescript3(); var _utils = require_utils5(); var _placeholders = require_placeholders3(); _toFastProperties(_utils.VISITOR_KEYS); _toFastProperties(_utils.ALIAS_KEYS); _toFastProperties(_utils.FLIPPED_ALIAS_KEYS); _toFastProperties(_utils.NODE_FIELDS); _toFastProperties(_utils.BUILDER_KEYS); _toFastProperties(_utils.DEPRECATED_KEYS); _toFastProperties(_placeholders.PLACEHOLDERS_ALIAS); _toFastProperties(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS); var TYPES = [].concat(Object.keys(_utils.VISITOR_KEYS), Object.keys(_utils.FLIPPED_ALIAS_KEYS), Object.keys(_utils.DEPRECATED_KEYS)); exports2.TYPES = TYPES; } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/builders/builder.js var require_builder3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/builders/builder.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = builder; var _definitions = require_definitions3(); var _validate = require_validate3(); function builder() { const type = this; const keys = _definitions.BUILDER_KEYS[type]; const countArgs = arguments.length; if (countArgs > keys.length) { throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys.length}`); } const node = { type }; for (let i = 0; i < keys.length; ++i) { const key = keys[i]; const field = _definitions.NODE_FIELDS[type][key]; let arg; if (i < countArgs) arg = arguments[i]; if (arg === void 0) { arg = Array.isArray(field.default) ? [] : field.default; } node[key] = arg; } for (const key in node) { (0, _validate.default)(node, key, node[key]); } return node; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/builders/generated/index.js var require_generated12 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/builders/generated/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.anyTypeAnnotation = anyTypeAnnotation; exports2.argumentPlaceholder = argumentPlaceholder; exports2.arrayExpression = arrayExpression; exports2.arrayPattern = arrayPattern; exports2.arrayTypeAnnotation = arrayTypeAnnotation; exports2.arrowFunctionExpression = arrowFunctionExpression; exports2.assignmentExpression = assignmentExpression; exports2.assignmentPattern = assignmentPattern; exports2.awaitExpression = awaitExpression; exports2.bigIntLiteral = bigIntLiteral; exports2.binaryExpression = binaryExpression; exports2.bindExpression = bindExpression; exports2.blockStatement = blockStatement; exports2.booleanLiteral = booleanLiteral; exports2.booleanLiteralTypeAnnotation = booleanLiteralTypeAnnotation; exports2.booleanTypeAnnotation = booleanTypeAnnotation; exports2.breakStatement = breakStatement; exports2.callExpression = callExpression; exports2.catchClause = catchClause; exports2.classAccessorProperty = classAccessorProperty; exports2.classBody = classBody; exports2.classDeclaration = classDeclaration; exports2.classExpression = classExpression; exports2.classImplements = classImplements; exports2.classMethod = classMethod; exports2.classPrivateMethod = classPrivateMethod; exports2.classPrivateProperty = classPrivateProperty; exports2.classProperty = classProperty; exports2.conditionalExpression = conditionalExpression; exports2.continueStatement = continueStatement; exports2.debuggerStatement = debuggerStatement; exports2.decimalLiteral = decimalLiteral; exports2.declareClass = declareClass; exports2.declareExportAllDeclaration = declareExportAllDeclaration; exports2.declareExportDeclaration = declareExportDeclaration; exports2.declareFunction = declareFunction; exports2.declareInterface = declareInterface; exports2.declareModule = declareModule; exports2.declareModuleExports = declareModuleExports; exports2.declareOpaqueType = declareOpaqueType; exports2.declareTypeAlias = declareTypeAlias; exports2.declareVariable = declareVariable; exports2.declaredPredicate = declaredPredicate; exports2.decorator = decorator; exports2.directive = directive; exports2.directiveLiteral = directiveLiteral; exports2.doExpression = doExpression; exports2.doWhileStatement = doWhileStatement; exports2.emptyStatement = emptyStatement; exports2.emptyTypeAnnotation = emptyTypeAnnotation; exports2.enumBooleanBody = enumBooleanBody; exports2.enumBooleanMember = enumBooleanMember; exports2.enumDeclaration = enumDeclaration; exports2.enumDefaultedMember = enumDefaultedMember; exports2.enumNumberBody = enumNumberBody; exports2.enumNumberMember = enumNumberMember; exports2.enumStringBody = enumStringBody; exports2.enumStringMember = enumStringMember; exports2.enumSymbolBody = enumSymbolBody; exports2.existsTypeAnnotation = existsTypeAnnotation; exports2.exportAllDeclaration = exportAllDeclaration; exports2.exportDefaultDeclaration = exportDefaultDeclaration; exports2.exportDefaultSpecifier = exportDefaultSpecifier; exports2.exportNamedDeclaration = exportNamedDeclaration; exports2.exportNamespaceSpecifier = exportNamespaceSpecifier; exports2.exportSpecifier = exportSpecifier; exports2.expressionStatement = expressionStatement; exports2.file = file; exports2.forInStatement = forInStatement; exports2.forOfStatement = forOfStatement; exports2.forStatement = forStatement; exports2.functionDeclaration = functionDeclaration; exports2.functionExpression = functionExpression; exports2.functionTypeAnnotation = functionTypeAnnotation; exports2.functionTypeParam = functionTypeParam; exports2.genericTypeAnnotation = genericTypeAnnotation; exports2.identifier = identifier; exports2.ifStatement = ifStatement; exports2.import = _import; exports2.importAttribute = importAttribute; exports2.importDeclaration = importDeclaration; exports2.importDefaultSpecifier = importDefaultSpecifier; exports2.importNamespaceSpecifier = importNamespaceSpecifier; exports2.importSpecifier = importSpecifier; exports2.indexedAccessType = indexedAccessType; exports2.inferredPredicate = inferredPredicate; exports2.interfaceDeclaration = interfaceDeclaration; exports2.interfaceExtends = interfaceExtends; exports2.interfaceTypeAnnotation = interfaceTypeAnnotation; exports2.interpreterDirective = interpreterDirective; exports2.intersectionTypeAnnotation = intersectionTypeAnnotation; exports2.jSXAttribute = exports2.jsxAttribute = jsxAttribute; exports2.jSXClosingElement = exports2.jsxClosingElement = jsxClosingElement; exports2.jSXClosingFragment = exports2.jsxClosingFragment = jsxClosingFragment; exports2.jSXElement = exports2.jsxElement = jsxElement; exports2.jSXEmptyExpression = exports2.jsxEmptyExpression = jsxEmptyExpression; exports2.jSXExpressionContainer = exports2.jsxExpressionContainer = jsxExpressionContainer; exports2.jSXFragment = exports2.jsxFragment = jsxFragment; exports2.jSXIdentifier = exports2.jsxIdentifier = jsxIdentifier; exports2.jSXMemberExpression = exports2.jsxMemberExpression = jsxMemberExpression; exports2.jSXNamespacedName = exports2.jsxNamespacedName = jsxNamespacedName; exports2.jSXOpeningElement = exports2.jsxOpeningElement = jsxOpeningElement; exports2.jSXOpeningFragment = exports2.jsxOpeningFragment = jsxOpeningFragment; exports2.jSXSpreadAttribute = exports2.jsxSpreadAttribute = jsxSpreadAttribute; exports2.jSXSpreadChild = exports2.jsxSpreadChild = jsxSpreadChild; exports2.jSXText = exports2.jsxText = jsxText; exports2.labeledStatement = labeledStatement; exports2.logicalExpression = logicalExpression; exports2.memberExpression = memberExpression; exports2.metaProperty = metaProperty; exports2.mixedTypeAnnotation = mixedTypeAnnotation; exports2.moduleExpression = moduleExpression; exports2.newExpression = newExpression; exports2.noop = noop; exports2.nullLiteral = nullLiteral; exports2.nullLiteralTypeAnnotation = nullLiteralTypeAnnotation; exports2.nullableTypeAnnotation = nullableTypeAnnotation; exports2.numberLiteral = NumberLiteral; exports2.numberLiteralTypeAnnotation = numberLiteralTypeAnnotation; exports2.numberTypeAnnotation = numberTypeAnnotation; exports2.numericLiteral = numericLiteral; exports2.objectExpression = objectExpression; exports2.objectMethod = objectMethod; exports2.objectPattern = objectPattern; exports2.objectProperty = objectProperty; exports2.objectTypeAnnotation = objectTypeAnnotation; exports2.objectTypeCallProperty = objectTypeCallProperty; exports2.objectTypeIndexer = objectTypeIndexer; exports2.objectTypeInternalSlot = objectTypeInternalSlot; exports2.objectTypeProperty = objectTypeProperty; exports2.objectTypeSpreadProperty = objectTypeSpreadProperty; exports2.opaqueType = opaqueType; exports2.optionalCallExpression = optionalCallExpression; exports2.optionalIndexedAccessType = optionalIndexedAccessType; exports2.optionalMemberExpression = optionalMemberExpression; exports2.parenthesizedExpression = parenthesizedExpression; exports2.pipelineBareFunction = pipelineBareFunction; exports2.pipelinePrimaryTopicReference = pipelinePrimaryTopicReference; exports2.pipelineTopicExpression = pipelineTopicExpression; exports2.placeholder = placeholder; exports2.privateName = privateName; exports2.program = program; exports2.qualifiedTypeIdentifier = qualifiedTypeIdentifier; exports2.recordExpression = recordExpression; exports2.regExpLiteral = regExpLiteral; exports2.regexLiteral = RegexLiteral; exports2.restElement = restElement; exports2.restProperty = RestProperty; exports2.returnStatement = returnStatement; exports2.sequenceExpression = sequenceExpression; exports2.spreadElement = spreadElement; exports2.spreadProperty = SpreadProperty; exports2.staticBlock = staticBlock; exports2.stringLiteral = stringLiteral; exports2.stringLiteralTypeAnnotation = stringLiteralTypeAnnotation; exports2.stringTypeAnnotation = stringTypeAnnotation; exports2.super = _super; exports2.switchCase = switchCase; exports2.switchStatement = switchStatement; exports2.symbolTypeAnnotation = symbolTypeAnnotation; exports2.taggedTemplateExpression = taggedTemplateExpression; exports2.templateElement = templateElement; exports2.templateLiteral = templateLiteral; exports2.thisExpression = thisExpression; exports2.thisTypeAnnotation = thisTypeAnnotation; exports2.throwStatement = throwStatement; exports2.topicReference = topicReference; exports2.tryStatement = tryStatement; exports2.tSAnyKeyword = exports2.tsAnyKeyword = tsAnyKeyword; exports2.tSArrayType = exports2.tsArrayType = tsArrayType; exports2.tSAsExpression = exports2.tsAsExpression = tsAsExpression; exports2.tSBigIntKeyword = exports2.tsBigIntKeyword = tsBigIntKeyword; exports2.tSBooleanKeyword = exports2.tsBooleanKeyword = tsBooleanKeyword; exports2.tSCallSignatureDeclaration = exports2.tsCallSignatureDeclaration = tsCallSignatureDeclaration; exports2.tSConditionalType = exports2.tsConditionalType = tsConditionalType; exports2.tSConstructSignatureDeclaration = exports2.tsConstructSignatureDeclaration = tsConstructSignatureDeclaration; exports2.tSConstructorType = exports2.tsConstructorType = tsConstructorType; exports2.tSDeclareFunction = exports2.tsDeclareFunction = tsDeclareFunction; exports2.tSDeclareMethod = exports2.tsDeclareMethod = tsDeclareMethod; exports2.tSEnumDeclaration = exports2.tsEnumDeclaration = tsEnumDeclaration; exports2.tSEnumMember = exports2.tsEnumMember = tsEnumMember; exports2.tSExportAssignment = exports2.tsExportAssignment = tsExportAssignment; exports2.tSExpressionWithTypeArguments = exports2.tsExpressionWithTypeArguments = tsExpressionWithTypeArguments; exports2.tSExternalModuleReference = exports2.tsExternalModuleReference = tsExternalModuleReference; exports2.tSFunctionType = exports2.tsFunctionType = tsFunctionType; exports2.tSImportEqualsDeclaration = exports2.tsImportEqualsDeclaration = tsImportEqualsDeclaration; exports2.tSImportType = exports2.tsImportType = tsImportType; exports2.tSIndexSignature = exports2.tsIndexSignature = tsIndexSignature; exports2.tSIndexedAccessType = exports2.tsIndexedAccessType = tsIndexedAccessType; exports2.tSInferType = exports2.tsInferType = tsInferType; exports2.tSInterfaceBody = exports2.tsInterfaceBody = tsInterfaceBody; exports2.tSInterfaceDeclaration = exports2.tsInterfaceDeclaration = tsInterfaceDeclaration; exports2.tSIntersectionType = exports2.tsIntersectionType = tsIntersectionType; exports2.tSIntrinsicKeyword = exports2.tsIntrinsicKeyword = tsIntrinsicKeyword; exports2.tSLiteralType = exports2.tsLiteralType = tsLiteralType; exports2.tSMappedType = exports2.tsMappedType = tsMappedType; exports2.tSMethodSignature = exports2.tsMethodSignature = tsMethodSignature; exports2.tSModuleBlock = exports2.tsModuleBlock = tsModuleBlock; exports2.tSModuleDeclaration = exports2.tsModuleDeclaration = tsModuleDeclaration; exports2.tSNamedTupleMember = exports2.tsNamedTupleMember = tsNamedTupleMember; exports2.tSNamespaceExportDeclaration = exports2.tsNamespaceExportDeclaration = tsNamespaceExportDeclaration; exports2.tSNeverKeyword = exports2.tsNeverKeyword = tsNeverKeyword; exports2.tSNonNullExpression = exports2.tsNonNullExpression = tsNonNullExpression; exports2.tSNullKeyword = exports2.tsNullKeyword = tsNullKeyword; exports2.tSNumberKeyword = exports2.tsNumberKeyword = tsNumberKeyword; exports2.tSObjectKeyword = exports2.tsObjectKeyword = tsObjectKeyword; exports2.tSOptionalType = exports2.tsOptionalType = tsOptionalType; exports2.tSParameterProperty = exports2.tsParameterProperty = tsParameterProperty; exports2.tSParenthesizedType = exports2.tsParenthesizedType = tsParenthesizedType; exports2.tSPropertySignature = exports2.tsPropertySignature = tsPropertySignature; exports2.tSQualifiedName = exports2.tsQualifiedName = tsQualifiedName; exports2.tSRestType = exports2.tsRestType = tsRestType; exports2.tSStringKeyword = exports2.tsStringKeyword = tsStringKeyword; exports2.tSSymbolKeyword = exports2.tsSymbolKeyword = tsSymbolKeyword; exports2.tSThisType = exports2.tsThisType = tsThisType; exports2.tSTupleType = exports2.tsTupleType = tsTupleType; exports2.tSTypeAliasDeclaration = exports2.tsTypeAliasDeclaration = tsTypeAliasDeclaration; exports2.tSTypeAnnotation = exports2.tsTypeAnnotation = tsTypeAnnotation; exports2.tSTypeAssertion = exports2.tsTypeAssertion = tsTypeAssertion; exports2.tSTypeLiteral = exports2.tsTypeLiteral = tsTypeLiteral; exports2.tSTypeOperator = exports2.tsTypeOperator = tsTypeOperator; exports2.tSTypeParameter = exports2.tsTypeParameter = tsTypeParameter; exports2.tSTypeParameterDeclaration = exports2.tsTypeParameterDeclaration = tsTypeParameterDeclaration; exports2.tSTypeParameterInstantiation = exports2.tsTypeParameterInstantiation = tsTypeParameterInstantiation; exports2.tSTypePredicate = exports2.tsTypePredicate = tsTypePredicate; exports2.tSTypeQuery = exports2.tsTypeQuery = tsTypeQuery; exports2.tSTypeReference = exports2.tsTypeReference = tsTypeReference; exports2.tSUndefinedKeyword = exports2.tsUndefinedKeyword = tsUndefinedKeyword; exports2.tSUnionType = exports2.tsUnionType = tsUnionType; exports2.tSUnknownKeyword = exports2.tsUnknownKeyword = tsUnknownKeyword; exports2.tSVoidKeyword = exports2.tsVoidKeyword = tsVoidKeyword; exports2.tupleExpression = tupleExpression; exports2.tupleTypeAnnotation = tupleTypeAnnotation; exports2.typeAlias = typeAlias; exports2.typeAnnotation = typeAnnotation; exports2.typeCastExpression = typeCastExpression; exports2.typeParameter = typeParameter; exports2.typeParameterDeclaration = typeParameterDeclaration; exports2.typeParameterInstantiation = typeParameterInstantiation; exports2.typeofTypeAnnotation = typeofTypeAnnotation; exports2.unaryExpression = unaryExpression; exports2.unionTypeAnnotation = unionTypeAnnotation; exports2.updateExpression = updateExpression; exports2.v8IntrinsicIdentifier = v8IntrinsicIdentifier; exports2.variableDeclaration = variableDeclaration; exports2.variableDeclarator = variableDeclarator; exports2.variance = variance; exports2.voidTypeAnnotation = voidTypeAnnotation; exports2.whileStatement = whileStatement; exports2.withStatement = withStatement; exports2.yieldExpression = yieldExpression; var _builder = require_builder3(); function arrayExpression(elements) { return _builder.default.apply("ArrayExpression", arguments); } function assignmentExpression(operator, left, right) { return _builder.default.apply("AssignmentExpression", arguments); } function binaryExpression(operator, left, right) { return _builder.default.apply("BinaryExpression", arguments); } function interpreterDirective(value) { return _builder.default.apply("InterpreterDirective", arguments); } function directive(value) { return _builder.default.apply("Directive", arguments); } function directiveLiteral(value) { return _builder.default.apply("DirectiveLiteral", arguments); } function blockStatement(body, directives) { return _builder.default.apply("BlockStatement", arguments); } function breakStatement(label) { return _builder.default.apply("BreakStatement", arguments); } function callExpression(callee, _arguments) { return _builder.default.apply("CallExpression", arguments); } function catchClause(param, body) { return _builder.default.apply("CatchClause", arguments); } function conditionalExpression(test, consequent, alternate) { return _builder.default.apply("ConditionalExpression", arguments); } function continueStatement(label) { return _builder.default.apply("ContinueStatement", arguments); } function debuggerStatement() { return _builder.default.apply("DebuggerStatement", arguments); } function doWhileStatement(test, body) { return _builder.default.apply("DoWhileStatement", arguments); } function emptyStatement() { return _builder.default.apply("EmptyStatement", arguments); } function expressionStatement(expression) { return _builder.default.apply("ExpressionStatement", arguments); } function file(program2, comments, tokens) { return _builder.default.apply("File", arguments); } function forInStatement(left, right, body) { return _builder.default.apply("ForInStatement", arguments); } function forStatement(init, test, update, body) { return _builder.default.apply("ForStatement", arguments); } function functionDeclaration(id, params, body, generator, async) { return _builder.default.apply("FunctionDeclaration", arguments); } function functionExpression(id, params, body, generator, async) { return _builder.default.apply("FunctionExpression", arguments); } function identifier(name) { return _builder.default.apply("Identifier", arguments); } function ifStatement(test, consequent, alternate) { return _builder.default.apply("IfStatement", arguments); } function labeledStatement(label, body) { return _builder.default.apply("LabeledStatement", arguments); } function stringLiteral(value) { return _builder.default.apply("StringLiteral", arguments); } function numericLiteral(value) { return _builder.default.apply("NumericLiteral", arguments); } function nullLiteral() { return _builder.default.apply("NullLiteral", arguments); } function booleanLiteral(value) { return _builder.default.apply("BooleanLiteral", arguments); } function regExpLiteral(pattern, flags) { return _builder.default.apply("RegExpLiteral", arguments); } function logicalExpression(operator, left, right) { return _builder.default.apply("LogicalExpression", arguments); } function memberExpression(object, property, computed, optional) { return _builder.default.apply("MemberExpression", arguments); } function newExpression(callee, _arguments) { return _builder.default.apply("NewExpression", arguments); } function program(body, directives, sourceType, interpreter) { return _builder.default.apply("Program", arguments); } function objectExpression(properties) { return _builder.default.apply("ObjectExpression", arguments); } function objectMethod(kind, key, params, body, computed, generator, async) { return _builder.default.apply("ObjectMethod", arguments); } function objectProperty(key, value, computed, shorthand, decorators) { return _builder.default.apply("ObjectProperty", arguments); } function restElement(argument) { return _builder.default.apply("RestElement", arguments); } function returnStatement(argument) { return _builder.default.apply("ReturnStatement", arguments); } function sequenceExpression(expressions) { return _builder.default.apply("SequenceExpression", arguments); } function parenthesizedExpression(expression) { return _builder.default.apply("ParenthesizedExpression", arguments); } function switchCase(test, consequent) { return _builder.default.apply("SwitchCase", arguments); } function switchStatement(discriminant, cases) { return _builder.default.apply("SwitchStatement", arguments); } function thisExpression() { return _builder.default.apply("ThisExpression", arguments); } function throwStatement(argument) { return _builder.default.apply("ThrowStatement", arguments); } function tryStatement(block, handler, finalizer) { return _builder.default.apply("TryStatement", arguments); } function unaryExpression(operator, argument, prefix) { return _builder.default.apply("UnaryExpression", arguments); } function updateExpression(operator, argument, prefix) { return _builder.default.apply("UpdateExpression", arguments); } function variableDeclaration(kind, declarations) { return _builder.default.apply("VariableDeclaration", arguments); } function variableDeclarator(id, init) { return _builder.default.apply("VariableDeclarator", arguments); } function whileStatement(test, body) { return _builder.default.apply("WhileStatement", arguments); } function withStatement(object, body) { return _builder.default.apply("WithStatement", arguments); } function assignmentPattern(left, right) { return _builder.default.apply("AssignmentPattern", arguments); } function arrayPattern(elements) { return _builder.default.apply("ArrayPattern", arguments); } function arrowFunctionExpression(params, body, async) { return _builder.default.apply("ArrowFunctionExpression", arguments); } function classBody(body) { return _builder.default.apply("ClassBody", arguments); } function classExpression(id, superClass, body, decorators) { return _builder.default.apply("ClassExpression", arguments); } function classDeclaration(id, superClass, body, decorators) { return _builder.default.apply("ClassDeclaration", arguments); } function exportAllDeclaration(source) { return _builder.default.apply("ExportAllDeclaration", arguments); } function exportDefaultDeclaration(declaration) { return _builder.default.apply("ExportDefaultDeclaration", arguments); } function exportNamedDeclaration(declaration, specifiers, source) { return _builder.default.apply("ExportNamedDeclaration", arguments); } function exportSpecifier(local, exported) { return _builder.default.apply("ExportSpecifier", arguments); } function forOfStatement(left, right, body, _await) { return _builder.default.apply("ForOfStatement", arguments); } function importDeclaration(specifiers, source) { return _builder.default.apply("ImportDeclaration", arguments); } function importDefaultSpecifier(local) { return _builder.default.apply("ImportDefaultSpecifier", arguments); } function importNamespaceSpecifier(local) { return _builder.default.apply("ImportNamespaceSpecifier", arguments); } function importSpecifier(local, imported) { return _builder.default.apply("ImportSpecifier", arguments); } function metaProperty(meta, property) { return _builder.default.apply("MetaProperty", arguments); } function classMethod(kind, key, params, body, computed, _static, generator, async) { return _builder.default.apply("ClassMethod", arguments); } function objectPattern(properties) { return _builder.default.apply("ObjectPattern", arguments); } function spreadElement(argument) { return _builder.default.apply("SpreadElement", arguments); } function _super() { return _builder.default.apply("Super", arguments); } function taggedTemplateExpression(tag, quasi) { return _builder.default.apply("TaggedTemplateExpression", arguments); } function templateElement(value, tail) { return _builder.default.apply("TemplateElement", arguments); } function templateLiteral(quasis, expressions) { return _builder.default.apply("TemplateLiteral", arguments); } function yieldExpression(argument, delegate) { return _builder.default.apply("YieldExpression", arguments); } function awaitExpression(argument) { return _builder.default.apply("AwaitExpression", arguments); } function _import() { return _builder.default.apply("Import", arguments); } function bigIntLiteral(value) { return _builder.default.apply("BigIntLiteral", arguments); } function exportNamespaceSpecifier(exported) { return _builder.default.apply("ExportNamespaceSpecifier", arguments); } function optionalMemberExpression(object, property, computed, optional) { return _builder.default.apply("OptionalMemberExpression", arguments); } function optionalCallExpression(callee, _arguments, optional) { return _builder.default.apply("OptionalCallExpression", arguments); } function classProperty(key, value, typeAnnotation2, decorators, computed, _static) { return _builder.default.apply("ClassProperty", arguments); } function classAccessorProperty(key, value, typeAnnotation2, decorators, computed, _static) { return _builder.default.apply("ClassAccessorProperty", arguments); } function classPrivateProperty(key, value, decorators, _static) { return _builder.default.apply("ClassPrivateProperty", arguments); } function classPrivateMethod(kind, key, params, body, _static) { return _builder.default.apply("ClassPrivateMethod", arguments); } function privateName(id) { return _builder.default.apply("PrivateName", arguments); } function staticBlock(body) { return _builder.default.apply("StaticBlock", arguments); } function anyTypeAnnotation() { return _builder.default.apply("AnyTypeAnnotation", arguments); } function arrayTypeAnnotation(elementType) { return _builder.default.apply("ArrayTypeAnnotation", arguments); } function booleanTypeAnnotation() { return _builder.default.apply("BooleanTypeAnnotation", arguments); } function booleanLiteralTypeAnnotation(value) { return _builder.default.apply("BooleanLiteralTypeAnnotation", arguments); } function nullLiteralTypeAnnotation() { return _builder.default.apply("NullLiteralTypeAnnotation", arguments); } function classImplements(id, typeParameters) { return _builder.default.apply("ClassImplements", arguments); } function declareClass(id, typeParameters, _extends, body) { return _builder.default.apply("DeclareClass", arguments); } function declareFunction(id) { return _builder.default.apply("DeclareFunction", arguments); } function declareInterface(id, typeParameters, _extends, body) { return _builder.default.apply("DeclareInterface", arguments); } function declareModule(id, body, kind) { return _builder.default.apply("DeclareModule", arguments); } function declareModuleExports(typeAnnotation2) { return _builder.default.apply("DeclareModuleExports", arguments); } function declareTypeAlias(id, typeParameters, right) { return _builder.default.apply("DeclareTypeAlias", arguments); } function declareOpaqueType(id, typeParameters, supertype) { return _builder.default.apply("DeclareOpaqueType", arguments); } function declareVariable(id) { return _builder.default.apply("DeclareVariable", arguments); } function declareExportDeclaration(declaration, specifiers, source) { return _builder.default.apply("DeclareExportDeclaration", arguments); } function declareExportAllDeclaration(source) { return _builder.default.apply("DeclareExportAllDeclaration", arguments); } function declaredPredicate(value) { return _builder.default.apply("DeclaredPredicate", arguments); } function existsTypeAnnotation() { return _builder.default.apply("ExistsTypeAnnotation", arguments); } function functionTypeAnnotation(typeParameters, params, rest, returnType) { return _builder.default.apply("FunctionTypeAnnotation", arguments); } function functionTypeParam(name, typeAnnotation2) { return _builder.default.apply("FunctionTypeParam", arguments); } function genericTypeAnnotation(id, typeParameters) { return _builder.default.apply("GenericTypeAnnotation", arguments); } function inferredPredicate() { return _builder.default.apply("InferredPredicate", arguments); } function interfaceExtends(id, typeParameters) { return _builder.default.apply("InterfaceExtends", arguments); } function interfaceDeclaration(id, typeParameters, _extends, body) { return _builder.default.apply("InterfaceDeclaration", arguments); } function interfaceTypeAnnotation(_extends, body) { return _builder.default.apply("InterfaceTypeAnnotation", arguments); } function intersectionTypeAnnotation(types) { return _builder.default.apply("IntersectionTypeAnnotation", arguments); } function mixedTypeAnnotation() { return _builder.default.apply("MixedTypeAnnotation", arguments); } function emptyTypeAnnotation() { return _builder.default.apply("EmptyTypeAnnotation", arguments); } function nullableTypeAnnotation(typeAnnotation2) { return _builder.default.apply("NullableTypeAnnotation", arguments); } function numberLiteralTypeAnnotation(value) { return _builder.default.apply("NumberLiteralTypeAnnotation", arguments); } function numberTypeAnnotation() { return _builder.default.apply("NumberTypeAnnotation", arguments); } function objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) { return _builder.default.apply("ObjectTypeAnnotation", arguments); } function objectTypeInternalSlot(id, value, optional, _static, method) { return _builder.default.apply("ObjectTypeInternalSlot", arguments); } function objectTypeCallProperty(value) { return _builder.default.apply("ObjectTypeCallProperty", arguments); } function objectTypeIndexer(id, key, value, variance2) { return _builder.default.apply("ObjectTypeIndexer", arguments); } function objectTypeProperty(key, value, variance2) { return _builder.default.apply("ObjectTypeProperty", arguments); } function objectTypeSpreadProperty(argument) { return _builder.default.apply("ObjectTypeSpreadProperty", arguments); } function opaqueType(id, typeParameters, supertype, impltype) { return _builder.default.apply("OpaqueType", arguments); } function qualifiedTypeIdentifier(id, qualification) { return _builder.default.apply("QualifiedTypeIdentifier", arguments); } function stringLiteralTypeAnnotation(value) { return _builder.default.apply("StringLiteralTypeAnnotation", arguments); } function stringTypeAnnotation() { return _builder.default.apply("StringTypeAnnotation", arguments); } function symbolTypeAnnotation() { return _builder.default.apply("SymbolTypeAnnotation", arguments); } function thisTypeAnnotation() { return _builder.default.apply("ThisTypeAnnotation", arguments); } function tupleTypeAnnotation(types) { return _builder.default.apply("TupleTypeAnnotation", arguments); } function typeofTypeAnnotation(argument) { return _builder.default.apply("TypeofTypeAnnotation", arguments); } function typeAlias(id, typeParameters, right) { return _builder.default.apply("TypeAlias", arguments); } function typeAnnotation(typeAnnotation2) { return _builder.default.apply("TypeAnnotation", arguments); } function typeCastExpression(expression, typeAnnotation2) { return _builder.default.apply("TypeCastExpression", arguments); } function typeParameter(bound, _default, variance2) { return _builder.default.apply("TypeParameter", arguments); } function typeParameterDeclaration(params) { return _builder.default.apply("TypeParameterDeclaration", arguments); } function typeParameterInstantiation(params) { return _builder.default.apply("TypeParameterInstantiation", arguments); } function unionTypeAnnotation(types) { return _builder.default.apply("UnionTypeAnnotation", arguments); } function variance(kind) { return _builder.default.apply("Variance", arguments); } function voidTypeAnnotation() { return _builder.default.apply("VoidTypeAnnotation", arguments); } function enumDeclaration(id, body) { return _builder.default.apply("EnumDeclaration", arguments); } function enumBooleanBody(members) { return _builder.default.apply("EnumBooleanBody", arguments); } function enumNumberBody(members) { return _builder.default.apply("EnumNumberBody", arguments); } function enumStringBody(members) { return _builder.default.apply("EnumStringBody", arguments); } function enumSymbolBody(members) { return _builder.default.apply("EnumSymbolBody", arguments); } function enumBooleanMember(id) { return _builder.default.apply("EnumBooleanMember", arguments); } function enumNumberMember(id, init) { return _builder.default.apply("EnumNumberMember", arguments); } function enumStringMember(id, init) { return _builder.default.apply("EnumStringMember", arguments); } function enumDefaultedMember(id) { return _builder.default.apply("EnumDefaultedMember", arguments); } function indexedAccessType(objectType, indexType) { return _builder.default.apply("IndexedAccessType", arguments); } function optionalIndexedAccessType(objectType, indexType) { return _builder.default.apply("OptionalIndexedAccessType", arguments); } function jsxAttribute(name, value) { return _builder.default.apply("JSXAttribute", arguments); } function jsxClosingElement(name) { return _builder.default.apply("JSXClosingElement", arguments); } function jsxElement(openingElement, closingElement, children, selfClosing) { return _builder.default.apply("JSXElement", arguments); } function jsxEmptyExpression() { return _builder.default.apply("JSXEmptyExpression", arguments); } function jsxExpressionContainer(expression) { return _builder.default.apply("JSXExpressionContainer", arguments); } function jsxSpreadChild(expression) { return _builder.default.apply("JSXSpreadChild", arguments); } function jsxIdentifier(name) { return _builder.default.apply("JSXIdentifier", arguments); } function jsxMemberExpression(object, property) { return _builder.default.apply("JSXMemberExpression", arguments); } function jsxNamespacedName(namespace, name) { return _builder.default.apply("JSXNamespacedName", arguments); } function jsxOpeningElement(name, attributes, selfClosing) { return _builder.default.apply("JSXOpeningElement", arguments); } function jsxSpreadAttribute(argument) { return _builder.default.apply("JSXSpreadAttribute", arguments); } function jsxText(value) { return _builder.default.apply("JSXText", arguments); } function jsxFragment(openingFragment, closingFragment, children) { return _builder.default.apply("JSXFragment", arguments); } function jsxOpeningFragment() { return _builder.default.apply("JSXOpeningFragment", arguments); } function jsxClosingFragment() { return _builder.default.apply("JSXClosingFragment", arguments); } function noop() { return _builder.default.apply("Noop", arguments); } function placeholder(expectedNode, name) { return _builder.default.apply("Placeholder", arguments); } function v8IntrinsicIdentifier(name) { return _builder.default.apply("V8IntrinsicIdentifier", arguments); } function argumentPlaceholder() { return _builder.default.apply("ArgumentPlaceholder", arguments); } function bindExpression(object, callee) { return _builder.default.apply("BindExpression", arguments); } function importAttribute(key, value) { return _builder.default.apply("ImportAttribute", arguments); } function decorator(expression) { return _builder.default.apply("Decorator", arguments); } function doExpression(body, async) { return _builder.default.apply("DoExpression", arguments); } function exportDefaultSpecifier(exported) { return _builder.default.apply("ExportDefaultSpecifier", arguments); } function recordExpression(properties) { return _builder.default.apply("RecordExpression", arguments); } function tupleExpression(elements) { return _builder.default.apply("TupleExpression", arguments); } function decimalLiteral(value) { return _builder.default.apply("DecimalLiteral", arguments); } function moduleExpression(body) { return _builder.default.apply("ModuleExpression", arguments); } function topicReference() { return _builder.default.apply("TopicReference", arguments); } function pipelineTopicExpression(expression) { return _builder.default.apply("PipelineTopicExpression", arguments); } function pipelineBareFunction(callee) { return _builder.default.apply("PipelineBareFunction", arguments); } function pipelinePrimaryTopicReference() { return _builder.default.apply("PipelinePrimaryTopicReference", arguments); } function tsParameterProperty(parameter) { return _builder.default.apply("TSParameterProperty", arguments); } function tsDeclareFunction(id, typeParameters, params, returnType) { return _builder.default.apply("TSDeclareFunction", arguments); } function tsDeclareMethod(decorators, key, typeParameters, params, returnType) { return _builder.default.apply("TSDeclareMethod", arguments); } function tsQualifiedName(left, right) { return _builder.default.apply("TSQualifiedName", arguments); } function tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation2) { return _builder.default.apply("TSCallSignatureDeclaration", arguments); } function tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation2) { return _builder.default.apply("TSConstructSignatureDeclaration", arguments); } function tsPropertySignature(key, typeAnnotation2, initializer) { return _builder.default.apply("TSPropertySignature", arguments); } function tsMethodSignature(key, typeParameters, parameters, typeAnnotation2) { return _builder.default.apply("TSMethodSignature", arguments); } function tsIndexSignature(parameters, typeAnnotation2) { return _builder.default.apply("TSIndexSignature", arguments); } function tsAnyKeyword() { return _builder.default.apply("TSAnyKeyword", arguments); } function tsBooleanKeyword() { return _builder.default.apply("TSBooleanKeyword", arguments); } function tsBigIntKeyword() { return _builder.default.apply("TSBigIntKeyword", arguments); } function tsIntrinsicKeyword() { return _builder.default.apply("TSIntrinsicKeyword", arguments); } function tsNeverKeyword() { return _builder.default.apply("TSNeverKeyword", arguments); } function tsNullKeyword() { return _builder.default.apply("TSNullKeyword", arguments); } function tsNumberKeyword() { return _builder.default.apply("TSNumberKeyword", arguments); } function tsObjectKeyword() { return _builder.default.apply("TSObjectKeyword", arguments); } function tsStringKeyword() { return _builder.default.apply("TSStringKeyword", arguments); } function tsSymbolKeyword() { return _builder.default.apply("TSSymbolKeyword", arguments); } function tsUndefinedKeyword() { return _builder.default.apply("TSUndefinedKeyword", arguments); } function tsUnknownKeyword() { return _builder.default.apply("TSUnknownKeyword", arguments); } function tsVoidKeyword() { return _builder.default.apply("TSVoidKeyword", arguments); } function tsThisType() { return _builder.default.apply("TSThisType", arguments); } function tsFunctionType(typeParameters, parameters, typeAnnotation2) { return _builder.default.apply("TSFunctionType", arguments); } function tsConstructorType(typeParameters, parameters, typeAnnotation2) { return _builder.default.apply("TSConstructorType", arguments); } function tsTypeReference(typeName, typeParameters) { return _builder.default.apply("TSTypeReference", arguments); } function tsTypePredicate(parameterName, typeAnnotation2, asserts) { return _builder.default.apply("TSTypePredicate", arguments); } function tsTypeQuery(exprName) { return _builder.default.apply("TSTypeQuery", arguments); } function tsTypeLiteral(members) { return _builder.default.apply("TSTypeLiteral", arguments); } function tsArrayType(elementType) { return _builder.default.apply("TSArrayType", arguments); } function tsTupleType(elementTypes) { return _builder.default.apply("TSTupleType", arguments); } function tsOptionalType(typeAnnotation2) { return _builder.default.apply("TSOptionalType", arguments); } function tsRestType(typeAnnotation2) { return _builder.default.apply("TSRestType", arguments); } function tsNamedTupleMember(label, elementType, optional) { return _builder.default.apply("TSNamedTupleMember", arguments); } function tsUnionType(types) { return _builder.default.apply("TSUnionType", arguments); } function tsIntersectionType(types) { return _builder.default.apply("TSIntersectionType", arguments); } function tsConditionalType(checkType, extendsType, trueType, falseType) { return _builder.default.apply("TSConditionalType", arguments); } function tsInferType(typeParameter2) { return _builder.default.apply("TSInferType", arguments); } function tsParenthesizedType(typeAnnotation2) { return _builder.default.apply("TSParenthesizedType", arguments); } function tsTypeOperator(typeAnnotation2) { return _builder.default.apply("TSTypeOperator", arguments); } function tsIndexedAccessType(objectType, indexType) { return _builder.default.apply("TSIndexedAccessType", arguments); } function tsMappedType(typeParameter2, typeAnnotation2, nameType) { return _builder.default.apply("TSMappedType", arguments); } function tsLiteralType(literal) { return _builder.default.apply("TSLiteralType", arguments); } function tsExpressionWithTypeArguments(expression, typeParameters) { return _builder.default.apply("TSExpressionWithTypeArguments", arguments); } function tsInterfaceDeclaration(id, typeParameters, _extends, body) { return _builder.default.apply("TSInterfaceDeclaration", arguments); } function tsInterfaceBody(body) { return _builder.default.apply("TSInterfaceBody", arguments); } function tsTypeAliasDeclaration(id, typeParameters, typeAnnotation2) { return _builder.default.apply("TSTypeAliasDeclaration", arguments); } function tsAsExpression(expression, typeAnnotation2) { return _builder.default.apply("TSAsExpression", arguments); } function tsTypeAssertion(typeAnnotation2, expression) { return _builder.default.apply("TSTypeAssertion", arguments); } function tsEnumDeclaration(id, members) { return _builder.default.apply("TSEnumDeclaration", arguments); } function tsEnumMember(id, initializer) { return _builder.default.apply("TSEnumMember", arguments); } function tsModuleDeclaration(id, body) { return _builder.default.apply("TSModuleDeclaration", arguments); } function tsModuleBlock(body) { return _builder.default.apply("TSModuleBlock", arguments); } function tsImportType(argument, qualifier, typeParameters) { return _builder.default.apply("TSImportType", arguments); } function tsImportEqualsDeclaration(id, moduleReference) { return _builder.default.apply("TSImportEqualsDeclaration", arguments); } function tsExternalModuleReference(expression) { return _builder.default.apply("TSExternalModuleReference", arguments); } function tsNonNullExpression(expression) { return _builder.default.apply("TSNonNullExpression", arguments); } function tsExportAssignment(expression) { return _builder.default.apply("TSExportAssignment", arguments); } function tsNamespaceExportDeclaration(id) { return _builder.default.apply("TSNamespaceExportDeclaration", arguments); } function tsTypeAnnotation(typeAnnotation2) { return _builder.default.apply("TSTypeAnnotation", arguments); } function tsTypeParameterInstantiation(params) { return _builder.default.apply("TSTypeParameterInstantiation", arguments); } function tsTypeParameterDeclaration(params) { return _builder.default.apply("TSTypeParameterDeclaration", arguments); } function tsTypeParameter(constraint, _default, name) { return _builder.default.apply("TSTypeParameter", arguments); } function NumberLiteral(value) { console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); return _builder.default.apply("NumberLiteral", arguments); } function RegexLiteral(pattern, flags) { console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); return _builder.default.apply("RegexLiteral", arguments); } function RestProperty(argument) { console.trace("The node type RestProperty has been renamed to RestElement"); return _builder.default.apply("RestProperty", arguments); } function SpreadProperty(argument) { console.trace("The node type SpreadProperty has been renamed to SpreadElement"); return _builder.default.apply("SpreadProperty", arguments); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js var require_cleanJSXElementLiteralChild3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = cleanJSXElementLiteralChild; var _generated = require_generated12(); function cleanJSXElementLiteralChild(child, args) { const lines = child.value.split(/\r\n|\n|\r/); let lastNonEmptyLine = 0; for (let i = 0; i < lines.length; i++) { if (lines[i].match(/[^ \t]/)) { lastNonEmptyLine = i; } } let str = ""; for (let i = 0; i < lines.length; i++) { const line = lines[i]; const isFirstLine = i === 0; const isLastLine = i === lines.length - 1; const isLastNonEmptyLine = i === lastNonEmptyLine; let trimmedLine = line.replace(/\t/g, " "); if (!isFirstLine) { trimmedLine = trimmedLine.replace(/^[ ]+/, ""); } if (!isLastLine) { trimmedLine = trimmedLine.replace(/[ ]+$/, ""); } if (trimmedLine) { if (!isLastNonEmptyLine) { trimmedLine += " "; } str += trimmedLine; } } if (str) args.push((0, _generated.stringLiteral)(str)); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/builders/react/buildChildren.js var require_buildChildren3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/builders/react/buildChildren.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = buildChildren; var _generated = require_generated11(); var _cleanJSXElementLiteralChild = require_cleanJSXElementLiteralChild3(); function buildChildren(node) { const elements = []; for (let i = 0; i < node.children.length; i++) { let child = node.children[i]; if ((0, _generated.isJSXText)(child)) { (0, _cleanJSXElementLiteralChild.default)(child, elements); continue; } if ((0, _generated.isJSXExpressionContainer)(child)) child = child.expression; if ((0, _generated.isJSXEmptyExpression)(child)) continue; elements.push(child); } return elements; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isNode.js var require_isNode3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isNode.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isNode; var _definitions = require_definitions3(); function isNode(node) { return !!(node && _definitions.VISITOR_KEYS[node.type]); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/asserts/assertNode.js var require_assertNode3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/asserts/assertNode.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = assertNode; var _isNode = require_isNode3(); function assertNode(node) { if (!(0, _isNode.default)(node)) { var _node$type; const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node); throw new TypeError(`Not a valid node of type "${type}"`); } } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/asserts/generated/index.js var require_generated13 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/asserts/generated/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.assertAccessor = assertAccessor; exports2.assertAnyTypeAnnotation = assertAnyTypeAnnotation; exports2.assertArgumentPlaceholder = assertArgumentPlaceholder; exports2.assertArrayExpression = assertArrayExpression; exports2.assertArrayPattern = assertArrayPattern; exports2.assertArrayTypeAnnotation = assertArrayTypeAnnotation; exports2.assertArrowFunctionExpression = assertArrowFunctionExpression; exports2.assertAssignmentExpression = assertAssignmentExpression; exports2.assertAssignmentPattern = assertAssignmentPattern; exports2.assertAwaitExpression = assertAwaitExpression; exports2.assertBigIntLiteral = assertBigIntLiteral; exports2.assertBinary = assertBinary; exports2.assertBinaryExpression = assertBinaryExpression; exports2.assertBindExpression = assertBindExpression; exports2.assertBlock = assertBlock; exports2.assertBlockParent = assertBlockParent; exports2.assertBlockStatement = assertBlockStatement; exports2.assertBooleanLiteral = assertBooleanLiteral; exports2.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation; exports2.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation; exports2.assertBreakStatement = assertBreakStatement; exports2.assertCallExpression = assertCallExpression; exports2.assertCatchClause = assertCatchClause; exports2.assertClass = assertClass; exports2.assertClassAccessorProperty = assertClassAccessorProperty; exports2.assertClassBody = assertClassBody; exports2.assertClassDeclaration = assertClassDeclaration; exports2.assertClassExpression = assertClassExpression; exports2.assertClassImplements = assertClassImplements; exports2.assertClassMethod = assertClassMethod; exports2.assertClassPrivateMethod = assertClassPrivateMethod; exports2.assertClassPrivateProperty = assertClassPrivateProperty; exports2.assertClassProperty = assertClassProperty; exports2.assertCompletionStatement = assertCompletionStatement; exports2.assertConditional = assertConditional; exports2.assertConditionalExpression = assertConditionalExpression; exports2.assertContinueStatement = assertContinueStatement; exports2.assertDebuggerStatement = assertDebuggerStatement; exports2.assertDecimalLiteral = assertDecimalLiteral; exports2.assertDeclaration = assertDeclaration; exports2.assertDeclareClass = assertDeclareClass; exports2.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration; exports2.assertDeclareExportDeclaration = assertDeclareExportDeclaration; exports2.assertDeclareFunction = assertDeclareFunction; exports2.assertDeclareInterface = assertDeclareInterface; exports2.assertDeclareModule = assertDeclareModule; exports2.assertDeclareModuleExports = assertDeclareModuleExports; exports2.assertDeclareOpaqueType = assertDeclareOpaqueType; exports2.assertDeclareTypeAlias = assertDeclareTypeAlias; exports2.assertDeclareVariable = assertDeclareVariable; exports2.assertDeclaredPredicate = assertDeclaredPredicate; exports2.assertDecorator = assertDecorator; exports2.assertDirective = assertDirective; exports2.assertDirectiveLiteral = assertDirectiveLiteral; exports2.assertDoExpression = assertDoExpression; exports2.assertDoWhileStatement = assertDoWhileStatement; exports2.assertEmptyStatement = assertEmptyStatement; exports2.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation; exports2.assertEnumBody = assertEnumBody; exports2.assertEnumBooleanBody = assertEnumBooleanBody; exports2.assertEnumBooleanMember = assertEnumBooleanMember; exports2.assertEnumDeclaration = assertEnumDeclaration; exports2.assertEnumDefaultedMember = assertEnumDefaultedMember; exports2.assertEnumMember = assertEnumMember; exports2.assertEnumNumberBody = assertEnumNumberBody; exports2.assertEnumNumberMember = assertEnumNumberMember; exports2.assertEnumStringBody = assertEnumStringBody; exports2.assertEnumStringMember = assertEnumStringMember; exports2.assertEnumSymbolBody = assertEnumSymbolBody; exports2.assertExistsTypeAnnotation = assertExistsTypeAnnotation; exports2.assertExportAllDeclaration = assertExportAllDeclaration; exports2.assertExportDeclaration = assertExportDeclaration; exports2.assertExportDefaultDeclaration = assertExportDefaultDeclaration; exports2.assertExportDefaultSpecifier = assertExportDefaultSpecifier; exports2.assertExportNamedDeclaration = assertExportNamedDeclaration; exports2.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier; exports2.assertExportSpecifier = assertExportSpecifier; exports2.assertExpression = assertExpression; exports2.assertExpressionStatement = assertExpressionStatement; exports2.assertExpressionWrapper = assertExpressionWrapper; exports2.assertFile = assertFile; exports2.assertFlow = assertFlow; exports2.assertFlowBaseAnnotation = assertFlowBaseAnnotation; exports2.assertFlowDeclaration = assertFlowDeclaration; exports2.assertFlowPredicate = assertFlowPredicate; exports2.assertFlowType = assertFlowType; exports2.assertFor = assertFor; exports2.assertForInStatement = assertForInStatement; exports2.assertForOfStatement = assertForOfStatement; exports2.assertForStatement = assertForStatement; exports2.assertForXStatement = assertForXStatement; exports2.assertFunction = assertFunction; exports2.assertFunctionDeclaration = assertFunctionDeclaration; exports2.assertFunctionExpression = assertFunctionExpression; exports2.assertFunctionParent = assertFunctionParent; exports2.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation; exports2.assertFunctionTypeParam = assertFunctionTypeParam; exports2.assertGenericTypeAnnotation = assertGenericTypeAnnotation; exports2.assertIdentifier = assertIdentifier; exports2.assertIfStatement = assertIfStatement; exports2.assertImmutable = assertImmutable; exports2.assertImport = assertImport; exports2.assertImportAttribute = assertImportAttribute; exports2.assertImportDeclaration = assertImportDeclaration; exports2.assertImportDefaultSpecifier = assertImportDefaultSpecifier; exports2.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier; exports2.assertImportSpecifier = assertImportSpecifier; exports2.assertIndexedAccessType = assertIndexedAccessType; exports2.assertInferredPredicate = assertInferredPredicate; exports2.assertInterfaceDeclaration = assertInterfaceDeclaration; exports2.assertInterfaceExtends = assertInterfaceExtends; exports2.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation; exports2.assertInterpreterDirective = assertInterpreterDirective; exports2.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation; exports2.assertJSX = assertJSX; exports2.assertJSXAttribute = assertJSXAttribute; exports2.assertJSXClosingElement = assertJSXClosingElement; exports2.assertJSXClosingFragment = assertJSXClosingFragment; exports2.assertJSXElement = assertJSXElement; exports2.assertJSXEmptyExpression = assertJSXEmptyExpression; exports2.assertJSXExpressionContainer = assertJSXExpressionContainer; exports2.assertJSXFragment = assertJSXFragment; exports2.assertJSXIdentifier = assertJSXIdentifier; exports2.assertJSXMemberExpression = assertJSXMemberExpression; exports2.assertJSXNamespacedName = assertJSXNamespacedName; exports2.assertJSXOpeningElement = assertJSXOpeningElement; exports2.assertJSXOpeningFragment = assertJSXOpeningFragment; exports2.assertJSXSpreadAttribute = assertJSXSpreadAttribute; exports2.assertJSXSpreadChild = assertJSXSpreadChild; exports2.assertJSXText = assertJSXText; exports2.assertLVal = assertLVal; exports2.assertLabeledStatement = assertLabeledStatement; exports2.assertLiteral = assertLiteral; exports2.assertLogicalExpression = assertLogicalExpression; exports2.assertLoop = assertLoop; exports2.assertMemberExpression = assertMemberExpression; exports2.assertMetaProperty = assertMetaProperty; exports2.assertMethod = assertMethod; exports2.assertMiscellaneous = assertMiscellaneous; exports2.assertMixedTypeAnnotation = assertMixedTypeAnnotation; exports2.assertModuleDeclaration = assertModuleDeclaration; exports2.assertModuleExpression = assertModuleExpression; exports2.assertModuleSpecifier = assertModuleSpecifier; exports2.assertNewExpression = assertNewExpression; exports2.assertNoop = assertNoop; exports2.assertNullLiteral = assertNullLiteral; exports2.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation; exports2.assertNullableTypeAnnotation = assertNullableTypeAnnotation; exports2.assertNumberLiteral = assertNumberLiteral; exports2.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation; exports2.assertNumberTypeAnnotation = assertNumberTypeAnnotation; exports2.assertNumericLiteral = assertNumericLiteral; exports2.assertObjectExpression = assertObjectExpression; exports2.assertObjectMember = assertObjectMember; exports2.assertObjectMethod = assertObjectMethod; exports2.assertObjectPattern = assertObjectPattern; exports2.assertObjectProperty = assertObjectProperty; exports2.assertObjectTypeAnnotation = assertObjectTypeAnnotation; exports2.assertObjectTypeCallProperty = assertObjectTypeCallProperty; exports2.assertObjectTypeIndexer = assertObjectTypeIndexer; exports2.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot; exports2.assertObjectTypeProperty = assertObjectTypeProperty; exports2.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty; exports2.assertOpaqueType = assertOpaqueType; exports2.assertOptionalCallExpression = assertOptionalCallExpression; exports2.assertOptionalIndexedAccessType = assertOptionalIndexedAccessType; exports2.assertOptionalMemberExpression = assertOptionalMemberExpression; exports2.assertParenthesizedExpression = assertParenthesizedExpression; exports2.assertPattern = assertPattern; exports2.assertPatternLike = assertPatternLike; exports2.assertPipelineBareFunction = assertPipelineBareFunction; exports2.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference; exports2.assertPipelineTopicExpression = assertPipelineTopicExpression; exports2.assertPlaceholder = assertPlaceholder; exports2.assertPrivate = assertPrivate; exports2.assertPrivateName = assertPrivateName; exports2.assertProgram = assertProgram; exports2.assertProperty = assertProperty; exports2.assertPureish = assertPureish; exports2.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier; exports2.assertRecordExpression = assertRecordExpression; exports2.assertRegExpLiteral = assertRegExpLiteral; exports2.assertRegexLiteral = assertRegexLiteral; exports2.assertRestElement = assertRestElement; exports2.assertRestProperty = assertRestProperty; exports2.assertReturnStatement = assertReturnStatement; exports2.assertScopable = assertScopable; exports2.assertSequenceExpression = assertSequenceExpression; exports2.assertSpreadElement = assertSpreadElement; exports2.assertSpreadProperty = assertSpreadProperty; exports2.assertStandardized = assertStandardized; exports2.assertStatement = assertStatement; exports2.assertStaticBlock = assertStaticBlock; exports2.assertStringLiteral = assertStringLiteral; exports2.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation; exports2.assertStringTypeAnnotation = assertStringTypeAnnotation; exports2.assertSuper = assertSuper; exports2.assertSwitchCase = assertSwitchCase; exports2.assertSwitchStatement = assertSwitchStatement; exports2.assertSymbolTypeAnnotation = assertSymbolTypeAnnotation; exports2.assertTSAnyKeyword = assertTSAnyKeyword; exports2.assertTSArrayType = assertTSArrayType; exports2.assertTSAsExpression = assertTSAsExpression; exports2.assertTSBaseType = assertTSBaseType; exports2.assertTSBigIntKeyword = assertTSBigIntKeyword; exports2.assertTSBooleanKeyword = assertTSBooleanKeyword; exports2.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration; exports2.assertTSConditionalType = assertTSConditionalType; exports2.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration; exports2.assertTSConstructorType = assertTSConstructorType; exports2.assertTSDeclareFunction = assertTSDeclareFunction; exports2.assertTSDeclareMethod = assertTSDeclareMethod; exports2.assertTSEntityName = assertTSEntityName; exports2.assertTSEnumDeclaration = assertTSEnumDeclaration; exports2.assertTSEnumMember = assertTSEnumMember; exports2.assertTSExportAssignment = assertTSExportAssignment; exports2.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments; exports2.assertTSExternalModuleReference = assertTSExternalModuleReference; exports2.assertTSFunctionType = assertTSFunctionType; exports2.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration; exports2.assertTSImportType = assertTSImportType; exports2.assertTSIndexSignature = assertTSIndexSignature; exports2.assertTSIndexedAccessType = assertTSIndexedAccessType; exports2.assertTSInferType = assertTSInferType; exports2.assertTSInterfaceBody = assertTSInterfaceBody; exports2.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration; exports2.assertTSIntersectionType = assertTSIntersectionType; exports2.assertTSIntrinsicKeyword = assertTSIntrinsicKeyword; exports2.assertTSLiteralType = assertTSLiteralType; exports2.assertTSMappedType = assertTSMappedType; exports2.assertTSMethodSignature = assertTSMethodSignature; exports2.assertTSModuleBlock = assertTSModuleBlock; exports2.assertTSModuleDeclaration = assertTSModuleDeclaration; exports2.assertTSNamedTupleMember = assertTSNamedTupleMember; exports2.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration; exports2.assertTSNeverKeyword = assertTSNeverKeyword; exports2.assertTSNonNullExpression = assertTSNonNullExpression; exports2.assertTSNullKeyword = assertTSNullKeyword; exports2.assertTSNumberKeyword = assertTSNumberKeyword; exports2.assertTSObjectKeyword = assertTSObjectKeyword; exports2.assertTSOptionalType = assertTSOptionalType; exports2.assertTSParameterProperty = assertTSParameterProperty; exports2.assertTSParenthesizedType = assertTSParenthesizedType; exports2.assertTSPropertySignature = assertTSPropertySignature; exports2.assertTSQualifiedName = assertTSQualifiedName; exports2.assertTSRestType = assertTSRestType; exports2.assertTSStringKeyword = assertTSStringKeyword; exports2.assertTSSymbolKeyword = assertTSSymbolKeyword; exports2.assertTSThisType = assertTSThisType; exports2.assertTSTupleType = assertTSTupleType; exports2.assertTSType = assertTSType; exports2.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration; exports2.assertTSTypeAnnotation = assertTSTypeAnnotation; exports2.assertTSTypeAssertion = assertTSTypeAssertion; exports2.assertTSTypeElement = assertTSTypeElement; exports2.assertTSTypeLiteral = assertTSTypeLiteral; exports2.assertTSTypeOperator = assertTSTypeOperator; exports2.assertTSTypeParameter = assertTSTypeParameter; exports2.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration; exports2.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation; exports2.assertTSTypePredicate = assertTSTypePredicate; exports2.assertTSTypeQuery = assertTSTypeQuery; exports2.assertTSTypeReference = assertTSTypeReference; exports2.assertTSUndefinedKeyword = assertTSUndefinedKeyword; exports2.assertTSUnionType = assertTSUnionType; exports2.assertTSUnknownKeyword = assertTSUnknownKeyword; exports2.assertTSVoidKeyword = assertTSVoidKeyword; exports2.assertTaggedTemplateExpression = assertTaggedTemplateExpression; exports2.assertTemplateElement = assertTemplateElement; exports2.assertTemplateLiteral = assertTemplateLiteral; exports2.assertTerminatorless = assertTerminatorless; exports2.assertThisExpression = assertThisExpression; exports2.assertThisTypeAnnotation = assertThisTypeAnnotation; exports2.assertThrowStatement = assertThrowStatement; exports2.assertTopicReference = assertTopicReference; exports2.assertTryStatement = assertTryStatement; exports2.assertTupleExpression = assertTupleExpression; exports2.assertTupleTypeAnnotation = assertTupleTypeAnnotation; exports2.assertTypeAlias = assertTypeAlias; exports2.assertTypeAnnotation = assertTypeAnnotation; exports2.assertTypeCastExpression = assertTypeCastExpression; exports2.assertTypeParameter = assertTypeParameter; exports2.assertTypeParameterDeclaration = assertTypeParameterDeclaration; exports2.assertTypeParameterInstantiation = assertTypeParameterInstantiation; exports2.assertTypeScript = assertTypeScript; exports2.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation; exports2.assertUnaryExpression = assertUnaryExpression; exports2.assertUnaryLike = assertUnaryLike; exports2.assertUnionTypeAnnotation = assertUnionTypeAnnotation; exports2.assertUpdateExpression = assertUpdateExpression; exports2.assertUserWhitespacable = assertUserWhitespacable; exports2.assertV8IntrinsicIdentifier = assertV8IntrinsicIdentifier; exports2.assertVariableDeclaration = assertVariableDeclaration; exports2.assertVariableDeclarator = assertVariableDeclarator; exports2.assertVariance = assertVariance; exports2.assertVoidTypeAnnotation = assertVoidTypeAnnotation; exports2.assertWhile = assertWhile; exports2.assertWhileStatement = assertWhileStatement; exports2.assertWithStatement = assertWithStatement; exports2.assertYieldExpression = assertYieldExpression; var _is = require_is3(); function assert(type, node, opts) { if (!(0, _is.default)(type, node, opts)) { throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node.type}".`); } } function assertArrayExpression(node, opts) { assert("ArrayExpression", node, opts); } function assertAssignmentExpression(node, opts) { assert("AssignmentExpression", node, opts); } function assertBinaryExpression(node, opts) { assert("BinaryExpression", node, opts); } function assertInterpreterDirective(node, opts) { assert("InterpreterDirective", node, opts); } function assertDirective(node, opts) { assert("Directive", node, opts); } function assertDirectiveLiteral(node, opts) { assert("DirectiveLiteral", node, opts); } function assertBlockStatement(node, opts) { assert("BlockStatement", node, opts); } function assertBreakStatement(node, opts) { assert("BreakStatement", node, opts); } function assertCallExpression(node, opts) { assert("CallExpression", node, opts); } function assertCatchClause(node, opts) { assert("CatchClause", node, opts); } function assertConditionalExpression(node, opts) { assert("ConditionalExpression", node, opts); } function assertContinueStatement(node, opts) { assert("ContinueStatement", node, opts); } function assertDebuggerStatement(node, opts) { assert("DebuggerStatement", node, opts); } function assertDoWhileStatement(node, opts) { assert("DoWhileStatement", node, opts); } function assertEmptyStatement(node, opts) { assert("EmptyStatement", node, opts); } function assertExpressionStatement(node, opts) { assert("ExpressionStatement", node, opts); } function assertFile(node, opts) { assert("File", node, opts); } function assertForInStatement(node, opts) { assert("ForInStatement", node, opts); } function assertForStatement(node, opts) { assert("ForStatement", node, opts); } function assertFunctionDeclaration(node, opts) { assert("FunctionDeclaration", node, opts); } function assertFunctionExpression(node, opts) { assert("FunctionExpression", node, opts); } function assertIdentifier(node, opts) { assert("Identifier", node, opts); } function assertIfStatement(node, opts) { assert("IfStatement", node, opts); } function assertLabeledStatement(node, opts) { assert("LabeledStatement", node, opts); } function assertStringLiteral(node, opts) { assert("StringLiteral", node, opts); } function assertNumericLiteral(node, opts) { assert("NumericLiteral", node, opts); } function assertNullLiteral(node, opts) { assert("NullLiteral", node, opts); } function assertBooleanLiteral(node, opts) { assert("BooleanLiteral", node, opts); } function assertRegExpLiteral(node, opts) { assert("RegExpLiteral", node, opts); } function assertLogicalExpression(node, opts) { assert("LogicalExpression", node, opts); } function assertMemberExpression(node, opts) { assert("MemberExpression", node, opts); } function assertNewExpression(node, opts) { assert("NewExpression", node, opts); } function assertProgram(node, opts) { assert("Program", node, opts); } function assertObjectExpression(node, opts) { assert("ObjectExpression", node, opts); } function assertObjectMethod(node, opts) { assert("ObjectMethod", node, opts); } function assertObjectProperty(node, opts) { assert("ObjectProperty", node, opts); } function assertRestElement(node, opts) { assert("RestElement", node, opts); } function assertReturnStatement(node, opts) { assert("ReturnStatement", node, opts); } function assertSequenceExpression(node, opts) { assert("SequenceExpression", node, opts); } function assertParenthesizedExpression(node, opts) { assert("ParenthesizedExpression", node, opts); } function assertSwitchCase(node, opts) { assert("SwitchCase", node, opts); } function assertSwitchStatement(node, opts) { assert("SwitchStatement", node, opts); } function assertThisExpression(node, opts) { assert("ThisExpression", node, opts); } function assertThrowStatement(node, opts) { assert("ThrowStatement", node, opts); } function assertTryStatement(node, opts) { assert("TryStatement", node, opts); } function assertUnaryExpression(node, opts) { assert("UnaryExpression", node, opts); } function assertUpdateExpression(node, opts) { assert("UpdateExpression", node, opts); } function assertVariableDeclaration(node, opts) { assert("VariableDeclaration", node, opts); } function assertVariableDeclarator(node, opts) { assert("VariableDeclarator", node, opts); } function assertWhileStatement(node, opts) { assert("WhileStatement", node, opts); } function assertWithStatement(node, opts) { assert("WithStatement", node, opts); } function assertAssignmentPattern(node, opts) { assert("AssignmentPattern", node, opts); } function assertArrayPattern(node, opts) { assert("ArrayPattern", node, opts); } function assertArrowFunctionExpression(node, opts) { assert("ArrowFunctionExpression", node, opts); } function assertClassBody(node, opts) { assert("ClassBody", node, opts); } function assertClassExpression(node, opts) { assert("ClassExpression", node, opts); } function assertClassDeclaration(node, opts) { assert("ClassDeclaration", node, opts); } function assertExportAllDeclaration(node, opts) { assert("ExportAllDeclaration", node, opts); } function assertExportDefaultDeclaration(node, opts) { assert("ExportDefaultDeclaration", node, opts); } function assertExportNamedDeclaration(node, opts) { assert("ExportNamedDeclaration", node, opts); } function assertExportSpecifier(node, opts) { assert("ExportSpecifier", node, opts); } function assertForOfStatement(node, opts) { assert("ForOfStatement", node, opts); } function assertImportDeclaration(node, opts) { assert("ImportDeclaration", node, opts); } function assertImportDefaultSpecifier(node, opts) { assert("ImportDefaultSpecifier", node, opts); } function assertImportNamespaceSpecifier(node, opts) { assert("ImportNamespaceSpecifier", node, opts); } function assertImportSpecifier(node, opts) { assert("ImportSpecifier", node, opts); } function assertMetaProperty(node, opts) { assert("MetaProperty", node, opts); } function assertClassMethod(node, opts) { assert("ClassMethod", node, opts); } function assertObjectPattern(node, opts) { assert("ObjectPattern", node, opts); } function assertSpreadElement(node, opts) { assert("SpreadElement", node, opts); } function assertSuper(node, opts) { assert("Super", node, opts); } function assertTaggedTemplateExpression(node, opts) { assert("TaggedTemplateExpression", node, opts); } function assertTemplateElement(node, opts) { assert("TemplateElement", node, opts); } function assertTemplateLiteral(node, opts) { assert("TemplateLiteral", node, opts); } function assertYieldExpression(node, opts) { assert("YieldExpression", node, opts); } function assertAwaitExpression(node, opts) { assert("AwaitExpression", node, opts); } function assertImport(node, opts) { assert("Import", node, opts); } function assertBigIntLiteral(node, opts) { assert("BigIntLiteral", node, opts); } function assertExportNamespaceSpecifier(node, opts) { assert("ExportNamespaceSpecifier", node, opts); } function assertOptionalMemberExpression(node, opts) { assert("OptionalMemberExpression", node, opts); } function assertOptionalCallExpression(node, opts) { assert("OptionalCallExpression", node, opts); } function assertClassProperty(node, opts) { assert("ClassProperty", node, opts); } function assertClassAccessorProperty(node, opts) { assert("ClassAccessorProperty", node, opts); } function assertClassPrivateProperty(node, opts) { assert("ClassPrivateProperty", node, opts); } function assertClassPrivateMethod(node, opts) { assert("ClassPrivateMethod", node, opts); } function assertPrivateName(node, opts) { assert("PrivateName", node, opts); } function assertStaticBlock(node, opts) { assert("StaticBlock", node, opts); } function assertAnyTypeAnnotation(node, opts) { assert("AnyTypeAnnotation", node, opts); } function assertArrayTypeAnnotation(node, opts) { assert("ArrayTypeAnnotation", node, opts); } function assertBooleanTypeAnnotation(node, opts) { assert("BooleanTypeAnnotation", node, opts); } function assertBooleanLiteralTypeAnnotation(node, opts) { assert("BooleanLiteralTypeAnnotation", node, opts); } function assertNullLiteralTypeAnnotation(node, opts) { assert("NullLiteralTypeAnnotation", node, opts); } function assertClassImplements(node, opts) { assert("ClassImplements", node, opts); } function assertDeclareClass(node, opts) { assert("DeclareClass", node, opts); } function assertDeclareFunction(node, opts) { assert("DeclareFunction", node, opts); } function assertDeclareInterface(node, opts) { assert("DeclareInterface", node, opts); } function assertDeclareModule(node, opts) { assert("DeclareModule", node, opts); } function assertDeclareModuleExports(node, opts) { assert("DeclareModuleExports", node, opts); } function assertDeclareTypeAlias(node, opts) { assert("DeclareTypeAlias", node, opts); } function assertDeclareOpaqueType(node, opts) { assert("DeclareOpaqueType", node, opts); } function assertDeclareVariable(node, opts) { assert("DeclareVariable", node, opts); } function assertDeclareExportDeclaration(node, opts) { assert("DeclareExportDeclaration", node, opts); } function assertDeclareExportAllDeclaration(node, opts) { assert("DeclareExportAllDeclaration", node, opts); } function assertDeclaredPredicate(node, opts) { assert("DeclaredPredicate", node, opts); } function assertExistsTypeAnnotation(node, opts) { assert("ExistsTypeAnnotation", node, opts); } function assertFunctionTypeAnnotation(node, opts) { assert("FunctionTypeAnnotation", node, opts); } function assertFunctionTypeParam(node, opts) { assert("FunctionTypeParam", node, opts); } function assertGenericTypeAnnotation(node, opts) { assert("GenericTypeAnnotation", node, opts); } function assertInferredPredicate(node, opts) { assert("InferredPredicate", node, opts); } function assertInterfaceExtends(node, opts) { assert("InterfaceExtends", node, opts); } function assertInterfaceDeclaration(node, opts) { assert("InterfaceDeclaration", node, opts); } function assertInterfaceTypeAnnotation(node, opts) { assert("InterfaceTypeAnnotation", node, opts); } function assertIntersectionTypeAnnotation(node, opts) { assert("IntersectionTypeAnnotation", node, opts); } function assertMixedTypeAnnotation(node, opts) { assert("MixedTypeAnnotation", node, opts); } function assertEmptyTypeAnnotation(node, opts) { assert("EmptyTypeAnnotation", node, opts); } function assertNullableTypeAnnotation(node, opts) { assert("NullableTypeAnnotation", node, opts); } function assertNumberLiteralTypeAnnotation(node, opts) { assert("NumberLiteralTypeAnnotation", node, opts); } function assertNumberTypeAnnotation(node, opts) { assert("NumberTypeAnnotation", node, opts); } function assertObjectTypeAnnotation(node, opts) { assert("ObjectTypeAnnotation", node, opts); } function assertObjectTypeInternalSlot(node, opts) { assert("ObjectTypeInternalSlot", node, opts); } function assertObjectTypeCallProperty(node, opts) { assert("ObjectTypeCallProperty", node, opts); } function assertObjectTypeIndexer(node, opts) { assert("ObjectTypeIndexer", node, opts); } function assertObjectTypeProperty(node, opts) { assert("ObjectTypeProperty", node, opts); } function assertObjectTypeSpreadProperty(node, opts) { assert("ObjectTypeSpreadProperty", node, opts); } function assertOpaqueType(node, opts) { assert("OpaqueType", node, opts); } function assertQualifiedTypeIdentifier(node, opts) { assert("QualifiedTypeIdentifier", node, opts); } function assertStringLiteralTypeAnnotation(node, opts) { assert("StringLiteralTypeAnnotation", node, opts); } function assertStringTypeAnnotation(node, opts) { assert("StringTypeAnnotation", node, opts); } function assertSymbolTypeAnnotation(node, opts) { assert("SymbolTypeAnnotation", node, opts); } function assertThisTypeAnnotation(node, opts) { assert("ThisTypeAnnotation", node, opts); } function assertTupleTypeAnnotation(node, opts) { assert("TupleTypeAnnotation", node, opts); } function assertTypeofTypeAnnotation(node, opts) { assert("TypeofTypeAnnotation", node, opts); } function assertTypeAlias(node, opts) { assert("TypeAlias", node, opts); } function assertTypeAnnotation(node, opts) { assert("TypeAnnotation", node, opts); } function assertTypeCastExpression(node, opts) { assert("TypeCastExpression", node, opts); } function assertTypeParameter(node, opts) { assert("TypeParameter", node, opts); } function assertTypeParameterDeclaration(node, opts) { assert("TypeParameterDeclaration", node, opts); } function assertTypeParameterInstantiation(node, opts) { assert("TypeParameterInstantiation", node, opts); } function assertUnionTypeAnnotation(node, opts) { assert("UnionTypeAnnotation", node, opts); } function assertVariance(node, opts) { assert("Variance", node, opts); } function assertVoidTypeAnnotation(node, opts) { assert("VoidTypeAnnotation", node, opts); } function assertEnumDeclaration(node, opts) { assert("EnumDeclaration", node, opts); } function assertEnumBooleanBody(node, opts) { assert("EnumBooleanBody", node, opts); } function assertEnumNumberBody(node, opts) { assert("EnumNumberBody", node, opts); } function assertEnumStringBody(node, opts) { assert("EnumStringBody", node, opts); } function assertEnumSymbolBody(node, opts) { assert("EnumSymbolBody", node, opts); } function assertEnumBooleanMember(node, opts) { assert("EnumBooleanMember", node, opts); } function assertEnumNumberMember(node, opts) { assert("EnumNumberMember", node, opts); } function assertEnumStringMember(node, opts) { assert("EnumStringMember", node, opts); } function assertEnumDefaultedMember(node, opts) { assert("EnumDefaultedMember", node, opts); } function assertIndexedAccessType(node, opts) { assert("IndexedAccessType", node, opts); } function assertOptionalIndexedAccessType(node, opts) { assert("OptionalIndexedAccessType", node, opts); } function assertJSXAttribute(node, opts) { assert("JSXAttribute", node, opts); } function assertJSXClosingElement(node, opts) { assert("JSXClosingElement", node, opts); } function assertJSXElement(node, opts) { assert("JSXElement", node, opts); } function assertJSXEmptyExpression(node, opts) { assert("JSXEmptyExpression", node, opts); } function assertJSXExpressionContainer(node, opts) { assert("JSXExpressionContainer", node, opts); } function assertJSXSpreadChild(node, opts) { assert("JSXSpreadChild", node, opts); } function assertJSXIdentifier(node, opts) { assert("JSXIdentifier", node, opts); } function assertJSXMemberExpression(node, opts) { assert("JSXMemberExpression", node, opts); } function assertJSXNamespacedName(node, opts) { assert("JSXNamespacedName", node, opts); } function assertJSXOpeningElement(node, opts) { assert("JSXOpeningElement", node, opts); } function assertJSXSpreadAttribute(node, opts) { assert("JSXSpreadAttribute", node, opts); } function assertJSXText(node, opts) { assert("JSXText", node, opts); } function assertJSXFragment(node, opts) { assert("JSXFragment", node, opts); } function assertJSXOpeningFragment(node, opts) { assert("JSXOpeningFragment", node, opts); } function assertJSXClosingFragment(node, opts) { assert("JSXClosingFragment", node, opts); } function assertNoop(node, opts) { assert("Noop", node, opts); } function assertPlaceholder(node, opts) { assert("Placeholder", node, opts); } function assertV8IntrinsicIdentifier(node, opts) { assert("V8IntrinsicIdentifier", node, opts); } function assertArgumentPlaceholder(node, opts) { assert("ArgumentPlaceholder", node, opts); } function assertBindExpression(node, opts) { assert("BindExpression", node, opts); } function assertImportAttribute(node, opts) { assert("ImportAttribute", node, opts); } function assertDecorator(node, opts) { assert("Decorator", node, opts); } function assertDoExpression(node, opts) { assert("DoExpression", node, opts); } function assertExportDefaultSpecifier(node, opts) { assert("ExportDefaultSpecifier", node, opts); } function assertRecordExpression(node, opts) { assert("RecordExpression", node, opts); } function assertTupleExpression(node, opts) { assert("TupleExpression", node, opts); } function assertDecimalLiteral(node, opts) { assert("DecimalLiteral", node, opts); } function assertModuleExpression(node, opts) { assert("ModuleExpression", node, opts); } function assertTopicReference(node, opts) { assert("TopicReference", node, opts); } function assertPipelineTopicExpression(node, opts) { assert("PipelineTopicExpression", node, opts); } function assertPipelineBareFunction(node, opts) { assert("PipelineBareFunction", node, opts); } function assertPipelinePrimaryTopicReference(node, opts) { assert("PipelinePrimaryTopicReference", node, opts); } function assertTSParameterProperty(node, opts) { assert("TSParameterProperty", node, opts); } function assertTSDeclareFunction(node, opts) { assert("TSDeclareFunction", node, opts); } function assertTSDeclareMethod(node, opts) { assert("TSDeclareMethod", node, opts); } function assertTSQualifiedName(node, opts) { assert("TSQualifiedName", node, opts); } function assertTSCallSignatureDeclaration(node, opts) { assert("TSCallSignatureDeclaration", node, opts); } function assertTSConstructSignatureDeclaration(node, opts) { assert("TSConstructSignatureDeclaration", node, opts); } function assertTSPropertySignature(node, opts) { assert("TSPropertySignature", node, opts); } function assertTSMethodSignature(node, opts) { assert("TSMethodSignature", node, opts); } function assertTSIndexSignature(node, opts) { assert("TSIndexSignature", node, opts); } function assertTSAnyKeyword(node, opts) { assert("TSAnyKeyword", node, opts); } function assertTSBooleanKeyword(node, opts) { assert("TSBooleanKeyword", node, opts); } function assertTSBigIntKeyword(node, opts) { assert("TSBigIntKeyword", node, opts); } function assertTSIntrinsicKeyword(node, opts) { assert("TSIntrinsicKeyword", node, opts); } function assertTSNeverKeyword(node, opts) { assert("TSNeverKeyword", node, opts); } function assertTSNullKeyword(node, opts) { assert("TSNullKeyword", node, opts); } function assertTSNumberKeyword(node, opts) { assert("TSNumberKeyword", node, opts); } function assertTSObjectKeyword(node, opts) { assert("TSObjectKeyword", node, opts); } function assertTSStringKeyword(node, opts) { assert("TSStringKeyword", node, opts); } function assertTSSymbolKeyword(node, opts) { assert("TSSymbolKeyword", node, opts); } function assertTSUndefinedKeyword(node, opts) { assert("TSUndefinedKeyword", node, opts); } function assertTSUnknownKeyword(node, opts) { assert("TSUnknownKeyword", node, opts); } function assertTSVoidKeyword(node, opts) { assert("TSVoidKeyword", node, opts); } function assertTSThisType(node, opts) { assert("TSThisType", node, opts); } function assertTSFunctionType(node, opts) { assert("TSFunctionType", node, opts); } function assertTSConstructorType(node, opts) { assert("TSConstructorType", node, opts); } function assertTSTypeReference(node, opts) { assert("TSTypeReference", node, opts); } function assertTSTypePredicate(node, opts) { assert("TSTypePredicate", node, opts); } function assertTSTypeQuery(node, opts) { assert("TSTypeQuery", node, opts); } function assertTSTypeLiteral(node, opts) { assert("TSTypeLiteral", node, opts); } function assertTSArrayType(node, opts) { assert("TSArrayType", node, opts); } function assertTSTupleType(node, opts) { assert("TSTupleType", node, opts); } function assertTSOptionalType(node, opts) { assert("TSOptionalType", node, opts); } function assertTSRestType(node, opts) { assert("TSRestType", node, opts); } function assertTSNamedTupleMember(node, opts) { assert("TSNamedTupleMember", node, opts); } function assertTSUnionType(node, opts) { assert("TSUnionType", node, opts); } function assertTSIntersectionType(node, opts) { assert("TSIntersectionType", node, opts); } function assertTSConditionalType(node, opts) { assert("TSConditionalType", node, opts); } function assertTSInferType(node, opts) { assert("TSInferType", node, opts); } function assertTSParenthesizedType(node, opts) { assert("TSParenthesizedType", node, opts); } function assertTSTypeOperator(node, opts) { assert("TSTypeOperator", node, opts); } function assertTSIndexedAccessType(node, opts) { assert("TSIndexedAccessType", node, opts); } function assertTSMappedType(node, opts) { assert("TSMappedType", node, opts); } function assertTSLiteralType(node, opts) { assert("TSLiteralType", node, opts); } function assertTSExpressionWithTypeArguments(node, opts) { assert("TSExpressionWithTypeArguments", node, opts); } function assertTSInterfaceDeclaration(node, opts) { assert("TSInterfaceDeclaration", node, opts); } function assertTSInterfaceBody(node, opts) { assert("TSInterfaceBody", node, opts); } function assertTSTypeAliasDeclaration(node, opts) { assert("TSTypeAliasDeclaration", node, opts); } function assertTSAsExpression(node, opts) { assert("TSAsExpression", node, opts); } function assertTSTypeAssertion(node, opts) { assert("TSTypeAssertion", node, opts); } function assertTSEnumDeclaration(node, opts) { assert("TSEnumDeclaration", node, opts); } function assertTSEnumMember(node, opts) { assert("TSEnumMember", node, opts); } function assertTSModuleDeclaration(node, opts) { assert("TSModuleDeclaration", node, opts); } function assertTSModuleBlock(node, opts) { assert("TSModuleBlock", node, opts); } function assertTSImportType(node, opts) { assert("TSImportType", node, opts); } function assertTSImportEqualsDeclaration(node, opts) { assert("TSImportEqualsDeclaration", node, opts); } function assertTSExternalModuleReference(node, opts) { assert("TSExternalModuleReference", node, opts); } function assertTSNonNullExpression(node, opts) { assert("TSNonNullExpression", node, opts); } function assertTSExportAssignment(node, opts) { assert("TSExportAssignment", node, opts); } function assertTSNamespaceExportDeclaration(node, opts) { assert("TSNamespaceExportDeclaration", node, opts); } function assertTSTypeAnnotation(node, opts) { assert("TSTypeAnnotation", node, opts); } function assertTSTypeParameterInstantiation(node, opts) { assert("TSTypeParameterInstantiation", node, opts); } function assertTSTypeParameterDeclaration(node, opts) { assert("TSTypeParameterDeclaration", node, opts); } function assertTSTypeParameter(node, opts) { assert("TSTypeParameter", node, opts); } function assertStandardized(node, opts) { assert("Standardized", node, opts); } function assertExpression(node, opts) { assert("Expression", node, opts); } function assertBinary(node, opts) { assert("Binary", node, opts); } function assertScopable(node, opts) { assert("Scopable", node, opts); } function assertBlockParent(node, opts) { assert("BlockParent", node, opts); } function assertBlock(node, opts) { assert("Block", node, opts); } function assertStatement(node, opts) { assert("Statement", node, opts); } function assertTerminatorless(node, opts) { assert("Terminatorless", node, opts); } function assertCompletionStatement(node, opts) { assert("CompletionStatement", node, opts); } function assertConditional(node, opts) { assert("Conditional", node, opts); } function assertLoop(node, opts) { assert("Loop", node, opts); } function assertWhile(node, opts) { assert("While", node, opts); } function assertExpressionWrapper(node, opts) { assert("ExpressionWrapper", node, opts); } function assertFor(node, opts) { assert("For", node, opts); } function assertForXStatement(node, opts) { assert("ForXStatement", node, opts); } function assertFunction(node, opts) { assert("Function", node, opts); } function assertFunctionParent(node, opts) { assert("FunctionParent", node, opts); } function assertPureish(node, opts) { assert("Pureish", node, opts); } function assertDeclaration(node, opts) { assert("Declaration", node, opts); } function assertPatternLike(node, opts) { assert("PatternLike", node, opts); } function assertLVal(node, opts) { assert("LVal", node, opts); } function assertTSEntityName(node, opts) { assert("TSEntityName", node, opts); } function assertLiteral(node, opts) { assert("Literal", node, opts); } function assertImmutable(node, opts) { assert("Immutable", node, opts); } function assertUserWhitespacable(node, opts) { assert("UserWhitespacable", node, opts); } function assertMethod(node, opts) { assert("Method", node, opts); } function assertObjectMember(node, opts) { assert("ObjectMember", node, opts); } function assertProperty(node, opts) { assert("Property", node, opts); } function assertUnaryLike(node, opts) { assert("UnaryLike", node, opts); } function assertPattern(node, opts) { assert("Pattern", node, opts); } function assertClass(node, opts) { assert("Class", node, opts); } function assertModuleDeclaration(node, opts) { assert("ModuleDeclaration", node, opts); } function assertExportDeclaration(node, opts) { assert("ExportDeclaration", node, opts); } function assertModuleSpecifier(node, opts) { assert("ModuleSpecifier", node, opts); } function assertAccessor(node, opts) { assert("Accessor", node, opts); } function assertPrivate(node, opts) { assert("Private", node, opts); } function assertFlow(node, opts) { assert("Flow", node, opts); } function assertFlowType(node, opts) { assert("FlowType", node, opts); } function assertFlowBaseAnnotation(node, opts) { assert("FlowBaseAnnotation", node, opts); } function assertFlowDeclaration(node, opts) { assert("FlowDeclaration", node, opts); } function assertFlowPredicate(node, opts) { assert("FlowPredicate", node, opts); } function assertEnumBody(node, opts) { assert("EnumBody", node, opts); } function assertEnumMember(node, opts) { assert("EnumMember", node, opts); } function assertJSX(node, opts) { assert("JSX", node, opts); } function assertMiscellaneous(node, opts) { assert("Miscellaneous", node, opts); } function assertTypeScript(node, opts) { assert("TypeScript", node, opts); } function assertTSTypeElement(node, opts) { assert("TSTypeElement", node, opts); } function assertTSType(node, opts) { assert("TSType", node, opts); } function assertTSBaseType(node, opts) { assert("TSBaseType", node, opts); } function assertNumberLiteral(node, opts) { console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); assert("NumberLiteral", node, opts); } function assertRegexLiteral(node, opts) { console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); assert("RegexLiteral", node, opts); } function assertRestProperty(node, opts) { console.trace("The node type RestProperty has been renamed to RestElement"); assert("RestProperty", node, opts); } function assertSpreadProperty(node, opts) { console.trace("The node type SpreadProperty has been renamed to SpreadElement"); assert("SpreadProperty", node, opts); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js var require_createTypeAnnotationBasedOnTypeof3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var _generated = require_generated12(); var _default = createTypeAnnotationBasedOnTypeof; exports2.default = _default; function createTypeAnnotationBasedOnTypeof(type) { switch (type) { case "string": return (0, _generated.stringTypeAnnotation)(); case "number": return (0, _generated.numberTypeAnnotation)(); case "undefined": return (0, _generated.voidTypeAnnotation)(); case "boolean": return (0, _generated.booleanTypeAnnotation)(); case "function": return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function")); case "object": return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object")); case "symbol": return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol")); case "bigint": return (0, _generated.anyTypeAnnotation)(); } throw new Error("Invalid typeof value: " + type); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js var require_removeTypeDuplicates5 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = removeTypeDuplicates; var _generated = require_generated11(); function getQualifiedName(node) { return (0, _generated.isIdentifier)(node) ? node.name : `${node.id.name}.${getQualifiedName(node.qualification)}`; } function removeTypeDuplicates(nodes) { const generics = {}; const bases = {}; const typeGroups = /* @__PURE__ */ new Set(); const types = []; for (let i = 0; i < nodes.length; i++) { const node = nodes[i]; if (!node) continue; if (types.indexOf(node) >= 0) { continue; } if ((0, _generated.isAnyTypeAnnotation)(node)) { return [node]; } if ((0, _generated.isFlowBaseAnnotation)(node)) { bases[node.type] = node; continue; } if ((0, _generated.isUnionTypeAnnotation)(node)) { if (!typeGroups.has(node.types)) { nodes = nodes.concat(node.types); typeGroups.add(node.types); } continue; } if ((0, _generated.isGenericTypeAnnotation)(node)) { const name = getQualifiedName(node.id); if (generics[name]) { let existing = generics[name]; if (existing.typeParameters) { if (node.typeParameters) { existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params)); } } else { existing = node.typeParameters; } } else { generics[name] = node; } continue; } types.push(node); } for (const type of Object.keys(bases)) { types.push(bases[type]); } for (const name of Object.keys(generics)) { types.push(generics[name]); } return types; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js var require_createFlowUnionType3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = createFlowUnionType; var _generated = require_generated12(); var _removeTypeDuplicates = require_removeTypeDuplicates5(); function createFlowUnionType(types) { const flattened = (0, _removeTypeDuplicates.default)(types); if (flattened.length === 1) { return flattened[0]; } else { return (0, _generated.unionTypeAnnotation)(flattened); } } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js var require_removeTypeDuplicates6 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = removeTypeDuplicates; var _generated = require_generated11(); function removeTypeDuplicates(nodes) { const generics = {}; const bases = {}; const typeGroups = /* @__PURE__ */ new Set(); const types = []; for (let i = 0; i < nodes.length; i++) { const node = nodes[i]; if (!node) continue; if (types.indexOf(node) >= 0) { continue; } if ((0, _generated.isTSAnyKeyword)(node)) { return [node]; } if ((0, _generated.isTSBaseType)(node)) { bases[node.type] = node; continue; } if ((0, _generated.isTSUnionType)(node)) { if (!typeGroups.has(node.types)) { nodes.push(...node.types); typeGroups.add(node.types); } continue; } types.push(node); } for (const type of Object.keys(bases)) { types.push(bases[type]); } for (const name of Object.keys(generics)) { types.push(generics[name]); } return types; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js var require_createTSUnionType3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = createTSUnionType; var _generated = require_generated12(); var _removeTypeDuplicates = require_removeTypeDuplicates6(); function createTSUnionType(typeAnnotations) { const types = typeAnnotations.map((type) => type.typeAnnotation); const flattened = (0, _removeTypeDuplicates.default)(types); if (flattened.length === 1) { return flattened[0]; } else { return (0, _generated.tsUnionType)(flattened); } } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/builders/generated/uppercase.js var require_uppercase3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/builders/generated/uppercase.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "AnyTypeAnnotation", { enumerable: true, get: function() { return _index.anyTypeAnnotation; } }); Object.defineProperty(exports2, "ArgumentPlaceholder", { enumerable: true, get: function() { return _index.argumentPlaceholder; } }); Object.defineProperty(exports2, "ArrayExpression", { enumerable: true, get: function() { return _index.arrayExpression; } }); Object.defineProperty(exports2, "ArrayPattern", { enumerable: true, get: function() { return _index.arrayPattern; } }); Object.defineProperty(exports2, "ArrayTypeAnnotation", { enumerable: true, get: function() { return _index.arrayTypeAnnotation; } }); Object.defineProperty(exports2, "ArrowFunctionExpression", { enumerable: true, get: function() { return _index.arrowFunctionExpression; } }); Object.defineProperty(exports2, "AssignmentExpression", { enumerable: true, get: function() { return _index.assignmentExpression; } }); Object.defineProperty(exports2, "AssignmentPattern", { enumerable: true, get: function() { return _index.assignmentPattern; } }); Object.defineProperty(exports2, "AwaitExpression", { enumerable: true, get: function() { return _index.awaitExpression; } }); Object.defineProperty(exports2, "BigIntLiteral", { enumerable: true, get: function() { return _index.bigIntLiteral; } }); Object.defineProperty(exports2, "BinaryExpression", { enumerable: true, get: function() { return _index.binaryExpression; } }); Object.defineProperty(exports2, "BindExpression", { enumerable: true, get: function() { return _index.bindExpression; } }); Object.defineProperty(exports2, "BlockStatement", { enumerable: true, get: function() { return _index.blockStatement; } }); Object.defineProperty(exports2, "BooleanLiteral", { enumerable: true, get: function() { return _index.booleanLiteral; } }); Object.defineProperty(exports2, "BooleanLiteralTypeAnnotation", { enumerable: true, get: function() { return _index.booleanLiteralTypeAnnotation; } }); Object.defineProperty(exports2, "BooleanTypeAnnotation", { enumerable: true, get: function() { return _index.booleanTypeAnnotation; } }); Object.defineProperty(exports2, "BreakStatement", { enumerable: true, get: function() { return _index.breakStatement; } }); Object.defineProperty(exports2, "CallExpression", { enumerable: true, get: function() { return _index.callExpression; } }); Object.defineProperty(exports2, "CatchClause", { enumerable: true, get: function() { return _index.catchClause; } }); Object.defineProperty(exports2, "ClassAccessorProperty", { enumerable: true, get: function() { return _index.classAccessorProperty; } }); Object.defineProperty(exports2, "ClassBody", { enumerable: true, get: function() { return _index.classBody; } }); Object.defineProperty(exports2, "ClassDeclaration", { enumerable: true, get: function() { return _index.classDeclaration; } }); Object.defineProperty(exports2, "ClassExpression", { enumerable: true, get: function() { return _index.classExpression; } }); Object.defineProperty(exports2, "ClassImplements", { enumerable: true, get: function() { return _index.classImplements; } }); Object.defineProperty(exports2, "ClassMethod", { enumerable: true, get: function() { return _index.classMethod; } }); Object.defineProperty(exports2, "ClassPrivateMethod", { enumerable: true, get: function() { return _index.classPrivateMethod; } }); Object.defineProperty(exports2, "ClassPrivateProperty", { enumerable: true, get: function() { return _index.classPrivateProperty; } }); Object.defineProperty(exports2, "ClassProperty", { enumerable: true, get: function() { return _index.classProperty; } }); Object.defineProperty(exports2, "ConditionalExpression", { enumerable: true, get: function() { return _index.conditionalExpression; } }); Object.defineProperty(exports2, "ContinueStatement", { enumerable: true, get: function() { return _index.continueStatement; } }); Object.defineProperty(exports2, "DebuggerStatement", { enumerable: true, get: function() { return _index.debuggerStatement; } }); Object.defineProperty(exports2, "DecimalLiteral", { enumerable: true, get: function() { return _index.decimalLiteral; } }); Object.defineProperty(exports2, "DeclareClass", { enumerable: true, get: function() { return _index.declareClass; } }); Object.defineProperty(exports2, "DeclareExportAllDeclaration", { enumerable: true, get: function() { return _index.declareExportAllDeclaration; } }); Object.defineProperty(exports2, "DeclareExportDeclaration", { enumerable: true, get: function() { return _index.declareExportDeclaration; } }); Object.defineProperty(exports2, "DeclareFunction", { enumerable: true, get: function() { return _index.declareFunction; } }); Object.defineProperty(exports2, "DeclareInterface", { enumerable: true, get: function() { return _index.declareInterface; } }); Object.defineProperty(exports2, "DeclareModule", { enumerable: true, get: function() { return _index.declareModule; } }); Object.defineProperty(exports2, "DeclareModuleExports", { enumerable: true, get: function() { return _index.declareModuleExports; } }); Object.defineProperty(exports2, "DeclareOpaqueType", { enumerable: true, get: function() { return _index.declareOpaqueType; } }); Object.defineProperty(exports2, "DeclareTypeAlias", { enumerable: true, get: function() { return _index.declareTypeAlias; } }); Object.defineProperty(exports2, "DeclareVariable", { enumerable: true, get: function() { return _index.declareVariable; } }); Object.defineProperty(exports2, "DeclaredPredicate", { enumerable: true, get: function() { return _index.declaredPredicate; } }); Object.defineProperty(exports2, "Decorator", { enumerable: true, get: function() { return _index.decorator; } }); Object.defineProperty(exports2, "Directive", { enumerable: true, get: function() { return _index.directive; } }); Object.defineProperty(exports2, "DirectiveLiteral", { enumerable: true, get: function() { return _index.directiveLiteral; } }); Object.defineProperty(exports2, "DoExpression", { enumerable: true, get: function() { return _index.doExpression; } }); Object.defineProperty(exports2, "DoWhileStatement", { enumerable: true, get: function() { return _index.doWhileStatement; } }); Object.defineProperty(exports2, "EmptyStatement", { enumerable: true, get: function() { return _index.emptyStatement; } }); Object.defineProperty(exports2, "EmptyTypeAnnotation", { enumerable: true, get: function() { return _index.emptyTypeAnnotation; } }); Object.defineProperty(exports2, "EnumBooleanBody", { enumerable: true, get: function() { return _index.enumBooleanBody; } }); Object.defineProperty(exports2, "EnumBooleanMember", { enumerable: true, get: function() { return _index.enumBooleanMember; } }); Object.defineProperty(exports2, "EnumDeclaration", { enumerable: true, get: function() { return _index.enumDeclaration; } }); Object.defineProperty(exports2, "EnumDefaultedMember", { enumerable: true, get: function() { return _index.enumDefaultedMember; } }); Object.defineProperty(exports2, "EnumNumberBody", { enumerable: true, get: function() { return _index.enumNumberBody; } }); Object.defineProperty(exports2, "EnumNumberMember", { enumerable: true, get: function() { return _index.enumNumberMember; } }); Object.defineProperty(exports2, "EnumStringBody", { enumerable: true, get: function() { return _index.enumStringBody; } }); Object.defineProperty(exports2, "EnumStringMember", { enumerable: true, get: function() { return _index.enumStringMember; } }); Object.defineProperty(exports2, "EnumSymbolBody", { enumerable: true, get: function() { return _index.enumSymbolBody; } }); Object.defineProperty(exports2, "ExistsTypeAnnotation", { enumerable: true, get: function() { return _index.existsTypeAnnotation; } }); Object.defineProperty(exports2, "ExportAllDeclaration", { enumerable: true, get: function() { return _index.exportAllDeclaration; } }); Object.defineProperty(exports2, "ExportDefaultDeclaration", { enumerable: true, get: function() { return _index.exportDefaultDeclaration; } }); Object.defineProperty(exports2, "ExportDefaultSpecifier", { enumerable: true, get: function() { return _index.exportDefaultSpecifier; } }); Object.defineProperty(exports2, "ExportNamedDeclaration", { enumerable: true, get: function() { return _index.exportNamedDeclaration; } }); Object.defineProperty(exports2, "ExportNamespaceSpecifier", { enumerable: true, get: function() { return _index.exportNamespaceSpecifier; } }); Object.defineProperty(exports2, "ExportSpecifier", { enumerable: true, get: function() { return _index.exportSpecifier; } }); Object.defineProperty(exports2, "ExpressionStatement", { enumerable: true, get: function() { return _index.expressionStatement; } }); Object.defineProperty(exports2, "File", { enumerable: true, get: function() { return _index.file; } }); Object.defineProperty(exports2, "ForInStatement", { enumerable: true, get: function() { return _index.forInStatement; } }); Object.defineProperty(exports2, "ForOfStatement", { enumerable: true, get: function() { return _index.forOfStatement; } }); Object.defineProperty(exports2, "ForStatement", { enumerable: true, get: function() { return _index.forStatement; } }); Object.defineProperty(exports2, "FunctionDeclaration", { enumerable: true, get: function() { return _index.functionDeclaration; } }); Object.defineProperty(exports2, "FunctionExpression", { enumerable: true, get: function() { return _index.functionExpression; } }); Object.defineProperty(exports2, "FunctionTypeAnnotation", { enumerable: true, get: function() { return _index.functionTypeAnnotation; } }); Object.defineProperty(exports2, "FunctionTypeParam", { enumerable: true, get: function() { return _index.functionTypeParam; } }); Object.defineProperty(exports2, "GenericTypeAnnotation", { enumerable: true, get: function() { return _index.genericTypeAnnotation; } }); Object.defineProperty(exports2, "Identifier", { enumerable: true, get: function() { return _index.identifier; } }); Object.defineProperty(exports2, "IfStatement", { enumerable: true, get: function() { return _index.ifStatement; } }); Object.defineProperty(exports2, "Import", { enumerable: true, get: function() { return _index.import; } }); Object.defineProperty(exports2, "ImportAttribute", { enumerable: true, get: function() { return _index.importAttribute; } }); Object.defineProperty(exports2, "ImportDeclaration", { enumerable: true, get: function() { return _index.importDeclaration; } }); Object.defineProperty(exports2, "ImportDefaultSpecifier", { enumerable: true, get: function() { return _index.importDefaultSpecifier; } }); Object.defineProperty(exports2, "ImportNamespaceSpecifier", { enumerable: true, get: function() { return _index.importNamespaceSpecifier; } }); Object.defineProperty(exports2, "ImportSpecifier", { enumerable: true, get: function() { return _index.importSpecifier; } }); Object.defineProperty(exports2, "IndexedAccessType", { enumerable: true, get: function() { return _index.indexedAccessType; } }); Object.defineProperty(exports2, "InferredPredicate", { enumerable: true, get: function() { return _index.inferredPredicate; } }); Object.defineProperty(exports2, "InterfaceDeclaration", { enumerable: true, get: function() { return _index.interfaceDeclaration; } }); Object.defineProperty(exports2, "InterfaceExtends", { enumerable: true, get: function() { return _index.interfaceExtends; } }); Object.defineProperty(exports2, "InterfaceTypeAnnotation", { enumerable: true, get: function() { return _index.interfaceTypeAnnotation; } }); Object.defineProperty(exports2, "InterpreterDirective", { enumerable: true, get: function() { return _index.interpreterDirective; } }); Object.defineProperty(exports2, "IntersectionTypeAnnotation", { enumerable: true, get: function() { return _index.intersectionTypeAnnotation; } }); Object.defineProperty(exports2, "JSXAttribute", { enumerable: true, get: function() { return _index.jsxAttribute; } }); Object.defineProperty(exports2, "JSXClosingElement", { enumerable: true, get: function() { return _index.jsxClosingElement; } }); Object.defineProperty(exports2, "JSXClosingFragment", { enumerable: true, get: function() { return _index.jsxClosingFragment; } }); Object.defineProperty(exports2, "JSXElement", { enumerable: true, get: function() { return _index.jsxElement; } }); Object.defineProperty(exports2, "JSXEmptyExpression", { enumerable: true, get: function() { return _index.jsxEmptyExpression; } }); Object.defineProperty(exports2, "JSXExpressionContainer", { enumerable: true, get: function() { return _index.jsxExpressionContainer; } }); Object.defineProperty(exports2, "JSXFragment", { enumerable: true, get: function() { return _index.jsxFragment; } }); Object.defineProperty(exports2, "JSXIdentifier", { enumerable: true, get: function() { return _index.jsxIdentifier; } }); Object.defineProperty(exports2, "JSXMemberExpression", { enumerable: true, get: function() { return _index.jsxMemberExpression; } }); Object.defineProperty(exports2, "JSXNamespacedName", { enumerable: true, get: function() { return _index.jsxNamespacedName; } }); Object.defineProperty(exports2, "JSXOpeningElement", { enumerable: true, get: function() { return _index.jsxOpeningElement; } }); Object.defineProperty(exports2, "JSXOpeningFragment", { enumerable: true, get: function() { return _index.jsxOpeningFragment; } }); Object.defineProperty(exports2, "JSXSpreadAttribute", { enumerable: true, get: function() { return _index.jsxSpreadAttribute; } }); Object.defineProperty(exports2, "JSXSpreadChild", { enumerable: true, get: function() { return _index.jsxSpreadChild; } }); Object.defineProperty(exports2, "JSXText", { enumerable: true, get: function() { return _index.jsxText; } }); Object.defineProperty(exports2, "LabeledStatement", { enumerable: true, get: function() { return _index.labeledStatement; } }); Object.defineProperty(exports2, "LogicalExpression", { enumerable: true, get: function() { return _index.logicalExpression; } }); Object.defineProperty(exports2, "MemberExpression", { enumerable: true, get: function() { return _index.memberExpression; } }); Object.defineProperty(exports2, "MetaProperty", { enumerable: true, get: function() { return _index.metaProperty; } }); Object.defineProperty(exports2, "MixedTypeAnnotation", { enumerable: true, get: function() { return _index.mixedTypeAnnotation; } }); Object.defineProperty(exports2, "ModuleExpression", { enumerable: true, get: function() { return _index.moduleExpression; } }); Object.defineProperty(exports2, "NewExpression", { enumerable: true, get: function() { return _index.newExpression; } }); Object.defineProperty(exports2, "Noop", { enumerable: true, get: function() { return _index.noop; } }); Object.defineProperty(exports2, "NullLiteral", { enumerable: true, get: function() { return _index.nullLiteral; } }); Object.defineProperty(exports2, "NullLiteralTypeAnnotation", { enumerable: true, get: function() { return _index.nullLiteralTypeAnnotation; } }); Object.defineProperty(exports2, "NullableTypeAnnotation", { enumerable: true, get: function() { return _index.nullableTypeAnnotation; } }); Object.defineProperty(exports2, "NumberLiteral", { enumerable: true, get: function() { return _index.numberLiteral; } }); Object.defineProperty(exports2, "NumberLiteralTypeAnnotation", { enumerable: true, get: function() { return _index.numberLiteralTypeAnnotation; } }); Object.defineProperty(exports2, "NumberTypeAnnotation", { enumerable: true, get: function() { return _index.numberTypeAnnotation; } }); Object.defineProperty(exports2, "NumericLiteral", { enumerable: true, get: function() { return _index.numericLiteral; } }); Object.defineProperty(exports2, "ObjectExpression", { enumerable: true, get: function() { return _index.objectExpression; } }); Object.defineProperty(exports2, "ObjectMethod", { enumerable: true, get: function() { return _index.objectMethod; } }); Object.defineProperty(exports2, "ObjectPattern", { enumerable: true, get: function() { return _index.objectPattern; } }); Object.defineProperty(exports2, "ObjectProperty", { enumerable: true, get: function() { return _index.objectProperty; } }); Object.defineProperty(exports2, "ObjectTypeAnnotation", { enumerable: true, get: function() { return _index.objectTypeAnnotation; } }); Object.defineProperty(exports2, "ObjectTypeCallProperty", { enumerable: true, get: function() { return _index.objectTypeCallProperty; } }); Object.defineProperty(exports2, "ObjectTypeIndexer", { enumerable: true, get: function() { return _index.objectTypeIndexer; } }); Object.defineProperty(exports2, "ObjectTypeInternalSlot", { enumerable: true, get: function() { return _index.objectTypeInternalSlot; } }); Object.defineProperty(exports2, "ObjectTypeProperty", { enumerable: true, get: function() { return _index.objectTypeProperty; } }); Object.defineProperty(exports2, "ObjectTypeSpreadProperty", { enumerable: true, get: function() { return _index.objectTypeSpreadProperty; } }); Object.defineProperty(exports2, "OpaqueType", { enumerable: true, get: function() { return _index.opaqueType; } }); Object.defineProperty(exports2, "OptionalCallExpression", { enumerable: true, get: function() { return _index.optionalCallExpression; } }); Object.defineProperty(exports2, "OptionalIndexedAccessType", { enumerable: true, get: function() { return _index.optionalIndexedAccessType; } }); Object.defineProperty(exports2, "OptionalMemberExpression", { enumerable: true, get: function() { return _index.optionalMemberExpression; } }); Object.defineProperty(exports2, "ParenthesizedExpression", { enumerable: true, get: function() { return _index.parenthesizedExpression; } }); Object.defineProperty(exports2, "PipelineBareFunction", { enumerable: true, get: function() { return _index.pipelineBareFunction; } }); Object.defineProperty(exports2, "PipelinePrimaryTopicReference", { enumerable: true, get: function() { return _index.pipelinePrimaryTopicReference; } }); Object.defineProperty(exports2, "PipelineTopicExpression", { enumerable: true, get: function() { return _index.pipelineTopicExpression; } }); Object.defineProperty(exports2, "Placeholder", { enumerable: true, get: function() { return _index.placeholder; } }); Object.defineProperty(exports2, "PrivateName", { enumerable: true, get: function() { return _index.privateName; } }); Object.defineProperty(exports2, "Program", { enumerable: true, get: function() { return _index.program; } }); Object.defineProperty(exports2, "QualifiedTypeIdentifier", { enumerable: true, get: function() { return _index.qualifiedTypeIdentifier; } }); Object.defineProperty(exports2, "RecordExpression", { enumerable: true, get: function() { return _index.recordExpression; } }); Object.defineProperty(exports2, "RegExpLiteral", { enumerable: true, get: function() { return _index.regExpLiteral; } }); Object.defineProperty(exports2, "RegexLiteral", { enumerable: true, get: function() { return _index.regexLiteral; } }); Object.defineProperty(exports2, "RestElement", { enumerable: true, get: function() { return _index.restElement; } }); Object.defineProperty(exports2, "RestProperty", { enumerable: true, get: function() { return _index.restProperty; } }); Object.defineProperty(exports2, "ReturnStatement", { enumerable: true, get: function() { return _index.returnStatement; } }); Object.defineProperty(exports2, "SequenceExpression", { enumerable: true, get: function() { return _index.sequenceExpression; } }); Object.defineProperty(exports2, "SpreadElement", { enumerable: true, get: function() { return _index.spreadElement; } }); Object.defineProperty(exports2, "SpreadProperty", { enumerable: true, get: function() { return _index.spreadProperty; } }); Object.defineProperty(exports2, "StaticBlock", { enumerable: true, get: function() { return _index.staticBlock; } }); Object.defineProperty(exports2, "StringLiteral", { enumerable: true, get: function() { return _index.stringLiteral; } }); Object.defineProperty(exports2, "StringLiteralTypeAnnotation", { enumerable: true, get: function() { return _index.stringLiteralTypeAnnotation; } }); Object.defineProperty(exports2, "StringTypeAnnotation", { enumerable: true, get: function() { return _index.stringTypeAnnotation; } }); Object.defineProperty(exports2, "Super", { enumerable: true, get: function() { return _index.super; } }); Object.defineProperty(exports2, "SwitchCase", { enumerable: true, get: function() { return _index.switchCase; } }); Object.defineProperty(exports2, "SwitchStatement", { enumerable: true, get: function() { return _index.switchStatement; } }); Object.defineProperty(exports2, "SymbolTypeAnnotation", { enumerable: true, get: function() { return _index.symbolTypeAnnotation; } }); Object.defineProperty(exports2, "TSAnyKeyword", { enumerable: true, get: function() { return _index.tsAnyKeyword; } }); Object.defineProperty(exports2, "TSArrayType", { enumerable: true, get: function() { return _index.tsArrayType; } }); Object.defineProperty(exports2, "TSAsExpression", { enumerable: true, get: function() { return _index.tsAsExpression; } }); Object.defineProperty(exports2, "TSBigIntKeyword", { enumerable: true, get: function() { return _index.tsBigIntKeyword; } }); Object.defineProperty(exports2, "TSBooleanKeyword", { enumerable: true, get: function() { return _index.tsBooleanKeyword; } }); Object.defineProperty(exports2, "TSCallSignatureDeclaration", { enumerable: true, get: function() { return _index.tsCallSignatureDeclaration; } }); Object.defineProperty(exports2, "TSConditionalType", { enumerable: true, get: function() { return _index.tsConditionalType; } }); Object.defineProperty(exports2, "TSConstructSignatureDeclaration", { enumerable: true, get: function() { return _index.tsConstructSignatureDeclaration; } }); Object.defineProperty(exports2, "TSConstructorType", { enumerable: true, get: function() { return _index.tsConstructorType; } }); Object.defineProperty(exports2, "TSDeclareFunction", { enumerable: true, get: function() { return _index.tsDeclareFunction; } }); Object.defineProperty(exports2, "TSDeclareMethod", { enumerable: true, get: function() { return _index.tsDeclareMethod; } }); Object.defineProperty(exports2, "TSEnumDeclaration", { enumerable: true, get: function() { return _index.tsEnumDeclaration; } }); Object.defineProperty(exports2, "TSEnumMember", { enumerable: true, get: function() { return _index.tsEnumMember; } }); Object.defineProperty(exports2, "TSExportAssignment", { enumerable: true, get: function() { return _index.tsExportAssignment; } }); Object.defineProperty(exports2, "TSExpressionWithTypeArguments", { enumerable: true, get: function() { return _index.tsExpressionWithTypeArguments; } }); Object.defineProperty(exports2, "TSExternalModuleReference", { enumerable: true, get: function() { return _index.tsExternalModuleReference; } }); Object.defineProperty(exports2, "TSFunctionType", { enumerable: true, get: function() { return _index.tsFunctionType; } }); Object.defineProperty(exports2, "TSImportEqualsDeclaration", { enumerable: true, get: function() { return _index.tsImportEqualsDeclaration; } }); Object.defineProperty(exports2, "TSImportType", { enumerable: true, get: function() { return _index.tsImportType; } }); Object.defineProperty(exports2, "TSIndexSignature", { enumerable: true, get: function() { return _index.tsIndexSignature; } }); Object.defineProperty(exports2, "TSIndexedAccessType", { enumerable: true, get: function() { return _index.tsIndexedAccessType; } }); Object.defineProperty(exports2, "TSInferType", { enumerable: true, get: function() { return _index.tsInferType; } }); Object.defineProperty(exports2, "TSInterfaceBody", { enumerable: true, get: function() { return _index.tsInterfaceBody; } }); Object.defineProperty(exports2, "TSInterfaceDeclaration", { enumerable: true, get: function() { return _index.tsInterfaceDeclaration; } }); Object.defineProperty(exports2, "TSIntersectionType", { enumerable: true, get: function() { return _index.tsIntersectionType; } }); Object.defineProperty(exports2, "TSIntrinsicKeyword", { enumerable: true, get: function() { return _index.tsIntrinsicKeyword; } }); Object.defineProperty(exports2, "TSLiteralType", { enumerable: true, get: function() { return _index.tsLiteralType; } }); Object.defineProperty(exports2, "TSMappedType", { enumerable: true, get: function() { return _index.tsMappedType; } }); Object.defineProperty(exports2, "TSMethodSignature", { enumerable: true, get: function() { return _index.tsMethodSignature; } }); Object.defineProperty(exports2, "TSModuleBlock", { enumerable: true, get: function() { return _index.tsModuleBlock; } }); Object.defineProperty(exports2, "TSModuleDeclaration", { enumerable: true, get: function() { return _index.tsModuleDeclaration; } }); Object.defineProperty(exports2, "TSNamedTupleMember", { enumerable: true, get: function() { return _index.tsNamedTupleMember; } }); Object.defineProperty(exports2, "TSNamespaceExportDeclaration", { enumerable: true, get: function() { return _index.tsNamespaceExportDeclaration; } }); Object.defineProperty(exports2, "TSNeverKeyword", { enumerable: true, get: function() { return _index.tsNeverKeyword; } }); Object.defineProperty(exports2, "TSNonNullExpression", { enumerable: true, get: function() { return _index.tsNonNullExpression; } }); Object.defineProperty(exports2, "TSNullKeyword", { enumerable: true, get: function() { return _index.tsNullKeyword; } }); Object.defineProperty(exports2, "TSNumberKeyword", { enumerable: true, get: function() { return _index.tsNumberKeyword; } }); Object.defineProperty(exports2, "TSObjectKeyword", { enumerable: true, get: function() { return _index.tsObjectKeyword; } }); Object.defineProperty(exports2, "TSOptionalType", { enumerable: true, get: function() { return _index.tsOptionalType; } }); Object.defineProperty(exports2, "TSParameterProperty", { enumerable: true, get: function() { return _index.tsParameterProperty; } }); Object.defineProperty(exports2, "TSParenthesizedType", { enumerable: true, get: function() { return _index.tsParenthesizedType; } }); Object.defineProperty(exports2, "TSPropertySignature", { enumerable: true, get: function() { return _index.tsPropertySignature; } }); Object.defineProperty(exports2, "TSQualifiedName", { enumerable: true, get: function() { return _index.tsQualifiedName; } }); Object.defineProperty(exports2, "TSRestType", { enumerable: true, get: function() { return _index.tsRestType; } }); Object.defineProperty(exports2, "TSStringKeyword", { enumerable: true, get: function() { return _index.tsStringKeyword; } }); Object.defineProperty(exports2, "TSSymbolKeyword", { enumerable: true, get: function() { return _index.tsSymbolKeyword; } }); Object.defineProperty(exports2, "TSThisType", { enumerable: true, get: function() { return _index.tsThisType; } }); Object.defineProperty(exports2, "TSTupleType", { enumerable: true, get: function() { return _index.tsTupleType; } }); Object.defineProperty(exports2, "TSTypeAliasDeclaration", { enumerable: true, get: function() { return _index.tsTypeAliasDeclaration; } }); Object.defineProperty(exports2, "TSTypeAnnotation", { enumerable: true, get: function() { return _index.tsTypeAnnotation; } }); Object.defineProperty(exports2, "TSTypeAssertion", { enumerable: true, get: function() { return _index.tsTypeAssertion; } }); Object.defineProperty(exports2, "TSTypeLiteral", { enumerable: true, get: function() { return _index.tsTypeLiteral; } }); Object.defineProperty(exports2, "TSTypeOperator", { enumerable: true, get: function() { return _index.tsTypeOperator; } }); Object.defineProperty(exports2, "TSTypeParameter", { enumerable: true, get: function() { return _index.tsTypeParameter; } }); Object.defineProperty(exports2, "TSTypeParameterDeclaration", { enumerable: true, get: function() { return _index.tsTypeParameterDeclaration; } }); Object.defineProperty(exports2, "TSTypeParameterInstantiation", { enumerable: true, get: function() { return _index.tsTypeParameterInstantiation; } }); Object.defineProperty(exports2, "TSTypePredicate", { enumerable: true, get: function() { return _index.tsTypePredicate; } }); Object.defineProperty(exports2, "TSTypeQuery", { enumerable: true, get: function() { return _index.tsTypeQuery; } }); Object.defineProperty(exports2, "TSTypeReference", { enumerable: true, get: function() { return _index.tsTypeReference; } }); Object.defineProperty(exports2, "TSUndefinedKeyword", { enumerable: true, get: function() { return _index.tsUndefinedKeyword; } }); Object.defineProperty(exports2, "TSUnionType", { enumerable: true, get: function() { return _index.tsUnionType; } }); Object.defineProperty(exports2, "TSUnknownKeyword", { enumerable: true, get: function() { return _index.tsUnknownKeyword; } }); Object.defineProperty(exports2, "TSVoidKeyword", { enumerable: true, get: function() { return _index.tsVoidKeyword; } }); Object.defineProperty(exports2, "TaggedTemplateExpression", { enumerable: true, get: function() { return _index.taggedTemplateExpression; } }); Object.defineProperty(exports2, "TemplateElement", { enumerable: true, get: function() { return _index.templateElement; } }); Object.defineProperty(exports2, "TemplateLiteral", { enumerable: true, get: function() { return _index.templateLiteral; } }); Object.defineProperty(exports2, "ThisExpression", { enumerable: true, get: function() { return _index.thisExpression; } }); Object.defineProperty(exports2, "ThisTypeAnnotation", { enumerable: true, get: function() { return _index.thisTypeAnnotation; } }); Object.defineProperty(exports2, "ThrowStatement", { enumerable: true, get: function() { return _index.throwStatement; } }); Object.defineProperty(exports2, "TopicReference", { enumerable: true, get: function() { return _index.topicReference; } }); Object.defineProperty(exports2, "TryStatement", { enumerable: true, get: function() { return _index.tryStatement; } }); Object.defineProperty(exports2, "TupleExpression", { enumerable: true, get: function() { return _index.tupleExpression; } }); Object.defineProperty(exports2, "TupleTypeAnnotation", { enumerable: true, get: function() { return _index.tupleTypeAnnotation; } }); Object.defineProperty(exports2, "TypeAlias", { enumerable: true, get: function() { return _index.typeAlias; } }); Object.defineProperty(exports2, "TypeAnnotation", { enumerable: true, get: function() { return _index.typeAnnotation; } }); Object.defineProperty(exports2, "TypeCastExpression", { enumerable: true, get: function() { return _index.typeCastExpression; } }); Object.defineProperty(exports2, "TypeParameter", { enumerable: true, get: function() { return _index.typeParameter; } }); Object.defineProperty(exports2, "TypeParameterDeclaration", { enumerable: true, get: function() { return _index.typeParameterDeclaration; } }); Object.defineProperty(exports2, "TypeParameterInstantiation", { enumerable: true, get: function() { return _index.typeParameterInstantiation; } }); Object.defineProperty(exports2, "TypeofTypeAnnotation", { enumerable: true, get: function() { return _index.typeofTypeAnnotation; } }); Object.defineProperty(exports2, "UnaryExpression", { enumerable: true, get: function() { return _index.unaryExpression; } }); Object.defineProperty(exports2, "UnionTypeAnnotation", { enumerable: true, get: function() { return _index.unionTypeAnnotation; } }); Object.defineProperty(exports2, "UpdateExpression", { enumerable: true, get: function() { return _index.updateExpression; } }); Object.defineProperty(exports2, "V8IntrinsicIdentifier", { enumerable: true, get: function() { return _index.v8IntrinsicIdentifier; } }); Object.defineProperty(exports2, "VariableDeclaration", { enumerable: true, get: function() { return _index.variableDeclaration; } }); Object.defineProperty(exports2, "VariableDeclarator", { enumerable: true, get: function() { return _index.variableDeclarator; } }); Object.defineProperty(exports2, "Variance", { enumerable: true, get: function() { return _index.variance; } }); Object.defineProperty(exports2, "VoidTypeAnnotation", { enumerable: true, get: function() { return _index.voidTypeAnnotation; } }); Object.defineProperty(exports2, "WhileStatement", { enumerable: true, get: function() { return _index.whileStatement; } }); Object.defineProperty(exports2, "WithStatement", { enumerable: true, get: function() { return _index.withStatement; } }); Object.defineProperty(exports2, "YieldExpression", { enumerable: true, get: function() { return _index.yieldExpression; } }); var _index = require_generated12(); } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/clone/cloneNode.js var require_cloneNode3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/clone/cloneNode.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = cloneNode; var _definitions = require_definitions3(); var _generated = require_generated11(); var has = Function.call.bind(Object.prototype.hasOwnProperty); function cloneIfNode(obj, deep, withoutLoc) { if (obj && typeof obj.type === "string") { return cloneNode(obj, deep, withoutLoc); } return obj; } function cloneIfNodeOrArray(obj, deep, withoutLoc) { if (Array.isArray(obj)) { return obj.map((node) => cloneIfNode(node, deep, withoutLoc)); } return cloneIfNode(obj, deep, withoutLoc); } function cloneNode(node, deep = true, withoutLoc = false) { if (!node) return node; const { type } = node; const newNode = { type: node.type }; if ((0, _generated.isIdentifier)(node)) { newNode.name = node.name; if (has(node, "optional") && typeof node.optional === "boolean") { newNode.optional = node.optional; } if (has(node, "typeAnnotation")) { newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation; } } else if (!has(_definitions.NODE_FIELDS, type)) { throw new Error(`Unknown node type: "${type}"`); } else { for (const field of Object.keys(_definitions.NODE_FIELDS[type])) { if (has(node, field)) { if (deep) { newNode[field] = (0, _generated.isFile)(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc); } else { newNode[field] = node[field]; } } } } if (has(node, "loc")) { if (withoutLoc) { newNode.loc = null; } else { newNode.loc = node.loc; } } if (has(node, "leadingComments")) { newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc); } if (has(node, "innerComments")) { newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc); } if (has(node, "trailingComments")) { newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc); } if (has(node, "extra")) { newNode.extra = Object.assign({}, node.extra); } return newNode; } function maybeCloneComments(comments, deep, withoutLoc) { if (!comments || !deep) { return comments; } return comments.map(({ type, value, loc }) => { if (withoutLoc) { return { type, value, loc: null }; } return { type, value, loc }; }); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/clone/clone.js var require_clone4 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/clone/clone.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = clone; var _cloneNode = require_cloneNode3(); function clone(node) { return (0, _cloneNode.default)(node, false); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/clone/cloneDeep.js var require_cloneDeep3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/clone/cloneDeep.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = cloneDeep; var _cloneNode = require_cloneNode3(); function cloneDeep(node) { return (0, _cloneNode.default)(node); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js var require_cloneDeepWithoutLoc3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = cloneDeepWithoutLoc; var _cloneNode = require_cloneNode3(); function cloneDeepWithoutLoc(node) { return (0, _cloneNode.default)(node, true, true); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js var require_cloneWithoutLoc3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = cloneWithoutLoc; var _cloneNode = require_cloneNode3(); function cloneWithoutLoc(node) { return (0, _cloneNode.default)(node, false, true); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/comments/addComments.js var require_addComments3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/comments/addComments.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = addComments; function addComments(node, type, comments) { if (!comments || !node) return node; const key = `${type}Comments`; if (node[key]) { if (type === "leading") { node[key] = comments.concat(node[key]); } else { node[key].push(...comments); } } else { node[key] = comments; } return node; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/comments/addComment.js var require_addComment3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/comments/addComment.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = addComment; var _addComments = require_addComments3(); function addComment(node, type, content, line) { return (0, _addComments.default)(node, type, [{ type: line ? "CommentLine" : "CommentBlock", value: content }]); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/utils/inherit.js var require_inherit3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/utils/inherit.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = inherit; function inherit(key, child, parent) { if (child && parent) { child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean))); } } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/comments/inheritInnerComments.js var require_inheritInnerComments3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/comments/inheritInnerComments.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = inheritInnerComments; var _inherit = require_inherit3(); function inheritInnerComments(child, parent) { (0, _inherit.default)("innerComments", child, parent); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/comments/inheritLeadingComments.js var require_inheritLeadingComments3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/comments/inheritLeadingComments.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = inheritLeadingComments; var _inherit = require_inherit3(); function inheritLeadingComments(child, parent) { (0, _inherit.default)("leadingComments", child, parent); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/comments/inheritTrailingComments.js var require_inheritTrailingComments3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/comments/inheritTrailingComments.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = inheritTrailingComments; var _inherit = require_inherit3(); function inheritTrailingComments(child, parent) { (0, _inherit.default)("trailingComments", child, parent); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/comments/inheritsComments.js var require_inheritsComments3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/comments/inheritsComments.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = inheritsComments; var _inheritTrailingComments = require_inheritTrailingComments3(); var _inheritLeadingComments = require_inheritLeadingComments3(); var _inheritInnerComments = require_inheritInnerComments3(); function inheritsComments(child, parent) { (0, _inheritTrailingComments.default)(child, parent); (0, _inheritLeadingComments.default)(child, parent); (0, _inheritInnerComments.default)(child, parent); return child; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/comments/removeComments.js var require_removeComments3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/comments/removeComments.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = removeComments; var _constants = require_constants4(); function removeComments(node) { _constants.COMMENT_KEYS.forEach((key) => { node[key] = null; }); return node; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/constants/generated/index.js var require_generated14 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/constants/generated/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.WHILE_TYPES = exports2.USERWHITESPACABLE_TYPES = exports2.UNARYLIKE_TYPES = exports2.TYPESCRIPT_TYPES = exports2.TSTYPE_TYPES = exports2.TSTYPEELEMENT_TYPES = exports2.TSENTITYNAME_TYPES = exports2.TSBASETYPE_TYPES = exports2.TERMINATORLESS_TYPES = exports2.STATEMENT_TYPES = exports2.STANDARDIZED_TYPES = exports2.SCOPABLE_TYPES = exports2.PUREISH_TYPES = exports2.PROPERTY_TYPES = exports2.PRIVATE_TYPES = exports2.PATTERN_TYPES = exports2.PATTERNLIKE_TYPES = exports2.OBJECTMEMBER_TYPES = exports2.MODULESPECIFIER_TYPES = exports2.MODULEDECLARATION_TYPES = exports2.MISCELLANEOUS_TYPES = exports2.METHOD_TYPES = exports2.LVAL_TYPES = exports2.LOOP_TYPES = exports2.LITERAL_TYPES = exports2.JSX_TYPES = exports2.IMMUTABLE_TYPES = exports2.FUNCTION_TYPES = exports2.FUNCTIONPARENT_TYPES = exports2.FOR_TYPES = exports2.FORXSTATEMENT_TYPES = exports2.FLOW_TYPES = exports2.FLOWTYPE_TYPES = exports2.FLOWPREDICATE_TYPES = exports2.FLOWDECLARATION_TYPES = exports2.FLOWBASEANNOTATION_TYPES = exports2.EXPRESSION_TYPES = exports2.EXPRESSIONWRAPPER_TYPES = exports2.EXPORTDECLARATION_TYPES = exports2.ENUMMEMBER_TYPES = exports2.ENUMBODY_TYPES = exports2.DECLARATION_TYPES = exports2.CONDITIONAL_TYPES = exports2.COMPLETIONSTATEMENT_TYPES = exports2.CLASS_TYPES = exports2.BLOCK_TYPES = exports2.BLOCKPARENT_TYPES = exports2.BINARY_TYPES = exports2.ACCESSOR_TYPES = void 0; var _definitions = require_definitions3(); var STANDARDIZED_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Standardized"]; exports2.STANDARDIZED_TYPES = STANDARDIZED_TYPES; var EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"]; exports2.EXPRESSION_TYPES = EXPRESSION_TYPES; var BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"]; exports2.BINARY_TYPES = BINARY_TYPES; var SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"]; exports2.SCOPABLE_TYPES = SCOPABLE_TYPES; var BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"]; exports2.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES; var BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"]; exports2.BLOCK_TYPES = BLOCK_TYPES; var STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"]; exports2.STATEMENT_TYPES = STATEMENT_TYPES; var TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"]; exports2.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES; var COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"]; exports2.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES; var CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"]; exports2.CONDITIONAL_TYPES = CONDITIONAL_TYPES; var LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"]; exports2.LOOP_TYPES = LOOP_TYPES; var WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"]; exports2.WHILE_TYPES = WHILE_TYPES; var EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"]; exports2.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES; var FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"]; exports2.FOR_TYPES = FOR_TYPES; var FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"]; exports2.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES; var FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"]; exports2.FUNCTION_TYPES = FUNCTION_TYPES; var FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"]; exports2.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES; var PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"]; exports2.PUREISH_TYPES = PUREISH_TYPES; var DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"]; exports2.DECLARATION_TYPES = DECLARATION_TYPES; var PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"]; exports2.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES; var LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"]; exports2.LVAL_TYPES = LVAL_TYPES; var TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"]; exports2.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES; var LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"]; exports2.LITERAL_TYPES = LITERAL_TYPES; var IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"]; exports2.IMMUTABLE_TYPES = IMMUTABLE_TYPES; var USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"]; exports2.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES; var METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"]; exports2.METHOD_TYPES = METHOD_TYPES; var OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"]; exports2.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES; var PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"]; exports2.PROPERTY_TYPES = PROPERTY_TYPES; var UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"]; exports2.UNARYLIKE_TYPES = UNARYLIKE_TYPES; var PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"]; exports2.PATTERN_TYPES = PATTERN_TYPES; var CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"]; exports2.CLASS_TYPES = CLASS_TYPES; var MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"]; exports2.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES; var EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"]; exports2.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES; var MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"]; exports2.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES; var ACCESSOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Accessor"]; exports2.ACCESSOR_TYPES = ACCESSOR_TYPES; var PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"]; exports2.PRIVATE_TYPES = PRIVATE_TYPES; var FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"]; exports2.FLOW_TYPES = FLOW_TYPES; var FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"]; exports2.FLOWTYPE_TYPES = FLOWTYPE_TYPES; var FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"]; exports2.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES; var FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"]; exports2.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES; var FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"]; exports2.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES; var ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"]; exports2.ENUMBODY_TYPES = ENUMBODY_TYPES; var ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"]; exports2.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES; var JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"]; exports2.JSX_TYPES = JSX_TYPES; var MISCELLANEOUS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Miscellaneous"]; exports2.MISCELLANEOUS_TYPES = MISCELLANEOUS_TYPES; var TYPESCRIPT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TypeScript"]; exports2.TYPESCRIPT_TYPES = TYPESCRIPT_TYPES; var TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"]; exports2.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES; var TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"]; exports2.TSTYPE_TYPES = TSTYPE_TYPES; var TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"]; exports2.TSBASETYPE_TYPES = TSBASETYPE_TYPES; } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/converters/toBlock.js var require_toBlock3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/converters/toBlock.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = toBlock; var _generated = require_generated11(); var _generated2 = require_generated12(); function toBlock(node, parent) { if ((0, _generated.isBlockStatement)(node)) { return node; } let blockNodes = []; if ((0, _generated.isEmptyStatement)(node)) { blockNodes = []; } else { if (!(0, _generated.isStatement)(node)) { if ((0, _generated.isFunction)(parent)) { node = (0, _generated2.returnStatement)(node); } else { node = (0, _generated2.expressionStatement)(node); } } blockNodes = [node]; } return (0, _generated2.blockStatement)(blockNodes); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/converters/ensureBlock.js var require_ensureBlock3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/converters/ensureBlock.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = ensureBlock; var _toBlock = require_toBlock3(); function ensureBlock(node, key = "body") { return node[key] = (0, _toBlock.default)(node[key], node); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/converters/toIdentifier.js var require_toIdentifier3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/converters/toIdentifier.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = toIdentifier; var _isValidIdentifier = require_isValidIdentifier3(); var _helperValidatorIdentifier = require_lib8(); function toIdentifier(input) { input = input + ""; let name = ""; for (const c of input) { name += (0, _helperValidatorIdentifier.isIdentifierChar)(c.codePointAt(0)) ? c : "-"; } name = name.replace(/^[-0-9]+/, ""); name = name.replace(/[-\s]+(.)?/g, function(match, c) { return c ? c.toUpperCase() : ""; }); if (!(0, _isValidIdentifier.default)(name)) { name = `_${name}`; } return name || "_"; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js var require_toBindingIdentifierName3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = toBindingIdentifierName; var _toIdentifier = require_toIdentifier3(); function toBindingIdentifierName(name) { name = (0, _toIdentifier.default)(name); if (name === "eval" || name === "arguments") name = "_" + name; return name; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/converters/toComputedKey.js var require_toComputedKey3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/converters/toComputedKey.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = toComputedKey; var _generated = require_generated11(); var _generated2 = require_generated12(); function toComputedKey(node, key = node.key || node.property) { if (!node.computed && (0, _generated.isIdentifier)(key)) key = (0, _generated2.stringLiteral)(key.name); return key; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/converters/toExpression.js var require_toExpression3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/converters/toExpression.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var _generated = require_generated11(); var _default = toExpression; exports2.default = _default; function toExpression(node) { if ((0, _generated.isExpressionStatement)(node)) { node = node.expression; } if ((0, _generated.isExpression)(node)) { return node; } if ((0, _generated.isClass)(node)) { node.type = "ClassExpression"; } else if ((0, _generated.isFunction)(node)) { node.type = "FunctionExpression"; } if (!(0, _generated.isExpression)(node)) { throw new Error(`cannot turn ${node.type} to an expression`); } return node; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/traverse/traverseFast.js var require_traverseFast3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/traverse/traverseFast.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = traverseFast; var _definitions = require_definitions3(); function traverseFast(node, enter, opts) { if (!node) return; const keys = _definitions.VISITOR_KEYS[node.type]; if (!keys) return; opts = opts || {}; enter(node, opts); for (const key of keys) { const subNode = node[key]; if (Array.isArray(subNode)) { for (const node2 of subNode) { traverseFast(node2, enter, opts); } } else { traverseFast(subNode, enter, opts); } } } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/modifications/removeProperties.js var require_removeProperties3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/modifications/removeProperties.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = removeProperties; var _constants = require_constants4(); var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"]; var CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS); function removeProperties(node, opts = {}) { const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS; for (const key of map) { if (node[key] != null) node[key] = void 0; } for (const key of Object.keys(node)) { if (key[0] === "_" && node[key] != null) node[key] = void 0; } const symbols = Object.getOwnPropertySymbols(node); for (const sym of symbols) { node[sym] = null; } } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js var require_removePropertiesDeep3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = removePropertiesDeep; var _traverseFast = require_traverseFast3(); var _removeProperties = require_removeProperties3(); function removePropertiesDeep(tree, opts) { (0, _traverseFast.default)(tree, _removeProperties.default, opts); return tree; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/converters/toKeyAlias.js var require_toKeyAlias3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/converters/toKeyAlias.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = toKeyAlias; var _generated = require_generated11(); var _cloneNode = require_cloneNode3(); var _removePropertiesDeep = require_removePropertiesDeep3(); function toKeyAlias(node, key = node.key) { let alias; if (node.kind === "method") { return toKeyAlias.increment() + ""; } else if ((0, _generated.isIdentifier)(key)) { alias = key.name; } else if ((0, _generated.isStringLiteral)(key)) { alias = JSON.stringify(key.value); } else { alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key))); } if (node.computed) { alias = `[${alias}]`; } if (node.static) { alias = `static:${alias}`; } return alias; } toKeyAlias.uid = 0; toKeyAlias.increment = function() { if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) { return toKeyAlias.uid = 0; } else { return toKeyAlias.uid++; } }; } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js var require_getBindingIdentifiers3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = getBindingIdentifiers; var _generated = require_generated11(); function getBindingIdentifiers(node, duplicates, outerOnly) { let search = [].concat(node); const ids = /* @__PURE__ */ Object.create(null); while (search.length) { const id = search.shift(); if (!id) continue; const keys = getBindingIdentifiers.keys[id.type]; if ((0, _generated.isIdentifier)(id)) { if (duplicates) { const _ids = ids[id.name] = ids[id.name] || []; _ids.push(id); } else { ids[id.name] = id; } continue; } if ((0, _generated.isExportDeclaration)(id) && !(0, _generated.isExportAllDeclaration)(id)) { if ((0, _generated.isDeclaration)(id.declaration)) { search.push(id.declaration); } continue; } if (outerOnly) { if ((0, _generated.isFunctionDeclaration)(id)) { search.push(id.id); continue; } if ((0, _generated.isFunctionExpression)(id)) { continue; } } if (keys) { for (let i = 0; i < keys.length; i++) { const key = keys[i]; if (id[key]) { search = search.concat(id[key]); } } } } return ids; } getBindingIdentifiers.keys = { 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"] }; } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js var require_gatherSequenceExpressions3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = gatherSequenceExpressions; var _getBindingIdentifiers = require_getBindingIdentifiers3(); var _generated = require_generated11(); var _generated2 = require_generated12(); var _cloneNode = require_cloneNode3(); function gatherSequenceExpressions(nodes, scope, declars) { const exprs = []; let ensureLastUndefined = true; for (const node of nodes) { if (!(0, _generated.isEmptyStatement)(node)) { ensureLastUndefined = false; } if ((0, _generated.isExpression)(node)) { exprs.push(node); } else if ((0, _generated.isExpressionStatement)(node)) { exprs.push(node.expression); } else if ((0, _generated.isVariableDeclaration)(node)) { if (node.kind !== "var") return; for (const declar of node.declarations) { const bindings = (0, _getBindingIdentifiers.default)(declar); for (const key of Object.keys(bindings)) { declars.push({ kind: node.kind, id: (0, _cloneNode.default)(bindings[key]) }); } if (declar.init) { exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init)); } } ensureLastUndefined = true; } else if ((0, _generated.isIfStatement)(node)) { const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode(); const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode(); if (!consequent || !alternate) return; exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate)); } else if ((0, _generated.isBlockStatement)(node)) { const body = gatherSequenceExpressions(node.body, scope, declars); if (!body) return; exprs.push(body); } else if ((0, _generated.isEmptyStatement)(node)) { if (nodes.indexOf(node) === 0) { ensureLastUndefined = true; } } else { return; } } if (ensureLastUndefined) { exprs.push(scope.buildUndefinedNode()); } if (exprs.length === 1) { return exprs[0]; } else { return (0, _generated2.sequenceExpression)(exprs); } } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/converters/toSequenceExpression.js var require_toSequenceExpression3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/converters/toSequenceExpression.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = toSequenceExpression; var _gatherSequenceExpressions = require_gatherSequenceExpressions3(); function toSequenceExpression(nodes, scope) { if (!(nodes != null && nodes.length)) return; const declars = []; const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars); if (!result) return; for (const declar of declars) { scope.push(declar); } return result; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/converters/toStatement.js var require_toStatement3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/converters/toStatement.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var _generated = require_generated11(); var _generated2 = require_generated12(); var _default = toStatement; exports2.default = _default; function toStatement(node, ignore) { if ((0, _generated.isStatement)(node)) { return node; } let mustHaveId = false; let newType; if ((0, _generated.isClass)(node)) { mustHaveId = true; newType = "ClassDeclaration"; } else if ((0, _generated.isFunction)(node)) { mustHaveId = true; newType = "FunctionDeclaration"; } else if ((0, _generated.isAssignmentExpression)(node)) { return (0, _generated2.expressionStatement)(node); } if (mustHaveId && !node.id) { newType = false; } if (!newType) { if (ignore) { return false; } else { throw new Error(`cannot turn ${node.type} to a statement`); } } node.type = newType; return node; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/converters/valueToNode.js var require_valueToNode3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/converters/valueToNode.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var _isValidIdentifier = require_isValidIdentifier3(); var _generated = require_generated12(); var _default = valueToNode; exports2.default = _default; var objectToString = Function.call.bind(Object.prototype.toString); function isRegExp(value) { return objectToString(value) === "[object RegExp]"; } function isPlainObject(value) { if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") { return false; } const proto = Object.getPrototypeOf(value); return proto === null || Object.getPrototypeOf(proto) === null; } function valueToNode(value) { if (value === void 0) { return (0, _generated.identifier)("undefined"); } if (value === true || value === false) { return (0, _generated.booleanLiteral)(value); } if (value === null) { return (0, _generated.nullLiteral)(); } if (typeof value === "string") { return (0, _generated.stringLiteral)(value); } if (typeof value === "number") { let result; if (Number.isFinite(value)) { result = (0, _generated.numericLiteral)(Math.abs(value)); } else { let numerator; if (Number.isNaN(value)) { numerator = (0, _generated.numericLiteral)(0); } else { numerator = (0, _generated.numericLiteral)(1); } result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0)); } if (value < 0 || Object.is(value, -0)) { result = (0, _generated.unaryExpression)("-", result); } return result; } if (isRegExp(value)) { const pattern = value.source; const flags = value.toString().match(/\/([a-z]+|)$/)[1]; return (0, _generated.regExpLiteral)(pattern, flags); } if (Array.isArray(value)) { return (0, _generated.arrayExpression)(value.map(valueToNode)); } if (isPlainObject(value)) { const props = []; for (const key of Object.keys(value)) { let nodeKey; if ((0, _isValidIdentifier.default)(key)) { nodeKey = (0, _generated.identifier)(key); } else { nodeKey = (0, _generated.stringLiteral)(key); } props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key]))); } return (0, _generated.objectExpression)(props); } throw new Error("don't know how to turn this value into a node"); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js var require_appendToMemberExpression3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = appendToMemberExpression; var _generated = require_generated12(); function appendToMemberExpression(member, append, computed = false) { member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed); member.property = append; member.computed = !!computed; return member; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/modifications/inherits.js var require_inherits4 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/modifications/inherits.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = inherits; var _constants = require_constants4(); var _inheritsComments = require_inheritsComments3(); function inherits(child, parent) { if (!child || !parent) return child; for (const key of _constants.INHERIT_KEYS.optional) { if (child[key] == null) { child[key] = parent[key]; } } for (const key of Object.keys(parent)) { if (key[0] === "_" && key !== "__clone") child[key] = parent[key]; } for (const key of _constants.INHERIT_KEYS.force) { child[key] = parent[key]; } (0, _inheritsComments.default)(child, parent); return child; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js var require_prependToMemberExpression3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = prependToMemberExpression; var _generated = require_generated12(); function prependToMemberExpression(member, prepend) { member.object = (0, _generated.memberExpression)(prepend, member.object); return member; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js var require_getOuterBindingIdentifiers3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var _getBindingIdentifiers = require_getBindingIdentifiers3(); var _default = getOuterBindingIdentifiers; exports2.default = _default; function getOuterBindingIdentifiers(node, duplicates) { return (0, _getBindingIdentifiers.default)(node, duplicates, true); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/traverse/traverse.js var require_traverse3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/traverse/traverse.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = traverse; var _definitions = require_definitions3(); function traverse(node, handlers, state) { if (typeof handlers === "function") { handlers = { enter: handlers }; } const { enter, exit } = handlers; traverseSimpleImpl(node, enter, exit, state, []); } function traverseSimpleImpl(node, enter, exit, state, ancestors) { const keys = _definitions.VISITOR_KEYS[node.type]; if (!keys) return; if (enter) enter(node, ancestors, state); for (const key of keys) { const subNode = node[key]; if (Array.isArray(subNode)) { for (let i = 0; i < subNode.length; i++) { const child = subNode[i]; if (!child) continue; ancestors.push({ node, key, index: i }); traverseSimpleImpl(child, enter, exit, state, ancestors); ancestors.pop(); } } else if (subNode) { ancestors.push({ node, key }); traverseSimpleImpl(subNode, enter, exit, state, ancestors); ancestors.pop(); } } if (exit) exit(node, ancestors, state); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isBinding.js var require_isBinding3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isBinding.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isBinding; var _getBindingIdentifiers = require_getBindingIdentifiers3(); function isBinding(node, parent, grandparent) { if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") { return false; } const keys = _getBindingIdentifiers.default.keys[parent.type]; if (keys) { for (let i = 0; i < keys.length; i++) { const key = keys[i]; const val = parent[key]; if (Array.isArray(val)) { if (val.indexOf(node) >= 0) return true; } else { if (val === node) return true; } } } return false; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isLet.js var require_isLet3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isLet.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isLet; var _generated = require_generated11(); var _constants = require_constants4(); function isLet(node) { return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isBlockScoped.js var require_isBlockScoped3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isBlockScoped.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isBlockScoped; var _generated = require_generated11(); var _isLet = require_isLet3(); function isBlockScoped(node) { return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isImmutable.js var require_isImmutable3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isImmutable.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isImmutable; var _isType = require_isType3(); var _generated = require_generated11(); function isImmutable(node) { if ((0, _isType.default)(node.type, "Immutable")) return true; if ((0, _generated.isIdentifier)(node)) { if (node.name === "undefined") { return true; } else { return false; } } return false; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isNodesEquivalent.js var require_isNodesEquivalent3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isNodesEquivalent.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isNodesEquivalent; var _definitions = require_definitions3(); function isNodesEquivalent(a, b) { if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) { return a === b; } if (a.type !== b.type) { return false; } const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type); const visitorKeys = _definitions.VISITOR_KEYS[a.type]; for (const field of fields) { if (typeof a[field] !== typeof b[field]) { return false; } if (a[field] == null && b[field] == null) { continue; } else if (a[field] == null || b[field] == null) { return false; } if (Array.isArray(a[field])) { if (!Array.isArray(b[field])) { return false; } if (a[field].length !== b[field].length) { return false; } for (let i = 0; i < a[field].length; i++) { if (!isNodesEquivalent(a[field][i], b[field][i])) { return false; } } continue; } if (typeof a[field] === "object" && !(visitorKeys != null && visitorKeys.includes(field))) { for (const key of Object.keys(a[field])) { if (a[field][key] !== b[field][key]) { return false; } } continue; } if (!isNodesEquivalent(a[field], b[field])) { return false; } } return true; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isReferenced.js var require_isReferenced3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isReferenced.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isReferenced; function isReferenced(node, parent, grandparent) { switch (parent.type) { case "MemberExpression": case "OptionalMemberExpression": if (parent.property === node) { return !!parent.computed; } return parent.object === node; case "JSXMemberExpression": return parent.object === node; case "VariableDeclarator": return parent.init === node; case "ArrowFunctionExpression": return parent.body === node; case "PrivateName": return false; case "ClassMethod": case "ClassPrivateMethod": case "ObjectMethod": if (parent.key === node) { return !!parent.computed; } return false; case "ObjectProperty": if (parent.key === node) { return !!parent.computed; } return !grandparent || grandparent.type !== "ObjectPattern"; case "ClassProperty": case "ClassAccessorProperty": if (parent.key === node) { return !!parent.computed; } return true; case "ClassPrivateProperty": return parent.key !== node; case "ClassDeclaration": case "ClassExpression": return parent.superClass === node; case "AssignmentExpression": return parent.right === node; case "AssignmentPattern": return parent.right === node; case "LabeledStatement": return false; case "CatchClause": return false; case "RestElement": return false; case "BreakStatement": case "ContinueStatement": return false; case "FunctionDeclaration": case "FunctionExpression": return false; case "ExportNamespaceSpecifier": case "ExportDefaultSpecifier": return false; case "ExportSpecifier": if (grandparent != null && grandparent.source) { return false; } return parent.local === node; case "ImportDefaultSpecifier": case "ImportNamespaceSpecifier": case "ImportSpecifier": return false; case "ImportAttribute": return false; case "JSXAttribute": return false; case "ObjectPattern": case "ArrayPattern": return false; case "MetaProperty": return false; case "ObjectTypeProperty": return parent.key !== node; case "TSEnumMember": return parent.id !== node; case "TSPropertySignature": if (parent.key === node) { return !!parent.computed; } return true; } return true; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isScope.js var require_isScope3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isScope.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isScope; var _generated = require_generated11(); function isScope(node, parent) { if ((0, _generated.isBlockStatement)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) { return false; } if ((0, _generated.isPattern)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) { return true; } return (0, _generated.isScopable)(node); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isSpecifierDefault.js var require_isSpecifierDefault3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isSpecifierDefault.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isSpecifierDefault; var _generated = require_generated11(); function isSpecifierDefault(specifier) { return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, { name: "default" }); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isValidES3Identifier.js var require_isValidES3Identifier3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isValidES3Identifier.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isValidES3Identifier; var _isValidIdentifier = require_isValidIdentifier3(); var RESERVED_WORDS_ES3_ONLY = /* @__PURE__ */ 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 isValidES3Identifier(name) { return (0, _isValidIdentifier.default)(name) && !RESERVED_WORDS_ES3_ONLY.has(name); } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isVar.js var require_isVar3 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/validators/isVar.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = isVar; var _generated = require_generated11(); var _constants = require_constants4(); function isVar(node) { return (0, _generated.isVariableDeclaration)(node, { kind: "var" }) && !node[_constants.BLOCK_SCOPED_SYMBOL]; } } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/ast-types/generated/index.js var require_generated15 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/ast-types/generated/index.js"() { } }); // node_modules/@babel/generator/node_modules/@babel/types/lib/index.js var require_lib9 = __commonJS({ "node_modules/@babel/generator/node_modules/@babel/types/lib/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var _exportNames = { react: true, assertNode: true, createTypeAnnotationBasedOnTypeof: true, createUnionTypeAnnotation: true, createFlowUnionType: true, createTSUnionType: true, cloneNode: true, clone: true, cloneDeep: true, cloneDeepWithoutLoc: true, cloneWithoutLoc: true, addComment: true, addComments: true, inheritInnerComments: true, inheritLeadingComments: true, inheritsComments: true, inheritTrailingComments: true, removeComments: true, ensureBlock: true, toBindingIdentifierName: true, toBlock: true, toComputedKey: true, toExpression: true, toIdentifier: true, toKeyAlias: true, toSequenceExpression: true, toStatement: true, valueToNode: true, appendToMemberExpression: true, inherits: true, prependToMemberExpression: true, removeProperties: true, removePropertiesDeep: true, removeTypeDuplicates: true, getBindingIdentifiers: true, getOuterBindingIdentifiers: true, traverse: true, traverseFast: true, shallowEqual: true, is: true, isBinding: true, isBlockScoped: true, isImmutable: true, isLet: true, isNode: true, isNodesEquivalent: true, isPlaceholderType: true, isReferenced: true, isScope: true, isSpecifierDefault: true, isType: true, isValidES3Identifier: true, isValidIdentifier: true, isVar: true, matchesPattern: true, validate: true, buildMatchMemberExpression: true }; Object.defineProperty(exports2, "addComment", { enumerable: true, get: function() { return _addComment.default; } }); Object.defineProperty(exports2, "addComments", { enumerable: true, get: function() { return _addComments.default; } }); Object.defineProperty(exports2, "appendToMemberExpression", { enumerable: true, get: function() { return _appendToMemberExpression.default; } }); Object.defineProperty(exports2, "assertNode", { enumerable: true, get: function() { return _assertNode.default; } }); Object.defineProperty(exports2, "buildMatchMemberExpression", { enumerable: true, get: function() { return _buildMatchMemberExpression.default; } }); Object.defineProperty(exports2, "clone", { enumerable: true, get: function() { return _clone.default; } }); Object.defineProperty(exports2, "cloneDeep", { enumerable: true, get: function() { return _cloneDeep.default; } }); Object.defineProperty(exports2, "cloneDeepWithoutLoc", { enumerable: true, get: function() { return _cloneDeepWithoutLoc.default; } }); Object.defineProperty(exports2, "cloneNode", { enumerable: true, get: function() { return _cloneNode.default; } }); Object.defineProperty(exports2, "cloneWithoutLoc", { enumerable: true, get: function() { return _cloneWithoutLoc.default; } }); Object.defineProperty(exports2, "createFlowUnionType", { enumerable: true, get: function() { return _createFlowUnionType.default; } }); Object.defineProperty(exports2, "createTSUnionType", { enumerable: true, get: function() { return _createTSUnionType.default; } }); Object.defineProperty(exports2, "createTypeAnnotationBasedOnTypeof", { enumerable: true, get: function() { return _createTypeAnnotationBasedOnTypeof.default; } }); Object.defineProperty(exports2, "createUnionTypeAnnotation", { enumerable: true, get: function() { return _createFlowUnionType.default; } }); Object.defineProperty(exports2, "ensureBlock", { enumerable: true, get: function() { return _ensureBlock.default; } }); Object.defineProperty(exports2, "getBindingIdentifiers", { enumerable: true, get: function() { return _getBindingIdentifiers.default; } }); Object.defineProperty(exports2, "getOuterBindingIdentifiers", { enumerable: true, get: function() { return _getOuterBindingIdentifiers.default; } }); Object.defineProperty(exports2, "inheritInnerComments", { enumerable: true, get: function() { return _inheritInnerComments.default; } }); Object.defineProperty(exports2, "inheritLeadingComments", { enumerable: true, get: function() { return _inheritLeadingComments.default; } }); Object.defineProperty(exports2, "inheritTrailingComments", { enumerable: true, get: function() { return _inheritTrailingComments.default; } }); Object.defineProperty(exports2, "inherits", { enumerable: true, get: function() { return _inherits.default; } }); Object.defineProperty(exports2, "inheritsComments", { enumerable: true, get: function() { return _inheritsComments.default; } }); Object.defineProperty(exports2, "is", { enumerable: true, get: function() { return _is.default; } }); Object.defineProperty(exports2, "isBinding", { enumerable: true, get: function() { return _isBinding.default; } }); Object.defineProperty(exports2, "isBlockScoped", { enumerable: true, get: function() { return _isBlockScoped.default; } }); Object.defineProperty(exports2, "isImmutable", { enumerable: true, get: function() { return _isImmutable.default; } }); Object.defineProperty(exports2, "isLet", { enumerable: true, get: function() { return _isLet.default; } }); Object.defineProperty(exports2, "isNode", { enumerable: true, get: function() { return _isNode.default; } }); Object.defineProperty(exports2, "isNodesEquivalent", { enumerable: true, get: function() { return _isNodesEquivalent.default; } }); Object.defineProperty(exports2, "isPlaceholderType", { enumerable: true, get: function() { return _isPlaceholderType.default; } }); Object.defineProperty(exports2, "isReferenced", { enumerable: true, get: function() { return _isReferenced.default; } }); Object.defineProperty(exports2, "isScope", { enumerable: true, get: function() { return _isScope.default; } }); Object.defineProperty(exports2, "isSpecifierDefault", { enumerable: true, get: function() { return _isSpecifierDefault.default; } }); Object.defineProperty(exports2, "isType", { enumerable: true, get: function() { return _isType.default; } }); Object.defineProperty(exports2, "isValidES3Identifier", { enumerable: true, get: function() { return _isValidES3Identifier.default; } }); Object.defineProperty(exports2, "isValidIdentifier", { enumerable: true, get: function() { return _isValidIdentifier.default; } }); Object.defineProperty(exports2, "isVar", { enumerable: true, get: function() { return _isVar.default; } }); Object.defineProperty(exports2, "matchesPattern", { enumerable: true, get: function() { return _matchesPattern.default; } }); Object.defineProperty(exports2, "prependToMemberExpression", { enumerable: true, get: function() { return _prependToMemberExpression.default; } }); exports2.react = void 0; Object.defineProperty(exports2, "removeComments", { enumerable: true, get: function() { return _removeComments.default; } }); Object.defineProperty(exports2, "removeProperties", { enumerable: true, get: function() { return _removeProperties.default; } }); Object.defineProperty(exports2, "removePropertiesDeep", { enumerable: true, get: function() { return _removePropertiesDeep.default; } }); Object.defineProperty(exports2, "removeTypeDuplicates", { enumerable: true, get: function() { return _removeTypeDuplicates.default; } }); Object.defineProperty(exports2, "shallowEqual", { enumerable: true, get: function() { return _shallowEqual.default; } }); Object.defineProperty(exports2, "toBindingIdentifierName", { enumerable: true, get: function() { return _toBindingIdentifierName.default; } }); Object.defineProperty(exports2, "toBlock", { enumerable: true, get: function() { return _toBlock.default; } }); Object.defineProperty(exports2, "toComputedKey", { enumerable: true, get: function() { return _toComputedKey.default; } }); Object.defineProperty(exports2, "toExpression", { enumerable: true, get: function() { return _toExpression.default; } }); Object.defineProperty(exports2, "toIdentifier", { enumerable: true, get: function() { return _toIdentifier.default; } }); Object.defineProperty(exports2, "toKeyAlias", { enumerable: true, get: function() { return _toKeyAlias.default; } }); Object.defineProperty(exports2, "toSequenceExpression", { enumerable: true, get: function() { return _toSequenceExpression.default; } }); Object.defineProperty(exports2, "toStatement", { enumerable: true, get: function() { return _toStatement.default; } }); Object.defineProperty(exports2, "traverse", { enumerable: true, get: function() { return _traverse.default; } }); Object.defineProperty(exports2, "traverseFast", { enumerable: true, get: function() { return _traverseFast.default; } }); Object.defineProperty(exports2, "validate", { enumerable: true, get: function() { return _validate.default; } }); Object.defineProperty(exports2, "valueToNode", { enumerable: true, get: function() { return _valueToNode.default; } }); var _isReactComponent = require_isReactComponent3(); var _isCompatTag = require_isCompatTag3(); var _buildChildren = require_buildChildren3(); var _assertNode = require_assertNode3(); var _generated = require_generated13(); Object.keys(_generated).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _generated[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _generated[key]; } }); }); var _createTypeAnnotationBasedOnTypeof = require_createTypeAnnotationBasedOnTypeof3(); var _createFlowUnionType = require_createFlowUnionType3(); var _createTSUnionType = require_createTSUnionType3(); var _generated2 = require_generated12(); Object.keys(_generated2).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _generated2[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _generated2[key]; } }); }); var _uppercase = require_uppercase3(); Object.keys(_uppercase).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _uppercase[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _uppercase[key]; } }); }); var _cloneNode = require_cloneNode3(); var _clone = require_clone4(); var _cloneDeep = require_cloneDeep3(); var _cloneDeepWithoutLoc = require_cloneDeepWithoutLoc3(); var _cloneWithoutLoc = require_cloneWithoutLoc3(); var _addComment = require_addComment3(); var _addComments = require_addComments3(); var _inheritInnerComments = require_inheritInnerComments3(); var _inheritLeadingComments = require_inheritLeadingComments3(); var _inheritsComments = require_inheritsComments3(); var _inheritTrailingComments = require_inheritTrailingComments3(); var _removeComments = require_removeComments3(); var _generated3 = require_generated14(); Object.keys(_generated3).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _generated3[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _generated3[key]; } }); }); var _constants = require_constants4(); Object.keys(_constants).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _constants[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _constants[key]; } }); }); var _ensureBlock = require_ensureBlock3(); var _toBindingIdentifierName = require_toBindingIdentifierName3(); var _toBlock = require_toBlock3(); var _toComputedKey = require_toComputedKey3(); var _toExpression = require_toExpression3(); var _toIdentifier = require_toIdentifier3(); var _toKeyAlias = require_toKeyAlias3(); var _toSequenceExpression = require_toSequenceExpression3(); var _toStatement = require_toStatement3(); var _valueToNode = require_valueToNode3(); var _definitions = require_definitions3(); Object.keys(_definitions).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _definitions[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _definitions[key]; } }); }); var _appendToMemberExpression = require_appendToMemberExpression3(); var _inherits = require_inherits4(); var _prependToMemberExpression = require_prependToMemberExpression3(); var _removeProperties = require_removeProperties3(); var _removePropertiesDeep = require_removePropertiesDeep3(); var _removeTypeDuplicates = require_removeTypeDuplicates5(); var _getBindingIdentifiers = require_getBindingIdentifiers3(); var _getOuterBindingIdentifiers = require_getOuterBindingIdentifiers3(); var _traverse = require_traverse3(); Object.keys(_traverse).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _traverse[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _traverse[key]; } }); }); var _traverseFast = require_traverseFast3(); var _shallowEqual = require_shallowEqual3(); var _is = require_is3(); var _isBinding = require_isBinding3(); var _isBlockScoped = require_isBlockScoped3(); var _isImmutable = require_isImmutable3(); var _isLet = require_isLet3(); var _isNode = require_isNode3(); var _isNodesEquivalent = require_isNodesEquivalent3(); var _isPlaceholderType = require_isPlaceholderType3(); var _isReferenced = require_isReferenced3(); var _isScope = require_isScope3(); var _isSpecifierDefault = require_isSpecifierDefault3(); var _isType = require_isType3(); var _isValidES3Identifier = require_isValidES3Identifier3(); var _isValidIdentifier = require_isValidIdentifier3(); var _isVar = require_isVar3(); var _matchesPattern = require_matchesPattern3(); var _validate = require_validate3(); var _buildMatchMemberExpression = require_buildMatchMemberExpression3(); var _generated4 = require_generated11(); Object.keys(_generated4).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _generated4[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _generated4[key]; } }); }); var _generated5 = require_generated15(); Object.keys(_generated5).forEach(function(key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports2 && exports2[key] === _generated5[key]) return; Object.defineProperty(exports2, key, { enumerable: true, get: function() { return _generated5[key]; } }); }); var react = { isReactComponent: _isReactComponent.default, isCompatTag: _isCompatTag.default, buildChildren: _buildChildren.default }; exports2.react = react; } }); // node_modules/@babel/generator/lib/node/whitespace.js var require_whitespace = __commonJS({ "node_modules/@babel/generator/lib/node/whitespace.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.nodes = exports2.list = void 0; var _t = require_lib9(); var { FLIPPED_ALIAS_KEYS, isArrayExpression, isAssignmentExpression, isBinary, isBlockStatement, isCallExpression, isFunction, isIdentifier, isLiteral, isMemberExpression, isObjectExpression, isOptionalCallExpression, isOptionalMemberExpression, isStringLiteral } = _t; function crawl(node, state = {}) { if (isMemberExpression(node) || isOptionalMemberExpression(node)) { crawl(node.object, state); if (node.computed) crawl(node.property, state); } else if (isBinary(node) || isAssignmentExpression(node)) { crawl(node.left, state); crawl(node.right, state); } else if (isCallExpression(node) || isOptionalCallExpression(node)) { state.hasCall = true; crawl(node.callee, state); } else if (isFunction(node)) { state.hasFunction = true; } else if (isIdentifier(node)) { state.hasHelper = state.hasHelper || isHelper(node.callee); } return state; } function isHelper(node) { if (isMemberExpression(node)) { return isHelper(node.object) || isHelper(node.property); } else if (isIdentifier(node)) { return node.name === "require" || node.name[0] === "_"; } else if (isCallExpression(node)) { return isHelper(node.callee); } else if (isBinary(node) || isAssignmentExpression(node)) { return isIdentifier(node.left) && isHelper(node.left) || isHelper(node.right); } else { return false; } } function isType(node) { return isLiteral(node) || isObjectExpression(node) || isArrayExpression(node) || isIdentifier(node) || isMemberExpression(node); } var nodes = { AssignmentExpression(node) { const state = crawl(node.right); if (state.hasCall && state.hasHelper || state.hasFunction) { return { before: state.hasFunction, after: true }; } }, SwitchCase(node, parent) { return { before: !!node.consequent.length || parent.cases[0] === node, after: !node.consequent.length && parent.cases[parent.cases.length - 1] === node }; }, LogicalExpression(node) { if (isFunction(node.left) || isFunction(node.right)) { return { after: true }; } }, Literal(node) { if (isStringLiteral(node) && node.value === "use strict") { return { after: true }; } }, CallExpression(node) { if (isFunction(node.callee) || isHelper(node)) { return { before: true, after: true }; } }, OptionalCallExpression(node) { if (isFunction(node.callee)) { return { before: true, after: true }; } }, VariableDeclaration(node) { for (let i = 0; i < node.declarations.length; i++) { const declar = node.declarations[i]; let enabled = isHelper(declar.id) && !isType(declar.init); if (!enabled) { const state = crawl(declar.init); enabled = isHelper(declar.init) && state.hasCall || state.hasFunction; } if (enabled) { return { before: true, after: true }; } } }, IfStatement(node) { if (isBlockStatement(node.consequent)) { return { before: true, after: true }; } } }; exports2.nodes = nodes; nodes.ObjectProperty = nodes.ObjectTypeProperty = nodes.ObjectMethod = function(node, parent) { if (parent.properties[0] === node) { return { before: true }; } }; nodes.ObjectTypeCallProperty = function(node, parent) { var _parent$properties; if (parent.callProperties[0] === node && !((_parent$properties = parent.properties) != null && _parent$properties.length)) { return { before: true }; } }; nodes.ObjectTypeIndexer = function(node, parent) { var _parent$properties2, _parent$callPropertie; if (parent.indexers[0] === node && !((_parent$properties2 = parent.properties) != null && _parent$properties2.length) && !((_parent$callPropertie = parent.callProperties) != null && _parent$callPropertie.length)) { return { before: true }; } }; nodes.ObjectTypeInternalSlot = function(node, parent) { var _parent$properties3, _parent$callPropertie2, _parent$indexers; if (parent.internalSlots[0] === node && !((_parent$properties3 = parent.properties) != null && _parent$properties3.length) && !((_parent$callPropertie2 = parent.callProperties) != null && _parent$callPropertie2.length) && !((_parent$indexers = parent.indexers) != null && _parent$indexers.length)) { return { before: true }; } }; var list = { VariableDeclaration(node) { return node.declarations.map((decl) => decl.init); }, ArrayExpression(node) { return node.elements; }, ObjectExpression(node) { return node.properties; } }; exports2.list = list; [["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function([type, amounts]) { if (typeof amounts === "boolean") { amounts = { after: amounts, before: amounts }; } [type].concat(FLIPPED_ALIAS_KEYS[type] || []).forEach(function(type2) { nodes[type2] = function() { return amounts; }; }); }); } }); // node_modules/@babel/generator/lib/node/parentheses.js var require_parentheses = __commonJS({ "node_modules/@babel/generator/lib/node/parentheses.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ArrowFunctionExpression = ArrowFunctionExpression; exports2.AssignmentExpression = AssignmentExpression; exports2.Binary = Binary; exports2.BinaryExpression = BinaryExpression; exports2.ClassExpression = ClassExpression; exports2.ConditionalExpression = ConditionalExpression; exports2.DoExpression = DoExpression; exports2.FunctionExpression = FunctionExpression; exports2.FunctionTypeAnnotation = FunctionTypeAnnotation; exports2.Identifier = Identifier; exports2.LogicalExpression = LogicalExpression; exports2.NullableTypeAnnotation = NullableTypeAnnotation; exports2.ObjectExpression = ObjectExpression; exports2.OptionalIndexedAccessType = OptionalIndexedAccessType; exports2.OptionalCallExpression = exports2.OptionalMemberExpression = OptionalMemberExpression; exports2.SequenceExpression = SequenceExpression; exports2.TSAsExpression = TSAsExpression; exports2.TSInferType = TSInferType; exports2.TSTypeAssertion = TSTypeAssertion; exports2.TSIntersectionType = exports2.TSUnionType = TSUnionType; exports2.UnaryLike = UnaryLike; exports2.IntersectionTypeAnnotation = exports2.UnionTypeAnnotation = UnionTypeAnnotation; exports2.UpdateExpression = UpdateExpression; exports2.AwaitExpression = exports2.YieldExpression = YieldExpression; var _t = require_lib9(); var { isArrayTypeAnnotation, isArrowFunctionExpression, isAssignmentExpression, isAwaitExpression, isBinary, isBinaryExpression, isCallExpression, isClassDeclaration, isClassExpression, isConditional, isConditionalExpression, isExportDeclaration, isExportDefaultDeclaration, isExpressionStatement, isFor, isForInStatement, isForOfStatement, isForStatement, isIfStatement, isIndexedAccessType, isIntersectionTypeAnnotation, isLogicalExpression, isMemberExpression, isNewExpression, isNullableTypeAnnotation, isObjectPattern, isOptionalCallExpression, isOptionalMemberExpression, isReturnStatement, isSequenceExpression, isSwitchStatement, isTSArrayType, isTSAsExpression, isTSIntersectionType, isTSNonNullExpression, isTSOptionalType, isTSRestType, isTSTypeAssertion, isTSUnionType, isTaggedTemplateExpression, isThrowStatement, isTypeAnnotation, isUnaryLike, isUnionTypeAnnotation, isVariableDeclarator, isWhileStatement, isYieldExpression } = _t; var PRECEDENCE = { "||": 0, "??": 0, "&&": 1, "|": 2, "^": 3, "&": 4, "==": 5, "===": 5, "!=": 5, "!==": 5, "<": 6, ">": 6, "<=": 6, ">=": 6, in: 6, instanceof: 6, ">>": 7, "<<": 7, ">>>": 7, "+": 8, "-": 8, "*": 9, "/": 9, "%": 9, "**": 10 }; var isClassExtendsClause = (node, parent) => (isClassDeclaration(parent) || isClassExpression(parent)) && parent.superClass === node; var hasPostfixPart = (node, parent) => (isMemberExpression(parent) || isOptionalMemberExpression(parent)) && parent.object === node || (isCallExpression(parent) || isOptionalCallExpression(parent) || isNewExpression(parent)) && parent.callee === node || isTaggedTemplateExpression(parent) && parent.tag === node || isTSNonNullExpression(parent); function NullableTypeAnnotation(node, parent) { return isArrayTypeAnnotation(parent); } function FunctionTypeAnnotation(node, parent, printStack) { return isUnionTypeAnnotation(parent) || isIntersectionTypeAnnotation(parent) || isArrayTypeAnnotation(parent) || isTypeAnnotation(parent) && isArrowFunctionExpression(printStack[printStack.length - 3]); } function UpdateExpression(node, parent) { return hasPostfixPart(node, parent) || isClassExtendsClause(node, parent); } function ObjectExpression(node, parent, printStack) { return isFirstInContext(printStack, { expressionStatement: true, arrowBody: true }); } function DoExpression(node, parent, printStack) { return !node.async && isFirstInContext(printStack, { expressionStatement: true }); } function Binary(node, parent) { if (node.operator === "**" && isBinaryExpression(parent, { operator: "**" })) { return parent.left === node; } if (isClassExtendsClause(node, parent)) { return true; } if (hasPostfixPart(node, parent) || isUnaryLike(parent) || isAwaitExpression(parent)) { return true; } if (isBinary(parent)) { const parentOp = parent.operator; const parentPos = PRECEDENCE[parentOp]; const nodeOp = node.operator; const nodePos = PRECEDENCE[nodeOp]; if (parentPos === nodePos && parent.right === node && !isLogicalExpression(parent) || parentPos > nodePos) { return true; } } } function UnionTypeAnnotation(node, parent) { return isArrayTypeAnnotation(parent) || isNullableTypeAnnotation(parent) || isIntersectionTypeAnnotation(parent) || isUnionTypeAnnotation(parent); } function OptionalIndexedAccessType(node, parent) { return isIndexedAccessType(parent, { objectType: node }); } function TSAsExpression() { return true; } function TSTypeAssertion() { return true; } function TSUnionType(node, parent) { return isTSArrayType(parent) || isTSOptionalType(parent) || isTSIntersectionType(parent) || isTSUnionType(parent) || isTSRestType(parent); } function TSInferType(node, parent) { return isTSArrayType(parent) || isTSOptionalType(parent); } function BinaryExpression(node, parent) { return node.operator === "in" && (isVariableDeclarator(parent) || isFor(parent)); } function SequenceExpression(node, parent) { if (isForStatement(parent) || isThrowStatement(parent) || isReturnStatement(parent) || isIfStatement(parent) && parent.test === node || isWhileStatement(parent) && parent.test === node || isForInStatement(parent) && parent.right === node || isSwitchStatement(parent) && parent.discriminant === node || isExpressionStatement(parent) && parent.expression === node) { return false; } return true; } function YieldExpression(node, parent) { return isBinary(parent) || isUnaryLike(parent) || hasPostfixPart(node, parent) || isAwaitExpression(parent) && isYieldExpression(node) || isConditionalExpression(parent) && node === parent.test || isClassExtendsClause(node, parent); } function ClassExpression(node, parent, printStack) { return isFirstInContext(printStack, { expressionStatement: true, exportDefault: true }); } function UnaryLike(node, parent) { return hasPostfixPart(node, parent) || isBinaryExpression(parent, { operator: "**", left: node }) || isClassExtendsClause(node, parent); } function FunctionExpression(node, parent, printStack) { return isFirstInContext(printStack, { expressionStatement: true, exportDefault: true }); } function ArrowFunctionExpression(node, parent) { return isExportDeclaration(parent) || ConditionalExpression(node, parent); } function ConditionalExpression(node, parent) { if (isUnaryLike(parent) || isBinary(parent) || isConditionalExpression(parent, { test: node }) || isAwaitExpression(parent) || isTSTypeAssertion(parent) || isTSAsExpression(parent)) { return true; } return UnaryLike(node, parent); } function OptionalMemberExpression(node, parent) { return isCallExpression(parent, { callee: node }) || isMemberExpression(parent, { object: node }); } function AssignmentExpression(node, parent) { if (isObjectPattern(node.left)) { return true; } else { return ConditionalExpression(node, parent); } } function LogicalExpression(node, parent) { switch (node.operator) { case "||": if (!isLogicalExpression(parent)) return false; return parent.operator === "??" || parent.operator === "&&"; case "&&": return isLogicalExpression(parent, { operator: "??" }); case "??": return isLogicalExpression(parent) && parent.operator !== "??"; } } function Identifier(node, parent, printStack) { if (node.name === "let") { const isFollowedByBracket = isMemberExpression(parent, { object: node, computed: true }) || isOptionalMemberExpression(parent, { object: node, computed: true, optional: false }); return isFirstInContext(printStack, { expressionStatement: isFollowedByBracket, forHead: isFollowedByBracket, forInHead: isFollowedByBracket, forOfHead: true }); } return node.name === "async" && isForOfStatement(parent) && node === parent.left; } function isFirstInContext(printStack, { expressionStatement = false, arrowBody = false, exportDefault = false, forHead = false, forInHead = false, forOfHead = false }) { let i = printStack.length - 1; let node = printStack[i]; i--; let parent = printStack[i]; while (i >= 0) { if (expressionStatement && isExpressionStatement(parent, { expression: node }) || exportDefault && isExportDefaultDeclaration(parent, { declaration: node }) || arrowBody && isArrowFunctionExpression(parent, { body: node }) || forHead && isForStatement(parent, { init: node }) || forInHead && isForInStatement(parent, { left: node }) || forOfHead && isForOfStatement(parent, { left: node })) { return true; } if (hasPostfixPart(node, parent) && !isNewExpression(parent) || isSequenceExpression(parent) && parent.expressions[0] === node || isConditional(parent, { test: node }) || isBinary(parent, { left: node }) || isAssignmentExpression(parent, { left: node })) { node = parent; i--; parent = printStack[i]; } else { return false; } } return false; } } }); // node_modules/@babel/generator/lib/node/index.js var require_node4 = __commonJS({ "node_modules/@babel/generator/lib/node/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.needsParens = needsParens; exports2.needsWhitespace = needsWhitespace; exports2.needsWhitespaceAfter = needsWhitespaceAfter; exports2.needsWhitespaceBefore = needsWhitespaceBefore; var whitespace = require_whitespace(); var parens = require_parentheses(); var _t = require_lib9(); var { FLIPPED_ALIAS_KEYS, isCallExpression, isExpressionStatement, isMemberExpression, isNewExpression } = _t; function expandAliases(obj) { const newObj = {}; function add(type, func) { const fn = newObj[type]; newObj[type] = fn ? function(node, parent, stack) { const result = fn(node, parent, stack); return result == null ? func(node, parent, stack) : result; } : func; } for (const type of Object.keys(obj)) { const aliases = FLIPPED_ALIAS_KEYS[type]; if (aliases) { for (const alias of aliases) { add(alias, obj[type]); } } else { add(type, obj[type]); } } return newObj; } var expandedParens = expandAliases(parens); var expandedWhitespaceNodes = expandAliases(whitespace.nodes); var expandedWhitespaceList = expandAliases(whitespace.list); function find(obj, node, parent, printStack) { const fn = obj[node.type]; return fn ? fn(node, parent, printStack) : null; } function isOrHasCallExpression(node) { if (isCallExpression(node)) { return true; } return isMemberExpression(node) && isOrHasCallExpression(node.object); } function needsWhitespace(node, parent, type) { if (!node) return 0; if (isExpressionStatement(node)) { node = node.expression; } let linesInfo = find(expandedWhitespaceNodes, node, parent); if (!linesInfo) { const items = find(expandedWhitespaceList, node, parent); if (items) { for (let i = 0; i < items.length; i++) { linesInfo = needsWhitespace(items[i], node, type); if (linesInfo) break; } } } if (typeof linesInfo === "object" && linesInfo !== null) { return linesInfo[type] || 0; } return 0; } function needsWhitespaceBefore(node, parent) { return needsWhitespace(node, parent, "before"); } function needsWhitespaceAfter(node, parent) { return needsWhitespace(node, parent, "after"); } function needsParens(node, parent, printStack) { if (!parent) return false; if (isNewExpression(parent) && parent.callee === node) { if (isOrHasCallExpression(node)) return true; } return find(expandedParens, node, parent, printStack); } } }); // node_modules/@babel/generator/lib/generators/template-literals.js var require_template_literals = __commonJS({ "node_modules/@babel/generator/lib/generators/template-literals.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TaggedTemplateExpression = TaggedTemplateExpression; exports2.TemplateElement = TemplateElement; exports2.TemplateLiteral = TemplateLiteral; function TaggedTemplateExpression(node) { this.print(node.tag, node); this.print(node.typeParameters, node); this.print(node.quasi, node); } function TemplateElement(node, parent) { const isFirst = parent.quasis[0] === node; const isLast = parent.quasis[parent.quasis.length - 1] === node; const value = (isFirst ? "`" : "}") + node.value.raw + (isLast ? "`" : "${"); this.token(value); } function TemplateLiteral(node) { const quasis = node.quasis; for (let i = 0; i < quasis.length; i++) { this.print(quasis[i], node); if (i + 1 < quasis.length) { this.print(node.expressions[i], node); } } } } }); // node_modules/@babel/generator/lib/generators/expressions.js var require_expressions = __commonJS({ "node_modules/@babel/generator/lib/generators/expressions.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.LogicalExpression = exports2.BinaryExpression = exports2.AssignmentExpression = AssignmentExpression; exports2.AssignmentPattern = AssignmentPattern; exports2.AwaitExpression = void 0; exports2.BindExpression = BindExpression; exports2.CallExpression = CallExpression; exports2.ConditionalExpression = ConditionalExpression; exports2.Decorator = Decorator; exports2.DoExpression = DoExpression; exports2.EmptyStatement = EmptyStatement; exports2.ExpressionStatement = ExpressionStatement; exports2.Import = Import; exports2.MemberExpression = MemberExpression; exports2.MetaProperty = MetaProperty; exports2.ModuleExpression = ModuleExpression; exports2.NewExpression = NewExpression; exports2.OptionalCallExpression = OptionalCallExpression; exports2.OptionalMemberExpression = OptionalMemberExpression; exports2.ParenthesizedExpression = ParenthesizedExpression; exports2.PrivateName = PrivateName; exports2.SequenceExpression = SequenceExpression; exports2.Super = Super; exports2.ThisExpression = ThisExpression; exports2.UnaryExpression = UnaryExpression; exports2.UpdateExpression = UpdateExpression; exports2.V8IntrinsicIdentifier = V8IntrinsicIdentifier; exports2.YieldExpression = void 0; var _t = require_lib9(); var n = require_node4(); var { isCallExpression, isLiteral, isMemberExpression, isNewExpression } = _t; function UnaryExpression(node) { if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof" || node.operator === "throw") { this.word(node.operator); this.space(); } else { this.token(node.operator); } this.print(node.argument, node); } function DoExpression(node) { if (node.async) { this.word("async"); this.space(); } this.word("do"); this.space(); this.print(node.body, node); } function ParenthesizedExpression(node) { this.token("("); this.print(node.expression, node); this.token(")"); } function UpdateExpression(node) { if (node.prefix) { this.token(node.operator); this.print(node.argument, node); } else { this.startTerminatorless(true); this.print(node.argument, node); this.endTerminatorless(); this.token(node.operator); } } function ConditionalExpression(node) { this.print(node.test, node); this.space(); this.token("?"); this.space(); this.print(node.consequent, node); this.space(); this.token(":"); this.space(); this.print(node.alternate, node); } function NewExpression(node, parent) { this.word("new"); this.space(); this.print(node.callee, node); if (this.format.minified && node.arguments.length === 0 && !node.optional && !isCallExpression(parent, { callee: node }) && !isMemberExpression(parent) && !isNewExpression(parent)) { return; } this.print(node.typeArguments, node); this.print(node.typeParameters, node); if (node.optional) { this.token("?."); } this.token("("); this.printList(node.arguments, node); this.token(")"); } function SequenceExpression(node) { this.printList(node.expressions, node); } function ThisExpression() { this.word("this"); } function Super() { this.word("super"); } function Decorator(node) { this.token("@"); this.print(node.expression, node); this.newline(); } function OptionalMemberExpression(node) { this.print(node.object, node); if (!node.computed && isMemberExpression(node.property)) { throw new TypeError("Got a MemberExpression for MemberExpression property"); } let computed = node.computed; if (isLiteral(node.property) && typeof node.property.value === "number") { computed = true; } if (node.optional) { this.token("?."); } if (computed) { this.token("["); this.print(node.property, node); this.token("]"); } else { if (!node.optional) { this.token("."); } this.print(node.property, node); } } function OptionalCallExpression(node) { this.print(node.callee, node); this.print(node.typeArguments, node); this.print(node.typeParameters, node); if (node.optional) { this.token("?."); } this.token("("); this.printList(node.arguments, node); this.token(")"); } function CallExpression(node) { this.print(node.callee, node); this.print(node.typeArguments, node); this.print(node.typeParameters, node); this.token("("); this.printList(node.arguments, node); this.token(")"); } function Import() { this.word("import"); } function buildYieldAwait(keyword) { return function(node) { this.word(keyword); if (node.delegate) { this.token("*"); } if (node.argument) { this.space(); const terminatorState = this.startTerminatorless(); this.print(node.argument, node); this.endTerminatorless(terminatorState); } }; } var YieldExpression = buildYieldAwait("yield"); exports2.YieldExpression = YieldExpression; var AwaitExpression = buildYieldAwait("await"); exports2.AwaitExpression = AwaitExpression; function EmptyStatement() { this.semicolon(true); } function ExpressionStatement(node) { this.print(node.expression, node); this.semicolon(); } function AssignmentPattern(node) { this.print(node.left, node); if (node.left.optional) this.token("?"); this.print(node.left.typeAnnotation, node); this.space(); this.token("="); this.space(); this.print(node.right, node); } function AssignmentExpression(node, parent) { const parens = this.inForStatementInitCounter && node.operator === "in" && !n.needsParens(node, parent); if (parens) { this.token("("); } this.print(node.left, node); this.space(); if (node.operator === "in" || node.operator === "instanceof") { this.word(node.operator); } else { this.token(node.operator); } this.space(); this.print(node.right, node); if (parens) { this.token(")"); } } function BindExpression(node) { this.print(node.object, node); this.token("::"); this.print(node.callee, node); } function MemberExpression(node) { this.print(node.object, node); if (!node.computed && isMemberExpression(node.property)) { throw new TypeError("Got a MemberExpression for MemberExpression property"); } let computed = node.computed; if (isLiteral(node.property) && typeof node.property.value === "number") { computed = true; } if (computed) { this.token("["); this.print(node.property, node); this.token("]"); } else { this.token("."); this.print(node.property, node); } } function MetaProperty(node) { this.print(node.meta, node); this.token("."); this.print(node.property, node); } function PrivateName(node) { this.token("#"); this.print(node.id, node); } function V8IntrinsicIdentifier(node) { this.token("%"); this.word(node.name); } function ModuleExpression(node) { this.word("module"); this.space(); this.token("{"); if (node.body.body.length === 0) { this.token("}"); } else { this.newline(); this.printSequence(node.body.body, node, { indent: true }); this.rightBrace(); } } } }); // node_modules/@babel/generator/lib/generators/statements.js var require_statements = __commonJS({ "node_modules/@babel/generator/lib/generators/statements.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BreakStatement = void 0; exports2.CatchClause = CatchClause; exports2.ContinueStatement = void 0; exports2.DebuggerStatement = DebuggerStatement; exports2.DoWhileStatement = DoWhileStatement; exports2.ForOfStatement = exports2.ForInStatement = void 0; exports2.ForStatement = ForStatement; exports2.IfStatement = IfStatement; exports2.LabeledStatement = LabeledStatement; exports2.ReturnStatement = void 0; exports2.SwitchCase = SwitchCase; exports2.SwitchStatement = SwitchStatement; exports2.ThrowStatement = void 0; exports2.TryStatement = TryStatement; exports2.VariableDeclaration = VariableDeclaration; exports2.VariableDeclarator = VariableDeclarator; exports2.WhileStatement = WhileStatement; exports2.WithStatement = WithStatement; var _t = require_lib9(); var { isFor, isForStatement, isIfStatement, isStatement } = _t; function WithStatement(node) { this.word("with"); this.space(); this.token("("); this.print(node.object, node); this.token(")"); this.printBlock(node); } function IfStatement(node) { this.word("if"); this.space(); this.token("("); this.print(node.test, node); this.token(")"); this.space(); const needsBlock = node.alternate && isIfStatement(getLastStatement(node.consequent)); if (needsBlock) { this.token("{"); this.newline(); this.indent(); } this.printAndIndentOnComments(node.consequent, node); if (needsBlock) { this.dedent(); this.newline(); this.token("}"); } if (node.alternate) { if (this.endsWith(125)) this.space(); this.word("else"); this.space(); this.printAndIndentOnComments(node.alternate, node); } } function getLastStatement(statement) { if (!isStatement(statement.body)) return statement; return getLastStatement(statement.body); } function ForStatement(node) { this.word("for"); this.space(); this.token("("); this.inForStatementInitCounter++; this.print(node.init, node); this.inForStatementInitCounter--; this.token(";"); if (node.test) { this.space(); this.print(node.test, node); } this.token(";"); if (node.update) { this.space(); this.print(node.update, node); } this.token(")"); this.printBlock(node); } function WhileStatement(node) { this.word("while"); this.space(); this.token("("); this.print(node.test, node); this.token(")"); this.printBlock(node); } var buildForXStatement = function(op) { return function(node) { this.word("for"); this.space(); if (op === "of" && node.await) { this.word("await"); this.space(); } this.token("("); this.print(node.left, node); this.space(); this.word(op); this.space(); this.print(node.right, node); this.token(")"); this.printBlock(node); }; }; var ForInStatement = buildForXStatement("in"); exports2.ForInStatement = ForInStatement; var ForOfStatement = buildForXStatement("of"); exports2.ForOfStatement = ForOfStatement; function DoWhileStatement(node) { this.word("do"); this.space(); this.print(node.body, node); this.space(); this.word("while"); this.space(); this.token("("); this.print(node.test, node); this.token(")"); this.semicolon(); } function buildLabelStatement(prefix, key = "label") { return function(node) { this.word(prefix); const label = node[key]; if (label) { this.space(); const isLabel = key == "label"; const terminatorState = this.startTerminatorless(isLabel); this.print(label, node); this.endTerminatorless(terminatorState); } this.semicolon(); }; } var ContinueStatement = buildLabelStatement("continue"); exports2.ContinueStatement = ContinueStatement; var ReturnStatement = buildLabelStatement("return", "argument"); exports2.ReturnStatement = ReturnStatement; var BreakStatement = buildLabelStatement("break"); exports2.BreakStatement = BreakStatement; var ThrowStatement = buildLabelStatement("throw", "argument"); exports2.ThrowStatement = ThrowStatement; function LabeledStatement(node) { this.print(node.label, node); this.token(":"); this.space(); this.print(node.body, node); } function TryStatement(node) { this.word("try"); this.space(); this.print(node.block, node); this.space(); if (node.handlers) { this.print(node.handlers[0], node); } else { this.print(node.handler, node); } if (node.finalizer) { this.space(); this.word("finally"); this.space(); this.print(node.finalizer, node); } } function CatchClause(node) { this.word("catch"); this.space(); if (node.param) { this.token("("); this.print(node.param, node); this.print(node.param.typeAnnotation, node); this.token(")"); this.space(); } this.print(node.body, node); } function SwitchStatement(node) { this.word("switch"); this.space(); this.token("("); this.print(node.discriminant, node); this.token(")"); this.space(); this.token("{"); this.printSequence(node.cases, node, { indent: true, addNewlines(leading, cas) { if (!leading && node.cases[node.cases.length - 1] === cas) return -1; } }); this.token("}"); } function SwitchCase(node) { if (node.test) { this.word("case"); this.space(); this.print(node.test, node); this.token(":"); } else { this.word("default"); this.token(":"); } if (node.consequent.length) { this.newline(); this.printSequence(node.consequent, node, { indent: true }); } } function DebuggerStatement() { this.word("debugger"); this.semicolon(); } function variableDeclarationIndent() { this.token(","); this.newline(); if (this.endsWith(10)) { for (let i = 0; i < 4; i++) this.space(true); } } function constDeclarationIndent() { this.token(","); this.newline(); if (this.endsWith(10)) { for (let i = 0; i < 6; i++) this.space(true); } } function VariableDeclaration(node, parent) { if (node.declare) { this.word("declare"); this.space(); } this.word(node.kind); this.space(); let hasInits = false; if (!isFor(parent)) { for (const declar of node.declarations) { if (declar.init) { hasInits = true; } } } let separator; if (hasInits) { separator = node.kind === "const" ? constDeclarationIndent : variableDeclarationIndent; } this.printList(node.declarations, node, { separator }); if (isFor(parent)) { if (isForStatement(parent)) { if (parent.init === node) return; } else { if (parent.left === node) return; } } this.semicolon(); } function VariableDeclarator(node) { this.print(node.id, node); if (node.definite) this.token("!"); this.print(node.id.typeAnnotation, node); if (node.init) { this.space(); this.token("="); this.space(); this.print(node.init, node); } } } }); // node_modules/@babel/generator/lib/generators/classes.js var require_classes = __commonJS({ "node_modules/@babel/generator/lib/generators/classes.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ClassAccessorProperty = ClassAccessorProperty; exports2.ClassBody = ClassBody; exports2.ClassExpression = exports2.ClassDeclaration = ClassDeclaration; exports2.ClassMethod = ClassMethod; exports2.ClassPrivateMethod = ClassPrivateMethod; exports2.ClassPrivateProperty = ClassPrivateProperty; exports2.ClassProperty = ClassProperty; exports2.StaticBlock = StaticBlock; exports2._classMethodHead = _classMethodHead; var _t = require_lib9(); var { isExportDefaultDeclaration, isExportNamedDeclaration } = _t; function ClassDeclaration(node, parent) { if (!this.format.decoratorsBeforeExport || !isExportDefaultDeclaration(parent) && !isExportNamedDeclaration(parent)) { this.printJoin(node.decorators, node); } if (node.declare) { this.word("declare"); this.space(); } if (node.abstract) { this.word("abstract"); this.space(); } this.word("class"); this.printInnerComments(node); if (node.id) { this.space(); this.print(node.id, node); } this.print(node.typeParameters, node); if (node.superClass) { this.space(); this.word("extends"); this.space(); this.print(node.superClass, node); this.print(node.superTypeParameters, node); } if (node.implements) { this.space(); this.word("implements"); this.space(); this.printList(node.implements, node); } this.space(); this.print(node.body, node); } function ClassBody(node) { this.token("{"); this.printInnerComments(node); if (node.body.length === 0) { this.token("}"); } else { this.newline(); this.indent(); this.printSequence(node.body, node); this.dedent(); if (!this.endsWith(10)) this.newline(); this.rightBrace(); } } function ClassProperty(node) { this.printJoin(node.decorators, node); this.source("end", node.key.loc); this.tsPrintClassMemberModifiers(node, true); if (node.computed) { this.token("["); this.print(node.key, node); this.token("]"); } else { this._variance(node); this.print(node.key, node); } if (node.optional) { this.token("?"); } if (node.definite) { this.token("!"); } this.print(node.typeAnnotation, node); if (node.value) { this.space(); this.token("="); this.space(); this.print(node.value, node); } this.semicolon(); } function ClassAccessorProperty(node) { this.printJoin(node.decorators, node); this.source("end", node.key.loc); this.tsPrintClassMemberModifiers(node, true); this.word("accessor"); this.printInnerComments(node); this.space(); if (node.computed) { this.token("["); this.print(node.key, node); this.token("]"); } else { this._variance(node); this.print(node.key, node); } if (node.optional) { this.token("?"); } if (node.definite) { this.token("!"); } this.print(node.typeAnnotation, node); if (node.value) { this.space(); this.token("="); this.space(); this.print(node.value, node); } this.semicolon(); } function ClassPrivateProperty(node) { this.printJoin(node.decorators, node); if (node.static) { this.word("static"); this.space(); } this.print(node.key, node); this.print(node.typeAnnotation, node); if (node.value) { this.space(); this.token("="); this.space(); this.print(node.value, node); } this.semicolon(); } function ClassMethod(node) { this._classMethodHead(node); this.space(); this.print(node.body, node); } function ClassPrivateMethod(node) { this._classMethodHead(node); this.space(); this.print(node.body, node); } function _classMethodHead(node) { this.printJoin(node.decorators, node); this.source("end", node.key.loc); this.tsPrintClassMemberModifiers(node, false); this._methodHead(node); } function StaticBlock(node) { this.word("static"); this.space(); this.token("{"); if (node.body.length === 0) { this.token("}"); } else { this.newline(); this.printSequence(node.body, node, { indent: true }); this.rightBrace(); } } } }); // node_modules/@babel/generator/lib/generators/methods.js var require_methods = __commonJS({ "node_modules/@babel/generator/lib/generators/methods.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ArrowFunctionExpression = ArrowFunctionExpression; exports2.FunctionDeclaration = exports2.FunctionExpression = FunctionExpression; exports2._functionHead = _functionHead; exports2._methodHead = _methodHead; exports2._param = _param; exports2._parameters = _parameters; exports2._params = _params; exports2._predicate = _predicate; var _t = require_lib9(); var { isIdentifier } = _t; function _params(node) { this.print(node.typeParameters, node); this.token("("); this._parameters(node.params, node); this.token(")"); this.print(node.returnType, node); } function _parameters(parameters, parent) { for (let i = 0; i < parameters.length; i++) { this._param(parameters[i], parent); if (i < parameters.length - 1) { this.token(","); this.space(); } } } function _param(parameter, parent) { this.printJoin(parameter.decorators, parameter); this.print(parameter, parent); if (parameter.optional) this.token("?"); this.print(parameter.typeAnnotation, parameter); } function _methodHead(node) { const kind = node.kind; const key = node.key; if (kind === "get" || kind === "set") { this.word(kind); this.space(); } if (node.async) { this._catchUp("start", key.loc); this.word("async"); this.space(); } if (kind === "method" || kind === "init") { if (node.generator) { this.token("*"); } } if (node.computed) { this.token("["); this.print(key, node); this.token("]"); } else { this.print(key, node); } if (node.optional) { this.token("?"); } this._params(node); } function _predicate(node) { if (node.predicate) { if (!node.returnType) { this.token(":"); } this.space(); this.print(node.predicate, node); } } function _functionHead(node) { if (node.async) { this.word("async"); this.space(); } this.word("function"); if (node.generator) this.token("*"); this.printInnerComments(node); this.space(); if (node.id) { this.print(node.id, node); } this._params(node); this._predicate(node); } function FunctionExpression(node) { this._functionHead(node); this.space(); this.print(node.body, node); } function ArrowFunctionExpression(node) { if (node.async) { this.word("async"); this.space(); } const firstParam = node.params[0]; if (!this.format.retainLines && !this.format.auxiliaryCommentBefore && !this.format.auxiliaryCommentAfter && node.params.length === 1 && isIdentifier(firstParam) && !hasTypesOrComments(node, firstParam)) { this.print(firstParam, node); } else { this._params(node); } this._predicate(node); this.space(); this.token("=>"); this.space(); this.print(node.body, node); } function hasTypesOrComments(node, param) { var _param$leadingComment, _param$trailingCommen; return !!(node.typeParameters || node.returnType || node.predicate || param.typeAnnotation || param.optional || (_param$leadingComment = param.leadingComments) != null && _param$leadingComment.length || (_param$trailingCommen = param.trailingComments) != null && _param$trailingCommen.length); } } }); // node_modules/@babel/generator/lib/generators/modules.js var require_modules = __commonJS({ "node_modules/@babel/generator/lib/generators/modules.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ExportAllDeclaration = ExportAllDeclaration; exports2.ExportDefaultDeclaration = ExportDefaultDeclaration; exports2.ExportDefaultSpecifier = ExportDefaultSpecifier; exports2.ExportNamedDeclaration = ExportNamedDeclaration; exports2.ExportNamespaceSpecifier = ExportNamespaceSpecifier; exports2.ExportSpecifier = ExportSpecifier; exports2.ImportAttribute = ImportAttribute; exports2.ImportDeclaration = ImportDeclaration; exports2.ImportDefaultSpecifier = ImportDefaultSpecifier; exports2.ImportNamespaceSpecifier = ImportNamespaceSpecifier; exports2.ImportSpecifier = ImportSpecifier; var _t = require_lib9(); var { isClassDeclaration, isExportDefaultSpecifier, isExportNamespaceSpecifier, isImportDefaultSpecifier, isImportNamespaceSpecifier, isStatement } = _t; function ImportSpecifier(node) { if (node.importKind === "type" || node.importKind === "typeof") { this.word(node.importKind); this.space(); } this.print(node.imported, node); if (node.local && node.local.name !== node.imported.name) { this.space(); this.word("as"); this.space(); this.print(node.local, node); } } function ImportDefaultSpecifier(node) { this.print(node.local, node); } function ExportDefaultSpecifier(node) { this.print(node.exported, node); } function ExportSpecifier(node) { if (node.exportKind === "type") { this.word("type"); this.space(); } this.print(node.local, node); if (node.exported && node.local.name !== node.exported.name) { this.space(); this.word("as"); this.space(); this.print(node.exported, node); } } function ExportNamespaceSpecifier(node) { this.token("*"); this.space(); this.word("as"); this.space(); this.print(node.exported, node); } function ExportAllDeclaration(node) { this.word("export"); this.space(); if (node.exportKind === "type") { this.word("type"); this.space(); } this.token("*"); this.space(); this.word("from"); this.space(); this.print(node.source, node); this.printAssertions(node); this.semicolon(); } function ExportNamedDeclaration(node) { if (this.format.decoratorsBeforeExport && isClassDeclaration(node.declaration)) { this.printJoin(node.declaration.decorators, node); } this.word("export"); this.space(); ExportDeclaration.apply(this, arguments); } function ExportDefaultDeclaration(node) { if (this.format.decoratorsBeforeExport && isClassDeclaration(node.declaration)) { this.printJoin(node.declaration.decorators, node); } this.word("export"); this.space(); this.word("default"); this.space(); ExportDeclaration.apply(this, arguments); } function ExportDeclaration(node) { if (node.declaration) { const declar = node.declaration; this.print(declar, node); if (!isStatement(declar)) this.semicolon(); } else { if (node.exportKind === "type") { this.word("type"); this.space(); } const specifiers = node.specifiers.slice(0); let hasSpecial = false; for (; ; ) { const first = specifiers[0]; if (isExportDefaultSpecifier(first) || isExportNamespaceSpecifier(first)) { hasSpecial = true; this.print(specifiers.shift(), node); if (specifiers.length) { this.token(","); this.space(); } } else { break; } } if (specifiers.length || !specifiers.length && !hasSpecial) { this.token("{"); if (specifiers.length) { this.space(); this.printList(specifiers, node); this.space(); } this.token("}"); } if (node.source) { this.space(); this.word("from"); this.space(); this.print(node.source, node); this.printAssertions(node); } this.semicolon(); } } function ImportDeclaration(node) { this.word("import"); this.space(); if (node.importKind === "type" || node.importKind === "typeof") { this.word(node.importKind); this.space(); } const specifiers = node.specifiers.slice(0); if (specifiers != null && specifiers.length) { for (; ; ) { const first = specifiers[0]; if (isImportDefaultSpecifier(first) || isImportNamespaceSpecifier(first)) { this.print(specifiers.shift(), node); if (specifiers.length) { this.token(","); this.space(); } } else { break; } } if (specifiers.length) { this.token("{"); this.space(); this.printList(specifiers, node); this.space(); this.token("}"); } this.space(); this.word("from"); this.space(); } this.print(node.source, node); this.printAssertions(node); { var _node$attributes; if ((_node$attributes = node.attributes) != null && _node$attributes.length) { this.space(); this.word("with"); this.space(); this.printList(node.attributes, node); } } this.semicolon(); } function ImportAttribute(node) { this.print(node.key); this.token(":"); this.space(); this.print(node.value); } function ImportNamespaceSpecifier(node) { this.token("*"); this.space(); this.word("as"); this.space(); this.print(node.local, node); } } }); // ../../node_modules/jsesc/jsesc.js var require_jsesc = __commonJS({ "../../node_modules/jsesc/jsesc.js"(exports2, module2) { "use strict"; var object = {}; var hasOwnProperty = object.hasOwnProperty; var forOwn = (object2, callback) => { for (const key in object2) { if (hasOwnProperty.call(object2, key)) { callback(key, object2[key]); } } }; var extend = (destination, source) => { if (!source) { return destination; } forOwn(source, (key, value) => { destination[key] = value; }); return destination; }; var forEach = (array, callback) => { const length = array.length; let index = -1; while (++index < length) { callback(array[index]); } }; var toString = object.toString; var isArray = Array.isArray; var isBuffer = Buffer.isBuffer; var isObject = (value) => { return toString.call(value) == "[object Object]"; }; var isString = (value) => { return typeof value == "string" || toString.call(value) == "[object String]"; }; var isNumber = (value) => { return typeof value == "number" || toString.call(value) == "[object Number]"; }; var isFunction = (value) => { return typeof value == "function"; }; var isMap = (value) => { return toString.call(value) == "[object Map]"; }; var isSet = (value) => { return toString.call(value) == "[object Set]"; }; var singleEscapes = { '"': '\\"', "'": "\\'", "\\": "\\\\", "\b": "\\b", "\f": "\\f", "\n": "\\n", "\r": "\\r", " ": "\\t" }; var regexSingleEscape = /["'\\\b\f\n\r\t]/; var regexDigit = /[0-9]/; var regexWhitelist = /[ !#-&\(-\[\]-_a-~]/; var jsesc = (argument, options) => { const increaseIndentation = () => { oldIndent = indent; ++options.indentLevel; indent = options.indent.repeat(options.indentLevel); }; const defaults = { "escapeEverything": false, "minimal": false, "isScriptContext": false, "quotes": "single", "wrap": false, "es6": false, "json": false, "compact": true, "lowercaseHex": false, "numbers": "decimal", "indent": " ", "indentLevel": 0, "__inline1__": false, "__inline2__": false }; const json = options && options.json; if (json) { defaults.quotes = "double"; defaults.wrap = true; } options = extend(defaults, options); if (options.quotes != "single" && options.quotes != "double" && options.quotes != "backtick") { options.quotes = "single"; } const quote = options.quotes == "double" ? '"' : options.quotes == "backtick" ? "`" : "'"; const compact = options.compact; const lowercaseHex = options.lowercaseHex; let indent = options.indent.repeat(options.indentLevel); let oldIndent = ""; const inline1 = options.__inline1__; const inline2 = options.__inline2__; const newLine = compact ? "" : "\n"; let result; let isEmpty = true; const useBinNumbers = options.numbers == "binary"; const useOctNumbers = options.numbers == "octal"; const useDecNumbers = options.numbers == "decimal"; const useHexNumbers = options.numbers == "hexadecimal"; if (json && argument && isFunction(argument.toJSON)) { argument = argument.toJSON(); } if (!isString(argument)) { if (isMap(argument)) { if (argument.size == 0) { return "new Map()"; } if (!compact) { options.__inline1__ = true; options.__inline2__ = false; } return "new Map(" + jsesc(Array.from(argument), options) + ")"; } if (isSet(argument)) { if (argument.size == 0) { return "new Set()"; } return "new Set(" + jsesc(Array.from(argument), options) + ")"; } if (isBuffer(argument)) { if (argument.length == 0) { return "Buffer.from([])"; } return "Buffer.from(" + jsesc(Array.from(argument), options) + ")"; } if (isArray(argument)) { result = []; options.wrap = true; if (inline1) { options.__inline1__ = false; options.__inline2__ = true; } if (!inline2) { increaseIndentation(); } forEach(argument, (value) => { isEmpty = false; if (inline2) { options.__inline2__ = false; } result.push((compact || inline2 ? "" : indent) + jsesc(value, options)); }); if (isEmpty) { return "[]"; } if (inline2) { return "[" + result.join(", ") + "]"; } return "[" + newLine + result.join("," + newLine) + newLine + (compact ? "" : oldIndent) + "]"; } else if (isNumber(argument)) { if (json) { return JSON.stringify(argument); } if (useDecNumbers) { return String(argument); } if (useHexNumbers) { let hexadecimal = argument.toString(16); if (!lowercaseHex) { hexadecimal = hexadecimal.toUpperCase(); } return "0x" + hexadecimal; } if (useBinNumbers) { return "0b" + argument.toString(2); } if (useOctNumbers) { return "0o" + argument.toString(8); } } else if (!isObject(argument)) { if (json) { return JSON.stringify(argument) || "null"; } return String(argument); } else { result = []; options.wrap = true; increaseIndentation(); forOwn(argument, (key, value) => { isEmpty = false; result.push((compact ? "" : indent) + jsesc(key, options) + ":" + (compact ? "" : " ") + jsesc(value, options)); }); if (isEmpty) { return "{}"; } return "{" + newLine + result.join("," + newLine) + newLine + (compact ? "" : oldIndent) + "}"; } } const string = argument; let index = -1; const length = string.length; result = ""; while (++index < length) { const character = string.charAt(index); if (options.es6) { const first = string.charCodeAt(index); if (first >= 55296 && first <= 56319 && length > index + 1) { const second = string.charCodeAt(index + 1); if (second >= 56320 && second <= 57343) { const codePoint = (first - 55296) * 1024 + second - 56320 + 65536; let hexadecimal2 = codePoint.toString(16); if (!lowercaseHex) { hexadecimal2 = hexadecimal2.toUpperCase(); } result += "\\u{" + hexadecimal2 + "}"; ++index; continue; } } } if (!options.escapeEverything) { if (regexWhitelist.test(character)) { result += character; continue; } if (character == '"') { result += quote == character ? '\\"' : character; continue; } if (character == "`") { result += quote == character ? "\\`" : character; continue; } if (character == "'") { result += quote == character ? "\\'" : character; continue; } } if (character == "\0" && !json && !regexDigit.test(string.charAt(index + 1))) { result += "\\0"; continue; } if (regexSingleEscape.test(character)) { result += singleEscapes[character]; continue; } const charCode = character.charCodeAt(0); if (options.minimal && charCode != 8232 && charCode != 8233) { result += character; continue; } let hexadecimal = charCode.toString(16); if (!lowercaseHex) { hexadecimal = hexadecimal.toUpperCase(); } const longhand = hexadecimal.length > 2 || json; const escaped = "\\" + (longhand ? "u" : "x") + ("0000" + hexadecimal).slice(longhand ? -4 : -2); result += escaped; continue; } if (options.wrap) { result = quote + result + quote; } if (quote == "`") { result = result.replace(/\$\{/g, "\\${"); } if (options.isScriptContext) { return result.replace(/<\/(script|style)/gi, "<\\/$1").replace(/