@skybloxsystems/ticket-bot
Version:
1,160 lines (1,149 loc) • 7.51 MB
JavaScript
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __reExport = (target, module2, copyDefault, desc) => {
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
for (let key of __getOwnPropNames(module2))
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
}
return target;
};
var __toESM = (module2, isNodeMode) => {
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
};
// ../../node_modules/.pnpm/graceful-fs@4.2.9/node_modules/graceful-fs/polyfills.js
var require_polyfills = __commonJS({
"../../node_modules/.pnpm/graceful-fs@4.2.9/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) {
}
if (typeof process.chdir === "function") {
chdir = process.chdir;
process.chdir = function(d) {
cwd = null;
chdir.call(process, d);
};
if (Object.setPrototypeOf)
Object.setPrototypeOf(process.chdir, chdir);
}
var chdir;
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);
}
if (Object.setPrototypeOf)
Object.setPrototypeOf(read, 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) {
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/.pnpm/graceful-fs@4.2.9/node_modules/graceful-fs/legacy-streams.js
var require_legacy_streams = __commonJS({
"../../node_modules/.pnpm/graceful-fs@4.2.9/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 self2 = 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 keys2 = Object.keys(options);
for (var index = 0, length = keys2.length; index < length; index++) {
var key = keys2[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() {
self2._read();
});
return;
}
fs2.open(this.path, this.flags, this.mode, function(err, fd) {
if (err) {
self2.emit("error", err);
self2.readable = false;
return;
}
self2.fd = fd;
self2.emit("open", fd);
self2._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 keys2 = Object.keys(options);
for (var index = 0, length = keys2.length; index < length; index++) {
var key = keys2[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/.pnpm/graceful-fs@4.2.9/node_modules/graceful-fs/clone.js
var require_clone = __commonJS({
"../../node_modules/.pnpm/graceful-fs@4.2.9/node_modules/graceful-fs/clone.js"(exports2, module2) {
"use strict";
module2.exports = clone;
var getPrototypeOf = Object.getPrototypeOf || function(obj) {
return obj.__proto__;
};
function clone(obj) {
if (obj === null || typeof obj !== "object")
return obj;
if (obj instanceof Object)
var copy = { __proto__: getPrototypeOf(obj) };
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/.pnpm/graceful-fs@4.2.9/node_modules/graceful-fs/graceful-fs.js
var require_graceful_fs = __commonJS({
"../../node_modules/.pnpm/graceful-fs@4.2.9/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) {
resetQueue();
}
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);
resetQueue();
}
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, startTime) {
return fs$readFile(path3, options2, function(err) {
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
enqueue([go$readFile, [path3, options2, cb2], err, startTime || Date.now(), Date.now()]);
else {
if (typeof cb2 === "function")
cb2.apply(this, arguments);
}
});
}
}
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, startTime) {
return fs$writeFile(path3, data2, options2, function(err) {
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
enqueue([go$writeFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
else {
if (typeof cb2 === "function")
cb2.apply(this, arguments);
}
});
}
}
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, startTime) {
return fs$appendFile(path3, data2, options2, function(err) {
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
enqueue([go$appendFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
else {
if (typeof cb2 === "function")
cb2.apply(this, arguments);
}
});
}
}
var fs$copyFile = fs3.copyFile;
if (fs$copyFile)
fs3.copyFile = copyFile;
function copyFile(src, dest, flags, cb) {
if (typeof flags === "function") {
cb = flags;
flags = 0;
}
return go$copyFile(src, dest, flags, cb);
function go$copyFile(src2, dest2, flags2, cb2, startTime) {
return fs$copyFile(src2, dest2, flags2, function(err) {
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]);
else {
if (typeof cb2 === "function")
cb2.apply(this, arguments);
}
});
}
}
var fs$readdir = fs3.readdir;
fs3.readdir = readdir;
function readdir(path2, options, cb) {
if (typeof options === "function")
cb = options, options = null;
return go$readdir(path2, options, cb);
function go$readdir(path3, options2, cb2, startTime) {
return fs$readdir(path3, options2, function(err, files) {
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
enqueue([go$readdir, [path3, options2, cb2], err, startTime || Date.now(), Date.now()]);
else {
if (files && files.sort)
files.sort();
if (typeof cb2 === "function")
cb2.call(this, err, files);
}
});
}
}
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, startTime) {
return fs$open(path3, flags2, mode2, function(err, fd) {
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
enqueue([go$open, [path3, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
else {
if (typeof cb2 === "function")
cb2.apply(this, arguments);
}
});
}
}
return fs3;
}
function enqueue(elem) {
debug("ENQUEUE", elem[0].name, elem[1]);
fs2[gracefulQueue].push(elem);
retry();
}
var retryTimer;
function resetQueue() {
var now = Date.now();
for (var i = 0; i < fs2[gracefulQueue].length; ++i) {
if (fs2[gracefulQueue][i].length > 2) {
fs2[gracefulQueue][i][3] = now;
fs2[gracefulQueue][i][4] = now;
}
}
retry();
}
function retry() {
clearTimeout(retryTimer);
retryTimer = void 0;
if (fs2[gracefulQueue].length === 0)
return;
var elem = fs2[gracefulQueue].shift();
var fn2 = elem[0];
var args2 = elem[1];
var err = elem[2];
var startTime = elem[3];
var lastTime = elem[4];
if (startTime === void 0) {
debug("RETRY", fn2.name, args2);
fn2.apply(null, args2);
} else if (Date.now() - startTime >= 6e4) {
debug("TIMEOUT", fn2.name, args2);
var cb = args2.pop();
if (typeof cb === "function")
cb.call(null, err);
} else {
var sinceAttempt = Date.now() - lastTime;
var sinceStart = Math.max(lastTime - startTime, 1);
var desiredDelay = Math.min(sinceStart * 1.2, 100);
if (sinceAttempt >= desiredDelay) {
debug("RETRY", fn2.name, args2);
fn2.apply(null, args2.concat([startTime]));
} else {
fs2[gracefulQueue].push(elem);
}
}
if (retryTimer === void 0) {
retryTimer = setTimeout(retry, 0);
}
}
}
});
// ../../node_modules/.pnpm/strip-bom@4.0.0/node_modules/strip-bom/index.js
var require_strip_bom = __commonJS({
"../../node_modules/.pnpm/strip-bom@4.0.0/node_modules/strip-bom/index.js"(exports2, module2) {
"use strict";
module2.exports = (string) => {
if (typeof string !== "string") {
throw new TypeError(`Expected a string, got ${typeof string}`);
}
if (string.charCodeAt(0) === 65279) {
return string.slice(1);
}
return string;
};
}
});
// ../../node_modules/.pnpm/is-arrayish@0.2.1/node_modules/is-arrayish/index.js
var require_is_arrayish = __commonJS({
"../../node_modules/.pnpm/is-arrayish@0.2.1/node_modules/is-arrayish/index.js"(exports2, module2) {
"use strict";
module2.exports = function isArrayish(obj) {
if (!obj) {
return false;
}
return obj instanceof Array || Array.isArray(obj) || obj.length >= 0 && obj.splice instanceof Function;
};
}
});
// ../../node_modules/.pnpm/error-ex@1.3.2/node_modules/error-ex/index.js
var require_error_ex = __commonJS({
"../../node_modules/.pnpm/error-ex@1.3.2/node_modules/error-ex/index.js"(exports2, module2) {
"use strict";
var util = require("util");
var isArrayish = require_is_arrayish();
var errorEx = function errorEx2(name, properties) {
if (!name || name.constructor !== String) {
properties = name || {};
name = Error.name;
}
var errorExError = function ErrorEXError(message2) {
if (!this) {
return new ErrorEXError(message2);
}
message2 = message2 instanceof Error ? message2.message : message2 || this.message;
Error.call(this, message2);
Error.captureStackTrace(this, errorExError);
this.name = name;
Object.defineProperty(this, "message", {
configurable: true,
enumerable: false,
get: function() {
var newMessage = message2.split(/\r?\n/g);
for (var key in properties) {
if (!properties.hasOwnProperty(key)) {
continue;
}
var modifier = properties[key];
if ("message" in modifier) {
newMessage = modifier.message(this[key], newMessage) || newMessage;
if (!isArrayish(newMessage)) {
newMessage = [newMessage];
}
}
}
return newMessage.join("\n");
},
set: function(v) {
message2 = v;
}
});
var overwrittenStack = null;
var stackDescriptor = Object.getOwnPropertyDescriptor(this, "stack");
var stackGetter = stackDescriptor.get;
var stackValue = stackDescriptor.value;
delete stackDescriptor.value;
delete stackDescriptor.writable;
stackDescriptor.set = function(newstack) {
overwrittenStack = newstack;
};
stackDescriptor.get = function() {
var stack2 = (overwrittenStack || (stackGetter ? stackGetter.call(this) : stackValue)).split(/\r?\n+/g);
if (!overwrittenStack) {
stack2[0] = this.name + ": " + this.message;
}
var lineCount = 1;
for (var key in properties) {
if (!properties.hasOwnProperty(key)) {
continue;
}
var modifier = properties[key];
if ("line" in modifier) {
var line = modifier.line(this[key]);
if (line) {
stack2.splice(lineCount++, 0, " " + line);
}
}
if ("stack" in modifier) {
modifier.stack(this[key], stack2);
}
}
return stack2.join("\n");
};
Object.defineProperty(this, "stack", stackDescriptor);
};
if (Object.setPrototypeOf) {
Object.setPrototypeOf(errorExError.prototype, Error.prototype);
Object.setPrototypeOf(errorExError, Error);
} else {
util.inherits(errorExError, Error);
}
return errorExError;
};
errorEx.append = function(str, def) {
return {
message: function(v, message2) {
v = v || def;
if (v) {
message2[0] += " " + str.replace("%s", v.toString());
}
return message2;
}
};
};
errorEx.line = function(str, def) {
return {
line: function(v) {
v = v || def;
if (v) {
return str.replace("%s", v.toString());
}
return null;
}
};
};
module2.exports = errorEx;
}
});
// ../../node_modules/.pnpm/json-parse-even-better-errors@2.3.1/node_modules/json-parse-even-better-errors/index.js
var require_json_parse_even_better_errors = __commonJS({
"../../node_modules/.pnpm/json-parse-even-better-errors@2.3.1/node_modules/json-parse-even-better-errors/index.js"(exports2, module2) {
"use strict";
var hexify = (char) => {
const h = char.charCodeAt(0).toString(16).toUpperCase();
return "0x" + (h.length % 2 ? "0" : "") + h;
};
var parseError = (e, txt, context) => {
if (!txt) {
return {
message: e.message + " while parsing empty string",
position: 0
};
}
const badToken = e.message.match(/^Unexpected token (.) .*position\s+(\d+)/i);
const errIdx = badToken ? +badToken[2] : e.message.match(/^Unexpected end of JSON.*/i) ? txt.length - 1 : null;
const msg = badToken ? e.message.replace(/^Unexpected token ./, `Unexpected token ${JSON.stringify(badToken[1])} (${hexify(badToken[1])})`) : e.message;
if (errIdx !== null && errIdx !== void 0) {
const start = errIdx <= context ? 0 : errIdx - context;
const end = errIdx + context >= txt.length ? txt.length : errIdx + context;
const slice = (start === 0 ? "" : "...") + txt.slice(start, end) + (end === txt.length ? "" : "...");
const near = txt === slice ? "" : "near ";
return {
message: msg + ` while parsing ${near}${JSON.stringify(slice)}`,
position: errIdx
};
} else {
return {
message: msg + ` while parsing '${txt.slice(0, context * 2)}'`,
position: 0
};
}
};
var JSONParseError = class extends SyntaxError {
constructor(er, txt, context, caller) {
context = context || 20;
const metadata = parseError(er, txt, context);
super(metadata.message);
Object.assign(this, metadata);
this.code = "EJSONPARSE";
this.systemError = er;
Error.captureStackTrace(this, caller || this.constructor);
}
get name() {
return this.constructor.name;
}
set name(n) {
}
get [Symbol.toStringTag]() {
return this.constructor.name;
}
};
var kIndent = Symbol.for("indent");
var kNewline = Symbol.for("newline");
var formatRE = /^\s*[{\[]((?:\r?\n)+)([\s\t]*)/;
var emptyRE = /^(?:\{\}|\[\])((?:\r?\n)+)?$/;
var parseJson = (txt, reviver, context) => {
const parseText = stripBOM(txt);
context = context || 20;
try {
const [, newline = "\n", indent = " "] = parseText.match(emptyRE) || parseText.match(formatRE) || [, "", ""];
const result2 = JSON.parse(parseText, reviver);
if (result2 && typeof result2 === "object") {
result2[kNewline] = newline;
result2[kIndent] = indent;
}
return result2;
} catch (e) {
if (typeof txt !== "string" && !Buffer.isBuffer(txt)) {
const isEmptyArray = Array.isArray(txt) && txt.length === 0;
throw Object.assign(new TypeError(`Cannot parse ${isEmptyArray ? "an empty array" : String(txt)}`), {
code: "EJSONPARSE",
systemError: e
});
}
throw new JSONParseError(e, parseText, context, parseJson);
}
};
var stripBOM = (txt) => String(txt).replace(/^\uFEFF/, "");
module2.exports = parseJson;
parseJson.JSONParseError = JSONParseError;
parseJson.noExceptions = (txt, reviver) => {
try {
return JSON.parse(stripBOM(txt), reviver);
} catch (e) {
}
};
}
});
// ../../node_modules/.pnpm/lines-and-columns@1.2.4/node_modules/lines-and-columns/build/index.js
var require_build = __commonJS({
"../../node_modules/.pnpm/lines-and-columns@1.2.4/node_modules/lines-and-columns/build/index.js"(exports2) {
"use strict";
exports2.__esModule = true;
exports2.LinesAndColumns = void 0;
var LF = "\n";
var CR = "\r";
var LinesAndColumns = function() {
function LinesAndColumns2(string) {
this.string = string;
var offsets = [0];
for (var offset = 0; offset < string.length; ) {
switch (string[offset]) {
case LF:
offset += LF.length;
offsets.push(offset);
break;
case CR:
offset += CR.length;
if (string[offset] === LF) {
offset += LF.length;
}
offsets.push(offset);
break;
default:
offset++;
break;
}
}
this.offsets = offsets;
}
LinesAndColumns2.prototype.locationForIndex = function(index) {
if (index < 0 || index > this.string.length) {
return null;
}
var line = 0;
var offsets = this.offsets;
while (offsets[line + 1] <= index) {
line++;
}
var column = index - offsets[line];
return { line, column };
};
LinesAndColumns2.prototype.indexForLocation = function(location) {
var line = location.line, column = location.column;
if (line < 0 || line >= this.offsets.length) {
return null;
}
if (column < 0 || column > this.lengthOfLine(line)) {
return null;
}
return this.offsets[line] + column;
};
LinesAndColumns2.prototype.lengthOfLine = function(line) {
var offset = this.offsets[line];
var nextOffset = line === this.offsets.length - 1 ? this.string.length : this.offsets[line + 1];
return nextOffset - offset;
};
return LinesAndColumns2;
}();
exports2.LinesAndColumns = LinesAndColumns;
exports2["default"] = LinesAndColumns;
}
});
// ../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js
var require_js_tokens = __commonJS({
"../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js"(exports2) {
Object.defineProperty(exports2, "__esModule", {
value: true
});
exports2.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;
exports2.matchToToken = function(match) {
var token = { type: "invalid", value: match[0], closed: void 0 };
if (match[1])
token.type = "string", token.closed = !!(match[3] || match[4]);
else if (match[5])
token.type = "comment";
else if (match[6])
token.type = "comment", token.closed = !!match[7];
else if (match[8])
token.type = "regex";
else if (match[9])
token.type = "number";
else if (match[10])
token.type = "name";
else if (match[11])
token.type = "punctuator";
else if (match[12])
token.type = "whitespace";
return token;
};
}
});
// ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.16.7/node_modules/@babel/helper-validator-identifier/lib/identifier.js
var require_identifier = __commonJS({
"../../node_modules/.pnpm/@babel+helper-validator-identifier@7.16.7/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 <= 9